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

How to resolve a boot loop without losing data?

amba

Lurker
Nov 5, 2017
6
1
Hello, my phone is boot looping and I wanted to ask for help in getting it back up and running.
There are about 5 seconds once Cyanogenmod desktop is shown before the phone restarts.
In safe mode the phone works fine. I can also boot into TWRP recovery and connect the phone to a PC. I backed up the phone after it got bricked through recovery.
What will be the best way to go about fixing it without losing data? (Except for that backup, my apps are not yet backed up). Thanks
 
Grrr. You're supposed to make a backup in TWRP before anything happens. If you backup system, data & boot, you can always restore that if anything goes wrong.

Was this a fresh install of CM? Did you just flash it and it bootloop? Or have you been using it and then it randomly started looping?

You can try backing up data through TWRP and then wipe system partition and install CM again. This shouldn't erase your data, but the backup should keep your data safe. If you want to be extra safe you can also transfer a copy of that backup to your PC via TWRP just in case you end up wiping your internal storage.
 
  • Like
Reactions: amba and Jfalls63
Upvote 0
Two other things to try.
Remove battery, press and hold the power button to drain motherboard. Replace the battery and see if it will do a normal boot.
I tried this method. The boot animation ran for a few minutes, then "Android is starting... Optimizing app #". Then desktop appeared, and after a few seconds the phone returned to bootlooping.
Other would be to dirty flash the same rom without Gapps.
I like the idea of dirty flashing, and I have the same .zip file of the build I'm running. Would my app data be kept safe?
Grrr. You're supposed to make a backup in TWRP before anything happens. If you backup system, data & boot, you can always restore that if anything goes wrong.
I may have done so... over a year ago :\
Was this a fresh install of CM? Did you just flash it and it bootloop? Or have you been using it and then it randomly started looping?
I have been using this build for about a year now. The phone happened to be connected to a computer when the bootlooping started.
You can try backing up data through TWRP and then wipe system partition and install CM again. This shouldn't erase your data, but the backup should keep your data safe. If you want to be extra safe you can also transfer a copy of that backup to your PC via TWRP just in case you end up wiping your internal storage.
You mean I won't have to reinstall my apps, because they will not be erased and all data will be saved? Alternatively will i be able to restore apps from the TWRP backup to the new installation?

Thanks a bunch...
 
Upvote 0
If you backup your data partition and reflash the rom, you should be able to restore the data partition which should have all your apps and app data.

When you make a backup in TWRP it's an image backup and restores your device exactly to the state it was in when you made the backup.

It's been a long time since I've done anything like that. I use titanium backup for my apps and just restore from that. But obviously you can't do that at this moment.
 
  • Like
Reactions: amba and Jfalls63
Upvote 0
Yes. Even though I had to reboot a few times because safe mode got stuck after a about 2 minutes each time... I managed to uninstall all apps that don't contain crucial data or that are backed up, and restarted the phone. It isn't restarting on it's own when the screen is locked, but when I unlock it I get a message "Unfortunately Android system has stopped" and after a while the phone reboots. Will update tomorrow on my progress in solving the problem. Thanks a lot so far!
 
  • Like
Reactions: Jfalls63
Upvote 0
I think that you can just flash the ROM portion without wiping anything and all data will still be intact just like if you were updating a nightly.
@mydian is still pretty current on the S3, hopefully he can chime in.

I moved on to the S5 so I may be a bit rusty but I'll try from memory.

Here are a couple things I would do:


1. Make sure you have a TWRP backup of what you have now, even if it's boot looping, saved on your external SD.

2. You already tried dirty flashing correct? I think so from what I skimmed through above. If not try it. Don't flash gapps just the rom. Dirty flashing doesn't lose any data/apps.

3. Wipe everything as if you're flashing a new rom. Flash the rom, and gapps to start over. Don't restore anything. See if the phone boots and works properly. If so boot into TWRP and restore only data from your backup. This will restore all your apps and settings. See if the phone still boots. If it doesn't you have an app that is causing the boot loop. In that case wipe the phone, flash again and use Titanium Backup to restore apps individually from your backup. It's a pain but it does work for the most part.

4. If that didn't work you're going to have to flash the stock rom. When going from CM or AOSP back to stock you have to use Odin or your S3 will have problems writing the the Internal SD. So 1st, boot into TWRP and wipe system, data, cache, internal sd, and dalvik manually (seems excessive but I always did it that way.) Then boot into download mode and flash the stock rom for your model and carrier S3 with Odin. See if that works. If so then root the phone again and go back to #2 above.

As long as you have a TWRP backup of DATA you can use Titanium backup and restore apps from your TWRP backup for the most part. I've had good luck with games and stuff on my S3 and Nexus 7 doing that.

Good luck and let us know what happens.
 
  • Like
Reactions: Jfalls63
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