yashsingh1/xdaforums huggingface dataset:
[G4 General] terence.tan:
Hi [MENTION=5545101]steadfasterX[/MENTION], I have a question about flashing via lglaf.

I started flashing my H810 to a suitable H811 ROM via lglaf... specifically the version that is bundled with SALT. As of writing, this is git repo "steadfasterX/lglaf" on branch "g4-stable" at latest commit today (88e5398).

I noticed that flashing was very sloooooooooooooooooow. Maybe 0.5MB per second. I also noticed that python process "partitions.py" was consuming 99% of CPU time.

I lost confidence, cancelled the flash, and restored all changed partitions to a backup.

My CPU is not the fastest (first-generation Core 2 Mobile from 2010) but surely it should be faster than this? Reading the partitions is very quick. Writing is slooooow.

Are there any optimisations to make "partitions.py" go faster?

Running Python 2.7.13 on latest Debian Stretch (amd64).
[G4 General] rizkhan999:
Dear sfX!

Is relocking the bootloader possible in H815?

I am using a custom boot image on H815 but want to relock its bootloader. Executing "fastboot oem lock" and "fastboot flashing lock" commands are giving FAILED (remote: unknown command) error.
[G4 General] steadfasterX:
wrong thread.. but yes. flashing is slow. that is a restriction of the current implementation (USB). My latest code (in SALT) can write up to 1 MB/s but it depends also on your CPU speed. and you can not write on every firmware it seems. Thats why i removed the flashing buttons in SALT atm until fixed.

any further questions about lglaf in the SALT thread pls.

yes.

fastboot commands not working there.

well they work when you flash Nougat on it.

the other way: flash the misc partition of a kdz but create a backup of it before. This way will lock a h815 (tested).

.
[G4 General] rizkhan999:
Means after installing nougat, I would be able to relock its bootloader with "fastboot oem lock" command?

Ok I will put my IMEI in the misc of KDZ and then flash so that I would be able to use the cellular services afterwards. But I have custom boot image and custom recovery installed. I hope flashing the misc of kdz would not brick the phone in this case.
[G4 General] steadfasterX:
Correct

.

This will 100% brick. After you have locked the device you need a valid boot in it otherwise you will get the secure boot error and so brick your device.

So before locking the device ensure that you are 100% pure stock
[G4 General] raggaro5:
Awesome I'm down I have the ls991 in a drawer now cuz I'm using a h910 v20 so I'm willing to send u the serial this weekend in order to benefit the development

---------- Post added at 05:59 PM ---------- Previous post was at 05:12 PM ----------

tried booting into fastboot but it just normal boots when i send the adb command it do get download mode and recovery tho any help
[G4 General] steadfasterX:
The mentioned method does not work unfortunately but as you own a ls991 you could just flash the ls991 aboot and enjoy an unlocked phone..

Well it depends on your ARB can you tell me which firmware is currently installed or what your ARB is? http://tinyurl.com/antirollg4
[G4 General] raggaro5:
I'm on firmware ZVB I used the 9% method to get zvb mellowmallow on it to unlock it for gsm use would like root n twrp if possible or just root - zvb would make it v3
[G4 General] Vasto_lorde97:
Would this work on a sprint lg g4 with ZVI?

Dont really know which ARB ZVI is but i really want to know want to flash custom roms on this phone.
[G4 General] steadfasterX:
ZVB is ARB v3 so no unlock. Do you have flashed just the system image of mellowmallow? Then you may not increased the ARB.

You can find out your real ARB by using SALT ( https://bit.do/SALTatXDA )

ZVI is ARB v3 or 4 so no unlock.
[G4 General] Engelm:
Wow, amazing job!!!!
[G4 General] popy2006:
Finally! :good:

Thx steadfasterX for your hard work!

Hope this will push the G4 development ;)
[G4 General] SanjayG:
:good: Thank for not give up, your hard work is being off

:highfive:
[G4 General] mwahahaa:
It's a Festivus miracle!
[G4 General] kessaras:
[MENTION=5545101]steadfasterX[/MENTION] , crazy stuff as always.

Then you call my work a Frankenstein ?

That's great , now you are getting really close
[G4 General] ChiKaLiO:
well forgive me for being lazy and not reading everything.. will f500 be able to flash custom roms ?
[G4 General] steadfasterX:
Yes
[G4 General] ergo911:
Hi SteadfasterX. After long time I got my flex 2 h955 working and came looking for the fish thread and I found that bomb for your G4 :) what do you think, will it be even possible on flex 2? Thanks for your great work!!!
[G4 General] augusto1024:
Amazing job! Will this ever work for devices with ARB higher than 3?
[G4 General] steadfasterX:
https://xdaforums.com/g4/general/bl-unlock-unlock-bootloader-proof-t3648288/post74927008

Read the note.
[G4 General] ling751am:
okay, I'm screwed up, used the fkin EVIL FIREHOSE

after used that I searching all the Google and find this thread

LATE, as I said, everything is late, and thanks to [MENTION=5545101]steadfasterX[/MENTION] for help me debug this

no cell service for me now, I turned this phone into a TABLET!

completetly convert H815 TWN to LS991, thanks Sprint :(

still waiting for a cell service fix.. and seems I'm on LS991 ZVA firmware
[G4 General] good4y0u:
Its time to unlock/ get root and flash a new ROM on my old LGG4.

Is this still the best method, and is it still possible to get a copy of those files.

Pertinent information: Model ATT H810

Android Version : 6.0 ; Build#: MRA58K ; Software V: H81022f; Security Software: MDF V2 Release 2;

By the dialed method Anti Rollback = 3
[G4 General] steadfasterX:
Luckily the h810 is able to boot with the h811 bootloader.

H810 can be unlocked by flashing a prepared (hex edited) h811 kdz with the same ARB then your current one. Then you can boot into Android select OEM unlock in settings, boot into fastboot and just use fastboot oem unlock command.

Happy Christmas
[G4 General] steadfasterX:
I don't think so. If there is a working qfil firehose available for that device and a leaked aboot then maybe. I can't help you with that though.
[G4 General] good4y0u:
I was wondering if you have more information on this method, I did searching in the forum but couldn't find anything.

Merry Christmas to you too!
[G4 General] terence.tan:
Over the last few days I have been trying to flash my H810 (20n, ARBv2) to H811 with no success:

Using "download mode" and lglaf (git branch steadfasterX/g4-stable) to flash individual boot stack partitions from H81120i

Using LGUP with a hex-edited KDZ of H81110n, flashing the H811 partition map and all partitions

Using LGUP as above except with H81120i

Using QFIL/firehose mode to flash individual boot stack partitions from H81120i

Each of the above has resulted in a 9008 brick which required QFIL/firehose to recover. Also I have not been able to get any "sdcard recovery" methods to work, each combination I try gives me a "Secure Booting Error 1009 OFFICIAL" error, then reboots.

Am I missing something?

Note that this LG G4 is a refurbished "Frankenstein" model from AliExpress; it was sold as a H815, but contains an H810 circuit board... and apparently had the boot stack of H81010n and the /system partition of H81510n. I have no clue what else the seller did to it, but it is not a "regular" H810...
[G4 General] good4y0u:
I can try and see if I get anywhere. I have a older h810 arb=3 that I got as a replacement from lg when the one I bought bootlooped. I just need to overclock this thing and get a better rom.
[G4 General] steadfasterX:
thx same to you :)

https://xdaforums.com/g4/help/successfully-unlocked-h810-bootloader-t3672604

and that one but its not clear if thats maybe a frankenstein: https://xdaforums.com/att-g4/general/lg-g4-h810-10o-unlock-bootloader-enable-t3652364

First of all:

I said clearly in my SALT thread to

not

use my lglaf branch for

flashing

. Its under heavy development as it does not work properly on any LG device atm and the founder of lglaf and others trying to fix this.

.. and yes frankenstein devices may not work with that method. so you have to wait for the new unofficial unlock.

I hope u havent used the EVIL firehose.. as this will likely prevent the unofficial unlock from working.

:highfive:

Cheers
[G4 General] terence.tan:
Too bad for me, I did use the evil firehose. It was the only way to recover from 9008 mode. Regular firehose didn't work, neither did sdcard unbrick.

Plot twist: I suspect the original seller of this "Frankenstein" phone already ran the evil firehose. I didn't think to check this however.

If it means I can never unlock this phone, that's OK. No need to be disappointed :) I reinstalled 81020n and restored all data from backup and now it's back to working as it did before. I'll just find some other phone to install LineageOS on :angel:
[G4 General] Tinyshy:
Hey, a while back the g6 was inquired about in this thret and it was stated we would need a way into edl mode yeah? well my device disconnect during a factory kdz flash and I was forced into it. can any of you help me out of this situation? I know this is a g4 thread but I'm thinking i'll likely get a quicker response from people who actually use this mode than those who dont.
[G4 General] steadfasterX:
I wonder... Maybe LG is waiting until I release my unlock method here before they release N to the public. Lol

A quick update:

I have maybe made another breakthrough in how to flash the UsU (Unofficial steadfasterX unlock) which would make the whole procedure incredible more easy to use (and much less risky) and I could integrate just a button to unlock in SALT... Unfortunately that will take a bit more time then thought but I'm sure it's worth it.

Not me. Each device needs a different programmer. Search for qfil files for your device.
[G4 General] Tinyshy:
Thanks, I stupidly posted before even bothering to read around. there is no available programmer for the g6 or its chipset from what I understand so I'm sending it back to lg. thanks anyways and good luck with your work. I've been watching this thread for awhile and find it really impressive what you've achieved here.. too bad it does't apply to the newer generations of lg devices.
[G4 General] steadfasterX:
It is almost ready... finally..

after months of work I can say I have not only found a way to unlock unofficially (which alone is awesome enough) but also implemented a way to bring it on any locked device (thanks to security hole I discovered in lglaf) and all this with very less chances of brick.

i will send it to my testers tomorrow...

it's NOT officially released yet until I have some tests results but now it is even user friendly :) and I'm pretty sure it will work ;)
[G4 General] steadfasterX:
First Unofficial secureboot-off/steadfasterX Unlock (UsU) happened!

Big thanks going to [MENTION=6013323]networkkid[/MENTION] ! who made the first test to unlock with SALT (which will fully support unlocking with UsU starting with v3.0).

He owns a H815 TWN and we unlocked it 5 minutes ago (in less then 5 min):

https://hastebin.com/giqemuwili.vbs

Again that method should work for

any

G4 model but we just have a proof for 1x LS991, 1x H815 EUR and 2x H815 TWN (yes I count the device of [MENTION=5125041]ling751am[/MENTION] as well even when he broken his device as he dont wanted to wait ;) ) yet.

.. and also again: this method comes with only some few limitations (like when you flash a KDZ/TOT file you will loose unlock, etc) but SIM/Call/Mobile internet/everything works!

Hint: The limitation about ARB must be 2 or lower may have been overcome as well now as we can unlock with SALT! I will do a basic test for that later

.
[G4 General] the_naxhoo:
well if you say everything is working and my device is still an H815 model after your Unlock process... I can be a tester with my H815p :)

if you still need a tester and want ofc.
[G4 General] good4y0u:
I'll test with my att 810
[G4 General] networkkid:
After unlocking, everything has worked normally. I am using 4G right now and everything just fine. I rooted my phone via TWRP. And yes it is worked too. Now I will try install custom ROM' s. :)
[G4 General] mwahahaa:
Free at last! This will breath new life into our aging G4s.
[G4 General] adam_s_459_:
How would I go about checking the ARB value of my device?
[G4 General] Engelm:
You could use his tool https://xdaforums.com/g4/general/tool-salt-lg-revolution-t3717864.
[G4 General] aha360:
Damn right... in theory.

In practice, we shall see, but this is a massive development and will help massively with future ROM development, which can only be good thing.

https://xdaforums.com/showpost.php?p=73206763&postcount=3
[G4 General] fates13:
I have a VS986 that I can test with
[G4 General] rjc34:
Wow, been back to XDA on and off for 2 years hoping to one day see this puzzle finally cracked to get some custom goodness on my G4. And of course just after I pick up an iP8 so I’d have something with more than a year of updates ahead of it!

Great work everyone. I’m eagerly looking forward to testing this out on my H812 in the next couple days. Will report back with results!
[G4 General] terence.tan:
I'd like to thank @steadfasterX -- and all the collaborators and testers who pitched in.

This is a massive achievement which required lots of engineering, testing, rigour, induction, and persistence. We could all tell from the months of hard work and effort. And yet he stills stays patient with all us noobs :)

It's hard enough for one device. But steadfasterX is doing it for an entire family of LG G4s running all these different versions of Android, carrier ROMs, firmware basebands, (not to mention the bootloop hardware defects) etc. etc. and it is insanely complex, with no support from the vendor. There are so many combinations of boot stacks, firehoses, certificates, ARB versions etc. out there that need to be inspected, and theories of how they work that need to be tested, and code to be reverse-engineered and that needs to be tested too. LG could have made it simple and sold one device worldwide (and unlockable by default). But no, they made it difficult.

All this comes with the risk of bricking your device, which he took so we don't have to.

And then he is going to the trouble of making a GUI so it's safe and reliable. It looks so easy that we think anyone can do it, but it hides the massive effort involved.

So we thank you and salute you for demonstrating the XDA Android development ethos: hacking our devices to do what the vendor won't let us.

P.S. Personally I thank you. I will wait for the official unlock to be released to the public before I can confirm it works.

(But... maybe I found a file with hash f8e26b6d somewhere in my huge list of files that I tried that didn't work previously, this time I tried again with the techniques you inspired, and it is looking very positive! :):):))
[G4 General] steadfasterX:
Omg you speak directly from the deep bottom of my heart :)

Thx for your kind words and the understanding of all this.. Really..

Im positive that I can release it soon but that depends on the testers results. I can only recommend to wait just a little bit more ;)

(even if you had found the UsU hash... It's very unlikely that you have that file ;) )
[G4 General] steadfasterX:
Thanks but first: tell me your ARB and installed firmware version.

Thanks but first: tell me your ARB and installed firmware version.
[G4 General] fates13:
I'm on 13b so it should be ARB v2
[G4 General] good4y0u:
Directly from SALT:

ARB: 3

Firmware: H81022f

Detailed Firmware : LGH810AT-01-V22f-310-410-APR-25-2017-ARB03+0

- I am on the IRC as well
[G4 General] dragonman225:
Hello, I can test the unlock with my H815 TWN, currently on V29a Nougat and ARB v0.
[G4 General] aha360:
Massive congratulations on your efforts on making the LG G4 relevant in the world of Android modding/custom firmwares, especially when this device is currently lacking in hobbyist development support [MENTION=5545101]steadfasterX[/MENTION]

Good luck and Godspeed to you, your partners in crime, and this project.
[G4 General] steadfasterX:
VS986 UsU unlocked.

Thanks [MENTION=4732871]r3pwn[/MENTION] ;)

[MENTION=5937299]the_naxhoo[/MENTION]: thanks but I already have H815 tested fine :)

[MENTION=6260190]fates13[/MENTION] : thanks but I already had a tester in the meanwhile (he was on the list before you sorry)

[MENTION=3852311]good4y0u[/MENTION]: I need to do some more tests before I want to try UsU on an ARB>2 . I will let you know when ready.

[MENTION=8841920]dragonman225[/MENTION]: thanks but I already have H815 tested fine :)

I would like to test a H810,H812,H818,H819,F500,US991 if possible. So If someone out there has one of these

and

a ARB = 0,1 or 2 pls send me a PM!

Testers Update:

No further H818 tester needed anymore.

Update:

Everyone who is interesting in unlock or interested in testing:

You can already prepare yourself right now:

If you have a Linux install SALT ( https:// bit.do/SALTatXDA )

If you have no Linux grab your copy of FWUL ( https:// bit.do/FWULatXDA ). I highly recommend to choose a persistent build and in the OP find the download link for the nightlies and there scroll down to the bottom for the v2.5 release. That one contains SALT already.. Start SALT and click the update button to ensure you're on the latest version.

Once you have SALT set up and running: make a backup (basic mode is absolutely enough but up to you as the full will take hours but contains all your user data which the basic does not)! This part is ESSENTIAL and may be your only option for recover your device one day.

Now you're prepared for the upcoming instructions :)

Thanks
[G4 General] mateus.sc:
Cool then.. if you recommend us taking a basic backup before applying the modifications does it mean the restore problems were solved in others versions than LP?

You re da man, congratulations for all the amazing work with SALT!!

I had already accepted that I was bound to use 5.1 forever to keep root(Viper and debloat rocks) but you changed everything! Best wishes
[G4 General] steadfasterX:
No not yet. But in a worst case scenario until then I could prepare qfil files or restore remotely your device when a backup was taken.
[G4 General] steadfasterX:
Testers Update:

No further H818 tester needed anymore.

No further H810 tester needed anymore.

No further H812 tester needed anymore.

No further H815 tester needed anymore.

Where are the others ;) ??? (ok I guess those are not that much wide spread.. So if someone knows a person willing to join lemme know)

Tbh that method is 99.9% working on any g4 device I'm just paranoid ;)

If the above test results are positive I will release it.

One thing to add:

I'm on vacation from Thursday on and back in February. So.. Even when I'm able to release (depends on the results and some stuff I need to add and prepare) I recommend to wait until I'm back to get best support.. I have my phone with me but I can't help much without a pc...
[G4 General] Jonotjie:
I have the LG-H815P so I guess it is the same as yours.

Also my daily phone so not sure if I should do testing on it. lol. :confused: :eek:

Noticed you added the 815 to your list. :)
[G4 General] steadfasterX:
SALT version 3.0 released

H812 UsU unlocked

thanks [MENTION=5432902]DoughMucker[/MENTION] for the test and report

H810 UsU unlocked

thanks [MENTION=3482571]shane87[/MENTION] for your test and report

Have fun with your unleashed device ;)
[G4 General] steadfasterX:
During my further tests I recognized that the EVIL firehose MAY not be actual EVIL. Testing the combinations is very hard as each combo can make the device unusable but you said you were able to restore completely to h810? Even the bootloader? If yes then this would mean you can still unlock with UsU!

.
[G4 General] DoughMucker:
Yes, I'm writing this from a Lineage OS Nougat H812. Never thought I'd see the day, but it's here.

Big thanks to steadfasterX!
[G4 General] slim902:
Everything working so far? I also have a H812 but it's my main phone. Would love to get Nougat though.
[G4 General] aha360:
Just as I have officially unlocked the bootloader via the LG Developer service, [MENTION=5545101]steadfasterX[/MENTION] tears this leather-backed Korean slab a new @$$hole by finding a way to unofficially unlock the bootloader.

Well done man, and enjoy your vacation! ???

If reports are anything to go by, then yes.
[G4 General] DoughMucker:
I don't want to highjack steadfasterX's thread with too much on this, so I'll make it brief... Autorotation is the only thing I've found not working. I don't have a SIM in it now so can't comment on voice/data. WiFi, BT, GPS, camera all work.

Go for marshmallow or have a look at other build if you want more stability, though I have zero experience with other G4 ROMs. [emoji3]
[G4 General] hey_joe:
Which recovery did you install on your phone?

Thanks
[G4 General] DoughMucker:
steadfasterX provided a version of twrp for my H812.
[G4 General] simuzer:
H815TR

Android version 7.0

Software version V29a-TUR-XX

anti-rollback v0
[G4 General] steadfasterX:
Just a quick status:

H818 UsU unlocked

thanks to [MENTION=1385167]jmfecon[/MENTION] for the test (no test report provided)

Current issues

H810 was able to unlock fine but was not able to boot a custom ROM (yet). installing TWRP and booting a H815 ROM was working (flashed 10c system, boot, cust partitions).

H818 was able to unlock and install TWRP but having issues with touch screen (even on TWRP which very likely means it has nothing directly to do with the unlock)

The above are the reasons why i want to test at least one of every model before releasing .. (so I still hope that US991, F500, H819 users want to go through the first test)

stay (a bit more) tuned..

UPDATE:

ooooh holy.. f..

well the reason for the H810 seems to be clear now. As stated in my partition info thread I found out the partition table for the H810 is the same then for the H815. Thats not.. well only partly true.

The partition table of H810

PR

(!!!) is the same but this is not true for the H810 in general! The H810 (10o firmware) has the same GPT then the others compared to LS991. So it requires to flash

H811

ROMs (not h815 ones) like the others!

UPDATE-2:

oh my.....

Its even worse! They change the GPT sometimes between LP and MM! This is crucial important!.. I will need to reflect that somehow..

Please keep in mind that all this is f*** crap not (only) bc of the company

LG

. Its the fact that

carriers

doing their own thing!

This also means that my previous statement about H810 -PR is not true as i had only a 10 firmware of it and so thought its the PR and not the firmware.

OEMs/Carriers (sprint, verizon, etc) use their own GPTs sometimes and as they can change it like under trousers (which they have actually DONE!) this really sucks.

Its also about the carriers that they do not provide official unlock (not LG!) and even when it comes to providing security patches and ROM/Ugpgrades... the carrier is responsible.

So when it comes to ROM flashing the GPT is very important (well THAT was known ofc) but we cannot say a

specific model

has a

specific GPT

.

Its:

a specific model on a specific ROM (bootloader stack) has a specific GPT

.

I think the easiest will be to integrate that as a detection in SALT. Like: "This device is compatible with: xxx"

UPDATE-3:

GPT compatibility info added to SALT v3.1 ! :D

.
[G4 General] sushant_:
Is there any way to unlock F500L bootloader?
[G4 General] steadfasterX:
lol.. sure ANY g4 model. I just need a tester for yours. if you wanna be the first write me a PM.

.
[G4 General] sushant_:
What are the consequences ?

Will my device get bricked permanently.

Actually, I saw that F500L was not unlockable and it belonged to korean carrier.I was unhappy about the news because I have a Moto E(Condor) that is fully unlockable, so I like the rooted device.
[G4 General] steadfasterX:
every F500 is now unlockable.

worst scenario: hard brick. means you need either to use QFIL or much more riskfree a remote connection from me by teamviewer to recover.

Anyways at very first you need a SALT backup as stated for sure.

We cant do that before my vacation starts though. You have to wait until 30th of January.

.