yashsingh1/xdaforums huggingface dataset:
[G4 General] divineBliss:
Got my VS986 13B rooted too - Xposed works with 13B too, just be sure to install framework file 22, as 23 will not work with 13B. Thanks to OP for terrific post! :) .
[G4 General] woozzy101:
Any possible way you can share your rooted 13B image?

So for I ran the Xposed uninstaller, flashed 11a KDZ to go back to stock. Got 13B OTA update. Factory reset phone and then made a stock 13B image of my phone. But I do not have ubuntu and have never used it which i guess people use to inject root. Is it possible to inject root into an image using windows?

Let me know, thanks! :)

Edit: Thanks OP, i followed Step 1 and it worked great to get an image of my phone. But now to figure out how to install a Virtual Machine and Ubuntu on Windows 10. Never done either, so new territory :(
[G4 General] divineBliss:
Just grab an existing 13B rooted image that's been shared (several floating around here), then follow the Verizon LG G4 Xposed instructions to install Xposed - very easy.
[G4 General] woozzy101:
Did you use the debloated rooted image? I'm trying to look for a stock one with everything. Then I'll freeze/uninstall anything I don't want.

Thanks for the reply, I really want root working on 13b, but can live without it since it fixed the screen touch issues and a few others.

Edit: NVM, looked in the Verizon forums and saw jkatt sharing a 13b image. My XDA searching skills failed me this morning. Must get some coffee, been a long morning :)
[G4 General] divineBliss:
No, I spent hours injecting my own - never used Ubuntu before that.

Being nice and posting the jkatt link for others ........... http://xdaforums.com/verizon-g4/general/vs98613b-saved-image-rooted-t3258794/
[G4 General] woozzy101:
I decided to try to figure out how to inject my own root as well. Took a few hours because I couldn't get it to boot from USB, but finally go it on another computer and root working! Thank you OP and everyone else :)
[G4 General] eplgr:
In case someone is interested: end story of this post #404

Flashed the original system image in order to unroot & install an OTA successfully, everything was super fast and easy, had no problems at all.

H815AR.

Again, thanks.
[G4 General] woozzy101:
My phone had been working great for hours, but plugged into computer to put something on it and it rebooted. I thought fine, no biggie. But now it will not get past the bootloop :(

Worst part is I did a factory reset after rooting it, so lost my image on my internal memory. Can't just re-root.

Tried going into safe mode and doing a factory reset from the boot menu, but will not work.

I have a stock image I made and a rooted image i made. Anyway to flash KDZ using my stock image? Any and all help would be awesome, thanks!
[G4 General] smason:
Reinject/Reflash system.img into your device. After your device reaches a stable situation verify every steps of the procedure.
[G4 General] woozzy101:
I should have stated I have the VS986 (Verizon) version. Locked bootloader, so cannot use TWRP. I'm sorta new to rooting and flashing, so trying to figure out all the options and terminology.

Am I able to flash my system.img into my device on a Verizon phone with a locked bootloader? I thought I could only use a KDZ file to do that in download mode?

Thanks for the help! :)

Edit: I just tried step one to see if i could make a system.img and then step 3 to flash that system.img but did not seem to work.

Went into download mode. Then went into command mode. Then ran: dd if=/dev/block/mmcblk0 bs=8192 skip=65536 count=548352 of=/data/media/0/system.img

Still in command mode, I then sent: dd if=/data/media/0/system.img bs=8192 seek=65536 count=548352 of=/dev/block/mmcblk0

then: LEAVE

Is there a command to possibly move a file from the SD card to the internal storage or run step 3 root from an SD card?
[G4 General] smason:
If you did the previous DD command on your device with a faulty /system the situation remain unresolved. Also you've replaced a good system.img with a faulty version.

Before the mess, what did you do with your device? What kind of operations did you do?

Finally, I think you will need to follow a guide/howto about the use LG Flash Tool 2014 and download the firmware for your device.
[G4 General] vitorugo-8:
will this method work with 20b rom version?
[G4 General] the_scotsman:
No, doesn;t work on Marshmallow, as stated many times in this thread :)
[G4 General] woozzy101:
I had 11A root with Xposed installed. Ran the Xposed uninstaller, used KDZ 11A to flash back to stock and then factory reset. Waited 1/2 a day for 13B OTA update to finally get detected and installed. Then used download mode to go into command mode to extract an Image and then used Ubuntu to inject root into my own image. Then moved that rooted image onto my phones internal memory and rooted phone with 13B. It worked fine, no problems. Then I did a factory reset and started downloading all my apps and setting phone up. Totally forgot to move my rooted image back after I factory reset. Phone was working perfectly after factory reset, not a single problem.

When it started to bootloop was when I plugged phone back into computer to move some app backup settings, game settings and rooted image back onto phone. It randomly went into a bootloop as soon as I plugged it in and would not get past it.

The guide/howto about the Flash Tool 2014 from my understanding ONLY flashes a KDZ file? I thought I could not flash my own image using Flash Tool 2014, but would have to get a KDZ file and then flash it back to stock and start over. Which is fine. It is how I un-rooted 11A and went to stock to be able to get 13B OTA update.

The problem I have is I cannot find the 13B KDZ anywhere to flash that. :( But if there is another way to fix my phone, I'm all open! :)
[G4 General] smason:
OK!

Currently, as you reported, your device bootloop, therefore in this situation isn't possible to import a good system.img, besides you did a new DD over previous system.img present in /data/media/0/, so if this file was good your move replaced it with a bad system.img.

Is better to start from the beginning.

Remember to maintain the original system.img for few time into your device, so in this way, if your device encounter some trouble, you can restart from the same firmware version.

I know in theory you did all things in the correct order, but something went wrong.

In parallel you can verify some step. You should check if you rootedsystem.img "mount" without error on your Ubuntu environment:

# mount -t ext4 -o rw,loop rootedsystem.img /mnt

than navigate into /mnt with some "cd" and "ls -la" commands:

cd /mnt

ls -la bin/
[G4 General] Nekator:
Is it possible to use the dd command to change the kernel. (boot.img)? So that we could change the stock kernel with the repacked stock kernel to get root under mm? That idear came into my mind when i was thinking about getting root on mm with unlocked bootloader.
[G4 General] Jens1969:
IIRC, you could flash another kernel, but the locked bootloader won't let you boot it.
[G4 General] Nekator:
Thanks
[G4 General] goran_oh:
Thanks for info.
[G4 General] woozzy101:
Unfortunately, like I said I did a factory reset and it wiped the image I had in my internal storage. I did not overwrite it with a bad system image since nothing was there. Tried to make a new system image in the hopes that somehow that was better or would let me boot into phone. When I rooted 11A, I always maintained an image on my phone in case I needed to reflash it. Just forgot to do it first thing when my phone was working on 13B and it came to bite me.

My rooted image looks good, no idea what went wrong.

Called Verizon and told them 13B messed up my phone. So will see what happens if I decide to not wait for a 13B KDZ and go to the Verizon store. The only thing is when you go to do a hard reset on phone and it brings up options like safe mode, USB debug, clear cache and stuff, it says modified on the top left. Wonder if that will give away that it was rooted or not. Can I just say that it must have been the update screwed up my phone and reason it says that?
[G4 General] smason:
Speaking in theory the answer is YES! Because, for example the STOCK-20a-ROOTED zip package injected by TWRP contain a simple cp of an image to a device, look updater-script:

ui_print("*********************************************");

ui_print(" ***************** ");

ui_print("***********SUPERXE - 6.0.X KERNEL************");

ui_print("***************** H-815 *********************");

set_progress(1.000000);

package_extract_file("boot-em.img", "/dev/block/bootdevice/by-name/boot");

The meaning of the previous out you can find here: http://xdaforums.com/showthread.php?t=1931585

So, if we explain:

smason@nic ~

$ adb shell

shell@p1:/ $ ls -la /dev/block/bootdevice/by-name/boot

ls -la /dev/block/bootdevice/by-name/boot

lrwxrwxrwx root root 2015-02-22 01:10 boot -> /dev/block/mmcblk0p38

shell@p1:/ $ cd /sys/block/mmcblk0/mmcblk0p38

cd /sys/block/mmcblk0/mmcblk0p38

shell@p1:/sys/block/mmcblk0/mmcblk0p38 $ cat start

cat start

491520

shell@p1:/sys/block/mmcblk0/mmcblk0p38 $ cat size

cat size

81920

shell@p1:/sys/block/mmcblk0/mmcblk0p38 $ quit

quit

/system/bin/sh: quit: not found

127|shell@p1:/sys/block/mmcblk0/mmcblk0p38 $ exit

exit

smason@nic ~

$ bc -l

bc 1.06.95

Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.

This is free software with ABSOLUTELY NO WARRANTY.

For details type `warranty'.

491520*512/8192

30720.00000000000000000000

81920*512/8192

5120.00000000000000000000

The size of source file boot-em.img is 30699520 that is < of 81920*512=41943040 so isn't necessary use the count parameter of DD command, we need only "seek" to start from the beginning of boot partition.

In any way, there may be some preboot code that deny to load the boot of a not recognized kernel by locked device. Who knows?

---------- Post added at 11:31 PM ---------- Previous post was at 11:29 PM ----------

[/COLOR]

Sorry, you are right! I missed/forgot the part where you did a factory reset.

Verizon smartphone came with unlocked bootloader is true?
[G4 General] woozzy101:
Nope, they locked it and no one has been able to crack it. T-mobile was the only one that came with unlocked bootloader that I remember :(
[G4 General] prot-:
please change the title as it is missleading for marshmallow
[G4 General] divineBliss:
What would you propose the title to read? It's hard to cover all bases with a title, you realize? :) .
[G4 General] prot-:
Root ANY LG G4 Lollipop Variant 100% Success Directives | Root Injection | Less Bricks
[G4 General] divineBliss:
Problem is the next release of firmware could make that title obsolete :D .
[G4 General] prot-:
as is the current title
[G4 General] dspeier:
Que versión te apareció para actualizar? Yo lo tengo con Personal y no me aparece nada nuevo (estoy en 5.1). Gracias y saludos

Diego

Enviado desde mi LG-H815 mediante Tapatalk
[G4 General] reg66:
English please!
[G4 General] ecchi.misutaa:
Sadly, I really would wish that I saw this post before I tried this method. I guess my rooted img was corrupted, so my H818 is bricked now. I got Security Error #9 at boot. :crying:
[G4 General] Nekator:
If there is really some code that prevents to boot a modified Kernel, why would this code not prevent to use a modified system.img?
[G4 General] Jens1969:
I'm sure it could. Found this two articles on xda about root and verity to be useful to understand rooting on Android Marshmallow.
[G4 General] dspeier:
Ok sorry. It should be a private message.

I was asking about the update he received because I am in the same country and have no update available.

Regards,

Diego

Enviado desde mi LG-H815 mediante Tapatalk
[G4 General] reg66:
EDIT: can i just flash the original system.img (without root) back on the device by using the command: dd if=/data/media/0/rootedsystem.img bs=8192 seek=55296 count=529920 of=/dev/block/mmcblk0

but change rootedsystem.img to just system.img like this: dd if=/data/media/0/system.img bs=8192 seek=55296 count=529920 of=/dev/block/mmcblk0

would this work for flashing the original image back on to my device?

EDIT 2: found the answer: yes i can!
[G4 General] eplgr:
Did you send your phone info (IMEI, etc) to LG? You can't register your phone by yourself (lg.com.ar sucks, we don't even have lg bridge), and you need to be registered to get OTAs.

Right now my phone says:

*Software version: H815AR10a-SSV-TLF

It's still 10a (5.1), but the changelog said they fixed some issues and the file name said it was from september. I think I read somewhere some notification bugs were fixed.

I bought it from Movistar. We will never get 10b/c/d/etc, but I don't really mind because I (we?) don't have touch screen issues, or issues at all. Let's hope MM comes fast tho.
[G4 General] ptick:
Not working on all LG G4s...

I've got a LG G4 H731 I'm trying to root. But the Step 2 (Root injection) bring errors :

sudo sh autoroot.sh
cp: cannot create regular file ‘operatingtable/lib64/libsupol.so’: No such file or directory
chmod: cannot access ‘operatingtable/lib64/libsupol.so’: No such file or directory
chcon: cannot access ‘operatingtable/lib64/libsupol.so’: No such file or directory
chmod: cannot access ‘operatingtable/bin/app_process64_original’: No such file or directory
chcon: cannot access ‘operatingtable/bin/app_process64_original’: No such file or directory
chmod: cannot access ‘operatingtable/bin/app_process_init’: No such file or directory
chcon: cannot access ‘operatingtable/bin/app_process_init’: No such file or directory

I looked inside my system.img and there's no lib64 folder and no app_process64. My guess is that LG G4 H731 are 32 bits, so the root injection fails to modify the system image.

Any advice on how I could fix this?
[G4 General] smason:
Based on the CPU specifications http://system-on-a-chip.specout.com/l/1097/Qualcomm-Snapdragon-615-MSM8939 try the attached root_inject package.

Besides, please follow this roadmap/recommendations:

- Maintain, for some time, on the internal SDCARD (/data/media/0) the original system.img as salvage anchor to restore the phone in case of troubles.

- Don't make factory restore because in this case you will lost the salvage anchor.
[G4 General] danaff37:
The bootloader loads the kernel, and contains the code to verify the signature of the kernel. Before the kernel starts, there is no /system, so the boatloader doesn't know about it. It could in theory check the signature by reading the lower level bits of the partition, but it can't really look at the file system itself without the drivers in the kernel. So for the most part, stopping at the kernel is enough.
[G4 General] Nekator:
Thanks for this information. This is why i love XDA. [emoji4]
[G4 General] carbunch:
Does this work for the latest Verizon OTA (13B)?
[G4 General] laperro:
Ahhh, that would be the "boneheaded mistake" I was talking about, it was 2.5gb, made a new copy and it mounted and script ran just fine, won't flash though, so far...

Do I need to be doing something other than:

# /system/bin/toolbox dd if=/data/media/0/Download/rootedsystem.img bs=8192 seek=40960 count=351232 of=/dev/block/mmcblk0p32
#LEAVE

?it's back to just going right back to the # prompt, when I LEAVE, the download progress shoots to 100%, but it just boots normal. I did load some apks, (thought it wouldn't make a difference, since I still had plenty of space even with both images on there, but... ) is that maybe what's in the way? Do I need to go back to 'factory' again and start over? As of now, it's there, it's 2877292544 bytes, so I can't really see anything else it could be, but figured I'd ask and save myself the trouble of starting from scratch in case it's something else.

Edit: Evidently I'm still missing something (I have no doubt it's me), I went back to factory, started from scratch, and everything works great up to the above dd cmd, tried it without "seek" and "count" as well, and still shoots to 100% and just boots as normal... :confused::confused: kind of leery of just trying arbitrary stuff at this point, I'd hate to have it 'work' but in the wrong place.

/Edit:

EDIT#2:

@smason

@player911

OK, now I feel a complete ass, but you've both been a huge help, so I'll swallow my pride in the interest of full disclosure. Was poking around the 10.1 forums and re-read posts from back in July saying kingroot worked, and I swear it didn't before this last OTA, I even still had it installed in Windows, same version (4.5 I think), so just for the heck of it, I went to the site and downloaded the apk fully expecting it NOT to work, since I absolutely tried it before, and amazingly, it worked... :confused: :o ...um...right, now I'm even more mystified, the only reason I can think of for this turn of events is that I factory re-set it, so there was nothing at all on it... :confused:

I am really sorry for taking your time unnecessarily, the 'loss' is on your end, I know, because I learned a bunch, so I don't regret it

(except for the part where I feel like an idiot), yeah, I could just disappear and save face/spare myself some embarrassment, but since you've been so helpful I couldn't very well do that with a clear conscience.....

So thanks again for all your help and especially patience with this, it's really appreciated!

...and sorry for any inconvenience. :o *crawls back under rock*
[G4 General] divineBliss:
Yes!
[G4 General] carbunch:
So assuming I follow all of these instructions to the letter, I won't end up with a curved paperweight?

I've rooted a couple Samsung devices in the past without issues, but I'm not sure how different this process is, seeing as Odin is not involved. I'm just a tad weary of potentially bricking this new phone, however the benefits far outweigh the risks for me. I can't stand all this bloated crap that Verizon puts on their phones, not to mention the battery drain they have.
[G4 General] divineBliss:
That's correct! My 13B phone works just fine after following this injection process. Make a backup and leave it in internal storage if you don't want a brick.
[G4 General] Rick299:
I do not know much about ubutu, but trying to inject root everything worked until I tried the command

Sudo sh autoroot.sh and it tells me command not found.Please let me know what I might ck or did wrong.
[G4 General] woozzy101:
9--You'll now see the name in the terminal become longer with the name of the folder in it.

10--Now type: chmod +x autoroot.sh

11--Hit enter then: sudo ./autoroot.sh

12--If you get any thing like command not recognized or something of the sort use: sudo sh autoroot.sh

-That worked for me.

for me, step 11 did not work, but step 12 did. You did step 10 before 11 or 12?
[G4 General] divineBliss:
Post the output of

"ls -l *"

Did you do

"chmod +x autoroot.sh"

followed by

"sudo ./autoroot.sh"
[G4 General] Rick299:
Yes I did step 10 11 and 12 and I used copy and paste.
[G4 General] woozzy101:
Step 12 is only needed if step 11 did not work for you. Did Step 11 work for you?
[G4 General] Rick299:
After step 9 I got the #symbol. It did change to the proper directory in step 8.

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

Step 11 didn't work so then I tried step 12.

---------- Post added at 08:10 PM ---------- Previous post was at 08:07 PM ----------

In step 11 I got command not found in step 12 I got can't open autoroot.sh.

---------- Post added at 08:30 PM ---------- Previous post was at 08:10 PM ----------

root@ubuntu:/media/ubuntu/XP_Home/LG G4 Root# ls -l *

-rw------- 1 ubuntu ubuntu 815104 May 14 2013 adb.exe

-rw------- 1 ubuntu ubuntu 96256 May 14 2013 AdbWinApi.dll

-rw------- 1 ubuntu ubuntu 60928 May 14 2013 AdbWinUsbApi.dll

-rw------- 1 ubuntu ubuntu 1048328 Jan 18 2015 busybox

-rw------- 1 ubuntu ubuntu 1538 Dec 2 00:09 Command Prompt.lnk

-rw------- 1 ubuntu ubuntu 9319 Jan 25 2015 lg_root.sh

-rw------- 1 ubuntu ubuntu 51 Mar 9 2015 ports.bat

-rw------- 1 ubuntu ubuntu 8704 Jan 25 2015 Send_Command.exe

-rw------- 1 ubuntu ubuntu 4492099584 Mar 29 2015 system.img

-rw------- 1 ubuntu ubuntu 4017098 Mar 8 2015 UPDATE-SuperSU-v2.46.zip

root@ubuntu:/media/ubuntu/XP_Home/LG G4 Root#
[G4 General] divineBliss:
You are supposed to be in a folder called Inject_Root_G4 when you do autoroot.sh - it's not in the folder LG G4 Root. Go back and review the OP instructions. You need to move system.img into Inject_Root_G4 which should contain autoroot.sh .

You better have a copy of system.img in your phone's internal storage, and the copy in Inject_Root_G4 will get eaten up, so don't rely on it to be your only backup. Save a copy on your PC somewhere.
[G4 General] Rick299:
I don't think it matters if I'm correct what I named the folder. It looks like the problem is I don't have a file called autoroot.sh. I've tried downloading the files I need again in that particular file just doesn't show up, so I'm still at a loss to try to figure this out.
[G4 General] woozzy101:
You downloaded "Inject_Root_G4.zip" and unzipped/extracted folder? It should have 2 folders and 2 files in there.

Folder 1: operatingtable

Folder 2: su

File 1: autoroot.sh

File 2: Readme.txt

and of course, you should also have the system.img file you COPIED into that folder. Once you do step 10 and 11/12, the system.img file gets changed into a new file called rootedsystem.img

Make sure to keep the folder named: Inject_Root_G4

Step 2 has the link to download the zip file you will need to inject root.

Link: https://mega.nz/#!BIxUzbqI!nt2YnGnGQlSiBQ-Ar-c-q7oDMIEsg6xd0Kmek-q0clg

Remember, click on "download through your browser". :)
[G4 General] Rick299:
This time the file downloaded properly and I was able to complete the process. Thank you for all your help.
[G4 General] woozzy101:
Awesome, glad to hear you were able to complete the rooting process. Just remember to KEEP AN IMAGE ON YOUR PHONES INTERNAL STORAGE. Since there is no 13B KDZ as of right now, if anything goes bad or you accidentally freeze a wrong file and it bootloops, you can always re-flash the rooted image back and have your phone up and running.
[G4 General] carbunch:
I can confirm this works flawlessly on VS98613B. I recommend getting checksums of your system.img every time you copy it somewhere else. You don't want to have a corrupted image when you try and flash it.
[G4 General] divineBliss:
That's a great point!

What software app for phone and computer do you recommend to calculate the checksums?
[G4 General] carbunch:
I used WinMD5 on Windows to compute the original system.img's checksum and saved the output to a text file.

Next, after putting system.img in my Ubuntu VM, I ran

md5sum system.img

in a terminal window, then matched the two hashes to verify the file integrity.

Funny enough, the first time I attempted to copy system.img over to the VM, I actually ran out of space on the VHD but the VM software didn't give me any notification that the transfer failed, so the image only copied halfway and left an icon in the target folder. Had I not checked the MD5 sum, I very well could have bricked my phone by dd'ing a corrupt system image.
[G4 General] 216Monster:
[MENTION=4545681]hackarchive[/MENTION]

Nice write up, thank you
[G4 General] davdavo:
Thank you for the guide :))))))

*thumbs up* x 100
[G4 General] Loulou-13:
thank you ! ;)

but after (i'm with Eur H815) for MM 20B ?????

there are a chance to have a possibitity to "just" inject with fastboot (for LOCKED bootloader ) only the root and SuperSU for this Marshmallow ???

because there are not a way of root in this situation ( bootloader locked ,MM ) at this time ,i believe ...
[G4 General] tribullet:
Thanks

Ive already posted earlier in this thread, but just wanted to say thanks again for the guide. I had one ever used one click root methods before, but had no problems rooting a few weeks ago with these instructions, and was recently able to unroot, take the most recent update, and reroot using this method.
[G4 General] player911:
Haha. Great experience though. The good old days of easy rooting on LG devices is gone. Your device may be safe but probably will eventually it will come down to this. Glad you got it worked out.
[G4 General] ivangundampc:
Could anyone answer me or give me some help please?