Related
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!
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.
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!
Guys.
I made a bit modified version of @russel5 very nice work for our Z3C:
- A bit more colors, nice navbar buttons and new navbar background (fits to main screen background)
- More img flash options (be carefull with img flash because wrong flashes can brick you phone)
- More partition backup and restore options (boot is also included for sure - but not shown on the pic)
- New with 3.1.0-0: Additional partition for backup/restore: mmcblk1p2 ext4 mounted to /sd-ext - This is second partition on external SD Card, if available.
- New with 3.1.1-0: All above mentioned changes and official ones: https://twrp.me/site/update/2017/05/19/twrp-3.1.1-0-released.html
Too beauty to keep it only for me
Requirements
Only for Unlocked Bootloader (UB)
New Bootloader needed: LA3.0_M_3
Information
Maybe NOT working with 7.x.x ROMs like (LineageOS/Carbon) - Only tested with MM and stock-like ROM (like SLiMM 3.8).
Please visit corresponing threads for help with TWRP and any 7.x.x ROM.
Installation - 2 Options:
a) Flashable zip via TWRP to update existing.
b) Extract twrp-3.x.x-0-z3c_Vxx.img from zip-file and flash via fastboot: fastboot flash recovery twrp-3.x.x-0-z3c_Vxx.img
Start FOTA Recovery:
Shut down phone completely - wait 5-10 secs - Press Power and Vol Down until short vibration - release both keys and wait - done.
UPDATE 18.06.2017
New 3.1.1-0 from Russel5 - Modded by me. Thanks to Russel5 and TWRP-Team.
UPDATE 15.03.2017
New 3.1.0-0 from Russel5 - Big thx again to him! Say thanks to him - not me!
Thanks to @russel5 - This is his work:
https://forum.xda-developers.com/z3-compact/general/d5803-z3c-aries-twrp3-0-t3543113
@fluffi444 I flashed the recovery.img in fota with twrp and recovery is still 3.0.2. Any idea why?
doriandiaconu said:
@fluffi444 I flashed the recovery.img in fota with twrp and recovery is still 3.0.2. Any idea why?
Click to expand...
Click to collapse
Maybe i have an idea.... You know how to start FOTA Recovery correctly?
Shut down phone completely - wait 5 secs - Press Power and Vol Down until short vibration - release both keys and wait - done.
Looks like you still booting your system or kernel recovery....
Otherwise check your bootloader - must be LA3.0_M_3 (Service Menu - Service Info - Software Info - S1 Boot Version)
UPDATE 15.03.2017
New 3.1.0-0 from @russel5 - Big thx again to him! Say thanks to him - not me!
can someone please explain/summarize for me the differences of twrp recoveries that we have on the z3c. if i got it right, there is (1) old bl recovery = kernel 'attached', (2) new bl recovery = seperated img from kernel and (3) fota recovery wich uses an unused partition of unlocked bl.
is that correct?
whats the advantage of fota? can every custom rom use all the different recoveries? can (2) + (3) be flashed both on the same device?
i am really confused wich version i wanna install and keep on my phone...
thanks
filou76 said:
can someone please explain/summarize for me the differences of twrp recoveries that we have on the z3c. if i got it right, there is (1) old bl recovery = kernel 'attached', (2) new bl recovery = seperated img from kernel and (3) fota recovery wich uses an unused partition of unlocked bl.
is that correct?
whats the advantage of fota? can every custom rom use all the different recoveries? can (2) + (3) be flashed both on the same device?
i am really confused wich version i wanna install and keep on my phone...
thanks
Click to expand...
Click to collapse
Yes - this all can be confusing!
I'm trying to be complete as I can be - I will mention only the last dev of the tools - Actually many more are involved and often it's an growing work of many - Especially No 1.
1) For LB - We have recovery (and root) for LB - Here the last (and best) rooting and TWRP method is the one from russel5:
https://forum.xda-developers.com/z3-compact/general/recovery-root-mm-575-lb-t3418714
This installs recovery files to SYSTEM partition folder /system/etc/mm_twrp_recovery
This is file: recovery.twrp.cpio.lzma
2) Only UB - Recovery integrated in Kernel a) and b)
a) Rootkernel (tobias.waldvogel) https://forum.xda-developers.com/xp...oot-automatic-repack-stock-kernel-dm-t3301605
afaik this was one of the first tools which can integrated automaticly very resource-conserving recovery to kernel - Disadvantage: Hard to change TWRP if new version is out.
b) PoC TA Tool (munjeni) https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893
Great quite new tool which can also integrate TWRP (but here the complete fota recovery.img) to kernel: Advantage easy to change TWRP to new version, because full fota revovery.img is used
3) Only UB - Recovery to FOTA partition (now known as recovery partition) - newer bootloader needed
This is the recovery.img you can download from official TWRP page or from russel5 (img to be flashed via fastboot) or from this thread (flashable.zip).
Those recovery.img's are complete bootable images with zImage and ramdisk (TWRP is in ramdisk).
That all means that it's indeed possible to have THREE recvoerys running on one phone! But this is senseless of course !!!
Option 1 is only recomended if you are on LB! But works also for UB. But its away if you flash complete new ROM (as TWRP is on SYSTEM)
Option 2 is.... for what? Let me say: Only if you really need the function to reboot to recovery directly from system.
Option 3 is my favorite (but only for UB) - this is bootable no matter what you did to system or even with kernel!
It's on his own seperate partionen and save for unwanted modifications, wrong boot or system flashes, etc
Only (and actually not really an) disadvantage is that you have to start this from shutted down phone... Reboot to recovery is not working!
fluffi444 said:
Yes - this all can be confusing!
I'm trying to be complete as I can be - I will mention only the last dev of the tools - Actually many more are involved and often it's an growing work of many - Especially No 1.
1) For LB - We have recovery (and root) for LB - Here the last (and best) rooting and TWRP method is the one from russel5:
https://forum.xda-developers.com/z3-compact/general/recovery-root-mm-575-lb-t3418714
This installs recovery files to SYSTEM partition folder /system/etc/mm_twrp_recovery
This is file: recovery.twrp.cpio.lzma
2) Only UB - Recovery integrated in Kernel a) and b)
a) Rootkernel (tobias.waldvogel) https://forum.xda-developers.com/xp...oot-automatic-repack-stock-kernel-dm-t3301605
afaik this was one of the first tools which can integrated automaticly very resource-conserving recovery to kernel - Disadvantage: Hard to change TWRP if new version is out.
b) PoC TA Tool (munjeni) https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893
Great quite new tool which can also integrate TWRP (but here the complete fota recovery.img) to kernel: Advantage easy to change TWRP to new version, because full fota revovery.img is used
3) Only UB - Recovery to FOTA partition (now known as recovery partition) - newer bootloader needed
This is the recovery.img you can download from official TWRP page or from russel5 (img to be flashed via fastboot) or from this thread (flashable.zip).
Those recovery.img's are complete bootable images with zImage and ramdisk (TWRP is in ramdisk).
That all means that it's indeed possible to have THREE recvoerys running on one phone! But this is senseless of course !!!
Option 1 is only recomended if you are on LB! But works also for UB. But its away if you flash complete new ROM (as TWRP is on SYSTEM)
Option 2 is.... for what? Let me say: Only if you really need the function to reboot to recovery directly from system.
Option 3 is my favorite (but only for UB) - this is bootable no matter what you did to system or even with kernel!
It's on his own seperate partionen and save for unwanted modifications, wrong boot or system flashes, etc
Only (and actually not really an) disadvantage is that you have to start this from shutted down phone... Reboot to recovery is not working!
Click to expand...
Click to collapse
Wow, thanks a lot @fluffi444!! It's even more complicated than I thaught. WHAT A MESS! :silly:
Well I'am still on Concept Rom --> Bootloader LA3.0_L_Hero_16. I guess that one is close to LA3.0_M_3? Don't remember where I got my TWRP 3.0.0.0 version from, but i flashed it as recovery.img, so it should be fota-type, right? Actually I can reboot from system to recovery ...
I think I'll keep this one as is and see if I need a newer version one day, when i change system to any Nougat rom.
filou76 said:
Wow, thanks a lot @fluffi444!! It's even more complicated than I thaught. WHAT A MESS! :silly:
Well I'am still on Concept Rom --> Bootloader LA3.0_L_Hero_16. I guess that one is close to LA3.0_M_3? Don't remember where I got my TWRP 3.0.0.0 version from, but i flashed it as recovery.img, so it should be fota-type, right? Actually I can reboot from system to recovery ...
I think I'll keep this one as is and see if I need a newer version one day, when i change system to any Nougat rom.
Click to expand...
Click to collapse
Yes - flashing by fastboot goes to FOTA/Recovery partition... Yes - keep it - I don't even know how Concept N or M will react...
Did anyone tried to do backup/restore with this recovery?
I am using it since flashing to LineageOS 14.1 and did multiple backups. Tonight I broken my google account in the ROM, so I wanted to restore to last backup. I already tried four of my backups and all of them are bootlooping, so I am starting to suspect the recovery, as all of those backups were done from perfectly working system.
johny.mnemonic said:
Did anyone tried to do backup/restore with this recovery?
I am using it since flashing to LineageOS 14.1 and did multiple backups. Tonight I broken my google account in the ROM, so I wanted to restore to last backup. I already tried four of my backups and all of them are bootlooping, so I am starting to suspect the recovery, as all of those backups were done from perfectly working system.
Click to expand...
Click to collapse
Yes - fully working here. Even Restore. But I still use 6.0.1.
But sometimes (not recovery version related) its not enough to restore only DATA or only SYSTEM.
It happens to me that only an complete restore of all saved partition did the trick...
But as I said that happens also with older recoverys or/and not modded.
fluffi444 said:
Yes - fully working here. Even Restore. But I still use 6.0.1.
But sometimes (not recovery version related) its not enough to restore only DATA or only SYSTEM.
It happens to me that only an complete restore of all saved partition did the trick...
But as I said that happens also with older recoverys or/and not modded.
Click to expand...
Click to collapse
Then it must be something either with my setup, or with 7.1.1 itself.
I tried everything: partial restore, full restore, new flash with recovering of data partition only... Everything was bootlooping.
I am not sure what finally worked, as I was trying it desperately for hours, but most probably the last mentioned thing without flashing Magisk.
johny.mnemonic said:
Then it must be something either with my setup, or with 7.1.1 itself.
I tried everything: partial restore, full restore, new flash with recovering of data partition only... Everything was bootlooping.
I am not sure what finally worked, as I was trying it desperately for hours, but most probably the last mentioned thing without flashing Magisk.
Click to expand...
Click to collapse
Try twrp 3.0.2.0 or 3.0.3.0. Some said they have problems with 3.1.0.0 an LOS.
UPDATE 18.06.2017
New 3.1.1-0 from Russel5 - Modded by me. Thanks to Russel5 and TWRP-Team.
Hi,
This recovery its amazing because i am trying to have a 6.0.1 With TWRP 3.x.x with Magisk, root and Xposed. At the moment when i ve Magisk and root, i miss Recovery by Magisk mod boot image.
Any idea why screen appear as out resolution or refresh. At least ... it seen enter on Recovery, BUT I CANT reset With Vol+, Vol-, Cam , Power...
at least i can connect by adb and restart.
¿Any idea?
Thanks
zeryors said:
Hi,
This recovery its amazing because i am trying to have a 6.0.1 With TWRP 3.x.x with Magisk, root and Xposed. At the moment when i ve Magisk and root, i miss Recovery by Magisk mod boot image.
Any idea why screen appear as out resolution or refresh. At least ... it seen enter on Recovery, BUT I CANT reset With Vol+, Vol-, Cam , Power...
at least i can connect by adb and restart.
¿Any idea?
Thanks
Click to expand...
Click to collapse
Hi, i know the sad answer... the problem its the screen, Original Screen (broken touch panel) show perfect Recovery but the "new" screen its the problem... its compatible but not 100% :_(
It´s curious a normal Recovery show OK but not FOTA
Hi there,
booting this current version of TWRP from `recovery/fota` is not working for me. The device just reboots but should load TWRP. I flashed it via `fastboot flash recovery [twrp.img]` without any errors.
TWRP is booting if I flash it to `boot` instead of `recovery`. I flashed CarbonROM this way but lost TWRP after that of course. I also tried [russel5's TWRP 3.1.1-0] which is not booting from `recovery/fota` either. However, an older TWRP version by Tomascus I found -> here <- is booting fine from `recovery/fota`.
Maybe this is bootloader related but I am not entirely sure. If so, how can I update the bootloader?
Sony Xperia Z3 Compact D5803
- Bootloader: 1286-7314_S1_Boot_MSM8974AC_LA3.0_52-2
- ROM: CARBON-CR-5.1-MOO-RELEASE-z3c-20170918-1012
TWRP's tried:
- Russel5's TWRP 3.1.1-0 FOTA Recovery MOD by fluffi444
- [D5803,z3c,aries]Twrp_3.1.1-0_img_for_unlocked_bootloader by russel5
- Tomascus TWRP 3.1.0-0
Andi- said:
Hi there,
booting this current version of TWRP from `recovery/fota` is not working for me. The device just reboots but should load TWRP. I flashed it via `fastboot flash recovery [twrp.img]` without any errors.
Click to expand...
Click to collapse
My MOD is technically the same as original one from Russel. So please ask in his thread (you did this already... btw: please do not post the same question in several threads)
I never tried 7.x.x-based ROMs. So I cannot say anything reladed to the compatibility I'm afraid. MM with stock-like ROM is working with 3.1.1.0 (from Russel).
I will make an note in OP...
And note this: https://forum.xda-developers.com/showpost.php?p=71882082&postcount=12
I am trying to install a newer TWRP for Carbon Mod custom rom. I tried:
- install .img with TWRP in TWRP
- flashify
- official app TWRP from google play
- fastboot commands with "platform-tools"
Everywhere I get a message that everything went fine but in TWRP I still have the old version - 3.0.0.2 :/
I am asking for help because I have been fighting this from two days :/
I have Xperia Z3C with unlocked bootloader, stock prerooted firmware .291 + EliteKernel v3.
Piospi said:
I am trying to install a newer TWRP for Carbon Mod custom rom. I tried:
- install .img with TWRP in TWRP
- flashify
- official app TWRP from google play
- fastboot commands with "platform-tools"
Everywhere I get a message that everything went fine but in TWRP I still have the old version - 3.0.0.2 :/
I am asking for help because I have been fighting this from two days :/
I have Xperia Z3C with unlocked bootloader, stock prerooted firmware .291 + EliteKernel v3.
Click to expand...
Click to collapse
To which partition have you installed the TWRP image file? Starting with your phone turned off, f it's been sent to the FOTAKernel partition, hold both the power and the volume down buttons until your phone vibrates (as if it was booting up normally), when you should release the power button. When the screen lights up, release the volume down button.
Otherwise, if you installed TWRP in the recovery partition, boot your phone up as usual. When you see the led lit up, press the volume button.
casouzaj said:
To which partition have you installed the TWRP image file? Starting with your phone turned off, f it's been sent to the FOTAKernel partition, hold both the power and the volume down buttons until your phone vibrates (as if it was booting up normally), when you should release the power button. When the screen lights up, release the volume down button.
Otherwise, if you installed TWRP in the recovery partition, boot your phone up as usual. When you see the led lit up, press the volume button.
Click to expand...
Click to collapse
Thank you very much for the answer. Starting the phone with Power + VolUp does not do anything. The phone shows the Sony logo and the system starts.
I installed the IMG file in recovery / fota and the ZIP version doesn't ask for locations.
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?