yashsingh1/xdaforums huggingface dataset:
[G4 General] laurasaurisrex:
Thanks! Same as the others, though, it's asking for a decryption key.
[G4 General] vo_danh:
If you have a rooted img file, then you already went through the linux portion to inject the root. You're only told in the guide to check for the system.img in the first step when you're baking it up the first time. If when you injected the root, you moved the system.img instead of copy, then you would no longer have the system.img.
[G4 General] vo_danh:
I just went through all the steps and rooted my 12A version. Playstore didn't seem to load the first few times I tried to load it but seems to be working now. Verified with root checker.

Google Wallet won't let me send funds from my credit card so if you have a paypal donation account setup please list it.
[G4 General] jesssiii:
Sorry, not familiar with Mega. Changed link to include encription keys, hopefully that works. No MD5, sorry, and I'm out for work now.
[G4 General] legend221:
Thank you Jesssiii this will come in handy for those that have updated or got a phone with the v11 already.

For any and all who are still on 10B with Verizon do not update anything, block OTA updates and root this specific version asap.

As of yesterday autoprime has confirmed that bootloader unlock is coming. For more information see the other thread in General.

..Sent from an XDA modified LG G4 on Verizon..
[G4 General] jesssiii:
Are you saying the bootloader unlock will only be for 10B on Verizon? That truely sucks!
[G4 General] Nils001:
Hello,

everything works except for the rooting of the image in linux.

I get a mount error every time.

I am root and im trying to root it with sudo.

If i upload my image could someone root it for me ?

Im on the H815 EU version of our phone

---------- Post added at 01:40 PM ---------- Previous post was at 01:13 PM ----------

nvm works now .. my image was corrupt because i had not enough space on my internal storage
[G4 General] rmonjay:
I followed all of the steps for the Verizon G4, but now it will not turn on. I get an error message and then the red verizon launch screen, followed by off. I can put it into download mode and the verizon update assistant thinks I am on 12A, so it looks like it took, but it does not recognize any phone number. Help, please! any thoughts?

Also, saw that we can't go back from 12A to 11A due to bootloader version, so I don't think I can use the 11A kdz. I would apprecaite any thoughts on that too, or any link to a 12A KDZ. tHANKS
[G4 General] :
Dont worry Im uploading it to some places also right now :D

mainly vultr
[G4 General] player911:
Thanks. My MD5 on my 12A was 6FC6B172592BE6BB66F2592FCE1D294C... however it fails to flash. I had to flash back to my 11A image.
[G4 General] jesssiii:
Good to know that's possible since we can't go back to 10b without bricking.

VZW LG G4
[G4 General] player911:
I think the rooted 12A image is corrupt because I get the exact same thing. Just flash the rooted 11A system image file and it will boot back up and keep all your files.
[G4 General] jesssiii:
Is that my image that's corrupt?

VZW LG G4
[G4 General] rmonjay:
Were you able to put the rooted 11A file on your phone? I already had it on my computer, so I didn't do a backup - really stupid, I know.
[G4 General] player911:
This file is bad. It is resulting in a failed boot. Please remove it.

People are downloading and mirroring a bad file and it is spreading bad files.

MD5 OF BAD FILE = 6FC6B172592BE6BB66F2592FCE1D294C
[G4 General] rmonjay:
I used your image, but I am not sure if it is the file or just user error.
[G4 General] jesssiii:
Strange, it worked for me, obviously. Must have been a bad upload. Sorry.

VZW LG G4
[G4 General] player911:
Yes. Posts are spread around a few threads but I've downloaded it a couple times and compared MD5 checksums. It flashes fine, but boots to LG, then throws an Error that the system is corrupt. It then displays the Red Verizon Boot Animation but just blanks out and turns off.

Here is the MD5 checksum for the bad file:

6FC6B172592BE6BB66F2592FCE1D294C

Maybe you can upload a new one to a different host (not a fan of the original)
[G4 General] danaff37:
This could be because boot images aren't compatible between the two. If he rooted 12A, he could grab boot image and it could be flashed too using the same method, assuming the new boot image is signed with a compatible key for the older boot loader (although given the nature of this exploit, I do believe you could flash the old boot and system images back with no problem)
[G4 General] legend221:
I can't say for sure now, but I wouldn't update to anything at this time. Here's hoping the devs find a exploit on the newer releases. But signs point more to no than yes.

..Sent from an XDA modified LG G4 on Verizon..
[G4 General] belblade:
what version are you on? and could you upload the rooted image somewhere?

thanks!
[G4 General] phillymade:
Should we be able to flashover 11A using the method in the OP, and change command to 12A?

I did this and got a Fail to Boot error.

EDIT.....Just read back a few pages and I see that I get the same Error screen as others are getting.

Thanks for you effort and work!
[G4 General] laurasaurisrex:
Did you flash the rooted 12a system image over your 11a system? That will not work... It sounds like you did from saying you just went back to 11a and it booted fine. For this root method to work, you have to be running the unrooted 12a first - you have to take the OTA update and THEN flash [MENTION=2861395]jesssiii[/MENTION] 's file.
[G4 General] xgerryx:
Honestly, from what I've read since that has been posted, NOTHING has been working right and I don't understand why people are still trying to use this image at all. Has anyone gone through and used this while currently on the 12a official version and had no problems, no boot issues, and everything is good? If so, please speak up.
[G4 General] jesssiii:
Obviously I did. I ota'ed to 12A, pulled the image, rooted it, then replaced the stock with it. It was most likely a bad upload, but it's also true you'd need to OTA to 12A first just as I had to update or KDZ from 10b to 11A before using the 11A rooted image.

VZW LG G4
[G4 General] harabinger66:
Wonder if this would work with the V10. It has the same processor!

One can dream.
[G4 General] jesssiii:
Warning about 12a

DO NOT UPDATE TO 12A UNTIL/IF THERE'S A KDZ! I tried to kdz back to 11A and got a brick. Hard brick. Really.
[G4 General] vjkse:
Guys first time posting here, I am big fan of all you guys sharing valuable information so figured I try at least share my experience about this method.

This method worked for me absolutely perfect.

1.	I was rooted 11A .

2.	I wanted to take 12A OTA.

3.	Did KDZ went back to 11A

4.	Took OTA

5.	Now on 12A OTA image ( Factory Image)

6.	Now I wanted root again

7.	I followed Step3 and Used the rootedsystem img and now have root on my 12A .

a.	Word of caution Follow the instruction and commands as advised .

8.	Rooted and all is working.

Hope this help’s............................................. VJ.
[G4 General] donkanmcklaus:
hi guys, i'm trying to root an LG G4 H815 with V10c - SEA and I have a problem, I follow the steps in the OP, but, i'm stuck while trying to backup System Image to Internal SD, when I enter the Command nothing hppens, just a blinking cursor, the command i'm using is: dd if=/dev/block/mmcblk0 bs=8192 skip=55296 count=529920 of=/data/media/0/system.img

and yes, I unninstaled old LG drivers, and installed again, usb debbug is enabled, im able to see both storages, and I let it there for hours, never returns me the # again, just if i disconnect the phone, what should I check?
[G4 General] CPngN:
Something IS happening. It's copying data. dd generally provides NO feedback indication that it's doing anything!

See http://unix.stackexchange.com/questions/11262/how-do-i-know-if-dd-is-still-working for example.
[G4 General] XZ3R0:
When you did this, did you do a full wipe (CSE Flash)? I used Normal Flash and I'm not being offered the update.

Just curious.
[G4 General] new2city:
Hi, just to be clear, are you in download mode, when you do this? Just curious, because you said that you are able to see both storages.

Honestly, I once ran the ports.bat file once without realising that I was still connected to the phone when it was still in running mode, my bad...
[G4 General] donkanmcklaus:
I tried in both modes, in this moment is in download mode, how much time does it takes to complete the process? it should appear something on the phone screen?
[G4 General] hkfriends:
So I think can wipe cache like this?

shell@p1:/ $ ls -lZ /dev/block/bootdevice/by-name/cache

ls -lZ /dev/block/bootdevice/by-name/cache

lrwxrwxrwx root root u:object_r:block_device:s0 cache -> /dev/block/mmcblk0p49

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

cd /sys/block/mmcblk0/mmcblk0p49

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

cat start

9895936

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

cat size

2523136

shell@p1:/sys/block/mmcblk0/mmcblk0p49 $

so:

offset = 512 * 9895936 = 5066719232

partition size = 512 * 2523136 = 1291845632

dd if=/dev/zero bs=8192 seek=618496 count=157696 of=/dev/block/mmcblk0
[G4 General] danaff37:
It's probably not, flashing the 12a system without the 12a boot is not gonna work. You should pull that too for trying in combination.

It still may not work, depending on if they changed the signing keys in boot image that the boot loader is looking for, but given that this root process still works on 12a, I doubt that.
[G4 General] fenstre:
Injection requires selinux-aware coreutils

Just posting in case anybody else has the same problem--

When running the "inject" step, I got a bunch of errors like this:

chcon: failed to get security context of ‘operatingtable/bin/reboot’: Operation not supported

Apparently that's because I ran the step on Archlinux, and it's because Archlinux doesn't support SELinux by default. The solution is reasonably fast and simple--install the "coreutils-selinux" package from AUR.

This problem may also happen on other linux distros that don't support SELinux--find the instructions for turning on SELinux, and do it. At the very least, do any steps about upgrading core tools and libraries. That's all it takes.
[G4 General] saksoo:
H815 uk three variant

Hi there ,just a quick question. I'm planning to root my three uk variant v10e with this method. After the root will I be able to receive ota's if I go back to v10e with the kdz method?

Also, there is a rom here for H815(all variants). Is it safe to flash it to my three uk 815 variant? How do I go back to official If I don't like (and get android 6)? again v10e kdz ?
[G4 General] smason:
OK, but in this way you lose the ext4 filesystem of the /cache, look this:

$ adb shell

shell@p1:/ $ mount |grep cache

mount |grep cache

/dev/block/bootdevice/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,errors=continue,data=ordered 0 0

shell@p1:/ $

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

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

lrwxrwxrwx root root 2015-01-03 12:50 cache -> /dev/block/mmcblk0p49

shell@p1:/ $

After the dd command it is necessary to format the p49 slice of the MMC disk.
[G4 General] dboechat:
I've just rooted my H815p (Brazil) with this method. Amazing! :thumbup:

Just one question: can I flash my original system.img to unroot the phone or the KDZ method is obligatory?
[G4 General] rnscotch:
Could not wait any longer for a one click root option so went ahead with this and i've just rooted my H815 Eur, was easier than it looked only took me 10 mins. :good:
[G4 General] new2city:
It's a split second change back to the # prompt. I thought it didn't work until I saw the system.IMG file on the internal storage of the phone. The phone screen remains unchanged.
[G4 General] vjkse:
No . I did not wipe the data nor did i do a reset. All stayed intact.
[G4 General] Spudnubs:
Hey hack, I've also got a H81210h rooted system image here also that you can add
[G4 General] warri:
Does anyone know of a way to reverse the effects of the Root Checker Tool?

This tool is preventing some of us from flashing back to stock, and taking OTA updates.

Some more detailed information found: http://xdaforums.com/showpost.php?p=63342448&postcount=91
[G4 General] Dr_SUSE:
Can't complete root injection

Upon running autoroot.sh, I get this:

,

mount: wrong fs type, bad option, bad superblock on /dev/loop0

followed by a long list of errors that are obviously the result of a failure here:

mount -o loop,rw -t ext4 system.img operatingtable/

I've tried this on Ubuntu and openSUSE machines, and neither like that mount command.

It does change the file name, but something tells me it's not rooted if it can't even mount the img to run the script.

Any ideas?
[G4 General] Dr_SUSE:
FYI my Linux partitions are all ext4.
[G4 General] Lekerstein:
Just covering the bases, but does your user have sudo rights and did you run BOTH sudo commands mentioned in OP? (sudo -i and sudo autoroot.sh)
[G4 General] player911:
I am attempting to pull system from my LG G Pad x8.3. I am a bit confused because in one post you use 512 in the equation and in another you use 8192. How do you determine this value?

Are you doing 452984832 / 884736 = 512?
[G4 General] smason:
Use 512 because on linux: under /sys/block/<device> directory, e.g. cat /sys/block/sda/size gives the sda size measured in blocks of 512 bytes.

After calculating the offset (starting point) in byte and the size (how many byte I need to read) of the target partition, is required for the DD command to choose a block size (bs=) to use for the operation. DD read chuck of byte defined by block size parameter. You can choose 1024, 2048, [...], 16384, etc.

so:

dd if=/dev/block/mmcblk0 of=/data/media/0/system.img bs=16384 skip=<put here the new value from offset/16384> count=<put here the new value from size/16384>

dd man page: http://man7.org/linux/man-pages/man1/dd.1.html

Pay attention to the difference between "skip" and "seek" parameters of DD command.
[G4 General] Makster:
Greater block size results in better i/o bandwidth. So to minimize the time needed for the dd to complete, use the highest reasonable block size that would NOT result in a fractional count or skip values. By reasonable I mean something on the order of 64K or maybe 128K. There is no point in going higher than that. And yes, block size needs to be a power of 2.
[G4 General] Lekerstein:
You guys rock! I just spend most of Friday evening/Saturday morning reverse engineering the dd command to pull /persist partition. Didn't know the cat command could tell you the start and size, so I have this massive Excel spreadsheet where I analysed the partition sizes, converted to bytes, and then converted to the dd command. Oh well, I learned a lot, but from now on i'll just cd into the folder and use cat. Thanks for clarifying on the block size Makster. That makes a lot more sense. Basically, take the size of the partition you are copying, in bytes, and keep dividing by 2 until you get to a reasonable size less than 64k that is a power of 2, correct?
[G4 General] player911:
Ahhh so its variable as long as everything adds up. Gotcha. There isn't a lot of stuff for the LG x8.3 so I am trying to jump start some love.

The new system update kills the old LG root method and thus requires pulling and pushing the entire image like on the G4. Mine is already rooted so I need to make a walk through so someone else can pull a stock image.

Thanks for the help guys.
[G4 General] Dr_SUSE:
I'm pretty sure I did. I'm not one to play fast and loose with very specific instructions on a $500 device :eek:

I'll double-check when I am able.

In other news, I was able to root the device using a downloaded IMG. I wanted to take a look at this IMG before I put it on my device, and I was able to mount it using a mount -t auto command. However, using the same mount -t auto command in the autoroot script didn't work.
[G4 General] cjm1979:
Few questions:

Its the first LG ive owned, always had and rooted HTC's. I had Xperia Z3+ but got this to replace it due to Z3+ been crap.

1. Ive seen some say they flashed kdz to remove root to take an OTA but ive seen The Scotchman say he just unrooted using SuperSu. Is there any advantage of using Kdz over SuperSu to unroot? Latter seems easier to me?

2.Also can i use this same method to root a G Flex 2?

3. If i tried to OTA would it knock it back due to root?

Thanks
[G4 General] zeguym:
Was i has this problem too. Cannot mount system.img.

Than i realize that i use wrong command to dumping system.img. Mine is H818P, but command i use is for H818. not realize it at first, until i recheck command i use for dumping.
[G4 General] Dr_SUSE:
I don't see how this problem can be dependent on the phone. Seems to me it would be dependent on the Linux distro or the system configuration.

Did you get it to work? What mount command did you use?

---------- Post added at 09:00 AM ---------- Previous post was at 08:53 AM ----------

Ooooooooooooh!!!! Now I get it!

I did the same exact thing you did. Mine's an 818N, and I used the dump command for 818.

So this would really prevent the IMG from mounting?

Too late for me now. I put a pre-rooted IMG, which I downloaded, onto the device. The IMG I dumped from the original ROM is probably corrupt, and the ROM that came with the phone is gone forever!

Guess I have to wait for OTA update to v10d to try again!
[G4 General] zeguym:
Same mistake like mine. I think difference type of G4 have a difference partition structure, so when dumping using wrong command, we get corrupted system image. Thats why those system image cannot be mounted.
[G4 General] rogconnect:
Yes, I uses for my G Flex 2 H959. But I think OTA will not install.

http://xdaforums.com/showthread.php?t=3166217

[MENTION=4545681]hackarchive[/MENTION]

I thought you gonna start a thread on G Flex 2 forum xddddd

내 LG G Flex 2 H959 사용 tapatalk에서 전송
[G4 General] player911:
Here is what I got:

adb shell
shell@altev2:/ $ ls -la /dev/block/bootdevice/by-name/system
ls -la /dev/block/bootdevice/by-name/system
lrwxrwxrwx root root 1970-01-02 15:08 system -> /dev/block/mmcblk0p37
shell@altev2:/ $ cd /sys/block/mmcblk0/mmcblk0p37
shell@altev2:/sys/block/mmcblk0/mmcblk0p37 $ cat start
cat start
719872
shell@altev2:/sys/block/mmcblk0/mmcblk0p37 $ cat size
cat size
7340032
shell@altev2:/sys/block/mmcblk0/mmcblk0p37 $

So this:

512 * 719872 = 368574464

512 * 7340032 = 3758096384

Which equals this: (all of the pull system commands use 8192, so I am just following to keep it similar)

8192 * 44992 = 368574464

8192 * 458752 = 3758096384

When I do this on my LG x8.3 tablet, I get a 3.5gb system.img file. Where my G4 will pull a 4.3gb image file. Does this look/sound right?

dd if=/dev/block/mmcblk0 bs=8192 skip=44992 count=458752 of=/data/media/0/system.img
[G4 General] smason:
Are you sure the disk slice /storage/emulated/legacy has enough space to memorize 3.7Gbyte of system.img?

The /system slice disk is 3758096384 ~= 3.5 Gb sound right. The final test is to open on linux with loop device and verify if the mount operation goes without error.

Verify test with root grant:

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

# ls -la /mnt

Stop test with root grant:

# umount /mnt
[G4 General] player911:
Cool thanks. Yea I cleared and had over 7gb of space available on the device. When I first did it I only got a ~650mb image file, which didn't seem right. After clearing enough space, I got the proper image.
[G4 General] kpdeepu:
I have rooted my H815 using this process successfully. When Marshmallow update rolls out for G4 OTA, can we unroot by flashing stock image, update to 6.0 via OTA and then use this same root injection process to re-root again?
[G4 General] Makster:
Almost, although that would be inefficient. Plus, there's no point in going below 512, which is the device block size.

As far as efficiency is concerned, partitions are not very likely NOT to span whole megabytes. That means that anything up to 1M should be safe, including our target 128K.

But it never hurts to check.

Let's take the numbers from the examples above:

Offset: 452984832, Size: 4341104640

Start the block size with the desired 131072, which is 128K.

Can we divide both offset and size by 128K without a remainder?

452984832 / 131072 = 3456

4341104640 / 131072 = 33120

As expected, 128K is fine.

So the arguments to dd would be "bs=128K count=33120 skip=3456"

dd can handle the translation of "128K" to "131072", but make sure you use "K" and not "KB", which would be translated into 1000B instead of 1024B that we want.

Of course, the conversion of the same value first from 512B-blocks into bytes, and then into larger-sized blocks is also inefficient. Divide the initial number by 2 * BlockSize without the "K".

So, the original number from "cat size" was 8478720 (in 512B-blocks). We need 128K block sizes, so that would give us 8478720 / 2 / 128 = 33120. Quick and easy. :)
[G4 General] petermg:
Successfully rooted my ATT H810 LG G4 running firmware 81010b! THANK YOU!!!!

Question.. if we are able to make a backup of our system.img from download mode, is it possible to back up the other partitions as well? That way if we screw up our phones we can just write those files back to the phone like when writing the rootedsystem.img to the phone? That would be BAD APPLE especially for guys like me who are on the ATT version and there is no TOT/KDZ file available and don't want to risk the GREEN DOT issue with the PR version. THANKS AGAIN!!!!!!!
[G4 General] maydayind:
how long sould the DD take.

given upp two times now.
[G4 General] Lekerstein:
Generally less than a minute for me. Probably around 45 seconds.
[G4 General] maydayind:
Hmm must be doing something wrong then...

Wierd .. tryed today and now it works .. dident change anyting
[G4 General] Velcorn:
Yay, finally I'm rooted again, I love you for this guide. It's very good even though I struggled a bit because of my own stupidity and Ubuntu refusing to show the folder on my internal HDD :P The guide is still pretty idiot-proof nontheless ^^

One small question: Is it possible to update to Android 6.0 via OTA update without losing anything (except for root access, obviously)? ^w^
[G4 General] hackarchive:
For all those asking for root on Marshmallow read this. It would be hard when it is available because of the need for a custom boot.img. Let's see but root is not at all guaranteed with Marshmallow for the LG G4.

Update:

I'm currently not using the G4 anymore as DD as I'm not I can't have an unlocked bootloader nor MM and can't keep going through the pains of no recovery and fear of brick.
[G4 General] cjm1979:
The # came back up in seconds on mine. When i rebooted i had an image of just above 4GB. Is this too quick? Also LEAVE didnt reboot the phone either. Just checking has i dont want to make a mistake.

Thanks
[G4 General] Velcorn:
Yes, was exactly the same for me, LEAVE worked only after rooting. Don't worry too much :P
[G4 General] cjm1979:
Ok, and do u think that the #is appearing too quick ? It's pretty much instant
[G4 General] Velcorn:
I was also astonished that it extracted 4 GB of system.img almost instantly. Nothing wrong there, I guess, worked for me :P
[G4 General] cjm1979:
Thanks, I'll give it a go later and report back
[G4 General] Lekerstein:
LEAVE will always work! If it doesn't, it hasn't actually finished copying the system image, even if you see a #. I've noticed sometimes the # comes back way too quickly. When that happens, I give it another 30-45 seconds (go get a cup of water - it's good for you :)) and then type LEAVE. The phone will then reboot. If you don't wait, LEAVE won't work (because the phone is still processing), and you may be tempted to forcefully restart your phone, risking damage to the copied image or even your /system partition.
[G4 General] cjm1979:
Cheers, thought I'd seen in first post it would appear when finished but thought it was a bit quick, that's why I asked. Thanks
[G4 General] Velcorn:
Interesting, that means it was a bad idea to just manually reboot; noted for the next time. It still worked and I can't find anything that is misbehaving...
[G4 General] cjm1979:
Worked a treat! Thanks!