[LG K10 Guides, News, & Discussion] gottlasz:
This thread is out of date since there is my new thread with an easier method: https://xdaforums.com/lg-k10/how-to/friendly-root-method-lg-k8-k10-t3531223

However i keep this one for troubleshooting and deeper understanding...

This description was originally made for the k8, however it seems to work on k10 k430 devices

LG K8:

OS Android v6.0 (Marshmallow)

Chipset Mediatek MT6735

CPU Quad-core 1.3 GHz Cortex-A53

GPU Mali-T720

1.5GB of RAM

8GB ROM

LG K10 K430...:

quite similar to k8

Rooting the k8 (and the k10) is rather difficult since it's using "lz4" compression for the partition images not the usual "gzip" method.

Systemless supersu is still unable to patch lz4 boot images so we need to have a little trick. Not to mention porting a working TWRP is also a pian in the ass...

Before posting any questions/errors please read the troubleshooting guide and also read back in the thread!

Steps:

0.

Remove the back panel of the phone because you'll have to be able to reach your sd card, watch out for your battery - must not fall out!

If your TWRP supports mtp connection under "mount" you can skip this part and you don't have to put your sd card in and out - maybe you have to fix the driver in windows!

1.

Unlock your bootloader (all your data will be lost!!!) via ADB then boot up normally

http://xdaforums.com/lg-k10/how-to/unlock-bootloader-lg-k10-mtk-devices-t3486302

if there is no warnning message during boot up after unlocking your bootloader read this:

http://xdaforums.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879

2.

Boot to TWRP (you have to stay in TWRP during the whole process!!!) via ADB and fastboot

3.

Mount sd card

Backup your boot image (find boot.emmc.win in TWRP folder on your sdcard - rename it on PC to bootlz4_0.img)

or use your boot image taken from your kdz as it is written in the end of this thread:

http://xdaforums.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879

4. Tweak bootlz4_0.img with Carliv Image Kitchen (Carliv download: http://viid.me/qe7BDp)

-Unpack it, open "boot.img-ramdisk-compress" file with a text editor (notepad++) and change the first (and only) line from "lz4" to "gz"

-Repack image - rename the repacked image to bootgz_0

5. Flash bootgz_0.img in TWRP

6. Install SuperSU (and xposed if you wish or you can istall xposed later) - do not quit TWRP from now until last step - that would brick your device

7. Backup boot image again - you need to remove sd card (unmount first) and put it in PC - it means you have to remove the usb cable from the phone and remove back panel - maybe before getting into TWRP!

- or enable mtp in TWRP and copy/paste the boot image from sd card.

8. Tweak boot image in Carliv

-Unpack it, open "boot.img-ramdisk-compress" file and change the first line from "gz" to "lz4"

-Repack image

9. Flash boot image in TWRP

10. Restart (this will take a bit longer and also expect bootloop a few times)

you can find a rather detailed description here:

http://viid.me/qe7Zoh - don't forget that you can use mtp connection instead of taking in and out the sd card if your TWRP supports it.

If you prefer using adb/fastboot commands instead removing your sdcard all the time you can use salaigeethan666's guide:

http://xdaforums.com/showpost.php?p=69415205&postcount=34

but some reported problems with flashing the boot image and getting back to TWRP this way.

If you have problems booting up after installing supersu maybe you can force boot described by cpatrick3000:

http://xdaforums.com/lg-k10/how-to/root-lg-k10-mtk-chipset-95-method-t3498166

or the problem might be:

http://xdaforums.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879

If you ever lose root and try again consider Darkos333's guide: http://xdaforums.com/showpost.php?p=69713043&postcount=99

or use lg up to get back to full stock:

http://xdaforums.com/lg-k10/how-to/flashing-firmware-using-lg-t3517839

Unbrick guide by Berkantkz:

http://xdaforums.com/lg-k10/how-to/guide-unbricking-flashing-firmware-due-t3380529

Unbrick by lg up:

http://xdaforums.com/lg-k10/how-to/flashing-firmware-using-lg-t3517839

TWRPs for the different models:

TWRP of the k8:

http://xdaforums.com/lg-k10/development/recovery-twrp-3-0-2-lg-k8-k350-mtk-t3517894

As for the k10 TWRP 3.0.0 you should use http://xdaforums.com/lg-k10/development/teamwinrecoveryproject-3-0-0-0-lg-k10-t3404434 by berkantkz.

or TWRP 3.0.2 by Singular777: http://xdaforums.com/showpost.php?p=69381986&postcount=126

In case of k10 430dsy try 123xdagsm's recovery: http://xdaforums.com/showpost.php?p=69706581&postcount=154

Please, before you proceed read and practice the methods of each steps! A few hours of preparation (google + xda + tests) might save your device getting hard bricket and it's also better for you to know what you're doing! Look for fastboot commands, systemless supersu, TWRP usage, Carliv image kitchen, ... (google + xda)! You better not leave TWRP during the whole process! Keep in mind that after the supersu is installed you must be able to recompress your boot image to "lz4" otherwise you get soft bricked and you need to use lg up to refirbish...!!!

Read each steps twice and follow them stricktly!

Also keep in mind that if you want to uninstall supersu/remove root you have to reflash stock firmware with lg bridge + hard reset or lg up.

Troubleshooting

"your device is corrupt. It can't be trusted and may not work properly"

- this message is normal when you have an opened bootloader

- phone shuts down right after this message: http://xdaforums.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879

no ADB connection (command: "adb devices" - your device is not in the output list):

- turn-on USB Debugging (settings - developer opions)

- install drivers

no fastboot connection (command: "fastboot devices" - your device is not in the output list):

- install drivers

- check device manager

- you may try to install android SDK if the connection is not working

unable to unlock bootloader (command "fastboot oem unlock"):

- allow oem unlock (settings - developer opions)

device is not booting into TWRP:

- unlock bootloader

- the TWRP is not compatible with your device (there is a list of TWRPs for different devices, if you cant find yours you can try the next guide: http://www.chinaphonearena.com/foru...752-MT6753-MT6795-MT6797-TWRP-MT67xx-tutorial)

unable to unpack boot image in carliv

- your TWRP is not compatible with your device (at least it didn't backup your boot image properly)

unable to repack boot image in carliv

- check the unpacked boot image "ramdisk" folder, if there are all the necessary files and folders, find a list attached at posts #107 and #124: (doesn't have to be the exact same since k8 and k10 migth differ - there is no "boot" folder in case of the k8 and also before installing supersu the su folders are not to be there - normally 5+ folders and 20+ files)

- see if "boot.img-ramdisk-compress" file exists

- maybe you messed up something in carliv

supersu failed to patch the ramdisk (even if it sais installed succesfully)

- you can try just unpack and repack your stock boot image install/flash it and see if it boots up - so you can be sure you are a "master" of carliv and TWRP

- your boot image is not gzip compressed - open "boot.img-ramdisk-compress" as text. It should only have one line: "gz"

supersu failed to install

- you can try just unpack and repack your stock boot image install/flash it and see if it boots up - so you can be sure you are a "master" of carliv and TWRP

- your TWRP is not compatible with your device (or you need a newer version)

device is not booting up after the final step (boot loops for more then 2 minutes)

- http://xdaforums.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879

- use Berkantkz guide to flash back the original firmware: http://xdaforums.com/lg-k10/how-to/guide-unbricking-flashing-firmware-due-t3380529

- after getting back to stock you can try just unpack and repack your stock boot image install/flash it and see if it boots up - so you can be sure you are a "master" of carliv and TWRP

- duble check your final boot image (uncompress and compare files and folders to the one attached in posts #107 and #124 - has to be reasonably/more or less the same)

- consider step 6 in Darkos333 guide: http://xdaforums.com/showpost.php?p=69713043&postcount=99

- also consider cpatrick3000's force boot guide: http://xdaforums.com/lg-k10/how-to/root-lg-k10-mtk-chipset-95-method-t3498166

if none of these helps make a recovery log (in TWRP under advanced menu) before final restart and post it or send it to me