Root & Install TWRP H830 (20A) (Nougat) LG G5. Hard Recowvery Method

bassmek2

Member
Jan 15, 2014
22
3
0
how long should it

Hi guys, I didnt have much luck with the Easy Recowvery method on my G5 (20A)
Sooo, i thought i'd share with you, (what i like to call) Hard Recowvery method.
This is the most effective way i've rooted & installed TWRP my H830 on 7.0 (Nougat)


First lets download the neccessary recowvery files located here (Put them all in a folder): https://build.nethunter.com/android-tools/dirtycow/arm64/
Make sure you have the latest twrp for your phone: https://twrp.me/devices/lgg5h830.html
Latest Verity zip: https://build.nethunter.com/android-tools/no-verity-opt-encrypt/
Latest SuperSU: https://download.chainfire.eu/1021/SuperSU/SR3-SuperSU-v2.79-SR3-20170114223742.zip
---
Shift+Open Command window in Recowvery folder
Note: Use app_process32 on 32-bit targets.
once in cmd window from your recowvery folder follow these steps:

---
adb push dirtycow /data/local/tmp
adb push recowvery-applypatch /data/local/tmp
adb push recowvery-app_process64 /data/local/tmp
adb push recowvery-run-as /data/local/tmp

adb shell

$ cd /data/local/tmp
$ chmod 0777 *
$ ./dirtycow /system/bin/applypatch recowvery-applypatch
"<wait for completion>"
$ ./dirtycow /system/bin/app_process64 recowvery-app_process64
"<wait for completion, your phone will look like it's crashing>"
$ exit

adb logcat -s recowvery
"<wait for it to tell you it was successful>"
"[CTRL+C]"

adb shell reboot recovery
"<wait for phone to boot up again, your recovery will be reflashed to stock>"

adb shell

$ getenforce
"<it should say Permissive, adjust source and build for your device!>"

$ cd /data/local/tmp
$ ./dirtycow /system/bin/run-as recowvery-run-as
$ run-as exec ./recowvery-applypatch boot
"<wait for it to flash your boot image this time>"

$ run-as su

(You need to rename the twrp img to "twrp.img" and put in the root of your internal storage, OR you can use this adb push command. The next two steps wont be neccessary if already done so.)

adb push twrp-3.0.2-x-xxxx.img /sdcard/twrp.img
adb shell

run-as exec dd if=/sdcard/twrp.img of=/dev/block/bootdevice/by-name/recovery
"<wait for it to complete>"
$ reboot recovery
---
You should be in TWRP now,
flash supersu and the verity 4.1 zips. [Format Data] will remove internal storage encryption. so back up everything you need to with nandroid. lg backup, or titanium. (So i saw that they have updated verity zips but i just used 4.1)
I prefer lg backup, its easiest.
After you format data reflash supersu and verity zips for the hell of it. (you dont have to i dont think but i just did anyway)
Now just reboot, & enjoy :)

This isnt a method i created, i got it from this thread. and made the steps i felt were neccessary.

https://forum.xda-developers.com/v20/development/h918-recowvery-unlock-v20-root-shell-t3490594
how long should it take when i input adb logcat -s recowvery? after i do this line it says
---------- beginning of system
---------- beginning of main

then it just stops there nothing happens and never says its done what am i doing wrong
 

bassmek2

Member
Jan 15, 2014
22
3
0
Can you please help me ?!?

Just use the Automagically thread a few below this one. You have to be on 20A for it to work. I used that method and it worked on the first try. Now I'm on 20C and I'm rooted as well. This way is way too complicated.
IVE TRIED THIS AND ANOTHER METHOD BUT EVERYTIME I GET TO THE PART WHERE I HAVE TO RUN this line adb logcat -s recowvery it starts does two lines andjust stops on
---------- beginning system
---------- beginning main

then hangs here any suggestions do im running 20c or do i have to downgrade to 20a

---------- Post added at 02:06 AM ---------- Previous post was at 02:03 AM ----------

I have this same problem. Did you figure out the issue?
Are you on 20a or c?
 
  • Like
Reactions: djerick3

djerick3

Senior Member
Jan 25, 2015
409
156
0
Point Pleasant Boro
IVE TRIED THIS AND ANOTHER METHOD BUT EVERYTIME I GET TO THE PART WHERE I HAVE TO RUN this line adb logcat -s recowvery it starts does two lines andjust stops on
---------- beginning system
---------- beginning main

then hangs here any suggestions do im running 20c or do i have to downgrade to 20a

---------- Post added at 02:06 AM ---------- Previous post was at 02:03 AM ----------



Are you on 20a or c?
You have to downgrade to 20a
 

bassmek2

Member
Jan 15, 2014
22
3
0
I have uppercut lgup LG flash tool I just couldn't find a lex but last night I finally found one that worked the others a had wouldn't let me downgrade it would stop on 11% and say something. I was only able to install 20c and it says in the thread somewhere that it would work with 20c but doesn't. Well thanx for your help I got everything up and running
 

igotroot

Senior Member
Dec 4, 2010
1,253
157
0
I have uppercut lgup LG flash tool I just couldn't find a lex but last night I finally found one that worked the others a had wouldn't let me downgrade it would stop on 11% and say something. I was only able to install 20c and it says in the thread somewhere that it would work with 20c but doesn't. Well thanx for your help I got everything up and running
Ok so what did you have originally?

My phone's bootloader is unlocked and I'm on 20 C however when I flashed the 20c from 20A upgrade, my twrp skipped the flashing of the Super SU file. So I have an unlocked bootloader with 20c and no root. Would what you did get me root again?
 

bassmek2

Member
Jan 15, 2014
22
3
0
Ok so what did you have originally?

My phone's bootloader is unlocked and I'm on 20 C however when I flashed the 20c from 20A upgrade, my twrp skipped the flashing of the Super SU file. So I have an unlocked bootloader with 20c and no root. Would what you did get me root again?
i would flash back to 20a again get root then look for a flashable zip with root to upgrade to any of the higher roms i know there is some out there if u flash rom thats not rooted u lose root and im not sure if anyone has made anything to root the later roms yet
 

dolst

Member
Mar 25, 2009
7
1
0
Richmond, VA
Mine was updated by T-Mobile's OTA thing so it was at 20C when I finally tried to root. That didn't work of course, but I found the stock 20A ROM at this thread and flashed it back. Then I used this thread's method and it worked like a champ!

I did have to tweak the method a bit. The SuperSU and no-verity zip files were in the /sdcard (internal storage) folder, but when I booted into TWRP it couldn't see them because it was unable to mount the encrypted partition. I put the files on an actual SD card but since I had popped out the one that was already in there, apparently TWRP didn't remount it automatically. I couldn't figure out which block device it was, so I went into TWRP's terminal and just typed reboot recovery to bring TWRP back up. This time it mounted the external SD card and I was able to load SuperSU and no-verity and continue the process.

I now have a rooted G5 and I'm about to rip out all the T-Mobile bloatware, etc. Thanks a bunch for this thread! Surf Wisely.


Edit: Using SuperSU binary I was unable to run Snapchat! SafetyNet test failed. Fairly sure it's related.
However, I reflashed stock 20A and reran ditycow. This time, I installed the latest Magisk via TWRP instead of SuperSU. Fully rooted now, been using it for a few days, able to run Snapchat and even Pokemon Go! (Maybe I'll get around to playing it sometime.) Pokemon Go was not possible with my rooted G3.

Anyway, if anyone using this method has encountered the problems I have, consider Magisk instead of SuperSU. Otherwise, this method is solid!
 
Last edited:

Mikeyy233

Senior Member
May 19, 2015
139
6
0
um im stuck on this part

Welcome to recowvery! (run-as)
------------
Current uid: 0
We have root access!
------------
Executing: 'dd' with 2 arguments

dd: /sdcard/twrp.img: No such file or directory
 
Last edited:

arihant96

New member
Aug 4, 2014
2
0
0
Hi guys, I didnt have much luck with the Easy Recowvery method on my G5 (20A)
Sooo, i thought i'd share with you, (what i like to call) Hard Recowvery method.
This is the most effective way i've rooted & installed TWRP my H830 on 7.0 (Nougat)


First lets download the neccessary recowvery files located here (Put them all in a folder): https://build.nethunter.com/android-tools/dirtycow/arm64/
Make sure you have the latest twrp for your phone: https://twrp.me/devices/lgg5h830.html
Latest Verity zip: https://build.nethunter.com/android-tools/no-verity-opt-encrypt/
Latest SuperSU: https://download.chainfire.eu/1021/SuperSU/SR3-SuperSU-v2.79-SR3-20170114223742.zip
---
Shift+Open Command window in Recowvery folder
Note: Use app_process32 on 32-bit targets.
once in cmd window from your recowvery folder follow these steps:

---
adb push dirtycow /data/local/tmp
adb push recowvery-applypatch /data/local/tmp
adb push recowvery-app_process64 /data/local/tmp
adb push recowvery-run-as /data/local/tmp

adb shell

$ cd /data/local/tmp
$ chmod 0777 *
$ ./dirtycow /system/bin/applypatch recowvery-applypatch
"<wait for completion>"
$ ./dirtycow /system/bin/app_process64 recowvery-app_process64
"<wait for completion, your phone will look like it's crashing>"
$ exit

adb logcat -s recowvery
"<wait for it to tell you it was successful>"
"[CTRL+C]"

adb shell reboot recovery
"<wait for phone to boot up again, your recovery will be reflashed to stock>"

adb shell

$ getenforce
"<it should say Permissive, adjust source and build for your device!>"

$ cd /data/local/tmp
$ ./dirtycow /system/bin/run-as recowvery-run-as
$ run-as exec ./recowvery-applypatch boot
"<wait for it to flash your boot image this time>"

$ run-as su

(You need to rename the twrp img to "twrp.img" and put in the root of your internal storage, OR you can use this adb push command. The next two steps wont be neccessary if already done so.)

adb push twrp-3.0.2-x-xxxx.img /sdcard/twrp.img
adb shell

run-as exec dd if=/sdcard/twrp.img of=/dev/block/bootdevice/by-name/recovery
"<wait for it to complete>"
$ reboot recovery
---
You should be in TWRP now,
flash supersu and the verity 4.1 zips. [Format Data] will remove internal storage encryption. so back up everything you need to with nandroid. lg backup, or titanium. (So i saw that they have updated verity zips but i just used 4.1)
I prefer lg backup, its easiest.
After you format data reflash supersu and verity zips for the hell of it. (you dont have to i dont think but i just did anyway)
Now just reboot, & enjoy :)

This isnt a method i created, i got it from this thread. and made the steps i felt were neccessary.

https://forum.xda-developers.com/v20/development/h918-recowvery-unlock-v20-root-shell-t3490594
hey this method worked for me and now i have twrp ... but i made a little mistake .. i flashed the H850 twrp file but i have a Tmobile H830 ... although it works fine and i was able to flash fulmics rom .... but now i tried to flash the lineage os rom its says in twrp that my device is H850 .. so when i flashed H850 version of lineage os it goes into bootloop ... basically i guess now roms recongnizes my device as H850 (i guess bcs of twrp)
while i need to flash h830 versions of roms (which twrp dont allow it ) .... can anybody tell me how i can flash the twrp for tmobile on my device ?
 

Mo3bium

Member
Sep 13, 2015
24
3
0
well I'm glad that I found this thread, but I don't really have much knowledge of what I need to do after where Ive gotten, but its on this thread. Of that I am sure. Istarted with 20i and assumed that I could simply unlock my bootloader then use up with a tot that had root and twrp.. nope... so the flash failed midway in and the phone would not let me back in- boot looped , I didn't have a proper tot or gdz to get me back because I couldn't find one then I saw the 20a file and poof! I'm up again, I have tried downloaded soo many and none work or are only hosting partial files. Anyays I tried using the most recent twrp I could find 3.2.1 dropped it into the fastboot(renamed) and loaded it in, it started then it failed(I just found the one I think I need (3.02 but lost the page with the instructions how to). I tried several things in hopes that it would but nope... So why did it fail? I know I unlocked the boot loader because every time I reboot I get the big ass caution screen now that I'm not wearing a condom; that and the oem and usb boxes are greyed out in the permanent on position.. Anyways, I really don't know if I have the skills/understanding to do all of this -- long way method. It looks miserably daunting. so would anyone actually be interested in giving me a hand and not a finger? :) or an actual working link for a 20a tot with boot and twrp? well let me know... thanks in advance. - J
 
Last edited:

djerick3

Senior Member
Jan 25, 2015
409
156
0
Point Pleasant Boro
well I'm glad that I found this thread, but I don't really have much knowledge of what I need to do after where Ive gotten, but its on this thread. Of that I am sure. Istarted with 20i and assumed that I could simply unlock my bootloader then use up with a tot that had root and twrp.. nope... so the flash failed midway in and the phone would not let me back in- boot looped , I didn't have a proper tot or gdz to get me back because I couldn't find one then I saw the 20a file and poof! I'm up again, I have tried downloaded soo many and none work or are only hosting partial files. Anyays I tried using the most recent twrp I could find 3.2.1 dropped it into the fastboot(renamed) and loaded it in, it started then it failed(I just found the one I think I need (3.02 but lost the page with the instructions how to). I tried several things in hopes that it would but nope... So why did it fail? I know I unlocked the boot loader because every time I reboot I get the big ass caution screen now that I'm not wearing a condom; that and the oem and usb boxes are greyed out in the permanent on position.. Anyways, I really don't know if I have the skills/understanding to do all of this -- long way method. It looks miserably daunting. so would anyone actually be interested in giving me a hand and not a finger? :) or an actual working link for a 20a tot with boot and twrp? well let me know... thanks in advance. - J
Hello, you don't get a copy of 20a with root and twrp. You have to downgrade to the 20a using uppercut. Then you use the hard recowvery method to root and install twrp. What issues are having with the process?
 

Mo3bium

Member
Sep 13, 2015
24
3
0
thanks captain obvious :)

Hello, you don't get a copy of 20a with root and twrp. You have to downgrade to the 20a using uppercut. Then you use the hard recowvery method to root and install twrp. What issues are having with the process?
Well thanks for respondin and no you misunderstand, I don't need a recap of what I have already done. I got to 20a already and was happy that I did : originally I was (bootlooped), because I assumed rooting would be far simpler and was responding to his post. I was simply asking if someone had made a tot with root for it yet (or ever) ;) ?

My trying to flash root failed using the 10a and 10d with up. I found this thread after finding "autoprime's 20a using uppercut" thread to get out of the loop - this saved the phone so yay for me :D. I am aware now of the sequence, my problem is that putting twrp in fails at install every time in fastboot (the links were dead for certain files and I had to scour the internet to find them). I tried 3.0.2 3.0.2.1 and 3.2.1 of twrp and all of them fail. and yes I have relocked the bootloader and unlocked it 3 times to make sure it wasn't me messing it up I was going to try the dirty cow method but using fastboot to load recovery fails every single time. (short version) -adb says installing.... failed and res I re-enabled permissions after every lock/unlock.


That and another big issue for me (and this isn't new to me) - all of my devices do this for some reason? (just not this bad) most datum gets randomly wiped from the sd card. whether I use an 8gb, 32gb or a 64 gb sd when I load one up (going fast, very slowly or even 1 folder at a time ) after 7gb's or so, files start disappearing (4 times for this one with the 64gb). I have spent more than 60 hours screwing with it. I'm not doing anymore. next time I get one with 128gb built in like my s6 active's 64gb I never had so many issues with my xperia play and I used a 64 gb sd there, man I miss that. If only he had the power to play dolphin. :( anyways cheers.
 
  • Like
Reactions: djerick3

djerick3

Senior Member
Jan 25, 2015
409
156
0
Point Pleasant Boro
Well thanks for respondin and no you misunderstand, I don't need a recap of what I have already done. I got to 20a already and was happy that I did : originally I was (bootlooped), because I assumed rooting would be far simpler and was responding to his post. I was simply asking if someone had made a tot with root for it yet (or ever) ;) ?

My trying to flash root failed using the 10a and 10d with up. I found this thread after finding "autoprime's 20a using uppercut" thread to get out of the loop - this saved the phone so yay for me :D. I am aware now of the sequence, my problem is that putting twrp in fails at install every time in fastboot (the links were dead for certain files and I had to scour the internet to find them). I tried 3.0.2 3.0.2.1 and 3.2.1 of twrp and all of them fail. and yes I have relocked the bootloader and unlocked it 3 times to make sure it wasn't me messing it up I was going to try the dirty cow method but using fastboot to load recovery fails every single time. (short version) -adb says installing.... failed and res I re-enabled permissions after every lock/unlock.


That and another big issue for me (and this isn't new to me) - all of my devices do this for some reason? (just not this bad) most datum gets randomly wiped from the sd card. whether I use an 8gb, 32gb or a 64 gb sd when I load one up (going fast, very slowly or even 1 folder at a time ) after 7gb's or so, files start disappearing (4 times for this one with the 64gb). I have spent more than 60 hours screwing with it. I'm not doing anymore. next time I get one with 128gb built in like my s6 active's 64gb I never had so many issues with my xperia play and I used a 64 gb sd there, man I miss that. If only he had the power to play dolphin. :( anyways cheers.

Dumb question but are you renaming twrp.img to recovery.img?
 
  • Like
Reactions: Mo3bium