[GUIDE] Full ADB Root, System RW, and DM-VERITY Off for Sprint LG G5! [ZV4]

Honestly Annoying

Senior Member
May 17, 2016
479
853
0
chicago
twitter.com
UPDATE Thanks to @thjubeck for testing this, it seems that this userdebug kernel actually works on all devices running antirollback v0 and running Marshmallow! I only have the Sprint variant, so be careful!!! Enjoy root guys :D

A bit of a disclaimer is that this is root through adb. dm-verity is off and system is rw, so you can install apps as root, get a hotspot hack to work, and anything through a shell but I am having trouble installing SuperSU. Please try yourself though as I am probably doing something wrong! If there are any bugs you have found please post them, as this phone is my backup and not my daily driver.

So okay, here is the guide:

PLEASE MAKE SURE YOU HAVE A WAY TO GO BACK INCASE THINGS GO WRONG. DO NOT ATTEMPT TO ROOT THIS WITHOUT HAVING A KDZ/TOT FOR YOUR DEVICE THAT YOU KNOW YOU CAN FLASH BACK TO. I AM NOT RESPONSIBLE FOR THINGS GOING WRONG.

1. Download this zip
2. Install Terminal Emulator from the Play Store
(This is modified from the V20 bootloader unlock, HUGE thanks to all of those devs for sharing their dirtysanta code with me and allowing me to modify it!)
3. Copy all the files from inside the "dirtysanta-boot" and paste it into your active ADB directory
4. Plug your device into the computer and verify ADB is working. Then;

On Windows, double-click "RUNMEFIRST.bat, DO NOT CLOSE THE LOG WINDOW THAT OPENS, then double-click "Step1.bat"

On Linux/MacOS ("#" Signifies a comment below)
Code:
./RUNMEFIRST.sh
# OR
bash ./RUNMEFIRST.sh
Open a Separate Terminal next to the RUNMEFIRST terminal, then type:
Code:
./Step1.sh
# OR
bash ./Step1.sh
(When you run The sh or Bat files there may be a Permission denied error on 2 files: Flatland and Flatland64. This is normal and nothing to worry about.)

5. Wait for a shell prompt, then type (or copy):
Code:
run-as con
chmod 0777 /storage/emulated/0/*
6. Open Up Terminal Emulator on your phone
Type:
Code:
id
Check if context is "Untrusted_app". If it is then we're good to go!

7. Type into Terminal Emulator:
Code:
applypatch /system/bin/atd /storage/emulated/0/dirtysanta
8. Watch the RUNMEFIRST dialog for when it tells you to run Step2 (we don't have a step 2)
9. Reboot the phone into recovery mode and wipe data again
BOOM! Now the you have a userdebug kernel running on a userdebug system :D Time to turn off dm-verity, otherwise you will have a red triangle on reboot (Your device is corrupt. It cannot be trusted and may not boot) and cannot edit /system.

1. Finish setting up the phone and enable USB Debugging in developer options (you should know how to do this)
2. Plug the phone into your computer, and run these commands
Code:
adb root
adb disable-verity
3. Reboot the phone
4. Run
Code:
adb root
adb shell
mount -o rw,remount,rw /system
Bam. Enjoy your FULL UNLIMITED root shell with system set to rw and dm-verity off!!! Just make sure to type "adb root" before "adb shell"
If you ever want to go back, just flash your stock TOT/KDZ with UPPERCUT and you'll be all good!

BUY ME A PIZZA FOR THE HARD WORK: BTC 197ct1uti4zutJu76bYAW51H8NZ6zXeoEV PayPal: [email protected]

THANKS:
@tungkick for the userdebug boot and helping me with the ZV4 TOTs
@autoprime for UPPERCUT
@me2151 @glitschi667 @EMSpilot @elliwigy for their AMAZING work on the V20 and sharing their code!
 
Last edited:

SilverZero

Senior Member
May 18, 2010
1,523
392
0
I'm assuming this won't work if I'm on nougat, is that right?
Nougat is the latest update (ZV8 I think), this only works on ZV4.

Glad I stayed on ZV3 since July. :)

Happy this is out now. There was some sass going on in another thread but it seems there's still some civility among us. I'll check this out and report anything of note. I'm most interested in a viable hotspot mod, so if I can figure out how to modify the APN settings I'll be quite happy. Will donate as soon as I figure out how.
 

Honestly Annoying

Senior Member
May 17, 2016
479
853
0
chicago
twitter.com
Nougat is the latest update (ZV8 I think), this only works on ZV4.

Glad I stayed on ZV3 since July. :)

Happy this is out now. There was some sass going on in another thread but it seems there's still some civility among us. I'll check this out and report anything of note. I'm most interested in a viable hotspot mod, so if I can figure out how to modify the APN settings I'll be quite happy. Will donate as soon as I figure out how.
Lucky you! Make sure you flash the stock ZV4 TOT before trying this

An unlimited Hotspot is definitely possible. I'm on mobile right now but I'll see what I can do when I get home.
 
  • Like
Reactions: SilverZero

SilverZero

Senior Member
May 18, 2010
1,523
392
0
Lucky you! Make sure you flash the stock ZV4 TOT before trying this

An unlimited Hotspot is definitely possible. I'm on mobile right now but I'll see what I can do when I get home.
I'd be first in line to give this a whirl in the real world but I'm leaving in the morning for a week or so on the road. Maybe I'll be able to do some playing around at the hotel. Hotspot is the brass ring, adblock is a close second. I've survived this long, so hopefully a few days of testing and squashing bugs won't kill me. I do want to be of service to the community if possible. It will be interesting to see how these new developments affect the development of the various G5 variants.

My apologies if I insinuated that I'm at all peeved with anybody working on this device or just offering encouragement. I know there are some conflicting personalities in the mix right now, so I hope everybody benefits and sees the value in what you're potentially onto with this.
 

Honestly Annoying

Senior Member
May 17, 2016
479
853
0
chicago
twitter.com
I'd be first in line to give this a whirl in the real world but I'm leaving in the morning for a week or so on the road. Maybe I'll be able to do some playing around at the hotel. Hotspot is the brass ring, adblock is a close second. I've survived this long, so hopefully a few days of testing and squashing bugs won't kill me. I do want to be of service to the community if possible. It will be interesting to see how these new developments affect the development of the various G5 variants.

My apologies if I insinuated that I'm at all peeved with anybody working on this device or just offering encouragement. I know there are some conflicting personalities in the mix right now, so I hope everybody benefits and sees the value in what you're potentially onto with this.
I will absolutely be in touch with you for an adblock and hotspot hack, PM me your Skype
 
Last edited:
  • Like
Reactions: x7eye1x

Honestly Annoying

Senior Member
May 17, 2016
479
853
0
chicago
twitter.com
I'm on z5, can I still follow this guide on the dot and flash z4?
btw, gratz and great job on your achievement!
Thank you!
Unfortunately ZV5 has antirollback enabled, so you can't downgrade to ZV4. If you really want to try it you can attempt to flash the ZV4 userdebug boot without the userdebug system (just follow the guide past the TOT steps) but I believe it will bootloop. I have not personally tried this so I have no way of saying for sure, but it'll probably bootloop.
 
  • Like
Reactions: dannyboyex

bigid

Member
Mar 14, 2015
14
1
0
Thank you!
Unfortunately ZV5 has antirollback enabled, so you can't downgrade to ZV4. If you really want to try it you can attempt to flash the ZV4 userdebug boot without the userdebug system (just follow the guide past the TOT steps) but I believe it will bootloop. I have not personally tried this so I have no way of saying for sure, but it'll probably bootloop.
so should i just update to nougat now?
 

SilverZero

Senior Member
May 18, 2010
1,523
392
0
EDIT: No items in the Google Drive folder? Am I missing something?

I'm definitely hoping to spend some time testing this out, but it's bad timing that I just got the family out on vacation. Hopefully I'll spend some time tonight or tomorrow, and quite likely after the 25th I'll have some time.

Meanwhile, I've got to figure out a solution to getting ADB working on my MacBook. It's EFI locked so I can't install the full SDK, and my windows VM isn't working either. Since I'm pretty sure I need a windows environment that will be my first hurdle. I wish I could sit down right now and just try it out for the community's benefit, but hopefully we'll get there soon.
 
Last edited:

billa

Senior Member
Mar 30, 2006
716
351
83
Man I feel like buying a G5 just to try this on nougat! Does this also unlock the boot loader or allow twrp to be flashed?
It only works if you still have version ZV4 or lower, so forget about nougat. At best you'll be rooted on ZV4 forever with a wonky system.
It will not unlock the bootloader since it's just a user-debug upgrade for tinkerers, but nonetheless useful to some.