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

Search This thread

greenManGaming

Senior Member
Jan 26, 2016
56
59
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\platform-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\extras\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://xdaforums.com/showpost.php?p=73995755&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/transl...e/wiki/Adb_und_Fastboot_Installation_(Windows)
2.
- - - - 2.6 https://www.linuxbabe.com/ubuntu/how-to-install-adb-fastboot-ubuntu-16-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-manually-installing-android-adb-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/transl....de/2014/08/android-geraet-sichern-ohne-root/
- - - - additonally https://aubykhan.wordpress.com/2013...t-into-twrp-or-cwm-recovery-without-flashing/
- - - - alternative: adb backup (but not working as nice as twrp/cwm backup) https://translate.google.com/transl...ystem-und-alle-apps-ueber-adb-backup-sichern/
- - - - 6.9 http://www.howtogeek.com/240655/how-to-copy-twrp-android-backups-to-your-pc-for-safe-keeping/
- - - - 6.9.1 https://www.codeproject.com/articles/825304/accessing-internal-data-on-android-device
7. http://forum.le.com/in/index.php?th...d-gen-superphones-offline-update-guide.12482/
https://wiki.lineageos.org/devices/x2/install
- - - - 7.1 http://xdaforums.com/le-max-2/help/how-to-stock-rom-recovery-t3419377/post67779556#post67779556



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​
 
Last edited:

greenManGaming

Senior Member
Jan 26, 2016
56
59
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
 

greenManGaming

Senior Member
Jan 26, 2016
56
59
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://xdaforums.com/le-max-2/how-to/root-le-max-2-changing-stock-recovery-t3512619

i hope i could help!
 

atomicblue

Senior Member
May 21, 2012
204
29
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.

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
 

greenManGaming

Senior Member
Jan 26, 2016
56
59
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 ;)
 
  • Like
Reactions: atomicblue

Sweet-death

Member
Sep 14, 2016
6
2
Hello

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

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\platform-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
 
  • Like
Reactions: greenManGaming

kakagi

Senior Member
Apr 24, 2011
998
196
Kolkata
Motorola Edge 30
Hello

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

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\platform-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
 

greenManGaming

Senior Member
Jan 26, 2016
56
59
Hello

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

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\platform-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]
 
  • Like
Reactions: Sweet-death

Sweet-death

Member
Sep 14, 2016
6
2
Hello,

thank you very much greenManGaming. It worked when in installed it through the TWRP :)

However it did not solve my problems with this phone, still cant recieve or send mms and wifi works only with youtube but won't open internet pages (which is very wierd, i can search on google, but can't open any pages ! Maybe setting issue ?).

Anyway, thank you very much for your tutorial, it was very clear and useful.
 

greenManGaming

Senior Member
Jan 26, 2016
56
59
i heared that the chinese services for example the location service which runs over baidu arent working great outside china...maybe there are more issues outside china????
if nothing helps you can try one of the custom roms. (but be careful with mokee. i read that the mokee rom is (or at least was) trying to make a strange connection ... but i dont know if thats proven.. i just read it somewhere)
as far as i know @CrisBalGreece MIUI should be very good https://xdaforums.com/le-max-2/development/lemax2-x820-822-miui8-1-6-12-3december-t3526832

regarding your browser problem. did you try another browser? (eg google chrome)
and also try another sms app (eg google messenger or maybe google allo)

if it didnt help, could you check which version you have right now? and maybe make an update?
 

CrisBalGreece

Senior Member
Jul 2, 2016
2,286
2,219
Athens
i heared that the chinese services for example the location service which runs over baidu arent working great outside china...maybe there are more issues outside china????
as far as i know @CrisBalGreece MIUI should be very good https://xdaforums.com/le-max-2/development/lemax2-x820-822-miui8-1-6-12-3december-t3526832
[/URL])
Hello. Just take those scripts and put at the end of build.prop before flashing the rom. Those make the default DNS from BAIDU to Google DNS servers. ;)

# Google DNS Tweak
net.rmnet0.dns1=8.8.8.8
net.rmnet0.dns2=8.8.4.4
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4
 
  • Like
Reactions: greenManGaming

Sweet-death

Member
Sep 14, 2016
6
2
Hello. Just take those scripts and put at the end of build.prop before flashing the rom. Those make the default DNS from BAIDU to Google DNS servers. ;)

# Google DNS Tweak
net.rmnet0.dns1=8.8.8.8
net.rmnet0.dns2=8.8.4.4
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4


Thank you CrisBalGreece for this advice, before trying the custom rom (always something not working at the end of the day) i would like to try your solution. :highfive:
Could you tell me were the file is ? it's a .whichformat ? Is it in the zip of the rom i will install ? Do i have to erase something before pasting it ?
I tried to find a build.prop file, don't have any, i also went through most of the files i found but nothing in it mention "google" or "baidu" and when "dns" is mentionned nothing's written like your quote :eek:

One last question, will this solve the mms solution ?

One last last question : i didn't erase data when upgrading from 16s to 19s, could it influence anyhing in anyway ?

I tried several other browser (chrome, opera, mozilla) and also sms programs (textra, chomp sms), nothing changes.:crying:

Don't forget i'm a total newbie so you should not expect much initiative from me :laugh:
 
Last edited:

CrisBalGreece

Senior Member
Jul 2, 2016
2,286
2,219
Athens
Thank you CrisBalGreece for this advice, >>>>>>>:
Hello, i don't know what is the phone you have so i can't help you. Eatch phone according his OS has diefrent properties. But if you have build.prop in your system file then you my go with this solution.
Maybye the mms,sms problem is on your APN settings and not on the DNS settings. Try to find your DNS configuration .xml to see inside if supports your carrier's configuration.:)
 

paulsnz2

Member
Sep 26, 2016
30
3
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)
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 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 indian stock rom http://forum.le.com/in/eui_list.html -> on the top left choose "Le Max 2" in the drop down menu

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\platform-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\extras\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 vie 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 stock 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.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"
- - - - 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/transl...e/wiki/Adb_und_Fastboot_Installation_(Windows)
4. http://www.leeco.re/topic/88-manually-installing-android-adb-usb-driver/
5. https://www.gizdev.com/install-twrp-root-le-max-2/
- - - - 5.10 http://en.miui.com/thread-279195-1-1.html
6. https://translate.google.com/transl....de/2014/08/android-geraet-sichern-ohne-root/
- - - - additonally https://aubykhan.wordpress.com/2013...t-into-twrp-or-cwm-recovery-without-flashing/
- - - - alternative: adb backup (but not working as nice as twrp/cwm backup) https://translate.google.com/transl...ystem-und-alle-apps-ueber-adb-backup-sichern/
- - - - 6.9 http://www.howtogeek.com/240655/how-to-copy-twrp-android-backups-to-your-pc-for-safe-keeping/
- - - - 6.9.1 https://www.codeproject.com/articles/825304/accessing-internal-data-on-android-device
7. http://forum.le.com/in/index.php?th...d-gen-superphones-offline-update-guide.12482/
- - - - 7.1 http://xdaforums.com/le-max-2/help/how-to-stock-rom-recovery-t3419377/post67779556#post67779556



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


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------​

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​

PS I needed this dial *#*#76937#*#* and enable AT port before I could "see" my phone
 

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    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\platform-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\extras\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://xdaforums.com/showpost.php?p=73995755&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/transl...e/wiki/Adb_und_Fastboot_Installation_(Windows)
    2.
    - - - - 2.6 https://www.linuxbabe.com/ubuntu/how-to-install-adb-fastboot-ubuntu-16-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-manually-installing-android-adb-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/transl....de/2014/08/android-geraet-sichern-ohne-root/
    - - - - additonally https://aubykhan.wordpress.com/2013...t-into-twrp-or-cwm-recovery-without-flashing/
    - - - - alternative: adb backup (but not working as nice as twrp/cwm backup) https://translate.google.com/transl...ystem-und-alle-apps-ueber-adb-backup-sichern/
    - - - - 6.9 http://www.howtogeek.com/240655/how-to-copy-twrp-android-backups-to-your-pc-for-safe-keeping/
    - - - - 6.9.1 https://www.codeproject.com/articles/825304/accessing-internal-data-on-android-device
    7. http://forum.le.com/in/index.php?th...d-gen-superphones-offline-update-guide.12482/
    https://wiki.lineageos.org/devices/x2/install
    - - - - 7.1 http://xdaforums.com/le-max-2/help/how-to-stock-rom-recovery-t3419377/post67779556#post67779556



    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​
    7
    I'd like to thanks to @greenManGaming for this excelent guide! With its help i was able to make everything i've wanted with my new x829 without any problems. I want to share with everyone with my expirience - mayby someone will find it usefull.

    So a little background of my systems:
    1. I am running PC with Windows x64 10
    2. ADB and Factboot - from sevral months i'm using Minimal ADB and Fastboot for any android device that i have (about 8 diffrent devices)
    3. Drivers - PdaNet+ for Android - working flawlessly with any device

    So as you see i'm not using adb and drivers from this guide.

    My the steps from the begining:
    1. Boot new phone without setup acounts etc.
    2. Enable Developer options and USB debugging
    3. Plug the phone into PC using cable that came with it.
    4. Let the drivers to install, so the phone is visible in system
    5. Using adb commands boot to fastboot. (my x829 had unlocked bootloader out of box, but better check this - this guide has this procedure discribed)
    6. From Fastboot run TWRP without flashing it
    7. Backup using TWRP every partition of the phone
    8. When backup ends reboot using Factboot commands into system
    9. Copy TWRP backup folder into PC drive (you will have factory image if something ever will go wrong)
    10. Copy all zips that you want to install into phone memory( i'm using Small Eui based on official chinise 23s firmware)
    10. Boot into Fastboot and flash TWRP into phone
    11. From TWRP wipe Dalvik/Cache and Data (optional)
    12. Install/flash SmallEui V12 by Auriel
    13. Install/flash SuperSU and Xposed provided in Auriel's thread
    14. Boot into system, setup accounts etc.
    15. Install SuperSu from the Play Store ( Auriel's was giving SU privilages without prompt - i'am not okay with that); let it uninstall privious app
    16. Boot into TWRP again using any of Quick Reboot programs from the Store
    17. Install/flash Path for V12 Small EUI
    18. Reboot into system and start using the phone

    With this setup i don't have any problems - everything works - notifications, finger print,QC 3.0, xposed, supersu etc.. Battery is great but you must now that Small EUI is designed for max battery time so the performance is capped (about 110K in Antutu). I am not a gamer, so i don't need max performance, more important is stability and normal usage.

    Sorry for my english;)
    2
    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
    2
    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://xdaforums.com/le-max-2/how-to/root-le-max-2-changing-stock-recovery-t3512619

    i hope i could help!
    2
    thats a nice idea, but since my goal was to make a guide that covers almost everything if possible it got so detailed... so ill leave it up to you guys to make a short guide or maybe a video ;)