• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help How to copy files to sd card when phone does not boot?

SYOB SYOT

Lurker
May 13, 2016
7
2
Hello guys,

I am having problems with my phone, so i am seeking an advice. Do you know any method of how to move files from internal storage to sd card while you are in recovery, or, even better, by using computer, through terminal or something like that? If not of how to move them then at least of how to delete them (only specific files)?
I know that you can factory reset phone what will delete all of your files, but i want to copy (or remove) only a few specific files.

[additional details]
If you want to know more, here is why i need to do it. So, i have Huawei y7 prime, and it has become strange. Ever since i got it, whenever the amount of free space in internal storage dropped below 100 MB, phone popped out low memory warning. But the problem is that it is not possible to dismiss this warning. It is drawn on top of other apps, it offers one and only one option (to perform memory cleaning) and it does not want to go away unless you acctually allow it to perform automatic memory cleaning. The problem is that this very violent warning is repeated every 60 seconds as long as the amount of free memory is below 100 MB. So, in case if this automatic memory cleaning does not clean enough memory to free at least 100 MB, phone will enter infinite loop. It will show low memory warning, then 60 seconds later show another one and so on. And since this message is not dismissible, you actually have to play along and actually start memory cleaning every 60 seconds.
But the real reason why is this a problem is that memory cleaning is so resource intensive operation that all apps often start freezing and not responding while memory cleaning is in progress. But since, if memory cleaning does not recover at least 100 MB of space, phone forces you to perform another memory cleaning, in such case, you have 60 seconds to complete the memory cleaning and switch to another app to manually delete or remove files before another warning pops out and forces you to perform another memory cleaning. Often, after memory cleaning is complete, you have only a few seconds of useful time to try to open another app and delete or copy files. That is not enough, and in case of infinite loop, your phone becomes practicly useless. You have to connect it to a computer and delete or move files through a computer to get rid of this infinite loop.
This all is really bad, but it is solveable. The real problem is that apps become unresponsive while scan is in progress, and in case of infinite loop, they often do not become responsive for a long time. In that case, they start failing and getting closed. Including system ones! So in case of the infinite loop, apps start getting closed one by one and it is only matter of time before some critical system app is closed what forces device to reboot. This behaviour was present ever since i had my first low memory incident on that device after i got it. Surprisingly, after reboot, first memory cleaning usually does recover more than 100 MB of space and infinite loop is broken.

There is another special case of low memory situation, and that is the case when there is no free memory at all, that is, when there is 0 b of free memory left. In such case, the same cleaning loop happens which eventually results with device reboot if i am not able to move or delete files through computer in time to prevent this. But, case when there is exactly 0 b of free memory is special because in that case, when device reboot happens, it sometimes does not manage to boot on the first try and has to reboot twice.

At least that was the case until a few days ago. Things got drasticly worse in the last few days. 0 b low memory incidents started to cause boot loops, the worst kind, infinite ones. Two low memory incidents ago, when incident happened, phone attempted to reboot 4 times before exiting the boot loop. On the previous low memory incident, it took about 16 boots to break out of the boot loop. Now, i am facing another 0 b low memory incident involving a boot loop spanning at least 128 boots and i have no reason to believe that this boot loop is going to end any time soon. Those boot loops only happen when there is 0 b low memory incident. When there is some other low memory incident involving a reboot but with more than 0 b of memory free, the boot loop does not happen. Device reboots only once after what on the first memory cleaning it is able to recover more than 100 MB of free space after what the device continues functioning normally.

My guess is that Android has to write something durring boot what it cans not in case if there is 0 b of free memory what causes a boot to fail and triggers reboot what causes the bootloop. Although until a few days ago the device was able to boot with 0 b of free memory without problem. So this is strange.

0 b low memory incidents are very common on my phone since i have apps installed which download some live streams automatically in the background, and those streams can take up to 8 gb of free space per stream. So, if live stream happens when i am not around my phone, this app for downloading live streams can easily eat all phones internal memory and create 0 b low memory incident. And, untill few days ago the phone was able to recover from those incidents, almost on a daily basis.

However, now those boot loops started and i am now neither able to recover from 0 b low memory incident by moving or deleting files via phone nor via computer. Since phone does not want to boot as long as there is no free memory in internal storage, both options no longer work.


So this is why i came here. Now, i need a way to copy or delete files from the device while device is not booted. I know the exact paths to files to be moved to sd card, and there is only a few of them, so it can be done one by one by hand.

So, i can not boot the device, but i can turn it off, put it in recovery mode or put it in download mode. Whatever of those 3 is reqired. So, i do have the recovery, but it only offers to do factory reset, to format internal storage, to clean cache and to refresh Android without loosing data by downloading the latest firmware and installing it. The key word here is downloading, what is absolutely useless in case when the reason why phone needs to be recovered is 0 b low memory incident. So, this will not work. I can do factory reset, sure, but i would rather not to have to reinstall everything and set up phone all over again. Unfortunately, recovery does not offer any file manager.

So this is what i am seeking. Some file manager that can be run from recovery, that will enable me to move files to my sd card. Or, the preffered option, some computer program or console (terminal) utility that will act as file manager, that can operate on a device while it is in the download mode, recovery mode or while it is powered off.


Do you know of any such program and what do i need to do to move files to my sd card?


Thank you for any help.
 
The only thing I can see that you could try is clearing the cache. That is harmless (it's just temporary files), but on the other hand if this Huawei "memory cleaning" hasn't done that already then it is truly incompetent.

Neither recovery nor download mode is an operating system that allows you to install and run an app. Both are stand-alone programs that run outside of the Android OS, and they can only do the things they are written to do. So there is no prospect of finding a file manager that can run within them.

You could do this via USB debugging (install "adb" on a computer, connect via USB, enable USB debugging on the phone, run adb, then type the command on the computer to delete the file). The problem is that there are only 2 environments in which you can do that: (1) with Android running, or (2) with a custom recovery that includes an adb_daemon. But (1) is not where you are, and (2) is out because you clearly only have the stock recovery (and even if there is a suitable custom recovery for your model you won't be able to install it when in a bootloop, and unlocking the bootloader, a necessary prelude to doing this, will factory reset most devices anyway, so you really need to have done this before the problem arose).

I don't know Huawei's "download mode", but if I assume it's analogous to the "fastboot" mode on the devices I'm more familiar with you will be able to interact with it over USB (probably using "fastboot" and/or some Huawei utility, but it will interact at the level of partitions rather than files (and erasing the /data and /cache partitions is what a factory reset does, so we come back to that again).

With the phone powered off there is nothing you can do. Without some system running on the device it cannot respond to the computer.

Sorry to just bring a long tale of bad news, but I don't see any way of doing what you want. If clearing the cache doesn't help then it's either keep rebooting in the hope that it eventually boots or give up and do the reset. The truth is that the only real solution is to keep a lot more than 100MB of storage free - in fact I'm amazed that it gets as low as 100MB before you start getting out of storage errors, as with most modern devices the warning threshold is many times higher than that (though the response is also more reasonable: it stops you downloading apps but doesn't launch some half-baked "memory cleaner" on you). Android uses a fair number of temporary files when running so I'm not at all surprised that it falls over if you manage to fill the storage completely, I just don't remember the last time I heard someone actually get into that position.
 
Upvote 0
Thank you Hadron for detailed explaination. Yes, I have that autodownload app which downloads some live streams and it can download many gb of data. If i am not monitoring my mobile phone, for example, over night, it can eat memory completly, even if i have 8gb free before i go to bed. It gets down to 0 bytes free. Actually this happened to me very often. To reach 0b of free memory. And phone used to take it well, until recently.

Good thing about my recovery is that it offers the ability to download the last version of the system (just like when there is system update) and install it without wiping data. This should restore the system to working condition. But it says that it needs 2.5 gb of free space in order to do that, so that is why i got the idea to delete files.

Ok, in any case, thank you. I will try for a day or two more and then do a factory reset.
 
  • Like
Reactions: ocnbrze
Upvote 0
ok so i would like to throw my 2 cents into this discussion.

first off never use anything that is a "cleaner" app. as you have said they use a large amount of resources "cleaning" your phone. it is not necessary. there many ways to clear up space. most of the time will be clearing up the temporary files called cache. you can find what apps are using the largest amount of resources and just wipe the cache, or you can go into recovery and wipe all of the cache there. now all of this is for future knowledge as you do not have a working phone to do all of this.

......unless you do a factory reset which i see no other option, but you will loose data if you do so.
 
Upvote 0
On Huawei y7 usage of memory cleaner is not optional. Once your phone becomes low on memory you either can start the memory cleaner or stop using your phone because it does not allow you to run any other app unless you done memory cleaning. And it does this every 60 seconds.
(It is a built in app)
 
Upvote 0
I am unable to boot to safe mode. I am not even sure that my device has it. I never managed to start it, not even before when it was working. I see some posts saying that safe mode can be entered by holding the volume down button while booting. This has no effect. It results in the bootloop just as if i did not hold it at all. And if i start pressing it too early (like quorter of second after releasing the power button) then this has an effect of pausing the boot process. As long as i am pressing it, booting is frozen on the first logo screen. When i release it then booting continues to second, animated logo screen and continues to bootloop.
Perhaps i am not following the correct procedure for safe mode or my device does not have this feature.
 
Upvote 0
Does this phone have a microsd slot and can you tell this downloader to download to the removable card? A card filling up won't crash the phone this way.

If not then you need to find some way to control this downloader, because it's crazy that it keeps doing this.

(Note that /sdcard is not the removable card, that will have a different name. /sdcard is part of the internal storage which legacy apps can use even if a phone doesn't have a card slot).
 
Upvote 0
Yes, i thought so too. I am planning to switch several memory hungry application storage locations to external sd card. It can save there just fine. Just the thing is that my sd card has only 8 gb, and it has only about 3 MBps write speed (some 4$ cheap chineese sd card from ebay) so that is why i kept settings to download to internal storage until this bootloop messed my plans.
But yea, that is a good idea, and i will change settings to download to sd card once i resolve this bootloop. I am planning to buy myself a higher quality 128 gb sd card which costs about 35$ in the comming months. Once i do that i will not have low memory problems anymore.

But for now, my first priority is this nasty bootloop. By the way, i passed reboot number 500 with no luck. It really looks like this bootloop is infinite.
Also, one new information. An option which i had untill today in my recovery to download stock OS and apply it without loosing data today misteriously stopped working. Not that it would work anyway, because it downloads OS to internal storage (which is full) without the option to switch to external sd card, but it at least tried to execute when i selected it in my recovery. Now it simply says "Getting package info failed" without trying to download it. As i said, it would not matter even if it worked since there is nowhere to save files, but, i find it just odd that it stopped working like that. Now only possible option which my recovery offers is factory reset.

Good thing is that this is not my primary phone, so i can take it easy while trying to resolve the problem.

And one more thing, yes, i really am able to talk to my device from my computer through fastboot, but all the good commands do not work since bootloader is locked. And on Huawei (android) devices you need a password to unlock the bootloader, and Huawei can generate the password but they do not want to do it if you ask them. They used to generate passwords for bootloaders based on imei numbers at customer requests but they do not want to anymore.
I was not able to find an algorithm for generating password, so only option which i found is to buy a licence for some third party program to generate the password.

I was considering unlocking my device, but now when i see that only option is to buy some program which i am not sure that it will work, i am not really for this option anymore.
Just a small update with my recent thoughts.
 
Upvote 0
I am unable to boot to safe mode. I am not even sure that my device has it. I never managed to start it, not even before when it was working. I see some posts saying that safe mode can be entered by holding the volume down button while booting. This has no effect. It results in the bootloop just as if i did not hold it at all. And if i start pressing it too early (like quorter of second after releasing the power button) then this has an effect of pausing the boot process. As long as i am pressing it, booting is frozen on the first logo screen. When i release it then booting continues to second, animated logo screen and continues to bootloop.
Perhaps i am not following the correct procedure for safe mode or my device does not have this feature.

It should have it.
https://consumer.huawei.com/en/support/content/en-us00737976/
"How to enter Safe mode

Press and hold the volume-up and power button when you power on your phone until the Safe mode is displayed. Then use volume buttons to choose Safe mode and the power button to confirm."
 
Upvote 0
Your problem is very simple.
You are cramming too much crap onto your device.

Your solution is to get a device that can harbor the amount of data that you are trying to cram into this one, or to stop doing what you are doing and monitor this device.

Any device is going to act stupid when you get down to only 100MB, and frankly I am quite surprised to see that the thing allowed you to fill it up that much.
Most devices start acting wonky when memory gets below 1GB.
The idea that it has shown 0MB available is amazing to me- the fact that the device could even muster up the effort to tell you such a thing!

This device is simply crying out to you for some relief!

Now, yes, most cleaning apps are garbage.
Yours is built in, so if there are no ads associated with it then it is probably ok.

There is really only one cleaning app that does exactly what it says and does what it can (cleaning apps have been very restricted in newer models of devices).

https://f-droid.org/en/packages/theredspy15.ltecleanerfoss/

If this app does not help, then keeping AT LEAST the same amount of open memory as the device has RAM is the best bet for proper function of the device.
(Example, my device has 2GB of RAM, so I always leave at least 2GB of empty memory.)

There are reasons for this, and if you like I would explain.

Also, please do not think that I am making fun of a memory strapped device, as this is all that I have ever had.
That is why I had to figure out ways around it.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones