yashsingh1/xdaforums huggingface dataset:
[G4 General] pepo930:
I just rooted my device using this method and everything works perfectly.

It was very easy, just make sure to read everything correctly. It took me 15-20min, but more experienced users should be able to do it in 10min, I was just extra careful.
[G4 General] smason:
OK!

As you can see from the output of "mount" command supplied the /system is mounted from a different special file of our G4. So the DD command you've used is wrong.

I prefer to help you in a different way because:

1) Your device is LG-Gpad 10.1" so the CPU is Qualcomm Snapdragon 400: 32bit.

2) The package Inject_Root_G4.zip contain a script "autoroot.sh" to inject SuperSU for 64bit CPU.

Now I reply to your first post... please, wait my new post.

---------- Post added at 04:52 PM ---------- Previous post was at 04:39 PM ----------

A this point instead to launch the previous command, change it a little with the following two commands:

#/system/bin/toolbox chmod 755 /data/local/tmp/busybox

#/data/local/tmp/busybox ash /data/local/tmp/lg_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox

This should do the trick!

then

#LEAVE
[G4 General] Adwaree:
Can I delete the rooted system image from my storage after the root is completed?
[G4 General] smason:
Yes.
[G4 General] reg66:
if i upgrade from stock (no twrp, no root) 5.1 to MM v20A from kdz via LGUP, can i still use this method of root, just root inject the extracted system image from my MM 6.0/v20A? does this make sense!?
[G4 General] NIGH7MARE:
I'm here just to thank you for this. I rooted my H815P successfully. :good:
[G4 General] Jens1969:
Short answer: no. Don't try it. You need in unlocked boot loader and a missed kernel.
[G4 General] laperro:
:( Ugh, I had such high hopes it would be that simple, but no such luck. I got the same result, script wouldn't run, it just went right back to a prompt (jeez, I wish the thing would at least yell at me, so it'd give me some kind of clue lol!).

...well I guess that'll teach me not to do my due diligence. I did something I'd never consider doing with a pc (actually I'd never even consider buying a pre-built pc for that matter), but I saw a good price, good sized screen, and just bought it without really even considering the specs. Aside from a few of the early Palm devices, it's the first "non-pc" computer/tab I've owned, (never really took them too seriously, that opinion's changing!), I honestly had no idea it was 32 bit :o. NOT a mistake I'll make twice, but I have it now, so in the interest of making the best of it...

So is this just a "if that didn't work it can't be done" thing? To be sure I'll run through it a few more times, but I did it a few times already with no results, so I'm not holding my breath. Is there maybe another script similar to autoroot.sh for 32 bit? Not even going to kid myself that I could 'adjust' it, (although I'll probably RTFS anyway, in the unlikely event it's an adjustment I can figure out).

Just to clarify, for my own peace of mind/future reference, here's how I came to the 'dd' params I used (and in case there is a script for 32 bit):

root@linux-pslk:~/devel/android-sdk-linux/platform-tools> adb shell

shell@e9lte:/ $ ls -la /dev/block/bootdevice/by-name/system
rwxrwxrwx root root 1970-01-01 13:23 system -> /dev/block/mmcblk0p32

shell@e9lte:/ $ cd /sys/block/mmcblk0/mmcblk0p32

shell@e9lte:/sys/block/mmcblk0/mmcblk0p32 $ cat start
655360

shell@e9lte:/sys/block/mmcblk0/mmcblk0p32 $ cat size
5619712

##Assuming block size is 8192 --
##512 * 655360 = 335 544 320/8192 = 40960
##512 * 5619712 = 2 877 292 544/8192 = 351232

Did I do that wrong, (the guide I followed wasn't device specific)? If so, what am I missing?

I'm kind of playing "catch up" in the mobile device venue, even though it's using a linux kernel, they're unfortunately different enough from a pc in most other aspects, that, that's not as easy as one might think. So in that regard, just trying to gather as much info as possible, in as short a time as possible, any books, posts, tutorials/guides, by any chance, you could point me towards to that end(not to be a pain, and if you've got the time that is)?

Thanks in advance, and I appreciate your previous replies!
[G4 General] player911:
It just seems your device partition structure is different. I still think the method is doable.

The first step is just getting it to copy your system image. Once you figure that out, the rest is easy. Although as smanson stated, the injection files are for 64bit. So that will also need to be tweaked for your 32bit device.

smanson is awesome. smanson helped me and hopefully can figure out the issue here. Definitely on my christmas donate list this year.
[G4 General] releech85:
Thanks all ... This was very helpful!
[G4 General] smason:
OK!

Remember, You are my eyes and hands in this case, because I'm not owner of a LG device like yours.

Can you show me from the following point of filesystem, because I saw your previous output of mount command that reports a different special file for the /system:

From adb shell (state of smartphone: normal boot):

shell@e9lte:/ $ ls -la /dev/block/platform/msm_sdcc.1/by-name/system

and after, please follow recursively the link obtained.

From send_command shell (state of smartphone: Download mode):

Author : blog.lvu.kr
SPECIAL COMMAND : ENTER, LEAVE

#/system/bin/toolbox touch /data/media/0/Download/hello
#/system/bin/toolbox ls -la /data/media/0/Download/hello
-rw------- root root 0 2015-02-16 18:41 hello
#
#/system/bin/toolbox cp /default.prop /data/media/0/Download/
#/system/bin/toolbox cp /system/build.prop /data/media/0/Download/
#/system/bin/toolbox ls -la /data/media/0/Download/build.prop /data/media/0/Download/default.prop
-rw------- root root 11757 2015-02-16 19:02 build.prop
-rw------- root root 359 2015-02-16 19:02 default.prop
#

Zip default.prop and build.prop and please attach it to your next post.

Many thanks in advance!
[G4 General] player911:
Fantastic. This method will also ease devs for future rooted firmwares. I really cannot see LG being able to patch this, since this is basically a 3rd party LG Flashing tool. If they block this method, then their own tool will ultimately die with it.
[G4 General] GavTheStoner:
Fantastic! I had almost given up hope of root on my EE LG G4. Have just used this method and now rooted perfectly!

hackarchive You rock! Have a thanks!
[G4 General] hackarchive:
True and with this unrooting is just flashing a compatible KDZ with LG flashtool. Using normal flash will not wipe data of course. They can't even know your device was rooted when you send it in for warranty. For those asking this doesn't wipe data so you lose nothing. During testing I even hoped between a rooted phone flashing my stock KDZ to unroot and re-rooting without losing anything.:p:cool:
[G4 General] articular:
THANK YOU

everything worked fine and i successfully got my g4 rooted

my variant is H815TR

all steps easy only the ubuntu part was a bit hard especially for a windows user ( finding an ubuntu version and usb install etc. not root injection part)

ty ty ty again :))
[G4 General] sefirosu0522:
Dumb question but I have to ask it. If we have the Verizon version, should we use this driver:

It's not listed in OP so figured I'd ask.
[G4 General] Ezylife:
Hello all, How long should step 1 - 11 take i have been sat waiting for about 2 hours is this normal.

if not can i just unplug and try again, i've just come from samsung where you hand to disable firewalls to do low level stuff do you need to do that with LG.

Unpluged and tried again took about 30 seconds.
[G4 General] rirozizo:
if it were for me to decide if we should delete the low effort root method, i'd totally delete it.

"The more 'manual', the better"
[G4 General] articular:
Btw why this thread in g4 general?

This thread has to be in original android development section imo
[G4 General] Moe5508:
Only method that roots my device successfully...I updated to 10e of the H815P and using this method (and only this!0 I was able to root my phone...ah felt so good...

The other 1-click rooting methods I came across in other parts of this forum just fail on the G4...
[G4 General] E_B_E:
Posting to say this method worked well for my H815 ver 10c. So you can count that model as a success. I was a bit wary of using the "main" root method of writing the whole partition image from uncertain sources, this method changes a minimum of files so it seems safer from a security perspective.

I also have a problem however... encryption no longer works after I rooted the phone. After launching the process from settings, the phone reboots as normal to start encrypting, but gets stuck on the LG logo. Waited 20-30 minutes and then unplugged the battery, the phone works proving the encryption process did not even start... Thanks for any ideas!
[G4 General] spiderio:
can I delete/add some apps from this system.img ?

how to edit the system.img for that?
[G4 General] storm91:
No pain no gain. I've used this method and if you're English literate, you will have no problem doing this and it has the same level of difficulty. Maybe you get spoonfed too much early on when using Android Phone so you don't know what's the real process
[G4 General] iakovl:
so this method will work even on a 815L F rom?
[G4 General] goksemozkan:
Selam Gökhan ben, konu hakkında yardım edermisin. mail adresim goksemozkan@gmail.com
[G4 General] sefirosu0522:
I'd hate to quote myself but I'm still looking for this answer. Are these the drivers to use?

Verizon - http://downloads.codefi.re/autoprime...QL_v2.22.0.exe
[G4 General] hackarchive:
Drivers won't brick your phone. Install them on your PC and after connecting your phone check device manager. That should tell you more. Even if you use the right drivers still check device manager to be sure before flashing anything.

I made this purposely for odd variants. It should work,definetly. I haven't had a report yet that it failed.
[G4 General] karendar:
Are you the owner of the autoroot script? If not, how about you give thanks to the people who bothered to make it? Your post is basically all that's already been said in the root thread as well....
[G4 General] hackarchive:
Don't blame me if you can't read. None of those thread helped me root successfully as they hadn't my sytem image. Instead of hating learn to appreciate. I wrote this thread to be eloquent so that anyone reading won't run around the web searching for God knows what. This is a more eloquent guide, I don't see the problem. One size fits all is a myth. Duh!
[G4 General] karendar:
Fine, seems like I did miss this when reading through the xda app. I still think your thread basically rehashes what's already been said multiple times to multiple people... Good if it helps some of you, but it's still terribly repetitive.
[G4 General] rirozizo:
this guide right here is a MUCH wider topic than Low Effort Root because whatever variant you have, you can do the work yourself. Low Effort Root is the final product, but this is the process to get the final product. It helps all of us, and it's not repetitive because this is basically a more detailed way of rooting.

If you don't understand how injecting root into your system image works, then just follow low effort root and stick to that and wait for them to follow this guide and release a system image for your variant.

Theoretically, this method right here will also give you the ability to OTA, lose root, then reroot the updated image, perfect!
[G4 General] Mika83AC:
Your method and guide worked perfectly! A very huge thanks man! :good::good::good:
[G4 General] hobbit101:
Does thi still work for Vs98612a?

Hello everyone, I tried searching this thread for previous users with my OTA version and I am alittle confused if it worked or not. So I am on Verizon vs986 OTA 12a, never rooted before and I am willing to give this a shot, can someone confirmed that I can indeed still use this guide? and I just want to know if its possible to restore back from a KDZ? which from my understanding is a no? and if that's the case it sounds like my only restore point is from my system image backup from step 1?

Any help is really appreciated.

Thanks!
[G4 General] laperro:
You lost me a little on what I'm doing after:

shell@e9lte:/dev/block $ ls -la /dev/block/platform/msm_sdcc.1/by-name/system
lrwxrwxrwx root root 1970-01-16 06:50 system -> /dev/block/mmcblk0p32

...is the output I got, not sure what you meant by:

(apologies if that's dense of me :D) or what else (if anything) I was supposed to do there.

Kind of weird, even though they went to 'Download' I still had to change permissions on them to get them to copy, windows kept telling me "unspecified error" till I did 'chmod 755' on them. I'd expect that if I was trying to cut/move them, but for just "copy" it seems strange, seems like LG/VZW REALLY want to keep you from rooting...

At any rate, build.prop and default.prop are attached.

Thanks!
[G4 General] smason:
Good! The copy operation works!

So... if you have free space on the /data/media/0/Download is now time to create the raw copy of your /system (~2.8 Gbyte).

From send_command shell:

# /system/bin/toolbox dd if=/dev/block/mmcblk0 bs=8192 skip=40960 count=351232 of=/data/media/0/Download/system.img
# /system/bin/toolbox chmod 644 /data/media/0/Download/system.img
# /system/bin/toolbox chown media_rw:media_rw /data/media/0/Download/system.img
# /system/bin/toolbox chcon "u:object_r:media_rw_data_file:s0" /data/media/0/Download/system.img
# LEAVE

After, with the adb shell copy in your Linux environment with:

adb pull /data/media/0/Download/system.img .

Now it is necessary to work for a different "root inject script", with the default.prop and build.prop and the lg_root.sh the job should be simple.
[G4 General] DaBunny:
VZW13B image

Has anyone gotten an image of Verizon's new update (13b) yet? (As far as I know it just came out today so I assume not, but never hurt to ask...)
[G4 General] smason:
Here a new Inject_Root_LG-Gpad for your device.
[G4 General] smason:
[MENTION=6438691]laperro[/MENTION]

After made the rootedsystem.img inject it into the device with adb:

root@linux-pslk:~/Desktop/Inject_Root_LG-Gpad> adb push rootedsystem.img /storage/sdcard0/

Obviously, pay attention when inject rootedsystem.img into the slice of disk/MMC of your device, choose the right parameters of DD command, notice the use of "seek" instead of "skip", because http://man7.org/linux/man-pages/man1/dd.1.html

so, from send_command shell:

# /system/bin/toolbox dd if=/data/media/0/Download/rootedsystem.img bs=8192 seek=40960 count=351232 of=/dev/block/mmcblk0
#
# LEAVE
[G4 General] reg66:
quick question, just about to (hopefully) root using this method.

do i need to enable USB debugging for step 1, or any other steps?

cheers

---------- Post added at 08:30 PM ---------- Previous post was at 07:42 PM ----------

i see you're online and hoping you get this soon. as per the above question:

do i need to enable USB debugging for step 1 in OP, or any other steps?

sorry, nothing to do your posts, but really want to get started rooting this G4 i've just got
[G4 General] Jens1969:
Why does it matter?

But to answer your question: no.
[G4 General] reg66:
just wanted to be sure i get everything right. thanks for the answer, but i got impatient and started the process anyway - figured it wouldn't work on first connection if i did need it enabled. cheers
[G4 General] boxa72:
Ur better off just turning on usb debugging and leaving it on as that way it's one less thing u have to worry about
[G4 General] jkatt:
Thank you. This was my first time using Ubuntu. It was liberating being able to root this way. It took me about 3 hours to figure out everything to make sure I did it right the first time. My VS98613B is now rooted.
[G4 General] Sea-Wolf:
It does take a little while the first time, especially if you're not familiar with Linux, but next time you'll probably go through it in less than half the time. :)
[G4 General] Dyscalculic:
Hopefully someone shares a rooted VS986 13B VZW image without debloating. Seems like quite a work to do Ubuntu VM at this time.
[G4 General] dcorrea:
Maybe a dumb question but is Ubuntu required or will any Linux Debian based distro work such as Mint? Im pretty sure I can use Mint but want to make sure before I get going to root my VS986 13B variant.
[G4 General] laperro:
Still no luck, closer, but not quite there...

I managed to get the image (I think), the reason I say that, well, here...

#/system/bin/toolbox dd if=/dev/block/mmcblk0 bs=8192 skip=40960 count=351232 of=/data/media/0/Download/system.img
#
#ls /data/media/0/Download
#

so I tried this, just to see if 'dd' was working...

#/system/bin/toolbox dd if=/build.prop of=/data/media/0/Download/build.prop
#ls /data/media/0/Download
build.prop

ok so since...

shell@e9lte:/ $ ls -la /dev/block/bootdevice/by-name/system
rwxrwxrwx root root 1970-01-01 13:23 system -> /dev/block/mmcblk0p32

...gave me that, I tried...

#/system/bin/toolbox dd if=/dev/block/mmcblk0p32 bs=8192 skip=40960 count=351232 of=/data/media/0/Download/system.img
#ls /data/media/0/Download
build.prop
system.img

Yay, it worked, (I thought)but here's the problem, when I pull it onto linux to run the script:

linux-pslk:/devel/android-sdk-linux/platform-tools/injectroot/Inject_Root_LG-Gpad # ./autoroot.sh
mount: wrong fs type, bad option, bad superblock on /dev/loop4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
<obvious 'file doesn't exist' stuff snipped>

it renamed the image to: 'rootedsystem.img', but I'm pretty sure it isn't (rooted), since it wouldn't mount,

'dmesg | tail' unfortunately, turned up nothing but a bunch of network connections. I tried manually mounting it as a loop device:

linux-pslk:/ #mkdir /mnt/img
linux-pslk:/ #mount -o loop,rw -t ext4 rootedsystem.img /mnt/img ##I tried it with '-t auto' option as well##
mount: can't find /mnt/img in /etc/fstab
###Then I thought, well maybe it needs to be an iso, so after a lot of searching on the net, I tried:
linux-pslk:/ #ccd2iso rootedsystem.img system.iso
Unrecognized sector mode (0) at sector 0!

So since ccd2iso doesn't recognize it either, was adding the 'p32' to 'mmcblk0' not such a good idea? I mean, it copied (and wouldn't as just 'mmcblk0') but if it won't mount, it maybe didn't copy correctly? Does it need to be just 'mmcblk0' to get a correct image? I'm back to stumped...

With any luck it's just some bonehead mistake on my part, but if it is, I can't see it. I've been searching around for a couple days now, for some alternate method to mount it and haven't turned anything else up.

Thank you kindly for the assistance! I don't mean to monopolize anyone's time here, hopefully this all will be helpful to someone else at some point...

Cheers
[G4 General] smason:
Awesome!

Your device allow to use the slice /system of the MMC, therefore to achieve a raw copy it is very simple: use DD without "skip" and "count" because the special file mmcblk0p32 it is your /system.

#/system/bin/toolbox dd if=/dev/block/mmcblk0p32 bs=8192 of=/data/media/0/Download/system.img
#ls -la /data/media/0/Download
# /system/bin/toolbox chmod 644 /data/media/0/Download/system.img
# /system/bin/toolbox chown media_rw:media_rw /data/media/0/Download/system.img
# /system/bin/toolbox chcon "u:object_r:media_rw_data_file:s0" /data/media/0/Download/system.img
# LEAVE
[G4 General] Izberion:
Very likely since Mint is Ubuntu based. But sometimes you never know. I did the stupid thing and used Arch. Got some errors but thought it might be fine. Flashed the image and now it's stuck on the verizon screen. The backup image I made won't take either. I should have loaded Ubuntu in a vm or at least checked the shell script to make sure I had all the libs I would need. Tried all kinds of things to repair which included flashing the 11a kdz in frustration. Knew it would brick it but I did it anyway. Now it's either get a replacement from verizon. If I can't I'm going to the nexus 6p
[G4 General] smason:
[MENTION=6438691]laperro[/MENTION]

Pay attention and verify the following:

After you made the DD, the system.img must be 2877292544 byte.
[G4 General] Makster:
The script is generic bash. It should work on any Linux, including RedHat based ones and others.
[G4 General] dcorrea:
[/COLOR]

Sorry to hear about your situation. I have heard of Big Red honoring the warranty on bricked G4s after a bad KDZ in some other threads., especially after the 12b updated hit the streets so hopefully you get yours taken care of.

I have Mint and Windows on a dualboot and I had all sorts of issues because I tried to make things a little easier, but in the end it took way longer for me to get this done. I tried to copy the img file from my phone to my Linux Home file with no luck. I kept getting a filetype error. So then I booted into Windows and installed VM to load up a Ubuntu vm in order to be able to drag/drop from my Win 10 files to the VM install. That didnt work either! I had guest additions and the extension files all loaded but I could not access my Windows filesystem even though I explicitly shared the folders I wanted to access. So in the end, I just booted into Windows, copied the file to the harddrive, then rebooted into Linux to inject root.. then back to Windows to finish up. Should have just done that from the get-go, and probably would have saved a few hours of frustration.

---------- Post added at 10:56 PM ---------- Previous post was at 10:52 PM ----------

Does anyone know why I couldnt copy the system. img file from my phone to my Linux Desktop even though my Linux partition is formatted as ext4? I would think that filesize wasnt the issue, but I dont know what would cause that. I had to boot into Windows in order to copy the file. Since I don't want to hijack the thread with this slightly OT question, feel free to pm me if you have an answer or possible fix.
[G4 General] Colchiro:
I agree. Not interested in a debloated image just to get root at this time.
[G4 General] victorinoxs:
wow!!! can't thank you enough!! followed the instructions to the letters and it worked like a charm!! Now I can finally debloat and use Greenify. Thanks!
[G4 General] eplgr:
Situation & question:

As I stated before, I rooted successfully my H815AR. Now there's an OTA available but obviously it won't allow me to install it because my device is "suspected of rooting".

Anyway, I saved the original system image I obtained by using this method, and I read around here that you can flash it in order to get the OTA.

Basically, common sense tells me I have to go straight to STEP 3, but replacing "rootedsystem.img" with "system.img" in the lines, which would be:

From:

dd if=/data/media/0/rootedsystem.img bs=8192 seek=55296 count=529920 of=/dev/block/mmcblk0

To:

dd if=/data/media/0/system.img bs=8192 seek=55296 count=529920 of=/dev/block/mmcblk0

Is that right?

Thank you.

Side note: the kdz thing is not an option because my version is not there.
[G4 General] smason:
Yes!
[G4 General] eplgr:
So easy.

Thank you.
[G4 General] smason:
Before replace the /system with original version can you try to enable into hidden menu OTA update?

From phone digit 277634#*#

Field test > WiFi test > OTA setting

Many thanks in advance.
[G4 General] eplgr:
I enabled that option but nothing changed. Headed to download the OTA, but trying to install it would give back the same error caused by having rooted the device in the past.
[G4 General] smason:
Thank you!

If you want try also unroot feature of SuperSU.
[G4 General] eplgr:
That was my first move, but it wasn't enough: aftering googling about this it seems like you have to flash your original image/the kdz file.
[G4 General] smason:
OK!

Game Over!

Time to inject the original system.img.

The practise to mantein the original system.img it is always a salvage anchor.

Cheers.
[G4 General] dcorrea:
OK I fixed this. If anyone is having issues copying from your LG G4 to your Linux based system (Mint specifically for me), you may need to edit the /lib/udev/rules.d/69-libmtp.rules file to get your G4 to properly mount as an MTP device. If anyone wants to know how to specifically do it, just pm me and I will send you the instructions that worked for me.