yashsingh1/xdaforums huggingface dataset:
[G4 General] poundonu1:
I have an LG G4 Sprint LS991ZV9 with the latest OTA Marshmallow (6.0). The update to 6.0 screwed up my external SD card access and actually changed the folder path to the External SD. Normally, in Linux, or Rooted android, I'd just create a link in the filesystem to fix the problem. But since there is no root option for Marshmallow I'm pretty screwed.

Is there any word on how to root an LG G4 with LS991v9 (6.0)?

Thanks in advance, and thanks for all your previous posts...they were a great help.
[G4 General] divineBliss:
Run ports.bat. Either double click on it or open a command prompt in the folder it's in and type ports.bat . :)
[G4 General] Leavard:
I'm using Fedora 64-bit and selinux is enabled.

I ran through the log procedure, see attached text file. I can't see much difference between yours and mine but it still didn't work.

I did notice this time that I can't run command (id, pwd, la etc) after pushing interstate.img. Is this normal?
[G4 General] smason:
So do I.

Finally the problem appear! 8-) Thank you!

As you can see the selinux context of the root inject files are totally wrong.

As you reported:
[jacobmclaughlin@xerxes xbin]$ ls -laZ su daemonsu sugote
-rwxr-xr-x. root root system_u:object_r:unlabeled_t:s0 daemonsu
-rwxr-xr-x. root root system_u:object_r:unlabeled_t:s0 su
-rwxr-xr-x. root root system_u:object_r:unlabeled_t:s0 sugote
[jacobmclaughlin@xerxes xbin]$

Must be, as I reported:
[root@jarvis xbin]# ls -laZ su daemonsu sugote
-rwxr-xr-x. root root u:object_r:system_file:s0 daemonsu
-rwxr-xr-x. root root u:object_r:system_file:s0 su
-rwxr-xr-x. root root u:object_r:zygote_exec:s0 sugote
[root@jarvis xbin]#

As you can see "unlabeled" is a source of problems at http://blog.siphos.be/2013/05/why-oh-why-does-a-process-run-in-unlabeled_t/

Notice: "In permissive mode, this will be visible easily; in enforcing mode, the domains you are running in might not be allowed to do anything with unlabeled_t files, directories and processes, so ps might not show it even though it still exists:"

I attach a new log procedure. In this case I previously verified the selinux context of the "reboot" file, the source for the context of SuperSU files.

Why commands like this "chcon --reference=operatingtable/bin/reboot operatingtable/xbin/su" not works on your environment?

Happy new year!
[G4 General] Kaiser Droid:
I get:

C:\Users\User\Desktop\LG_Root>port.bat

'port.bat' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\User\Desktop\LG_Root>

I tried that, also, LG Bridge said it can't find my device. I don't have the original LG cable, is that going to be an issue?

Another thing,by download mode it means the "Firmware Update" screen, correct?
[G4 General] divineBliss:
The name of the file is supposed to be ports.bat - plural - note the "s" . Propagated that error from your post. Do the instructions say port.bat or ports.bat ...... Anyway make sure ports.bat is in the LG_Root directory and try again with the correct filename this time :) .

If it does not work, type "dir" from the command prompt and post the output filenames here.
[G4 General] Kaiser Droid:
My eyesight is wore than I thought, haha, yup, it worked! Thanks sooooo much!
[G4 General] Kaiser Droid:
Questions...

Hey, Step one didn't work, don't have system.img in my internal storage. LG Bridge isn't recognizing my device, so I downloaded LG PC Suit to try and update my drivers again, but that froze - is there a different way to update drivers for Verizon G4s? I seem to see some info on this, but nothing concrete.
[G4 General] woozzy101:
For Verizon Drivers install this:

http://downloads.codefi.re/autoprime/LG/LG_G4/LG_VZW_United_WHQL_v2.22.0.exe

Are you on 13b software for Verizon?

Check out this thread too: http://xdaforums.com/verizon-g4/general/vs98613b-saved-image-rooted-t3258794/page9
[G4 General] Leavard:
Log attached.

The context of "Reboot" is unlabeled in the original system.img, so that is where the others are inheriting this from.

My understanding of this is that the actual context category of reboot is not recognised by the selinux module in the kernel of my Fedora system, so it gets a default context of unlabeled, and is therefore blocked by selinux.

This probably means that something is wrong with my Fedora that is wiping out the context of anything it doesn't recognise once I mount system.img. I didn't think to check the context of other files to see if anything showed up as something other than unlabeled, but this would provide some evidence for this.

Since the context needs to be propagated, it seems unlikely that it would be as simple as switching to permissive.

You are using Fedora 21, whereas I'm on 20. I can't upgrade the system atm as it is a work one, but I'll go have a look to see what changed between versions in selinux.
[G4 General] smason:
OK! To maintain unaltered your environment you could create a memory stick with a Live version of Fedora (v.23) than mount the filesystem of your Fedora 20 and verify the root procedure... etc. It is only an idea! Take your time.
[G4 General] Kaiser Droid:
Ah! I downloaded it before, but it wasn't showing up when I did. Worked now on Chrome.

Yes I am, so I just have to follow those steps and I'm rooted?! Seems really straightforward.
[G4 General] woozzy101:
If you are on 13b, you don't have to worry about the kdz stuff. That is only if you were on an earlier version of Verizon software like 11a.

Those instructions after the kdz part are basically the same instructions as the OP has in this thread (Step 3 ->Root). Just follow either and you will be rooted on 13b.
[G4 General] pikachukaki:
Can i root h815 on MM with this?
[G4 General] sanioclement:
how to unroot

how to unroot to get the OTA updates ?
[G4 General] Jens1969:
No.
[G4 General] pikachukaki:
so there isnt a modified kernel for the g4?
[G4 General] woozzy101:
Not on a locked bootloader unfortunately :(
[G4 General] antus:
added the optus 10c rooted image earlier in the thread here: http://xdaforums.com/g4/general/lg-...tives-root-t3180586/post62399597#post62399597
[G4 General] optiplex2012:
yes it works, i have 815L rooted using this method
[G4 General] Weetbix:
I finally got my laptop sorted out and gave this a go. I can confirm that the SEA version of the H815 (software version : v10b-sea-xx) definitely works with this method.

Just incase anybody else comes here searching for info on the SEA model....
[G4 General] john7760:
Anyone know if doing a Factory Reset to clean things up will cause any loss of root?

Not sure if I have a problem with xposed or what because sometimes the phone stays locked on the verizon screen and I need to pull battery for it to boot where it optimizes every app and takes forever.

Thanks in advance
[G4 General] SecondRoom:
lost..

need a help..

did step 1 and 2 excatly as the guide explain.. the problem is in step 3 - the root

i open the command window within the LG_Root folder

write this command first: Send_Command.exe \\.\COM3 (<- checked this com number)

enter to: send command mode

press id and enter (to check everything is ok) got this line:

uid=0<root> gid=0<root> context=u:r:recovery:s0 (so everything fine..)

then enter this command (my model is H815L firmware: V10f)

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

but the root process dont start from some reason.. after i press enter i return

to this letter "#" again ..

can some1 maby knows what i did worng..

Thanx in advanced...
[G4 General] optiplex2012:
why is your command using other img name than is specified in the thread instructions

for H815L it suppose to be

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

did u do the 1st part of backing up your image correct and injecting the root in linux ? the file name suppose to be rootedsystem.img

did u change the file name yourself before returning it to the phone ?

u must follow the instructions exactly, i did it this way and it works great in my H815L
[G4 General] SecondRoom:
and found..

i wrote wrong command to flash system...

everything is great.. the device is rooted..

thanx optiplex2012 !

big appreciate to the ppl who r behind this method..

amazing job !

thanx a lot..
[G4 General] vegetaleb:
You need Ubuntu or there is a Windows tutorial?
[G4 General] Makster:
The script needs to be able to mount Linux partitions, and it relies on bash.

Any *nix will work, including Apple's OSX (maybe with minor tweaks), but any Linux will as-is. Ubuntu, RedHat, SuSe, anything.

It's probably possible to do it with Windows, but it would be a headache, and since you asked the question in the first place, you probably don't need that headache. :)
[G4 General] CraigUK87:
Forgive me if this has already been asked, but can we now whack a custom recovery on with this root...or is the bootloader still unpassable?

I'm using EE UK G4 variant, i've already rooted with the "Low Level Root" method.
[G4 General] optiplex2012:
as far as i know atm only the 815EU can be bootloader unlock
[G4 General] barbaros:
Thanks million times.

Thank you button is not enough. I need devs donation links. Can someone provide the links ?

(Rooted my H815TR with no problems)
[G4 General] nussie:
Worked like a charm, thanks [MENTION=4545681]hackarchive[/MENTION]! South African LG G4 H815P.
[G4 General] eitama:
1st, Thanks to OP and all involved. I got the H815L and decided to go for it.

At step 1, where you DD the system partition into a file, I got a file with size of 2.7GB size created (system.img)

Trying to mount it on CentOS failed, so I installed Ubuntu and that also failed with the same error - "wrong fs" something.

I suspected that 2.7GB was too small for the whole system partition, but, I saw I still have 1GB left of storage, so assumed it's a complete file. I was wrong.

After clearing some videos and crap, I had 10GB free, performed the DD command again, and got a file of 4GB size ~.

Worst part is that in Send_command.exe, after the DD command was done, I had "#" prompt with no error of the kind that suggests not enough space or any other error in fact.

Also, the auto_root.sh script renamed the system.img to rootedsystem.img even though it did nothing. So I don't know who maintains that script, but the script should MD5 the system.img file, and if it's still the same MD5 right before renaming to rootedsystem.img, an error should be given to the user.

Now I'm moving on to part 2 again. So the OP, I would suggest adding to instructions :

1. Make sure you have atleast 6GB~ free on internal storage

2. Make sure system.img file size is around 4GB and no less.

Good luck to all users :)
[G4 General] eitama:
After repeating with free space, everything went perfect.

Thanks! H815L with V10F.
[G4 General] hackarchive:
Glad to hear everyone has positive results. Proving how flawless it is atm. If you get errors please check again on your end. Probably a wrong command or copy and paste error or no free space as said above. My guide should work as intended. If you get an OTA and are unrooted just root again.:good:
[G4 General] htconesever:
hi. i couldn't root my phone h815TR. on step 1 when i write send_command... code i can't see # character i'm getting;

author blog.lvu.kr*

special command enter leave warning. anyone can help me? thanks. by the way all drivers, files are ok.
[G4 General] baileyjr:
Thanks for the guide worked well for me.
[G4 General] niftium:
I'm about 1.5 hours into this step, but still not seeing #. How long did this step take for those of you who have tried it? I know dd can be slow, but this seems uncommonly so.
[G4 General] Ezylife:
It shouldn't take that long. Switch off and try again.
[G4 General] pikachukaki:
Perfect..and i always wonder why G4 sales suck...now i got the answer!
[G4 General] Kaiser Droid:
So, "Download the rootedsystem from the first post of this thread, extract the .img and put it [on the root of] the internal storage of the phone." so after unzipping I create a folder in my phone's internal storage called "[on the root of]" and copy that "rootedsystem.img" there from my PC?
[G4 General] woozzy101:
Don't create any folder on your phone's internal memory to put the image in. Put the rootedsystem.img straight in the phone's internal memory, not in any folders.
[G4 General] divineBliss:
Well actually it's referred to as the top level folder, like C:\ would be on your PC.
[G4 General] woozzy101:
Let's not confuse him/her by saying to put in a top-folder or sub-folder.

And top folders are actually the very first folders that would be in C:/ not the c drive itself. :)

If I wanted to be technical, I would say to put the rooted system image on the phone's internal root directory. But wanted to use small and easily understood directions.
[G4 General] Kaiser Droid:
So, when I type "id" after "#" I get:

C:\Users\User\Desktop\LG_Root>ports.bat

C:\Users\User\Desktop\LG_Root>reg query HKLM\hardware\devicemap\SERIALCOMM

HKEY_LOCAL_MACHINE\hardware\devicemap\SERIALCOMM

\Device\00000081 REG_SZ COM5

\Device\00000082 REG_SZ COM6

\Device\LGVZANDNETMDM0 REG_SZ COM3

\Device\LGVZANDNETDIAG1 REG_SZ COM4

C:\Users\User\Desktop\LG_Root>pause

Press any key to continue . . .

C:\Users\User\Desktop\LG_Root>Send_Command.exe \\.\COM3

Author : blog.lvu.kr

SPECIAL COMMAND : ENTER, LEAVE

#id

#

No, " [something similiar to "uid=(0)root gid=(0)root"]"
[G4 General] divineBliss:
Let's get our terminology straight:

http://pcsupport.about.com/od/termsr/g/rootfolder.htm
[G4 General] woozzy101:
There are videos on how to root. I think you need to watch them because I think you are missing a few crucial steps. I'm on my phone, in bed, about to go to sleep, but I can get a few links tomorrow for you if you can't find any videos. You need to be in download mode on phone when doing those steps.

Awesome, thanks for confirming what I said. Now stop the bickering and word terminology and actually help the people asking for help. They figured out what both of us were saying and that's the important part :)
[G4 General] Kaiser Droid:
I am in Download Mode (well, it says "Firmware Update", but that's technically download mode, right?), anyhow, I'll do some YT'n. Any links would be greatly appreciated though, lists and words seem to be easier for me, lol.

Thanks so much for the help!
[G4 General] divineBliss:
You are the one bickering.

Did I say c drive? No, you invented that part.

And it's not c:/
[G4 General] luusid:
Marshmallow

Hey I have the taiwan h815 (twn). I rooted it using this method however was wondering is there a similar method for Marshmallow if I upgrade. I cannot unlock my bootloader because it is twn. So is there a similar root injection for android 6.0
[G4 General] divineBliss:
Have you see the end of post #1 which references post #296?

---------- Post added at 01:08 AM ---------- Previous post was at 01:01 AM ----------

It's not clear to me what step you are on? Are you still stuck?

Have you seen the videos on

http://xdaforums.com/showpost.php?p=62028523&postcount=2
[G4 General] Blobx:
Will this work on my H815 EUR V10d with the bootloader still locked?

Thanks :)
[G4 General] luusid:
Yes, I have a locked bootloader H815 TWN and it worked.
[G4 General] ndxtg:
H815T v10h - Virgin Mobile Australia

successfully rooted with this method

out of curiosity, does anyone know whether I can install TWRP after this to install some mods in the L4 Theme & App forum? Also, what is boot loader for and how to check if it's locked?

many thanks
[G4 General] falle21:
The h815t AUS version have the bootloader locked, you can't unlock yet, I have the same, and you cant install twrp with booloader locked. you have the .img you use to root your phone? If don't bother you, can you upload and share the link with me? Thanks

Enviado desde mi LG-H815 mediante Tapatalk
[G4 General] Almighty1:
That's actually old, I've been using 2.23.0 since August 2015, search for LG_VZW_United_WHQL_v2.23.0.exe. Wonder if there is something newer than 2.23.0 though.
[G4 General] Wish2l:
Will this method work on H815 V10-e-SEA-XX variant?
[G4 General] Blobx:
I can confirm it works on H815 EUR V10d with bootloader locked .

Thanks for your work!
[G4 General] speedingcheetah:
Link for the Verizon G4 in the post linked to in step 1...for the rooted system image has been removed.
[G4 General] dadrumgod:
I just got a laptop with windows 10 I can't get the LG Verizon drivers installed right for nothing but a few weeks ago worked fine on my dads windows 10 PC... Might be something there idk
[G4 General] Almighty1:
Give these a try:

http://www.4shared.com/file/wshAgR4zce/LG_VZW_United_WHQL_v2230.html
[G4 General] jmcito1:
So I followed the instructions perfectly. My phone is on Android 5.1 VS986 13B unrooted. I got a system.img in the root directory of the phone's internal memory (as seen under the file manager of the phone). It's at a size of 4.18 Gb. However, when I tap on the file, the phone says "File type not supported". I ran the ports.bat after I made sure that adb detected the phone using adb devices and made note of the port for the DIAG1 COM number. The phone was in download mode, I ran "Send_Command.exe \\.\COM8", got the author and special comman lines, typed id and got the "uid=0(root) gid=0(root) context=u:r:recovery:s0" and then pasted the command for VS986 ("dd if=/dev/block/mmcblk0 bs=8192 skip=65536 count=548352 of=/data/media/0/system.img" which was a copy and paste for the VS986 command from the Low-Effort root thread for backing up the system image) and type LEAVE after the # appeared. However, I cannot copy the image onto my computer, an 8 Gb USB drive or the 32 Gb microSD card in the G4. When my brother tried to move it using Linux (Linux Mint), it said something about file type not supported and he could not copy it or move it either. Any suggestions as to what I may have done wrong or what can be done? I am currently reading through this entire thread and others as well but that will take some time. I don't mind, since I learn a few things here and there but I was wondering if anyone can point me in the right direction. Thanks a lot in advance. Also, can anyone tell me why the command to store the image in the internal memory of the phone is "of=/data/media/0/system.img", as opposed to "of=/storage/emulated/0/system.img", which is what I see when using the file manager of the phone?
[G4 General] divineBliss:
http://forums.androidcentral.com/an...n/347739-confused-about-internal-storage.html
[G4 General] hackarchive:
hint driver signature verification.
[G4 General] natha98ab:
Hello, im running ubuntu using a virtual machine on Virtual Box. I can manage to get root access on the virtual machine but i dont know how to get to the "Inject Root" folder from the virtual machine. Can somebody please help me?
[G4 General] DsturbD:
just browse to it. where did you extract it to begin with? you should be able to see all your drives and folders in the VM. if you can't just download it again while in ubuntu and extract it
[G4 General] sam razzy:
DELETED
[G4 General] Oletros:
But that post is from October, since SuperSU 2.52 it has been posible to root without using a modified boot.img. Perhaps now it should be possible to inject root in an image
[G4 General] FeNominal:
Sorry if this has been asked before, but explain to me why this doesn't work on MM... tried on LP with all instructions followed and when i hit enter to begin the image pushing process to internal sd it just throws a # :silly:
[G4 General] dadrumgod:
When you get the # just wait a lil bit and give it time to transfer it. After a lil bit try to continue it is probably there, but I would just download the img strait to your phone and leave out the whole process of moving it. That's what I did and unless you are bricked why even bother transferring it. I would always leave a copy of the system img on your internal just in case you brick it'll always be just a couple clicks to fix
[G4 General] heribruc:
First, Sorry for my english.

Can i use centos linux (red hat linux) instead of unbuntu? or just work on unbuntu?

Because, I have H815p from telefonica México (movistar). I flash v10h from emirates, I follow the commands and i get the system.img , I rooted on centos and get a rootedsystem.img ... so far so god, but when i flash it to the phone, i get a bootlop for hours, so i flash the original system.img to get back the phone working, i think i have lucky because it works.

But i dont know if it's a problem with cento linux or a problem with the phone.
[G4 General] yaz109@hotmail.com:
first post for my LG G4 h81210N from roger wireless montreal

hello guy my name is mickael, i just receive this lg g2 2 month ago, i wanna root it just like i did on this forun my my old lg g2,

its a modele from roger wireless from business from montreal, modele is show as h81210n.

i have seen post about h81210h and h81210g modele, so i kinda worry about doing into this process.

there is so many tread here and there, kinda get me confuse, i got the starter stuff from a tread for alll canadian carrier, link here

http://xdaforums.com/g4/general/canadian-guide-complete-source-lg-g4-t3212449

LG Flash Tool

Windows Drivers

LG Bridge for Windows

do i have to restore the factory setup first? how a can go along with h81210n
[G4 General] player911:
Your LG G2 shouldn't use this method to root. Your older firmware allows you to directly push su and busybox into your system partition using other methods (similar but different).

Please refer to the guides in your dedicated G2 forums for more information.
[G4 General] obvious:
I've just received my new H815. It's still in the box.

Is the above info still true? Should I avoid upgrading OTA to 6.0?
[G4 General] AuZZZie:
How long should writing the rooted system.img back to the phone take? I'm trying to write my original system.img back to unroot and it just seems to sit there. I never get the # prompt back like it completes. I've waited nearly an hr.

NM: The below instructions worked and it completed successfully.
[G4 General] smason:
CentOS 7 recognize correctly the selinux context, following the proof:

[root@seven ~]# mount -t ext4 -o rw,loop ./system.img ./loc/
[root@seven ~]# cd ./loc/
[root@seven loc]# ls -la
total 36244
drwxr-xr-x. 18 root root 4096 Jan 1 1970 .
dr-xr-x---. 4 root root 4096 Jan 20 13:24 ..
drwxr-xr-x. 98 root root 4096 Aug 17 11:20 app
drwxr-xr-x. 2 root 2000 8192 Aug 17 11:20 bin
-rw-r--r--. 1 root root 11757 Aug 17 11:20 build.prop
-rw-r--r--. 1 root root 1615429 Aug 17 11:20 DFFileList.txt
drwxr-xr-x. 23 root root 4096 Aug 17 11:20 etc
drwxr-xr-x. 3 root root 8192 Aug 17 11:20 fonts
drwxr-xr-x. 8 root root 4096 Aug 17 11:20 framework
drwxr-xr-x. 8 root root 12288 Aug 17 11:20 lib
drwxr-xr-x. 6 root root 12288 Aug 17 11:20 lib64
drwx------. 2 root root 4096 Jan 1 1970 lost+found
drwxr-xr-x. 5 root root 4096 Aug 17 11:20 media
drwxr-xr-x. 110 root root 4096 Aug 17 11:20 priv-app
-rw-r--r--. 1 root root 140348 Aug 17 11:20 recovery-from-boot.p
drwxr-xr-x. 5 root root 4096 Aug 17 11:20 rfs
drwxr-xr-x. 3 root root 4096 Aug 17 11:20 sounds
drwxr-xr-x. 4 root root 4096 Aug 17 11:20 tts
-rw-r--r--. 1 root root 35239936 Aug 17 11:20 usbautorun.iso
drwxr-xr-x. 9 root root 4096 Aug 17 11:20 usr
drwxr-xr-x. 10 root 2000 4096 Aug 17 11:20 vendor
drwxr-xr-x. 2 root 2000 4096 Aug 17 11:20 xbin
[root@seven loc]# cd bin
[root@seven bin]# ls -laZ reboot
-rwxr-xr-x. root 2000 u:object_r:system_file:s0 reboot
[root@seven bin]#

If your Centos X not correctly recognize the SELinux context the output of "ls -laZ reboot" command should be different.
[G4 General] itm:
I'm running V10c-TWN-XX, and rooted it using this method. I'd now like to upgrade to v10e, but of course the OTA updates don't work because I'm rooted. Based on the OP I assumed that I needed to unroot by flashing a stock kdz from the link provided, but unfortunately there isn't a kdz for the TWN model at that location.

Can anyone tell me what I need to do to get to v10e on my TWN H815?
[G4 General] diamond12:
You can always upgrade using LG Bridge, I've done it.
[G4 General] itm:
Is your model also a Taiwan H815?
[G4 General] diamond12:
Yes.
[G4 General] Abcxyztpg@gmail.com:
Does this work with v10f for H815 TWN model
[G4 General] aof2092:
Yes it works