yashsingh1/xdaforums huggingface dataset:
[LG V40 Guides, News, & Discussion] AsItLies:
cool, I'll get to this shortly. Yes it sounds like you did it the right way. cheers
[LG V40 Guides, News, & Discussion] Gorbieee:
I think I'll need to get you my files to inject twrp as well, this phone is currently on android 9.
[LG V40 Guides, News, & Discussion] AsItLies:
Here it is with twrp injected.

keep in mind, flash this with qfil, then exit qfil and go directly to recovery (keep vol dn and pwr pressed until u see LG logo screen, release pwr only, then repress pwr - follow 'reset' and that takes u to twrp).

once in twrp, format data, then reboot recovery, then flash magisk and dm_verity. Should be all set after that.

cheers
[LG V40 Guides, News, & Discussion] AsItLies:
you may need it, but maybe not, depends on which firmware you're on. Android 9 is the OS version, firmware is like at&t, verizon, etc etc.

cheers
[LG V40 Guides, News, & Discussion] Gorbieee:
Ah I see I apologize for the dumb question then. Are all of the firmwares consistent for their individual carriers?

i.e. are all verizon one firmware, all sprint a different one, all at&t a third?

This is a Sprint LGV40 Thinq but its currently still in 9008 mode and I'm nervous I wont be able to get back into it if I leave it to check the firmware XD.

This is all assuming I'm able to get past this sahara error, nothing I've tried has worked so far. Power cycled pc, tried hitting partition manager quickly after plugging the phone in, different cables, different usb ports (2.0, 3.0, 3.1, Type-C).

To be fair the error has at least been consistent, always unable to read the packet header. But its not very verbose so I cant find much information about resolving it in this forum or other places online.
[LG V40 Guides, News, & Discussion] AsItLies:
no the firmwares aren't consistent in that sense. At&t I think went up to 30e? I know Korean Open went to 30f, Sprint I don't think has a 30x version... They are consistent in that 10x is Oreo, 20x is Pie, and 30x is android 10.

But they can't be mixed and matched, or at least it's not likely they could be. Best to stay with the same partitions for the same firmware and OS version.

You'll be able to get back into qfil, it's just kind of a bugger to do, at first, you get used to it. The sahara error is common. I know on tele group they suggest many options (some you've tried), diff usb ports, diff cable, diff driver, and even a diff pc. Also a diff qud driver as some of them are unsigned, which can cause a problem and not be obvious it's the issue.

Try this driver as it's signed and you would at least know it's not the driver...

good luck.
[LG V40 Guides, News, & Discussion] Gorbieee:
Appreciate the link!

Quick question, I'm assuming it would it be possible for the phone to show up in QFIL and my device manager with the unsigned driver? I know I have read people say that it being unsigned causes an issue when isntalling the driver itself, but it seems to have installed correctly. Does an unsigned driver also contribute to some sahara errors?
[LG V40 Guides, News, & Discussion] AsItLies:
Yes, it absolutely does contribute to it. And it can be installed and if you don't catch the little flashing indication that it's not signed, you won't even know it.

I'd highly recommend just use the signed one and don't worry about it.
[LG V40 Guides, News, & Discussion] athoti:
Thank you so much for doing this!

For some reason it didn't quite work all the way. I got to twrp which was nice to see but then I couldn't format data and couldn't flash either magisk or lineageos properly which I tried. Lineageos was stuck in bootloop. I thought, well maybe I should erase laf_a and laf_b again. That didn't do it. I thought to reflash what you gave me and maybe erase it first. But in the process I deleted the boot partition.

So I'm stuck with a phone that only goes in EDL mode, at least it's that but then no partitions to speak of :( In QFIL partition manager is empty. Man I hate it when phone manufactures make it so hard to do this! My V30 was so easy to mess with, nothing like this V40... Any help appreciated. I'm trying to read other places to see how to get back to things. Maybe I should have asked for help before I went too far ahead on my own.
[LG V40 Guides, News, & Discussion] AsItLies:
Hmmm, that doesn't sound too good. So you go into part manager and there are no partitions at all? If that's the case, you'll need the tele group 'v40-unbrick'.

But first, what made you think to erase the laf partitions again? The laf partition is for one thing, lg download mode (aka lg up). In the guide it talks about erasing the laf partition which then gives u a watered down version of fastboot. But then you don't have lg up. It also has zero effect on the device booting or not booting.

So you learned something there. Now, **if** you don't have anything in partition manager, then follow the steps below from tele group:

v40unbrick:

Download (https://drive.google.com/drive/folders/1WQaaM35SWiF_UbXAM8hiRB95D2CDkIEq) the backup. Unzip it to find 7 luns (0-6).

1. Open QFIL

2. Select Flat Build

3. Click load xml and select the rawprogram(#) XML that is in the lun(0-6) folder.

4. If it asks you for a patch xml, click cancel. It's not needed to flash this backup.

5. Click download

6. Repeat steps for each lun folder

This backup I believe is ATT. I'm not aware of a Sprint one. But at least your phone would be in working order and you could then cross flash a diff rom if desired.

Also, if you want to install lineage, I'd suggest following the post in 'rom development' for lineage and also post in it if u have troubles. I've only installed lineage 1 or 2 times and can't be much help there.

cheers
[LG V40 Guides, News, & Discussion] Gorbieee:
Uninstalled unsigned driver, installed the one you gave me. No dice, still getting the same sahara error. Gonna try a combination of restarts. Let me know if you think of anything I can try or have a thread to point me at. :) Appreciate the help so far, looking forward to getting past this.
[LG V40 Guides, News, & Discussion] AsItLies:
Well this is the canned response (in the tele group) to anyone that mentions a 'sahara' error:

When you get a sahara error on Qfil, change your USB port/cable.

Restart both phone and pc before trying again.

Check drivers on PC

Try reducing the COM port speed by going to device manager

Try another PC

Disable driver signature verification on Windows 10

If you run out of ideas, use a Linux installation; will save you a lot of trouble

I've gotten qfil to work on a win 8.1 laptop and a win 10 desktop, but fortunately they both have usb 2.0 ports. When I accidentally used a usb 3.0 port the data was corrupted. Qfil doesn't work under linux but there is something similar that is python based created by bkerler (edl client). That's great for doing a full backup but not so easy to flash a single partition like qfil is.

good luck
[LG V40 Guides, News, & Discussion] Gorbieee:
Thank you for all the suggestions, I'll start knocking them out one by one. Could I use a linux installation in a VM?
[LG V40 Guides, News, & Discussion] AsItLies:
Yes I think some have done that, have not myself though.
[LG V40 Guides, News, & Discussion] athoti:
Thank you, I got the files but I keep getting errors at step 5, downloading. Would the log help give you any idea what it could be?

The phone only boots to EDL, that I can tell, the screen is always black. It only shows as 9008 port in device manager and QFIL. In QFIL, Tools -> Partition Manager shows everything empty. Only POWER + VOLUME DOWN pressed together seem to respond to anything.

Xsavi at the beginning mentioned something about unbricking. Is there something else I can try?
[LG V40 Guides, News, & Discussion] AsItLies:
The log indicates sahara errors. If that's the problem, try following the resolutions mentioned a few posts before this, to fix sahara errors.

I haven't had to unbrick my device but know that others have used that guide and it's worked. So I'd guess the issues you're facing are due to your setup and sahara issues, not issues with the 'unbrick' guide.

cheers
[LG V40 Guides, News, & Discussion] rakety:
@AsItLies i've just found that some files in \Qualcomm\QPST\bin are "read only" which may cause sahara sever errors!
[LG V40 Guides, News, & Discussion] poog:
This is for bootloader unlock only correct? And not sim unlock? Thank you.
[LG V40 Guides, News, & Discussion] AsItLies:
Yes, bootloader, not sim. Sim unlock, in the past, could be done with crossflashing, not anymore. Now, the only way to get the sim unlocked is through the carrier.

cheers
[LG V40 Guides, News, & Discussion] athoti:
Well, after many tries I managed to get passed the sahara error, I guess somehow the phone must not have been in EDL mode properly although it showed port 9008 etc. I "downloaded" xml from lun0, took a little to install that but then I couldn't proceed with lun1. It again gave a sahara error. I supposed it needed to restart itself or something. After a few more tries I managed to download xml from lun1 and lun2. But then it went blank and Sadly now it seems totally unresponsive :( No key combination seem to do anything and windows makes no sound when plugging in. The battery can't be dead because it's been plugged in a long time.

Is there something else I can try or would it be properly bricked now...? I unlocked bootloader, installed custom roms or rooted all my smartphones and this is the first one I brick... I should have been more careful with that deleting boot partition.

Thank you much for helping out!
[LG V40 Guides, News, & Discussion] AsItLies:
Sounds not good. But, numerous people I've read indicated when doing this not all lun's flash, but after doing all they could, it finally booted.

so one thing, the phone can be put in edl mode from any screen. Even if it's blank. When u plug it in, does it show the battery charge indicator? I've waited for that to almost completely finish (showing the circle and %), then press and hold all 3 buttons and when screen blanks start spamming vol up.

essentially, you can't brick a v40. Some I've read have opened the device and shorted the pins in the back, to get to edl. Personally, my device has always responded per method above.

Yeah the unfortunate thing with the backup is that after ea lun is flashed it reboots, so have to go back to edl for ea lun.

I have the xml setup to flash everything at once for at&t Q, but have only used it with the bkerler edl python utilities. It works, if u want to try it. But like all these backups, it does not contain (nor should they) the ftm, fsg, modem, modemst1, modemst2 partitions. Those contain your imei and s/n info and should not be flashed to a different phone.

good luck
[LG V40 Guides, News, & Discussion] Henry_Tham:
where can i download the engineering bootloader for v35?
[LG V40 Guides, News, & Discussion] AsItLies:
It's on the first page of this thread... v35eng.img... did u miss it?
[LG V40 Guides, News, & Discussion] Henry_Tham:
ouh yeah, i just realized it, sorry 🙏😅
[LG V40 Guides, News, & Discussion] elricwinkler:
Hello everyone, noob question but I just can't get this to work.

I've succesfully got into the v35 Bootloader, the thing is I just can't get the fastboot commands to work. Whenever I open ADB on my PC with the phone connected I can't get the phone to appear with the "adb devices" command so I can't unlock the bootloader (it still appears as locked)

I'm also getting the red triangle warning whenever I try to start the phone, so I'm stuck. Also my phone's active slot is B for some reason. Any help would be appreciated

Update: Forgot to mention my phone was running Pie.

I tried using QFIL again and flashing the pie stock img from OP but got the "All sectors unbootable error", I have now flashed once again the v35 bootloader and that's as far as I got. I still can't unlock the bootloader because my PC won't recognize my phone via USB so I'm kind of stuck there

Update 2: I tried using the phone on another PC and I still can't get it recognized via ABD, so I can't run the fastbook unlock command which means I'm Stuck :(

I have tried several drivers but none work so I don't know what I did wrong
[LG V40 Guides, News, & Discussion] AsItLies:
So first, when using fastboot, the command is 'fastboot devices' (not adb).

All commands, when using v35 bootloader, are fastboot, none of the adb commands will be recognized.

When you plug the phone in, and you've gotten to the fastboot screen (after qfil flash and boot to fastboot), if the device isn't recognize that means the driver for fastboot isn't loaded. So look in device manager and find the exclamation mark symbol next to an entry called 'android', then, load the driver you did for adb, and fastboot should then work properly (again, assuming the device isn't recognize in fastboot mode).

When you have a red triangle, that means the partitions are mismatched, and the device is incapable of booting. So somewhere along the line, of what you did, you've flashed some partition with maybe a corrupt file? Or maybe qfil didn't flash it properly?

Anyway, that should help to think about what to look at, and things to try. Let us know how it goes.

cheers
[LG V40 Guides, News, & Discussion] elricwinkler:
Oh thanks! I thought it was done via ADB and then fastboot, it's been a while since I rooted anything so I forgot that.

What I did was follow the tutorial and flash the v35 bootloader into abl_a and abl_b, it boots into fastboot but I've totally screwed up something in the process.

I actually have the driver problem but I didn't know which was the correct one. I'll test it now and post results in a few minutes

Update 1: fastboot commands actually work, I'll proceed to unlock and then check how to boot it lol

Update 2: *Solved*

Update 3: I've succesfully unlocked the bootloader, I just need to find a way to boot it back+

Update 4: I've flashed the ablpiestock image file back to both abl_a and abl_b but it's still booting directly into fastboot. Also I'm not getting the red triangle anymore
[LG V40 Guides, News, & Discussion] AsItLies:
ah good some progress for sure. I've heard of a few who've had the fastboot issue, as you indicate. Not sure exactly what to fix it.

And this is where it gets a little confusing. Dual slot phones essentially use the 'non active' slot for OTA updates. In your case, if you've had an update, then one slot is the older OS and the current slot is the newer OS. So part of your issue may be that you've flashed v35 to both (abl) slots but then replaced them with mismatched versions?

If you've used lgup on your device and crossflashed to a diff rom, then it will have the same version on both slots. See, that's why it can be difficult to write a guide for, and sometimes people don't even know whats on their slots or even which is active.

so use fastboot - as u can only get to that - and type 'fastboot getvar all'. Towards the bottom of that output, it will tell you which slot is active. Then use fastboot to switch slots and see if the other side doesn't boot normally (type fastboot --help to get all the available commands - look for how to switch slots if u don't already know).

cheers
[LG V40 Guides, News, & Discussion] elricwinkler:
I bought the phone used but I believe it came originally with Oreo and then got the upgrade to pie, I haven't used LGUP yet, I literally just followed the tutorial and got as far as here.

The product name on the fasboot screen now reads LM-V405UA, previously it had the V35 name so I'm theoretically back in the correct version for my V40 but I just don't know what the next step would be to have it boot

I've ran getvar all and this is what I got, my current slot is B. Should I try changing it back to A?

(bootloader) current-slot:b

(bootloader) has-slot:boot:yes

(bootloader) slot-retry-count:b:7

(bootloader) slot-unbootable:b:yes

(bootloader) slot-successful:b:yes

(bootloader) slot-retry-count:a:6

(bootloader) slot-unbootable:a:yes

(bootloader) slot-successful:a:yes

(bootloader) ufs-bootlun:2(b)

(bootloader) slot-count:2

(bootloader) secure:yes

(bootloader) serialno:LMV405UA766a3bdd

(bootloader) product:sdm845

(bootloader) max-download-size:536870912

(bootloader) kernel:uefi

Update: I used the fastboot "set_active a" command to switch to slot A and now I'm stuck in the LG logo - I don't know if it's better or worse lol

Update: I can pretty much run re-do the whole process and swtich slots no problem but I can't get past this point. If I flash ablpiestock and try to boot from there I'm stuck in the LG logo :(
[LG V40 Guides, News, & Discussion] AsItLies:
Okay, think I know one thing that is probably an issue. When the guide says to flash ablpiestock.img, it really means YOUR pie stock image. That would be the original one that was on YOUR phone. abl Pie stock images are not universal, you can't use an at&t one on sprint etc etc etc. And in many cases, you need the same version of Pie images in addition.

So, if you aren't flashing your saved abl pie images back, and are instead using the ones from the beginning of this guide, they are probably what's mismatched and causing the problem.

who is your carrier and do u plan on keeping them? That's important to help determine which rom you might want to flash, and get by these issues.
[LG V40 Guides, News, & Discussion] elricwinkler:
Figured as such, the phone's original carrier was Sprint - Is there any way to get the original files?

I really don't mind keeping it stock or not, I could use a different ROM as long as it's lightweight and functional
[LG V40 Guides, News, & Discussion] AsItLies:
Ahhh, that's a bit unfortunate. Sprint and at&t are the only ones I know of that don't make their kdz avaialable. There are backups individuals have made of at&t, but I don't know of any for sprint.

the thing about using a diff rom, and that's why I asked about carrier, is that, again, sprint and at&t are very strict about what phones can be put on their networks. They limit things like volte and vowifi to only their devices (imei and rom must be theirs).

so if u have a sprint phone, are u on a sprint network? If yes, I'd call them and ask about a byo device, and how it would be limited (in what ways). Unless u are on some kind of family plan, I'd highly recommend going with an mvno like mint mobile (t-mobile reseller). The v40 can be made to work on it with volte, vowifi, and the latest version of A10 using korean open rom.

cheers
[LG V40 Guides, News, & Discussion] elricwinkler:
No, I'm from Mexico and the phone has been unlocked to work with other carriers (It's a demo phone from the US) - Mexican networks don't have that problem (It runs on AT&T and Telcel which is the biggest mexican carrier) so that's really not an issue for me, that's why I want to dump the Sprint ROM and use something else
[LG V40 Guides, News, & Discussion] AsItLies:
Ah okay that's good. So the only thing u need to know really is what bands are needed for the area? Roms have limited band support and you'll want yours to have as many as possible for what your carrier uses.

And you can't just 'add' bands, or 'enable' them, so find which ones are needed and there will hopefully be an 'open' version rom (no carrier bloatware) that will have the bands.
[LG V40 Guides, News, & Discussion] elricwinkler:
I ended up installing Lineage OS 17.1 - I think I finally got it right but the first boot is taking a loooooooooong time, I don't know if it's a boot loop or part of the process but I'll leave it there for a while

Update: I couldnt' get it to boot the first time, had a NO OS installed error on TWRP and then it defaulted back to bootloader. I did everything again and I'm still waiting for Lineage to boot, it's been around 33 minutes :(

Update 2: After 45 mins didn't work, I've reflashed and I'm trying to get it working again, still stuck on boot animation after about 10-15 minutes

Update 3: I've tried again with a newer version and it still gets stuck in the boot animation, might as well try other ROMS

Update 4: Tried Havoc OS and it still gets stock during boot animation

Update 5: Managed to flash some Korean ROM via KDZ, it's Oreo but at least it works

Final update: Managed to flash a US open rom via KDZ using command line, it works fine and it doesn't have any carrier bloatware which is what I wanted. thanks everyone for the help!
[LG V40 Guides, News, & Discussion] sdotkdot:
Developer options. It's not even greyed out. It's just not there. I'm guessing because it's a Verizon model? LM-405UA. Software version V405UA20d. Build# PKQ1.190202.001. I bought it off of Swappa last month
[LG V40 Guides, News, & Discussion] Headshifter:
---------- Post added at 05:24 PM ---------- Previous post was at 05:18 PM ----------

No, it didn't. Im still stuck on bootloader being locked and can't execute this step - "Fastboot oem unlock". If you try to do this, it responds with the following error's - GetVar, Too many links, No Such File Or Directory Found.
[LG V40 Guides, News, & Discussion] Headshifter:
Update: I just fixed it by using a computer with USB 2.0 ports, you can also try using different usb cable, if the issue persists.

Also, if you have a problem using "fastboot oem unlock" command and get the error (on V35) - Device alreay : unlocked, use this command - "fastboot flashing unlock".
[LG V40 Guides, News, & Discussion] idntknoyunw:
From the guide at the start of this thread.

If you don't have the "Enable OEM Unlock" option in developer options, you'll have to flash frp with the v35 engineering bootloader. The frp image will be provided in the attachments section.
[LG V40 Guides, News, & Discussion] Btravelen:
Greetings all, I have a V405uab on the way. It's a Sprint variant that says it'll work with Verizon. I see the Verizon model is V405ual. I assume if 'uab' works on Verizon, it wouldn't be eligible for Verizon's update to Android 9(?) I'm hoping there's no need to unlock it. Thanks

EDIT: the uab is close to having all Verizon LTE bands except it's missing 46 and 66. The unlocked QA7 suffix apparently has all bands covered. I'm going to see if I can switch the order.
[LG V40 Guides, News, & Discussion] SuperMike393:
Hey, having a pretty rough time with this. I was able to get as far as flashing oreo but now Im trying to get into fastboot mode but verizon seems to have disabled access to it. Anyone experiencing this?

UPDATE: Ive been able to get into EDL mode but like some other users here im getting Download Fail:Sahara Fail:QSaharaServer Fail:Process fail when im going to partition manager. nothing else shows up or anything
[LG V40 Guides, News, & Discussion] cogpie:
[MENTION=9529911]SuperMike393[/MENTION] - I had this again and again, it looks like you just need to be really quick, it seems/feels to a be a timeout thing. When you get into EDL mode, you need to have QFIL ready to go and when you see it appear in Window's Device Manager quickly try loading up QFIL's Partition Manager. I didn't always manage it still, but had greater success by being as quick as possible. Good luck with it
[LG V40 Guides, News, & Discussion] SuperMike393:
yeah haha about that... i managed to get into EDL fine but now ive managed to jack up the USB driver. ive made a post detailing it out in the Questions & Answers forum
[LG V40 Guides, News, & Discussion] dud89:
After many hours, I was able to get it working by removing QPST and qualcomm drivers. Downloaded the lastest QPST from here: https://qpsttool.com/qpst-tool-v2-7-480. And install the drivers and QPST from that zip file. Worked fine after that.
[LG V40 Guides, News, & Discussion] SuperMike393:
Thanks. Im a bit confused on how to use QPST though. Was there a guide you used? I just want to get this right before I bricked a second time.

*Additional. Is there a set way to get out of EDL mode without having to drain the battery? I was stuck in EDL for a while.
[LG V40 Guides, News, & Discussion] dud89:
Just use the guide at the beginning of the thread. QFIL is included in the QPST install package. Hold Power and Volume down for 15+ seconds to get out of EDL mode.
[LG V40 Guides, News, & Discussion] sdotkdot:
Thanks so much for this. I must have missed that. I'm not used to carrier locked phones and don't usually have to jump through all these hoops just to attain root. I'll try this later