[SOLVED] What to do about an android phone/tablet/device that keeps restarting/rebooting
This info may help you if the following is true:
- you have installed 10s if not 100s of apps on the sd card of your android device
- just prior to bootloop, you tempted the camel’s back by adding those final few bytes of data to your sd card: maybe installed that one final app, or perhaps copied a bunch of music/video files to your sd card
- all of a sudden, without warning or apparent cause, your device has gone into the very annoying bootloop cycle with no end in sight
If your device is a phone and you need to use it right now, power off, remove your sd card, then power on: now at least you can use the core functionality of your phone.
The solution documented here requires that your device be rooted.
If not, you can at least follow step 1 as described below to regain control of your device, after which you can go about uninstalling apps (the one’s you left in .android_secure) to bring stability back to your device (or move them to internal storage: settings->Apps, select an app, click on button to move app).
But really, get the thing rooted: it’s your device, practically your brain’s appendage, something which you should be able to fully control.
After probably way too much time tweaking my phone with just the right blend of got-to-have apps and 100s of interface settings, the thing all of a sudden started rebooting on me. So maybe that’s a good thing: excuse to buy a new phone, if it weren’t for the loads of time required to get a new device up to par.
So I wasn’t ready to upgrade just yet.
If you find yourself in a similar situation right this very moment, like me you’ve probably amassed a usual-suspects list:
- did I somehow break my device?
- is an app causing this?
- did I somehow install a virus?
- is my sd card malfunctioning?
Who knows? More importantly: who’s trying to contact me right now and I don’t know because my freaking phone won’t work!
I went through all of this, as has many other people. I’ve decided to summarize what I did to fix this problem. It is documented elsewhere, no doubt, at least in pieces, but this is such an annoying issue that the solution deserves repeating. If it saves you some time and struggle, then I’m satisfied -- my payback for the words from others that helped me.
First, for that I’m-not-alone comfort, have a look at . And then, for that hmmm factor, have a look at .
Scenario: your car has a flat tire.
Action: you go to a mechanic and say, “I have a flat tire.”
Response: “Buy a new car.”
I hate when that happens.
So this is what you’re not going to do to fix this problem: buy new hardware. And along those lines is this: you are not going to factory reset your device and start from scratch! The next time someone suggests that you need to factory reset, tell them to go buy a new car.
I’m not going to give the nitty gritty details of every step. This is a one-time info share, take from it what you can, along with your good friend, mr. google.
You have too many apps installed on your card in .android_secure and this is the main cause of the bootloop.
- use your PC to access your sd card directly (I used a microSD adapter inserted into a usb card reader). Simply connecting your device to your PC probably won’t work because of bootloop, so you need to use another device capable of reading your card
- move all of the files in .android_secure to a temp dir on your PC, except for say 20 files (.asec files)
Install the freely available EaseUS Partition Master Home Edition on your PC.
- in this app you’re going to be creating a second partition on your sd card
- copy the entire contents of your sd card to a temp directory on your pc just in case something goes wrong during the next few steps (highly unlikely)
- resize the existing fat32 partition on the card, freeing up some space for the eventual second partition
- I have a 32 GB card and decided to use a 2 GB sized second partition, so I shrunk the fat32 by about 2048 MB (for performance reasons you don’t want the second partition larger than 2 GB and if your card has a lower capacity, you’ll want to shrink fat32 by a smaller amount – as a guideline, I ended up moving about 70 apps to the second partition, including associated app data and cache, that took up about 1 GB of the 2 GB total space)
- my first attempt at this didn’t work, so I ended up doing this: disabled my antivirus, defragmented the card, and also temporarily moved some large files (music, video) off the card to make enough room for the resizing to work
- when resizing is complete, create a new primary partition: use ext2 (try this file system first; if later on, when configuring link2sd, it doesn’t work, go back here and use fat32 instead) – for performance reasons, you don’t want to use ext3 or 4. Make sure to set this new partition as primary.
Install Link2SD on your device.
- reinsert card in android device and power on (if your device is a phone, set it in airplane mode which seems to at least delay a reboot)
- with a wireless connection established, install Link2SD via Google Play, then disable the wireless radio, again as preventive measure against reboot
- if your device is still rebooting, repeat step 1, decreasing further the number of .asec files in the noted directory
- run the app, select ext2, then let the device reboot
- again, if you get any kind of error associated with not being able to read ext2, repeat step 2 this time using fat32 as the file system
- when the device reboots without any errors being reported, open link2sd again
- in settings, select Autolink
- start moving moveable apps to the new ext2 partition: select an app, then select “Create Link”
- it is possible to select multiple apps as well for this process
- do this for all the apps you can, then, using step 1 as reference, move back another 20 or so .asec files to .android_secure, and after that start creating links for them within link2sd
- one caveat I came across: I had an app that had been patched using Lucky Patcher. This app did not get moved to ext2 properly, and after the fact, when I tried to reinstall the app, I kept getting a memory related error: simply run Lucky Patcher which will automatically, upon startup, delete the unused odex file that got left behind during the failed Create Link process. Then you can reinstall the app, and with the Autolink setting enabled, the app will be installed to ext2
- keep up the process until you’ve got all your moveable apps loaded onto ext2
Enjoy using your device once again.
- disable Airplane mode, enable the radio, and all should once again be stable
Maintain control over your device by backing everything up.
- I prefer to back up the rom rather than using something like Titanium Backup, so I use clockworkmod, accessed via ROM Manager, then I move the backup to my PC for safe keeping
- but that’s just half the backup: I still have that sd card to back up
- the fat32 partition is simple: connect via usb and file copy to your pc
- but what about that new ext2 partition? It was a challenge to find a solution to properly backing up that. You might read elsewhere that a rom backup includes ext2 – don’t believe it! Based on size comparisons of rom backups before/after the ext2 app transfer, it doesn’t look like ext2 is included.
- another suggestion is to install Ext2fsd on your pc in order to access the ext2 partition on your card. This did not work for me and in fact, in my attempt to get it to work, I ended up somehow, even though configured to read-only, screw up the ext2 partition! Freaking YIKES!! After all that time moving apps, finally getting the phone back in working order with all my beautiful apps still working, trying to back up this masterpiece, I break the damn thing again! And at 1 in the morning. It hurt. Luckily I was able to use EaseUS to restore the partition and all was well once again.
You don’t want to go down that road.
- using adb pull worked for me (this is where google might come in handy for you if you don’t know what I’m talking about)
- connect the device to your pc via usb and open a cmd shell
- run these commands:
- adb devices
- to make sure you are in fact connected to your device. If a device is not listed, something is wrong and you’ll need to figure that out
- for me, using an HTC Desire C phone, an htc sync app is automatically started whenever I connect my device to my pc; that app starts a process called adb.exe which is different from the adb.exe I want to use, so first I have to go into task manager and kill the existing adb.exe process, then all is well
- adb pull /data/sdext2 ./backup
- this command will copy all the contents of the ext2 partition to a folder on your pc (I created a folder called “backup” – choose a destination that suits you)
- this will copy all the .apk files stored in ext2, along with two additional directories: “dalvik-cache” and “data”, which are also stored in ext2 as default settings within link2sd
- it is possible that your ext2 partition is mounted under a different name. To verify the correct mount name, run link2sd, and in settings select “Storage Info” and look for reference to “SD Card 2nd Part.” which will indicate the mount name that you’ll pull from in the above adb command.