Samsung Galaxy S3 Case Image from Zazzle
This is the story of how I managed to back up the internal storage of my unmodified non-rooted Samsung Galaxy S3 which was stuck in a boot loop. It may or may not work for other Android devices and there is no guarantee that it will work for you. However if your data is important to you, it worths a shot. No external SD card is needed for this and the phone and software wasn’t modified in any way. If you don’t care about my ramblings, jump right to the bottom for the solution in the section Riding the loop.
UPDATE: Judging by the lack of positive feedback, this method could be limited to some special cases. Either my cause for the boot loop was unique preserving a fully working system core, or developer mode and USB debugging must have been enabled before the phone broke. In either case, your mileage may vary. For future reference, here’s how to enable developer mode on Android 4.3+ before your next crash.
Something went wrong
About a week ago my android phone got into a boot loop for no apparent reason. One minute I was checking the time, in the other it was frozen with black screen and blue LED on. I took the battery out then put it back in, and off it went into a boot loop, switching between my carrier’s and the Samsung logo.
As most of the stuff I use on my phone is either an online service or synced, I wasn’t really bothered, although I wasn’t looking forward to spend an hour again to customise all the settings. Once I got over the shock of losing all my three-star levels and unlocked goodies in all Rovio games, there was one thing I really wanted to get off: my photos and videos. I’m not too keen on using a cloud service to take care of all my personal memories, and the ones on my phone were never backed up as I only used it if I had no time or I was too lazy to get a proper camera. Of course, all the data was on internal storage, as with 16GB of space, who needs an SD card?
I knew I couldn’t take the phone back to the shop, as they would have started with a full wipe and factory reset losing all my data. So what other options are there?
This was the first thing I found online, but despite the name, it doesn’t let you download anything. By holding down the volume down, home and power buttons, your phone boots into download mode. The only thing you can do here is to root your phone and flash custom Android images onto your device by downloading a program called Odin to your PC.
I thought I would be able to dump my phone’s full memory to a file, but the dump feature in Odin was always disabled, and I don’t actually know what it is for.
Another thing conveniently suggested on the internet is to flash custom recovery images to the phone which would allow me to create a full backup to an external SD card. First of all, I had no SD card that would have been big enough to hold all the data. Secondly, I still had no idea what was wrong with my phone, and losing the warranty by flashing stuff on it wasn’t really compelling to say the least. Better try something else…
Download mode’s little sister is the recovery mode, which gives you some limited options to troubleshoot your device without the danger of bricking it. You can boot into this mode by holding down the volume up, home and power buttons. You can try clearing the cache here, but it didn’t help in my case and was still stuck in a loop.
Another advantage is that in recovery mode, you get an ADB connection to your PC via USB. ADB is an android management tool that comes with the android developer SDK. You can look at the system log, backup files and even connect to your device’s linux shell. The downside is that in recovery mode you can’t access shit. The internal storage is not mounted in the file system and you can’t mount itÂ without root access.
Riding the loop
While I was fiddling with my phone, I noticed that after the third or fourth boot loop iteration, it has connected to my PC via USB. As the Android system hasn’t started up, it wasn’t mounted as a USB mass storage device, but I could connect to it via ADB, the management tool from the development SDK. To my surprise, even though Android itself was rebooting over and over again, the underlying linux system worked perfectly and allowed a stable shell connection. From there I realised that the SD card was already mounted and I could access my files. Here are all the steps to copy them off:
- Install the Android Development SDK to a folder of your choice.
- Connect the device to the PC via USB cable and switch it on. Let it run continuously in the boot loop.
- Start up a windows command line shell with cmd.exe
- In the shell, navigate to the folder of the SDK tools under [SDK Folder]/platform-tools.
- Once the phone is connected to the PC, run adb shell from the command line.
- Within the ADB shell, find your internal storage and make sure you can see your files. For me it was under /storage/sdcard0.
- Close the ADB shell with the exit command.
- Make a backup folder within platform-tools (mkdir backup).
- Copy the files off by running adb pull /storage/sdcard0 backup from the Windows shell.
Once it started copying, leave your phone in the boot loop until it finishes, for me it took about 30 minutes. As the device is hard at work, it can become quite warm, make sure it doesn’t catch fire though.
It turned out that my boot loop was caused by a software issue, once I copied my files off I did a full wipe and factory reset in recovery mode and it was working perfectly again. While connected via USB in the boot loop you can even run adb logcat to see some error messages, but for me it wasn’t much of a help, nothing obvious came up and I couldn’t have done anything about it anyway. To get a nice filtered colour-coded log, install the Eclipse Java IDE.
That’s it, I think I’ll pay more attention to backing up the files on my phone in the future. If this post helped you in any way, don’t hesitate to leave a comment below.