Schmorp's POD Blog a.k.a. THE RANT
a.k.a. the blog that cannot decide on a name

This document was first published 2015-09-05 11:53:24, and last modified 2015-09-05 11:53:24.

Tidbits - LG Optimus L5 E610/E612(f) Frequent Reboot Problem

Today it's all about a little technical problem - frequent "random" reboots of LG Optimus L5 phones after rooting or unlocking it. The phone is a bit obsolete, but people on the internets still ask about this, and since I ran into the same issue, here is how I solved it.

What happened to me was that I flashed a custom recovery (TWRP) to a custom rom. Tough game, asshole company LG locked the bootloader and recovery, so I flashed TWRP on the already rooted android install. Rebooted, and didn't load because of a secure boot failure ("because asshole company LG &c").

No problem, some russian forum (ugh) had a patched bootloader, so I made a backup, flashed it, and I could boot my original android and TWRP. Great, let's switch to omnirom... wipe the data and... whoops, that was an unexpected reboot.

Turns out that asshole company LG also has some watchdog that reboots the phone after a few minutes. Or so. In any case, whatever you boot, the phone reboots a few minutes after, which is usually shortly after it has booted.

Now, backup gone, android gone, what could I do.

First, I had to find the right bootloader, and this is where my problem started. The phone is a european "E610/E612(f)" model, and the E612 is reasonably distinct form the E610, so what the heck is it? Turns out, asshole company LG also sells this phone in various different hardware configurations, under various different (but non-matching) model names. The E612 is usually without NFC, the E610 is with, and the problem is that the "E610/E612(f)" is actually a E610, and that is the problem with the bootloader.

Finding the correct bootloader for the E610 is not easy, but found one, even nicely packaged, on XDA.

So, how to resurrect the phone when it has this problem?

First, note that this procedure works only for the E610 and can brick your device for good. It might be helpful for other situations or phone to get a general idea of what is possible, though.

First, you probably did root your phone already, or do have a custom recovery working. If you have neither, try to root it really fast and install TWRP (, local copy). If you don't know how to do that, google it.

I found it quite hard to enter recovery mode - what reliably worked for me is to remove the battery (and USB power) and insert it again a few seconds later, hold volume down and the home key with my left hand, then press and hold On until it vibrates. When the LG logo appears you can let go, to save your fingers from pain.

Now that you have a recovery, get a nice rooted android on your phone. If you already have one, you don't need to do this. I opted for this cyanogenmod build, but anything should work, really.

When you install and boot this, it will reboot. That's ok, just boot again, and it will go further. After 2-3 reboots, you should finally be able to configure your android image and be able to access the settings (maybe after another reboot). There, enable the developer mode (if needed), and in the developer menu set Root Access to "Apps and ADB", and enable the Android debugging bridge and USB debugging (google it). You might have to tick "Unknown sources" in the Security section as well. All this might be called differently in different android variants - again, google it.

It's OK if the phone keeps rebooting, but there should be enough time to get some things done. Practise on another phone if need be.

Then run adb (in Debian GNU/Linux, it's in the android-tools-adb package) on your computer (adb devices) and connect to your phone. It will ask you whether it should trust the computer, so tick "Always trust" or "Remember" and Agree.

From then on, you are in business, because you can run commands as root remotely from your computer even while booting android. Here are some commands you might want to run - you can put them in a shell file and execute that:

adb wait-for-device
adb root
adb install E610_unlock_1.0_signed.apk

The first command waits for the device to appear. The second switches to root mode (not necessary for installing apps, but maybe useful for other recovery attempts), and the last installs a small app that "unlocks" your bootloader (by overwriting it). The app can be downloaded from XDA (local copy).

Run it, press "Unlock Bootloader", allow root if needed, and you should be able to reboot with your problem being fixed.

Other things that might be useful

If your problem is more complex, here are a few other things you can do:

adb wait-for-device
adb root
adb shell

This gives you an interactive root shell. If you have a backup of your old bootloader on your internal SD card, you can restore it with:

adb wait-for-device
adb root
adb shell dd if=/storage/sdcard0/bootloader.backup.bin of=/dev/block/mmcblk0p5

You can also push files to your phone (e.g. when you want to flash another recovery or bootloader):

adb push file-on-pc /storage/sdcard0/name-on-sdcard

Last not least most of the alternative boot loaders support fastboot. To enter fastboot mode, instead of holding Volume Down + Home on boot, you hold Volume Up + Home.

fastboot is a good mode to flash another recovery (e.g. fastboot flash recovery my-twrp-image), if your current recovery doesn't work, or try different kernels and so on - when in doubt, google it.

That's it

I hope this page is useful to somebody. If you have such a device and are technically capable but have a problem with the procedure, you can contact me. I will ignore any "my phone not boot, pls hlp quick" mails, though.