[Auto ToolKit][BL Unlock][Magisk&SuperSU][Xposed] Zenfone 2 ToolKit [Z00A/Z008/Z00X] - ZenFone 2 General

Last update: 14.10.2017
Fantastic news
No more waiting for manually signed magisk, supersu or twrp versions from now on. Just install any new version and use the image signature fix action in the troubleshoot menu of the toolkit. :good:
Next level reached
No more waiting for special zenfone 2 patched xposed for magisk. Got my own zip to do some hex patching. You can either use one of the (already patched) xposed versions from the toolkit or download xposed for magisk and use the xposed patcher in the troubleshoot menu.
z00x users please read this post https://forum.xda-developers.com/showpost.php?p=72298931&postcount=214
Introduction
This is a windows batch toolkit for automated actions like bl unlock, flash, root, xposed, sideload tasks, ... for your ze551ml/ze550ml/zx551ml.
I hope you find it useful. Check the tabs above for more screenshots, downloads, review ...
Note:
This tookit works well for a lot of situations, but I need feedback especially for the new supported devices ze550ml and zx551ml. Please go on and try the toolkit, then leave a message on this thread, do a review or just vote.
Before you try any action in the menu, check that the device informations are shown.
Features
​
Supports ZE551ML, ZE550ML, ZX551ML
​
Device status and connection information
​
Automated actions
​
Bootloader unlock
​
Flash boot/recovery images (twrp, stock)
​
Fix wrong or missing image signatures!!
​
Root / unroot Magisk & SuperSU
​
Xposed for Magisk (install / uninstall)
​
Patching xposed for magisk for zenfone 2 (if installed the unpatched xposed for magisk by mistake)
​
Compatible with most current MM firmware versions from devices ZE551ML, ZE550ML, ZX551ML
Currently integrated Tools
​
v14.0 (default) and v14.2
​
SuperSU 2.79SR3 / 2.82 (default) / 2.82SR5
​
TWRP 3.0.3-M4 / 3.1.1 (default)
​
Xposed for Magisk v87.3 / v88.0 (default)
​
Stock boot/recovery support of most current MM firmware versions from devices ZE551ML, ZE550ML, ZX551ML
​
adb/fastboot 1.0.32 (optional: 1.0.36)
Installation instructions
Do a clean start:
​
Download the latest base package
​
Extract to your desired location. It will extract a "ze551ml toolkit" directory with all files.
​
(Optional / If the automatic download of the device specific files fails) Download the device specific packages and extract it directly to the "ressources" directory
To run the toolkit just execute "ze551ml toolkit.bat" (no admin rights are needed).
Usage instructions
Prerequisite:
​
Ensure that you have installed device usb drivers (e. g. see: https://www.asus.com/Phone/ZenFone_2_ZE551ML/HelpDesk_Download/ )
​
Ensure that you have one of the latest MM firmwares for your device installed.
​
Ensure that you have enabled USB Debugging in Developer Options
​
Even if only a few actions could be really harmful to your data: Get a backup!
Then:
​
Run ze551ml_toolkit.bat
​
Check device status information & see if toolkit really likes your device
​
If your bootloader is still locked: Unlock it first with menu B -> choice U
​
(Optional) Choose your desired versions of the integrated tools in menu O.
​
(Recommended) Flash twrp with menu F -> choice T. If you want to try a newer twrp version, change it first in menu O
​
Check all the other nice functions of the toolkit
Downloads
Main: xda devdb archive
Mirror 1: https://mega.nz/#F!u8JhhY7T!9PryiRdjVSFf-O4erijDWg
Mirror 2: https://drive.google.com/drive/folders/0B4r2bJ3AgndSRVl5djNPNV9Qbkk?resourcekey=0-i9dHUezdzckVemi93NlYLA&usp=sharing
File structure:
​
ze551ml-toolkit-<VERSION>-base.zip - contains the base toolkit package without any device specific files
​
z00a*.zip - contains all device specific files for Z00A (ZE551ML)
​
z008*.zip - contains all device specific files for Z008 (ZE550ML)
​
z00x*.zip - contains all device specific files for Z00X (ZX551ML)
Changelog
Code:
[B]v1.3[/B]
Current changelog: 14.10.2017
[added] xposed for magisk v88.0
[new] Patching xposed for magisk for zenfone 2 (if installed the unpatched version by mistake)
Code:
[B]v1.22[/B]
Current changelog: 08.10.2017
[added] magisk v14.2
[removed] magisk v13.3
[fixed] xposed for magisk v87.3
[new] Fix wrong or missing image signatures!!
[fixed] Better support for encrypted devices
Code:
[B]v1.1b9[/B]
Current changelog: 22.09.2017
[added] magisk v14.0
[removed] magisk <v13.3
[removed] twrp 3.0.2-M1
[updated] magisk uninstaller
Code:
[B]v1.1b8[/B]
Current changelog: 19.07.2017
[added] magisk v13.3
[updated] magisk uninstaller
[new] action to download latest mirror file which is used to get some stock files updates
Code:
[B]v1.1b6[/B]
Current changelog: 13.07.2017
[added] magisk v13.2
[removed] magisk v13.1
[fixed] twrp detection
[modified] magisk manager will now be extracted from zip and installation will be forced after sideload
Code:
[B]v1.1b5[/B]
Current changelog: 11.07.2017
[added] magisk v13.1
[removed] magisk v13 betas
[fixed] minor fixes in supersu actions
Code:
[B]v1.1b3[/B]
Current changelog: 02.07.2017
[added] 2 magisk v13 beta versions
[removed] magisk <v12
[updated] xposed installer
[added] 2 more twrp versions
[fixed] hardened detection of installed twrp version (still needs root or already booted twrp for that)
[fixed] changed the way the toolkit downloads files
Code:
[B]v1.0b10[/B]
Current changelog: 04.04.2017
[added] magisk v12.0
[updated] fixed some help messages
Code:
[B]v1.0b8[/B]
Current changelog: 21.03.2017
[added] support for more devices: z00a, z00d, z00x
[added] automatic download for device files if needed
[added] magisk v11.6
[added] twrp 3.0.3-M4 (for encrypted devices or android n installations
[added] backup efs function
[added] integrity check
[modified] menu structure
[updated] changed some help messages
Code:
[B]v1.0b2[/B]
Current changelog: 14.02.2017
[modified] menu order
[disabled] usage of system installed platform tools, internal are forced now
[fixed] boot2recovery could have been failed in some cases
[fixed] timing problems in wipe routine
[added] validations added to each boot states
[removed] twrp 3.0.3.2
[adjusted] code / function names
Code:
[B]v0.9[/B]
Current changelog: 07.02.2017
[added] new twrp 3.0.3.2
[added] new magisk v11.1
[disabled] second disclaimer
[disabled] bootloader status in device overview at the top as I haven't found a secure way to detect a locked/unlocked bootloader yet.
[removed] magisk v10.2
[removed] twrp 3.0.3-N
Code:
[B]v0.7[/B]
Current changelog: 02.02.2017
[added] boot to safe mode
[added] wipe menu
[added] new twrp 3.0.3-N and platform tools 1.0.3.6 (no default yet. versions can be switched in troubleshoot menu for testing)
Code:
[B]v0.5[/B]
Current changelog: 31.01.2017
[added] each action shows some information about what's going to happen now
[changed] each action must be confirmed to be executed. if you don't need that, enable auto-yes in troubleshoot menu
Code:
[B]v0.3p1[/B]
Changelog: 28.01.2017
[fixed] added missing magisk manager to installation procedure
Thanks to/Credits
Code:
:: > shakalaca
:: > chainfire
:: > topjohnwu
:: > twrp
:: > social-design-concepts
:: > phhusson
:: > say99
:: > Deathschythe33
:: > ggrandou
:: > gerasiov
You'll find more credits inside the source code.
I hope i didn't forget anyone. If so please report.
XDA:DevDB Information
Zenfone 2 ToolKit [Z00A/Z008/Z00X], Tool/Utility for the Asus ZenFone 2
Contributors
rummsbumms
Version Information
Status: Stable
Current Beta Version: 1.3
Beta Release Date: 2017-10-14
Created 2017-01-28
Last Updated 2018-07-31

Reserved

Reserved

What makes this different with @Giovix92's tool?

Yes, same question as above. What makes it different from ZE55xML_Modder by Giovix92

@krasCGQ @fred_gaou
i think that main difference is that this toolkit supports the last 3 MM firmware versions and works automatically for all tasks, so user interaction is reduced to wait & perhaps read

@rummsbumms
Question 1: would you suggest to run ze551ml_toolkit.bat as admin or not?
Question 2: did you personally test all root method provided by toolkit: SuperSU, Magisk+SuperSU, Magisk+phh superuser? Did you succeed to properly unroot all of them? Will you suggest one method rather than another?
Question 3: did you test custom ROM install via TWRP such as last LineageOS after unlock bootloader and install TWRP with your toolkit?
Question 4: What is "Auto Packages" supposed to mean? What does it do? According to script code, it seems to unroot and restore stock bootloader. That's why I don't understand the Auto Packages term.
====
To avoid having to get always the same questions like
How to root for the 1st time or safely upgrade firmware and root again…?
How to get back to a clean stock device?
What does this menu entry really do?
etc.
I would suggest some guide lines to help users in the 1st post as well as in a "how to.txt" file along the toolkit or in the batch itself as a menu entry named "Help" or "FAQ" or else.
====
FEATURES REQUEST
# Add FACTORY RESET DEVICE menu entry. This will imply:
Code:
fastboot erase userdata
fastboot erase cache
# Add Erase /system, /data and /cache menu entry, may be useful before installing a ROM. This will imply:
Code:
fastboot erase system (I guess it will work only if bootloader have been unlocked)
fastboot erase userdata
fastboot erase cache
or a complete wipe that will format the partitions too
Code:
fastboot -w
# Add a way to Back up and restore EFS, see this thread.
# And +1 to the post below about ifwi.
====
I would suggest also in the 1st post as well as in a "how to.txt" that the functions be more detailed. Example:
I see you chose to use adb/fastboot 1.0.32 version. Just to let you know that Minimal ADB and Fastboot v1.42 provide a more up to date adb and fastboot (the last 1.0.36). Why do you use this old 1.0.32 version?
====
I didn't test ZE55xML_Modder by Giovix92 or this toolkit yet, but just by reading the batch file, I can tell your code is way more elegant and skilled and should avoid the magisk root bug that ZE55xML_Modder users encounter.
====
And why checking if ADB is installed as system-wide since your toolkit already provides local adb/fasboot ? What's the point to add this "unnecessary" step ?
====
Great Work ! :good:
I will test your toolkit very soon and give feedback. I hope to get answers from you in the meantime.
Regards

What would be ideal , if possible to add
Is ..
An ifwi version detector
Because , there are a lot of people who flashed their phones who haven't a clue they have M version with LP bootloader.
They think they have M BL and brick their phones
If any help...
IFWI versions on 551 or Z00A
0094.0177 is locked LP bootloader
0094.0173 is unlocked.
0094.0183 is M BL
If your tool kit could detect these , it could flash back original stock recoveries and help many unaware people restore and upgrade stock LP to M
Then they could again use your tool to unlock once upgraded to stock M.
Where they then could make back ups of stock again before flashing custom ROMs

@fred_gaou
You gave some nice questions&suggestions!
About your questions:
You don't need the batch to run as admin as I don't use any function that needs admin rights.
Yes, I've tested all root functions and switched between single supersu, magisk with phh and magisk with supersu, but of course always with running the unroot task first. my personal favorite is magisk with phh b/c of the magisk hide. that's what i need for some banking apps :angel:
Not yet. I don't think i'm going to try that soon as I want to stay at stock rom atm. If you have any idea to implement that to this toolkit, i would be pleased to know.
The idea of the auto packages is to combine some single actions like unroot & root. So there is actually just one package, which I used the most time to get back to my favorite root solution.
The other points:
Giving more guidelines/hints in this thread&toolkit is a good point. I'll try to add this as soon as possible. :good:
Putting factory reset & backup on my todo list :good: Are there any installation procedure for roms that recommend to erase /system first? I've done that by mistake a few months ago and started to sweat. As this is a very dangerous command, I would only implement this if there is a need.
I know about the newer 1.0.36 version. That was the reason for the action "force internal platform toolkit" in the troubleshoot menu. But I had a LOT of problems running the new version on 2 different machines. The daemon didn't start with an error telling that the adb.log couldn't be opened. I'll put it on my todo list too, but with low priority.

timbernot said:
What would be ideal , if possible to add
Is ..
An ifwi version detector
Because , there are a lot of people who flashed their phones who haven't a clue they have M version with LP bootloader.
They think they have M BL and brick their phones
If any help...
IFWI versions on 551 or Z00A
0094.0177 is locked LP bootloader
0094.0173 is unlocked.
0094.0183 is M BL
If your tool kit could detect these , it could flash back original stock recoveries and help many unaware people restore and upgrade stock LP to M
Then they could again use your tool to unlock once upgraded to stock M.
Where they then could make back ups of stock again before flashing custom ROMs
Click to expand...
Click to collapse
Haven't thought about that scenario. Can you give me some more details? Users with bricked phones can only boot fastboot and nothing else?
I currently don't know a method to detect the ifwi version in fastboot state, so i would probably need twrp or a running system (almost certainly with root permission) to get ifwi information.

Hi,
I just want to verify. I have the ASUS Zenfone 2 Deluxe Special Edition that I have upgraded from the stock 5.0.0 Android Lollipop (I forgot the ASUS Firmware version number) to the the Official ASUS 6.0.1 Marshmallow (Version WW-4.21.40.223(andriod M)) I can use this?
I regret upgrading from the Official LP to the Official MM with all the bloatwares. I am looking for a way to get root just like with my Sony Xperia phones but I am learning that getting root on ASUS Zenfones on MM is difficult. Almost all solutions I am reading is advising to downgrade from MM to LP, root, then manually upgrade to MM

rummsbumms said:
Not yet. I don't think i'm going to try that soon as I want to stay at stock rom atm. If you have any idea to implement that to this toolkit, i would be pleased to know.
Click to expand...
Click to collapse
Well, I'm still on stock LP so I would not be a good adviser. I trust the experienced users that switch and update ROM weekly so they will give useful feedback soon. Since some guys on LineageOS used Giovix modder to unlock bootloader and install ROM via TWRP, I guess it's currently the way to go.
rummsbumms said:
The idea of the auto packages is to combine some single actions like unroot & root. So there is actually just one package, which I used the most time to get back to my favorite root solution.
Click to expand...
Click to collapse
I get it now. It could be a useful section in future to run sequential commands at once.
rummsbumms said:
Putting factory reset & backup on my todo list :good: Are there any installation procedure for roms that recommend to erase /system first? I've done that by mistake a few months ago and started to sweat. As this is a very dangerous command, I would only implement this if there is a need.
Click to expand...
Click to collapse
Yes it is wise. I just provided the command because it was implemented in Giovix Modder and often reported as a way to clean up before flash all stock in other device. Don't know for 551.
rummsbumms said:
I know about the newer 1.0.36 version. That was the reason for the action "force internal platform toolkit" in the troubleshoot menu. But I had a LOT of problems running the new version on 2 different machines. The daemon didn't start with an error telling that the adb.log couldn't be opened. I'll put it on my todo list too, but with low priority.
Click to expand...
Click to collapse
Detail is good to know. What OS do you use: 7, 8.1 or 10? If 1.0.32 works fine on every version, there is no point to risk to break anything using 1.0.36.
Thanks for your answers.

rummsbumms said:
Haven't thought about that scenario. Can you give me some more details? Users with bricked phones can only boot fastboot and nothing else?
I currently don't know a method to detect the ifwi version in fastboot state, so i would probably need twrp or a running system (almost certainly with root permission) to get ifwi information.
Click to expand...
Click to collapse
Thinking about it now a bit more , it maybe tail end for this problem .
The actual problem people were having was they thought they had cm13 with M BL , actually they had the LP bootloader cm13 . They would be in a working system then flash 14.1 / 7.1 builds then , brick their devices .
They forget they never upgraded bootloader and with having 6.0.1 M in build information in settings, presumed they had upgraded bootloader at some point but didn't .
Maybe , to prevent the tail enders from performing such tasks again , maybe a simple addition like a warning , like build date which in cm 13 , to check.. if before July 2016 and have IFWI version 0094.0173 unlocked . Then you could direct them to say a return to stock option , flashing back boot and recovery for say on 551 LP 2 20 40 .196 Version , then possibly install the full ROM from say a link or something like ...Then info to upgrade to stock M before returning back to tool to unlock updated to the latest M.
But like mentioned , we maybe at the tail end of this problem.
Probably related to 95% of the bricking threads here for zenfone.
Anyway thanks for taking interest

Deathschythe33 said:
Hi,
I just want to verify. I have the ASUS Zenfone 2 Deluxe Special Edition that I have upgraded from the stock 5.0.0 Android Lollipop (I forgot the ASUS Firmware version number) to the the Official ASUS 6.0.1 Marshmallow (Version WW-4.21.40.223(andriod M)) I can use this?
I regret upgrading from the Official LP to the Official MM with all the bloatwares. I am looking for a way to get root just like with my Sony Xperia phones but I am learning that getting root on ASUS Zenfones on MM is difficult. Almost all solutions I am reading is advising to downgrade from MM to LP, root, then manually upgrade to MM
Click to expand...
Click to collapse
As far as i can see from the asus page, the zf2 deluxe special edition uses the same firmware files and you already have the newest firmware (.223) installed, so i think it should work.
Is your bootloader still locked?

Thank you so much for your awesome ToolKit, works flawlessly !!
<3

v0.5 is out

rummsbumms said:
v0.5 is out
Click to expand...
Click to collapse
thanks, can you simply make 3 downloads complete for the 3 mm versions? now is a bit confusing with this updating/base files.
I don't think that 80mb would be a problem to download, everyone have at least a dsl line, we are not talking of gbs, thanks

v0.7 is out
@fred_gaou: I've tested with win10. 1.0.3.2 works fine and will be default, but I've added 1.0.3.6 too. perhaps someone could test on other machines as i still have problems using it and don't know whats the problem.
@holymoz: I've made a additional "full" package which contains all files. the "base" version still only contains the latest mm firmware files.
@timbernot: Still thinking about it. Maybe some kind of decision tree asking for the problem could lead the user to an action that could cure the problem. I'll keep it on my todo list.

V0.5 works okay on my device with win 10 . i will test later the new build thanks

rummsbumms said:
As far as i can see from the asus page, the zf2 deluxe special edition uses the same firmware files and you already have the newest firmware (.223) installed, so i think it should work.
Is your bootloader still locked?
Click to expand...
Click to collapse
Hello @rummsbumms,
Thank you for taking your time to respond. Yup, my phone's bootloader is still locked. Everything in this phone is "official" including the freaking official bloatwares. I love the HW specs of this phone, but the bloatwares are F***ing crazy!

Related

Summary/tutorial: Root on Sony Xperia Z5 Compact (E5823) with DRM keys backup

Hi everybody,
None of the following is my own novel work, I just took some time to go through the process step by step and document how to root the Z5 compact while preserving both the DRM keys (in a backup) and the functionality normally lost by unlocking the bootloader (using the DRM credentials patch). This post may serve as a tutorial for people starting to root their Z5 compact for the first time.
The device I tested it with is an E5823 with German firmware (originally shipped with CDA 1298-1220_R1C) that was already updated to build 32.1.A.1.163 (Android 6.0, patch level 2016-02-01) via OTA. For devices with other CDA regions, please adapt accordingly by using the respective firmware files.
1. Backup settings and apps
This will be required for restoring after unlocking the bootloader (which wipes the user data partition). For some reason, including the "-shared" option (i.e. contents of the internal emulated SD card, aka media storage) did not work, so make sure to save any media files (pictures takes with the camera, downloads, etc.) separately, e.g. via MTP.
Use Sony backup to SDcard functionality
adb backup -apk -all -f sony-xperia-z5c-noshared.ab
2. Backup TA partition (DRM keys)
Downgrade to exploitable firmware release (LP). Note that downgrading without wiping will make the phone unstable and may cause an automatic reboot after 1-2 min. Therefore either manually wipe the phone during flashing (ticking the checkbox in Flashtool) or be quick with the second (root/backup TA) step.
Download XperiFirm from http://forum.xda-developers.com/cro...xperifirm-xperia-firmware-downloader-t2834142 (I use it under Linux with mono) - UPDATE: For downloading the .185 MM firmware, I had to update to XperiFirm 4.9.1. For downloading 32.2.A.0.253, I used XperiFirm 5.0.0.
Download firmware build 32.0.A.6.200 for the root exploit based on CVE 2015-1805. I used E5823_StoreFront_1299-6910_32.0.A.6.200_R2B downloaded with XperiFirm 4.8.2 (or newer) on 2016-04-01
Download flashtool from http://www.flashtool.net/index.php, I used flashtool-0.9.20.0-linux.tar.7z (or newer version)
Create FTF file in Flashtool with menu Tools->Bundles->Create
Flash in flashmode (flashing system.sln takes 8-10 minutes, be patient...)
Use temporary root exploit to backup TA partition (http://forum.xda-developers.com/crossdevice-dev/sony/iovyroot-temp-root-tool-t3349597)
I used iovyroot_v0.3.zip as of 2016-04-02
Connect USB in ADB mode
adb push "root/iovyroot" "/data/local/tmp/iovyroot"
adb push "root/backup.sh" "/data/local/tmp/backup.sh"
open shell: adb shell
chmod 777 /data/local/tmp/iovyroot
chmod 777 /data/local/tmp/backup.sh
mkdir /data/local/tmp/tabackup
/data/local/tmp/iovyroot /data/local/tmp/backup.sh
exit
adb pull "/data/local/tmp/tabackup/" .
3. Upgrade again to MM and unlock bootloader with official method
Create FTF from E5823_Customized DE_1298-1220_32.1.A.1.163_R1C with Flashtool and flash in flashmode.
Optional: Verify that DRM keys are still OK: In dialer enter "*#*#service#*#*", then "Service tests" --> "Security" and it should look like this:
MARLIN [Key OK] [Active]
WIDEVINE [Key OK] [Active]
CKB [Key OK] [Active]
HUK: <device specific hex representation of key>
PROPID_AID: 004
OTP_LOCK_CONFIG: 0155
OTP_LOCK_STATUS: LOCKED
AUTH_ENABLE: 07
DEVICE_ID: <your device ID>
FIDO_KEYS: Provisioned
Factory Reset Reason: No device reset information found.
Click to expand...
Click to collapse
Allow bootloader unlock in developer settings
Follow steps from http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ . There is not much to add here, as Sony describes the process well and in sufficient detail. Please note that this WILL WIPE YOUR DATA PARTITION, INCLUDING SHARED FILES. Make sure that you have a backup before executing this step (and best do it before downgrading to LP, because some parts will not work after the downgrade without a wipe, and may make the phone reboot after 1-2 min).
Reboot in fastboot mode: hold volume-up and connect USB cable to turn on
fastboot -i 0x0fce oem unlock <your unlock code>
After unlock: check key status
Blobs: generic error!
HUK: generic error!
PROPID_AID: 004
OTP_LOCK_CONFIG: 0155
OTP_LOCK_STATUS: LOCKED
AUTH_ENABLE: 07
DEVICE_ID: <your device ID>
FIDO_KEYS: Not provisioned, SUNTORY error
Factory Reset Reason: No device reset information found.
Click to expand...
Click to collapse
Optional: Try restoring TA partition (will lock bootloader again if successful!). This can be skipped entirely if you trust the tools used in this tutorial, but I chose to verify that restoring the DRM keys works as expected (not that you can do anything about it at that step if it doesn't work...).
Flash E5823_StoreFront_1299-6910_32.0.A.6.200_R2B again with Flashtool
Enable developer mode, connect USB in ADB mode
adb push "root/iovyroot" "/data/local/tmp/iovyroot"
adb push "root/restore.sh" "/data/local/tmp/restore.sh"
adb push TA-02042016.img "/data/local/tmp/TA.img"
open shell
chmod 777 /data/local/tmp/iovyroot
chmod 777 /data/local/tmp/restore.sh
/data/local/tmp/iovyroot /data/local/tmp/restore.sh
Flash E5823_Customized DE_1298-1220_32.1.A.1.163_R1C again with Flashtool
Check key status --> exactly the same as before, so successfully restored
Unlock again in fastboot mode (will wipe data again...)
fastboot -i 0x0fce oem unlock <your unlock code>
UPDATE: Updating to newer MM releases
After the first version of this post, Sony has already released an updated MM firmware (.253 at the time of this writing). If at any point in time you wish to update to a newer release, start at this point of the tutorial. Theoretically, this should be possible without wiping. However, I would not try it without a backup.
Create a backup, e.g. with adb backup or Sony backup.
Download new firmware with XperiFirm. At the time of this writing, I used "E5823_Customized DE_1298-1220_32.2.A.0.253_R2C", downloaded with XperiFirm 5.0.0.
Create FTF file in Flashtool with menu Tools->Bundles->Create
Flash in flashmode (flashing system.sln takes 8-10 minutes, be patient...)
4. Root MM
This will also give you TWRP recovery (which can be entered by pressing the volume up or down button a few seconds after power-on, as soon as the LED starts to change color).
DEPRECATED Alternative 1: with custom kernel but original system image: http://forum.xda-developers.com/z5-compact/general/root-e5823-marshmallow-t3336346
Download Androplus kernel from https://www.androidfilehost.com/?w=files&flid=52185 (I used v22c)
Download TWRP 3.0 from http://forum.xda-developers.com/z5-compact/orig-development/twrp-suzuran-twrp-3-0-t3334568 (I used "March 25, 2016 version") --> twrp-3.0-recovery.img
Download SuperSU v2.71 beta from https://download.chainfire.eu/932/SuperSU/BETA-SuperSU-v2.71-20160331103524.zip
With unlocked bootloader, you can now use fastboot mode. The easiest way is to do this from a running Android system:
adb reboot bootloader
Flash kernel:
unzip Z5C_AndroPlusKernel_v22c.zip
sudo fastboot flash boot boot.img
Flash recovery:
sudo fastboot flash recovery twrp-3.0-recovery.img
Install SuperSU:
boot into Android, copy BETA-SuperSU-v2.71-20160331103524.zip to internal storage (ADB sideload doesn't seem to work with this experimental TWRP at the moment...)
boot into TWRP by pressing volume-up when LED blinks immediately after turning on (and choose option "Keep Read Only" for the system partion)
Install SuperSU zip --> systemless mode
DEPRECATED Alternative 2: with modified system partition: http://forum.xda-developers.com/z5-...rnel-stock-kernel-dm-verity-sony-ric-t3350341
RECOMMENDED Alternative 3: with stock kernel patched for root and original system partition: http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
Download rootkernel_V4.51_Windows_Linux.zip from URL above (or the newest version available at that time) and unpack
Patch the kernel from your currently flashed Sony firmware release:
Flashtool -> Tools -> SIN Editor to extract the kernel from kernel.sin in the directory created by XperiFirm --> .elf file
Copy latest SuperSU*.zip (v2.76 at the time of this last update) to the folder where rootkernel*.zip was extracted to.
Note: if using the firmware 32.2.A.0.224, you will need the latest beta SuperSU.zip from https://download.chainfire.eu/964/SuperSU/BETA-SuperSU-v2.74-2-20160519174328.zip . For 32.2.A.0.253 (the latest at the time of this update), use SuperSU v2.76 (non-beta).
./rootkernel.sh kernel.elf kernel-patched.elf
My personal recommendation for the options: don't disable RIC, install TWRP, don't install busybox, install DRM fix
sudo fastboot flash boot kernel-patched.elf
./flash_dk TA-02042016.img DK.ftf
Flash DK.ftf with flashtool for a more complete restore of DRM-based functionality with the original TA partition backup
UPDATED: Thanks to ninestarkoko for pointing out that also the AndroPlus kernel disables dm-verity to enable more flexibility for root-using apps. Originally I assumed that dm-verity would still be intact with alternative 1, which in fact it is not. As of 2016-05-11, I used alternative 3 instead of alternative 1.
Now that Xposed can be installed system-less (http://forum.xda-developers.com/xposed/unofficial-systemless-xposed-t3388268), it should be possible to use with dm-verity intact. However, I have not tried this so far.
5. [Optional] Install Xposed
Sony MM firmware no longer seems to have the odex problem documented in http://forum.xda-developers.com/crossdevice-dev/sony/z4-z5-z5c-fix-camera-fc-installing-t3246962/, so no additional steps before/after "normally" installing Xposed are required
Download latest arm64 "sdk23" framework from http://dl-xda.xposed.info/framework/ (I used v81)
UPDATE: There is now a system-less version v86, which may even support OTA upgrades of the system image. At the time of this last update, I used the version linked from http://forum.xda-developers.com/xposed/unofficial-systemless-xposed-t3388268.
Download XposedInstaller_3.0-alpha4.apk from http://forum.xda-developers.com/showthread.php?t=3034811 and install
UPDATE: For the system-less Xposed version, instead use XposedInstaller_by_dvdandroid.apk from http://forum.xda-developers.com/xposed/unofficial-systemless-xposed-t3388268.
Install xposed-v86.1-sdk23-topjohnwu.zip via TWRP
6. Restore functionality relying on DRM credentials
Note: This is not necessary if you used alternative 3 for rooting above - that one already includes the DRM fix in the patched kernel image.
Using TWRP flashed in the step before, flash the ZIP to patch Sony credentials checks from http://forum.xda-developers.com/xperia-z5/development/sony-credentials-restore-unlocking-t3296383 .
Copy drmrestore.zip from above link to internal storage and install via TWRP
That's it!
Sorry, I have never been totally clear on the relationship of firmware and kernels. If I install .163 and go through all the root steps here, if I then install .185 will I no longer have root or will the kernel still be rooted? Or after I upgrade will I be required to go through the root process again? Or by chance is there just no root available for the .185 release yet? Thanks
I would like to make some observations to this useful post, because it seems there's a bit of confusion:
About point 2)
to backup TA partition, just connect the phone and run tabackup.bat from iovyroot zip .
It will execute adb commands automatically.
About point 3)
i would stick with Lollipop and unlock directly on Lollipop, there's no need to flash MM before. You need to flash a firmware using flashtool if you have already unlocked. Temporary root exploit does not alter in any way the current system.
About point 4)
All the modded kernels on xda seems to have dm-verity and sony ric disabled. Androplus kernel too ( https://kernel.andro.plus/kitakami_r2.html from the first changelog ). /system partition modification is also necessary for DRM restore functions.
I think that root priviledges for apps with DM-verity enabled on /system would be quite "dangerous". As soon as an app edit the system partition (just a simple mod), the phone would go in bootloop.
It's been one or two weeks since Tobias released a more advanced and updated technique to restore DRM functions, and just flashing a .zip is no more sufficient (now .zip flashing + .ftf flashing with flashtool)
The gold standard regarding the kernel part is:
-use a modded stock kernel (TWRP recovery and advanced DRM restore function included) following this guide:
http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
-or use custom kernels like Androplus,... (TWRP might or might not be included) and then restore DRM functions following the instructions from the same post above (drmonly command from the package)
http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
Thank you for making a guide on Z5c forums. I've seen one only on z5 forums
Frontier3 said:
Sorry, I have never been totally clear on the relationship of firmware and kernels. If I install .163 and go through all the root steps here, if I then install .185 will I no longer have root or will the kernel still be rooted? Or after I upgrade will I be required to go through the root process again? Or by chance is there just no root available for the .185 release yet? Thanks
Click to expand...
Click to collapse
If you are on Lollipop, i suggest flashing directly MM .185 . If you are on MM .163 then flashing the whole firmware package will/could wipe everything, kernel included. I don't know exactly if the kernel from .163 is exactly the same as the one in .185. If your kernel gets wiped then root, DRM restore, TWRP would go away.
Let me explain: You need a modded kernel in order to install SuperSU, which gives root access to apps. SuperSU runs fine on many phones, Z5C MM included. If you upgrade using a .ftf file flashing, then the chance is high that you need to mod/install a custom kernel again, restore DRM functions and install SuperSU again.
If I root my phone, and then I turn it off and then on will the root still be usable?
What I'm asking is if its like iPhone's tethered and untethered jailbreaks?
I have rooted (unlocked bootloader), TWRP installed. How can I update to MM?
Many thanks for any help!
damn_son said:
If I root my phone, and then I turn it off and then on will the root still be usable?
What I'm asking is if its like iPhone's tethered and untethered jailbreaks?
Click to expand...
Click to collapse
Yes, it will be rooted, until you unroot!
Thanks for the tutorial.
Which region firmware should I choose for Canada? There's not even USA firmware available. Does it matter at all?
You mentioned using E5823_StoreFront_1299-6910_32.0.A.6.200_R2B to downgrade.
I'm currently on MM .185 Customized UK.
Does it matter what region I use?
fisheyes1 said:
You mentioned using E5823_StoreFront_1299-6910_32.0.A.6.200_R2B to downgrade.
I'm currently on MM .185 Customized UK.
Does it matter what region I use?
Click to expand...
Click to collapse
You'd have to go back to an exploitable firmware. Version working are mentioned here: http://forum.xda-developers.com/crossdevice-dev/sony/iovyroot-temp-root-tool-t3349597
In the Z5c case E5823_StoreFront_1299-6910_32.0.A.6.200_R2B is the best solution IMO
ninestarkoko said:
I would like to make some observations to this useful post, because it seems there's a bit of confusion:
About point 2)
to backup TA partition, just connect the phone and run tabackup.bat from iovyroot zip .
It will execute adb commands automatically.
Click to expand...
Click to collapse
As I used Linux, the .bat script won't be directly applicable. The commands listed in my post will work with all host OS. (This is in addition to my personal disinclination to execute downloaded scripts directly on my development host .)
ninestarkoko said:
About point 3)
i would stick with Lollipop and unlock directly on Lollipop, there's no need to flash MM before. You need to flash a firmware using flashtool if you have already unlocked. Temporary root exploit does not alter in any way the current system.
Click to expand...
Click to collapse
Fully correct. I was already on MM before starting the whole process, so I had to go back to LL first.
ninestarkoko said:
About point 4)
All the modded kernels on xda seems to have dm-verity and sony ric disabled. Androplus kernel too ( https://kernel.andro.plus/kitakami_r2.html from the first changelog ). /system partition modification is also necessary for DRM restore functions.
I think that root priviledges for apps with DM-verity enabled on /system would be quite "dangerous". As soon as an app edit the system partition (just a simple mod), the phone would go in bootloop.
It's been one or two weeks since Tobias released a more advanced and updated technique to restore DRM functions, and just flashing a .zip is no more sufficient (now .zip flashing + .ftf flashing with flashtool)
The gold standard regarding the kernel part is:
-use a modded stock kernel (TWRP recovery and advanced DRM restore function included) following this guide:
http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
-or use custom kernels like Androplus,... (TWRP might or might not be included) and then restore DRM functions following the instructions from the same post above (drmonly command from the package)
http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
Click to expand...
Click to collapse
Many thanks for that correction - I was wrong to assume that dm-verity would still be intact with Androplus kernel. I have updated my post accordingly.
Would have been good for me, to have boot and recovery bold. Just recalled the fastboot flash boot command to flash the recovery over
besides that: *****
sudo fastboot flash boot boot.img
Flash recovery:
sudo fastboot flash recovery twrp-3.0-recovery.img
Click to expand...
Click to collapse
smartphone-tester said:
As I used Linux, the .bat script won't be directly applicable. The commands listed in my post will work with all host OS. (This is in addition to my personal disinclination to execute downloaded scripts directly on my development host .)
Fully correct. I was already on MM before starting the whole process, so I had to go back to LL first.
Many thanks for that correction - I was wrong to assume that dm-verity would still be intact with Androplus kernel. I have updated my post accordingly.
Click to expand...
Click to collapse
Great to see updates to the first post, it will be useful for many new Z5c users out there
hi, im new z5c user
just received it and ill take this tuto for the root
thank you
Hey quick question, what exactly is stored in the DRM keys? I heard it's no longer the low-light camera stuff, so what is? If it's not too relevant isn't it just much easier to OEM unlock on MM, flash twrp and supersu (do you need the custom kernel to do so, btw?) and be done with it?
ApplepieFTW said:
Hey quick question, what exactly is stored in the DRM keys? I heard it's no longer the low-light camera stuff, so what is? If it's not too relevant isn't it just much easier to OEM unlock on MM, flash twrp and supersu (do you need the custom kernel to do so, btw?) and be done with it?
Click to expand...
Click to collapse
Some Sony-proprietary functions are dependent on the keys (e.g. low-light algorithms in the stock camera, seemingly also some screen optimizations, or potentially also stuff like screen mirroring - although I have not tried myself what is missing without real/fake DRM keys) as well as DRM management via Widevine. With the restore patches, you get most of the Sony functionality back even when the keys themselves have been deleted. Widevine might not work without the original keys available.
I just have a question cause I seem to be getting 0 answers elsewhere.
I want the latest lollipop on my Z5C and NOT Marshmallow. I believe it's the 32.0.A.6.200 build.
Anyway, I thought I could update to it like OTA, only not all the way to MM but staying at LP. Do I have to unlockbootloader, root and then use flashtool with the 32.0.A.6.200 build (which I've founda few online)? Is there no way to just install it like a "normal" update as I am currently still on stock 32.0.A.4.11. Is my only salvation to unlock bootloader, root and install the update?
You shouldn't have to unlock or root to use flash tool to flash 32.0.A.6. 200
Ive tried multiple different versions now, but it always stop at "Processing modem.sin", even tried leaving it for 20min. No results.
Anyone with a solution?
Edit: Also tried it on my macbook, same problem!
To clarify: Talking about downgrading to .200
It is not clear to me to try it and I doesnt want to brick my handy. Any way to make a video tutorial, including all, unlocking BL, backuk and restore DRM and also a way to turn back the device to a stock rom, for a warannty purposes (my camera is very very bad).
Thank you.
Sorry guys, but just to confirm: if I manage to successfully back up my TA partition, I can always go back and re-lock the boot loader, right? I am also skeptical about voiding warranty Sony speaks about on their corresponding web site. Do you think they save a record whenever someone requests an unlock code from them? In other words, if I need to restore stock ROM and TA partition later on (e.g. due to RMA), would it be possible for my vendor (Telekom) to check with Sony if I have ever unlocked my boot loader?
Many thanks for your great work!

[NEWBIE GUIDE v2.0] MIUI ROMs, TWRPs, ZIPs, BACKUP, FLASH, RESTORE

UPDATED NEWBIE GUIDE v2.0
FOR REDMI NOTE 3 SNAPDRAGON (KENZO)
(WORKS FOR ALL MIUI / AOSP / CM BASED ROMs)​
GUIDE SECTIONS : QUICK LINKS​#1 : MIUI ROM | TYPES OF MIUI ROM | TWRP | TYPES OF TWRP
#2 : TWRP FLASHABLE ZIPs | FULL PARTITION BACKUP | FLASHING ROM
#3 : RESTORING MIUI FIRMWARE (WIP) | SUMMARY | CREDITS​
IMPORTANT NOTE !!​- Before following any step or asking any question, please read the guide & the below comments very carefully & thoroughly
- You are choosing to make these modifications, I take no responsibility for bricked devices, dead or corrupt SD cards, accidental data wipe etc.
- This guide only supports users who have UNLOCKED their BOOTLOADER using OFFICIAL method
- I have dropped support for users who have UNLOCKED their BOOTLOADER using UNOFFICIAL method as it was risky & confusing
- This guide will be updated as new information, TWRP, methods are added. Do let me know if I have forgot to mention anything useful
MIUI ROM​
MIUI (pronounced as Me-You-I) is Xiaomi's custom built firmware on top of Android like Samsung's Grace UX, HTC's Sense, OnePlus's OxygenOS which runs on their smartphones. MIUI is also the second most popular Android firmware, after CyanogenMod. MIUI is based on Android's AOSP base with its own modifications and extensive features over the top. At first glance it resembles like a hybrid between Google's Material Design and Apple's iOS. But unlike Stock Android or iOS, MIUI is very intuitive, feature rich and has multiple tweaking options.
MIUI is updated regularly depending on the development branch. Xiaomi takes reports, feedback and suggestions from the community, addresses the bugfixes and integrates new features upon request. Most of Xiaomi devices are regularly patched with monthly security updates. The flagship "Mi" series like Mi3, Mi4, Mi5 receive quicker Android version updates than their budget "Redmi" series like Redmi 2, Redmi 3, Note 2, Note 3 etc.
TYPES OF MIUI ROM​
There are 2 development branches of official MIUI ROMs for all Xiaomi devices.
A) Stable Branch aka Stable Builds
- It is updated on a monthly basis or longer
- New features are added slowly after testing
- Higher system stability and less bugs than Beta ROMs
- It has a four digit numbering scheme (X.X.X.X)
- For eg. 8.X.X.X is MIUI8 Stable ROM
- Stable ROMs come in 2 variants
1. MIUI China Stable ROM
- This ROM is pre-installed on all Xiaomi devices sold in China
- It is made for the Chinese market & contains Chinese MIUI apps
- Google Apps are absent. You can install them manually or by using ADB
- It supports Chinese & English language
2. MIUI Global Stable ROM
- This ROM is pre-installed on all Xiaomi devices sold outside China
- It is made for the International market & contains English MIUI apps
- Google apps are pre-installed by default
- It supports 50+ languages
B) Beta Branch aka Developer Builds
- It is updated on a weekly/bi-weekly basis or longer
- New features are added quickly for testing
- Lower system stability and more bugs than Stable ROMs
- It has a three digit numbering scheme (X.X.X)
- For eg. 6.11.21 is MIUI8 Beta ROM for 21th Nov, 2016
- This ROM is not pre-installed on any Xiaomi device.
- You have to install Beta ROM over Stable ROM manually.
- Beta/Developer ROMs come in 2 variants
1. MIUI China Beta/Developer ROM
- It is made for the Chinese market & contains Chinese MIUI apps
- Google Apps are absent. You can install them manually or by using ADB
- It supports Chinese & English language
2. MIUI Global Beta/Developer ROM
- It is made for the International market & contains English MIUI apps
- Google apps are pre-installed by default
- Supports more than 50+ languages
Vendor aka Unofficial MIUI ROM
- Official MIUI ROM is found on Xiaomi devices that are bought from official channels
- Official channels include Xiaomi stores, flipkart.com, amazon.com etc.
- Vendor/Unofficial MIUI ROM is typically found on Xiaomi devices that are bought from unofficial channels/third-party resellers
- Unofficial channels include geekbuying.com, gearbest.com, banggood.com, ebay.com etc.
- Resellers take any of the official MIUI ROMs and modify it by injecting malwares, adwares, promotional apps etc.
- Vendor ROM may or may not contain Chinese MIUI Apps or Google Apps
- The Vendor ROM is then flashed by the reseller via EDL mode using MiFlash Tool, which bypasses LOCKED bootloader status
- Vendor ROMs can be identified by their odd 5 digit numbering scheme (X.X.X.X.X) eg. MIUI8 8.0.1.1.0, MIUI7 7.9.8.8.0
- You can identify a vendor ROM by comparing its version with official MIUI version here : http://en.miui.com/download.html
- Due to stability & security reasons, such ROMs should not be used and should be changed immediately.
- You should flash official MIUI ROMs using MiFlash Tool via EDL mode.
TWRP​
TWRP stands for Team Win Recovery Project. It is a custom recovery used to flash ROMs, kernels & scripts, take full system backups, restore backups etc. There are multiple versions of TWRPs for the Redmi Note 3 Snapdragon (kenzo). Many new users are confused as to which version of TWRP to flash after UNLOCKING the BOOTLOADER OFFICIALLY.
Thanks to Xiaomi for the multiple hardware revisions, outdated kernel sources & the tiresome process of unlocking the bootloader, this device has become even more complicated for the developers as well as for the end users. Hopefully Xiaomi updates the kernel sources as soon as possible. This will result in a streamlined and unified environment for the developers while compiling ROMs and for the user for a better end user experience.
TYPES OF TWRP​
1. Official TWRP : https://dl.twrp.me/kenzo/
- The base version of TWRP 3.0.2-2
- It is the stock version with no modifications done to it
- Used to flash flash ROMs, kernels & scripts, take full system backups, restore backups etc.
2. F2FS TWRP
Nougat : http://forum.xda-developers.com/showpost.php?p=70148939&postcount=3710
Marshmallow : http://forum.xda-developers.com/showpost.php?p=68023154&postcount=2
- Based on official TWRP 3.0.2-2
- Adds support for F2FS based file systems
- Specifically made for official CyanogenMod ROMs
- Compiled with Android 6.x & Android 7.1 branch respectively.
- Users can convert their /data & /cache partitions from EXT4 to F2FS for better performance (Optional)
3. Unofficial TWRP : http://forum.xda-developers.com/redmi-note-3/development/recovery-twrp-3-0-2-0-t3446909
- Based on official TWRP 3.0.2-2
- Up-to-date with Android 6.0 & Android 7.0 branch
- Adds support for F2FS based file systems
- Users can convert their /data & /cache partitions from EXT4 to F2FS for better performance (Optional)
- Can backup all partitions of the device
- Permissive SELinux
4. ZCX TWRP : http://forum.xda-developers.com/redmi-note-3/how-to/zcx-twrp-install-twrp-flash-supersu-t3462448
- Based on official TWRP 3.0.2-0
- Patches boot.img automatically (Removes dm-verity flag)
- Disables forced encryption
- Updated to Android 7.1 TWRP source
- SuperSU updated to v2.76
- Fixes "0MB Storage", "Unable to mount /" errors
- Adds support for Android 6.0 /data partition decryption
- Can be used to flash incremental OTA updates on MIUI rooted ROMs
5. Cofface TWRP : http://forum.xda-developers.com/redmi-note-3/development/recovery-kenzotwrp-cafface-3-0-0-t3369341
- Based on official TWRP 3.0.0-0
- Patches boot.img automatically (Removes dm-verity flag)
6. Safe TWRP v2 : http://forum.xda-developers.com/redmi-note-3/how-to/modified-twrp-deleting-emmcappsboot-t3371667
- Based on Cofface TWRP 3.0.0-0
- Patches boot.img automatically (Removes dm-verity flag)
- Specifically compiled for users who UNLOCKED the BOOTLOADER using UNOFFICIAL method.
- Prevents hardbrick while flashing MIUI Recovery ROM Zip or incremental OTA Zip
7. Alka TWRP : http://en.miui.com/thread-282773-1-1.html
- Based on Cofface TWRP 3.0.0-0
- Patches boot.img automatically (Removes dm-verity flag)
- Disables forced encryption
- Can backup all partitions of the device
TWRP FLASHABLE ZIPS​- These zips are meant to be flashed with TWRP with a specific order.
- Before flashing any zip make sure you have taken full backup of your device partitions using TWRP.
- Steps for full backup are mentioned in the next section.
PATCHES
1. Universal Boot Image Patcher : http://forum.xda-developers.com/redmi-note-3/how-to/modified-twrp-deleting-emmcappsboot-t3371667
- This zip patches the boot.img i.e. it disables "dm-verity" (Lollipop Only)
- Use this zip if you are having official TWRP, F2FS TWRP, Unofficial TWRP installed.
- All other TWRPs automatically patch the boot.img so no need to use this zip.
- This zip has to be flashed immediately after flashing MIUI Lollipop Recovery ROM else your ROM wont boot.
2. Lazy Flasher : https://drive.google.com/file/d/0ByWEieei-0nyMTR4R0dxWk9BTms/view
- This zip patches the boot.img i.e. it disables "dm-verity" and disables forced encryption (Marshmallow Only)
- Use this zip if you are having Official TWRP, F2FS TWRP, Unofficial TWRP, Cofface TWRP, Safe TWRP v2 installed.
- If you are using ZCX, Alka TWRP no need to use this zip
- This zip has to be flashed immediately after flashing MIUI Marshmallow Recovery ROM else your ROM wont boot.
3. VoLTE Patch : http://forum.xda-developers.com/redmi-note-3/development/volte-patches-nougat-based-cm-roms-t3509257
- This zip is to be flashed on specific Android 7.x Nougat based ROMs
- It enables VoLTE support by flashing modem partitions
4. RR 5.8.0 Fingerprint Fix : http://forum.xda-developers.com/redmi-note-3/how-to/guide-how-to-enable-goodix-fingerprint-t3507979
- This zip is to be flashed on Resurrection Remix 5.8.0
- This zip enables fingerprint sensor support for models having Goodix FP sensor
5. CM13 Front Camera Fix : http://forum.xda-developers.com/redmi-note-3/how-to/fix-camera-fix-official-cm13-builds-t3454893
- This zip is to be flashed if your front camera doesnt work on CM13 ROM
- This zip fixes "Could not connect to camera" issues.
6. CM13 Security & Radios Fix : https://drive.google.com/file/d/0B2CgYqnPbCh_RnJDaHJtdEFYRGM
- This zip is to be flashed after booting into system after flashing CM13 ROM
- This zip fixes the SIM issues and the force close in Security setting
FIRMWARES
1. Multi-ROM Firmware : http://forum.xda-developers.com/redmi-note-3/development/rom-multirom-firmwares-t3519420
- This zip enables us to boot multiple ROMs on the device simultaneously
- It flashes bootloader and other partitions
- This zip locks the bootloader
2. TheStrix's CM13 Firmware : http://forum.xda-developers.com/showpost.php?p=68023154&postcount=2
- This is the firmware that CyanogenMod 13 supports. Upgrades it from LP to MM firmware.
- This zip has to be flashed before flashing CM13 ROM else fingerprint & other sensors might not work.
- This zip does not lock the bootloader
3. TheStrix's CM14 Firmware : http://forum.xda-developers.com/showpost.php?p=68671310&postcount=2
- This is the firmware that CyanogenMod 14.1 supports.
- This zip has to be flashed before flashing CM14.1 ROM else fingerprint & other sensors might not work
- This zip locks the bootloader. Flash this one if you dont want BL Lock : https://drive.google.com/file/d/0BzDVQwVyIvEbTUZCR3lkSmR6X1E/
4. Android N Firmware : http://forum.xda-developers.com/redmi-note-3/how-to/cm14-14-1-aosp-n-firmware-kenzo-kate-t3507789
- This zip upgrades your firmware to support 7.x Nougat ROMs
- This zip should be flashed before flashing any Android 7.x Nougat ROM
- This zip does not lock the bootloader
ADD-ONS
1. Xposed Framwork : http://forum.xda-developers.com/redmi-note-3/how-to/guide-installing-xposed-framework-roms-t3416123
- Before installing any zip, perform a full backup.
- Official release is for AOSP / CM based ROMs
- Unofficial release is for MIUI ROMs
FULL PARTITION BACKUP​Before proceeding towards Flashing ROMs make sure you have backed up all the partitions on your device. Incase anything goes wrong, you can always restore the backup.
Requirements:
- Windows 7 / 8 / 8.1 / 10 PC
- Unofficial TWRP / Alka TWRP / ZCX TWRP
- Running on official MIUI7 / MIUI8 Stable ROM
- BOOTLOADER UNLOCKED Using OFFICIAL method from here : http://en.miui.com/thread-202290-1-1.html
- Minimal ADB+Fastboot drivers : http://forum.xda-developers.com/showthread.php?t=2317790
1. Installing drivers & initial setup
- On your PC, go to "Folder Options" and de-select "Hide file extensions for known file types"
- Install Minimal ADB+Fastboot drivers & restart your PC
- Make sure your phone's battery level is above 75%. Switch off your phone
- Copy the desired TWRP image file inside the Minimal Fastboot directory (C:\Program Files)
- Rename the TWRP as "twrp.img" Make sure the filename isnt "twrp.img.img"
- Hold "Power Button" & "Volume Down" button together & release both of them after "Fastboot" appears
- Connect the device to PC using USB cable
2. Flashing TWRP
- On your PC, go inside Minimal Fastboot folder directory. Hold shift and right click inside the folder
- Select "Open command window here" and type "fastboot devices" inside the command window.
- If everything goes right, your device should be recognized as "<serial number> <fastboot>"
- Type "fastboot flash recovery twrp.img" & press Enter. This will flash the TWRP in the recovery partition.
- Type "fastboot boot twrp.img" & press Enter. This will boot the phone in TWRP.
- If the language is in Chinese, select the right box, & select English.
- Uncheck "Keep System Read-Only" & Swipe to allow modifications.
3. Backup All Partitions
- Select "Backup" Option & select "Storage location" to external MicroSD card
- Select each & every partition & swipe to backup.
- After backing up, reboot to system.
- For additional saftey, copy the backup from MicroSD card to PC.
4. Flash Recommended TWRP
- After backup is complete you should switch to ZCX TWRP for best results
- Select "Install" Option & select "Flash Image" option
- Select Official TWRP / ZCX TWRP and swipe to flash
- After flashing go back, select "Reboot" and then select "Reboot to Recovery"
FLASHING MIUI/CM/AOSP ROM USING TWRP​Requirements:
- BOOOTLOADER : UNLOCKED Using OFFICIAL METHOD
- BACKUP : Full partitions backup
- TWRP : Use ZCX TWRP for best results
1. Rooting MIUI7/8 Lollipop ROM
- Boot To TWRP
- Flash Universal Boot Img Patcher Zip (Flash if using Official TWRP, else skip step)
- Reboot to System
- Boot to TWRP
- Backup Current ROM
- Flash SuperSU Zip v2.78
- Reboot To System
2. Rooting MIUI7/8 Marshmallow ROM
- Boot To TWRP
- Flash Lazy Flasher Zip (Skip step if using ZCX TWRP)
- Reboot to System
- Boot to TWRP
- Backup Current ROM
- Flash SuperSU Zip v2.78
- Reboot To System
3. Flashing MIUI7/8 Lollipop Recovery ROM
- Boot To TWRP
- Backup Current ROM
- Factory Reset
- Flash ROM Zip
- Flash Universal Boot Img Patcher Zip (Flash if using Official TWRP, else skip step)
- Reboot To System
3. Flashing MIUI7/8 Marshmallow Recovery ROM
- Boot To TWRP
- Backup Current ROM
- Factory Reset
- Flash ROM Zip
- Flash Lazy Flasher Zip (Skip if Using ZCX TWRP)
- Reboot To System
4. Flashing MIUI7/8 Xiaomi.EU ROM
- Boot To TWRP
- Backup Current ROM
- Factory Reset
- Flash ROM Zip
- Reboot To System
5. Flashing Official CM13 ROM
- Boot To TWRP
- Backup Current ROM
- Flash CM13 Firmware Zip
- Reboot to Recovery
- Factory Reset
- Flash ROM Zip
- Flash G-Apps 6.0 Zip
- Reboot To System
6. Flashing Official CM14.1 ROM
- Boot To TWRP
- Backup Current ROM
- Flash CM14 Firmware Zip
- Reboot to Recovery
- Factory Reset
- Flash ROM Zip
- Flash G-Apps 7.1 Zip
- Reboot To System
7. Flashing AOSP 7.x Nougat ROMs
- Boot To TWRP
- Backup Current ROM
- Flash Android N Firmware Zip
- Reboot to Recovery
- Factory Reset
- Flash ROM Zip
- Flash G-Apps 7.0/7.1 Zip
- Reboot To System
FLASHING MIUI ROM USING MIUI UPDATER APP​- This method does not require PC for flashing.
- We use the updater app present on the MIUI ROM itself to flash recovery ROM zip.
- Recovery ROM format : MIUI_DEVICENAME_MIUIVERSION_KEY_ANDROIDVERSION.ZIP
- Example : miui_HMNote3ProGlobal_V8.1.1.0.MHOMIDI_8e5f6f8e03_6.0.zip
Requirements:
- BOOTLOADER : LOCKED / UNLOCKED
- Recovery ROM : MIUI7/8 Stable/Beta : http://en.miui.com/download-301.html
- Stock : System, Boot Image, Recovery
- System : Unrooted
1. Flashing newer Global Stable version from older Global Stable version
i.e. MIUI 8.1.1.0 > MIUI 8.1.4.0
- All data will be preserved in this process, nothing will be wiped.
- Place the ROM zip inside internal storage
- Make sure battery level is above 75%
- Turn on WiFi / Cellular Data
- Open Updater App, select "Choose Update Package"
- Choose the ROM zip & select "Reboot and update"
- The update will take from 5-30 mins to install depending on the size
2. Flashing MIUI Global Beta version from Global Stable version
i.e. MIUI 8.1.1.0 > MIUI 6.12.15
- This process will wipe everything from your device, so take backup before proceeding.
- Place the ROM zip inside internal storage
- Make sure battery level is above 75%
- Turn on WiFi / Cellular Data
- Open Updater App, select "Choose Update Package"
- Choose the ROM zip & select "Reboot and update"
- The update will take from 5-30 mins to install depending on the size
3. Flashing newer MIUI Global Beta version from older Global Beta version
i.e. MIUI 6.12.9 > MIUI 6.12.15
- All data will be preserved in this process, nothing will be wiped.
- Place the ROM zip inside internal storage
- Make sure battery level is above 75%
- Turn on WiFi / Cellular Data
- Open Updater App, select "Choose Update Package"
- Choose the ROM zip & select "Reboot and update"
- The update will take from 5-30 mins to install depending on the size
4. Flashing Global Stable version from Global Beta Version
i.e. MIUI 6.12.15 > MIUI 8.1.1.0
- Unfortunately you cannot flash it using Updater-app
- You will have to use MiFlash Tool to flash fastboot ROM package
- This process will wipe everything from your device, so take backup before proceeding.
- Check out Section #3 for fastboot ROM package flashing using PC
RESTORING MIUI FIRMWARE (WIP)​
- We can restore to Stock MIUI firmware from a custom ROM or softbrick by flashing a fastboot ROM using MiFlash Tool
- This method flashes all partitions using stock images. Your entire phone will be restored to factory state.
- Fastboot ROM Format : CODENAME_IMAGES_MIUI-VERSION_BUILD-DATE_ANDROID-VERSION_REGION_KEY.tgz
- Example : kenzo_images_6.12.15_20161215.0000.00_6.0_cn_7f97e1f7a9.tgz
- There are 2 ways for flashing fastboot ROM
1. EDL : Emergency Download Mode (Qualcomm Only)
- It is low-level mode used for recovering the device when phone cannot boot into system, recovery and fastboot mode
- This mode can be used on LOCKED as well as on UNLOCKED bootloaders
- We can boot into EDL mode using ADB commands, Fastboot2EDL Method, Manual Method or Deep Flash Cable
- When your phone boots into EDL mode, the screen turns blank & LED light flashes continuously
- To exit EDL mode, hold the power button for 8-10 seconds till the device restarts
2. Fastboot
- Fastboot Mode is used to UNLOCK bootloader, flash images onto the partitions, recover the device when phone cannot boot into system, recovery mode.
- This mode can only be used on UNLOCKED bootloaders.
- We can boot into Fastboot mode using ADB commands or by using Manual Method.
- When your phone boots into Fastboot mode, the screen will show "Fastboot" text and "Mi Bunny" image.
- To exit Fastboot mode, hold the power button for 8-10 seconds till the device restarts or by typing "fastboot reboot" inside command window.
Requirements:
- PC : Windows 7 / 8 / 8.1 / 10
- Mi PC Suite : http://pcsuite.mi.com/
- Mi Flash Tool
Beta : https://drive.google.com/file/d/0B9wtW2KGOf0RRS1lZGgybVVnbms/view
01/04/16 : https://drive.google.com/file/d/0B9wtW2KGOf0RaERVZXFtaGxfZ2s/view?usp=drive_web
28/10/15 : http://bigota.d.miui.com/tools/MiPhone20151028.exe
1. Flashing Fastboot ROM using Emergency Download Mode (EDL)
2. Flashing Fastboot ROM using Fastboot Mode
WORK IN PROGRESS
_____________________________________
SUMMARY​
1. OFFICIAL UNLOCKED BOOTLOADERS users should use
Official TWRP
- If they plan on staying only on custom ROMs like CM14.1, AOSP
- Universal Boot Img Patcher / Lazy flasher needed after flashing MIUI ROMs
ZCX TWRP
- If they switch between MIUI & CM / AOSP ROMs
- Universal Boot Img Patcher / Lazy Flasher not needed after flashing MIUI ROMs
2. Just got a brand new Redmi Note 3 and wish to flash TWRP or a custom ROM?
STEP 1 : Verification
- Check the model : kenzo, kate, hennessy
- If kenzo, then proceed
- Verify if the installed ROM on your device is official MIUI ROM
- If NO, flash official MIUI ROM using MiFlash tool on PC via EDL mode
STEP 2 : Unlock Bootloader
- Apply for bootloader unlock
- Backup everything from internal storage, SMS, contacts etc.
- Unlock bootloader
STEP 3 : Flash TWRP
- Flash ZCX TWRP using fastboot mode using PC
- Backup all partitions using TWRP
STEP 4 : Flashing Custom ROM
- Factory Reset using TWRP
- Flash required files needed for the custom ROM
- Flash custom ROM zip
- Flash Google Apps zip
- Reboot to System
3. Follow the guides for recovering your device in case of softbrick/hardbrick, IMEI/EFS corrupt etc.
- Video Guide : Bootloader Unlock, Root, TWRP, Restore, Unbrick & ROMs : http://forum.xda-developers.com/redmi-note-3/how-to/video-redmi-note-3-bootloader-unlock-t3407003
- Flash/Unbrick On Locked/Unlocked Bootloader : http://en.miui.com/thread-235865-1-1.html
- Flash/Unbrick From HS USB 900E Mode : http://forum.xda-developers.com/redmi-note-3/how-to/unbricking-redmi-note3-hardbrickhs-usb-t3351325
- IMEI/EFS Repair : http://forum.xda-developers.com/redmi-note-3/how-to/flash-recover-efs-snapdragon-t3406789
CREDITS
TWRPs
Vibhor : Official TWRP
TheStrix : F2FS TWRP, CM Firmware
dadi11 : Unofficial TWRP
BY~XM : ZCZ TWRP
Cofface????? : Cofface TWRP
Rajdip : Safe TWRP v2
Alka121209 : Alka TWRP
PATCHES
Rajdip : Universal Boot Image Patcher
jcadduono : Lazy Flasher
Sudeep Duhoon : VoLTE Patch
*Moon- : RR 5.8.0 Fingerprint Fix
tank0412 : CM13 Front Camera Fix
banmeifyouwant : CM13 Radios & Security Fix
FIRMWARE
wmaster4g : Multi ROM Firmware
TheStrix : CM Firmware
Psy_Man : Android N Firmware
GUIDES
Tomsgt : Video Tutorial
Rajdip : Unbrick Guide
Muz_paray : Unbrick Guide
Archit9169 : IMEI/EFS Repair Guide
​
why after flashing alka recovery, we should again flash cofface? is alka recovery used for backup only? can we flash roms with alka recovery?
white FANNg said:
why after flashing alka recovery, we should again flash cofface? is alka recovery used for backup only? can we flash roms with alka recovery?
Click to expand...
Click to collapse
For official users you can flash other ROMs with Alka TWRP as well.
For unofficial users you must flash Safe TWRP v2 after Alka to avoid hardbrick if you flash MIUI ROM.
I am running now stocl global rom with officialy unlocked bootloader.
How can I flash Alka recovery to backup and install cm13? just use adb flash recovery?
Thanks for the initiative, can you explain more about the partitions.
What if one doesn't have all the partitions backed up and flashed custom rom ( CM 13)?
Also please include the current version of TWRP for respective recoveries.
nonyhaha said:
I am running now stocl global rom with officialy unlocked bootloader.
How can I flash Alka recovery to backup and install cm13? just use adb flash recovery?
Click to expand...
Click to collapse
fastboot flash recovery alkatwrp.img
mnsk said:
Thanks for the initiative, can you explain more about the partitions.
What if one doesn't have all the partitions backed up and flashed custom rom ( CM 13)?
Click to expand...
Click to collapse
Santhosh's CM13 zip based on M firmware has M boot loader. After flashing the zip your bootloader gets locked & gets updated to M boot loader.
So if you want to revert back to MIUI based on Lollipop you need to take backup of each & every partition using Alka TWRP, other TWRP wont work.
This restores the phone back to L boot loader & preserves IMEI.
All the links are updated to the latest versions of respective TWRPs.
SharkcpN said:
All the links are updated to the latest versions of respective TWRPs.
Click to expand...
Click to collapse
Can you also include them in the OP like official is on 3.0.2, alka on 3.0. Will be easier to keep track.
I think for officially unlocked bootloader the official TWRP should be used. You can flash the universal boot image patcher as a secondary ZIP if needed, and you can back up EFS with it
Hey all, I have successfully unlocked unofficially and flashed a alka via fastboot but I can't boot into recovery.
If I do adb reboot recovery it goes to a screen with a picture of my device which I assume is the stock recovery. If I reboot with Vol Up and Power I get the same thing. Any ideas? Thanks!
EDIT: I flashed "Safe TWRP v2" then Alka and it worked! Thanks OP
Nice information.
So the alka version is the best for official. Just want to know more:
1. Is that mean that backup/restore feature of cofface not backup all partitions?
2. Are there any differences between cofface and alka beside backup feature? Both seem not built from latest official twrp.
3. How about flashing (not restoring) other Rom from Santosh M Rom?
Thanks.
Sent from my Redmi Note 3 using Tapatalk
I installed alka version and it is in chinese, I am trying desperately to find a way to switch language, but all the guides online point to twrp theme manager, which does not work. any guide to change language from within twrp?
I flashed Cofface twrp also and the language is still in Chinese. there is no way to add some files somewhere to change the freakin' language?
Grantius said:
I think for officially unlocked bootloader the official TWRP should be used. You can flash the universal boot image patcher as a secondary ZIP if needed, and you can back up EFS with it
Click to expand...
Click to collapse
Yes you can use it too
Doublewise said:
Nice information. So the alka version is the best for official. Just want to know more:
1. Is that mean that backup/restore feature of cofface not backup all partitions?
2. Are there any differences between cofface and alka beside backup feature? Both seem not built from latest official twrp.
3. How about flashing (not restoring) other Rom from Santosh M Rom?
Click to expand...
Click to collapse
1. Yes, only Alka TWRP is capable of backing up & restoring all partitions including bootloader.
2. Alka TWRP backs up EFS (IMEI) partition as well, Cofface dosent. Rest all features are same.
3. For official unlocked users : You can flash any ROM using Alka TWRP.
Unofficial unlocked users : You must flash Safe TWRP v2 before flashing any ROM else it will lead to hardbricking.
nonyhaha said:
I installed alka version and it is in chinese, I am trying desperately to find a way to switch language, but all the guides online point to twrp theme manager, which does not work. any guide to change language from within twrp?
I flashed Cofface twrp also and the language is still in Chinese. there is no way to add some files somewhere to change the freakin' language?
Click to expand...
Click to collapse
Re-flash Alka / Cofface TWRP, you will be greeted by a chinese text. Click on the box on the right, select English & tick mark the box above slider & swipe it.
SharkcpN said:
Yes you can use it too
1. Yes, only Alka TWRP is capable of backing up & restoring all partitions including bootloader.
2. Alka TWRP backs up EFS (IMEI) partition as well, Cofface dosent. Rest all features are same.
3. For official unlocked users : You can flash any ROM using Alka TWRP.
Unofficial unlocked users : You must flash Safe TWRP v2 before flashing any ROM else it will lead to hardbricking.
Re-flash Alka / Cofface TWRP, you will be greeted by a chinese text. Click on the box on the right, select English & tick mark the box above slider & swipe it.
Click to expand...
Click to collapse
Alka and coface give an error, can't find en.xml in the zip.
nonyhaha said:
Alka and coface give an error, can't find en.xml in the zip.
Click to expand...
Click to collapse
Go to TWRP folder in the internal storage where you have installed Themes folder, delete the entire folder.
....i lost the L boot loader...
...good afternoon...
...i flashed shantosh's rom without taking backup...
...so, i lost the stock L bootloader...
...now i see the M bootloader with cyanogenmod logo...
...it's not a problem since i flashed a lot of cm based roms, and some miui roms also, with this M bootloader...
...but i want the official bunny bootloader back...
...how can i restore it back ?
...flashing with mi flash tool maby ??
Thanks for this post cos this finally clears up my confusions.... And well I suppose Cofface is good because rooting after updates is easy....But just one question....Exactly how do I install OTAs? It seems I cant install the small 150mb ota files so I have to install the fastboot rom...But do I have to wipe system before that? Because I tried flashing 7.3.6.0 update (fastboot rom 1.1gb) without wiping system and its still showing me on 7.3.5.0.... So what exactly is the method before applying OTAs?
anshulratchet said:
Thanks for this post cos this finally clears up my confusions.... And well I suppose Cofface is good because rooting after updates is easy....But just one question....Exactly how do I install OTAs? It seems I cant install the small 150mb ota files so I have to install the fastboot rom...But do I have to wipe system before that? Because I tried flashing 7.3.6.0 update (fastboot rom 1.1gb) without wiping system and its still showing me on 7.3.5.0.... So what exactly is the method before applying OTAs?
Click to expand...
Click to collapse
You need to use recovery ROM, not fast boot.
And how to move from unofficially unlocked bootloader to official unlocking?

[Recovery][Lenovo P2][P2a42] Official TWRP for the Lenovo P2 (3.2.2-0)

Team Win Recovery Project 3.2.2-0
This is for the Lenovo P2a42 only! Do not flash on the Lenovo P2c72!
WARNING: Rooting The Lenovo P2 with SuperSu currently works only in System-Mode, which prevents you from installing OTA Updates!
INFO: Follow the full rooting steps below, in order, to allow system modifications!
WHAT IS TWRP?
Oh come on, you know what it is - don't try to fool me!
In case you're serious, though...
Team Win Recovery Project is a custom recovery for Android devices.
It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device.
Read more about TWRP here: https://twrp.me/about/
DOWNLOAD
You can find the Official Download here (Version: 3.2.2-0): recommended!
https://goo.gl/UbHbkr
You can find the Pre-Official Download here:Currently no Pre-Official!
See Post #3
This is the download link, for instructions on how to flash it, see below.
You can find up to date fastboot & adb binaries here!
FULL STEPS FOR OBTAINING ROOT
Follow these instructions until someone nice comes along and makes a video from them (without ads):
Extract/ install adb & fastboot to your computer.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download TWRP for Lenovo P2 (P2a42).
In your ROM, go to Settings -> About device. Tap 8 times on Build number to enable Developer options.
Now go to Settings -> Developer options. (above About device)
You need to enable OEM unlock, otherwise you might end up with boot problems or be unable to flash later on.
Once you tap the unlock the bootloader it will ask you to formally submit the request, when you accepted the void warranty thing you will have to wait 14 days.
After 14 days . Reboot your device into fastboot mode. To do this, (adb reboot-bootloader) or select reboot from the power menu and hold the [Volume Down] + [Power] buttons while your device reboots or boots from power off.
Once you're in fastboot mode, you need to unlock your bootloader. To do this, run this command:
fastboot oem unlock
WARNING: Unlocking your bootloader will erase all userdata on the device! Your device will be completely reset to factory defaults!
Once your bootloader is unlocked, you're ready to flash TWRP. To do this, run these commands in order:
fastboot flash recovery twrp.img
fastboot boot twrp.img
At this point, you will reach the screen asking you if you want to allow system modifications.
By swiping right, you will trigger system modifications for TWRP and TWRP will be installed permanently!
If you are going to root your device and follow the rest of these steps, then it is safe to swipe right and enable modifications.
If your device asks for a password to mount internal storage, and your password doesn't work or you haven't set one, see below under known issues for a fix!
If you want to be rooted see Post #2:
UPDATING TWRP
To update TWRP, simply download the new twrp.img on your phone, then boot into your current TWRP and flash it.
To flash a twrp.img, navigate to [Install] -> [Flash Image] -> select your twrp.img -> [x] Recovery -> Flash!
After that, just use [Reboot] -> [Recovery] to reboot into the updated TWRP.
CHANGES
v3.0.3-0 (beta) - Initial public beta v1 release.
v3.0.3-0 (beta) - public beta v2 release.
- Enable double-tap to wake in recovery
- Fixed MTP Issues
v3.0.3-0 (Official) - public release.
- fix device name for update.zip's
3.1.1-0 (Official) - Official release.
- Completely rebased on Nougat
- Included OTA support.
3.1.1-1 (Official) - Official release.
- Fix "Format Data" when using default (f2fs)
- Enabled OTA support.
3.2.1-0 (Official) - Official release.
- TWRP base Android 8.1
3.2.2-0 (Official) - Official release.
- TWRP 3.2.2-0 build
FEATURES
MTP support
USB OTG storage support
Hardware Qualcomm-based full-disk encryption support
f2fs file system support (read, write, format, backup & restore)
exFAT file system support (read, write, format)
ADB root
Full SELinux support
Built in android 8.1 tree
KNOWN ISSUES
SuperSU will only work by default in System-Mode because the data partition is F2FS! (by default from Lenovo)
SuperSu's Systemless Mode will work when the data partition is changed to EXT4!
DECRYPTION NOT WORKING?
If your device isn't decrypting in TWRP, chances are you set a boot up password.
You can solve this by disabling your boot up password in your device OS's settings.
By disabling your password your OS will rewrite your crypto key to be compatible with TWRP and TWRP will decrypt with the default password.
WHY DOES F2FS MAKE TWRP SO SLOW?
When TWRP boots up or wipes partitions and a few other scenarios, it checks each partition to see how much disk space is used. Ext4 handles disk usage calls quite efficiently and will finish this very fast. F2FS on the other hand is very slow when it comes to checking disk usage. We're unsure why this is. Every file on the F2FS formatted partition adds a little more time, and a device that is 30 GB full could take up to 10 minutes to boot TWRP!
I suggest switching your data partition to ext4 - all the f2fs hype is merely from benchmarks that don't actually represent real world use (ie. you're not writing thousands of files per second)
For someone who doesn't do lots of write access to their data partition, ext4 can actually be advantageous (it has faster access times and reads!)
CONTACT & SUPPORT
You can find TeamWin on IRC at #twrp on chat.freenode.net.
You can also post in this thread and I will attempt to answer any questions you may have.
SOURCE CODE
TWRP: https://github.com/omnirom/android_bootable_recovery (android-7.1)
Device tree: https://github.com/Celoxocis/android_device_lenovo_kuntao_row (android-7.1)
CONTRIBUTIONS
Gerrit for TWRP: http://gerrit.omnirom.org/
Gerrit for officially supported devices: http://gerrit.twrp.me/
XDA:DevDB Information
Team Win Recovery Project for the Lenovo P2, Tool/Utility for the Lenovo P2
Contributors
celoxocis, Maintainer & Developer
Gilotto, Closed Beta Tester
HaJeeEs, Closed Beta Tester
Version Information
Status: Official
Current Official Version: 3.2.2-0
Official Release Date: 2018-07-07
Created 2016-01-07
Last Updated 2018-07-07
Download Counter:
Initial Beta Release v1: 57
Initial Beta Release v2: 20
Official Version: It's Over 5000!
So you are generation Y? too much to read or you don't real at all? Prefer a video? Head over to Youtube!
Video Tutorials on Youtube for Systemless Mode ROOT METHOD
How to ROOT LENOVO P2 | Install TWRP Recovery | Works on Marshmallow Only
How to ROOT Lenovo P2 with Android Nougat | Lenovo P2 Root Tutorial
Thanks to TechXplicit
You don't like command lines? Prefer to click your way through life? Take a look at the Lenovo P2 Root Tool! Head over to Youtube!
Lenovo P2 Root Tool!
Thanks to Varun Sai
----- General Information -----
All donations which are send to me (TWRP appreciation donations)
Will be put forward to support the Official LineageOS development.
Donation Link, please see my signature!
Official TWRP vs LineageOS TWRP
I am on Lenovo's STOCK ROM! All i want is root with STOCK ROM! I don't care about treble! Is this version for me?
YES!!!
I hate the Lenovo STOCK ROM! I want LineageOS Official and root! I want treble and Magisk! Is this TWRP version for me?!
NO!!! Why? Please read this!
Confirmed and working ROOT methods!
Up-to-date: For root with Nougat please use phh's supersu
Use version 2.59 from here
Install phh's SuperUser in the Play Store
to manage root access of apps.
Simply flash it and enjoy.
--------------------------------
If you prefer Magisk:
Prio to installing Magisk you will have to change the data partition from F2FS to EXT4 because the Lenovo Kernel is missing an F2F2 feature.
How to format data to EXT4:
Make sure while the first time you boot TWRP.
You "KEEP SYSTEM in READ ONLY MODE" by clicking "Keep Read Only"
then Go to:
Wipe>Advanced Wipe>Select "Data">Repair or Change File System>Change File System>EXT4
Install Magisk
and once you booted up the system install Magisk manager.
Proof that Magisk works see attachment!
too much to read? Prefer a video? Head over to Youtube!
Video Tutorials on Youtube for Systemless Mode ROOT METHOD
How to ROOT LENOVO P2 | Install TWRP Recovery | Works on Marshmallow Only
How to ROOT Lenovo P2 with Android Nougat | Lenovo P2 Root Tutorial | Works on Nougat!
Thanks to TechXplicit
You don't like command lines? Prefer to click your way through life? Take a look at the Lenovo P2 Root Tool! Head over to Youtube![/SIZE]
Lenovo P2 Root Tool!
Thanks to Varun Sai
--------------------------------
Outdated Root Method for Marshmallow ONLY:
Here is for confirmed and working ROOT METHODS !!! Marshmallow ONLY !!!
(FOR SYSTEM MODE ROOT ONLY!)
download this pack https://goo.gl/KFtyzl
and extract its content into the adb&minimal fasboot folder
enter TWRP
do
Code:
adb push dot.supersu /data/.supersu
Select "ADB Sideload" in TWRP menu, (Advanced>ADB Sideload) make sure to select "Wipe Cache" and
Swipe to to Start Sideload and use following command to push SuperSu files.
Code:
adb sideload SuperSU.zip
Reboot into System. Done!
--------------------------------
FOR SYSTEMLESS MODE ROOT ONLY: (preferred method!) !!! Marshmallow ONLY !!!
As i stated in the Opening Thread. SuperSu can not be installed in Systemless-Mode by default because by default the /data partition is formated in F2FS.
More detailed explanation here: here
The current workaround is to disable the encryption (fully optional) and wipe the /data partition and format the /data partition to EXT4, which is also supported by the boot.img (thank you Lenovo!) and install SuperSu in Systemless-Mode. EXT4 formatting can be done through the "advanced wipe" of TWRP.
It has been tested and confirmed working. The main advantage is working OTA due to systemless SuperSu. As the OTA doesn't care if /data is actually F2FS or EXT4. Lenovo was so kind to provide both options in the stock boot.img.
Factory Images for P2a42 Marshmallow/Nougat & TWRP Test Image & Kernel Sources
Q: I messed up help me?! :crying:
So you screwed up and didn't follow Rule Number One in the IT-Handbook?
Which is: Always create a backup before working on a system?
(FACTORY IMAGES FOR Marshmallow ONLY!)
Warning! Following images are all confirmed working for the P2a42!
Do NOT attempt to use it on the P2c72 it will brick your device!
If you need an P2c72 factory flasher version! Let me know i will provide you with one!
Download the Factory State Images for Marshmallow. Which are all flashable with fastboot: https://goo.gl/JTCwKj
Place the files you want replaced into the "Minimal ADB & Fastboot" installation directory and start it's shell:
If you want to flash back the stock recovery. Simply run:
Code:
fastboot flash recovery recovery.img
You can also replace all partitions if required.
There is an flashall.bat file in the SW directory. Run it in case you want to restore all partitions.
But i highly recommend to replace just the partition you messed up. In most cases it will be boot,recovery or system.
One exception would be if you want to upgrade from an Old Firmware and you simply do not receive any OTA update files.
In that case you want to run a complete upgrade by running the flashall.bat file.
(FACTORY IMAGES FOR Nougat ONLY!)
Warning! Following images are all confirmed working for the P2a42!
Do NOT attempt to use it on the P2c72 it will brick your device!
If you need an P2c72 factory flasher version! Let me know i will provide you with one!
Download the Factory State Images for Nougat. Which are all flashable with fastboot: https://goo.gl/b7Dx37
too much to read? again?! do you ever read?
don't worry TechXplicit got you covered!
Head over to Youtube!
Lenovo P2 STOCK Firmware | Restore Bootlooped Lenovo P2 | How to get back to OTA updates
Thanks to TechXplicit
--------------------------------
Pre-Official TWRP Images:
TWRP 3.2.2-0 (latest version)
Currently no Pre-Official.
Q: Why Pre-Official?
A: It's is an "canary build" meaning, in test phase before it gets pushed Official but it is fully tested on Marshmallow and Nougat. Even confirmed working for the P2c72.
--------------------------------
Lenovo P2a42 Kernel Sources for Marshmallow/Nougat:
Official Lenovo Download Link
Great work,
Now only an seperate forum :laugh:
Shall i request it?
wimmetje said:
Great work,
Now only an seperate forum :laugh:
Shall i request it?
Click to expand...
Click to collapse
No need to I will request one once I upload all sources and pushed TWRP Official.
As a reminder! Always create a backup of the boot and system partition (as image!) before installing anything to stay save!
celoxocis said:
Small Update: DO NOT Flash the latest System-Mode SuperSU. It was reported to cause a bootloop on the Lenovo P2. Stick with Version 2.76!
As a reminder! Always create a backup of the boot and system partition (as image!) before installing anything to stay save!
Click to expand...
Click to collapse
I was to fast! I installed version 2.79. I reinstalled version 2.76, but it wont boot Any idea how I can fix it? Of course I'm an idiot who didn't make a back up.
BDM101 said:
I was to fast! I installed version 2.79. I reinstalled version 2.76, but it wont boot Any idea how I can fix it? Of course I'm an idiot who didn't make a back up.
Click to expand...
Click to collapse
Look for "Unsu" script here in the forum. It will take you out from the bootloop.
celoxocis said:
Look for "Unsu" script here in the forum. It will take you out from the bootloop.
Click to expand...
Click to collapse
Thx!!!! That worked
Updated Post #2 here https://forum.xda-developers.com/showpost.php?p=70435635&postcount=2
for confirmed and working Root Method!
Fantastic! Is possible to have a separate forum for the p2?
celoxocis said:
Updated Post #2 here https://forum.xda-developers.com/showpost.php?p=70435635&postcount=2
for confirmed and working Root Method!
Click to expand...
Click to collapse
If I want to sideload the zip file, I got the error "error: no devices/emulators found". But for everything else ADB works.
Dagnelino said:
Fantastic! Is possible to have a separate forum for the p2?
Click to expand...
Click to collapse
It will be requested by the topic starter when twrp will be officiall
BDM101 said:
If I want to sideload the zip file, I got the error "error: no devices/emulators found". But for everything else ADB works.
Click to expand...
Click to collapse
It think you need the latest adb version for it to work. Closed Beta Testers confirmed adb sideload as working.
celoxocis said:
It think you need the latest adb version for it to work. Closed Beta Testers confirmed adb sideload as working.
Click to expand...
Click to collapse
I tried the default adb version in Fedora 25 and the latest one from https://forum.xda-developers.com/showthread.php?t=2317790 in a vm, but non of them work.
I guess I'm gonna be root-less for a while
BDM101 said:
I tried the default adb version in Fedora 25 and the latest one from https://forum.xda-developers.com/showthread.php?t=2317790 in a vm, but non of them work.
I guess I'm gonna be root-less for a while
Click to expand...
Click to collapse
I don't know about the Linux based adb. Testers used Windows as hosts.
celoxocis said:
I don't know about the Linux based adb. Testers used Windows as hosts.
Click to expand...
Click to collapse
I also tried it on windows (a windows 10 virtual machine) with "Minimal ADB and Fastboot" version 1.4.2 and still wont work.
BDM101 said:
I also tried it on windows (a windows 10 virtual machine) with "Minimal ADB and Fastboot" version 1.4.2 and still wont work.
Click to expand...
Click to collapse
I don't think it works on a virtual machine because of the USB passthrough. I know that ADB sideload works as it was confirmed by the Testers.
Instead of using sideload. Try by placing the SuperSu.zip onto the internal storage /data. And select the zip for install.
celoxocis said:
I don't think it works on a virtual machine because of the USB passthrough. I know that ADB sideload works as it was confirmed by the Testers.
Instead of using sideload. Try by placing the SuperSu.zip onto the internal storage /data. And select the zip for install.
Click to expand...
Click to collapse
Still in a bootloop. Maybe the "UnSu" script isn't deleting everything? (it boots when I run the script)
BDM101 said:
Still in a bootloop. Maybe the "UnSu" script is't deleting everything? (it boots when I run the script)
Click to expand...
Click to collapse
It depends on how often you tried to install SuperSU. It will revert all changes when you run SuperSu once. If you tried it more than once then the backup folder will overwrite the data with already patched data.
Grab the stock images packages from post #3 and extract it's content.
No need to restore all the partitions.
Just open up the *.Bat file and look for the command that says "fastboot flash boot boot.img" and the parts that say "fastboot flash system systemchunk*" and run those in fastboot shell.
You will be back to stock without losing any of your data.
Then try again with the confirmed method in post #2. Just make sure you create a backup of boot and system (as image!) In case you need to restore. Let's say for applying an OTA.

Newb needs help rooting, unlocking Bootloader and getting a Custom ROM for ALE-L21

Hey there,
I need help, hope you have some for me . I want to use the 6.0.1. OpenKirin OmniROM on my phone and struggle even figuring out a way to get there.
I just bought a used ALE-L21 DualSIM phone with the B602 Build and EMUI 4.0.3 installed. The device is not rooted, nor has its bootloader been unlocked. The EMUI update service does not offer me any patches.
Could someone please line out to me which steps I have to take in order to root my ALE-L21 and get this ROM to work?
Disclaimer: No, I'm not just a lazy moron who does not want to read other topics on this forum - I'm a mere user with less-than-average knowledge of Android development or stuff like that. And I just can't make complete sense of the various posts I've found, since English is not my mother tongue and there seems to be a whole bunch of ways to do certain things with a phone. Well, since obviously I don't want to brick my new phone, I'm not too sure how to best puzzle together the pieces this Forum offers me. It would be insanely helpful if I could get a list that reads out something like:
1. Action - Source (for needed files, e.g.) - Result, on to step 2
2. Action - Source (for needed files, e.g.) - Result, on to step 3
3. ... and so on...
Okay, just so you see that I'm not entirely lost, I'm gonna show you the picture which is currently in my mind.
From what I understand so far, there's the following steps to get there (please rectify or rearrange steps as far as needed):
1. Update the device to Vanilla EMUI 4.1, Build B895 or B896 (I am currently downloading the B896 Build from this forum - which one is recommended? My phone is DualSIM)
2. Unlock Bootloader (What's the best way to do it? Huawei CS? Heard it's not even sure you get an answer. DCUnlocker? Wants money... Please help me clarify)
3. get TWRP 3.1.1.0 (I already have the IMG file, how do I get it to run on my phone?)
4. Root the device (I'd like to go with MAGISK, does anyone have a link for a MAGISK build confirmedly working on ALE-L21?)
5. Do some magic with TWRP (Which steps exactly?)
6. Flash the ROM Zip file via TWRP
7. Flash Gapps via TWRP
Is that about it?
As I said, please feel free to add to/adjust my list!
Thanks in advance,
Pako
If you haven't already install minimal adb tools on computer (windows) found here :
http://bit.ly/2jxX4ya
You then need to unlock bootloader using minimal adb tools and the unlock code
Unlock Code:
http://bit.ly/2z9EFhV
Unlock Bootloader Method in this thread here:
http://bit.ly/2oIASBs
After you are done unlocking the bootloader
Install twrp find that here :
http://bit.ly/2ok9BTi
There was a tool that was here somewhere to install twrp but I will link to my copy here
http://bit.ly/2ATBgRP
What you do is put the twrp image file in data folder
then change the name of the twrp file to TWRP_3.1.1-0_ALICE.img or
edit the install.bat file line data\fastboot.exe flash recovery data\TWRP_3.1.1-0_ALICE.img to the name of your twrp file
Once twrp is installed then you can pick which rom you want
The 6.0 roms arent going to be supported anymore so i suggest going for 7.0 ROM
I'm on AOSPA which is the cleanest and has good battery life
To install 7.0 rom you need B895 or B896 found here on the first post:
http://bit.ly/2jypIij
this is installed through twrp (which is accessed when Phone is off by holding volume up + power then let go once it vibrates or connect the phone to the computer and then type adb devices then adb reboot recovery in minimal adb tool)
once in twrp you need to install the B895.zip or B896.zip file then reboot your phone will boot into emui
you need to install twrp again as B895 or B896 wipes it
After installing twrp you can then install any custom rom of your choice
let the rom boot and then go back into twrp and install gapps found here: "http://bit.ly/1JOWjUqi recommend nano or even pico pick am64 7.1
I would also recommend installing Galactic forced deepsleep http://bit.ly/2ANVdbS
Hey there,
thank you very, very much for your comprehensive walkthrough! (Almost*) everything worked to perfection and I am now a happy user of OpenKirin's OmniROM 6.0.3. mod! Yeah, no 7.x... but I'd prefer to wait with that until the "issues" section of AOSPA does not contain any relevant things anymore. OmniROM seems to have no issues anymore, so I'm content with my choice. I will now follow your last advice and flash the Deep Sleep Mod to improve my device's battery life, and then I'm just happy.
* = The only issue I encountered was when having flashed TWRP, the device booted to the crappy EMUI eRecovery instead of TWRP. I solved this issue using this advice from another thread.
So, once again, thank you! All you xdaDevs, keep on developing ways to improve people's lives with their android devices!
Cheers,
Pako

[SHARED][TWRP][UNOFFICIAL 4pda version] for Mi A2 (jasmine_sprout) by d4e8ede8f1f2

Since Official TWRP as of 2019-06-19 still does not support decryption of PIE /data partition, I decided, on behalf of developer of Unofficial TWRP 4pda version MOD EDIT: LINK REMOVED d4e8ede8f1f2 and with his approval, to present his project here.
The version being presented is a branch of Team's Win Recovery Project 3.x, based on Android One Pie kernel, and is licensed under the GPL (version 2) license agreement.
Neither developer nor OP creator (translator from Russian) are responsible for any harm to electronic devices or financial losses inflicted with improper usage of this software.
Proceed on your own risk.
Please get acquainted with Team Win Recovery terms and usage.
Sources:
OMNI TWRP repository..
TWRP Device configuration for Xiaomi Mi A2.
Developer forum (4pda, in Russian):
MOD EDIT: LINK REMOVED
Downloads (Google Drive):
TWRP 3.3.1-5 jasmine_sprout unofficial (2019-06-29)
Note 1: TWRP Image cannot be uploaded to local repository as a single archive due to xda limitations on file size, thus dev's Google Disk is used;
Note 2: This thread is somehow not thanked and thus is periodically drowning below other less-functional TWRP clones; do not hesitate to promote the product after successful usage, - it is for free.
Features :
1. Pie-based kernel with full decryption support for stock Androids 9 and 10:
- in case Mi A2 is not locked by PIN, password or graphic key, decryption and mounting of /data partition is made automatically,
- otherwise appropriate unlocking sequence is to be made by user in TWRP loaded into phone.
2. Slot (A/B) switching works.
3. MTP / ADB sideload and USB OTG read/write work.
4. All variants of MiA2 screen panels are correctly supported (no "black screen" bug).
5. In current version /system partition is mounted as "/system" (not as "/system_root") to comply with script of OpenGApps installer.
Usage Notes:
- Mi A2 must be fully unlocked to use TWRP; "Usb-debugging" must be switched on in phone; see Guides in this forum;
- ADB / fastboot must be properly installed and approved in phone; (see Platform tools, - r29.0.1 as of 2019-06-08, - and Guides in this forum);
- recommended booting sequence
Code:
adb devices -l
adb reboot bootloader
fastboot devices
fastboot boot twrp-3.3.x-x-jasmine_sprout-unofficial.img
1st command lists attached devices supporting ADB interface, and is used to check that phone is connected properly and that no other devices are connected. simultaneously, - read result in CMD. Most of ADB commands need "USB debugging" in ON state. If issued for the 1st time from this PC, will rise a prompt on phone, - need to approve.
2nd command reboots phone into bootloader, - wait till phone shows fastboot screen.
3rd command lists attached devices supporting fastboot interface., - read result in CMD and ensure it shows same signature as was displayed after 1st command in ADB.
4th command boots TWRP into phone.
Example 1 (pull camera photos directory):
1. boot into TWRP (do not forget to unlock TWRP and thus decrypt /data if phone is secured by PID or other method);
2. type "adb pull -a /sdcard/DCIM/" in CMD shell in platform-tools dir of PC - to save all photos to current dir.
Example 2 (pull current /boot image to PC ):
1. Boot into TWRP;
2. To learn which slot is active, see "Reboot" page in TWRP
(another way is to switch phone to bootloader mode and type "fastboot getvar current-slot" in CMD in platform-tools folder in PC).
3. in CMD shell in platform-tools dir of PC type:
- if active slot is A: "adb pull /dev/block/mmcblk0p62 ./boot_a.img";
- if active slot is B: "adb pull /dev/block/mmcblk0p63 ./boot_b.img";
Example 3 How to re-flash /persist partition using TWRP and ADB commands' script
How to install TWRP as permanent one:
As stock Mi A2 ROM comply to GSI A/B slots partitioning scheme, there is no /recovery partition, and thus no place for TWRP to be successfully flashed via fastboot (or MiFlash).
If you use "fastboot flash twrp-3.3.x-x-jasmine_sprout-unofficial.img" command, you will just substitute content of /boot_X partition with TWRP in current slot X, thus spoiling ROM, which is obviously not what you've intended.
If you want to embed TWRP into phone permanently instead of stock recovery:
- boot into TWRP, and then
- install "twrp-installer-3.3.1-5-jasmine_sprout-unofficial.zip" via booted TWRP;
- this installation will patch /boot image (similar to how MagiskManager patches /boot image to embed Magisk).
Custom ROMs usually have a custom recovery (mostly various TWRP builds) embedded into boot image from scratch, you may opt to substitute such with this one.
Update 2019.06.24:
Code of PBRP by @Manish4586, has been updated today to sources of TWRP fixes by MOD EDIT: DOWNLOAD LINK REMOVED
Update 2019.09.12:
I beg everybody (and 1st of all d4e8ede8f1f2) pardon for postponing update of this thread, since improved version 3.3.1-5 was available as of 2019.06.29.
Changes in 3.3.1-5:
1. new kernel v. 4.4.184 based on official MiA2 Pie kernel;
2. Merging with official TWRP code changes:
2.1. Fix compilation in android-9.0 repos.
2.2. Properly localized string instead of using English.
2.3. ext4crypt: support synthetic keys v3 on May update
Notes from d4e8ede8f1f2 on decryption in 3.3.1-5:
This version supports decryption of data partition encrypted in FBE (File-Based Encryption, introduced since Android 7) scheme only, as being used by stock MiA2 ROMs.
This {limitation} became deficiency since some custom ROMs, e.g. AEX, implemented older and stiffer FDE (Full Disk Encryption, introduced in Android 5) scheme.
One can check which encryption scheme is implemented in current ROM, for example, issuing ADB command: "adb shell getprop ro.crypto.type". Replied "file" means FBE, while "block" means FDE.
hii!
im at 3.2.3.0 with RR pie atm, may i just use the installer.zip after flashing my rom?
then setting the other slot and reboot recovery to there, installing opengapps and magisk, yeah?
i mean, without flashing the .img
ty!
Gesendet von meinem MI A2 mit Tapatalk
worked perfect, ty!!!
Gesendet von meinem Mi A2 mit Tapatalk
Is it possible to use this version of TWRP to encrypt my phone? Currently, I am using havoc OS. If I try to encrypt from system settings in the normal way it does not work (simply reboots with no change).
I was thinking perhaps I could flash stock OS, encrypt phone from system settings, flash your custom TWRP and then use it to flash custom OS. Hopefully that would maintain encryption and I would not have to wipe system and data and unencrypt?
As far as I know. no custom ROMs support encryption yet. Although your question in "Havoc OS" thread was not answered, you could use search in this thread, which would show you latest answer from OP on this issue: https://forum.xda-developers.com/showpost.php?p=79826439&postcount=1347
Bonjour,
On wich partition do I install Recovery ?
I just want to flash PBR and magisk root on stock rom.
With stock ROM you cannot {flawlessly} flash TWRP, just boot into it via fastboot and make backups, pull system images (for example, pull current stock boot image to PC for patching it in Magisk in phone and thus getting root), etc., etc.
To install Magisk and get permanent root on stock you do not need TWRP at all, if you can fetch stock boot image downloading it from here or taking from stock ROM fastboot-image. Please carefully read Guides here on how to get root,
As for custom ROMs, these usually already have a TWRP in their boot images, but anyway go to the thread dedicated to selected custom ROM and carefully read OP instructions.
See IMPORTANT NOTICE added to OP
Aerobatic said:
With stock ROM you cannot {flawlessly} install TWRP, just boot into it via fastboot and make backups, pull system images (for example, pull current stock boot image to BB for patching it in Magisk in phone and thus getting root), etc., etc.
To install Magisk and get permanent root on stock you do not need TWRP at all, if you can fetch stock boot image downloading it from here or taking from stock ROM fastboot-image. Please carefully read Guides here on how to get root,
As for custom ROMs, these usually already have a TWRP in their boot images, but anyway go to the thread dedicated to selected custom ROM and carefully read OP instructions.
Click to expand...
Click to collapse
Merci beaucoup for your answer.
If I have good understood ,Ishould not install custom recovery but I Can install magisk via adb sideload ?
I try Havoc rom but I had a lot of bugs ...
bancelin said:
... Can install magisk via adb sideload ?I try Havoc rom but I had a lot of bugs ...
Click to expand...
Click to collapse
I've already written to you that TWRP is not needed to get root, and recommended to read Guides, Why should I (or anybody else) type here content of already published Guides?
Read this: https://forum.xda-developers.com/mi-a2/how-to/unlock-bootloader-n-root-magisk-easy-t3856800
Find (please be informed "Search this forum" in the upper right corner of the window really works in XDA) stock and/or patched boot image for the version of stock ROM you want to root. Images for 10.0.13.0 are here: https://forum.xda-developers.com/showpost.php?p=80065352&postcount=7, stock boot image for patching with Magisk can also be taken (as I have already written) from corresponding stock fastboot image: https://forum.xda-developers.com/mi-a2/how-to/fastboot-xiaomi-mi-a2-fastboot-images-t3824849.
Nobody will do your homework for you.
Updated header with info on and links to twrp-3.3.1-5-jasmine_sprout-unofficial
Aerobatic said:
Update 2019.09.12:
[...]
1. new kernel v. 4.4.184 based on official MiA2 Pie kernel;
2. Merging with official TWRP code changes:
2.1. Fix compilation in android-9.0 repos.
2.2. Properly localise string instead of using English.
2.3. ext4crypt: support synthetic keys v3 on May update
Notes from d4e8ede8f1f2 on decryption in 3.3.1-5:This version supports decryption of data partition encrypted in FBE (File-Based Encryption, introduced since Android 7) scheme only, as being used by stock MiA2 ROMs.
This {limitation} became deficiency since some custom ROMs, e.g. AEX, implemented older and stiffer FDE (Full Disk Encryption, introduced in Android 5) scheme.
One can check which encryption scheme is implemented in current ROM, for example, issuing ADB command: "adb shell getprop ro.crypto.type". Replied "file" means FBE, while "block" means FDE.
Click to expand...
Click to collapse
I am running AEX (v6.7) and my encryption scheme is "FDE". So I needed to run v4?
But neither v4 nor v5 works with this ROM.
MMN said:
.... So I needed to run v4?...(
Click to expand...
Click to collapse
No, v5 is better than v4, except it still does not support legacy FBE encryption.
I meant that the developer of This TWRP just wrote comments on legacy FBE encryption while releasing 3.3.1-5, probably being asked by someone about this issue. As he have not released newer version in 4 months, probably nobody else asked him to. His 4pda-mail is in the 1st paragraph of OP, so you can try to ask him to help.
Aerobatic said:
No, v5 is better than v4, except it still does not support legacy FBE encryption.
I meant that the developer of This TWRP just wrote comments on legacy FBE encryption while releasing 3.3.1-5, probably being asked by someone about this issue. As he have not released newer version in 4 months, probably nobody else asked him to. His 4pda-mail is in the 1st paragraph of OP, so you can try to ask him to help.
Click to expand...
Click to collapse
Thanks for the answer!
But maybe a demand is not necessary. Which ROM do you use? Stock or Custom?
Maybe my installation steps are wrong:
I currently installed AEX (Pie) with official TWRP installer (zip). After slot change, I installed GApps and Magisk.
If I encrypt my system (settings - security - encryption), then I can not access /data with official TWRP (because it can not decrypted).
If I flash your v4/v5-TWRP via "fastboot flash boot trwp-v4|v5.img" a decryption does not work also.
If my doing is correct, I will contact the developer at pda.
MMN said:
...Which ROM do you use? Stock or Custom? ... If my doing is correct, I will contact the developer at pda.
Click to expand...
Click to collapse
I'm on rooted stock.
Yes, you can ask d4e8ede8f1f2. But IMHO, as it is obviously the problem of AEX (I mean, - using legacy encryption, - as usual problem of most of other custom ROMs is - not using any encryption at all), - you'd better search for solution in AEX-dedicated theads.
Aerobatic said:
Since Official TWRP as of 2019-06-19 still does not support decryption of PIE /data partition, I decided, on behalf of developer of Unofficcial TWRP 4pda version d4e8ede8f1f2 and with his approval, to present his project here.
Click to expand...
Click to collapse
Hello Aerobatic, I'm interested to find a way to backup my personal data, personal apps and their settings, etc. not so interested in Android and it's setting as much, then later be able to restore the backup onto the phone after a fresh install. Would I be able to use this version of TWRP to do that on Android Pie (Android One) for my Mi A2?
I've not found a solution yet to do this and it gets rather tedious to have to enter all the apps, settings, etc. from scratch each time.
nadia p. said:
Hello Aerobatic, I'm interested to find a way to backup my personal data, personal apps and their settings, etc. not so interested in Android and it's setting as much, then later be able to restore the backup onto the phone after a fresh install. Would I be able to use this version of TWRP to do that on Android Pie (Android One) for my Mi A2?
Click to expand...
Click to collapse
Have you tried to backup /data to attached USB-OTG "drive"?
Aerobatic said:
Have you tried to backup /data to attached USB-OTG "drive"?
Click to expand...
Click to collapse
I never knew what a "USB-OTG" drive was until I looked it up. In the past I had a USB-micro to USB-B cable that I used on my previous Google/Nexus phone but I don't own one of these cables (USB-C to USB-B) to connect to Mi A2.
I was trying to see if there was a way to do this over wi-fi or bluetooth directly to a computer. Or somehow through ADB push/pull commands. But I've not found a good solution yet. I've just transferring the data manually from the phone to the computer for now. I'll look into purchasing one of the cables and trying to backup that way using your version of TWRP.
nadia p. said:
..I was trying to see if there was a way to do this over wi-fi or bluetooth directly to a computer. Or somehow through ADB push/pull commands...
Click to expand...
Click to collapse
After booting into TWRP you can try to "ADB root" and then pull. Or use 3rd part apps like MyPhoneExplorer.
Worked like a charm!
onimorza said:
Worked like a charm!
Click to expand...
Click to collapse
He-he, and still showing zero rating for the thread, and it will sink again below partially operative clones.... Do I need to attach something to OP?

Categories

Resources