yashsingh1/xdaforums huggingface dataset:
[T-Mobile LG G6 Guides, News, & Discussion] Denversmartphone:
Guys i found this on the web... maybe for the profesional user this can be a way to unbrick lg g6 with hard brick like mine https://www.androidbrick.com/download/download-latest-2018-qualcomm-flasher-qfil-qpst-2-7-472/

i try to use it and i didn't understand nothing..but my mobile it see as download mode
[T-Mobile LG G6 Guides, News, & Discussion] hendusoone:
Thanks for putting this together, runningnak3d!

So, reading through the tutorial, you say this towards the end, after doing the cleanup steps:

So... does that mean attempting to boot into LAF will always put you into TWRP? If yes... is there any way to get the original LAF partition back, while keeping TWRP in recovery?
[T-Mobile LG G6 Guides, News, & Discussion] FCORivers:
It's for Huawei.
[T-Mobile LG G6 Guides, News, & Discussion] runningnak3d:
Yes, you can extract it from the 11g KDZ and flash it, but why? There will never be a situation where you would want laf over TWRP.

-- Brian
[T-Mobile LG G6 Guides, News, & Discussion] hendusoone:
My main reason is to maintain multiple methods of recovery. With a working LAF, you can flash a KDZ to get back to a working phone (even though it would need to be re-rooted). With TWRP in the LAF partition, if for some reason both instances of TWRP failed, that is no longer possible.
[T-Mobile LG G6 Guides, News, & Discussion] runningnak3d:
If something stopped TWRP from booting on laf, then laf wouldn't boot on laf either. They are both just kernel / initrd boot images.

Do what you want, but trust me, you are a lot safer with two copies of TWRP.

-- Brian
[T-Mobile LG G6 Guides, News, & Discussion] NighthawkXL:
Generally, I'd agree. Having redundant TWRP recoveries is probably better.

But it is nice that we can restore LAF on the off chance we want to restore the phone to default via KDZ. Perhaps to sell it or such.

---

Anyway, thanks for all the great work! I'll probably give it a whirl in a few days. Hopefully, this will spur some ROM development for the H872.
[T-Mobile LG G6 Guides, News, & Discussion] slayer3032:
I made it all the way through to mounting system with read/write, twrp console just complains that it failed to mount /system with "device or resource busy". I haven't attempted to boot into recovery again since booting into system but twrp is definitely on laf still. I did try booting from laf twrp to recovery twrp before booting to system and it didn't have permissions either.

Installing Magisk doesn't give me root as it spits an error can't write to /system.

I truly never thought I'd ever see TWRP on this device, this is incredible.
[T-Mobile LG G6 Guides, News, & Discussion] The_Anomalist:
U can mount /system. If u still have twrp on the laf partition all u have to do is reboot twice back into twrp then go to mounts and check system, clear cache then flash the magisk zip. But one thing o truly hate about magisk is my frequencies don't stick on kernel apps so I flashed regular su and right now everything is running amazing.

---------- Post added at 02:04 PM ---------- Previous post was at 01:42 PM ----------

Also if anyone has got a bootloop after flashing something I found out that the phone reboots when you are restoring backup. To fix this flash recovery system and boot from the backup but u have to keep tapping on the screen so it dont timeout and restore wrong.
[T-Mobile LG G6 Guides, News, & Discussion] bickfordman:
Think I will wait till next week I'm just happy you got this far
[T-Mobile LG G6 Guides, News, & Discussion] theartialmartist:
also wondering about this, is there any advantage to downgrading to the stock 10g or whatever is available? can we flash h870 roms too?
[T-Mobile LG G6 Guides, News, & Discussion] Denversmartphone:
So guys maybe i found a solution for the hard brick i tested on the lg g5 and work now is to test for lg g6 and v20 but i need your help..i need a kdz extracted and compiled with patch.xml and the rest of file like you use in qfil i try to doit by my self but i get a error i do know why to me extracted multiple PrimaryGpt and multible Backup so im not able with classical processto get partition0.xml for make the rest of file with g5 it was succesfull to me but with v20 and g6 nope....for unbrick this device qfil not work you will get over and over sahara fail also if you have a right msm8996_ufs.elf! so i found a program free that work like charme! so just let me know
[T-Mobile LG G6 Guides, News, & Discussion] IshsXda:
So i am in part 2 of the procedure. I run into an error after the step: ./partitions.py --restoremisc twrp-3.2.1-0-h870.img lafbak. It does nothing for a while and returns back some kind of error.

"Traceback (most recent call last):

File "./partitions.py", line 66, in laf_open_disk

yield fd_num...."

The numbers matched for sha256sum misc.img

sha256sum misctest.img

And i continued on but the numbers did not match for: sha256sum twrptestout.img

sha256sum twrp-3.2.1-0-h870.img

So i tried ./partitions.py --restoremisc twrp-3.2.1-0-h870.img lafbak again. However got the same error. I aborted and did it over like so:

"git clone https://github.com/runningnak3d/lglaf

cd lglaf

git checkout h872-miscwrte

./partitions.py --dump misc.img misc

./partitions.py --dump misctest.img misc

sha256sum misc.img

sha256sum misctest.img

./partitions.py --restoremisc twrp-3.2.1-0-h870.img lafbak..."

but same thing. Any solution? I have since rebooted my phone and holding off from root now.
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Which FWUL version are we supposed to use?
[T-Mobile LG G6 Guides, News, & Discussion] runningnak3d:
It doesn't matter.

-- Brian
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Hey man, I got all the way to the end of step 2 and my phone won't power off. Stuck in download mode. Everything worked up until then. Holding down the hard buttons doesn't work, just stuck in download mode. Please tell me what I can do
[T-Mobile LG G6 Guides, News, & Discussion] runningnak3d:
Wait for the battery to die and then you can continue.

-- Brian
[T-Mobile LG G6 Guides, News, & Discussion] shizzmoney:
Hey all,

I did part one and it seemed to go pretty smoothly, unlocked the bootloader+OEM, followed the tutorial on arandom's youtube to pull the usb cable at the right time, installed the files listed in the thread via LGUP......but now I can't get back into download mode to continue to part 2.

Whenever I try to do so, the phone gets "stuck" on this screen. It becomes unresponsive as the computer can't see it in this state so I can't adb, and even to holding the power button+vol down to restart the phone. I really wish this thing had like a pin battery reset that you see on tablets since you can't remove the battery; this is a major flaw with the phone IMO.

The good news is the phone isn't completely bricked. I just have to wait for the thing to completely drain the battery so that it shuts down, and then after a recharge, can turn it back on and everything is working again. I'm thinking maybe I lost download mode (no biggie) which would suck since that means I can't root it but at least I don't have a really expensive paperweight.

Any ideas?
[T-Mobile LG G6 Guides, News, & Discussion] MudaTrucka:
For me that's what the screen showed when going into that download mode
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
I actually didn't need to do this.

Question though,

I am positive I followed all steps correctly. ONE thing I noticed,

Following that youtube tutorial that someone posted, I did notice that his device got to COM 5 while mine only made it to COM 4 when I pulled the USB, but other than that I pulled at the correct time. Unless I didnt flash FWUL correctly or use the correct version, I have no idea what I did wrong.

After getting to the end of step 2, my phone could not get out of download mode and holding down hard buttons did nothing except I noticed the screen would go from dim to a little brighter after holding down the hard buttons.

So I rebooted into windows and LGUP wouldnt recognize until I held down power+vol up at the right time and then plugged the phone in, finally got it to connect and flashed the 11g KDZ.

I have no idea what I did wrong and if I could get some input I would appreciate it. I'd love root but like I said I did everything right and almost got totally screwed. I want to try again today.

Please get back to me on what you think, is it the COM 4/5 thing or maybe it was cause I flashed FWUL to a 64GB USB drive and I did notice some differences in rufus from the tutorial? Those were the ONLY two differences I noticed from both tutorials that seemed to root the G6 just fine.

Thanks for all your work.

---------- Post added at 09:52 AM ---------- Previous post was at 09:47 AM ----------

Honestly I think you should be able to get it to restart if you play around with the vol down + power button combo, wait until the screen flashes brighter, then hold vol up and plug into Windows, use LGUP to flash original 11g KDZ. Phone should restart. Worked for me after I was stuck where you are.
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
When you go into download mode to do part 2, you won't see a progress bar like with LGUP . Unless I'm missing something this is normal behavior and you should be able to continue the tutorial from part 2.
[T-Mobile LG G6 Guides, News, & Discussion] shizzmoney:
Well another issue is that when plugged into the usb, the computer won't even recognize it as a drive. This is problematic for part 2 since the FWUL program needs to see the phone as a drive on my pc to load TWRP.

Do I need to switch the usb mode to something before I reboot and launch into download mode? I also noticed in a few posts back someone mentioning that their phone during part 1 showed "COM 4" during download mode, when in the youtube tutorial arandom posed, his said "COM 5". Mine said "COM 3" when I did part 1, not sure if this is an issue.

Should I be putting the phone in download mode first, and then connecting it to the PC?
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
Just to be sure, did you type "!CTRL POFF" and then "exit" at then end of the steps in lglaf.py? I can confirm that the power + vol down combo doesn't work when in download mode, so that would be the only way to restart the phone aside from letting the battery drain.

---------- Post added at 05:31 PM ---------- Previous post was at 05:18 PM ----------

I don't think the COM 4/5 thing should be an issue, as long as you pulled the cable *after* flashing laf.

I'm unclear on where you are in the process, do you have TWRP installed to recovery and download mode already?
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Yep I sure did. Phone didn't restart didn't do anything. All previous steps were done perfectly.

Phone just sits in download mode with progress bar. I don't understand why those commands weren't shutting it down.

Luckily I reflashed 11G with LGUP and my phone restarted. I don't have the time to let the battery drain, only phone.
[T-Mobile LG G6 Guides, News, & Discussion] shizzmoney:
Part 1 is completed, and I am unable to do Part 2 as my PC won't recognize my phone.

I do Part 1: I pulled the cable right when "xbi" showed in the LGUP and then loaded the other KDZ without laf. The phone then reboots and I held "up" to get into download mode. Then it loads into that screen and is then stuck.
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
That should be ok then. You're not stuck, but you will need to complete part 2 to get out of download mode. Your phone will not show up on the desktop and will not be recognized by ADB until you reboot into either system or TWRP.
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Do you have any idea what I could try differently since !CTRL POFF and exit didn't restart my phone?
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
You should not get a progress bar when entering download mode on FWUL. The only thing I can think of is not letting LGAF finish booting (in system, but progress bar not at 100%), or not disconnecting the phone before booting into FWUL. Besides that you may want to try the flashing process again or contact the LGUP dev.
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Okay so you are supposed to see download mode when flashing the KDZ files. Then after unchecking LAF and flashing the second KDZ, it says phone will reboot, and go back into download mode before starting FWUL. What should I see on my screen during FWUL if not download mode?
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
When flashing the kdz files in LGUP, you should see a progress bar. When in download mode on FWUL you should only see this.
[T-Mobile LG G6 Guides, News, & Discussion] shizzmoney:
This is where I get stuck during Part 2, pic below since my VirtualBox is being slow this day:

https://ibb.co/dURyGJ
[T-Mobile LG G6 Guides, News, & Discussion] IshsXda:
you aren't the only one getting this issue. I get this issue after i enter ./partitions.py --restoremisc twrp-3.2.1-0-h870.img lafbak .

However others already have suggested people running into that issue with VM should boot FWUL from USB. However i am using USB and still encounter the same issue but a few lines after you. Several others also booting from USB and still same issue.
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
OKAY

I got to TWRP, got everything done except the very last command line step

I CANT mount system. Help?
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
Mount system read-only to flash magisk and get root. Magisk doesn't need access to /system/ to install, so you should be OK even if that doesn't work.

If you want to install custom roms you'll need to flash this TWRP using flashify or recovery mode.

Be warned though that the only way I was able to flash lineageOS involved doing a full wipe and invalidating my backups, so do that at your own risk.
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Well all the steps worked except the last one

" adb shell rm /system/recovery-from-boot.p

If that doesn't exist:

adb shell rm /system/recovery-from-boot.bak"

It says cant remove because no file or directory and when I try to mount as read only it says can't remove because read only file system

Am I safe to start all the steps from part 3 all over again? I read that changing the file extension of system in wipe settings can help too, is that safe?
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
If the file doesn't exist you should be safe to boot into system.

Just to be sure run "adb shell ls /system/" with system unmounted in twrp. If it doesn't print an error you should be safe to reboot.
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Ok I ran that and got

"bin

usr"

Good to reboot?

---------- Post added at 01:34 PM ---------- Previous post was at 01:19 PM ----------

Someone answer please, wasn't able to mount system and finish very last step

It says if I reboot to system it will wipe recovery without running these lines first
[T-Mobile LG G6 Guides, News, & Discussion] Ken C:
Ide say that wasn't an error. Your getting the list of what's under system. A bin file and the user file. I'm not far enough along to say for sure and tell you to reboot it, so if it were me I'd be inclined to wait and see if that other guy responds. Just thought i'd give you some sort of response since your sitting there waiting and those were my thoughts when I read your post
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Well all I had to do was reboot into TWRP, and it let me mount system

Simple. Then it let me run the rm recovery command

Now I'm all booted and checking root
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
Just to confirm, you should be all good. Now just install Magisk manager from the xda thread and you should have full root.
[T-Mobile LG G6 Guides, News, & Discussion] roger.hernandez91:
Appreciate ya.

Full root successful, safety net pass, Magisk was already installed and is updated and good to go.

This is amazing.
[T-Mobile LG G6 Guides, News, & Discussion] Ken C:
Got a question for y'all

Are you guys running the whole procedure through fwul? I'm thinking there's a need to go from fwul to a normal windows system with adb installed for part of the deal. But, since fwul is supposed to work specifically on phones I'm thinking it may already be in there. But lgup etc is installed within my windows setup so even if I could do the adb portions through fwul I'm thinking I'd still need to boot into windows at some point
[T-Mobile LG G6 Guides, News, & Discussion] MudaTrucka:
I did step 1 through windows and the rest was done in fwul, just follow everything exactly and you won't need to switch back to windows
[T-Mobile LG G6 Guides, News, & Discussion] igorya79:
Yes! I did not open the bootloader

and my phone does not go into download mode.

LGUP does not see the phone

but when switched on, the phone goes into the fast boot mode:

c:\android>fastboot getvar all

(bootloader) version:0.5

(bootloader) variant:MTP eMMC

(bootloader) secure:yes

(bootloader) version-baseband:

(bootloader) version-bootloader:

(bootloader) display-panel:

(bootloader) off-mode-charge:0

(bootloader) charger-screen-enabled:0

(bootloader) max-download-size: 0x20000000

(bootloader) partition-type:cache:ext4

(bootloader) partition-size:cache: 0x4d000000

(bootloader) partition-type:userdata:ext4

(bootloader) partition-size:userdata: 0x5a1000000

(bootloader) partition-type:system:ext4

(bootloader) partition-size:system: 0x15d800000

(bootloader) dm_count:0

(bootloader) lock_count:2

(bootloader) unlock_count:2

(bootloader) serialno:LGH872b61334d3

(bootloader) kernel:lk

(bootloader) product:MSM8996

(bootloader) unlocked:no

how can I flash the phone through the adb?

---------- Post added at 12:28 AM ---------- Previous post was at 12:18 AM ----------

c:\android>fastboot oem unlock

...

FAILED (remote: oem unlock is not allowed)

finished. total time: 0.013s

c:\android>fastboot getvar unlocked

unlocked: no

finished. total time: 0.008s

c:\android>
[T-Mobile LG G6 Guides, News, & Discussion] Ken C:
You actually quoted the solution man
[T-Mobile LG G6 Guides, News, & Discussion] igorya79:
I would like to try the commands:

fastboot flash boot boot.img

fastboot flash system system.img

But I do not know how to extract .img files from the .kdz firmware

help me please.
[T-Mobile LG G6 Guides, News, & Discussion] Ken C:
Correct me if wrong guys. But those commands are not going to work. They're not in the phone for you to use. That's why your working on the Laf partition to root this phone. If you could root this through adb it wouldn't have taken a year for somebody to work it out. Don't take my response wrong, I've just seen this post hanging here without a response. May not be what you wanted to hear but from my understanding that's the deal
[T-Mobile LG G6 Guides, News, & Discussion] igorya79:
I hope that the original firmware (not custom) should be successful
[T-Mobile LG G6 Guides, News, & Discussion] Ravenjolly:
Did you perform any actions from OP, because the whole problem to begin with was that those commands were not in the stock lg g6 LAF partition.

So, you will need to follow the instructions in OP to put the LAF partition from the lg v20(iirc) and that will allow you to use the different fastboot commands
[T-Mobile LG G6 Guides, News, & Discussion] MetroWestMA:
Everyone -- I was one of the early adopters and have been enjoying my rooted phone for a bit (also new to Android as my main device, but not development)...and I was just wondering...

1) Should I flash the unofficial 872 TWRP or wait? I was able to back up my image with the OP TWRP (870? can't remember), but did get some mounting issues at the end...

2) Is it generally risk free to flash a new TWRP and pretty easy?

3) Being new to Android/Rooting -- if Oreo comes out I assume you can just upgrade from T-Mobile and then re-run Magisk, or I am I very misinformed on this :) I thought Magisk was supposed to pass safety checks or something so you can upgrade directly from the carrier.

If anyone has links so I can learn that would be great!

MW
[T-Mobile LG G6 Guides, News, & Discussion] Metabolic12:
I wouldn't recommend updating to Oreo when T-Mobile pushes out the update. The security patches and updates to Oreo will be different from Nougat. Magisk does help ensure passing safetynet, but it's not so you can take updates OTA. The choice is yours, but remember the chances of bootloop and you will more likely then not lose root.
[T-Mobile LG G6 Guides, News, & Discussion] Stephen30:
Thanks a lot! It works for me!
[T-Mobile LG G6 Guides, News, & Discussion] Globespy:
I have been waiting for this for close to a year - amazing job!

HOWEVER, my phone is running 11h (which was pushed by T-Mobile a few days ago) and I haven't checked this thread in a while because I was sure it was a lost cause.

Any chance this will work? My phone is still Nougat 7.0, but scared that T-Mobile pushed out this 'security' update because they found out about a root option?

I have rooted every phone I've owned (excluding this one) so the instructions are easy to follow - I just need to know if it could bork my phone because it's had this latest T-Mobile update that's beyond 11g.

Thanks!
[T-Mobile LG G6 Guides, News, & Discussion] Julieswt:
Stuck on Download Mode After step 1.. Please Help.

I did Part one successfully and the phone rebooted, then went on to Part 2, in download mode... however when I get to the step where it says "./partitions.py --dump misc.img misc"

I get the following errors.

[android@fwul lglaf]$ git clone (xda prevented this github link)

Cloning into 'lglaf'...

remote: Counting objects: 578, done.

remote: Compressing objects: 100% (25/25), done.

remote: Total 578 (delta 25), reused 29 (delta 15), pack-reused 538

Receiving objects: 100% (578/578), 38.94 MiB | 2.83 MiB/s, done.

Resolving deltas: 100% (346/346), done.

[android@fwul lglaf]$ cd lglaf

[android@fwul lglaf]$ git checkout h872-miscwrte

Branch h872-miscwrte set up to track remote branch h872-miscwrte from origin.

Switched to a new branch 'h872-miscwrte'

[android@fwul lglaf]$ ./partitions.py --dump misc.img misc

/usr/bin/env: ‘python3’: No such file or directory

[android@fwul lglaf]$ ./partitions.py --dump misctest.img misc

/usr/bin/env: ‘python3’: No such file or directory

[android@fwul lglaf]$ sha256sum misc.img

sha256sum: misc.img: No such file or directory

I do not know what do to, and the phone won't respond to anything, won't reboot nor exit Download Mode even after Power and volume down pressed for an extended time.

Please help
[T-Mobile LG G6 Guides, News, & Discussion] christopherrrg:
Those logs look like your python3 installation is borked. I'm just taking a guess judging by the errors.
[T-Mobile LG G6 Guides, News, & Discussion] Julieswt:
yeah. I was using the FWUL (Forget Windows Use Linux) bootable USB iso and thought everything needed was going to be included in FWUL. I am stumped.

The phone finally ran out charge and restarted right back and is working fine, the only bummer is that I cannot go past part 2 of these instructions, so I still don't have root nor twrp.
[T-Mobile LG G6 Guides, News, & Discussion] arandom:
try typing

sudo pacman -Syy python3

into the terminal and then run the partition.py commands again.

If that doesn't work try

/usr/bin/python3 partitions.py

instead of just

./partitions.py

for all of the commands. If that still doen't work you can download a python3 executable and use it to run partitions.py
[T-Mobile LG G6 Guides, News, & Discussion] shirazdindar:
This was my situation too.

Rooted every phone I've had til this one. Thought root was a non-possibility on this phone. Got updated to 11H today. Did a search to see what it was about. Came across this thread.

Let me know if you find anything out, please and thanks!