[ROOT] - lafsploit - H918 (any version up to and including 20h) - now n00b friendly

Did this method work for you?

  • Yes

    Votes: 161 81.3%
  • No

    Votes: 18 9.1%
  • No and I lost download mode

    Votes: 12 6.1%
  • No and I have a brick

    Votes: 7 3.5%

  • Total voters
    198
Search This thread

runningnak3d

Recognized Developer
Nov 10, 2010
2,649
7,227
Largo
WARNING
  • This should go without saying, but you MUST have your bootloader unlocked (check OEM UNLOCK in developer options AND fastboot oem unlock).
    If you don't, you WILL brick your phone.
    If you don't know how to FULLY unlock your bootloader -- search. This thread is not here to educate you on unlocking your bootloader.
    If your bootloader isn't unlocked, you will get a RED warning that your phone has been modified, and will refuse to boot.
    If your bootloader IS unlocked, your will have a YELLOW warning even if you haven't modified your phone yet, and your phone will still boot. This is normal!
  • If you use this on any model V20 besides the H918, you will be stuck in a bootloop, and you will not be able to fix it since you will have wiped out download mode!
    There is NO fixing this!
  • You must be on version H91810p or H91810q
  • This is now completely safe. It will either work or it won't, but it can NOT brick your phone if you meet the requirements listed above, and you follow the procedure exactly.
    If it DOES brick your phone, I am not responsible.
  • If you deviate from this procedure, and think: "I can just skip a step, or I can do this on my own Linux install". Don't complain if you brick your phone.
  • This ONLY replaces download mode with TWRP. If you want to root, you can search for how to root. If you don't know how to use TWRP -- search.

PREREQUISITES:
  • If you aren't on 10p or 10q, grab the H918 10p KDZ: here.
    This is NOT a guide for flashing KDZs -- there are plenty of those out there -- search.
  • You need to grab FWUL (version 2.7 or later) and burn it to a USB stick: link
    Even if you have Linux, and you think you can install the dependencies, don't. I know this works from FWUL.
    If you choose to press on in expert mode (using FWUL in a VM, using your own Linux install, using WSL, etc), don't get upset if I don't answer your questions.
  • For Windows you will need Rufus to burn FWUL onto a USB stick.
    If you have questions about FWUL, please ask in the FWUL thread.

Installing TWRP
Again, this will ONLY install TWRP onto download mode. What you do with TWRP when it is done is up to you. Flash Magisk or SuperSU. Flash a ROM, or just make a backup of your phone. It is up to you.
I would suggest flashing TWRP onto recovery as well, otherwise you will need to use the vol up + USB cable method to get to TWRP. There is no key combination to get to download mode.

  • Boot from your FWUL USB stick.
  • Put your phone into download mode. With the phone powered off, hold vol up and plug in the USB cable. You do not need to touch the power button -- the phone will power on and enter download mode.
  • Once booted, login. The password is: linux
  • Double click the LG folder that is on the desktop
  • Double click on LG LAF (runningnak3d) icon and you will be at a terminal prompt.
    The following are the commands that you enter into that terminal. You can copy / paste them if you like.
Code:
git pull
git checkout h918-miscwrte
./step1.sh
When you are told to, pull the USB cable, and the phone will power off. You now have TWRP on your laf partition.

It must be said again, flash TWRP onto recovery so you can easily get to TWRP.

OPTIONAL
If you would like to restore download mode onto your laf partition AFTER you have installed TWRP onto recovery:
This can be done at any time after you are rooted. About the only reason you would want to flash laf back is if you use LG Backup.
TWRP has the ability to backup your phone, so I am not sure why someone would want this (maybe you are more comfortable with it?).
Also, flashing back to 100% unrooted stock can be accomplished by flashing a zip in TWRP, you don't NEED to flash a KDZ, but again, maybe you are more comfortable doing it that way.
The bottom line is TWRP on both laf and recovery is FAR FAR more useful than flashing laf back. You can test new versions of TWRP while keeping your old known working version (for example).


If you are having problems flashing a ROM, ask in the appropriate ROM thread.
If you are having problems with Magisk, ask in the Magisk thread.
If you are having problems with SuperSU, Lineage, or even TWRP itself, ask in the appropriate thread.

This thread is ONLY for problems if TWRP doesn't boot when you are done.

CREDITS:
  • Lekensteyn -- His base work on the G2 / G3 gave me a GREAT headstart!
  • @steadfasterX - He added some real nice features, great guy to bounce ideas off, and just testing crazy ideas because he wasn't afraid to brick his phone :) Also, for FWUL
  • tuxuser - Helping with my lacking in Python
  • @smitel - His original reverse engineering of LG UP. Great inspiration!
  • @me2151 - His original DirtySanta exploit. Without it, the V20 would probably still not be rooted.

-- Brian

XDA:DevDB Information
lafsploit, Tool/Utility for the LG V20

Contributors
runningnak3d
Source Code: https://gitlab.com/runningnak3d/lglaf


Version Information
Status: Stable
Current Stable Version: 1.1
Stable Release Date: 2018-07-15

Created 2018-04-05
Last Updated 2018-07-16
 
Last edited:

Gabe2014

Senior Member
Jan 19, 2014
437
198
Congratulations for this amazing work I been follow your work on your original tread it's amazing !!! I current have the note 8 but I still have a v20 (from what i posting right now lol ) the first was. TMobile and right now I have a Verizon unlock v20 Wich I really enjoying Whit Xposed mode well anyway what I trying to said is you work make me pick up my v20 again and give me some inspiration to learn ... Keep going

UPDATE: I GET A TMOBILE V20 now I have root again, thanks again ?
 
Last edited:

dudeawsome

Senior Member
Nov 30, 2013
1,443
1,568
Congrats been following your work since day 1 man the effort paid off. Thanks one man that took on the whole lg dev team.
 
  • Like
Reactions: runningnak3d

TheLogicalGamer

Senior Member
Nov 14, 2015
306
134
Knoxville
Awesome can't wait to build lineage for the v20! Now that I have a spare device it'll make learning a lot easier. So now I can test on my current daily driver before adding the mods to my v20 builds. I can't even begin to describe how much this means to so many of us in the community! Especially myself.

That said I'll give it a try tomorrow after work assuming I have friday off & l'll report back asap.

If installing python 3 on windows 10 will the default install settings work? Just wanted to double check. & thanks again man. Amazingly awesome work!

Sent from my LG-D851 using XDA Labs

---------- Post added at 01:35 AM ---------- Previous post was at 01:32 AM ----------

Will there ever be a chance for the US998 (US Cellular) ?


He is also working on the locked bootloader devices. I'll let him explain most of the details if he has the time. However if you want to read up on the progress check this thread:

https://xdaforums.com/v20/how-to/laf-download-mode-how-root-t3676011/page92

Sent from my LG-D851 using XDA Labs
 

KAsp3rd

Inactive Recognized Developer
Jan 16, 2011
1,353
2,155
Louisville
WARNING to G5 and G6 users. I need a partition listing before you try this to make sure misc is in the same location. You can brick your phone if misc is in a different location than the V20.

I am splitting this off from the main laf thread because that thread really needs to be cleaned. It was supposed to just be for development, and now it is impossible to find some valuable info :)

I say this is for the H918 only, but it should work on the H830 (G5) and H872 (G6) as well. I don't have those devices, so I can't test it. The H830 has a TWRP build, but the H872 doesn't -- so someone would have to risk using the US997 build.

Anyway, if you aren't feint at heart....

Here is a much more detailed guide that @Zacharee1 put together: link.

Enjoy your now rooted H918...

If this scares anyone, I will make it easier, but for the hardcore people, I wanted to get it out there.

I will clean this up and make it prettier when I have the chance.

-- Brian


Code:
1|lucye:/ $ ls -l /dev/block/platform/soc/624000.ufshc/by-name/
total 0
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 aboot -> /dev/block/sde6
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 abootbak -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 apdp -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 boot -> /dev/block/sde1
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cache -> /dev/block/sda17
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 cdt -> /dev/block/sdd3
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cmnlib -> /dev/block/sde22
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cmnlib64 -> /dev/block/sde24
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cmnlib64bak -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cmnlibbak -> /dev/block/sde23
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 ddr -> /dev/block/sdd1
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 devcfg -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 devcfgbak -> /dev/block/sde17
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 devinfo -> /dev/block/sdb6
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 dip -> /dev/block/sdb5
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 dpo -> /dev/block/sde28
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 drm -> /dev/block/sda4
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 eksst -> /dev/block/sda11
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 encrypt -> /dev/block/sda10
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 eri -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 factory -> /dev/block/sda9
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 fota -> /dev/block/sdb3
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 fsc -> /dev/block/sdf3
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 fsg -> /dev/block/sdb4
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 grow -> /dev/block/sda19
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow2 -> /dev/block/sdb7
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow3 -> /dev/block/sdc3
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow4 -> /dev/block/sdd4
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 grow5 -> /dev/block/sde29
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow6 -> /dev/block/sdf4
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow7 -> /dev/block/sdg2
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 hyp -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 hypbak -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 keymaster -> /dev/block/sde20
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 keymasterbak -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 keystore -> /dev/block/sda14
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 laf -> /dev/block/sda1
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 lafbak -> /dev/block/sda2
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 misc -> /dev/block/sda8
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 modem -> /dev/block/sde18
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 modemst2 -> /dev/block/sdf2
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 mpt -> /dev/block/sda3
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 msadp -> /dev/block/sde27
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 operatorlogging -> /dev/block/sda6
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 persist -> /dev/block/sda15
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 persistent -> /dev/block/sdg1
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 pmic -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 pmicbak -> /dev/block/sde15
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 raw_resources -> /dev/block/sde8
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 raw_resourcesbak -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 rct -> /dev/block/sda12
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 recovery -> /dev/block/sde2
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 recoverybak -> /dev/block/sde3
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 reserve -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 rpm -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 rpmbak -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 sec -> /dev/block/sde19
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 sns -> /dev/block/sda5
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 ssd -> /dev/block/sda13
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 system -> /dev/block/sda16
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 tz -> /dev/block/sde4
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 tzbak -> /dev/block/sde5
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 userdata -> /dev/block/sda18
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 xbl -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 xbl2 -> /dev/block/sdc1
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 xbl2bak -> /dev/block/sdc2
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 xblbak -> /dev/block/sdb2

I am trying to download source to build twrp for the g6 but I am on my backup dsl (762kb/s) which sucks majorly.

If you are in an IRC chan I will be more then happy to join and give you access to my device remotely if need be.
 
  • Like
Reactions: TheDannemand

pyrorob

Senior Member
Oct 19, 2006
1,095
177
42
Hickory, NC
OnePlus 6T
on windows 10, latest insider build, all drivers installed, v20 detected in normal boot, download and fastboot modes. I'm reinstalling ubuntu just in case something weird happened with it..
 

runningnak3d

Recognized Developer
Nov 10, 2010
2,649
7,227
Largo
@KAsp3rd Join #lglaf on irc.freenode.net

What I need is the GPT -- start LBA / end LBA of misc.

You can get that by running ./partitions.py --list

-- Brian
 

SMTB1963

Senior Member
Jul 25, 2016
67
41
Dallas
So after entering Download/LAF Mode and plugging in to computer, I get the following error when running the first command in step 6 of @Zacharee1's guide:

Code:
C:\lglaf>partitions.py --dump laf.img laf
LAF Crypto failed to import!
Traceback (most recent call last):
  File "C:\lglaf\partitions.py", line 459, in <module>
    main()
  File "C:\lglaf\partitions.py", line 406, in main
    comm = lglaf.autodetect_device()
  File "C:\lglaf\lglaf.py", line 441, in autodetect_device
    return USBCommunication()
  File "C:\lglaf\lglaf.py", line 297, in __init__
    custom_match = self._match_device)
  File "C:\Users\SMTB\AppData\Local\Programs\Python\Python36-32\lib\site-packages\usb\core.py", line 1263, in find
    raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available

As I am a total n00b, I have no idea what this means. :p Any help appreciated!
(using Windows Python install)
 

nickland

Senior Member
Dec 3, 2008
69
14
Getting the same backend error. Trying to reinstall just throws up an already installed reply. Windows 8.1

That is, trying to run the ./ cmds and the already installed elements are pyusb and crypt
 

SMTB1963

Senior Member
Jul 25, 2016
67
41
Dallas
You didn't pip install cryptography or PyUSB

-- Brian

Well I did install those. When I try running pip install cryptography/PyUSB again, I get:

Code:
C:\lglaf>pip install cryptography
Requirement already satisfied: cryptography in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages
Requirement already satisfied: idna>=2.1 in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cryptography)
Requirement already satisfied: six>=1.4.1 in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cryptography)
Requirement already satisfied: asn1crypto>=0.21.0 in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cryptography)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cryptography)
Requirement already satisfied: pycparser in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography)

C:\lglaf>pip install PyUSB
Requirement already satisfied: PyUSB in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages
 

runningnak3d

Recognized Developer
Nov 10, 2010
2,649
7,227
Largo
I take it you aren't on Windows 10 so you can't install Ubuntu from the app store?

I can see now why @steadfasterX pushes FWUL (a Linux VM) for things like this. WIndows is such a freaking PITA :)

Hopefully someone that has Windows can help you, otherwise I am going to grab FWUL tomorrow and maybe change the procedure for people that aren't on WIndows 10.

-- Brian
 

pyrorob

Senior Member
Oct 19, 2006
1,095
177
42
Hickory, NC
OnePlus 6T
ok, just tried the whole procedure from start to finish exactly for the second time and am getting the same "usb device not found"
I also tried the non windows 10 method and ended up having the same issue that smtb1963 has, including the laf crypto failed to import message at the top and I do believe that when it says no backend available under usb lib, that these ar basically the same error, no usb communication. I think i am going to try this on a unbuntu virtual box install and see if I get the same error
 

Top Liked Posts

  • There are no posts matching your filters.
  • 127
    WARNING
    • This should go without saying, but you MUST have your bootloader unlocked (check OEM UNLOCK in developer options AND fastboot oem unlock).
      If you don't, you WILL brick your phone.
      If you don't know how to FULLY unlock your bootloader -- search. This thread is not here to educate you on unlocking your bootloader.
      If your bootloader isn't unlocked, you will get a RED warning that your phone has been modified, and will refuse to boot.
      If your bootloader IS unlocked, your will have a YELLOW warning even if you haven't modified your phone yet, and your phone will still boot. This is normal!
    • If you use this on any model V20 besides the H918, you will be stuck in a bootloop, and you will not be able to fix it since you will have wiped out download mode!
      There is NO fixing this!
    • You must be on version H91810p or H91810q
    • This is now completely safe. It will either work or it won't, but it can NOT brick your phone if you meet the requirements listed above, and you follow the procedure exactly.
      If it DOES brick your phone, I am not responsible.
    • If you deviate from this procedure, and think: "I can just skip a step, or I can do this on my own Linux install". Don't complain if you brick your phone.
    • This ONLY replaces download mode with TWRP. If you want to root, you can search for how to root. If you don't know how to use TWRP -- search.

    PREREQUISITES:
    • If you aren't on 10p or 10q, grab the H918 10p KDZ: here.
      This is NOT a guide for flashing KDZs -- there are plenty of those out there -- search.
    • You need to grab FWUL (version 2.7 or later) and burn it to a USB stick: link
      Even if you have Linux, and you think you can install the dependencies, don't. I know this works from FWUL.
      If you choose to press on in expert mode (using FWUL in a VM, using your own Linux install, using WSL, etc), don't get upset if I don't answer your questions.
    • For Windows you will need Rufus to burn FWUL onto a USB stick.
      If you have questions about FWUL, please ask in the FWUL thread.

    Installing TWRP
    Again, this will ONLY install TWRP onto download mode. What you do with TWRP when it is done is up to you. Flash Magisk or SuperSU. Flash a ROM, or just make a backup of your phone. It is up to you.
    I would suggest flashing TWRP onto recovery as well, otherwise you will need to use the vol up + USB cable method to get to TWRP. There is no key combination to get to download mode.

    • Boot from your FWUL USB stick.
    • Put your phone into download mode. With the phone powered off, hold vol up and plug in the USB cable. You do not need to touch the power button -- the phone will power on and enter download mode.
    • Once booted, login. The password is: linux
    • Double click the LG folder that is on the desktop
    • Double click on LG LAF (runningnak3d) icon and you will be at a terminal prompt.
      The following are the commands that you enter into that terminal. You can copy / paste them if you like.
    Code:
    git pull
    git checkout h918-miscwrte
    ./step1.sh
    When you are told to, pull the USB cable, and the phone will power off. You now have TWRP on your laf partition.

    It must be said again, flash TWRP onto recovery so you can easily get to TWRP.

    OPTIONAL
    If you would like to restore download mode onto your laf partition AFTER you have installed TWRP onto recovery:
    This can be done at any time after you are rooted. About the only reason you would want to flash laf back is if you use LG Backup.
    TWRP has the ability to backup your phone, so I am not sure why someone would want this (maybe you are more comfortable with it?).
    Also, flashing back to 100% unrooted stock can be accomplished by flashing a zip in TWRP, you don't NEED to flash a KDZ, but again, maybe you are more comfortable doing it that way.
    The bottom line is TWRP on both laf and recovery is FAR FAR more useful than flashing laf back. You can test new versions of TWRP while keeping your old known working version (for example).


    If you are having problems flashing a ROM, ask in the appropriate ROM thread.
    If you are having problems with Magisk, ask in the Magisk thread.
    If you are having problems with SuperSU, Lineage, or even TWRP itself, ask in the appropriate thread.

    This thread is ONLY for problems if TWRP doesn't boot when you are done.

    CREDITS:
    • Lekensteyn -- His base work on the G2 / G3 gave me a GREAT headstart!
    • @steadfasterX - He added some real nice features, great guy to bounce ideas off, and just testing crazy ideas because he wasn't afraid to brick his phone :) Also, for FWUL
    • tuxuser - Helping with my lacking in Python
    • @smitel - His original reverse engineering of LG UP. Great inspiration!
    • @me2151 - His original DirtySanta exploit. Without it, the V20 would probably still not be rooted.

    -- Brian

    XDA:DevDB Information
    lafsploit, Tool/Utility for the LG V20

    Contributors
    runningnak3d
    Source Code: https://gitlab.com/runningnak3d/lglaf


    Version Information
    Status: Stable
    Current Stable Version: 1.1
    Stable Release Date: 2018-07-15

    Created 2018-04-05
    Last Updated 2018-07-16
    19
    Any idea when the automated version will be available?

    I wanted to have it done today, but I have run out of time. It is coming Soon(c).

    But just so you know, it isn't going to be something like: "Download an app, and click ROOT".

    The final procedure will still require FWUL, but it must be burned onto a USB stick. VMs will not be supported.

    • Boot FWUL
    • login
    • cd programs/lglaf
    • git pull
    • git checkout miscwrte
    • root-h918.sh <twrp.img>
    • Reboot to download mode which will now have TWRP (as long as all the hash checks pass).
    • post-root.sh

    This will flash either the TWRP image that you pass to root-h918.sh or if no image is given, then it will use the image that is in the repo.

    I have added all the hash checking to the Python script, as well as backing up and restoring misc.

    partitions.py --restoremisc now takes 3 parameters: The image your are flashing, the partition you are flashing, and the backup partition to use for the hash check. So you could run:
    Code:
    ./partitions.py --restoremisc twrp.img laf lafbak
    If the backup partition doesn't exist, or isn't big enough, etc. -- then it will let you know.
    If the flash to the backup partition is bad, you get a hash fail.
    If your misc backup hash fails, it aborts.
    If you try to do something like:
    Code:
    ./partitions.py --restoremisc twrp.img laf sec
    or
    Code:
    ./patitions.py --restormisc twrp.img xbl xblbak
    The program will exit and inform you that you would have bricked your phone. If you REALLY want to, then you can pass --yesyesyes and it will gladly blow away your xbl partition with whatever you were trying to write, and brick your phone :)

    The main things that I am adding now, are more error detection / correction (don't want a fat finger to brick your phone), and more debug output.

    There are now lots of progress indicators as well. You know:

    Percentage of misc dumping / hashing / restoring
    Percentage of the backup partition dumping / hashing / restoring

    However, at the end of the day, if you can't do the list at the top of this post -- it will never be made more simple.

    -- Brian
    19
    I have decided not to cheese out and just add a hacky hash check solution. I am doing all the code updates that can:

    1 - make this as safe as flashing with LG UP
    2 - Add KDZ flashing support (complete replacement for LG UP with all the safety checks - for example, it won't be possible to flash an H915 KDZ onto an H910 by default. However, I am adding overrides for all the safety checks).
    3- When complete, have it tested by a small group of users instead of just posting it publicly. Again, I am engineer not a programmer. Programming is an art, and I am not an artist. What I write is usually quick and dirty -- just to get the job done. I didn't understand why there is usually a closed beta program, now I do. It isn't to limit usage of a program, it is in case there are problems that are going to blow up your [insert device here - PC, Phone, Laptop, Router, etc], it will only affect a limited number of people.

    First post updated with the complete manual procedure.

    -- Brian
    13
    Has anyone accepted the h918 Oreo OTA and kept root using lafsploit?

    A flashable zip is coming -- be patient...

    -- Brian
    11
    WHEW! Thanks for the verification. So, all I am going to add for misc then is dump it twice and compare the hash. If it dumps twice in a row with the same hash, then it is a good copy. Again, I have no way to get the hash of something that is already on the phone, so dumping it twice is the only way to be sure .. inefficient, but hey.

    Also, I would highly recommend flashing TWRP back onto laf (of course leaving it on recovery as well). It is much more useful than laf. You will never be in a situation where you go: "Man, I wish I had download mode, but I only have TWRP" :)

    I am real curious what happened to @Zacharee1's misc though. Noise on the bus wouldn't blank out the entire start of the misc dump. Corrupt it, yes, but not zero it out, no.

    I don't think I am going to get this finished tonight -- still working and I need a beer. But, my ex has my son this weekend, so I will have all weekend to work on getting this polished up and finished.

    Thanks so much to everyone that braved their phones and gave me good feedback on what I needed to improve to make this bullet proof.

    To those of you with busted download mode -- looking at you @SJMarty (BTW - thank you VERY much) but anyone else as well, if someone hasn't gotten an update.zip for you by Sunday, I will do it.

    -- Brian