yashsingh1/xdaforums huggingface dataset:
[LG V40 Guides, News, & Discussion] paxar331:
It seems the 'prog_ufs_firehose_Sdm845_lge.elf' is compatible for LG devices whose CPU is Snapdragon (SDM) 845? And thus the firehose file would be safe to use with 'LG G7'?

Edit: It seems so, since I succeeded in extracting the partition files: abl_a (1 MB), boot_a & boot_b (64 MB each), and laf_a & laf_b (48 MB each).
[LG V40 Guides, News, & Discussion] teeboz:
issues

do you have the latest drivers i would also try reinstalling the software or try on a different computer. also make sure boot loader unlock enable is set to on and you are in developer settings.
[LG V40 Guides, News, & Discussion] Droidman61:
Have done all that though not quite sure if i have the newest drivers. I used the ones on with the files.
[LG V40 Guides, News, & Discussion] paxar331:
Got an error message saying, original abl_a.bin file is too large to download, it's only 1.0 MB

i.imgur.com/oxh5vxk.png

NVM, it was because of the space characters; I had to enclose the directory in quotation marks. Keep in mind MS Word uses 'smart quotes' instead of 'straight quotes'; “ vs ".

When I get back into the phone to re-enable developer mode, I noticed 'Enable OEM Unlock' is always on by default due to 'bootloader is already unlocked'.

i.imgur.com/YsFJ1eM.png
[LG V40 Guides, News, & Discussion] Droidman61:
Also my bootloader says it is unlocked and is greyed out:confused:
[LG V40 Guides, News, & Discussion] paxar331:
You can get into fastboot mode to determine whether your phone uses abl_a or abl_b, AFTER flashing with v35eng.img, as seen in 3rd second of the following video:

/watch?v=kN7oNBslgck
[LG V40 Guides, News, & Discussion] yin0203:
even the korean version V409N?
[LG V40 Guides, News, & Discussion] kodein:
Hello, What is the difference between classical unlocking (if possible) and unlocking according to this guide?

Are there any differences?

thanks for the reply
[LG V40 Guides, News, & Discussion] NGOwner:
The same thing happened to me. I followed the directions hoping to bootloader unlock my Sprint V405UA. Process:

1) Updated phone to Pie via OTA.

2) Crossflashed 20e to phone.

3) Downloaded all unlock bootloader files.

4) Booted up into 9008 mode.

5) Uploaded the V35 Engineering bootloader.

All went well. No real issues.

Rebooted ... and red triangle with "Your device has failed a routine safety check and will not boot" and reads at the bottom all slots are unbootable.

I can reboot into stock recovery. I can get into fastboot. Everthing seems to be going right.

I can also boot into 9008 access. I tried flashing the ab1piestock that way, but the problem persists. Phone won't go past red triangle.

Any advice?

[NG]Owner
[LG V40 Guides, News, & Discussion] NGOwner:
So I spent the better part of three hours trying to get the bootloader unlocked on my Sprint V405UA. Nothing I did worked. Finally threw in the towel and used download mode and the kdz file to go back to crossflashed stock Pie.

I'd like to try again, but I don't see it working. I tried damn near everything. Answers to these questions may help though:

1) Why is the ablpiestock.img in the OP only 216 KB? Why isn't the ablpiestock.img as large as the V35 image? v35eng.img clocks in at 1 MB. I can't help but think this is a problem. Is that file really the right one?

2) I read the data from abl_b via QFIL, then tried to write it to abl_a via Fastboot. The file QFIL saved was a bin (and the file size was the exact same as v35eng.img). Well that didn't work either. I don't know why. Can we even flash .bin files in fastboot? Do I have to convert a bin to an img file? How do I do that?

3) Is there a way to extract just the abl_a image from a kdz and flash it via fastboot? That would seem to be the easiest way. But how do you unpack a kdz file?

In any case, I can't get it to work tonight. Maybe there'll be answers tomorrow!

[NG]Owner
[LG V40 Guides, News, & Discussion] NGOwner:
I figured I'd **** around with it again while waiting for guidance on how to make unlocking the bootloader on my Sprint V405UA work. And I got it to work! Amazing!

Here are some additional pieces of advice on how I got to be successful:

1) I had all of the files I needed to upload/flash in a folder right off of C: drive. No long convoluted paths. Just straight C:/v40root.

2) Load up QFIL first. Have that program up and in the foreground as you try to get into 9008 mode.

3) [MENTION=5112775]argon9898[/MENTION] His advice on how to get into 9008 mode was invaluable: The key to activating EDL mode is to hold all three buttons down: POWER + VOL UP + VOL DOWN while the phone is still on. After 8-10 seconds the screen will turn off. When the screen turns off keep holding POWER + VOL DOWN while REPEATEDLY PRESS VOL UP. That should get you into EDL mode.

4) As you successfully enter into 9008 mode, the top line of the QFIL program will switch from No Port Available to Qualcomm HS-USB QDLoader 9008 (COMX). That is your definitive clue that the phone is ready for the v35 Engineering bootloader.

5) Load the v35 Engineering bootloader as described. DO NOT EXIT out of any of the QFIL screens. Leave them up as is.

6) Perform the exit out of the 9008 mode into v35 Engineering bootloader mode as described. The bootloader will look strange. Different color text by lines, and the volume button will cycle through Restart, Power Off, then some Fastboot gibberish. If that's what you see, you've loaded the v35 Engineering bootloader successfully.

7) Perform the fastboot commands as described.

8) Once done with the fastboot commands as described, unplug the USB-C cable from the phone.

9) Use the volume keys on the phone select Restart (or something along those lines, I can't remember now).

10) The phone will flash a warning about bootloader unlocked, then begin its normal boot process. That boot process will take a bit longer than usual because userdata was wiped unlocking the bootloader.

Good luck!

[NG]Owner
[LG V40 Guides, News, & Discussion] barth2:
Do you still get OTA update after this root?
[LG V40 Guides, News, & Discussion] barth2:
Hi. I'm trying to understand the guide. It says "If you don't have the "Enable OEM Unlock" option in developer options, you'll have to flash frp with the v35 engineering bootloader." I do have Enable OEM unlock option and I have it enabled. Does it mean I can skip to the "Unlocking your bootloader" section? thanks

I have LM-V405UA sprint android 9 feb 2020 security patch sim unlocked
[LG V40 Guides, News, & Discussion] whitedavidp:
How Does/Will This Work on 405QA?

I have a brand new model 405QA with Pie (V405QA20a) installed at the factory. It has an OEM unlock switch in developer settings. I used fastboot to get the device's long ID code and tried to get an bootloader unlock code from the LG Developer's site. But it said that my model could not be unlocked!

I have to be able to root this device or back it goes. So I am trolling for a solution and found this thread. If this will work, which steps must I follow? Thanks for any help.
[LG V40 Guides, News, & Discussion] whitedavidp:
fastboot oem unlock fails (unknown command)

Hello. I appreciate any help you can give...

I have gone through this process on my new 405QA device. All seems fine. The QFIL console window shows that the v35 bootloader has been sent successfully. So I reboot into fastboot mode and try to issue fastboot oem unlock. All I get is "FAILED (remote: unknown command).

Any idea what this means and how to proceed to get this job done?

Thanks!

<<added>>

To be clear, I sent the v35 file to the abl_a that is within LUN #4 as shown in the screenshots. I say this because I noticed there was also an abl_a in LUN #1. No idea why that is or what the difference is. So I just did as I was told. This also makes me wonder about using the fastboot flash abl_a path/to/ablpiestock.img since it is not clear to me how fastboot will know the difference between the partition with the abl_a label in the 2 LUN. Thanks
[LG V40 Guides, News, & Discussion] whitedavidp:
Hi. I am hoping that my problem is same as yours - using only slot A as shown. How can I tell which slot the phone is actually using? Thanks
[LG V40 Guides, News, & Discussion] whitedavidp:
Ok, progress finally. Seems the active slot in my device was B, not A. After backing up all the B partitions, I was able to install the V35 bootloader, unlock, and flash the original Pie bootloader. When I reboot into normal mode, I now see an unlocked warning and it took a very long time for the phone to get started and prompt me to start all over with my Android install. Before I do that I am trying to restore the backup I made of the userdata partition to see if that spares me the whole setup thing. Thanks to all.
[LG V40 Guides, News, & Discussion] whitedavidp:
Hi. Has anyone else noticed that once they have done this bootloader unlocking and installed the TWRP on their V40 that they cannot boot into TWRP recovery mode using the power and volume down buttons? I still can:

1. Boot into what seems like factory recovery mode which permits only factory reset or not using power and volume down buttons.

2. Press/hold the down volume key and plug in a usb to get to fastboot.

3. Press/hold both volume keys along with the power button to display the IMEI and serial number.

4. Get into Engineering mode as described in this thread and out of Engineering mode by press/hold power and volume down keys.

But I cannot seem to get into TWRP recovery any longer using just the hardware buttons. I can use a root app for this purpose or issue the root command "/system/bin/reboot recovery", or "adb shell reboot recovery".

This seems a bad thing to loose. Am I alone on this? If so, what am I doing wrong? Thanks
[LG V40 Guides, News, & Discussion] vFluffyMan:
Bricked?

Hello everyone I wanted to ask a noobish question. Where would I be able to find the files needed to unbrick with QFil? Thanks in advanced.
[LG V40 Guides, News, & Discussion] whitedavidp:
before i did this, i went thru the painful process of backing up every partition (you can pass on userdata if you want) using qfil. use the read function found next to the load function used on the bootloader. be careful to rename each file after it is written to keep them straight. i used lun#_label.bin and that worked great. this is likely overkill but... you can avoid either the _a or _b partitions depending on which is NOT the current slot. i didnt know at first. if you dont check in fastboot getvar all.
[LG V40 Guides, News, & Discussion] KouaV1:
Read the directions carefully and follow it, If you read everything youll know the op says skip if you this and that. By your comment sounds like you just scrolled through without reading it properly and if you brick or mess up, thats on you
[LG V40 Guides, News, & Discussion] whitedavidp:
How to best undo this - relock the boot loader?

I am rapidly getting frustrated with all this foolishness. I keep hitting one wall after another. First it was the bootloader being locked and requiring this thread (thanks). With the help here and elsewhere I managed to unlock the bootloader and installed TWRP, Magisk, etc. But now it seems that I am stuck with internal memory being encrypted (although I never asked for that) which prevents TWRP from accessing /data for backups or anything else. I have tried the suggested approach but get nowhere. Even without all of this I have troubles with apps not running properly any more, etc. So I am seriously considering returning this fine hardware (with such painful restrictions in doing what I want). So how does one undo/relock the bootloader so the phone looks as it did when I first got it? Thanks
[LG V40 Guides, News, & Discussion] shassouneh:
Sorry for the ignorant question (I did search this thread). Will this work on an LG v40 "Thinq" (specifically AT&T model)? The thread didn't say "Thinq" and the V40 and V40 Thinq are technically 2 different devices. THank you!
[LG V40 Guides, News, & Discussion] jerryspring:
What about Verizon variant?
[LG V40 Guides, News, & Discussion] DatPratt:
All you have to do is wipe /data

The original internal storage partition is what is encrypted, and if you read the other forum carefully you would see his lineageOS build is not compatible with encrypted storage, both the original and if you wanted to reencrypt it yourself. LOS cannot read anything in your internal storage, nor would you want that, because there could be issues with app compatibility, etc.

If there's anything there you need, back up the Data partition first with TWRP. Otherwise just go back into TWRP, select Wipe, swipe to execute, reboot

---------- Post added at 07:35 PM ---------- Previous post was at 07:31 PM ----------

The only variant that does not work is the T-Mobile variant, the model number for that one ends in "TA"

You need to find your model number, if you are running android right now you can find it in Settings under About phone.
[LG V40 Guides, News, & Discussion] whitedavidp:
Hi and thanks!

My main problem at this point is that I cannot get TWRP to see anything inside /data to be backed-up. I have tried the process described here <https://xdaforums.com/lg-v40/how-to/guide-twrp-data-access-stock-t3970149> over and over again but as soon as I have booted into Android even once (and even without performing the Android setup process) I can return to TWRP and see that /data is completely empty save a /cache folder.

Also just wiping /data does not undo the unlocking of the bootloader. I was wondering about how that might be done (if at all)?

Cheers
[LG V40 Guides, News, & Discussion] DatPratt:
Sorry, I don't know how to re-lock the bootloader, it may be as simple as "fastboot oem lock" using the v35eng.img but I have no idea. You would have to do all steps in reverse, or, if you backed up the right partitions with QFIL, restoring them in 9008 mode.

However, my original point is once you wipe /data, everything should be fine. Once you do the first boot after wiping and setup/install things, its impossible for /data to be "empty". If you are browsing /data with a file manager or terminal, I think what's going on is everything there is simply hidden because you are not running or browsing as root. None of this matters for TWRP though.

However, if you are trying to run the stock image, I think it will re-encrypt the partition every time. As long as /data is encrypted, TWRP will see it as "empty" because it cannot read the contents. If you want to be able to make backups of /data with TWRP, you cannot use the stock image. The encryption of /data is the equivalent of "locked" in terms of the bootloader. It can only be read by the stock android environment, and all backups would have to be "online" (while running the stock build live), compared to a third-party mini-OS like TWRP which can be considered an "offline" backup.

If you flash LOS, wipe /data, setup and install things, go back into TWRP and run a backup for Data, and then unpack the resulting archive, you should see everything there. I guess the point is, if you're not running as root, you cannot "see" what TWRP sees before a backup, only after. The only indication that something is wrong is if the backup fails with an error.
[LG V40 Guides, News, & Discussion] roy331:
did lg change something in an update i recently bought an unlocked lg 40 from lg (lm-v405qa) and i can not boot into edl mode but I can boot into download mode not sure if its the same thing? I also can not get the Qualcomm 9008 driver to load instead had to download an lg lm405 driver to be recognized? i would like to unlock my device so I can root and maybe install lineage on it.

the errror i get is download fail: switch to edl failFailed to switch to emergency download mode

i'm on software build pkq1.190202.001

update:

Figured it out. I never got into EDL mode and ounce your in it with QFIL load you need to immediately go to the tool partition manager.

I'd like to thank argon9898 with how to enter edl mode:

The key to activate EDL mode is to hold both POWER + VOL UP + VOL DOWN while the phone is still on. In about 8-10 seconds the screen will turn off, keep holding POWER + VOL DOWN while REPEATEDLY PRESS VOL UP. That should get you into EDL mode.

Try a few times and you'll succeed.

I tried the original method for hours over a few weeks
[LG V40 Guides, News, & Discussion] whitedavidp:
It is interesting. I have the same device (bought off EBay) and I hold power+volume down (no power up yet). when the screen blanks, I repeatedly press volume up. and you are right, it sometimes takes several tries. BTW this is in the 20e firmware. the phone came with 20a but that auto-updated immediately when I first turned the phone on. glad you are going again.
[LG V40 Guides, News, & Discussion] Redacted Kaos:
Damn I'm stating to think this phone may not be worth rooting? Is it honestly? I usually always have root but this phone has been a pain in the ass
[LG V40 Guides, News, & Discussion] whitedavidp:
I simply will not own a device I cannot root. Simple as that. Too many things I cannot do without root. That's my $0.02.

Now regards how hard it is to accomplish, it does seem to be do-able on all but T-Mobile variants. I have a 405QA and finally managed it. Compared to my old Samsung phone, this has been very, very hard. But thanks to the help I have gotten on this thread and others in this forum, I managed to do it and seem to have a stable system with TWRP and root.
[LG V40 Guides, News, & Discussion] Tarique435:
Did you solve this issue? Am facing the same problem
[LG V40 Guides, News, & Discussion] Droidman61:
Yes I finally gave up and reformatted my old laptop with new Window 10, and that did the trick. So my guess is that it was a driver issue. That might be a little extreme but i had no other choice. Hope that helps you.:good:
[LG V40 Guides, News, & Discussion] whitedavidp:
You definitely must have the proper driver dor using QFIL. In the 3rd post read:

"Crap, I completely forgot an important detail. If you are using 9008 mode for the first time, you'll need to update the driver in Device Manager. Then select the port. My fault, I'll update that now.

It should say: Qualcomm HS-USB QDLoader 9008 "

When I first looked in device manager, it said something else. I right clicked and chose update driver. It did the right thing and it ended up saying Qualcomm 9008. Without this, I doubt that QFIL can talk to the phone at all.
[LG V40 Guides, News, & Discussion] Droidman61:
Yes you have to have that, mine also had that and it still didn't work. Hopefully yours will.:)
[LG V40 Guides, News, & Discussion] TheHellian:
Hi Everyone! I was able follow the guide and unlock my bootloader but have now gotten in a bit of a pickle. My LG v40 will now only boot into fastboot mode after I flashed the v35 engineering bootloader. I am using an LG v40 from Sprint. I'm not really sure what next steps are. I honestly need some help. If anyone is willing/able, it will be much appreciated
[LG V40 Guides, News, & Discussion] whitedavidp:
So can you get into download mode? Or back into Engineering Mode?

After flashing the V35 and performing the unlock, did you re-flash the Pie stock bootloader? I am assuming you are on stock Pie firmware, not Oreo. The v35 bootloader will not work with Pie. If not, from fastboot try:

fastboot flash abl_a path/to/ablpiestock.img
[LG V40 Guides, News, & Discussion] TheHellian:
I tried Flashing back to the Other one but for some reason the moment I try and flash back while on the fastboot screen the phone restarts, or more of goes to the battery screen with just the lightening bolt in the center, with just a faint gray line around it. It also sometimes goes to the LG V40 thinQ screen and just kinda sits there. I Am also unable to open Download Mode as it seems. When entering Download mode I get a flash of download mode and then the Red triangle pops up saying the failed safety check message. Update, I am able to get back into engineering mode. Will try to change abl_a from there.

PS C:\Windows\system32> fastboot flash abl_a C:\Users\thehellian\Downloads\ablpiestock.img

sending 'abl_a' (216 KB)...
[LG V40 Guides, News, & Discussion] whitedavidp:
I had something similar on my 405qa.

When doing this process, did you nuke any laf partitions?

So when you say fastboot mode, what are you seeing? Is it the v35 loader?

Do you know what slot was currently selected on your phone before doing any of this? My phone had gotten a single update right after I got it and before I started this process. It turned out that the update process left me with a current slot = b, not a. So when I first flashed the v35 to a, I kept getting nowhere.

With the device in fastboot mode you can see and switch the current slot using the fastboot command. To see, "fastboot getvar all" and look near the bottom of the output for current slot information. To change, first do "fastboot help" and at the bottom you should see the "--set-active=" fastboot command.
[LG V40 Guides, News, & Discussion] TheHellian:
So, First, I didn't nuke my laf partitions, and I was on slot a. I was able to flash back to ablpiestock.img and now get a different fastboot screen slightly https://imgur.com/gallery/REkBvJK, also it only hast start and shout down, and doesn't seem to want to take any fastboot commands now. All commands just say waiting for devices now. On new img i can get to download mode now
[LG V40 Guides, News, & Discussion] whitedavidp:
! Download mode is good. I would try to flash a correct .kdz file using LGUP.
[LG V40 Guides, News, & Discussion] TheHellian:
Sorry for such a late response. I was having a hellava time setting LG UP Up, but I got it up. Downloading the UA20a Firmware currently

Will update on success or failure
[LG V40 Guides, News, & Discussion] whitedavidp:
No worries. None of this was what I'd call EASY. I got a ton of help from folks here in multiple threads. So happy to try and help others. I am certainly no expert. But after much effort, I did finally get my device going well with root, TWRP, data encryption defeated, etc. Now that things have settled down and have struggled to overcome things I don't like in the software, I am liking the device. So it was worth the effort.
[LG V40 Guides, News, & Discussion] TheHellian:
So, Update. After finally downloading it I got an error

Error: 0x81000302, please use Latest DLL. LAF protocal version is not match DLL = 73311896

Device = 111538208

A Little stumped
[LG V40 Guides, News, & Discussion] whitedavidp:
From my personal how-to:

Based upon information and dual-mode LGUP download from here

<https://xdaforums.com/showpost.php?p=76995781&postcount=26> and

comments from elsewhere:

1. Run the installer provided: LGUP_Store_Frame_Ver_1_14_3.msi and let it do

its thing.

2 Make sure you are using LGUP in user mode. The SetUser.bat script failed for

me due to permission issues. Even drag/drop file copies did not work. I have

to use copy and paste from the context menus. Essentially, you want to do

this:

copy "%RUNPATH%LGUP_CommonU.dll" "%ProgramFiles(x86)%\LG Electronics\LGUP\model\common\LGUP_Common.dll"

which places the LGUP_CommonU.dll into the proper location with the name

LGUP_Common.dll. Then you want to do this:

copy "%RUNPATH%LGUPU.exe" "%ProgramFiles(x86)%\LG Electronics\LGUP\LGUP.exe"

which places the LGUPU.exe into the proper location with the name LGUP.exe

3. Connect a normally running V40 via USB and start LGUP from the programs

list in Windows. It will show some initializing steps and likely an error

"Can't open new file" which you just ignore. You should see the device in the

upper section on a COM port showing standby.

4. Make sure that the Refurbish process is selected/used and under file path

make sure your .kdz file is selected and showing. I used the file

V405QA720e_01_NAO_US_OP_1230.kdz that I downloaded from here

<https://xdaforums.com/lg-v40/development/v40-firmware-links-ainzooalgown-t3940600>.

5. Press the start button and watch things go. The device will be rebooted

into download mode and you can watch the status as different partitions are

flashed. Around 80% done, this will all slow down. Just be patient and it will

reach 100% and say click here to complete on the device's line. The device

will reboot normally.