FORUMS
Remove All Ads from XDA

[COMPLETE GUIDE] usb driver, adb, fastboot, recovery(without flashing), backup, flash

56 posts
Thanks Meter: 58
 
By greenManGaming, Member on 11th December 2016, 12:14 PM
Post Reply Email Thread
since i read about many people that wanted to flash a custom (or stock) rom but want to be able to restore the delivered rom i want to write a little tutorial for:
(this is what i did to make it work for me, be careful otherwise you can brick your device. i am not responsible if your device gets bricked)

I setting up ADB + Fastboot (on windows & Linux)
II booting a (racovery)image without flashing it
III backing up the WHOLE phone (to be able to restore the delivery status)
IV flashing (stock) rom


1. download:
- - - - 1.1 15 seconds ADB Installer (for Windows) from a xda user
- - - - - - - - - - 1.1.1 old and more complicated way to do that: Android IDE including the android sdk at https://developer.android.com/studio
actually you only need the android sdk which is included in the SDK tools package but i couldnt get that to work so i would be very happy if someone could write a short tutorial on how to use that and i will add it!

- - - - 1.2 twrp from https://twrp.me/devices/leecolemax2.html
- - - - 1.3 ROM: eg LineageOS from the ROM section

2. - 4. installing ADB and Driver
- - - - 2.5 WINDOWS: when using 15 seconds ADB installer step 2.-4. become obsolete
- - - - 2.6 LINUX: sudo apt update && sudo apt install android-tools-adb android-tools-fastboot && adb version (troubleshooting: sudo adb kill-server && sudo adb start-server)


2. install the ide:
- - - - 2.1 install the ide (android studio) which you downloaded
- - - - 2.2 open the android studio
- - - - 2.3 on the welcome screen press "configure" on the lower right corner, then "SDK Manager"
- - - - 2.4 go to "SDK Tools" and check the checkboxes "Android Platform Tools" (for ADB and Fastboot in console) and "Google USB Driver" (for the device driver) and press apply

3. setting adb and fastboot as Environment Variables (instead of navigating to the path where the adb.exe and fastboot.exe are (in order to use adb and fastboot in the console you can also add them to the system commands))
- - - - 3.1 open: open "Run" by pressing Windows+R -> enter "sysdm.cpl" and press ok -> advanced -> Environment Variables
- - - - - - - - - - 3.1.1 in the System variables section search for the variable "Path" and click the edit button
- - - - - - - - - - 3.1.2 add to the end ";" + your "platform-tools"-path (mine was in "C:\Users\USERNAME\AppData\Local\Android\sdk\platf orm-tools" but you can slo simply search the computer for "platform-tools" or "adb.exe" to find the path)

4. install adb usb driver
- - - - 4.1 plug in your Leeco Le Max 2 go to device manager (by openening "Run" by pressing Windows+R and enter "devmgmt.msc")
- - - - 4.2 search for your phone (mine was called "Android Phone" and had a yellow warning symbol)
- - - - 4.3 right click -> Update Driver Software -> "Browse my computer for driver software" -> "Let me pick from a list of device drivers on my computer" -> "Show All Devices" -> "Have Disk"
- - - - 4.4 enter the path to the Goolge USB Driver it should be "C:\Users\USERNAME\AppData\Local\Android\sdk\extra s\google\usb_driver" (but you can also simply search your computer for "usb_driver" to find the path)
- - - - 4.5 select "Android ADB Interface" from the list -> confrim and install
- - - - 4.6 CAUTION: i had to install the driver twice!! once when the device was simply turned on and plugged in as described above and ALSO when it wen into fastboot mode!!!!


5. unlock your bootloader
- - - - 5.1 on your Phone go to settings -> About Phone -> Tap On "Build Number" 7 Times To Enable Developer Options
- - - - 5.2 Settings -> Developer Options -> enable "Usb Debugging"
- - - - 5.3 Settings -> Developer Options -> enable "Oem Unlock"

- - - - 5.4 connect your turned on Le Max 2 via USB
- - - - 5.5 start the console via Windows+R -> "cmd" and enter the following
- - - - 5.6 adb usb" -> confirm the connection on your device
- - - - 5.7 (optional) "adb devices" to check if your device is listed
- - - - 5.8 "adb reboot bootloader" brings you to the fastboot mode (if not check on of the links)
- - - - 5.9 (optional) "fastboot oem device-info" shows some info about your device e.g. your lock status
- - - - 5.10 "fastboot oem unlock" unlocks your bootloader -> confirm on smartphone (via "fastboot oem lock" you can also lock your device angain)
- - - - 5.11 (optional) "fastboot reboot" if you dont want to continue

6. boot into twrp without flashing and backup
- - - - 6.1 copy your twrp img (from 1.2) to the path you are using the console from (in the console you should see something like C:\Users\USERNAME>_ thats the device where you need to store your twrp image)
- - - - 6.3 enter the following to your console while beeing in fastboot mode (you possibly have to repeat steps 5.4-5.8)
- - - - 6.4 "fastboot boot RECOVERYNAME.img" replace the RECOVERYNAME by the name of your recovery imagename e.g. "twrp-3.0.2-1-x2.img" (for flashing the rom type [-"fastboot flash recovery RECOVERYNAME.img"
- - - - 6.5 twrp should start after a few seconds
- - - - 6.6 go to "backup"
- - - - 6.7 select everything!
- - - - 6.8 backup
- - - - 6.9 reboot your device (to system)
- - - - 6.10 copy the TWRP folder which contains the folder "BACKUPS" and your files to your computer
- - - - - - - - - - 6.10.1 you will possibly occure a "denied permission" error. so you'll have to go to the console (again in the twrp) and enter "chmod -R 777 /sdcard/TWRP" that changes the permission of everything invluded in the folder TWRP to read+write+execute
- - - - - - - - - - 6.10.2 alternatively you can also backup on a usb stick via otg

- - - - 6.11 to restore repeat till step 6.5 and go to restore, there you should see the backup you created (of course you should have copied it to your device via the pc)

7. flash recovery
- - - - 7.1 i flashed the indian stock rom since it already has the google play store installed (is there any benefit using the chinese rom????????)
- - - - 7.5 instead of steps 7.2-7.4 you can also simply copy the desired rom on your phone (or a usb stick that you connect to your phone and have to mount inside TWRP!) and use the install option of TWRPthats way easier!!!


- - - - 7.2 start twrp again (see 6.3-6.5) and enter the adb sideload mode
- - - - 7.3 on the cmd type "adb sideload STOCKrOM.zip" (another way is described in this post: https://forum.xda-developers.com/sho...&postcount=104)
- - - - 7.4 CAUTION: the adb command on my computer took so long that the adb sideloadmode on the smartphone exited with a timout error... if you have the same problem just try to start the adb sideload command on the smartphone one or two minutes after you entered it on the cmd


links:
1. https://translate.google.com/transla...ation_(Windows)
2.
- - - - 2.6 https://www.linuxbabe.com/ubuntu/how...04-16-10-14-04
- - - - 2.6 https://wiki.ubuntuusers.de/adb/
- - - - 2.6 https://wiki.ubuntuusers.de/fastboot/
4. http://www.leeco.re/topic/88-manuall...db-usb-driver/
5. https://www.******.com/install-twrp-root-le-max-2/
- - - - 5.10 http://en.miui.com/thread-279195-1-1.html
6. https://translate.google.com/transla...ern-ohne-root/
- - - - additonally https://aubykhan.wordpress.com/2013/...hout-flashing/
- - - - alternative: adb backup (but not working as nice as twrp/cwm backup) https://translate.google.com/transla...ackup-sichern/
- - - - 6.9 http://www.howtogeek.com/240655/how-...-safe-keeping/
- - - - 6.9.1 https://www.codeproject.com/articles...android-device
7. http://forum.le.com/in/index.php?thr...e-guide.12482/
https://wiki.lineageos.org/devices/x2/install
- - - - 7.1 http://forum.xda-developers.com/le-m...6#post67779556



Quote:

If you want to help make this tutorial better please feel free to comment and i will add it here:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I AM VERY NEW TO THIS SO PLEASE CONSIDER THIS SIMPLY AS A PROTOCOL OF WHAT I DID
I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS WHILE TRYING THIS OUT
The Following 43 Users Say Thank You to greenManGaming For This Useful Post: [ View ] Gift greenManGaming Ad-Free
 
 
14th December 2016, 03:52 AM |#2  
atomicblue's Avatar
Senior Member
Thanks Meter: 29
 
More
thanks for the tutorial
14th December 2016, 04:27 AM |#3  
Senior Member
Thanks Meter: 40
 
More
Excellent tutorial, please add the step to root the phone for stock ROM. Thanks
14th December 2016, 05:02 AM |#4  
atomicblue's Avatar
Senior Member
Thanks Meter: 29
 
More
nvm
14th December 2016, 04:51 PM |#5  
OP Member
Thanks Meter: 58
 
More
Quote:
Originally Posted by atomicblue

i'm having permission errors when trying to move the backup to my desktop. when i type the chmod command in the adb terminal nothing happens. any help?

i need in order to help you:
- what is the error that occurs? can you please use the twrp file manager to locate the twrp backup path? on my device it was here "/sdcard/TWRP/BACKUPS/"123abcd-canBeDifferent"/2016-12-13_someRandomDigits" containing the syszem_image.emmc.win , data.ext4.win000 system.ext4.win000 and so on...
- canyou please also go to the console inside twrp and go to the twrp directory by typing "cd /sdcard/TWRP/BACKUPS/"123abcd-canBeDifferent"/2016-12-13_someRandomDigits" and then please type "ls -l" please post the output here ( i only need the first block of each line, it should look like this -rwxrwxrwx)

i read somewhere that you can copy files via adb... but i dont remember how that worked...

possible solutions:
but you can try to use a ubuntu live system and try to copy the files with linux
OR
you can use an otg adapter and copy the files via the file manager within twrp
The Following 2 Users Say Thank You to greenManGaming For This Useful Post: [ View ] Gift greenManGaming Ad-Free
14th December 2016, 04:56 PM |#6  
OP Member
Thanks Meter: 58
 
More
Quote:
Originally Posted by Amowagou

Excellent tutorial, please add the step to root the phone for stock ROM. Thanks

thank you @Amowagou i never rooted my device since resurection and mokee are both prerooted so i dont know how to do that but i saw another very good post on that topic. basically you have to flash a supersu image.

so boot into twrp (depending on what you already have done you might need to start at point 1.1 till 6.4) and then just flash the supersu image with twrp


EDIT:

i just found the thread: http://forum.xda-developers.com/le-m...overy-t3512619

i hope i could help!
The Following 2 Users Say Thank You to greenManGaming For This Useful Post: [ View ] Gift greenManGaming Ad-Free
15th December 2016, 09:31 PM |#7  
atomicblue's Avatar
Senior Member
Thanks Meter: 29
 
More
I got it working, what happened was I didn't type the ch command in the terminal correctly haha.

thanks for taking your time to reply.

Quote:
Originally Posted by greenManGaming

i need in order to help you:
- what is the error that occurs? can you please use the twrp file manager to locate the twrp backup path? on my device it was here "/sdcard/TWRP/BACKUPS/"123abcd-canBeDifferent"/2016-12-13_someRandomDigits" containing the syszem_image.emmc.win , data.ext4.win000 system.ext4.win000 and so on...
- canyou please also go to the console inside twrp and go to the twrp directory by typing "cd /sdcard/TWRP/BACKUPS/"123abcd-canBeDifferent"/2016-12-13_someRandomDigits" and then please type "ls -l" please post the output here ( i only need the first block of each line, it should look like this -rwxrwxrwx)

i read somewhere that you can copy files via adb... but i dont remember how that worked...

possible solutions:
but you can try to use a ubuntu live system and try to copy the files with linux
OR
you can use an otg adapter and copy the files via the file manager within twrp

15th December 2016, 10:14 PM |#8  
OP Member
Thanks Meter: 58
 
More
great, actually "chmod -R 755 /sdcard/TWRP" should be fine too i just wasnt sure what to do so i lifted ALL restrictions by granting EVERYBODY read, write and execute rights ^^
but for backing up data that should be fine
The Following User Says Thank You to greenManGaming For This Useful Post: [ View ] Gift greenManGaming Ad-Free
22nd January 2017, 11:19 PM |#9  
Junior Member
Thanks Meter: 2
 
More
Hello

First thank you very much for your great guide ! I think it is very clear and helped a lot of guys.

However, i am facing an issue :

When i go to the sideload and write the code with the exact name of the zip file, it answer that it cannot read the file.
I tried to rename de file, with no special signs, replacing special signs with dots, naming it "filename". I tried to copy it in the C:\Users\Antoine\AppData\Local\Android\sdk\platfor m-tools it still wouldn't read it.
I tried with the indian version 16S but also 19S and both are not working.
Where should i copy the file ? What should be the name of it ? should i do something before coding "adb sideload" than just opening sideload in the phone's TWRP ?
To sum up : I don't know what to do, do you have a solution ?

Also, for newbies : the cmd in the twrp is in advanced, and called "terminal" (i seeked it for a long time).

Thank you in advance
The Following User Says Thank You to Sweet-death For This Useful Post: [ View ] Gift Sweet-death Ad-Free
23rd January 2017, 02:42 AM |#10  
kakagi's Avatar
Senior Member
Flag Kolkata
Thanks Meter: 195
 
More
Quote:
Originally Posted by Sweet-death

Hello

First thank you very much for your great guide ! I think it is very clear and helped a lot of guys.

However, i am facing an issue :

When i go to the sideload and write the code with the exact name of the zip file, it answer that it cannot read the file.
I tried to rename de file, with no special signs, replacing special signs with dots, naming it "filename". I tried to copy it in the C:\Users\Antoine\AppData\Local\Android\sdk\platfor m-tools it still wouldn't read it.
I tried with the indian version 16S but also 19S and both are not working.
Where should i copy the file ? What should be the name of it ? should i do something before coding "adb sideload" than just opening sideload in the phone's TWRP ?
To sum up : I don't know what to do, do you have a solution ?

Also, for newbies : the cmd in the twrp is in advanced, and called "terminal" (i seeked it for a long time).

Thank you in advance

Use Indian 15s it will work. Later change the EUI by updating it.

Sent from my Le X821 using XDA-Developers Legacy app
23rd January 2017, 07:17 AM |#11  
OP Member
Thanks Meter: 58
 
More
Quote:
Originally Posted by Sweet-death

Hello

First thank you very much for your great guide ! I think it is very clear and helped a lot of guys.

However, i am facing an issue :

When i go to the sideload and write the code with the exact name of the zip file, it answer that it cannot read the file.
I tried to rename de file, with no special signs, replacing special signs with dots, naming it "filename". I tried to copy it in the C:\Users\Antoine\AppData\Local\Android\sdk\platfor m-tools it still wouldn't read it.
I tried with the indian version 16S but also 19S and both are not working.
Where should i copy the file ? What should be the name of it ? should i do something before coding "adb sideload" than just opening sideload in the phone's TWRP ?
To sum up : I don't know what to do, do you have a solution ?

Also, for newbies : the cmd in the twrp is in advanced, and called "terminal" (i seeked it for a long time).

Thank you in advance

it looks like your pathname has a white space in it. you have to choose a pathname without any whitespaces. (TIP: you can hold "SHIFT" + "RIGHT CLICK" then you can click on "copy as path", but remove the quotes if you paste it to the console)

[instead of using sideload you can also try to copy the stock rom on your device and install it with "install" on twrp or you can copy it on an usb stick and connect it via otg]
The Following User Says Thank You to greenManGaming For This Useful Post: [ View ] Gift greenManGaming Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes