[Guide][English] Unbrick your LG G3

android 27 déc. 2015

My first Christmas present was very nice. I was on my way to a small village in the Paris area, I had just left the A5 and entered this jungle that Parisians seem to love: la Francilienne. Luckily my phone, LG G3 « International » (D855 for short), was there to guide me.

It is at that moment that my smartphone suddenly passed away. Switch off, impossible to turn it back on: bootloop of CyanogenMod 13, freeze when bootingTWRP to try to reflash quickly CM, finally stuck on the LG logo.

After hours of research, all kinds of crafts … My phone is alive. What if I told you we’re gonna fix it?

 

Well. Let’s play?

 

Step 1 : pre-requisites

 

 

I put everything you need in the zip file, except for the TOT file that contains the original firmware, as it is kind of big (>2Gb). Link for this firmware file follows.

We’ll need a computer running Windows (I did this guide under Windows 7) and:

  • LG drivers for the phone
  • Qualcomm HS-USB drivers (for this famous « 9008 » thingy)
  • DSEO, to use unsigned drivers under Windows
  • BoardDiag by willcracker
  • 2-3 files, like DLL linked to specific phone models
  • LG G3’s firmware (TOT format)
  • LG Flash Tool v1.8
  • a little piece of metal such as iron wire
  • a little screwdriver

 

The thing is, to install Qualcomm drivers, your Windows installation needs to be in « test mode » as they’re not signed by Microsoft: if you’re in « regular mode », you won’t be able to use those drivers. So, to start, download and extract the zip archive I linked above, and open the folder « 1-DSEO » and execute the .exe file as an administrator. Enable test mode and reboot.

After the reboot, you’ll notice near the clock that your test mode is enabled. 😉

Then, install the content of the folder « 2-Drivers », with the appropriate setup (32 or 64 bits depending on your OS) for the Qualcomm drivers, then install LG drivers.

 

Step 2 : that f*ckin’ 9008 mode

Some of us think that Qulacomm SoC are indestructible.

Actually, according to phone models (because that part does not apply only to LG G3, but to any Qualcomm Snapdragon-based phone), there is a « recovery mode » that communicates (or try to, at least) with the chip to say « hey, it’s going to be okay, you can get back to work ». A phone placed in this mode is recognized as QHSUSB__BULK by Windows if the correct drivers are not installed, and as « Qualcomm HS-USB QDLoader 9008 » (COM port, in fact) if drivers are OK. This will allow us to use other tools to fix all that mess.

So, at this point, if you’re « lucky », your phone seems to simply not want to switch on, and it is possible it locks securely into 9008 mode, in which case you just have to plug it to tue computer to check … or you’re less fortunate and you’re stupidly starring at the LG logo waiting for it to vanish. Phone may eventually enter in fastboot mode after 15-20min. Note that this fastboot mode does you no good, since it only gives errors if you try to use it.

 

Teardown

If you’re stuck with LG logo… Real fun is around the corner. Open up your G3, pull the battery out and take off the 8 screws that maintain the upper plastic part on the motherboard. Leave the one just near the camera in place, it’s okay. Pull of the SIM card / SD card, if any.

You’re now facing your phone’s motherboard. There’s a « metal block » in the middle of the mobo, you can safely remove it, it should come very easily.

shortme

There we are. We’re going to use a metal wire to make contact between the 2 red dots  you can see on the picture above. You’ll have to maintain contact between those points, and use you 3rd hand to connect the USB cable to your computer. Windows should detect the device almost instantly. Count to 5 seconds, and release the contact.

Windows’ Device Manager is your best friend now: go check that the COM port we were talking earlier is detected (Qualcomm 9008…).

 

Now, let’s get the party started

Download  from StorageCow the TOT file corrsponding to your phone. The link points to the folder for « LG G3 international D855 », the model we have here in Europe. You want to download V10E firmware, in 16Gb or 32Gb depending on your phone.

Once the file is on your computer, simply open the « 3-BoardDiag by willcracker » folder of my archive and run BoardDiag. Fill the window as below:

Capture2

BIN should refer to your TOT file and DIR to the folder you want to extract the TOT file to. click on Extract, and let the magic be. No, it’s not frozen, even if if looks like it is… that process may take 10-15min 😉

  1. AP Check : self-explaining
  2. EMMC Test : we’ll check internal memory for defects… don’t select a specific particion, we’ll test the entire EMMC
  3. AP chipset : B2 corresponds to our G3’s chip
  4. Com port : the one affected by Windows (see your device manager 😉 )

Once the extraction process is done, point « Target dir » to the same folder, double chek COM port and click « START ».

If you’re lucky enough (again) both of the tests will be OK. If, like me, you have nothing but a huge FAIL on the EMMC test, in the options list switch « Read/Write » to « Erase », unplug/plug your G3 (always with your metal wire to have 9008 mode, that’s pain in the a*s but it’s mandatory) and click START again. Internal memory will be entirely erased. Do a « read/Write » again, this time it should be a PASS. :mrgreen:

Now untick EMMC Test select « RESTORE BOOT IMG ». Choose and restore, one by one and in the right order: aboot, BackupGPT, boot, dbi, laf, PrimaryGPT, recovery, rpm, tz. Check there’s no errors during the process!

Once it’s OK and ONLY if everything’s OK, put the battery back into the phone (still connected to the computer) and flash the Sbl1 partition. This will cause the phone to reboot. DO NOT FLASH SBL1 BEFORE THE OTHER PARTITIONS (you want super-brick? 😉 ).

 

Weeeell. If the TOT file you have corresponds exactly to the ROM you were running before the crash, your phone MAY start normally. Otherwise, unplug the USB cable, remove the battery, put it back in place, keep pressing Vol+ button and plug again the USB cable. When you see the « Download Mode » screen, release Vol+ button.Now you should see the « Firmware upgrade » screen, and believe me, that’s a relief. \o/

 

Step 3 : back to stock

We just need to flash stock ROM then.

Install LG Flash Tool from « 4-LG Flash Tool v1.8 » folder, but don’t run it yet. Replace the MegaLock.dll file in C:\LG\LGFlashTool\ with the one in the archive.

In the devices manager, right click on « LGE AndroidNet USB Serial Port » and go to Properties> Port settings > Advanced, and change COm port to 41. Apply.

 

Back to LG Flash Tool, tick « Select Manual Mode », point the DLL thing to the given « LGD855_20140526_LGFLASHv160.dll » file, which corresponds (again) to D855 ONLY.Other DLL are in their respective folders on StorageCow, along with TOT files.

Click « Add » button on the right of S/W and point to your TOT file.

Capture

Click OK, and in the main window just click on the yellow arrow. You may need to unplug and plug back your phone (again, in Download Mode) for the transfer to start. This may take a while to begin, maybe 1 minute.

Transfer should be quick (less than 5min) and Flash Tool should throw an error somewhere after 85% (not a problem, the phone should be restarting: every error after 85% should be fine).

Note : I personnally couldn’t transfer my ROM, I faced an error that was caused by LG Flash Tool not being fully compatible with USB3. Try again with a USB2 port, or another computer.

 

Capture

(yeah, interface changed, I had to move to my old laptop with Windows 7 and… USB2 ports…)

 

Once you’re done, you should be able to boot your G3 into Android !! 😀

 

I included in the archive another version of LG Flash Tool 2014, for KDZ files flashing, if that’s more convenient for you. If you’re not sure about how to fill the window, just ask.

 

Bonus : G3’s IMEI is gone

Well, remember? We wiped everything. Maybe a full wipe was not required, I don’t know, maybe wiping some partitions only would have been enough. But for now, our IMEI is « 000 », and no phone carrier will allow our G3 to connect to one of its antennas.

As we are all serious guys, we all have our backup of the EFS partition, right? You know, one you should have done with TWRP right before flashing it for the 1st time…

 

This is the most simple way : root our firmware(Android 4.4.2 : easy), install TWRP, put the backup on an external SD card and restore it.

 

Root

You need to go into your phone settings, tap 7 times on build number to unlock Developer Options, and in this section you have to enable USB debugging (ADB). Then, run the installer in the folder « 5-Root » and launch the tool. Plug the G3 to the computer and click « Start ». You’ll have to authorize the computer fingerprint on the phone, tick « Always » of course. the script should be doing its magic right now.

TWRP

I included TWRP 2.8.7.0 by jon777 with modem support, F2FS and so on. Once you’ve rooted the phone, open the folder « 6-TWRP », right click in it while pressing Shift key. You’ll be able to open an invite from here. AGAIN, this TWRP file is for D855 only. For other variants, download it from here.

In the console, enter : adb.exe push recovery.img /sdcard/, adb.exe shell, then su. SuperSU should pop on the phone: authorize the shell. You’re now root. Enter: dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/recovery, and dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery.

Now type exit twice, and finally adb.exe reboot recovery. The phone should reboot right into TWRP!

Now you’re free to restore an EFS backup, a full backup…

 

What if I don’t have any EFS backup?

Too bad. I faced this issue once (that’s why I have a backup of my EFS, now…), you can apply GZ’s method on the G3. Just go to DroidViews and follow the instructions.

 

Over!

Here we are. I survived 3 days without my phone, and I wanted to demonstrate that there’s always something to do before throwing something away and replacing it by a new one. I flash CyanogenMod 13 again, along with OpenGApps, and I’m fine for now.

Big thanks (really !) to 777jon, team codefire, l33tlinuxh4x0r, hacklockx, hyelton and xian2786 from XDA forums for their guides and tools which helped me going through this.

Mots clés