"Friendly" root method for lg k8 and k10 [MTK] - LG K10 Guides, News, & Discussion

This guide is supposed to help you root your lg k8 (2016) or k10 (2016) device (i guess any models with and unlockable bootloader and working TWRP).
Not for the 2017 models!
Why "friendly" root? Go see my old guide how unfriendly the method used to be:
https://forum.xda-developers.com/lg-k10/how-to/twrp-root-lg-k8-k350n-t3475807
Guys with latest (2017 febr. 1) security patch read this before you proceed:
https://forum.xda-developers.com/showpost.php?p=71469157&postcount=183
https://forum.xda-developers.com/showpost.php?p=72414225&postcount=250
Short version:
1. unlock bootloader (read step 2.1 if there is no device corrupt message during every boot up after unlocking bootloader!!!)
2. boot into TWRP (i tested with 3.0.0 twrp and above, never tested below)
3.1 install rce_univ.zip (download from this thread: https://forum.xda-developers.com/apps/supersu/ramdisk-compression-exchanger-t3533327, but follow instructions here!)
3.2 install supersu
3.3 install rce_univ.zip again
reboot
Long version:
The links written with italic fonts are video guides (please excuse me for the quality they were made by my mobile phone)
1. unlock bootloader
- in settings/about phone/software info tap on build number about 10 times so you unlcok developer options
- in settings/developer options tick on "oem unlock" and "usb debugging" and untick "verify apps over usb"
- in settings/security tick on "unknown sources" and untick "verify apps"
video guide for above steps: Link Removed by Moderator
- make sure you installed all the drivers for your mobile from lg's site (LGMobileDriver_WHQL_Ver_4.1.1.exe and also lg bridge) - Link Removed by Moderator
- set up adb/fasboot using 15 seconds adb installer: https://forum.xda-developers.com/showthread.php?t=2588979 - Link Removed by Moderator
- go to the folder it's installed (in my case it's C:/adb - adb.exe and fastboot.exe supposed to be there) hold shift and right click "open cmd here" - Link Removed by Moderator
- in the command window type "adb devices"
it will start adb services and will print a line like "...lgk350... or ...lgk420... lgk430, etc"
if you can't find your device there check device manager or google how to work things out
normally in device manager you should find "LGE Mobile USB Serial Port" under Ports - Link Removed by Moderator
- now reboot to fastboot mode typing the command: "adb reboot bootloader"
your phone should go blank and only print fastboot mode on the bottom of the screen
- check your fastboot connection: type: "fastboot devices"
same as before (in my case it was writing some unrecognizable letters - probably wrong coding) if you see nothing then check device manager -Link Removed by Moderator
you may try to install android SDK (command line tool is enough - https://developer.android.com/studio/index.html - bottom of the page Link Removed by Moderator) if the connection is not working - however there must be a way to make it work (i had a hard time in device manager - i changed each driver a million times until it worked)
in device manager you should find "android bootloader interface" in my case its under "samsung android phone" i don't know why but it works
- In case you have a working adb and fastboot connection type (if you lost connection you have to get to fastboot again: "adb reboot bootloader"):
"fastboot oem unlock" - the phone will ask you if you really mean it, using the volume and the on/off buttons (twice) you can accept
you will lose all your data!!! and most likely lose warranty as well!!! Link Removed by Moderator
however your phone shell restart just fine (you have to manually restart it by taking out the battery or boot into twrp and reboot from there. There should be some message during boot up that your system is vulnerable from now on.
- after reboot you may want to check if your bootloader is really unlocked: get back to fastboot and type "fastboot getvar all" and find the line which sais if your bootloader is unlocked (if it's not you may repeat the process)Link Removed by Moderator
set up developer settings again:
- in settings/about phone/software info tap on build number about 10 times so you unlcok developer options
- in settings/developer options tick on "oem unlock" and "usb debugging" and untick "verify apps over usb"
- in settings/security tick on "unknown sources" and untick "verify apps"
Link Removed by Moderator
- !!!if there is no device corrupt message during every boot up then you need an additional step i'll describe at step 2.1!!! - Link Removed by Moderator
2. find a working TWRP for your device (i collect them in the first comment below - https://forum.xda-developers.com/showpost.php?p=70375626&postcount=2):
- put the recovery image (e.g "k8twrp.img") into your ADB folder (like c:\adb - where you opened command promt earlier)
- Get back to fastboot again and boot to TWRP - type in cmd: "fastboot boot k8twrp.img" (or whatever your TWRP image's filename is)
- if its not booting into TWRP normally try another TWRP (comment #2)
- on the first screen of the TWRP it's asking for password to decrypt data - just hit cancel
- if you have the device corrupt message during every boot up you can skip the next step (go straight to step 3.)
2.1. in case you have no device corrupt message during every boot up follow the next steps
- on the keep system read only? screen of the TWRP let it allow modifications (swipe!)
- reboot to System
- Link Removed by Moderator
you must see the device corrupt message during boot up -> you are ready to go for a root
- try to reboot the device if the device corrupt message is still there during boot up (Link Removed by Moderator). If it's not there you may repeat the process or check my old guide for troubleshooting.
3. the rooting part -Link Removed by Moderator[/I]
(you can read my old guide why we need to tweak the boot image before installing SuperSU - if you are interested)
- download the ramdisk compression exchanger: https://forum.xda-developers.com/apps/supersu/ramdisk-compression-exchanger-t3533327 (we need this because SuperSU can only work with gzip compressed ramdisks while we have lz4 compressed ones)
- download latest SuperSU TWRP flashable version: https://forum.xda-developers.com/apps/supersu/stable-2016-09-01supersu-v2-78-release-t3452703
- put this (rce_univ.zip) and latest SuperSU (i used v2.79) on your sd card (you need external sd because the internal sd is encrypted in TWRP)
- reboot your device into TWRP (through adb and fastboot as before)
- cancel decrypt data
- don't swipe on system modifying screen just click on "keep read only"
- go to backup, backup your boot image (tick only boot partition /untick the rest/ and select storage as micro sd card) in case anything goes wrong during the rest of the process you can always restore it
- go to install
- select storage and chose micro sd card
- install rce_univ.zip (it will recompress your ramdisk to gzip - so SuperSU can tweak it)
- when it's finished don't wipe or don't reboot! Go back (hit back button button) and install SuperSUxxx.zip
- go back again (without restart or wipe) and install rce.zip again (this will recompress your ramdisk to lz4)
- now you can reboot to system (without any wipe) - it will bootloop a few times, be patient!
If something goes wrong check my old guide for deeper understanding and troubleshooting!
If you have any problem with installing rce_univ.zip please post comments to it's thread:
https://forum.xda-developers.com/apps/supersu/ramdisk-compression-exchanger-t3533327
Comments in this thread shell be only TWRP related or deeply device specific.
No promises... and no responsibility i take... !!!

Supported TWRPs:
in case you want to go for sure or you can't find a working TWRP port it yourself easily using my guide: https://forum.xda-developers.com/lg-k10/development/mtk-portable-twrp-porter-t3536123
or use the ones already ported:
Lg k10 k430: https://forum.xda-developers.com/lg-k10/development/teamwinrecoveryproject-3-0-0-0-lg-k10-t3404434
Lg k10 k430dsy (firmware: 10k - 2017 feb security date): Link Removed by Moderator
(Lg k10 k420n/ds: https://forum.xda-developers.com/lg-k10/development/unofficial-twrp-3-1-0-k420-ds-n-t3571943 - different root method required)
Lg K8: https://forum.xda-developers.com/lg-k10/development/recovery-twrp-3-0-2-lg-k8-k350-mtk-t3517894
others take a look around here: https://forum.xda-developers.com/lg-k10/development
or use this guide: http://www.chinaphonearena.com/foru...752-MT6753-MT6795-MT6797-TWRP-MT67xx-tutorial

Looks cleverly. May take a try

Could it be this SuperSU?
https://download.chainfire.eu/696/supersu/

a_lewicki said:
Could it be this SuperSU?
https://download.chainfire.eu/696/supersu/
Click to expand...
Click to collapse
Well... why would you use that old one? This might not even be systemless root so it would not work. Why dont you check the link i posted in the OP so you could find this one i recommend to use: https://s3-us-west-2.amazonaws.com/supersu/download/zip/SuperSU-v2.79-201612051815.zip

after flashing rce.zip i got an error " unpacking boot image failed! aborting..."
what should i do to fix that? i've tried reading throught your old guide but i'm a noob and i couldn't find anything i could understand.
help anybody???

pedrodgr said:
after flashing rce.zip i got an error " unpacking boot image failed! aborting..."
what should i do to fix that? i've tried reading throught your old guide but i'm a noob and i couldn't find anything i could understand.
help anybody???
Click to expand...
Click to collapse
Next time you try, please make a recovery log (In recovery advanced menu) and send it to me or upload it here!
Which model? Which TWRP?
Also upload or send me your boot image that you backed up!
I added one more line to the script to see where its found the boot partition so please download again before you proceed for a better troubleshooting experience!

@gottlasz after everey install reboot system? (rce.zip then reboot supersu and reboot and rce.zip again and reboot?) or without rebooting?

a_lewicki said:
@gottlasz after everey install reboot system? (rce.zip then reboot supersu and reboot and rce.zip again and reboot?) or without rebooting?
Click to expand...
Click to collapse
No way! Do not reboot! Once you install rce.zip it changes the ramdisk compression so the phone can't boot up. Then the supersu tweaks the boot image (roots the phone) then you install rce.zip to change the ramdisk compression back to normal. Then you can reboot.

@gottlasz thank you so much IT WORKS

a_lewicki said:
@gottlasz thank you so much IT WORKS
---------- Post added at 01:44 PM ---------- Previous post was at 01:42 PM ----------
@gottlasz thank you so much IT WORKS
Click to expand...
Click to collapse
I know it works...
Do you mind me asking which phone you have (k8/k10), which model and which TWRP you used?

gottlasz said:
I know it works...
Do you mind me asking which phone you have (k8/k10), which model and which TWRP you used?
Click to expand...
Click to collapse
twrp 3.0.2
lg k10 k430dse
---------- Post added at 02:39 PM ---------- Previous post was at 02:24 PM ----------
[mention]gottlasz[/mention] do you know how to make snapchat working on root?

a_lewicki said:
twrp 3.0.2
lg k10 k430dse
---------- Post added at 02:39 PM ---------- Previous post was at 02:24 PM ----------
[mention]gottlasz[/mention] do you know how to make snapchat working on root?
Click to expand...
Click to collapse
okay, thanks for the info. I dont know anything about snapchat. If you just download it from playstore?

yes from playstore but i read this app won't work with root

a_lewicki said:
yes from playstore but i read this app won't work with root
Click to expand...
Click to collapse
I just downloaded and tested. Works without any issue...

gottlasz said:
I just downloaded and tested. Works without any issue...
Click to expand...
Click to collapse
Hmmm that's strange...
On my device I can't login to this app and i read this app won't work with root

a_lewicki said:
Hmmm that's strange...
On my device I can't login to this app and i read this app won't work with root
Click to expand...
Click to collapse
I don't know man... i don't think it's a root related issue. The app should promt if it had any problem with root.
However if you use any paid service through the app that can be an issue. Still.. the app has to write something about root if it has a problem with it.

gottlasz said:
Next time you try, please make a recovery log (In recovery advanced menu) and send it to me or upload it here!
Which model? Which TWRP?
Also upload or send me your boot image that you backed up!
I added one more line to the script to see where its found the boot partition so please download again before you proceed for a better troubleshooting experience!
Click to expand...
Click to collapse
Thanks for the fast reply, it's the k10 430dsf
i'll try downloading it again and give it a new try.
I was also using the twrp 3.0.0
i'm downloading the 3.0.2 now and i'll let you know if it works.
Thanks once again.
Happy new year for everyone:good:

i have the LG K8 (K350F) model.
Can i root my phone with this method???. Anyone with this model has probe this tutorial???.
thanks in advanced

raul2903 said:
i have the LG K8 (K350F) model.
Can i root my phone with this method???. Anyone with this model has probe this tutorial???.
thanks in advanced
Click to expand...
Click to collapse
If you have a working TWRP then its gonna work. Did you test any TWRPs already?

Related

[REF] [ROOT] [RECOVERY] [BOOT LOADER] Metro PCS LG K7 LGMS330 [Guide For Dummies]

I have not been on this site since posting my guide, i do want to let any future people reading this know that, I am not a professional. everything in this guide is using stuff from other peoples threads.... this thread is just step by step directions on how i rooted (and installed TWRP on) MY lg k7 (MetroPCs). Also i had to root before i unlocked the boot loader. Which is not safe, you should probably unlock the boot loader before you root, but i couldn't figure out how to unlock it without root access.
I AM NOT RESPONSIBLE FOR ANY THING THAT HAPPENS TO YOUR DEVICE!
YOU AND ONLY YOU CAN BE HELD RESPONSIBLE​
~BACK UP FILES ON PC, YOUR PHONE WILL BE RESET TO FACTORY SETTINGS DURING THIS TUTORIAL~
Step One: Enable Dev Options
A) open settings>about phone>software info then tap "Build Number" really fast about 10 times
B) open settings>Developer Options, then check the box labeled "Enable OEM Unlock", and the box Labeled "USB Debugging"
Step Two: Install Android SDK/ADB/USB drivers
A) go to http://developer.android.com/sdk/index.html in your browser, and click download...
B) go to https://www.microsoft.com/net/default.aspx in your browser, and click the big blue button that says .NET
Framework 4.6.1 or X.X.X depending on when your reading this...
C) go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html scroll down until you get to the first box, labeled Java SE Development Kit 8u91 or XuXX Depending on when your reading this, then find your OS (ex: Windows x86, Mac OS, Linux, Etc..), then select the download link
Step Three: Installing LG K7's USB Driver's
A) unlock your phone
B) plug your phone into you Computer via USB
C) pull down your notifications, Tap on the USB icon which should be labeled "Media Device (MTP)," "Send Images (PTP)," or "Charge Phone"
D) if a dialogue box pops up asking to install drivers tap install, if not proceed to step E
1) Your PC should ask you if you want to auto run, Either auto run or open the folder and run LG_PC_Programs.exe then proceed to Step Four
E) select "Media Device (PTP)," if not already selected
1) click the three vertical dots next to the magnify glass in the upper right hand corner, select install pc drivers, then tap install
Step Four: Installing Java SE
A) return to the folder where you downloaded the files in step two, install the file which contains the word java in it
Step Five: Installing Microsoft .NET 4 Framework
A) now in the same folder as step four, install the with the name "NDP461-KB3102438-Web," the name might be different then mine depending on when you are reading this
B) if it is already installed it will notify you and you can proceed to the next step
Step Six: Installing Android Studio 2.0 (SDK/ADB Drivers)
A) in the download folder from step four & five, double click the remaining file, the name should contain the words "android", and "studio" in it
B) when the dialogue box opens requesting admin rights, select allow
C) click next
D) click next
E) make sure all boxes are checked and click next
F) read the license agreement, (unless your the 99.9% that doesn't) click i agree
G) you may click next or choose where you'd like to install android studio, and where you'd like to install SDK, for this tutorial i will change make a new folder in my docs named SDK then change the SDK install dir to My Docs
H) click next
I) it will take a moment to install so just wait
(note: the progress bar will fill up, then reset, as it is installing in two separate locations)
J) when finished, click next
K) uncheck the box and click finish
Step Seven: Root your device
(Note: I rooted before i unlocked my boat loader, as i could not get it to boot into boot loader mode until i rooted it)
A) go to http://www.kingroot.net/wap on your android device and download the apk file
B) go to settings>security and check the box labeled "Unknown Sources"
C) install the apk
Video tutorial for king root here: https://www.youtube.com/watch?v=tG_ruuTPVpU
(Not my channel or video)
D) open the king root app
E) make sure you have a charged battery or your phone is plugged in as the rooting process time may vary (better safe then sorry)
F) swipe up until you see a "TRY IT" button click it
G) under "Root Access not available" tap "Get Now
H) do not turn off your phone
I) when it is done you can tap optimize now if you wish, otherwise close the app
Step Eight: Replacing KingRoot with SuperSU ~ W0lfDroid Method
A) go to http://www.w0lfdroid.com/2015/05/How-to-Remove-Replace-KingUser-KingRoot-with-SuperSU.html
B) scroll down until you see the word "download:" (should be right above the related posts
C) click on the "new link" next to "Replace_Kingroot_With_SuperSU.zip"
D) extract the .zip so that the "MRW" folder is on your internal storage
(Easiest way is to download it on PC and open up your k7 in "my computer" and select internal storage and drag the MRW folder inside the .zip there)
E) go to google play and search "terminal emulator for android" or use this link if your reading this on your phone https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
F) install the first one, or use this link if your reading this on your phone https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
G) open terminal emulator
H) type "su" without the quotations
(everything typed in the terminal is case sensative)
I) type "sh /sdcard/mrw/root.sh" without the quotations
J) you might see a few errors, that is fine
K) wait until it says finished
L) when SU opens, select "update" "install" or what ever pops up
M) when it asks to uninstall, uninstall it, it is not uninstalling SuperSU it is uninstalling Kingroot,
O) if 30 minutes pass and it is still uninstalling then exit the app and then reboot the phone
DO NOT STOP HERE ~ YOU HAVE TO UNLOCK THE BOOTLOADER, and OPTIONALLY FLASH TWRP
Step Nine: Unlocking The Bootloader
A) refer to step one and double check the OEM unlock is enabled and USB debugging is turned on
(If not then please enable them)
B) search quick boot on the google play store download the first app it should be a circle with a lightening bolt
C) open quick boot
D) when asked to "allow root access?" tap allow
E) if an add pops up close it with the ex in one of the corners
F) tap on the word boot loader
G) at the top of your phone you should see " * Welcome To Fast Boot Mode : "
H) now go to your SDK dir, in my case it is C:\Users\USER\Documents\SDK
I) hold shift, then right click on the "platform-tools" folder, then select "open command window here"
J) in the CMD window type "fastboot devices" - without quotations
(everything is case sensative)
K) then type "fastboot oem unlock" - without quotations
L) then type "fastboot getvar unlocked" if that doesn't work try "fastboot getvar" or "fastboot getvar unlock" to confirm if it is unlocked
(if non of the getvar commands work you did something wrong, and i wont be able to help you, but if you followed the tutorial you shouldn't have any issues as these are the exact steps i took)
M) then type "fastboot reboot"
LEAVE THE CMD OPEN OR YOU WILL HAVE TO REPEAT steps H-I
Step Ten: Flashing TWRP
A) go to http://forum.xda-developers.com/general/general/qa-metro-pcs-lg-k7-lgms330-t3331678 and click on the latest download for twrp for me it is BETA1
if the links on that page dont work then use the links here http://forum.xda-developers.com/showpost.php?p=66282525&postcount=42
B) extract the download into your SDK folder on your PC
C) in the sdk CMD window from Step nine
D) type "fastboot devices" - without qoutation
E) ~optional, HIGHLY RECOMENDED~
1)type fastboot "boot twrp-image-3.img" - this will boot up twrp WITHOUT flashing it, just so you can make sure everything is working right
in my case it was twrp-image-3.img check your twrp file name and replace fastboot boot twrp-image-3.img with
fastboot boot INSERT YOUR FILE NAME HERE.img
2)in twrp tap reboot>bootloader
F) when bootloader mode opens back up
G) type "fastboot flash twrp-image-3.img" or "fastboot boot INSERT FILE NAME HERE.img" depending on your file name
H) when finished flashing type "fastboot reboot"
Step eleven
A) follow instructions on step one
B) the reason you must do this is because when you flash TWRP it erases your entire phone and resets it
Congrats you have Successfully Rooted, Unlocked Your Bootloader, and Flashed TWRP, to your LG K7
Well done, my friend. Well done indeed.
[QUOTE
Congrats you have Successfully Rooted, Unlocked Your Bootloader, and Flashed TWRP, to your LG K7[/QUOTE]
is this ok with the gapps 5.1 instsall .zip for twrp install or should i use a different? also, do you have a suggested camera app? awesome thread btw. Nevermind simple twrp install fixed everything.
I have tribute 5 and can't access bootloader or install SuperSU.....always fails.
How can I get this to work?
Today backup important files you need!
Is this a real method BC everybody having problems rooting this device so I ask can u make a video and add screenshots
Sent from my LG-D800 using Tapatalk
I can confirm this method works. The only different thing i did was purchase Supersume pro from playstore. Worked like it said it would. The Ls675 is rootable. But no bootloader unlock or bootloader at all for that matter. Im running MS330 with TWRP full root and have twrp backups and fastboot flashable backups via flashfire....
---------- Post added at 02:28 AM ---------- Previous post was at 02:20 AM ----------
https://mega.nz/#!CRAVWAyI!QIbo20-0ZnVqlREs7ZXF66aB_Eh3UjCEMVQbLuP1Zec
https://mega.nz/#!zBoxGIQR!buXvorPkA14Vr2Idn7uhNPHanOL6wbvcEav3MhRdjv8
https://mega.nz/#!yQBg1ayC!r3qvWfLjCAKg0e8t91J1IEtae8_EwhvYTXjawv7b_2A
Screen shots of root, flashfire backups, and device info
While it does work I can find no method using the buttons to get into twrp all the instructions I find for recovery fail so I can only boot back to it after the phone boots, thus it's worthless at this point. Also the command is fastboot flash recovery imgagename.img and you'll need to remove kingroot from administrators to uninstall.
Anyone else been able to boot directly into twrp from the off position?
zgauthier8286 said:
I can confirm this method works. The only different thing i did was purchase Supersume pro from playstore. Worked like it said it would. The Ls675 is rootable. But no bootloader unlock or bootloader at all for that matter. Im running MS330 with TWRP full root and have twrp backups and fastboot flashable backups via flashfire....
---------- Post added at 02:28 AM ---------- Previous post was at 02:20 AM ----------
https://mega.nz/#!CRAVWAyI!QIbo20-0ZnVqlREs7ZXF66aB_Eh3UjCEMVQbLuP1Zec
https://mega.nz/#!zBoxGIQR!buXvorPkA14Vr2Idn7uhNPHanOL6wbvcEav3MhRdjv8
https://mega.nz/#!yQBg1ayC!r3qvWfLjCAKg0e8t91J1IEtae8_EwhvYTXjawv7b_2A
Screen shots of root, flashfire backups, and device info
Click to expand...
Click to collapse
can you please help me i have 2 MS330 that are bricked
callihn said:
While it does work I can find no method using the buttons to get into twrp all the instructions I find for recovery fail so I can only boot back to it after the phone boots, thus it's worthless at this point. Also the command is fastboot flash recovery imgagename.img and you'll need to remove kingroot from administrators to uninstall.
Anyone else been able to boot directly into twrp from the off position?
Click to expand...
Click to collapse
Try to do the factory hard reset trick but say no at the second screen. I haven't tried it out yet but I've been reading around several sites and that's a possible solution
zgauthier8286 said:
Try to do the factory hard reset trick but say no at the second screen. I haven't tried it out yet but I've been reading around several sites and that's a possible solution
Click to expand...
Click to collapse
Just reboots. Think we're going to have to change something? Boot image? Kernel?
callihn said:
Just reboots. Think we're going to have to change something? Boot image? Kernel?
Click to expand...
Click to collapse
I'm no developer by any means but I have Linux and windows on my laptop. I'm familiar with kernel building on bunt and have the source code for MS330 on my laptop. I have a backup of my boot img as well. If you can get to fastboot u can probably flash my boot img if you want me to send it. I have recovery img as well which is twrp. Let me know if you have any ideas on what u need or i can do as far as possibly doing a fresh build kernel later tonight and getting a zImage out of it
Does anyone know a way to successfully root this phone? Not just recover?
Sent from my LGMS330 using Tapatalk
callihn said:
Just reboots. Think we're going to have to change something? Boot image? Kernel?
Click to expand...
Click to collapse
Of other interest 5.1 is very dendent on Google apps and move app updates to the system via TB or Link2SD fails more than it succeeds, shows they moved but app inaccessible afterwards hence brick. Mine went down trying to integrate play services and reinstalling from adb didn't help. FYI if you relock the BL it'll lock the phone with a security error too. Moving play services causes unending error screens so you can't really see if it's done moving, but I waited a good 5 minutes before reboot. Issue on fails could have been the system not being r/w. Needless to say backup, backup, backup as I hadn't because I've never had a serious issue doing that and considered it a trivial task. Anyone had good success with integrating updates and cache? Anyone restored from twrp yet?
JayCouture.com said:
Does anyone know a way to successfully root this phone? Not just recover?
Sent from my LGMS330 using Tapatalk
Click to expand...
Click to collapse
Yes! Just follow the instructions here:
http://forum.xda-developers.com/showpost.php?p=66456635&postcount=1
zgauthier8286 said:
I'm no developer by any means but I have Linux and windows on my laptop. I'm familiar with kernel building on bunt and have the source code for MS330 on my laptop. I have a backup of my boot img as well. If you can get to fastboot u can probably flash my boot img if you want me to send it. I have recovery img as well which is twrp. Let me know if you have any ideas on what u need or i can do as far as possibly doing a fresh build kernel later tonight and getting a zImage out of it
Click to expand...
Click to collapse
Can you figure out why we can't boot to recovery via hardware buttons? That's critical for tinkering and testing on the go since I always have my phone but not my laptop for booting into recovery with adb. Not sure exactly where to look, probably start with a search for the words "recovery" and "safe mode" for the buttons and "security error" in the boot.img files.
callihn said:
Can you figure out why we can't boot to recovery via hardware buttons? That's critical for tinkering and testing on the go since I always have my phone but not my laptop for booting into recovery with adb. Not sure exactly where to look, probably start with a search for the words "recovery" and "safe mode" for the buttons and "security error" in the boot.img files.
Click to expand...
Click to collapse
If your rooted u can dl a reboot recovery app on the play store I have one that works like a charm. But im gonna take a look through Linux at the kernel options using make menu_config and see if there's anything I can see in there.
zgauthier8286 said:
I'm no developer by any means but I have Linux and windows on my laptop. I'm familiar with kernel building on bunt and have the source code for MS330 on my laptop. I have a backup of my boot img as well. If you can get to fastboot u can probably flash my boot img if you want me to send it. I have recovery img as well which is twrp. Let me know if you have any ideas on what u need or i can do as far as possibly doing a fresh build kernel later tonight and getting a zImage out of it
Click to expand...
Click to collapse
im having a problem w the security 9 error boot loop. only seem to b able to get it into download mode , not bootloader or recovery. would your boot and recovery img's help me at all ya think ? thanks !
goitalone said:
I have tribute 5 and can't access bootloader or install SuperSU.....always fails.
How can I get this to work?
Click to expand...
Click to collapse
Thanks again. For anyone that has a soft bricked LG K7 see this man! He brought my S#!? To life through teamveiwer. Thanks again. From my LG K7.
Maybe just my experience, but regarding step 10. I had to have the twrp image in SDK>platform tools, also when you get to fastboot flash twrp-image-3.img, I couldn't get it to work, until I typed it as fastboot flash recovery twrp-image-3.img. Hope this helps anyone else getting errors during this part. Thanks for the writeup.

[HOWTO][H815] Complete Guide to Unlock Bootloader + TWRP + Root + Xposed + ViperFX

Disclaimer and Warning: By attempting any of the processes outlined below, you accept full responsibility for your actions. Neither the contributors of this thread or XDA are responsible for any damage caused. Some of the actions may void your warranty.
Click to expand...
Click to collapse
I recently went through all of this and it took me quite a while to dig through dozens of threads so I decided to make a new one bringing all of these great things together specifically for the H815. Brace yourselves for the Android right of passage...
LG G4 H815 Marshmallow 6.0 Guide.
1. Unlock the Bootloader
2. Install the custom recovery: TWRP
3. Root
4. Install Xposed
5. Install Viper4Android
6. Unbrick Guide
7. Debloat
8. Battery Optimisations
- Quicklinks:
Drivers: http://oceanhost.eu/e4h2px4e0hkd/LGMobileDriver_WHQL_Ver_4.0.4.exe.htm
Minimal ADB: https://www.androidfilehost.com/?fid=24521665358595410
LG Bootloader Unlock: https://developer.lge.com/resource/mobile/RetrieveBootloader.dev?categoryTypeCode=ANRS
TWRP: https://forum.xda-developers.com/attachment.php?attachmentid=4387389&d=1515789045
SuperSU: https://www.androidfilehost.com/?fid=24369303960690845
System Image Complete: http://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
Xposed Framework: http://forum.xda-developers.com/attachment.php?attachmentid=3848457&d=1471691646
Xposed Installer App: http://forum.xda-developers.com/showthread.php?t=3034811
Viper4Android: https://www.dropbox.com/s/lvcxffdqimbi78b/V4A_Poweramp_Lollipop_v3.zip?dl=0
SELinux Mode Changer App: http://forum.xda-developers.com/devdb/project/dl/?id=12506
LG Bridge Unbrick Tool: http://www.lg.com/us/support/product-help/CT10000025-1438110404543-preinstall-apps
IMPORTANT | IMPORTANT | IMPORTANT | IMPORTANT | IMPORTANT
Backup any personal files because everything will be deleted! Make sure you have at least 50% battery remaining.
1. Unlocking the bootloader officially
This is the first step in voiding your warranty so is the point of no return. I've read in some places that you may be able to do this without voiding your warranty but I did not look into this.
WARNING - This will delete everything on the phone so make sure to backup important personal files.
i) Visit the official LG website to obtain a bootloader unlock file. First click the 'How to Unlock the Bootloader' tab and then the button 'Starting Unlocking the Bootloader' at the bottom of the page: https://developer.lge.com/resource/mobile/RetrieveBootloader.dev
ii) Sign up to a free developer account using a real email address (it's needed)
iii) Enter your IMEI number which you can find on your box, under the battery or by dialing *#06# on the phone. Keep this tab open
iv) On your phone, go to settings -> About phone -> Software info and then tap on Build number 7 times. Go back to Developer options under general settings and enable 'USB debugging' and 'Enable OEM unlock'.
v) Install the LG G4 drivers from here: http://oceanhost.eu/e4h2px4e0hkd/LGMobileDriver_WHQL_Ver_4.0.4.exe.htm
vi) Download and install minimal adb 1.4 from here: https://www.androidfilehost.com/?fid=24521665358595410
vii) Browse to where you installed this and then right click and select 'Open command window here'. By default, this is in C:\Program Files (x86)\Minimal ADB and Fastboot
viii) Plug in your phone to your computer using a reliable USB port and cable (USB 3.0 doesn't seem to work). Enter "adb reboot bootloader" into the command window without quotations. Wait for it to reboot and then type "fastboot oem device-id"
ix) This fastboot command will return a character string. This is the Device ID which is needed to generate your unique unlock key. It will look like this:
Code:
Example Device ID (PC User)$ fastboot oem device-id
(bootloader)-----------------------------------------------------------------
(bootloader) Device-ID
(bootloader) CD58B679A38D6B613ED518F37A05E013
(bootloader) F93190BD558261DBBC5584E8EF8789B1
(bootloader)-----------------------------------------------------------------
To generate your unlock key, you will need to paste together the 2 lines of output into one continuous string without "(bootloader)" or white spaces. In the example above, the Device ID would be:
CD58B679A38D6B613ED518F37A05E013F93190BD558261DBBC5584E8EF8789B1
Paste this into the LG website form and confirm. It will email you an unlock.bin file which you need to put in the same folder as your adb.exe file.
x) Now enter "fastboot flash unlock unlock.bin" into the command window. This should take seconds.
xi) Now check it is unlocked. By entering “fastboot reboot” and waiting for it to reboot. Then enter "adb reboot bootloader" again and then "fastboot getvar unlocked" and verifying that the response is "unlocked: yes".
Your bootloader should now be unlocked.Keep this command window open for the next step.
Thanks to shimp208 for minimal adb http://forum.xda-developers.com/showthread.php?t=2317790
2. Installing TWRP Custom Recovery
This will install a custom recovery allowing you to make backups and flash zip files.
i) With your bootloader freshly unlocked, you can boot up the device and set it up. Go through the startup guide thoroughly without skipping as these settings are going to stay.
ii) Download the latest TWRP img file from https://forum.xda-developers.com/attachment.php?attachmentid=4387389&d=1515789045 and place it in the same folder as your adb.exe file and unlock.bin. Now rename it to lgg4-twrp.img without changing the file extension!
iii) Now also copy the lgg4-twrp.img file to your phone's SD card using a USB cable.
iv) Enable USB debugging again
v) Open up a command window again by Shift+Right clicking in the folder with adb.exe.
vii) In the command window, type "adb reboot bootloader". Wait to enter the bootloader and then type "fastboot boot lgg4-twrp.img" and hit enter. The device should now restart in TWRP but it is not installed yet.
vii) Once TWRP starts, select 'install' and then tick 'images' at the bottom.
viii) Find the lgg4-twrp.img file and select it. Then in the next menu select 'recovery' and swipe the bar at the bottom to confirm flash.
ix) You should then see 'Image Flash Complete' so can select back then reboot and system.
(If installing from an external SD card, go to 'mount' from the main screen and then tick to mount your ext SD card. Go back and continue as normal)
Thanks to TeamWin for TWRP https://twrp.me/
Thanks to Adam Myczkowski for TWRP install corrections.
3. Root
By now, you should have an unlocked bootloader and a custom recovery installed.
If you use snapchat, you won't be able to log in with a rooted phone. So it would be a good idea to install it now and log in. You remain logged in rooting and installing Xposed. Quicklink: https://play.google.com/store/apps/details?id=com.snapchat.android​i) Download SuperSU from https://www.androidfilehost.com/?fid=24369303960690845 and place it on your phones internal storage.
(this works fine but you can get the latest from here: http://forum.xda-developers.com/showpost.php?p=64161125&postcount=3
ii) Make sure you have USB debugging enabled again.
iii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb reboot recovery".
If you have problems, see the end of this section​iv) Once in the recovery, hit install and browse to the SuperSU file we just downloaded.
vii) Swipe flash and then reboot into the system.
The phone should now boot and be rooted. If not, see the notes at the end of this section.
You can use https://play.google.com/store/apps/details?id=com.joeykrim.rootcheck to verify if you have root.
• If your phone does not turn on then pull out the battery and USB cable and then put just the battery back in. Now Press and hold the volume down and power buttons together. Then first LG logo should appear. Now continue holding the down button but release the power button for one second and then press it again and hold.
You should now see a screen asking you to wipe everything. Navigate with the down arrow and press the power button for both screens. This should now take you to TWRP recovery and NOT actually wipe the phone.
• If you had a bootloop then follow the above steps to get into the recovery and then you will need to download the following onto the phone: http://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503 [1.5GB]
Once in the recovery, you are able to connect the phone to the computer for regular data transfer in order to transfer the file. (I had problems with the microSD card so I would avoid it).
This system image seems to be missing the FM Radio, LG Remote and SmartSettings, Voice Recorder and Quickmemo apps. To get these back, go to general settings -> About phone -> Update centre -> App updates and download/install as necessary.​• If you still could not get into the recovery at all then follow the unbrick steps below in section 6.​
Thanks to autoprime for the system images [url[http://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503[/url]
Thanks to Chainfire for SuperSU http://forum.xda-developers.com/showpost.php?p=64161125
4. Installing Xposed
i) Download Xposed from here: https://forum.xda-developers.com/attachment.php?attachmentid=3848457&d=1471691646 and place it on your phone or SD card
ii) Enter recovery using the methods shown before. (You can also now enter recovery using this root app: https://play.google.com/store/apps/details?id=com.antaresone.quickreboot)
iii) Use the recovery menus to flash the zip file. Reboot.
iv) Download and install the Xposed installer app, XposedInstaller_3.0_alpha4.apk, from the post attachment here: http://forum.xda-developers.com/showthread.php?t=3034811
Thanks to rovo89 for Xposed and Follow_and_Feel for sharing the G4 Xposed link http://forum.xda-developers.com/showthread.php?t=3034811
5. Installing Viper4Android (this breaks FM radio!)
WARNING - The FM radio app will not work after installing this.
i) Download Viper4Android from here: https://www.dropbox.com/s/lvcxffdqimbi78b/V4A_Poweramp_Lollipop_v3.zip?dl=0
ii) Place the zip file on your phone or SD card and flash it in recovery. Reboot.
iii) Open the ViperFX app. From the menu and install the driver.
iv) You need to get Viper4Android to run in enforcing mode so flash this zip in recovery: https://www.dropbox.com/s/k9cnruw2e1t1d4t/ViPER4Android-supolicy.zip?dl=0
Install it. Open the app and set selinux to permissive. Reboot.
v) Install BusyBox from here: https://play.google.com/store/apps/details?id=stericson.busybox
Thanks to the ViperFX developers and zhuhang for Viper4Android http://forum.xda-developers.com/showthread.php?t=2191223
Thanks to Choristav for the Viper4Android file http://forum.xda-developers.com/lg-g2/general/guide-poweramp-viper4android-lollipop-t3133935
Thanks to maximumentropy for the SElinux enforcing zip http://forum.xda-developers.com/showthread.php?p=61242973#post61242973
Once all this is done and you're happy. It would be a good idea to enter recovery and make a full backup so that you can restore to the clean rooted state.
6. Unbrick Guide
If something messed up while flashing something and can't boot. Open up the recovery and restore your backup. If you don't have one, flash the v20d system image from an external SD card [1.5GB]. Download here: http://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
If you cannot get to the recovery then follow these steps:
i) Make sure you have the LG Drivers installed from here: http://oceanhost.eu/e4h2px4e0hkd/LGMobileDriver_WHQL_Ver_4.0.4.exe.htm
ii) Download the LG Bridge software from here: http://www.lg.com/us/support/product-help/CT10000025-1438110404543-preinstall-apps
iii) Remove the battery and reinsert it so the device it is fully off.
iv) While holding the up volume button, insert your USB cable.
v) You should enter download mode. Go to the Software Update tab of the LG Bridge. It will say connecting and then should say your device is up to date. Click on the recovery text on the bottom right and then follow the instructions. The software will download the system image for you and this is roughly 1.6GB so make sure your firewall doesn't block this connection.
This shouldn't delete your data (no guarantees) but you will have to grant app permissions again and reapply any changes to system files e.g. root, viper4android, xposed ect.
If you have problems try this method instead:
http://forum.xda-developers.com/g4/general/guide-lg-g4-stock-firmware-to-stock-kdz-t3107848
7. Debloat
Here is a list of apps and services an XDA user has suggested removing: https://forum.xda-developers.com/g4/general/bloatware-tool-t3141890/post61509537#post61509537
Removing these won't break the phone but of course be smart about it; removing Weather will mean you don't have the weather app. I only removed Google apps I don't use and redunadant apps from LG.
You can remove bloat apps using the Titanium Backup app from here: https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup
I would advice you to make a backup of them first in case you want them back. It's the easiest way to get the apps back.
If you do need a guide for using Titanium Backup, head over to this excellent guide: http://forum.xda-developers.com/showthread.php?t=2717159
8. Battery Optimisations
The aim is to get maximum battery life without compromising speed, user experience, features or notifications.
(I'm just going to use the following space as a log of things I've done. I will tidy this up when complete. Please do suggest if any of these things are ineffective or detrimental.)
Read through this guide: http://forum.xda-developers.com/g4/general/guide-g4-lag-free-marshmallow-t3327878
1. Disable Activity Logs: General Settings -> About phone -> Activity Logs at the bottom.
Also try following the steps on here; users report better battery life: https://www.reddit.com/r/lgg4/comments/4fb4uf/psa_free_up_some_ram_up_to_300mb_and_maybe_gain_a/
2. Disable Smart Settings under General Settings
3. Disable Bluetooth and Wi-Fi scanning location service: General Settings -> Location -> Menu -> Scanning -> Untick both. (I honestly can't believe these exist. I wondered why I have bluetooth wakelocks)
4. Disable Open Wi-Fi scanning: Network Settings -> Wi-Fi -> Menu -> Advanced -> Untick Wifi notification. Toggle this on and off as it should also fix random white LED blinking.
5. Greenify 2.9 beta to enable aggressive doze.
6. Follow this guide for processor tweaks http://forum.xda-developers.com/nexus-5x/general/guide-advanced-interactive-governor-t3269557
Please note that this is my first thread and I'm not a developer. I hope the instructions are as complete and accurate as possible and they are what I followed for my H815 602. If there are any things I forgot or updates, please do let me know.
Superb guide. Thanks. Should be stickied.
Official LG don't unlock bootloader for H815P
Only europe is eligible for service
when i try to get my device id it just hangs at:
Code:
C:\ADB>adb reboot bootloader
C:\ADB>fastboot oem device-id
< waiting for any device >
any ideas?
running win10, with the drivers installed.
-LE-
found out the problem. usb3.0 does not work used usb2.0 and work flawlessly
On 6.0 Android is more secured and so to install recovery you have to either boot the recovery, flash custom kernel, then flash recovery or unpack boot.img from a custom kernel, flash it via fastboot, then flash recovery and lastly full kernel package in recovery. Better if you include this in your guide because many people will be asking "why my recovery is not booting?" and that's what we don't want. I've repeated this about 50 times or more and finally I will not have to.
Hi! Thanks for this guide!
Just found a "typo"
ii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb fastboot recovery". (You will need to enable USB debugging again)
I'm sure it should say "adb reboot recovery" : )
It could be worth saying that after installing root, there will be a boot loop or two, it even say so when you install the latest SuperSU.
I am also interested in your battery optimization, the most I've done so far is to disable NFC and location and disable some of my google account syncs that I don't use or use very rarely.
Redgoblin said:
Hi! Thanks for this guide!
Just found a "typo"
ii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb fastboot recovery". (You will need to enable USB debugging again)
I'm sure it should say "adb reboot recovery" : )
It could be worth saying that after installing root, there will be a boot loop or two, it even say so when you install the latest SuperSU.
I am also interested in your battery optimization, the most I've done so far is to disable NFC and location and disable some of my google account syncs that I don't use or use very rarely.
Click to expand...
Click to collapse
Thanks for the correction.
In addition to what you've done, I have installed greenify and hibernated Snapchat, Viber and Facebook apps. WhatsApp isn't hibernated.
I have the donate version and xposed so till gcm push notifications.
I haven't done anything else. I had better battery stats installed for a few days and I kept checking it and was annoyed that I'd always have ~30% awake time with the screen off. There were no kernel wake locks, it was just app alarms mainly from android and Google.
I was getting 4 hours SOT and 20 hours use out of the box. Now I'm down to 3 hours 30.
I really wish the Autostarts app would work but it has no effect: https://play.google.com/store/apps/details?id=com.elsdoerfer.android.autostarts
This would allow me to stop many apps from waking up everytime the connectivity changes or the screen is unlocked.
I have Greenify with the donate Xposed settings. Coalescing, Deep Hibernation and GCM push enabled only. Here are the apps I have greenfied:
Maps
Skype
Viber
Messenger
Snapchat
Whatsapp
Gmail with 1 Google and 1 Yahoo account
CF.Lumen
Lux Autobrightness
Spotify
Viper4Android in High quality mode. Enabled are playback gain control; Equalizer; Dynamic System; Fidelity Control; Auditory System Protection and gain limiter.
Is anyone else not getting any sound from the radio app? It starts and even tunes to frequencies with channel name and now playing I hear no sound through headphones or speakers.
I've tried removing the app and installing from the update centre again.
The NextRadio app is incompatible (even when sideloading the apk) https://play.google.com/store/apps/details?id=com.nextradioapp.nextradio&hl=en
Well, I tried to unlock the H815 Taiwan version (bought on Amazon as a USA unlocked cellphone... ) but is not supported.
Damn it!
thanks...
i am wondering: if I go to settings / general / backup&reset, and then LG backup and perform a full backup on my SD card, will I be able to restore it all after rooting and get the system as it was previously?
joriq said:
i am wondering: if I go to settings / general / backup&reset, and then LG backup and perform a full backup on my SD card, will I be able to restore it all after rooting and get the system as it was previously?
Click to expand...
Click to collapse
I haven't tried it myself but have gone with the tried and trusted TWRP backup: http://www.howtogeek.com/240582/how-to-back-up-and-restore-your-android-phone-with-twrp/
And ADB backup which also works without root: http://forum.xda-developers.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351
These work great; you end up booting exactly where you left off and even with browser tabs still open as you left them.
From my understanding, you would need to boot into the phone and then perform the restore in the LG app. So this would require a bootable phone. The only times I restore would be after bootloops. For general app restore and settings, I use Titanium Backup. This provides the added benefit of being able to restore on different phones.
just to update all of you: I did root my 20d g4 and LG backup managed to restore almost everything. All apps are back, but I needed to agree to permissions for all of them and some returned with saved data, some did not. For example, none of my BT devices were recognised, so I have to pair all of them, which is tricky for moto 360, since it needed to be factory reset. However, I am very pleased with how things went in the end.
Also, my phone was not recognised when rebooting to fastboot, it took me an hour of changing ports and drivers, but then I decided to install the driver manually via device manager (win 7). I made an educated guess and nailed it
Also, I had a really hard time unlocking the bootloader, because LG site kept providing "service unavailable" message, so I had to fool the server that I am in Singapore (like in this guide https://youtu.be/O64GfQORCaE )...
it is work for H815-L?
and i will be glad if you post a guide how to unlocking the bootloader without voiding my warranty
and how about a guide to unlock the free money printing machine in our G4s? LOL
warranty will be void
Question will this work on sprint variants
I've updated the Viper4Android install method. You can flash this zip file: http://forum.xda-developers.com/showthread.php?p=61242973#post61242973
This will allow you to run Viper4Android without having to set SELinux to permissive. This is better for security but I also had issues with the SELinux mode changing back so would sometimes have to reboot or reinstall the viper driver to get it to work again. After doing this, you don't need the SELinux mode changer app.
will this work on v20e?
Murtagh92 said:
will this work on v20e?
Click to expand...
Click to collapse
You can try to follow the steps in this thread or install v20d as I believe they are basically the same but for different region.
Alternatively, follow this guide for v20e http://forum.xda-developers.com/g4/general/guide-root-h815-v20e-installing-twrp-t3354668

[GUIDE] Unlocking, Rooting, and Restoring to Stock for Le 2 / S3 (noob-friendly!)

I don't have anything against toolkits, I just prefer to use adb and fastboot so I have more control over of what's going on. I also think it's a good idea for folks to have a little idea about what they're doing, even if they aren't experts. Below are the steps I used to install TWRP (recovery) and SuperSU (root) for my X522 (aka S3, the US variant which uses the Snapdragon 652). I don't see any reason this wouldn't work for all other Snapdragon variants: X520 (Chinese), X526 (Indian), and X527 (International). That said, you do what you do at your own risk. If you have one of the other Snapdragon variants and this works for you, though, please respond to the thread and let me know!
This thread is intended to be noob-friendly! That means that there are no dumb questions...unless you ask a question that is directly answered in the first post or in the FAQs found in the second post. To that extent, please read and re-read and if you still can't find your answer, please feel free to post your question.
Many thanks to @Rishabh Rao and his team for getting us an official TWRP image.
WARNING: this will reset your phone entirely! Make sure you save anything you want from internal storage before proceeding any further!
WARNING: as of right now, unlocking / rooting your phone will break your ability to take official OTAs. We're not sure why. That said, you should be able to flash modified OTA zip files manually, after a certain block of the update script is removed (see second post for more information).
Unlocking and Rooting your Le 2
Download and install Minimal ADB and Fastboot: http://forum.xda-developers.com/showthread.php?t=2317790
Download latest official TWRP, place file in ADB installation folder, and rename to "twrp.img": https://twrp.me/devices/leecole2.html
Download SuperSU 2.78 (stable): https://download.chainfire.eu/1001/
Boot up phone and plug into computer
Settings > scroll to bottom to "About phone" > touch "Build" 7 times to enable developer options
Developer options > toggle "OEM unlocking" and "USB debugging" so that they're both enabled
When "Allow USB debugging?" window pops up on phone, check "Always allow..." box and hit OK
In Minimal ADB installation folder, hold Shift and right-click "Open command window here", then type:
Code:
adb reboot bootloader
Once in fastboot:
Code:
fastboot oem unlock-go
fastboot boot twrp.img
If password screen comes up, tap "Cancel" button
If it asks, tap "Keep Read Only" button (probably doesn't matter, but whatever)
Wipe > Format Data
Make backups (I suggest boot, recovery, and system since this will allow you to return everything to stock later on)
Mount > Enable MTP
Copy entire TWRP folder from internal storage to your computer
Copy SuperSU zip from your computer to root of internal storage
Reboot > Bootloader
Code:
fastboot oem unlock-go
fastboot flash recovery twrp.img
Hold Vol+ and Pwr until boots into TWRP
Swipe to Allow Modifications
Install > select SuperSU zip > swipe to flash
Wipe Cache/Dalvik
Reboot (first boot will take a little while, so be patient)
Enjoy your rooted phone!
Restoring to Stock(ish)
Follow steps 4-7 above
If your boot and recovery backups from TWRP aren't already on your phone, move them to the appropriate folder (internal storage/TWRP/BACKUPS/[yourphoneserialnumber])
In Minimal ADB installation folder, hold Shift and right-click "Open command window here", then type:
Code:
adb reboot recovery
Wipe > check Dalvik, Cache, Data
Restore > select your package, ensure boot and recovery are checked, then Swipe to Restore
Reboot > Recovery
In stock recovery: uncheck "Update system", check "Clear data", and tap "Start"
Reboot to bootloader (hold Vol- and Pwr until it comes up) and then:
Code:
fastboot oem unlock-go
fastboot boot twrp.img
Wipe > Format Data
Reboot > System
Your phone is now back to stock!
If you didn't back up your stock recovery, boot, or system, you can find the ones I pulled from my phone at the link below. They're from 19S. I don't know if that makes a difference (vs 18S) with boot and recovery or not, but obviously that's what you're getting with the system.
https://mega.nz/#F!bV0XUbhJ!k2ZfY5t9bxb8gRa3rKQbyA
FAQs
Fastboot and/or ADB doesn't see my phone!
If you've enabled OEM unlocking and USB debugging and fastboot devices returns <waiting for device> or adb devices doesn't show anything, the most likely culprit is that Windows is using updated ADB drivers and you need to roll back. You can do this via Device Manager > right-click Android Device (or Kedacom USB device) / Android Bootloader Interface > Update driver > Browse my computer for driver software > Let me pick... > Choose older version (probably something from 2014)
I haven't seen the "Allow USB debugging?" prompt. Where is it?
In some cases, you will need to run an ADB command first to make the prompt show up. If you toggled the appropriate developer options and didn't get the popup immediately, make sure your phone is plugged into your computer and type adb devices in the command prompt. You should get the popup box then.
Stock recovery is in Chinese and I can't read Chinese!
As I was testing the above procedures, this happened to me once or twice and I don't know why. Upon a full restore and boot back into recovery, it was in English again. It might have something to do with the data wipe in TWRP. Anyway, the options in stock recovery are the same in Chinese and English so do this:
Uncheck the first item and check the second
It will direct you to a screen with some red text and a blue button: tap the button
It will return you to the first page: ensure the second item is checked and tap the blue button
Uh, how do I re-lock the bootloader? Am I missing something?
As far as I can tell - and someone please correct me if I'm wrong - using this guide, your bootloader is only ever temporarily unlocked and will re-lock with a reboot. That's why you have to use fastboot oem unlock-go more than once. You can verify this by restarting the phone, rebooting into the bootloader, and using the code below to check the status:
Code:
fastboot oem device-info
If for some reason your phone shows that you still have an unlocked bootloader, you can re-lock it using:
Code:
fastboot oem lock-go
I'm stuck in a stock recovery bootloop. How do I get out of it?
This probably happened because you're just holding down the power button to reboot instead of using the "restart" button in stock recovery. If you use the "restart" button to in stock recovery, it should kick you out of the loop.
Thanks for this guide , can we expect some roms from your side.
Just curious to know if any developer is working for rom on le2
Great guide for beginners but can you tell that how can one lock the bootloader again and when we make a backup does it make the back up of TWRP recovery of stock recovery?
Great!! Informative thread for beginners!
Miketoulson said:
Just curious to know if any developer is working for rom on le2
Click to expand...
Click to collapse
Yes. @Rishabh Rao and his team (the same ones who did TWRP and the AIO toolkit) are working on CM. As a reminder, please do not ask for ETAs. They will post the ROM when it's available.
Swastik Raj Chauhan said:
Great guide for beginners but can you tell that how can one lock the bootloader again and when we make a backup does it make the back up of TWRP recovery of stock recovery?
Click to expand...
Click to collapse
1.) Regarding the bootloader: good question. I've updated the FAQ.
2.) Regarding recovery backup: that's why we only boot into TWRP the first time, rather than replacing recovery from the beginning. That way, stock boot and recovery are backed up. Later on, when we flash TWRP, stock recovery is replaced.
I'm having trouble with this guide. I have TWRP recover flashed, but it isn't working correctly. It says there is nothing in my sdcard directory and my computer won't connect to the phone in recovery. I've also tried "adb push ... /sdcard/" method. The SuperSU files gets put in the sdcard directory and I can flash it, but it says "unable to mount storage" and the file is gone after a reboot. Is this because it's encrypted and I'm just hitting cancel when it asks for a password?
abel408 said:
I'm having trouble with this guide. I have TWRP recover flashed, but it isn't working correctly. It says there is nothing in my sdcard directory and my computer won't connect to the phone in recovery. Is this because it's encrypted and I'm just hitting cancel when it asks for a password?
Click to expand...
Click to collapse
Sounds like you missed steps 12 and 14.
rczrider said:
Sounds like you missed steps 12 and 14.
Click to expand...
Click to collapse
Nope... I formatted data and enabled MTD. When I enable MTD, my computer tells my the phone is locked...
---------- Post added at 07:19 PM ---------- Previous post was at 07:14 PM ----------
My bootloader keeps locking itself...
(bootloader) Device product name: []
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Display panel:
I can unlock it, but it locks itself after a reboot.
abel408 said:
Nope... I formatted data and enabled MTD. When I enable MTD, my computer tells my the phone is locked...
---------- Post added at 07:19 PM ---------- Previous post was at 07:14 PM ----------
My bootloader keeps locking itself...
(bootloader) Device product name: []
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Display panel:
I can unlock it, but it locks itself after a reboot.
Click to expand...
Click to collapse
That's expected and is addressed in the FAQ
You're only ever temporarily unlocking it. You will need to unlock it every time you reboot the phone.
rczrider said:
That's expected and is addressed in the FAQ
You're only ever temporarily unlocking it. You will need to unlock it every time you reboot the phone.
Click to expand...
Click to collapse
oh wow... so there is no perm unlock with this phone yet? Does the Chinese version have perm unlock? We can flash the chinese bootloader for perm unlock if that's the case.
---------- Post added at 07:45 PM ---------- Previous post was at 07:27 PM ----------
And now I'm stuck... I cannot go back to stock because TWRP doesn't mount the storage.
---------- Post added at 08:01 PM ---------- Previous post was at 07:45 PM ----------
abel408 said:
oh wow... so there is no perm unlock with this phone yet? Does the Chinese version have perm unlock? We can flash the chinese bootloader for perm unlock if that's the case.
---------- Post added at 07:45 PM ---------- Previous post was at 07:27 PM ----------
And now I'm stuck... I cannot go back to stock because TWRP doesn't mount the storage.
Click to expand...
Click to collapse
I was able to fix this by wiping Internal Storage... You may need to add that to your guide. Thanks for the guide!
abel408 said:
oh wow... so there is no perm unlock with this phone yet? Does the Chinese version have perm unlock? We can flash the chinese bootloader for perm unlock if that's the case.
Click to expand...
Click to collapse
I can't get permanent root using the AIO Toolkit, but maybe it's just the 2 phones I've tried. I'd love to hear from other users (X522 or other variants) on whether or not their unlock actually sticks after a reboot.
abel408 said:
I was able to fix this by wiping Internal Storage... You may need to add that to your guide. Thanks for the guide!
Click to expand...
Click to collapse
If other folks run into the same issue, I'll add it. I followed my own steps on a second phone (one that had never been unlocked/rooted before and was currently set up and in use) after your post and I didn't have any need to do anything different. I'm wondering if that need arose because you didn't unlock the bootloader a second time before booting into TWRP. If that's the case, the guide works as written, so I'll add it to the FAQ.
I seem to have done something wrong. I'm having a really difficult time accessing the Data partition in TWRP. Every time I reboot into recovery I cannot access the files on the sdcard (it is simply empty). I reboot and the files are still in storage (along with the TWRP backups I made) - I just can't seem to get to them in TWRP. I cannot mount Data because it doesn't appear. There is a box to decrypt data but that then requires a password (which I obviously don't know). Don't want to go any further if I can't seem to have a dependable way to access backups. Any suggestions?
Edit: Enable MTP also doesn't work for me in TWRP so there is no way to bring any files over from my PC while in TWRP - also adb push/pull doesn't seem to be working
skyman88882002 said:
I seem to have done something wrong. I'm having a really difficult time accessing the Data partition in TWRP. Every time I reboot into recovery I cannot access the files on the sdcard (it is simply empty). I reboot and the files are still in storage (along with the TWRP backups I made) - I just can't seem to get to them in TWRP. I cannot mount Data because it doesn't appear. There is a box to decrypt data but that then requires a password (which I obviously don't know). Don't want to go any further if I can't seem to have a dependable way to access backups. Any suggestions?
Edit: Enable MTP also doesn't work for me in TWRP so there is no way to bring any files over from my PC while in TWRP - also adb push/pull doesn't seem to be working
Click to expand...
Click to collapse
If TWRP is asking for a password, that means you missed step 12.
I'm trying to upgrade from 18s to 19s and I'm getting upgrade failed every time. I've tried restoring to factory defaults and restoring my TWRP backup. Seems to be fully on stock now and it still fails. My question is, do you think it would be alright if I restored your 19s TWRP backup so that I am on 19s?
abel408 said:
I'm trying to upgrade from 18s to 19s and I'm getting upgrade failed every time. I've tried restoring to factory defaults and restoring my TWRP backup. Seems to be fully on stock now and it still fails. My question is, do you think it would be alright if I restored your 19s TWRP backup so that I am on 19s?
Click to expand...
Click to collapse
Tell you what: give me an hour or two. I'm currently on non-stock (ie. rooted) 18S and since the Xposed module EUI Moder (http://forum.xda-developers.com/xposed/modules/mod-leeco-eui-moder-t3416932) doesn't work (lockscreen flicker / system UI crash), I don't mind wiping the phone and testing the ability to go back to stock and do an OTA update to 19S. If it doesn't work for me, I'll restore 19S (from my other S3) via TWRP and see if that does it.
@abel408
My first try was to just grab the OTA file (which I did) and do a local update, but no dice. In case anyone cares, I've uploaded the OTA zip file (IFXNAOP5801910272S).
So I went ahead and used both 19S TWRP backups (one for boot/recovery and one for system only) downloadable from Mega via the link in the OP and it worked just fine. Those files were generated from a different phone and worked fine on this one, so you should be good to go.
rczrider said:
@abel408
My first try was to just grab the OTA file (which I did) and do a local update, but no dice. In case anyone cares, I've uploaded the OTA zip file (IFXNAOP5801910272S).
So I went ahead and used both 19S TWRP backups (one for boot/recovery and one for system only) downloadable from Mega via the link in the OP and it worked just fine. Those files were generated from a different phone and worked fine on this one, so you should be good to go.
Click to expand...
Click to collapse
Thanks buddy!
Thank you sir, this worked (almost) perfectly. For some reason on my laptop, I wasn't able to get the phone to connect with debugging (never got the prompt for permission, etc.). No clue why not, I've got drivers and everything, and that laptop works with many other phones. Oh well. Went to a different PC and it worked perfectly.
rczrider said:
@abel408
My first try was to just grab the OTA file (which I did) and do a local update, but no dice. In case anyone cares, I've uploaded the OTA zip file (IFXNAOP5801910272S).
So I went ahead and used both 19S TWRP backups (one for boot/recovery and one for system only) downloadable from Mega via the link in the OP and it worked just fine. Those files were generated from a different phone and worked fine on this one, so you should be good to go.
Click to expand...
Click to collapse
I think I'm doing something wrong @rczrider, but I can't get TWRP to even recognize the backup you uploaded. Do I just drag the extracted files to the TWRP folder?

♦®⊕⊕†♦ how to root your huawei device with nougat ♦

How to root your Huawei device on Nougat​
Disclaimer:
Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this TUTO
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.
*/
Hi mates
For all those who, like me, have a lot of trouble to root their Mate 8.
I've successful to root my phone from the B560.
Last tuto (FINAL):
* Have the B560 firmware (or above - ask me for that) without no changes for Huawei Mate 8 with Nougat firmware - for the others devices, ASK ME!!!
* This Boot_Insecure_BXXX_Fix-adb_dm-verity-v2.img or v3- 5 versions for the moment: B560 - B580 - B581 - B582 - B585 - B588- B590- B592- B594- B595- B596. For another kernel, ASK ME!
* Have this TWRP 3.1.0-x - or this one (following the update)
* Have this SuperSU-v2.xx-EMUI5.0.zip on your external sdcard for supersu Chainfire - method 1
* Have the PHH superuser.zip on your external sdcard for PHH superuser - method 2
1 - Easy way to root with supersu Chainfire:
Install the TWRP via adb, or SRKtools or still TWRP if you already have it
Install the new_Insecure_BXXX_dm-verity-v2.img or v3 via adb
Reboot to the recovery
Install SuperSU-v2.xx-EMUI5.0.zip from TWRP
Reboot system
2 - Easy way to root with PHH superuser:
Install the TWRP via adb, or SRKtools or still TWRP if you already have it
Install the new_Insecure_BXXX_dm-verity-v2.img or v3 via adb
Reboot to the recovery
Install PHH superuser.zip from TWRP
Reboot system
Install PHH superuser app via PlayStore (if necessary, you had to make it with previous version)
Devices with which it works:
HUAWEI Mate 8
HUAWEI Honor Note 8
HUAWEI P9
HUAWEI Honor 8
HUAWEI MediaPad M3
HUAWEI P9 Plus
Misc:
It's certainly possible to root others Huawei models . For them, send me the stock boot.img of your current firmware in order that I make an insecure boot Fix-adb dm-verity for your device.
All apps requiring root works well with this method.
Following a problem with access to developer options, a update was made that now makes us to v3.
Credits:
ajsmsg78 - who explained me how to create the insecure boot
jac10000 - who helped me to create the insecure boot Fix-adb dm-verity
Chainfire for supersu
phhusson for PHH superuser
Donators:
Thanks to them
letschky
Frittenfresser
Tecalote
Version Information:
Status: Functionnal
Created: 2017-02-12
Last Updated: 2018-02-07
If you like that, hit the THANKS button below !​
Report me if it works fine for you! I'll add you in the OP post.
Report me on which firmware you used my method.
Changes:
Code:
[B][I]Boot_Insecure_BXXX_Fix-adb_dm-verity-v2.img[/I][/B]
* fixes issue adb doesn't work
[B][I]Boot_Insecure_BXXX_Fix-adb_dm-verity.img[/I][/B]
* based on the [URL="https://forum.xda-developers.com/mate-8/orig-development/boot-decrypted-insecure-boot-img-adb-t3555257"]insecure boot[/URL]
* remove the boot checking of dm-verity for a better rooting
* authorize read/ write on the partitions
Thanks!
Install TWRP (SRKtools method)​
TWRP TUTO:
Download this twrp.img
Rename it as twrpmate8mm.img
Goes to the SRKtools folder
Goes to the recovery folder
Goes to the mate8 folder
Goes to the emui41 folder
Open mate8.zip file with winrar or other extractor
Inside, you've 2 files,stockrecoverymate8mm.img and twrpmate8mm.img, delete twrpmate8mm.img file in the zip and confirm
Drag and drop your renamed file (twrpmate8mm.img) in the opened zip, confirm
Plug your phone
Authorize Debug mode in Settings\Developper options
Check if "Enable OEM unlock" is ticked
Authorize Debug mode in popup windows
Now, you launch SRKtools app
In the menu, choose 3 (Install recovery 6.0) and enter
Choose 2 (Huawei Mate 8) and enter
Choose 3 (Install Mate 8 TWRP for Marshmallow (EMUI 4.1) and enter
Type y and enter
Type f and enter
Wait the end of installation
The phone will reboot to this recovery and you will see that is good recovery
Install TWRP (ADB method)​
TWRP TUTO:
Download this twrp.img
Rename it as twrp.img
Plug the phone with the debug mod activated
Check if "Enable OEM unlock" is ticked
Launch a command prompt from you ADB folder - like on the Flash_boot_img_tuto_02.jpg screenshot
Type: adb devices
Type: adb reboot bootloader
Put the twrp.img file in C: (you can put anywhere but you should know the path. So the better is to follow my instructions)
Type: fastboot flash recovery C:\twrp.img (Wait the end of installation, it's quick)
Brilliant work buddy! Keep it coming
Thank you!
Thank you for your hard work. I will try it immediately, downloading everything I need now.
Will report back when I have done it
---------- Post added at 07:08 PM ---------- Previous post was at 07:02 PM ----------
Question:
If I am already on official OTA B560, can I skip these steps?
16. Install update_data_full_hw_eu.zip - Don't reboot
17. Install update.zip - Don't reboot
Click to expand...
Click to collapse
@dexz 's method arranged by me​to avoid to format data again​
Only use if you are in the situation below... otherwise follow this method
Good news for those who are in my situation with my method. The @dexz 's method works fine but force again to format data... personnally I had more than tired to format data. So I made this....
You are with the semi rooted B560 or other perhaps
You have Chainfire supersu
You have decrypted your data
You have a Decrypted data boot and you wanted to keep it
Put my Decrypted data boot on the external SD
Phone is on... then unroot it fully with Chainfire supersu in its settings - it asks you to restore the boot.img, I pushed "NO" because I had a doubt if I still had it, in addition it will install again in this tuto
Reboot in TWRP (frd-twrp like @dexz 's tuto)
Install Decrypted data boot
Wipe Dalvik & cache - Strongly advised after to have flashed the boot, it doesn't eat some bread
Install superuser_noverify_nocrypt.zip
Reboot to system - It will take about 3-5mins or less, it's due to the wipe Dalvik & Cache
Go to playstore and Install phh's SuperUser app
And like me, you are fully rooted... Again thanks to @dexz for his method! The one above isn't more complicate and avoid to format again the data if you are in my situation.
franzyroy said:
Thanks!
You can try but I don't know the result. Try at least with update_data_full_hw_eu
Click to expand...
Click to collapse
Okay thanks for quick reply, will try with update_data only
---------- Post added at 07:19 PM ---------- Previous post was at 07:15 PM ----------
franzyroy said:
Thanks!
You can try but I don't know the result. Try at least with update_data_full_hw_eu
Click to expand...
Click to collapse
Another question, last one I promise.
You did not mention this in the thread, not that I saw at least.
Do I need to unlock my bootloader?
lovemajj said:
Okay thanks for quick reply, will try with update_data only
Click to expand...
Click to collapse
Perhaps it will work only with update data... I know someone has already rooted his phone like that (here).
lovemajj said:
Another question, last one I promise.
You did not mention this in the thread, not that I saw at least.
Do I need to unlock my bootloader?
Click to expand...
Click to collapse
Yes! I add it in the OP post!
franzyroy said:
Yes! I add it in the OP post!
Click to expand...
Click to collapse
Okay thank you!
lovemajj said:
Okay thank you!
Click to expand...
Click to collapse
Done
Short question is it possible that someone makes a twrp backup and i just reroll this on my phone?^^
How do I unlock the FRP lock?
EDIT: Nevermind, I figured out how to do it.
If anyone else needs an answer to this question here it is:
Before you unlock the bootloader, you MUST enable "OEM Unlocking".
If you do not do it before you unlock the bootloader, it will be greyed out and you will have to relock the bootloader and do it all over again.
---------- Post added at 09:26 PM ---------- Previous post was at 08:41 PM ----------
I have tried it now and it works!
Although I skipped one thing, which was step 3. I did not install the insecure boot because I know from the past that it screwed up my phone.
In short I did like this:
Enabled OEM Unlocking
Unlocked bootloader
Flashed TWRP (found in OP)
Factory reset
Format Data (here I rebooted to recovery)
Flashed the SuperSU zip (found in OP)
Flashed update_data_full_hw_eu.zip (also found in OP)
Then I flashed SuperSU again.
Reboot to system and done
Thank you for this post
lovemajj said:
How do I unlock the FRP lock?
EDIT: Nevermind, I figured out how to do it.
If anyone else needs an answer to this question here it is:
Before you unlock the bootloader, you MUST enable "OEM Unlocking".
If you do not do it before you unlock the bootloader, it will be greyed out and you will have to relock the bootloader and do it all over again.
---------- Post added at 09:26 PM ---------- Previous post was at 08:41 PM ----------
I have tried it now and it works!
Although I skipped one thing, which was step 3. I did not install the insecure boot because I know from the past that it screwed up my phone.
In short I did like this:
Enabled OEM Unlocking
Unlocked bootloader
Flashed TWRP (found in OP)
Factory reset
Format Data (here I rebooted to recovery)
Flashed the SuperSU zip (found in OP)
Flashed update_data_full_hw_eu.zip (also found in OP)
Then I flashed SuperSU again.
Reboot to system and done
Thank you for this post
Click to expand...
Click to collapse
So it works for you like that.
Thanks for your report, I will add you in the OP post.
Edit: Finally no, I will not add you, you don't match those who have a problem to root.
TWRP.img
franzyroy said:
Install TWRP (ADB method)​
TWRP TUTO:
Download this frd-twrp.img
Rename it as twrp.img
Plug the phone with the debug mod activated
Launch a command prompt from you ADB folder - like on the Flash_boot_img_tuto_02.jpg screenshot
Type: adb devices
Type: adb reboot bootloader
Put the twrp.img file in C: (you can put anywhere but you should know the path. So the better is to follow my instructions)
Type: fastboot flash recovery C:\boot.img (Wait the end of installation, it's quick)
Click to expand...
Click to collapse
@franzyroy I do not understand the point 8. Why boot.img fastboot flash recovery? I for flashing the recovery I always used FASTBOOT command FLASH RECOVERY TWRP.img Thanks
apollo_81 said:
@franzyroy I do not understand the point 8. Why boot.img fastboot flash recovery? I for flashing the recovery I always used FASTBOOT command FLASH RECOVERY TWRP.img Thanks
Click to expand...
Click to collapse
It's a typo. Sorry!
@apollo_81
It was a typo, I corrected it.
This is:
Code:
fastboot flash recovery C:\twrp.img
@apollo_81
Can you remove your quote here #16 that others persons don't make the error.
lovemajj said:
Although I skipped one thing, which was step 3. I did not install the insecure boot because I know from the past that it screwed up my phone.
Click to expand...
Click to collapse
I did it and I haven't had any issue.

[GUIDE] All-In-One noob friendly guide for xperia X (Root/Bootloader/Rom)

[UPDATE]: USE THIS ONLY FOR NOUGAT 7 OR 7.1! THERE IS A DIFFERENT GUIDE FOR ANDROID OREO!
https://forum.xda-developers.com/xperia-x/how-to/root-xperia-x-f5122-android-n-34-2-2-47-t3594502 (Written by YasuHamed, not me!)
If you are not interested in android Oreo, or you want to go back to Nougat, this guide is still valid! [End of Update]
This is a guide for newbies or for people that are simply confused. If you have any questions, you can always ask me, and I will reply. but please make sure you haven't made mistakes and do not ask about things that are already stated here. Let's go!
BEFORE DOING ANYTHING, NOTES
-make sure you have installed ADB : https://forum.xda-developers.com/showthread.php?t=2588979
-make sure ADB can read your phone with the correct drivers installed. If you have trouble with that, read "DRIVERS" section
!It is absolutely necessary to install the drivers correctly!
-Backup your stuff if you have any, you will need to delete everything from the phone
-Enable USB debugging
-Note: some of these instructions apply to Windows OS only!
-Note: links to downloads have been shortcutted as much possible to make it easier for you!
-Find some stock roms here! https://forum.xda-developers.com/xperia-x/how-to/sonyx-f5121-downgrade-8-0-0-to-7-1-1-to-t3754986
(Credit: HEKER510)
-Warning: you will lose your warranty!
-I am not responsible for any damage done to your device.
BACKUP DRM KEYS (OR WORKAROUND)
You may want to unlock your bootloader. If you unlock it without backing up the DRM keys, you will lose them. I did that mistake and I regret it. If you already did, there is an alternative solution, skip to step 8.
1) If you are running android 7 nougat, you will need to downgrade to MM. If you are running MM, skip to step 7.
2) You will need to wipe everything before rolling back, so if you have any data back it up
3) Download any stock MM 6.0.1 firmware for the xperia X. You can find one here : https://mega.nz/#!1xRj2CYS Decryption key: !qBVi7yky8AL84eUF3bpTTGQ2YmN0ePCjc-eSDZGIZCI
Watch out: if you have the dual SIM model, F5122, you need to download accordingly!
For more firmwares, check "BEFORE DOING ANYTHING"
4) Download the latest flashtool: http://www.flashtool.net/downloads.php
Upon installation, tick on fastboot, flashmode drivers! If it didn't ask you, go to the installation folder and run Flashtool-drivers.exe. Please read "DRIVERS" section!
5) Flash the .tft file
How to flash?
0. Go to "C:\Users\[Your PC Name]\.flashTool\firmwares" , and put your firmware .ftf file in there!
1. Open Flashtool and click on the lightning bolt icon (first one from the left)
2. In the prompt, choose flashmode.
3. Under firmware, click on the version you put (It should probably only be one option)
4. Under wipe , tick everything. Under the others, do not make any changes.
5. Click "Flash"
6. When the popup appears, connect your device. It needs to be powered off, and connected while you are holding the
"volume down" button.
7. Wait for it to finish.
8. Done. Boot up the device, it might take some time to open so don't worry.
Click to expand...
Click to collapse
6)If your phone bootloops, try flashing again or a different firmware and make sure you followed the steps correctly.
7) Once your phone successfully boots android MM, use Dirtycow to get your DRM keys out: https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
8) If you unlocked the bootloader before backing up your keys, you can use DRM kernel fix. You can get it here: https://forum.xda-developers.com/xperia-x/development/kernel-drm-fix-nougat-t3530849 Before using it check out the custom rom that includes this fix and other things.
UNLOCK BOOTLOADER
This is relatively easy and you can follow official sony instructions to do it.
1) Go to your phone settings, developer options, and enable OEM unlock
"But there is no developer options!" -Go to the bottom of your settings, system, about phone, and tap multile times on "Build Number", also at the bottom.
Click to expand...
Click to collapse
2) If you haven't already , install ADB fastboot and configure drivers (Link on top )
3) Follow the steps on the Sony website to get your unlock code: https://developer.sonymobile.com/unlockbootloader/email-verification/
4) After unlocking, a warning message on boot is normal!
INSTALL RECOVERY
Installing TWRP on your xperia X is very important, since you can flash zips and img files so easily, plus wipe, backup and other features.
1) Download the TWRP .img file: https://androidfilehost.com/?w=files&flid=197369 (Credit: eagleeyetom )
2) Make sure you have USB debugging enabled
3) Open your downloaded twrp folder
4) Run CMD in that folder (shift + right click inside the folder, Open CMD here )
5) Connect your Xperia X to your PC
6) Type these lines:
adb reboot bootloader
fastboot flash recovery recovery.img [where recovery.img is your twrp file name]
fastboot reboot
7) If no errors, twrp is now installed. Once your phone boots , turn it off,. To access TWRP recovery hold power button and volume down button until the TWRP menu appears.
STOCK ROM, ROOT
If you just want to root and not interested in additional features and tweaks, you can simply flash SU through TWRP to get your phone rooted.
Note: Current best stock ROM available: 7.1.1 (252) - better features than older ver, and good battery life.
0) Install your desired stock firmware using the exact same previous instructions, (under DRM section) with flashtool.
1) Download SuperSu
Or magisk, using YasuHamed guide mentioned on top, but I have not tested with anything other than Oreo 8.0
Use magisk if you want more stability / root features (like hide root from apps, modules )
2) copy it anywhere on your phone
3) Run TWRP
4) Tap on install
4) Flash the file
5) Reboot, you are now rooted
6) Insert your DRM keys if you have them
Custom ROMS
After unlocking the bootloader and installing TWRP this is the best way to go in order to get full root, tweaks.
https://forum.xda-developers.com/xperia-x/development/rom-xperia-x-pexorom-v1-0-0-f5122-f5121-t3590552
^ This is a very good custom ROM made by prmk74. You can see its features in his thread.
1) Download the rom and copy it to your phone
2) Run TWRP
note: It is recommended to wipe dalvik, cache, data ( your storage partition doesn't need to be wiped)
3) Tap install, find your downloaded file and execute
note: It is recommended to wipe dalvik, cache, data ( your storage partition doesn't need to be wiped)
4) Follow on-screen instructions, do not stop the booting after finishing the installation, it will take some time
5) Insert your DRM keys if you have them
6) For those who lost their keys: Now the functions like vivid image mode are working properly.
DRIVERS
For Windows 8/8.1/10 users, how to solve driver problems:
1) Press the Windows key + R together and in the ‘Run’ box type: shutdown.exe /r /o /f /t 00
– Now make the following selections to boot into the Start Up Setting Screen: Troubleshoot > Advanced options > Start Up Settings > Restart
– Then, when the machine restarts, select number 7 i.e. “Disable driver signature enforcement”. Your machine will start with Driver signing enforcement disabled until the next reboot.
B) Now you can install the Flashtool drivers. Go to the flashtool install location and run the drivers.exe again, check fastboot and flashmode
– Windows will warn that the driver is not signed and will require you to confirm the installation.
– Once the installation is complete, reboot the machine
TO CONCLUDE:
This is what you may want to do to get the most out of your new xperia x:
1) Backup DRM
2) Unlock BL
3) Install TWRP
4) Flash Persian (or a different rom) through TWRP (And subscribe to the thread so you receive updates)
5) Restore DRM
Notes:
None of the links, tools are of my work, I'm just writing a guide for my fellow XX owners
^^ this guide is so really good :3. I post flash script for someone dont know how to find it ^^
unzip it in this position.
C:\Users\[user-name]\.flashTool\mydevices
max26292 said:
^^ this guide is so really good :3. I post flash script for someone dont know how to find it ^^
unzip it in this position.
C:\Users[user-name]\.flashTool\mydevices
Click to expand...
Click to collapse
Thanks!
Thanks for this, I need some help!
All was fine until I tried flashing the recovery, comes back "partition unknown" error. I was unable to bring the device up under an adb device only as a fastboot device.
34.0.A.1.264_R3A firmware.
Different official sony driver (Sony bootloader guide driver didn't work)
Device now hangs on the Sony logo after boot messgae warning "OEM bootloader unlocked, device not trusted," any help would be appreciated.
brianx87 said:
Thanks for this, I need some help!
All was fine until I tried flashing the recovery, comes back "partition unknown" error. I was unable to bring the device up under an adb device only as a fastboot device.
34.0.A.1.264_R3A firmware.
Different official sony driver (Sony bootloader guide driver didn't work)
Device now hangs on the Sony logo after boot messgae warning "OEM bootloader unlocked, device not trusted," any help would be appreciated.
Click to expand...
Click to collapse
These USB drivers are very annoying to work with. I got mine to finally work using a program called ADB driver installer. http://adbdriver.com/downloads/ Choose automated installation and try what I said. I believe it should fix your problem, after installing the drivers reboot and flash again.
Other than that, I have to ask are you 1000% sure you used the exact commands?
I saw another thread someone mistook
"flash recovery recovery.img" for "flash recovery.img"
"recovery" should be included before the recovery file name
brianx87 said:
Thanks for this, I need some help!
All was fine until I tried flashing the recovery, comes back "partition unknown" error. I was unable to bring the device up under an adb device only as a fastboot device.
34.0.A.1.264_R3A firmware.
Different official sony driver (Sony bootloader guide driver didn't work)
Device now hangs on the Sony logo after boot messgae warning "OEM bootloader unlocked, device not trusted," any help would be appreciated.
Click to expand...
Click to collapse
Why didn't the sony guide work? It worked for me. Just so you know, the "device cant be trusted" message is appearing on everyones' phones after unlocking the bootloader, it's not a problem or something
the part of restoring DRM is skipped,
please xplain
YasuHamed said:
the part of restoring DRM is skipped,
please xplain
Click to expand...
Click to collapse
I know, as I said there is room for improvement. The reason I did not include it is because I never did it myself, so I don't want to write something wrong or something that could lead to problems. I write something only if I am 100% sure. If anyone of you is kind to offer that piece so the guide is complete I will be glad
FoxTheLegend said:
Why didn't the sony guide work? It worked for me. Just so you know, the "device cant be trusted" message is appearing on everyones' phones after unlocking the bootloader, it's not a problem or something
Click to expand...
Click to collapse
Ok I figured out what I did wrong and was able to amend another issue I edited out of this post.
brianx87 said:
Ok I figured outwhat I did wrong (able to boot into the os and warning message no longer an issue ) and the issue I am now facing is that twrp is hanging on the boot screen. Is this version of twrp built to a specific version of android?
Click to expand...
Click to collapse
What do you mean hanging? the twrp logo frozen?
FoxTheLegend said:
What do you mean hanging? the twrp logo frozen?
Click to expand...
Click to collapse
Working now, used a previous version of twrp by mistake. Using latest build works fine now, have to wait to get home from work to proceed with the rest, annoying procedures this stuff but your guide is great.
brianx87 said:
Working now, used a previous version of twrp by mistake. Using latest build works fine now, have to wait to get home from work to proceed with the rest, annoying procedures this stuff but your guide is great.
Click to expand...
Click to collapse
Thanks, Im glad to it works now
FoxTheLegend said:
I know, as I said there is room for improvement. The reason I did not include it is because I never did it myself, so I don't want to write something wrong or something that could lead to problems. I write something only if I am 100% sure. If anyone of you is kind to offer that piece so the guide is complete I will be glad
Click to expand...
Click to collapse
thank you for the answer sir
i am unable to find any twrp that work for my F5122, it always bricks and i have to reset.
is there any twrp recovery image that works correctly with f5122?
YasuHamed said:
thank you for the answer sir
i am unable to find any twrp that work for my F5122, it always bricks and i have to reset.
is there any twrp recovery image that works correctly with f5122?
Click to expand...
Click to collapse
Hmm.. Did you try the one from the poison thread? I myself have still the old version installed (not 3 or 3.1) if I find it on my pc I will share it with you
FoxTheLegend said:
Hmm.. Did you try the one from the poison thread? I myself have still the old version installed (not 3 or 3.1) if I find it on my pc I will share it with you
Click to expand...
Click to collapse
I have to modified kernel
all i want is to boot it via fastboot command
for example i have the rooted kernel SU installed (but battery drain is high) so i what wana do is flashing kernel with all securities OFF and then with twrp image i will do
Code:
fastboot boot twrp.img
i will boot the X in to twrp and i will flash SUPERSU via twrp.
thanks all
YasuHamed said:
I have to modified kernel
all i want is to boot it via fastboot command
for example i have the rooted kernel SU installed (but battery drain is high) so i what wana do is flashing kernel with all securities OFF and then with twrp image i will do
i will boot the X in to twrp and i will flash SUPERSU via twrp.
thanks all
Click to expand...
Click to collapse
I see, but don't you want to figure out why it's not working normally? Noone has reported a similar problem
FoxTheLegend said:
I see, but don't you want to figure out why it's not working normally? Noone has reported a similar problem
Click to expand...
Click to collapse
since there is no offcial twrp for X out yes and only DORA (XA) is available) even XA don't work for X
so either twrp 2.8, 3.0 or 3.1 any should just boot in order to let us flash superSU.
YasuHamed said:
since there is no offcial twrp for X out yes and only DORA (XA) is available) even XA don't work for X
so either twrp 2.8, 3.0 or 3.1 any should just boot in order to let us flash superSU.
Click to expand...
Click to collapse
=-= try to use this command fastboot flash recovery [your_recovery_name].img
I use f5122 and flash successfull twrp 3.0.2 and 3.1. with this, i flash some kernel and rom without any problem.
Everything is working good for me now, the only issue now is restoring the DRM keys, has anyone found a credible source for doing this on this device?
How can I be sure I have a full root? I can't seem to be able to uninstall some of the bloatware only disable it!
brianx87 said:
Everything is working good for me now, the only issue now is restoring the DRM keys, has anyone found a credible source for doing this on this device?
How can I be sure I have a full root? I can't seem to be able to uninstall some of the bloatware only disable it!
Click to expand...
Click to collapse
Well titanium backup can assure you but I don't see why you wouldn't have full root... You need an app uninstaller to uninstall bloatware, it can't be done through the settings you know that right

Categories

Resources