yashsingh1/xdaforums huggingface dataset:
[LG V20 Guides, News, & Discussion] cnjax:
Here's what runningnak3d said recently

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:

./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:

./partitions.py --restoremisc twrp.img laf sec

or

./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
[LG V20 Guides, News, & Discussion] ToshBoss:
In that case could you point me in the direction of a tutorial for flashing KDZs?
[LG V20 Guides, News, & Discussion] runningnak3d:
[MENTION=8566075]ToshBoss[/MENTION]: http://bfy.tw/Hl8K

-- Brian
[LG V20 Guides, News, & Discussion] Nathan4923:
When ever I copy and paste the command

./partitions.py --restoremisc h918-twrp.img lafbak I get timeout errors
[LG V20 Guides, News, & Discussion] runningnak3d:
Use a different USB cable.

-- Brian
[LG V20 Guides, News, & Discussion] Nathan4923:
I have tried 4 different USB cables and I enter the command and it does nothing for awhile then I get timeout

---------- Post added at 02:13 AM ---------- Previous post was at 02:13 AM ----------

I tried all the USB cables I have

---------- Post added at 02:19 AM ---------- Previous post was at 02:13 AM ----------

Is the command supposed to be quick or take time

---------- Post added at 02:24 AM ---------- Previous post was at 02:19 AM ----------

What is laf copy opcode and how do I get it ?
[LG V20 Guides, News, & Discussion] runningnak3d:
What version are you on?
[LG V20 Guides, News, & Discussion] Nathan4923:
Failed to load kernel start modules when I'm booting into fwul

?

---------- Post added at 03:13 AM ---------- Previous post was at 03:13 AM ----------

H91810p

---------- Post added at 03:14 AM ---------- Previous post was at 03:13 AM ----------

I also just now did a while re flash of the kdz and factory reset it and I'm not hopeful it will work

---------- Post added at 03:18 AM ---------- Previous post was at 03:14 AM ----------

I've been trying this ALL DAY.

I got thru all the commands earlier I pulled the battery went to go to twrp and I still had download mode

---------- Post added at 03:19 AM ---------- Previous post was at 03:18 AM ----------

So I made a mistake how don't know i was copying and pasting the commands just like you typed them
[LG V20 Guides, News, & Discussion] Zacharee1:
Just as an FYI, this isn't a chat platform. When creating a post, you should try to include all the information at once, and make edits if there's something you forgot.
[LG V20 Guides, News, & Discussion] Nathan4923:
I do apologize I'm just so frustrated I've never had this much trouble with this type of stuff
[LG V20 Guides, News, & Discussion] Zacharee1:
I can certainly understand frustration. It might be best to take a break: maybe wait for the more complete version.
[LG V20 Guides, News, & Discussion] runningnak3d:
[MENTION=7055541]Zacharee1[/MENTION] Actually, the timeout that he is getting indicates that he isn't on 10p or 10q, so even the nice automated version won't help.

-- Brian
[LG V20 Guides, News, & Discussion] Zacharee1:
Well that's an issue...
[LG V20 Guides, News, & Discussion] Nathan4923:
The time out error is gone after I flashed 10p

But there is no line just

That has lsof 490 mynumber'u' blk etc

I don't even have a 490 it only goes up to 487 although earlier I got thru all the commands but at the end I booted up to download mode and not twrp because earlier I did have a line just like that and my number was 39 so I went with the next command then the rest then pulled my battery out cause it didn't turn off when I took the USB out then I went to download mode but it wasnt twrp

Although there is an error when I'm booting up FWUL ( failed to start load kernel modules )
[LG V20 Guides, News, & Discussion] BatPhone:
So no automated tool?
[LG V20 Guides, News, & Discussion] omariscal1019:
[MENTION=3167089]runningnak3d[/MENTION] Bro just bought a h918 v20 with 10k and arb at 0 what do u think i should do dirty cow or upgrade and do lafsploit.

Edit: its probably a dumb question.lol
[LG V20 Guides, News, & Discussion] Nathan4923:
I wish I had 10k cause you can downgrade to 10j and use dirty COW method to root it and flash twrp

Just down load h91810j kdz and downgrade via lgup then look up how to root h91810j and there will be guides with how to root using dirty cow exploit
[LG V20 Guides, News, & Discussion] Nathan4923:
Your lucky but just follow what I said and you'll be rooted in no time
[LG V20 Guides, News, & Discussion] cnjax:
Read back a couple of pages
[LG V20 Guides, News, & Discussion] Nathan4923:
It just happened again I get thru all the commands and then pull my battery out and boot back to you guessed it download mode I'm getting no errors

And for the last main code I'm typing

(COPY 39,91270,24670208,6) but after this command I'm getting welcome to laf Idk if that's what its supposed to say

(CTRL POFF) after this command I'm getting the same thing

(exit) then I pull out the USB and it doesn't power off social pull the battery then try to boot twrp but its instead download mode
[LG V20 Guides, News, & Discussion] kaidenjames:
So I got this working in a very random order? I started this process a couple nights ago and got TWRP installed. I did a wipe afterwards but forgot to install root. I came back today, saw the updated post and figured out how to get root installed. So now after all that I am rooted again. Every time I boot into TWRP though it reads 0mb on my sd card. Is there a way to fix whatever step(s) I missed to get TWRP working properly?

I need to flash something, but I'm finally getting my phone set up again with new root and I don't want to have to wipe again. Thanks to all involved in finding this fix for us to be rooted again. It's a miracle I actually got this working (mostly)!
[LG V20 Guides, News, & Discussion] Nathan4923:
How did you get it working what message did you get after you typed (COPY your number,91270,2467027,6) I can't even get twrp installed/flashed
[LG V20 Guides, News, & Discussion] kaidenjames:
I actually can't help you, I'm sorry. The instructions I used aren't there anymore. I used the VirtualBox method (prior to needing a USB like this new method states) to get TWRP back on my phone. I then used ADB to install Magisk. But like I said, the instructions have changed, and I don't think my TWRP is working properly. Wish I could help, sorry.
[LG V20 Guides, News, & Discussion] bigcletus:
I flashed the latest version of TWRP to resolve the 0mb storage issue.
[LG V20 Guides, News, & Discussion] kaidenjames:
So I just get the latest TWRP and flash? I do this through ADB correct?
[LG V20 Guides, News, & Discussion] bigcletus:
I think I flashed the .img file through TWRP. You could probably use flashify from the play store too.
[LG V20 Guides, News, & Discussion] runningnak3d:
You are not getting TWRP because you can't follow directions. The COPY command MUST have the bang, exclamation point, or whatever it is called in your language.

It is !COPY not just COPY

It is !CTRL POFF not CTRL POFF

If you go back and read the directions, I make that very clear.

Please tell me how I could make more clear.

If you can't follow these instructions, you are going to end up damaging your phone just by having root and not following some future instructions.

-- Brian.
[LG V20 Guides, News, & Discussion] runningnak3d:
Actually, you don't need to upgrade to use lafsploit. The 10k firmware has COPY. However, all current ROMs need the new firmware.

At the end of the day, go with whichever method you are more comfortable with. If you read the DirtySanta instructions, they are no more or less difficult than this.

-- Brian
[LG V20 Guides, News, & Discussion] omariscal1019:
Oh ok thanks bro
[LG V20 Guides, News, & Discussion] whojabacod:
Still getting timeout on the final step... The !COPY FD XXX XXX everything matches and works up until that point.. boutaa throw this phone in the garbage
[LG V20 Guides, News, & Discussion] runningnak3d:
[MENTION=2486049]whojabacod[/MENTION] What is your FD number? Paste the entire !COPY command that you are using.

-- Brian
[LG V20 Guides, News, & Discussion] whojabacod:
Mine is 39

---------- Post added at 01:27 PM ---------- Previous post was at 01:27 PM ----------

I was just referencing the point when it gets stuck. I put it in correct
[LG V20 Guides, News, & Discussion] whojabacod:
Here is what came up exactly
[LG V20 Guides, News, & Discussion] runningnak3d:
You are not on 10p or 10q. Flash the 10p KDZ.

-- Brian
[LG V20 Guides, News, & Discussion] Nathan4923:
Is it safe to flash the official lineageos 14.1?
[LG V20 Guides, News, & Discussion] runningnak3d:
Did you reboot into your current OS as was stated in the instructions?

If so, you can flash whatever you want.

-- Brian
[LG V20 Guides, News, & Discussion] Nathan4923:
Wait what would happen and if I didn't boot into the os and just went to flashing ?
[LG V20 Guides, News, & Discussion] runningnak3d:
Probably nothing, but if you do, don't complain if something goes wrong.

These instructions were meant to be followed to the letter. You want to deviate, then don't blame the instructions.

-- Brian
[LG V20 Guides, News, & Discussion] BatPhone:
I haven't done so with H918 yet, but with a rooted H910 I have and I kinda regret it. Lineage is probably the best overall rom out there for rooted phones (in terms of consistent development and bug fixing) but the V20 is not their focus. And probably rightly so, it's a weird phone with different builds and odd stuff/features. That said, I'm planning on changing to the SuperV20 next because it's focused solely on the V20 and keeps features unique to the phone. Perhaps at some point (and I really hope so) Lineage catches up and supports the second screen and what not, but till then I would go Super V20 + mk2000 kernal.
[LG V20 Guides, News, & Discussion] Nathan4923:
I booted up as the instructions said I then went back to twrp and wiped system, cache, delvik cache and internal storage.

I then flash lineage and when I reboot after the lg splash screen my screen is black and is flickering on and off

So to test if I did something wrong I went and flashed superv20 and it booted so the error would be lineages right?
[LG V20 Guides, News, & Discussion] runningnak3d:
14.1 will not work with the new firmware. 15.1 ARB 1 version will.

-- Brian
[LG V20 Guides, News, & Discussion] TheDannemand:
[MENTION=6625988]Nathan4923[/MENTION]: I'm on V30, don't have firsthand V20 experience. But I do remember reading other posts in this thread about problems with Lineage on V20. Start reading from the post linked below and the next few pages.

https://xdaforums.com/showthread.php?p=76170129

I just searched the thread for Lineage and they came right up.

Edit: Oh, Brian beat me to it. There you go, that's the problem.
[LG V20 Guides, News, & Discussion] Nathan4923:
OK probably stupid question but would I be able to use twrp to flash h91810j

Or would that make my phone a paper weight

It seems lineage isn't supported with bootloaders after 10j
[LG V20 Guides, News, & Discussion] runningnak3d:
Flash 10k or lower and you will have a brick.
[LG V20 Guides, News, & Discussion] runningnak3d:
I hit my limit on thanks a while ago, so I will just have to say it instead of thumbing it :) [MENTION=7055541]Zacharee1[/MENTION]

-- Brian
[LG V20 Guides, News, & Discussion] karmacoma7:
Thank you for your work, Brian. Been reading the LAF thread like a good detective book :)

But before I jump into uncharted waters, need some help.

I am on F800L with 10t with root TWRP installed.

( OTA fails, since recovery is replaced with TWRP and because of SuperSU)

So now, if I want to have root with the latest FW I have to get back to stock ( only one 10i KDZ is available for F800X)

I should:

1) go o stock 10i

2)update it to the latest FW via OTA

and

then follow the steps mentioned here ?

The engineering boot is rewritten when the phone goes to stock, so after flashing stock I will have to flash the engineering boot again, right ?
[LG V20 Guides, News, & Discussion] runningnak3d:
No, this is ONLY for the H918 for now. It will not work on any other model yet.

-- Brian
[LG V20 Guides, News, & Discussion] SJMarty:
Is there any potential for bricking by testing the process with 10t?
[LG V20 Guides, News, & Discussion] runningnak3d:
No, have at it, but it won't work. I have checked 10s and 10t laf and they pulled the COPY opcode, you will just get a timeout when it tries to copy the partition.

-- Brian
[LG V20 Guides, News, & Discussion] SMTB1963:
OK, I managed to flash the laf partition for 10p using patched LGUP- at least I think it worked (no errors popped up and phone rebooted OK). But running "./partitions.py --dump laf.img laf" returns

smtb@Ryzen1 ~/lglaf $ ./partitions.py --dump laf.img laf
Traceback (most recent call last):
File "./partitions.py", line 459, in <module>
main()
File "./partitions.py", line 406, in main
comm = lglaf.autodetect_device()
File "/home/smtb/lglaf/lglaf.py", line 441, in autodetect_device
return USBCommunication()
File "/home/smtb/lglaf/lglaf.py", line 312, in __init__
current_cfg = self.usbdev.get_active_configuration()
File "/home/smtb/.local/lib/python3.5/site-packages/usb/core.py", line 875, in get_active_configuration
return self._ctx.get_active_configuration(self)
File "/home/smtb/.local/lib/python3.5/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/home/smtb/.local/lib/python3.5/site-packages/usb/core.py", line 236, in get_active_configuration
self.managed_open()
File "/home/smtb/.local/lib/python3.5/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/home/smtb/.local/lib/python3.5/site-packages/usb/core.py", line 120, in managed_open
self.handle = self.backend.open_device(self.dev)
File "/home/smtb/.local/lib/python3.5/site-packages/usb/backend/libusb1.py", line 786, in open_device
return _DeviceHandle(dev)
File "/home/smtb/.local/lib/python3.5/site-packages/usb/backend/libusb1.py", line 643, in __init__
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File "/home/smtb/.local/lib/python3.5/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

This is on updated Mint 18 system with all dependencies installed (AFAICT).
[LG V20 Guides, News, & Discussion] runningnak3d:
You don't have permissions to talk to the USB device. Prefix all commands with sudo, so: sudo ./partitions.py --dump laf.img laf

-- Brian
[LG V20 Guides, News, & Discussion] SJMarty:
Ah, nevermind. I didn't realize you had checked already. I thought I saw in the other thread that it was not known yet. I'll roll back.
[LG V20 Guides, News, & Discussion] offremike0887:
Ok, I followed every step and installed everything ubuntu related I was supposed to install but I'm stuck at the "git checkout h918-miscwrte //for the TMO V20" command. I keep getting "fatal: //for: '//for' is outside of repository". Is there any solution for that?

I attached a screenshot.
[LG V20 Guides, News, & Discussion] runningnak3d:
It is just: git checkout h918-miscwrte

the // for the TMO V20 was a comment.

-- Brian
[LG V20 Guides, News, & Discussion] Zacharee1:
Don't copy the // and what's after
[LG V20 Guides, News, & Discussion] offremike0887:
Perfect, now I get the USB Device Not Found error when I try to partition.

I've unlocked OEM and checked to make sure it said the bootloader was unlocked.

I installed the LG Universal Drivers

I also installed Android Studio to make sure I wasn't missing anything

I also gave my phone access to the computer.

I took out the battery, held the up button and plugged in the USB to download mode.

I've attached a screenshot of what I see. Let me know if it's correct or not.
[LG V20 Guides, News, & Discussion] runningnak3d:
Does device manager see your phone?

-- Brian
[LG V20 Guides, News, & Discussion] BadToThePhone:
Once the Windows process is updated can someone please upload a video or picture tutorial for the h918? Thanks for this. Everyone's hard work is really appreciated.
[LG V20 Guides, News, & Discussion] offremike0887:
When my phone is on or under download mode?

It sees it when it's on but I can recheck for download mode. Is there a command that can check that?

---------- Post added at 06:21 PM ---------- Previous post was at 06:07 PM ----------

I don't know if this helps but whenever I use fastboot/adb to reboot into download mode, it just restarts the phone, but it allows me the ability to get into fastboot mode if the phone is on or allows me to access certain things while in fastboot. So I'm unsure why it won't reboot into download mode.
[LG V20 Guides, News, & Discussion] runningnak3d:
In download mode, does LG UP see your phone? If so, then you have the drivers installed. If that is the case, someone that has Windows will have to help you.

I would recommend download this: FWUL. It is a customized Linux distro specifically for working with LG phones.

You can run it in a VM, or burn the ISO to a USB stick and boot from that.

-- Brian
[LG V20 Guides, News, & Discussion] TheDannemand:
Did you read the guide written by [MENTION=7055541]Zacharee1[/MENTION]? It really is excellent and easy to understand. Early kinks in the procedure aside, I don't see how a video will make it any easier: You'll still have to install Ubuntu and/or Python and it's dependables and enter the commands. I'd think anybody who can deal with that can also understand the guide.

Edit: And just so you know, I'm a Windows guy too, I don't know Linux at all. Of course I hate Microsoft and Windows as much as everybody else, just never enough to do anything about it. Plus I use software that only exists for Windows. (And no, I didn't mean to say I hate everybody else as much as I hate Microsoft. You all know what I meant ;) )
[LG V20 Guides, News, & Discussion] runningnak3d:
OK, to make things easier on you guys, but also me, I am downloading a copy of FWUL that I am going to customize specifically for this.

You will just have to install VirtualBox, and download the image when I am done. I will even script it so all you have to do is type: root_h918.sh and everything will be done for you. Even though I don't have Windows, I will have this fully tested before I post the link since it is a VM, and a VM is a VM :)

Feel free to continue to use the instructions that are posted for now -- they work, but this will be a LOT easier.

-- Brian
[LG V20 Guides, News, & Discussion] dimm0k:
so technically one can always downgrade to 10s to apply this provided ARB stays at 1 for future updates?
[LG V20 Guides, News, & Discussion] SMTB1963:
LOL! Yeah, I'm a n00b alright. Can you tell? :D

So the scripts ran successfully, and I now have twrp installed on laf. When twrp launches, I'm presented with a dialogue titled

Mount

Decrypt Data

and asking me for a password. So my next n00b question is: What do I enter here? (If I hit cancel and try to install anything, I keep getting "Unable to Mount Storage")

:confused:
[LG V20 Guides, News, & Discussion] Nathan4923:
I followed all the steps along with restoring my misc.img but I don't have my Mac address or my S/N is there a way I can fix this?
[LG V20 Guides, News, & Discussion] cnjax:
You lost your Mac address when flashed lineage one of the numerous issues with lineage. Search that thread for a possible fix. If you were smart you should have done a full backup before flashing lineage
[LG V20 Guides, News, & Discussion] runningnak3d:
[MENTION=4201835]cnjax[/MENTION] Don't suppose you live in the Tampa, St. Pete area of Florida. If so, I would buy you a beer.

It is amazing, just how much people just don't want to read / research before doing something that drastically changes their phone.

I kinda understand why the OEMs put the security measures in place.

Customer -> "Umm, hey LG, I didn't read the full instructions, and I am getting this flashing thing on my phone, and I can't make calls"

LG -> "What OS are you running?"

Customer -> "I have no idea, my phone won't boot"

LG -> "???????????????????"

*SMFH*

-- Brian
[LG V20 Guides, News, & Discussion] BatPhone:
Anyone have a mirror for FWUL? Android File Host is having issues today.
[LG V20 Guides, News, & Discussion] Nathan4923:
In my defense I usually always do a backup first but I was impatient seeing I've had this phone for awhile and I really wanted aosp so yes I made the mistake of not backing up and there is no thread for the lineageos I got it from the website.

Is there any way I can restore it from the misc.img and get my info back
[LG V20 Guides, News, & Discussion] cnjax:
I'm in Jacksonville. Agree with you ? I see it on here almost daily. That's the problem with the recent generations they all want instant gratisfaction

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

If the img is from one of your backups then yes, if you flash it from somewhere else it won't be your information
[LG V20 Guides, News, & Discussion] runningnak3d:
If you still have the misc.img then just follow the steps to restore it. If you don't, then search. There are instructions on how to hexedit those values back onto misc.

-- Brian
[LG V20 Guides, News, & Discussion] Nathan4923:
I figured it out now I'm about to see if it restored correctly

---------- Post added at 05:38 PM ---------- Previous post was at 05:21 PM ----------

Runningnak3d I'm sorry for my stupidity I figured out man I'm sorry for being annoying now I feel retarded actually realizing how easy it is
[LG V20 Guides, News, & Discussion] jcpowell:
My greatest fear at this point...

Several novice users complain until Dev decides it's no longer worth it.

Be grateful this method exists, follow directions and take your time. Learn the terminal ffs.
[LG V20 Guides, News, & Discussion] BatPhone:
Couple questions:

You must have a version of laf that has the COPY opcode. << Not sure what this means, could someone clarify?

If you are on 10p or 10q you are good to go. If you are on 10r or later, then you need to flash the ENTIRE KDZ <<I'm assuming flash with LG UP?
[LG V20 Guides, News, & Discussion] SJMarty:
You need to be on 10p to use this method. If you're not, download the 10p KDZ from the link in the first post and yes, flash with LGUP.