• XDA Forums have been migrated to XenForo. To discuss, report bugs and other issues, use this thread.

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

rczrider

New member
May 20, 2015
680
511
0
Markarth
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
  1. Download and install Minimal ADB and Fastboot: http://forum.xda-developers.com/showthread.php?t=2317790
  2. Download latest official TWRP, place file in ADB installation folder, and rename to "twrp.img": https://twrp.me/devices/leecole2.html
  3. Download SuperSU 2.78 (stable): https://download.chainfire.eu/1001/
  4. Boot up phone and plug into computer
  5. Settings > scroll to bottom to "About phone" > touch "Build" 7 times to enable developer options
  6. Developer options > toggle "OEM unlocking" and "USB debugging" so that they're both enabled
  7. When "Allow USB debugging?" window pops up on phone, check "Always allow..." box and hit OK
  8. In Minimal ADB installation folder, hold Shift and right-click "Open command window here", then type:
    Code:
    adb reboot bootloader
  9. Once in fastboot:
    Code:
    fastboot oem unlock-go
    fastboot boot twrp.img
  10. If password screen comes up, tap "Cancel" button
  11. If it asks, tap "Keep Read Only" button (probably doesn't matter, but whatever)
  12. Wipe > Format Data
  13. Make backups (I suggest boot, recovery, and system since this will allow you to return everything to stock later on)
  14. Mount > Enable MTP
  15. Copy entire TWRP folder from internal storage to your computer
  16. Copy SuperSU zip from your computer to root of internal storage
  17. Reboot > Bootloader
    Code:
    fastboot oem unlock-go
    fastboot flash recovery twrp.img
  18. Hold Vol+ and Pwr until boots into TWRP
  19. Swipe to Allow Modifications
  20. Install > select SuperSU zip > swipe to flash
  21. Wipe Cache/Dalvik
  22. Reboot (first boot will take a little while, so be patient)
  23. Enjoy your rooted phone!


Restoring to Stock(ish)
  1. Follow steps 4-7 above
  2. 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])
  3. In Minimal ADB installation folder, hold Shift and right-click "Open command window here", then type:
    Code:
    adb reboot recovery
  4. Wipe > check Dalvik, Cache, Data
  5. Restore > select your package, ensure boot and recovery are checked, then Swipe to Restore
  6. Reboot > Recovery
  7. In stock recovery: uncheck "Update system", check "Clear data", and tap "Start"
  8. Reboot to bootloader (hold Vol- and Pwr until it comes up) and then:
    Code:
    fastboot oem unlock-go
    fastboot boot twrp.img
  9. Wipe > Format Data
  10. Reboot > System
  11. 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
 
Last edited:

rczrider

New member
May 20, 2015
680
511
0
Markarth
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:
  1. Uncheck the first item and check the second
  2. It will direct you to a screen with some red text and a blue button: tap the button
  3. 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.
 
Last edited:

quasarswastik

New member
Dec 30, 2015
113
18
0
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?
 

rczrider

New member
May 20, 2015
680
511
0
Markarth
Just curious to know if any developer is working for rom on le2
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.

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?
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.
 
Last edited:
  • Like
Reactions: bobdubrovsky

abel408

New member
Mar 8, 2013
137
19
0
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?
 
Last edited:

rczrider

New member
May 20, 2015
680
511
0
Markarth
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?
Sounds like you missed steps 12 and 14.
 

abel408

New member
Mar 8, 2013
137
19
0
Sounds like you missed steps 12 and 14.
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.
 

rczrider

New member
May 20, 2015
680
511
0
Markarth
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.
That's expected and is addressed in the FAQ :p

You're only ever temporarily unlocking it. You will need to unlock it every time you reboot the phone.
 

abel408

New member
Mar 8, 2013
137
19
0
That's expected and is addressed in the FAQ :p

You're only ever temporarily unlocking it. You will need to unlock it every time you reboot the phone.
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 ----------

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.
I was able to fix this by wiping Internal Storage... You may need to add that to your guide. Thanks for the guide!
 

rczrider

New member
May 20, 2015
680
511
0
Markarth
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.
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.

I was able to fix this by wiping Internal Storage... You may need to add that to your guide. Thanks for the guide!
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.
 
Last edited:

skyman88882002

New member
Jan 10, 2014
55
11
0
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
 
Last edited:

rczrider

New member
May 20, 2015
680
511
0
Markarth
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
If TWRP is asking for a password, that means you missed step 12.
 

abel408

New member
Mar 8, 2013
137
19
0
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?
 

rczrider

New member
May 20, 2015
680
511
0
Markarth
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?
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.
 
Last edited:
  • Like
Reactions: abel408

rczrider

New member
May 20, 2015
680
511
0
Markarth
@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.
 
Last edited:
  • Like
Reactions: abel408

abel408

New member
Mar 8, 2013
137
19
0
@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.
Thanks buddy!
 

cowrecked

New member
Nov 28, 2011
42
2
0
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.
 

abel408

New member
Mar 8, 2013
137
19
0
@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.
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?
 
Our Apps
Get our official app! (coming soon)
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone