axon7tool: Flash and backup boot/recovery using EDL mode - ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve

Note: This is an inherently dangerous tool. I have made every effort to make it as safe as possible. But there is always a risk of bricking your device. You assume all responsibility for the consequences. Proceed with caution.
Warning: To avoid bricking your device, NEVER write both boot and recovery in one session. ALWAYS write one partition, test, then write the other. This is why the tool will only write one partition at a time.
Warning: There are versions of TWRP for the Axon 7 that are known to erase your IMEI when doing a restore. Do NOT do a TWRP restore unless your are SURE that you have a good version of TWRP!
This tool will allow you to:
Backup your boot and recovery partitions.
Flash a boot or recovery image (including the signed TWRP image).
See following posts for operating system specific setup instructions.
Once your setup is complete, enter EDL mode:
1. Power off phone.
2. Hold both volume buttons.
3. Plug phone into computer.
4. For G models, you must "adb reboot edl" (see other threads).
Usage:
axon7tool <mode> <partition(s)>
Note: The tool name will vary depending on your operating system.
<mode> is -r for read, -w for write.
For read mode, <partition> is one or more of gpt, boot, recovery. Files will be created as <partition>-backup.bin
For write mode, <partition> is boot or recovery. File will be read from <partition>.bin
Examples:
To backup everything on Linux:
./axon7tool-1.5-linux -r gpt boot recovery
To write recovery on Win64:
Place file as recovery.bin
axon7tool-1.5-win64 -w recovery
Links to axon7tool:
axon7tool-1.5-linux (main)
axon7tool-1.5-linux (alternate)
axon7tool-1.5-win64.exe (main)
axon7tool-1.5-win64.exe (alternate)
Link to signed TWRP removed.
FAQ:
Q: Can you provide a signed boot image with root?
A: No. I do not have the ZTE signing key, and tenfar's images are not current.
Q: Can I have the source code for the tool?
A: No.
Q: Can you provide the programmer?
A: No.
Q: Do you accept donations?
A: No, all work is provided freely for community use.

Setup instructions for Linux:
1. Ensure your login user is in the "plugdev" group.
$ id
You should see plugdev in the list. If not, add yourself to the group and logout/login to take effect.
2. Ensure your udev rules are setup.
Create a file eg. /etc/udev/rules.d/qcom.rules that contains:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", GROUP="plugdev"
3. All done!

Setup instructions for Win64:
1. Download zadig from http://zadig.akeo.ie/
2. Put device in EDL mode.
3. Run zadig. Select the WinUSB driver. If you have installed the Qualcomm EDL driver, you may need to tick "Edit" and find the device in the list.
4. All done!

Reserved for Mac instructions.

Questions:
1) Does the backup of boot and recovery partitions work like backing up through TWRP (if the recovery is already flashed to TWRP)
2) The signed TWRP image is by... ZTE?

kgptzac said:
Questions:
1) Does the backup of boot and recovery partitions work like backing up through TWRP (if the recovery is already flashed to TWRP)
2) The signed TWRP image is by... ZTE?
Click to expand...
Click to collapse
1- No this doesn't work like backing up with TWRP, This tool is more powerful than Custom Recovery (TWRP), and you should be very careful on how to use it.
Like @tennear mention about try first by using -r (read) then just flash the sign TWRP.
I personally recommend just flash TWRP and DON'T mess with Boot image.
2- the Sign TWRP is not provided by ZTE, ZTE will NEVER release a Custom Recovery for us users.

kgptzac said:
Questions:
1) Does the backup of boot and recovery partitions work like backing up through TWRP (if the recovery is already flashed to TWRP)
2) The signed TWRP image is by... ZTE?
Click to expand...
Click to collapse
1. The tool writes the raw partitions to your PC. Whatever you have in the partition is written out, whether it is stock recovery or TWRP or whatever.
2. The signed TWRP image is copied from the zip that tenfar provided in his post. I did not create it, and I cannot create signed images.

Forgive me my noobiness, but here’s a step-by-step-instruction list. Am I thinking right? I want to minimise the risk when I try your tool tomorrow.
Step 1: Enable Developer options in phone by tapping the build number
Step 2: Enable OEM Unlock in phone (is this needed?)
Step 3: Enable debugging (for adb)
Step 4: Connect phone to PC
Step 5: Download Zadig
Step 6: Install Zadig
Step 7: Open command in the folder in which you downloaded adb.exe (and the rest of the files that come with it) (Richt click while holding shift to get the option to open CMD in a folder)
Step 8: Enter the command “Adb Devices” to reassure your device is detected
Step 9: Enter the command “Adb reboot edl” to reboot the phone to EDL mode
Step 10: After phone has rebooted to EDL mode, run Zadig, select WInUSB driver and install it for your device
Step 11: Rename “axon7tool-1.5-win64.exe” to “axon7tool.exe”
Step 12: Download “axon7-2017u-twrp-signed.img” to the folder where axon7tool.exe is located
Step 13: Open command in the folder in which you have downloaded axon7tool-1.5-win64.exe (renamed to axon7tool.exe)
Step 14: Enter command “axon7tool -r gpt”.
Step 15: Enter command “axon7tool -r boot”
Step 16: Enter command “axon7tool -r recovery”
Step 17: Verify if the tool has created “gpt-backup.bin”, “boot-backup.bin”, “recovery-backup.bin”.
Step 18 (unsure): rename “axon7-2017u-twrp-signed.img” to “recovery.bin” ?
Step 19: enter “axon7tool -w recovery recovery.bin
Step 20: Wait for the command to finish
Step 21: Place the .zip file for Z.A.D. Mix7 or CM13 on your SD card via your PC or Axon 7. Also download Gapps.zip of your choice and place on SD card.
Step 22: Boot your Axon 7 to TWRP Recovery by holding the power button simultaneously with volume down (or is it volume up?)
Step 23: Perform a full wipe of Dalvik, Cache and Data in TWRP
Step 24: Flash the .zip of your custom ROM of choice in TWRP
Step 25: Flash the .zip of your Google Apps of choice in TWRP
Step 26: Perform a full wipe of Dalvik, Cache and Data in TWRP
Step 27: Reboot your phone, enjoy the custom ROM of your choice.
Is this the correct procedure?
I’m a bit unsure of step 18. Am I doing it right? Or do you need to unzip that .img somehow to find a recovery.bin file? Or do you need to get that file from somewhere else? Or do you need to rename “axon7-2017u-twrp-signed.zip” to “recovery.img”?
For Z.A.D. MIX7, I suppose you still need to flash a SuperSU version seperately? I heard in CM it's baked-in.
Thanks for the help.
Jan

@Controllerboy close, but not quite. I'll attempt to provide detailed feedback on your step by step list tomorrow. Time for sleep now.

Controllerboy said:
Step 1: Enable Developer options in phone by tapping the build number
Step 2: Enable OEM Unlock in phone (is this needed?)
Step 3: Enable debugging (for adb)
Click to expand...
Click to collapse
None of these steps should be necessary.
Controllerboy said:
Step 4: Connect phone to PC
Step 5: Download Zadig
Step 6: Install Zadig
Click to expand...
Click to collapse
I believe you just run zadig, I don't remember an installer.
Controllerboy said:
Step 7: Open command in the folder in which you downloaded adb.exe (and the rest of the files that come with it) (Richt click while holding shift to get the option to open CMD in a folder)
Step 8: Enter the command “Adb Devices” to reassure your device is detected
Step 9: Enter the command “Adb reboot edl” to reboot the phone to EDL mode
Step 10: After phone has rebooted to EDL mode, run Zadig, select WInUSB driver and install it for your device
Step 11: Rename “axon7tool-1.5-win64.exe” to “axon7tool.exe”
Click to expand...
Click to collapse
Renaming the tool is optional.
Controllerboy said:
Step 12: Download “axon7-2017u-twrp-signed.img” to the folder where axon7tool.exe is located
Step 13: Open command in the folder in which you have downloaded axon7tool-1.5-win64.exe (renamed to axon7tool.exe)
Step 14: Enter command “axon7tool -r gpt”.
Step 15: Enter command “axon7tool -r boot”
Step 16: Enter command “axon7tool -r recovery”
Click to expand...
Click to collapse
The tool is "one shot". You can read any combination of gpt, boot, and recovery in one session, then the tool will restart the phone.
Controllerboy said:
Step 17: Verify if the tool has created “gpt-backup.bin”, “boot-backup.bin”, “recovery-backup.bin”.
Step 18 (unsure): rename “axon7-2017u-twrp-signed.img” to “recovery.bin” ?
Click to expand...
Click to collapse
Yes, this is correct.
Controllerboy said:
Step 19: enter “axon7tool -w recovery recovery.bin
Step 20: Wait for the command to finish
Click to expand...
Click to collapse
Yes, this is correct. Writing boot or recovery takes about 30 seconds. Then the tool will reboot your phone. Be sure to hold the Vol+Up button to reboot into recovery.
Controllerboy said:
Step 21: Place the .zip file for Z.A.D. Mix7 or CM13 on your SD card via your PC or Axon 7. Also download Gapps.zip of your choice and place on SD card.
Step 22: Boot your Axon 7 to TWRP Recovery by holding the power button simultaneously with volume down (or is it volume up?)
Step 23: Perform a full wipe of Dalvik, Cache and Data in TWRP
Step 24: Flash the .zip of your custom ROM of choice in TWRP
Step 25: Flash the .zip of your Google Apps of choice in TWRP
Step 26: Perform a full wipe of Dalvik, Cache and Data in TWRP
Step 27: Reboot your phone, enjoy the custom ROM of your choice.
Click to expand...
Click to collapse
Everything past step 20 is up to you.
Controllerboy said:
Is this the correct procedure?
I’m a bit unsure of step 18. Am I doing it right? Or do you need to unzip that .img somehow to find a recovery.bin file? Or do you need to get that file from somewhere else? Or do you need to rename “axon7-2017u-twrp-signed.zip” to “recovery.img”?
For Z.A.D. MIX7, I suppose you still need to flash a SuperSU version seperately? I heard in CM it's baked-in.
Thanks for the help.
Jan
Click to expand...
Click to collapse
You cannot unzip an img file.
The TWRP image provided is just as tenfar provided for 2017u users. You only need to rename it to recovery.img for using the tool.
If someone has the 2017g TWRP file, I can upload and link it. The links in the tenfar post have been removed.

Folks who are able to use this new tool/method successfully, please report back with your variant. I can't test this myself, so I'm relying on some verification before I update the newbie guide to point here instead of tenfar's thread (which is outdated and no longer updated as tenfar is now inactive).

tennear said:
<-- SNIP -->
If someone has the 2017g TWRP file, I can upload and link it. The links in the tenfar post have been removed.
Click to expand...
Click to collapse
I found this on the 65th page of Tenfar's thread (http://forum.xda-developers.com/showpost.php?p=69215285&postcount=642)
khaino said:
Step 1: Download the zip file and extract to your local disk. a2017 for Chinese model,and a2017u for US model,a2017g for HK & EU model
a2017u :B20_blunlockedhttp://d-h.st/KaaQ
a2017u B20 http://d-h.st/LqR5 (modified from @rczrider�s backup real stock b20 boot.img)
a2017u B27 http://d-h.st/kRgq
a2017 B06:http://d-h.st/ztXw
a2017 B07:http://d-h.st/VVlf
a2017 B08: http://d-h.st/bT6r
a2017 B09:http://d-h.st/sBjo
a2017 B10:http://d-h.st/cBOE(wifi not working) http://d-h.st/aceq (from official update.zip)
a2017g B02 :http://d-h.st/aPiC
a2017g B03:http://d-h.st/r3Z4
TWRP recovery 3.0.2-2 : http://d-h.st/dgWW
latest tools:http://d-h.st/Ienb with dump function
Click to expand...
Click to collapse
So I just use the file from http://d-h.st/r3Z4 (axon7root-a2017g-b03.zip), unzip and rename the .img file to recovery.img?
The issue here is that the hosting used is so crappy I can't even download the file...

Controllerboy said:
So I just use the file from http://d-h.st/r3Z4 (axon7root-a2017g-b03.zip), unzip and rename the .img file to recovery.img?
The issue here is that the hosting used is so crappy I can't even download the file...
Click to expand...
Click to collapse
That is correct.
d-h.st seems to be down for the past few days. I guess it will come back at some point, and you can download the zip file to extract the recovery image. Or maybe someone else has a copy of it...

@tennear
As far as u know TWRP is the same for every A7, sign or not.

DrakenFX said:
@tennear
As far as u know TWRP is the same for every A7, sign or not.
Click to expand...
Click to collapse
Unpacking the TWRP image for A2017U, it says:
ro.product.model=A2017U
So this recovery seems to be specific to A2017U.
But unpacking the TWRP image for A2017 (China), it says:
ro.product.model=ZTE A2017U
Hmm, different but still A2017U.
I don't have the TWRP image for A2017G (yet), so I can't tell what it says. But given the above, and that the G and U models are almost identical, I am thinking the A2017U image will run on all devices.

tennear said:
Reserved for Mac instructions.
Click to expand...
Click to collapse
So can the Linux tool be used on Mac?

nuserame said:
So can the Linux tool be used on Mac?
Click to expand...
Click to collapse
No. I have not built the tool on Mac yet. I will try to do that soon.

I wouldnt say I was a newbie but how do you get the file to run. Even with Antivrus off, the computer just wont run it.
Thank you for the time and support.

The .exe file isn't meant to be ran on it's own. Double-clicking it won't do a thing. You need to use cmd (command) to execute commands to the file. If you look at my post on the first page of this thread, you'll get an idea of how the process works. But please don't follow my post as of now, since it's not detailed nor 100% correct yet.
It's my intention to try my luck tomorrow and I'll post a detailed and 100% correct step-by-step-process.

Excuse me for my ignorance, but how does this tool differ from tenfars tool? Beside not being able to write two partitions at the same time that is.
TIA,
Cheerz,
/Cacti

Related

Use fastboot to flash 4.4.3 without waiting for OTA

This is the well-established way to flash factory images without waiting for the OTA, using a Windows computer.
You can have a custom recovery, but you must otherwise be stock.
Your bootloader must be unlocked.
You should not lose apps (except for non-stock system apps) or data, but don't hold me responsible if you do.
You will have to reload non-stock system apps like Xposed framework (in fact, I uninstalled the Xposed framework using the Xposed framework installer before starting this process).
This is a modification of the process explained here, which I have mostly cut-and-pasted:
http://forum.xda-developers.com/nexus-4/general/flash-android-4-3-build-clean-flash-t2376681
(Credit to mc704.)
1. You must have ADB, fastboot, and USB drivers for the N4 on your PC. Not hard to find; the thread referenced above tells you one way to get them. Put adb.exe, fastboot.exe, AdbWinApi.dll, and AdbWinUsbApi.dll in a folder on your PC - let's call it C:\N4Update
2. Enable USB Debugging via Developer settings on your phone.
3. The Nexus 4 (mako) 4.4.3 image can be obtained from Google
Image Link: https://developers.google.com/android/nexus/images#occamktu84l
Step 1: Use 7zip or an equivalent compression program to extract the stock 4.4.3 image file that has extension .TGZ
Step 2: You should see a stock image file that has extension .TAR...extract this once again with 7zip (or equivalent) into C:\N4Update
Step 3: Plug your device into the PC (USB debugging should be enabled)
Step 4: Launch command prompt from C:\N4Update, or alternatively start a command prompt (start --> run --> "cmd") and cd to it (cd C:\N4Update)
Step 5: Verify that the PC is detecting your device by typing in command prompt "adb devices" (you should see a code representing your device, and then "device" following it); if not, recheck usb debugging, and unplug and replug the phone back into your PC
Step 6: Turn your N4 off and go into fastboot (bootloader) mode (hold power button + Volume Up & Down all together)
Step 7: Type in the command prompt each step one at a time and wait for it to complete (obviously, don't enter the quotation marks):
"fastboot flash bootloader bootloader-mako-makoz30d.img"
"fastboot reboot-bootloader"
"fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.02.img"
"fastboot reboot-bootloader"
"fastboot update image-occam-ktu84l.zip"
Step 8: At this point, your N4 will reboot. This will take some time as your apps are re-initialized, but it should be clear what's going on.
Step 9: You will now have 4.4.3. You will be unrooted and have stock recovery. If you want, you can stop here.
If you want to install the TWRP custom recovery and regain root:
Step 10: Download the new version of SuperSU onto the N4 from here: http://download.chainfire.eu/446/SuperSU/UPDATE-SuperSU-v1.99r3.zip
Step 11: Download TWRP onto your PC in C:\N4Update from here: http://techerrata.com/file/twrp2/mako/openrecovery-twrp-2.7.0.0-mako.img
Step 12: Boot N4 back into fastboot (bootloader) mode while connected to the PC.
Step 13: With the command prompt from Step 4 above, type "fastboot flash recovery openrecovery-twrp-2.7.0.0-mako.img"
Step 14: Boot from the bootloader into Recovery by pressing volume up to display "Recovery" and then the power button to select.
Step 15: Use TWRP to install the zip (SuperSU) file from Step 10 to regain root.
Step 16: Reboot system.
You should now have a rooted system, with all of your old apps and data (except for system apps, which need to be reinstalled), and the latest TWRP custom recovery.
Don't wanna sound rude, but is there point in creating another how-to thread, along the other threads which some(link) are even mentioned in sticky roll-up threads? Plus it's 99% copy/paste, which you even mention so that's nice from you.
It's nice that someone have will to write(or even copy/paste/edit) tutorials, but by having more threads help is harder to find(search).
Just my humble opinion and experience
Also you can jsut remove the recovery img from the update package to keep your custom recovery
well I for one appreciate you posting this as now I don't have to search all over gods creation to find the old thread
Nevermind
i did all steps... but im spammed google now launcher has stopped
will factory reset help?
Night5talker said:
i did all steps... but im spammed google now launcher has stopped
will factory reset help?
Click to expand...
Click to collapse
Factory reset seems extreme. How about just uninstalling and reinstalling the launcher? (I assume the stock launcher still works.)
NYZack said:
Factory reset seems extreme. How about just uninstalling and reinstalling the launcher? (I assume the stock launcher still works.)
Click to expand...
Click to collapse
i did factory reset but apps did left on my phone storage and when i turned it on google play started to download it everything again
ps couldnt do anything it was poping right back up wheni press ok even if i go to another launcher
Night5talker said:
i did factory reset but apps did left on my phone storage and when i turned it on google play started to download it everything again
ps couldnt do anything it was poping right back up wheni press ok even if i go to another launcher
Click to expand...
Click to collapse
Well, sorry, don't quite understand: you could always just uninstall the Google Now launcher, make sure everything else is working, and then reinstall it once you confirm there's no other problem.
Anyone could just mention the procedure for doing same thing but through Wug toolkit.
In general I prefer to avoid fastboot commands and flash everything though pc.
Unleashed by my Nexus 4
No need to do all these steps (flashboot). They included scripts that will run all things
On Windows you can just run "flash-all.bat" or on Unix "flash-all.sh".
DarsVaeda said:
No need to do all these steps (flashboot). They included scripts that will run all things
On Windows you can just run "flash-all.bat" or on Unix "flash-all.sh".
Click to expand...
Click to collapse
Yeah but edit it with notepad and remove the -w flag to disable the wipe also remove the recovery.img from the zip to keep the custom recovery !
mashedbymachines said:
Yeah but edit it with notepad and remove the -w flag to disable the wipe also remove the recovery.img from the zip to keep the custom recovery !
Click to expand...
Click to collapse
Yeah, this is the key point - if that -w flag is not removed, you will lose all apps/data. One of the reasons I put this up is that I think the step-by-step method is interesting, instructive (you can see what's actually happening), not much more time-consuming than running the automated script, and lets you have more granular control.
(And I apologize if it's littering the forum and semi-plagiarism, but I thought a very detailed, confirmed step-by-step guide with up-to-date precise download links might be useful to people who haven't gone through the process before.)
What the ....
So I edited my flash-all.bat and removed the -w
It looks like this:
@ECHO OFF
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-mako-makoz30d.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.02.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot update image-occam-ktu84l.zip
echo Press any key to exit...
pause >nul
Click to expand...
Click to collapse
And yet my phone was wiped.... sigh
** Update **
Nevermind, it was Notepad++ that screwed me over. The changes to the bat file was not written to the file, only kept in Notepad++'s temporary memory. ****ing bull**** feature.
Erroneus said:
What the ....
So I edited my flash-all.bat and removed the -w
It looks like this:
And yet my phone was wiped.... sigh
** Update **
Nevermind, it was Notepad++ that screwed me over. The changes to the bat file was not written to the file, only kept in Notepad++'s temporary memory. ****ing bull**** feature.
Click to expand...
Click to collapse
so in order to run this comand you only need to unzip the tar(?) file downloaded and then you are done, you don't have to unzip the actual factory image, correct?
fdg59 said:
so in order to run this comand you only need to unzip the tar(?) file downloaded and then you are done, you don't have to unzip the actual factory image, correct?
Click to expand...
Click to collapse
Actually, you have to run the unzip program twice:
For example, when updating to Android version 4.4.4 (Yes, a new version has already been released since this post):
Here is the downloaded file
occam-ktu84p-factory-b6ac3ad6.tar
Unzipping it will give you this:
occam-ktu84p-factory-b6ac3ad6
And unzipping that one more time will give you the directory "occam-ktu84p" containing the following files:
bootloader-mako-makoz30d.img
flash-all.bat
flash-all.sh
flash-base.sh
image-occam-ktu84p.zip
radio-mako-m9615a-cefwmazm-2.0.1701.03.img
WARNING: As was mentioned many times, remove the -w from the following line in the flash-all.bat file unless you intend to wipe your phone clean. I don't understand the issue with Notepad++ noted in a previous post, as you have to hit "save" like any other program (It is the program that I use as well).
fastboot -w update image-occam-ktu84p.zip
If what you were really asking is whether you need to unzip the file image-occam-ktu84p.zip.......The answer is no.
ah ah yes 4.4.4, that's why i am asking, because i always used to unzip everything and the flash items individually using fastboot which i always liked. The problem however was that my nexus 4 has 16gb and after flashing and wiping everything clean the memory showed up at 8gb so i had to factory reset through stock recovery which i didn't enjoy as much. thanks for all the help!

[Tutorial] How to install Android Loliipop+Root

Note:​I'm going to assume you have the Fastboot and ADB Drivers installed and the boot loader is unlocked! ​
Why is this here?
This thread is made to help new users install the developers preview through what I think is the fastest way and safest way too through the command prompt on Windows.
Responsibility!
If your device becomes bricked, makes toast for you, and anything else I did not mention its simply not my fault since you took it upon your self to do this method.​
Credits!​​Thanks Google for this lovely Operating System. Thank you Chain Fire for providing this method to root Android Lollipop and for your app and boot.img too! Thanks to LG for manufacturing this great device to use and enjoy stock Android. Finally, big thanks to TWRP for providing us with this recovery!​​​​​
The Steps!​​​​​Step 1: Download the Lollipop preview HERE, extract it and open the folder with all the image files along with the radio and bootloader image too.
Step 2: Drop all the images to your folder that contains the ADB and Fastboot files
Step 3: Open the folder that contains the ADB and Fastboot files
Step 4: Hold the shift key and right click and click "Open command window here"
Caution! Make sure you back up everything before you begin the process if not its not my fault you forgot to back up.
Step 5: Make sure your device is in fastboot and connected. We are going to replace the boot loader for a newer one. Please make sure the boot loader image name first before we began because i'm just going to use boot loader as a example the real file name will be different. Type the command shown below.
Code:
fastboot flash bootloader bootloader.img
Step 6: Now we are going to flash the Radio as also stated above be sure to check the image name before we flash.
Code:
fastboot flash radio radio.img
Step 7: Now we are going to flash userdata. This part you don't have to worry about the file name you can just copy and paste the command but, I would double check.
Code:
fastboot flash userdata userdata.img
Step 8: Now going to flash boot or the kernel just as step 8 and here from out I will let you know when you have to worry about the file name again.
Code:
fastboot flash boot boot.img
Step 9: Now were flashing the system files.
Code:
fastboot flash system system.img
Step 10: Now were flashing the a custom recovery (twrp for this example) so we can install the SuperSU files later. You can get the recovery image HERE and rename it "Trecovery" and place it to the same folder. After flashing it go to the recovery and from there reboot it.
Code:
fastboot flash recovery Trecovey.img
Yay! We got Android Lollipop now we have to root it.​​​​​Step 1: Let Andriod Lollipop boot up and go download SuperSu on your device by going to Chainfire SuperSU thread and click on his installable zip link and download SuperSU 2.14 or above. On your computer download his modified boot image HERE and rename it Rboot.img and move it your folder where the ADB and Fastboot files are.
Step 2: On your computer go to fastboot again on your phone and type the code in below.
Code:
fastboot flash boot Rboot.img
Step 3: Go to recovery and install the SuperSU zip as usual, reboot, and that's it. Enjoy!
reserved
Trecovery.img
Thanks for your work. Unfortunately, we already have a sticky thread on flashing images and rooting: http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
The method to flash and root lollipop is no different than any other version.
Because we don't want multiple threads with the some information I will close this thread
Thanks.

[Easiest Method] Tutorial to Unlock Bootloader | Install Twrp | Root | Decrypt Data

Hi All ,
Steps To Unlock Bootloader
1. At First, open About phone on setting menu , then tap 4 times on Build Number. Now Developer Mode is enabled.
2. Open developer Mode menu and set oem unlock and usb debugging to ON. [Important Step]
3. Download and Extract the zip file which you have downloaded from the link given below.
4. Now enter into fastboot mode :
Press volume + power button and then phone will boot into fastboot interface.
5. Now connect the phone to computer and then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
Code:
fastboot devices
The list of devices connected will be displayed.
Then enter the command :
Code:
fastboot oem unlock
6. Now you will see a Unlock Bootloader Warning page. Hit the Vol button to select Yes and turn it Blue and Hit Power Button to confirm the selection.
7. Thats it . Now your Bootloader is unlocked.
Steps To Install TWRP Recovery
1. After you have successfully unlocked the bootloader, now enter into the fastboot mode and connect the phone to pc.
2. Now navigate to the folder where you have extracted the downloaded zip file and open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
Code:
fastboot devices
3. The list of devices connected will be displayed.
4. Then enter the command :
Code:
fastboot flash recovery twrp-3.1.1-0-oneplus5.img
or
Code:
fastboot flash recovery (name of the twrp file).img
5. When the file is flashed successfully , unplug your phone from pc and manually boot the phone into recovery by pressing Power + Volume Down button.
6. Now the TWRP Recovery will be opened .
For the Users who face Max download error while flashing Twrp, Kindly check the post here
Steps To Disable Forced Encryption i.e, Decrypt Data
1. At first time when you open twrp, it will ask you to allow system modification.
2. Allow it and then flash the no-verity-opt-encrypt.zip file .
3. Then Go to Wipe-->Format Data.
4. Type Yes to confirm wiping of Internal Storage.
5. Now you have decrypted the data sucessfully.
Note: Dont try to restore the nanodroid backup which you have taken before. It may end in bootloop.
Steps To Root Your Phone
1. Download the SuperSu SR1 flashable zip from here and copy that zip file into internal storage.
2. Now Enter into the TWRP Recovery.
3. Now navigate to the downloaded SuperSu Zip file and Swipe to install SuperSu.
4. Reboot your device.
5. Now your device is rooted successfully. :fingers-crossed:
Steps To Backup IMEI [Important]:
For some cases you may lead to lose your device's Imei. It will lead to loose of network signals etc.
So we have to take backup of Imei and we can restore it on any such case.
There are two method to backup imei.
Method 1 :
Boot the phone to Twrp , take Backup of EFS partition to internal storage and copy the backup files to PC . In case , if you have lost your IMEI, this backup will help you to restore imei back.
Method 2 :
1. This method works on the Terminal window. So download any Terminal App .
2. Open the app and type su , then grant SuperUser permission when you are prompted to do so.
When you see the Terminal Emulator box, type the following command:
Code:
dd if=/dev/block/sdf1 of=/sdcard/modemst1.bin bs=512
Code:
dd if=/dev/block/sdf1 of=/sdcard/modemst2.bin bs=512
Please note that all commands are case sensitive and even a minor mistake will hider the successful backup. Type the command line carefully.
Now you have successfully took backup of imei to you internal storage . Copy that to your pc .
To Restore
Enter the following commands in Terminal Emulator Box:
Code:
dd if=/sdcard/modemst1.bin of=/dev/block/sdf1 bs=512
Code:
dd if=/sdcard/modemst2.bin of=/dev/block/sdf1 bs=512
Thats it your imei is restored :fingers-crossed:
Download Section
For TWRP recovery and other files Download Here
If u need Only twrp, Den click here
1. twrp-3.1.1-1-cheeseburger.img[official]
2. twrp-3.1.1-0-oneplus5.img [chinese]
3. Twrp latest by xdvs23
Thank you very much! Good to see TWRP here
HatRiGt said:
Hi All,
Steps To Unlock Bootloader
1. At First, open About phone on setting menu , then tap 4 times on Build Number. Now Developer Mode is enabled.
2. Open developer Mode menu and set oem unlock and usb debugging to ON. [Important Step]
3. Download and Extract the zip file which you have downloaded from the link given below.
4. Now enter into fastboot mode :
Press volume + power button and then phone will boot into fastboot interface.
5. Now connect the phone to computer and then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
The list of devices connected will be displayed.
Then enter the command :
6. Now you will see a Unlock Bootloader Warning page. Hit the Vol button to select Yes and turn it Blue and Hit Power Button to confirm the selection.
7. Thats it . Now your Bootloader is unlocked.
Steps To Install TWRP Recovery
1. After you have successfully unlocked the bootloader, now enter into the fastboot mode and connect the phone to pc.
2. Now navigate to the folder where you have extracted the downloaded zip file and open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
3. The list of devices connected will be displayed.
4. Then enter the command :
5. When the file is flashed successfully , unplug your phone from pc and manually boot the phone into recovery by pressing Power + Volume Down button.
6. Now the TWRP Recovery will be opened .
Steps To Root Your Phone
1. Download the SuperSu flashable zip from here and copy that zip file into internal storage.
2. Now Enter into the TWRP Recovery.
3. Now navigate to the downloaded SuperSu Zip file and Swipe to install SuperSu.
4. Reboot your device.
5. Now your device is rooted successfully.
Download Section
Download the required zip file from Here
Credits : Thanks to chinese Dev for Twrp
Click to expand...
Click to collapse
Hey,
Thanks for the guide. However, where does the TWRP comme from? I'm a bit afraid of this, truth to be told ^^'
matssa said:
Hey,
Thanks for the guide. However, where does the TWRP comme from? I'm a bit afraid of this, truth to be told ^^'
Click to expand...
Click to collapse
source link added . check bro.
HatRiGt said:
source link added . check bro.
Click to expand...
Click to collapse
Erm, "Chinese dev" doesn't mean anything really. Don't you have a thread link, a github link, or anything in particular? It's almost like saying "Here an app", without really saying where it comes from. Kinda risky... Especially if it isn't the "Chinese dev" that shares it.
EDIT/// NVM, just was the source link... Sorry for that, was refreshing the wrong one...
matssa said:
Erm, "Chinese dev" doesn't mean anything really. Don't you have a thread link, a github link, or anything in particular? It's almost like saying "Here an app", without really saying where it comes from. Kinda risky... Especially if it isn't the "Chinese dev" that shares it.
Click to expand...
Click to collapse
kindly check the source link i.e, thread link
-----
Tested by me. Works fine.
HatRiGt said:
kindly check the source link i.e, thread link
Click to expand...
Click to collapse
Yeah just edited my comment, wasn't looking at the correct page... Gonna take a look, might wait a bit before testing.
I went to the source OP provided. It's 30 pages of people saying thanks...so I bit the bullet (after unlocking bootloader).
It works. Just flashed Magisk 13 beta using TWRP provided by OP.
SafetyNet passes with Magisk Hide. Cheers!
it work for me, thanks
HatRiGt said:
kindly check the source link i.e, thread link
Click to expand...
Click to collapse
When checking your link, I can't really see if everyone managed to test it correctly, Google translation shows some icky stuff in terms of device bricking.
matssa said:
Yeah just edited my comment, wasn't looking at the correct page... Gonna take a look, might wait a bit before testing.
Click to expand...
Click to collapse
I'm in the same boat, I like that it's done but the fact it isn't open-sourced and is provided by a sketchy Chinese version of a fake Oneplus site (take a look at the lack of SSL for example), I think I may hold off..
Thanks for sharing though OP, hope this might spark what we need to get the official version!
SonicSamZ said:
I went to the source OP provided. It's 30 pages of people saying thanks...so I bit the bullet (after unlocking bootloader).
It works. Just flashed Magisk 13 beta using TWRP provided by OP.
SafetyNet passes with Magisk Hide. Cheers!
Click to expand...
Click to collapse
bretzelpopo said:
it work for me, thanks
Click to expand...
Click to collapse
How did you make this work? Tried flashing in fastboot using
fastboot flash recovery twrp.....
However, doesn't work, still on OP recovery
EDIT/// Apparently worked Can't wait for a more open and official one
Have make a backup and this working. Only light dimming not work for now.
SonicSamZ said:
I went to the source OP provided. It's 30 pages of people saying thanks...so I bit the bullet (after unlocking bootloader).
It works. Just flashed Magisk 13 beta using TWRP provided by OP.
SafetyNet passes with Magisk Hide. Cheers!
Click to expand...
Click to collapse
Flashed it too after reading your post. Working flawless.
The China TWRP only work first time. After reboot again i see the stock recovery.
Schrotty35 said:
The China TWRP only work first time. After reboot again i see the stock recovery.
Click to expand...
Click to collapse
Maybe you need to delete recovery-from-boot.p from your system folder, and the twrp will be permanently
mauronofrio said:
Maybe you need to delete recovery-from-boot.p from your system folder, and the twrp will be permanently
Click to expand...
Click to collapse
Have you test this?
Schrotty35 said:
Have you test this?
Click to expand...
Click to collapse
If I had OnePlus 5 I would have resolved the problem inside the twrp, but no device is impossible for me. A complete recovery will soon be released.
The recovery-from-boot.p is the file that restore stock recovery when you reboot your phone (It is in all android firmware)
Schrotty35 said:
Have you test this?
Click to expand...
Click to collapse
did you restore your backup, after reboot . If yes, just uncheck boot when you restore and you dont need to format anything when flash recovery or kernel because these thing boot before system . For me twrp work good for me, the only thing is that i have flash supersu and when i want to switch to magisk, i delete all root on supersu app, and then impossible to boot on twrp, even after flash it with bootloader . The trick is to flash stock recovery from folder and then flash twrp .
Thanks

Help with Magisk root without TWRP

So i'm very very new to rooting, soon i'll got my hand on a mi 9t pro and i want to try root it.
I got some gist from reading the guide here and since i want to have OTA updates without the need to flash custom, i thought that rooting with Magisk without TWRP is a good option.
I do have some confusions regarding the method. So unlocking is obviously the first step, which i think is pretty straightforward. Then i need to root Magisk by patching a stock boot image, i assume this is the fastboot stock firmware of my current phone, correct me if i'm wrong.
Does doing it this way risk bricking my device? Usually people suggest to backup the current ROM with TWRP first before doing anything, or can i backup my ROM with other method?
What kind of precaution do i need to pay attention to? And is it actually recommended to do it this way?
yeah, no this has a high hard-brick risk i think. its safer to just flash TWRP and install it trough that, then you can always go back to stock recovery if you wanted to.
dev-DaT said:
yeah, no this has a high hard-brick risk i think. its safer to just flash TWRP and install it trough that, then you can always go back to stock recovery if you wanted to.
Click to expand...
Click to collapse
Could you help point me to any guide thread for flashing MIUI stock recovery back while keeping the root?
thanks for replying
arcwindz said:
So i'm very very new to rooting, soon i'll got my hand on a mi 9t pro and i want to try root it.
I got some gist from reading the guide here and since i want to have OTA updates without the need to flash custom, i thought that rooting with Magisk without TWRP is a good option.
I do have some confusions regarding the method. So unlocking is obviously the first step, which i think is pretty straightforward. Then i need to root Magisk by patching a stock boot image, i assume this is the fastboot stock firmware of my current phone, correct me if i'm wrong.
Does doing it this way risk bricking my device? Usually people suggest to backup the current ROM with TWRP first before doing anything, or can i backup my ROM with other method?
What kind of precaution do i need to pay attention to? And is it actually recommended to do it this way?
Click to expand...
Click to collapse
1. Download the fastboot ROM you currently have installed on your device.
2. Extract the boot image from downloaded zip
3. Keep 1 copy of boot image in your PC (For Backup, in case anything goes wrong)
4. Now copy the boot image in your phone's internal storage.
5. Install Magisk Manager App
6. Open and Tap Install
7. Select "Patch Boot Image"
8. Select the boot image you copied in your phone and follow the on screen instructions.
9. Now there should be a new .img file created in the download folder of your phone. ( I guess named something like magisk_patch.img, not sure of name but you do understand right?)
10. Copy that .img file in your PC.
11. Now connect your phone to your PC in Fastboot mode.
12. Open the folder where you copied it in your PC.
13. Now press and hold shift on you keyboard and right click on empty space in folder and select "Open Command Window Here".
14. Now type the command "fastboot flash boot filename.img",
let the process complete.
15. Reboot.
16. Profit.
This method should work fine without any issues but if anything goes wrong:
1.Connect your device to your PC in fastboot mode.
2. Open the folder where you kept the boot image (in step 3)
3. Now press and hold shift on you keyboard and right click on empty space in folder and select "Open Command Window Here".
4. Now type the command "fastboot flash boot boot.img" (without quotes),
5. let the process complete.
6. Reboot
P12AV33N said:
1. Download the fastboot ROM you currently have installed on your device.
2. Extract the boot image from downloaded zip
3. Keep 1 copy of boot image in your PC (For Backup, in case anything goes wrong)
4. Now copy the boot image in your phone's internal storage.
5. Install Magisk Manager App
6. Open and Tap Install
7. Select "Patch Boot Image"
8. Select the boot image you copied in your phone and follow the on screen instructions.
9. Now there should be a new .img file created in the download folder of your phone. ( I guess named something like magisk_patch.img, not sure of name but you do understand right?)
10. Copy that .img file in your PC.
11. Now connect your phone to your PC in Fastboot mode.
12. Open the folder where you copied it in your PC.
13. Now press and hold shift on you keyboard and right click on empty space in folder and select "Open Command Window Here".
14. Now type the command "fastboot flash boot filename.img",
let the process complete.
15. Reboot.
16. Profit.
This method should work fine without any issues but if anything goes wrong:
1. Connect your device to your PC in fastboot mode.
2. Open the folder where you kept the boot image (in step 3)
3. Now press and hold shift on you keyboard and right click on empty space in folder and select "Open Command Window Here".
4. Now type the command "fastboot flash boot boot.img" (without quotes),
5. let the process complete.
6. Reboot
Click to expand...
Click to collapse
wow this is worthy of its own thread imo. nice!
P12AV33N said:
1. Download the fastboot ROM you currently have installed on your device.
2. Extract the boot image from downloaded zip
3. Keep 1 copy of boot image in your PC (For Backup, in case anything goes wrong)
4. Now copy the boot image in your phone's internal storage.
5. Install Magisk Manager App
6. Open and Tap Install
7. Select "Patch Boot Image"
8. Select the boot image you copied in your phone and follow the on screen instructions.
9. Now there should be a new .img file created in the download folder of your phone. ( I guess named something like magisk_patch.img, not sure of name but you do understand right?)
10. Copy that .img file in your PC.
11. Now connect your phone to your PC in Fastboot mode.
12. Open the folder where you copied it in your PC.
13. Now press and hold shift on you keyboard and right click on empty space in folder and select "Open Command Window Here".
14. Now type the command "fastboot flash boot filename.img",
let the process complete.
15. Reboot.
16. Profit.
This method should work fine without any issues but if anything goes wrong:
1.Connect your device to your PC in fastboot mode.
2. Open the folder where you kept the boot image (in step 3)
3. Now press and hold shift on you keyboard and right click on empty space in folder and select "Open Command Window Here".
4. Now type the command "fastboot flash boot boot.img" (without quotes),
5. let the process complete.
6. Reboot[/QUOTE
target reported max download size of 805306368 bytes
sending 'boot' (40948 KB)...
OKAY [ 0.905s]
writing 'boot'...
FAILED (remote: Flashing is not allowed in Lock State)
finished. total time: 0.920s
Click to expand...
Click to collapse
Unlock the bootloader first
wall.e said:
P12AV33N said:
1. Download the fastboot ROM you currently have installed on your device.
2. Extract the boot image from downloaded zip
3. Keep 1 copy of boot image in your PC (For Backup, in case anything goes wrong)
4. Now copy the boot image in your phone's internal storage.
5. Install Magisk Manager App
6. Open and Tap Install
7. Select "Patch Boot Image"
8. Select the boot image you copied in your phone and follow the on screen instructions.
9. Now there should be a new .img file created in the download folder of your phone. ( I guess named something like magisk_patch.img, not sure of name but you do understand right?)
10. Copy that .img file in your PC.
11. Now connect your phone to your PC in Fastboot mode.
12. Open the folder where you copied it in your PC.
13. Now press and hold shift on you keyboard and right click on empty space in folder and select "Open Command Window Here".
14. Now type the command "fastboot flash boot filename.img",
let the process complete.
15. Reboot.
16. Profit.
This method should work fine without any issues but if anything goes wrong:
1.Connect your device to your PC in fastboot mode.
2. Open the folder where you kept the boot image (in step 3)
3. Now press and hold shift on you keyboard and right click on empty space in folder and select "Open Command Window Here".
4. Now type the command "fastboot flash boot boot.img" (without quotes),
5. let the process complete.
6. Reboot[/QUOTE
target reported max download size of 805306368 bytes
sending 'boot' (40948 KB)...
OKAY [ 0.905s]
writing 'boot'...
FAILED (remote: Flashing is not allowed in Lock State)
finished. total time: 0.920s
Click to expand...
Click to collapse
You must unlock bootloader first.
Click to expand...
Click to collapse
dev-DaT said:
wow this is worthy of its own thread imo. nice!
Click to expand...
Click to collapse
Does magisk ask for additional installation after u flash patch boot? And can u flash zip module via magick.
deleted
P12AV33N said:
1. Download the fastboot ROM you currently have installed on your device.
[...]
Click to expand...
Click to collapse
where can I download "my" fastboot ROM ?
I have: MIUI-V11.0.5.0.QFJMIXM
Xmaster111 said:
where can I download "my" fastboot ROM ?
I have: MIUI-V11.0.5.0.QFJMIXM
Click to expand...
Click to collapse
Wrong forum, you have a Mi 9T, this is the 9T Pro forum.
Anyway, look here.
https://c.mi.com/oc/miuidownload/detail?guide=2
If viewing on a phone you'll probably need to view the page in desktop mode, otherwise you'll see a blank page.
In step 2 of the guide look for the link
★ Xiaomi Mi 9T Latest Global Stable Version Fastboot File Download
It's not too far down the list.

[GUIDE] Unlocking Oppo A37f Bootloader

Hello,
I see some people are having trouble unlocking Oppo A37f bootloader, for example: Oppo Tools doesn't work.
I made this guide to help you unlock your phone bootloader.
DISCLAIMER:
I AM NOT RESPONSIBLE FOR ANY BRICKED DEVICE.
BY USING THIS GUIDE YOU UNDERSTAND THE RISK FOR BRICKING YOUR PHONE
REQUIREMENTS:
1) A working brain (must have)
2) A working PC (With Windows Installed)
3) Basic Windows command line knowledge
4) Basic ADB knowledge (Download here)
5) USB Cable (duh)
6) The bootloader unlocker (See attachments)
7) TWRP 3.1.1.0 recovery image made by KoSett (Download here) or
TWRP 3.2.3.0 recovery image made by Yashraj22 (Download here)
8) Zip for disabling dm-verity (Download here, Place it on your phone)
9) Firehose for unlocking (See attachments)
10) Hex editor (HxD Recommended, Download here)
11) Firmware With the version number of Oppo_A37F_EX_11_A.14_161014 otherwise, it will not work (Download the firmware to flash here)
12) Qualcomm USB Driver (Download here)
GUIDE TO UNLOCK YOUR PHONE BOOTLOADER:
Assuming you have extracted all file, Let's start unlocking your phone bootloader!
Step One: Enter download mode using this adb command: adb reboot edl
Step Two: Start "dump_devinfo.bat" and enter your phone COM number *SEE NOTE 1 TO SEE YOUR PHONE COM NUMBER*
Step Three: Enter the ABSOLUTE path to the firehose file
Step Four: After dumping your devinfo.img, open the image using Hex Editor
Step Five: Edit your devinfo.img EXACTLY TO THE IMAGE ATTACHED.
Step Six: Save the edited devinfo image and start "unlock.bat" and enter your phone COM number *SEE NOTE 1 TO SEE YOUR PHONE COM NUMBER*
Step Seven: Enter the ABSOLUTE path to the firehose file
Last Step: Long press the power button to start your phone again, And Voila! Your Phone bootloader has been unlocked!
GUIDE TO INSTALL TWRP AND DISABLE DM-VERITY:
Step One: Enter download mode using this adb command: adb reboot edl
Step Two: Open your command prompt on your working directory and type this command: "emmcdl.exe -p "YOURPORTNUMBER" -f "ABSOLUTEPATHTOFIREHOSE" -b recovery recovery.img" if you are confused see this example: "emmcdl.exe -p COM4 -f C:\WORKING\DIRECTORY\prog_emmc_firehose_8936.mbn -b recovery recovery.img"
Step Three: Long press the power button to start your phone again.
Step Four: Reboot your phone into recovery by using this command: adb reboot recovery
Step Five: Flash the zip you have placed in your phone
Last Step: Reboot to your system and WE'RE DONE!
NOTE:
Note 1: Press Win+R and enter devmgmt.msc and see your phone COM number
CREDITS:
Naveen3Singh at github for his awesome bootloader unlocker tool
KoSett for porting TWRP 3.1.1.0
Yashraj22 for porting TWRP 3.2.3.0
Me for writing this guide
Please hit thanks if this method worked and bye!
EDIT:
Edit 1: Added TWRP 3.2.3.0 by Yashraj22
You can try flashing this rom: here
But i still haven't tested the rom yet.
That worked even with the newer version of the stock ROM still installed (2017-something).
What I did is I dumped the devinfo partition with https://github.com/bkerler/edl, edited it in the hex editor, flashed it back and then TWRP installed, booted and works.
LineageOS 17.1 works as well (except some minor things, like the FM Radio)
Thank you very much.
God it works great. Only the twrp flash step is the most confusing. I don't quite get it yet, but there's a way around it anyway. Root with kingo root then use oppo tools to flash twrp
can anyone help me with step 2
how to enter com number with this cammand dump_devinfo.bat
jron999 said:
God it works great. Only the twrp flash step is the most confusing. I don't quite get it yet, but there's a way around it anyway. Root with kingo root then use oppo tools to flash twrp
Click to expand...
Click to collapse
Yeah, im planning to edit this guide to make it much easier

Categories

Resources