[ROOT] [REF] LG K7 install SuperSU without Kingroot (lgms330 and lgk330)

ledzepman71

Member
May 9, 2013
28
4
0
***It worked for me, but I make no guarantee of invariable results. I therefore, claim no responsibility and offer no warranty. If it does brick your phone, please pm me with the subject "SuperSU without Kingroot" so we can figure out where we went wrong.***
MetroPCS (lgms330) and the T-Mobile (lgk330) models.​

The TWRP method: It's easier than the old method in post 3 which did mess up a couple of peoples phones for some reason. The method in post 3 is still relevant for those who don't want to use TWRP for whatever reason.

You will need:
computer, usb cord, and *adb/fastboot installed
*A note to those who don't know what adb or fastboot is:
There are plenty of tutorials out there explaining how to install and use adb and fastboot.
If you are unfamiliar with these tools you may want to check out this forum.


Part 1: enable developer mode / unlock boot loader
Developer options
On your phone, open settings do the following
Enable Developer mode









Enable oem unlock (LG was nice enough to enable us to unlock our bootloader from the "developer options")




Enable adb debug



Plug your phone into your computer and run
Code:
adb devices
you will be prompted to Allow USB debugging?



Part 2: installing the Team Win Recovery Project.

I can confirm that the following technique works for the T-Mobile k330 too.

Abridged quoted instructions from this thread / partial copy from post #42 Senior Member: starkly_raving
Prerequisites:
1. unlocked bootloader
2. knowledge of fastboot commands.

First, connect your phone to the computer and run
Code:
adb reboot bootloader
Next, if you want to test but not replace your recovery

Code:
fastboot boot Twrp_m1_v2.img
Instead, if you want to replace your recovery partition with TWRP

Code:
fastboot flash recovery twrp-image-3.img
DOWNLOADS:
New forum has a version of TWRP with a button combination to boot into recovery.
Beta1:
twrp-image-3.img I hope you don't mind me mirroring [MENTION=805681]reemobeens19


Part 3: Installing SuperSu, Xposed framework, and Xposed installer
At the time of this writing these are the latest versions:
Xposed framework: sdk22/arm/xposed-v86-sdk22-arm.zip
Xposed installer: XposedInstaller_3.0-alpha4.apk
SuperSU: Version 2.76

Xposed uninstaller <- You need to flash this in order to completely uninstall the Xposed framework if you don't want it anymore or you want to upgrade with a newer version.

On our phone booting into TWRP can be done with the physical button combinations. If you don't feel like doing finger gymnastics you can use
Code:
adb reboot recovery
Tap install, choose the zip file(s) you downloaded, and the rest is fairly self explanatory.

If I made any errors or omissions feel free to mention it. I really hope this helps.
 
Last edited:

ledzepman71

Member
May 9, 2013
28
4
0
Xposed Follow up

Now that you have the Xposed Framework installed, you need to install the "Xposed installer" app in order to use it.

You need to go into settings -> security -> and check the box that says "Unknown sources"

If you have downloaded the XposedInstaller_3.0_alpha4.apk onto you phone, then you can use the "File Manager" app already installed on the phone; navigate to the XposedInstaller_3.0_alpha4.apk (probably in your "Download" folder); and tap on it. It will ask if you want to install it so tap install.

Xposed installer needs root access so grant it when prompted. The first time I ran the actual app it threw an error message. Either restart your phone or restart the app (I cannot remember which I did) then it should work.
 
Last edited:

ledzepman71

Member
May 9, 2013
28
4
0
OBSOLETE

Here are the old instructions for postarity. It worked for quite a few people
***I have followed this exact procedure with a 100% success rate in linux; however, I make no guarantee invariable results. I therefore, claim no responsibility and offer no warranty. If it does brick your phone, please pm me with the subject "SuperSU without Kingroot" so we can figure out where we went wrong.***

These custom system images come with SuperSu and the appropriate Xposed framework (sdk22/arm/xposed-v86-sdk22-arm.zip) baked right in.

So many people have bricked their LG K7's trying to replace kingroot with the superb SuperSu by chainfire. I have seen many that have bricked their phones trying to flash the latest Xposed framework as well. This method will hopefully be easy enough to deter people relying on kingroot all together. (Feel free to leave feedback in the comments if there is a step that need further elaboration or isn't working)

This tutorial will work for both the MetroPCS (lgms330) and the T-Mobile (lgk330) models.
***This will wipe your device***
You will need:
computer, usb cord, *adb/fastboot installed, the appropriate system image, and serious patience.

MetroPCS Download:
ms330_root_system.img

T-Mobile Download:
k330_root_system.img

*A note to those who don't know what adb or fastboot is:
There are plenty of tutorials out there explaining how to install and use adb and fastboot.
If you are unfamiliar with these tools you may want to check out this forum.


Developer options
On your phone, open settings do the following
Enable Developer mode










Enable oem unlock (LG was nice enough to enable us to unlock our bootloader from the "developer options")





Enable adb debug



Plug your phone into your computer and run
Code:
adb devices
you will be prompted to Allow USB debugging?



Someone who is proficient in Windows please verify that fastboot "sees" the device. I was having trouble getting my Windows 7 64bit machine to recognize it. It worked every time in linux though. Thanks.

ADB/Fastboot commnads
On the computer (in windows you may have to replace adb with adb.exe and fastboot with fastboot.exe)
Code:
adb reboot bootloader
Code:
fastboot oem unlock
Don’t worry about the message it returns:
Code:
FAILED (remote: Already unlocked)
or
Code:
OKAY [  0.040s]
Let's be OCD and make certain the bootloader is unlock.
Code:
fastboot getvar unlocked
The result should be
Code:
unlocked: yes
finished. total time: 0.001s

Get ready to wait a loooooong time. Flash the correct system image for your device carrier.
DON’T PANIC!!! When you run the fastboot command to flash the system image, it will return something like “Invalid sparse file format at header magi” and hangs for what seems like an eternity. This is normal. The next message it returns is “erasing 'system'...” and then you wait another eternity for the system to be overwritten. Mine took over 6 minutes to complete.
MetroPCS
Code:
fastboot flash system ms330_root_system.img
T-Mobile
Code:
fastboot flash system k330_root_system.img


Wait forever for it to get to the “Android is starting…” screen by running
Code:
fastboot reboot
I have no problem with kingroot as a concept. I just want to help people avoid bricking their phones.
 
Last edited:

IEatFood

Member
Jul 15, 2016
7
0
0
It says cannot load 'ms330_root_system.img'
When I did the fastboot getvar unlocked it showed, "unlocked: yes; finished total time 0.000"
 
Last edited:

ledzepman71

Member
May 9, 2013
28
4
0
It says cannot load 'ms330_root_system.img'
When I did the fastboot getvar unlocked it showed, "unlocked: yes; finished total time 0.000"
I assume you are on the step where you issue the fastboot command to flash the system image. I'm guessing you don't have the system image in the same directory as you are executing the fastboot command. i.e. If you downloaded the 'ms330_root_system.img' into your Downloads folder you need to change into that directory in the command prompt
Windows cmd
Code:
C:\Windows\system32>
C:\Windows\system32> cd C:\Users\IEatFood\Downloads
C:\Users\IEatFood\Downloads> fastboot flash system ms330_root_system.img
Alternitavly, you could copy/paste the 'ms330_root_system.img' into the same directory as the fastboot.exe

Linux terminal
Code:
~/ $
~/ $ cd Downloads/
~/Downloads $ fastboot flash system ms330_root_system.img
 
Last edited:

IEatFood

Member
Jul 15, 2016
7
0
0
I assume you are on the step where you issue the fastboot command to flash the system image. I'm guessing you don't have the system image in the same directory as you are executing the fastboot command. i.e. If you downloaded the 'ms330_root_system.img' into your Downloads folder you need to change into that directory in the command prompt
Windows cmd
Code:
C:\Windows\system32>
C:\Windows\system32> cd C:\Users\IEatFood\Downloads
C:\Users\IEatFood\Downloads> fastboot flash system ms330_root_system.img
Alternitavly, you could copy/paste the 'ms330_root_system.img' into the same directory as the fastboot.exe

Linux terminal
Code:
~/ $
~/ $ cd Downloads/
~/Downloads $ fastboot flash system ms330_root_system.img
Alright, 'I got the invalid sparse file format at header magi'

finished. total time: 0.002s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system ms330_root
_system.img
target reported max download size of 268435456 bytes
Invalid sparse file format at header magi
erasing 'system'...
OKAY [ 0.034s]
sending sparse 'system' 1/9 (257070 KB)...
OKAY [ 8.874s]
writing 'system' 1/9...
FAILED (remote: size too large)
finished. total time: 8.915s
 
Last edited:

ledzepman71

Member
May 9, 2013
28
4
0
My phone is doing the exact same thing after following the tutorial
Did it run successfully? If so sometimes you have to do the factory restet. Power off. Hold Vol down and power button. When the screen comes on keep holding down the vol down button let go of the power button and then push the power button again.

If it didn't run successfully please pm be with all the details including your phone model and all the output from the command line. Don't worry we'll get you squared away.
 

ledzepman71

Member
May 9, 2013
28
4
0
can't get past the step where you fastboot it, it get's stuck on the LG logo with small letters at the top
any ideas why?
I am on K330 by the way
If your problem hasn't been resolved, can you please describe in further detail what happened. Were you using the obsolete instructions in post 3? Were you on the step where you reboot into the bootloader? If you're really stuck please feel free to pm me.
 

ledzepman71

Member
May 9, 2013
28
4
0
To everyone. Please do research before flashing anything. Somebody had an lg Stylo tot. Trying to pass it off as a MS330! Wrong. Please research.


https://www.facebook.com/Czarsuperstar/
Hello, I appreciate your concern. On the topic of research, I was once told "a week in the lab can save you an hour in the library." I absolutely agree and would also encourage everyone to look deeper before plunging in head first.

If you are doubting the authenticity of my efforts and files allow me to elaborate on my method. As you will see, all the files were pulled directly off my personal phone and are not second hand impostors.

First, I looked up the partition table in adb using
Code:
ls -al /dev/block/platform/*/by-name
which output:
Code:
lrwxrwxrwx root     root              1970-01-10 18:59 DDR -> /dev/block/mmcblk0p13
lrwxrwxrwx root     root              1970-01-10 18:59 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              1970-01-10 18:59 abootbak -> /dev/block/mmcblk0p9
lrwxrwxrwx root     root              1970-01-10 18:59 boot -> /dev/block/mmcblk0p33
lrwxrwxrwx root     root              1970-01-10 18:59 cache -> /dev/block/mmcblk0p38
lrwxrwxrwx root     root              1970-01-10 18:59 config -> /dev/block/mmcblk0p21
lrwxrwxrwx root     root              1970-01-10 18:59 devinfo -> /dev/block/mmcblk0p20
lrwxrwxrwx root     root              1970-01-10 18:59 drm -> /dev/block/mmcblk0p28
lrwxrwxrwx root     root              1970-01-10 18:59 eksst -> /dev/block/mmcblk0p19
lrwxrwxrwx root     root              1970-01-10 18:59 encrypt -> /dev/block/mmcblk0p18
lrwxrwxrwx root     root              1970-01-10 18:59 factory -> /dev/block/mmcblk0p35
lrwxrwxrwx root     root              1970-01-10 18:59 fota -> /dev/block/mmcblk0p23
lrwxrwxrwx root     root              1970-01-10 18:59 fsc -> /dev/block/mmcblk0p15
lrwxrwxrwx root     root              1970-01-10 18:59 fsg -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              1970-01-10 18:59 grow -> /dev/block/mmcblk0p40
lrwxrwxrwx root     root              1970-01-10 18:59 keystore -> /dev/block/mmcblk0p17
lrwxrwxrwx root     root              1970-01-10 18:59 laf -> /dev/block/mmcblk0p32
lrwxrwxrwx root     root              1970-01-10 18:59 misc -> /dev/block/mmcblk0p30
lrwxrwxrwx root     root              1970-01-10 18:59 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              1970-01-10 18:59 modemst1 -> /dev/block/mmcblk0p10
lrwxrwxrwx root     root              1970-01-10 18:59 modemst2 -> /dev/block/mmcblk0p11
lrwxrwxrwx root     root              1970-01-10 18:59 mpt -> /dev/block/mmcblk0p36
lrwxrwxrwx root     root              1970-01-10 18:59 persist -> /dev/block/mmcblk0p31
lrwxrwxrwx root     root              1970-01-10 18:59 raw_resources -> /dev/block/mmcblk0p26
lrwxrwxrwx root     root              1970-01-10 18:59 raw_resourcesbak -> /dev/block/mmcblk0p27
lrwxrwxrwx root     root              1970-01-10 18:59 rct -> /dev/block/mmcblk0p24
lrwxrwxrwx root     root              1970-01-10 18:59 recovery -> /dev/block/mmcblk0p34
lrwxrwxrwx root     root              1970-01-10 18:59 rpm -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              1970-01-10 18:59 rpmbak -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              1970-01-10 18:59 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              1970-01-10 18:59 sbl1bak -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              1970-01-10 18:59 sec -> /dev/block/mmcblk0p16
lrwxrwxrwx root     root              1970-01-10 18:59 sns -> /dev/block/mmcblk0p29
lrwxrwxrwx root     root              1970-01-10 18:59 spare1 -> /dev/block/mmcblk0p22
lrwxrwxrwx root     root              1970-01-10 18:59 spare2 -> /dev/block/mmcblk0p25
lrwxrwxrwx root     root              1970-01-10 18:59 ssd -> /dev/block/mmcblk0p12
lrwxrwxrwx root     root              1970-01-10 18:59 system -> /dev/block/mmcblk0p37
lrwxrwxrwx root     root              1970-01-10 18:59 tz -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              1970-01-10 18:59 tzbak -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              1970-01-10 18:59 userdata -> /dev/block/mmcblk0p39
As you can see, "/dev/block/mmcblk0p37" is the block device for the system partition. From there you simply duplicate the data into a raw image by doing
Code:
dd if=/dev/block/mmcblk0p37 bs=2048 of=/storage/external_SD/system.img
To elaborate on what the command does, the input file is the system block mmcblk0p37 and the output file is created as "system.img" on the external sd card. From the man page, "bs=BYTES read and write up to BYTES bytes at a time." So it just means that the dd operation can read and write up to 2048 bytes at a time.

This process was simply repeated using a stock k330, rooted k330, stock ms330, and rooted ms330. After all the raw images were created I systematically flashed them to my personal phone using the instructions verbatim from my op to ensure that they indeed work.

I hope explaining my process sheds further light on the matter. If you want to investigate further on your own you can mount the raw image in linux. Assuming that the system.img file is in your home directory and you have the directory /mnt/tmp , simply run as root
Code:
mount -o ro  ~/system.img /mnt/tmp
and you will then be able to see the contents of the image (build prop, preinstalled apps, and the like) in the /mnt/tmp folder.

If you have any further comments or questions I will happily oblige.

The whole point of my effort was to aid people in rooting there phones while mitigating the risk of bricking. I want to make the process as bullet proof as possible so all feedback is welcome. This includes testimonials from those whom this process worked. I guess the next step would be to post the TWRP backup zips to further automate of the process.
 
  • Like
Reactions: [email protected]

ledzepman71

Member
May 9, 2013
28
4
0
unbrick method

@azureee, I am so happy to hear that you found a solution to your problem. Thank you for sharing that link as well. I am sure it will help many people here. If you need any further explanation on installing xposed I would be happy to help. :)
 
Please update this forum to have lg-k7 tag and to have newest twrp with button combo. That way this will be on the LG K7 forum and have best TWRP. Also "fastboot boot" is only way it works, flashing will get overwritten by system. And then when you want to get to recovery it will factory reset phone. You can flash after you root.
 
Last edited:

ledzepman71

Member
May 9, 2013
28
4
0
Please update this forum to have lg-k7 tag and to have newest twrp with button combo. That way this will be on the LG K7 forum and have best TWRP. Also "fastboot boot" is only way it works, flashing will get overwritten by system. And then when you want to get to recovery it will factory reset phone. You can flash after you root.
Thank you for the heads up about TWRP. I keep trying to add that tag, but it refuses to stick.

Edit: I had to delete the tag that wasn't showing up and readd it.
 
Last edited:

RaiderWill

Senior Member
Jul 11, 2011
1,299
711
0
NEW ROMULUS
101...

Hi, thank you for the tutorial.
noob question: After unlocking the bootloader, flashing twrp and flashing supersu from within twrp will the phone be rooted?
Just go to the Play Store and download a "Root Checker" to get your answer...
Time To Learn How To Run With The *Big Dogs* if you are going to Root.. :cool: