[TWRP][E5823] Latest TWRP 3.2.1 for Z5 Compact - Xperia Z5 Compact Android Development

Updated TWRP for the Z5 Compact
REQUIRES:
- Unlocked bootloader
- Have Fastboot drivers installed on the PC you use for flashing
FEATURES:
- MTP support
- ADB root
- Reboot to Bootloader
- SD Card access
Not working (for now):
- Decryption <- working on it when I have time
Changelog:
23.02.2018
- Backup/Restore fix for USB OTG
- small fstab tuning (thanks @GreyLeshy)
- DL link updated - Now you will have access to all builds inside GDrive folder
22.02.2018 - 2
- Fix SD Card (again) on latest build
22.02.2018
- USB OTG fixed
15.02.2018
- Possibly fixed decryption, need feedback
13.02.2018
- Fixed SD card
7.02.2018
- First build
DOWNLOAD LINK
Google Drive
Instructions:
- Connect phone to PC in Fastboot mode
- Open Command Prompt and type
Code:
fastboot flash recovery recovery-name.img
- Take off the cable and boot into recovery by holding Power + Vol Down until you feel a vibration
Disclaimer: I am merely distributing the ready image. I will do my best to keep this thread up-to-date with the latest TWRP releases and provide fixed images in case there is a bug, I can help you to solve some problems but do not expect any timeframe.
I am not responsible for any bricked phones, missed alarms or thunderstorms. What you do with your phone is your own choice. Happy flashing!
Credits:
@TwrpBuilder for making this, all credits go to them
and all other maintainers and contributors to the code

trax7 said:
Needs testing:
- Decryption
Click to expand...
Click to collapse
Decryption is not working
Good job anyway, we have an updated TWRP at least!!

Don't need decryption and everything else works fine!! Strange how md5 checksum is now Digest!! Must be an Oreo thing
Sent from my Sony Xperia Z5 Compact using XDA Labs

@trax7
I own a Zuk Z2, on it the decryption problem was caused by unaligned/updated vendor blobs. I hope this can give you an hint on how to fix decryption.

Doe.it said:
Decryption is not working
Good job anyway, we have an updated TWRP at least!!
Click to expand...
Click to collapse
You tried with a password? Try with factory reset (not wipe data) and it should work... Note that you will lose data so be sure to copy it somewhere first.

trax7 said:
You tried with a password? Try with factory reset (not wipe data) and it should work... Note that you will lose data so be sure to copy it somewhere first.
Click to expand...
Click to collapse
I am encrypted everyday on my phone (I have set a password), I am using latest official stock firmware, decryption doesn't work returning a "failed decryption" message.

Thank you!

Hello trax7,
first of all ... many, many, many thanks for the provision of a current TWRP !!!!!
I searched for it so long !!!
Not working (for now):
- Decryption
- You tell me
Click to expand...
Click to collapse
For the moment I found three things for need of improvement:
1. When going into Recovery, the purple lamp (at the top of the case) does not light up.
2. Double touch the screen, doesn't wake up / switch on the screen again.
3. When starting a backup, I get five error messages:
unable to locate /persistent partition for backup calculations,
unable to locate /misc partition for backup calculation,
unable to locate /firmware partition for backup calculation,
unable to locate /persist partition for backup calculation,
unable to locate /ta partition for backup calculation,​... but the backup of the five partitions "boot, cache, data, recovery and system" runs through error-free.
However - I'm glad that we have became a current TWRP for our device!
And if one day the decryption works, I will be happy!

rm43115 said:
Hello trax7,
first of all ... many, many, many thanks for the provision of a current TWRP !!!!!
I searched for it so long !!!
For the moment I found three things for need of improvement:
1. When going into Recovery, the purple lamp (at the top of the case) does not light up.
2. Double touch the screen, doesn't wake up / switch on the screen again.
3. When starting a backup, I get five error messages:
unable to locate /persistent partition for backup calculations,
unable to locate /misc partition for backup calculation,
unable to locate /firmware partition for backup calculation,
unable to locate /persist partition for backup calculation,
unable to locate /ta partition for backup calculation,​... but the backup of the five partitions "boot, cache, data, recovery and system" runs through error-free.
However - I'm glad that we have became a current TWRP for our device!
And if one day the decryption works, I will be happy!
Click to expand...
Click to collapse
That's weird... I haven't experienced any of those bugs Maaybe just the purple lamp but I haven't even paid attention to that lol
Edit: Yes, purple LED does not light up. However the recovery did not complain at all during backups and locking and unlocking the screen is just fine. Are you using E5823 or E5803?

What about encrypted data partition. Is it possible to fix decrypting?

jw96 said:
What about encrypted data partition. Is it possible to fix decrypting?
Click to expand...
Click to collapse
At the moment no, but you can try and test whether it picks it up after a factory reset... Backup ur data tho.

trax7 said:
That's weird... I haven't experienced any of those bugs Maaybe just the purple lamp but I haven't even paid attention to that lol
Edit: Yes, purple LED does not light up. However the recovery did not complain at all during backups and locking and unlocking the screen is just fine. Are you using E5823 or E5803?
Click to expand...
Click to collapse
Ha, last night I found the problem for the strange error messages during the backup (it's not a problem of your TWRP-version):
In the .TWRPS file these partitions (persist, persistent, misc, firmware, ta) are still registered for backup from the old TWRP-version I used before.
I just had deleted the .TWRPS file and have created it again ... AND ... ERROR GONE!
I use E5823, but I would not call the problems with the violet lamp and the double-touch-unlock-screen an error ... rather a nice-to-have feature.
I mean, do not waste time with these banalities, if you do not know the solution.

USB OTG storage support
Hello trax7,
at the coming weekend I want to test the decryption of the TWRP - during preparation I realize that "USB OTG storage support" is missing.
Is it possible to implement "USB OTG storage support"?

rm43115 said:
Is it possible to implement "USB OTG storage support"?
Click to expand...
Click to collapse
@Trax , add to fstab
Code:
/usb-otg auto /dev/block/sda1 /dev/block/sda

Doe.it said:
Decryption is not working
Good job anyway, we have an updated TWRP at least!!
Click to expand...
Click to collapse
Doe.it said:
I am encrypted everyday on my phone (I have set a password), I am using latest official stock firmware, decryption doesn't work returning a "failed decryption" message.
Click to expand...
Click to collapse
jw96 said:
What about encrypted data partition. Is it possible to fix decrypting?
Click to expand...
Click to collapse
Decryption can't be achieved by only password. It requires a factory reset (not wipe data!). This is a security measure and each Android device creates their own password for encrypted data partition. So any other passwords such as lock screen security pin won't work. All ways go to performing a factory reset. In addition, in order not to have encrypted data partition again, fstab inside boot image must be modified.
rm43115 said:
Hello trax7,
at the coming weekend I want to test the decryption of the TWRP - during preparation I realize that "USB OTG storage support" is missing.
Is it possible to implement "USB OTG storage support"?
Click to expand...
Click to collapse
Yes, it is possible. Your device support OTG on it's stock fstab. After we get our works done, we will look onto this too!
Stay tuned!
berkanktz​

GreyLeshy said:
@Trax , add to fstab
Code:
/usb-otg auto /dev/block/sda1 /dev/block/sda
Click to expand...
Click to collapse
@GreyLeshy: Can I add it manually?

rm43115 said:
Can I add it manually?
Click to expand...
Click to collapse
Yes, You can with Android Image Kitchen

New build posted, USB OTG fixed as per @GreyLeshy 's suggestion.

trax7 said:
New build posted, USB OTG fixed as per @GreyLeshy 's suggestion.
Click to expand...
Click to collapse
THANK YOU!!!!
Now I can test the decryption this weekend ... if my children let me.
trax7 said:
Changelog:
22.02.2017
-USB OTG fixed
15.02.2017
-Possibly fixed decryption, need feedback
13.02.2017
- Fixed SD card
7.02.2017
- First build
Click to expand...
Click to collapse
You mean 2018 and not 2017.

In the latest two builds SD card access is broken again (or at least I can't access it). Reverting to recovery_suzuran-130218.img SD card access works again.

Related

[Recovery] [v510_palman] [2014-12-09] TWRP 2.8.2.0

TWRP 2.8.2.0​Team Win Recovery Project 2.x, or twrp2 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
This is not an official TeamWin TWRP build. I used TWRP sources found HERE, device tree that I created for TWRP that can be found HERE.
Changelog:
CHANGELOG for 2.8.2.0 - From TWRP webiste...
-Pull in all changes from Android 5.0 lollipop into TWRP
-Add decrypt support for Android 5.0 lollipop encrypted partitions including automatic decrypt when the default_password is in use
-Revert some changes to exFAT that were breaking exFAT support on some devices
-Other minor fixes and updates
Note: At this time we do not have a GUI representation for pattern unlock. You can still decrypt patterns though by translating the pattern dots to numbers. The pattern dots correspond to numbers in the following pattern:
1 2 3
4 5 6
7 8 9
So an upper-case L would translate to a password of 14789 entered on the keyboard. Eventually we plan to add a proper pattern unlock to TWRP but it is a relatively low priority at this point.
More info and changelog can be found on the official TWRP website HERE
Install Instructions:
With custom recovery already installed.
Download
Place zip file on phone
Reboot into recovery
Flash zip file through recovery
Reboot
With stock recovery - Need ADB installed.
Download zip file
Extract recovery.zip to a folder on your computer. Example c:\recovery
Open terminal window/command prompt, browse the the c:\recovery folder to execute following commands
adb reboot bootloader
fastboot flash recovery recovery.img
use vol +/- to scroll through menu to select recovery mode
press power button to reboot into updated recovery
profit!
Download:
Download HERE
Credits:
@Dees_Troy
TeamWin
Everyone involved with TWRP.
PS...Working on CM12 for V510 now
Thanks!
It doesn't seem to ask for a password to decrypt /data for encrypted devices though like it does on my N5.
Having some difficulty getting this to push through on the V50020d build. Thoughts?
apvikes28 said:
Having some difficulty getting this to push through on the V50020d build. Thoughts?
Click to expand...
Click to collapse
This is only for GPE 510 devices. There is another thread for your device.
NHLWil said:
Thanks!
It doesn't seem to ask for a password to decrypt /data for encrypted devices though like it does on my N5.
Click to expand...
Click to collapse
Can you flash the latest build, has today's date in it and see if it works now?
Thanks!
AndroidUser00110001 said:
Can you flash the latest build, has today's date in it and see if it works now?
Thanks!
Click to expand...
Click to collapse
It still didn't ask for a password, nor could I mount /data manually due to encryption. I even took out my SD card for giggles, thinking since TWRP was able to mount that, it could've been skipping trying to mount /data, but no dice.
AndroidUser00110001 said:
Can you flash the latest build, has today's date in it and see if it works now?
Thanks!
Click to expand...
Click to collapse
NHLWil said:
It still didn't ask for a password, nor could I mount /data manually due to encryption. I even took out my SD card for giggles, thinking since TWRP was able to mount that, it could've been skipping trying to mount /data, but no dice.
Click to expand...
Click to collapse
@AndroidUser00110001, maybe you need to have fstab.palman in the ramdisk, as described in this commit message: https://github.com/omnirom/android_bootable_recovery/commit/4eca40d7d8ff6968ed68a24686093cfb6f5f6373
NHLWil said:
It still didn't ask for a password, nor could I mount /data manually due to encryption. I even took out my SD card for giggles, thinking since TWRP was able to mount that, it could've been skipping trying to mount /data, but no dice.
Click to expand...
Click to collapse
Try twrp-2.8.2.0_v510-20141209.zip
AndroidUser00110001 said:
Try twrp-2.8.2.0_v510-20141209.zip
Click to expand...
Click to collapse
Still no change.
NHLWil said:
Still no change.
Click to expand...
Click to collapse
What exactly is going on because I am able to mount and do whatever I need to do.
AndroidUser00110001 said:
What exactly is going on because I am able to mount and do whatever I need to do.
Click to expand...
Click to collapse
And your device is encrypted running Lollipop?
With my N5, TWRP prior to 2.8.2.0 was not able to decrypt the /data partition on Lollipop. It would simply ask for the password, but would always fail. 2.8.2.0 fixed this.
However, with 2.8.2.0 on palman, it never even asks for the password . . . it just says it's unable to mount /data. The decryption routine doesn't appear to be working at all for me.
NHLWil said:
And your device is encrypted running Lollipop?
With my N5, TWRP prior to 2.8.2.0 was not able to decrypt the /data partition on Lollipop. It would simply ask for the password, but would always fail. 2.8.2.0 fixed this.
However, with 2.8.2.0 on palman, it never even asks for the password . . . it just says it's unable to mount /data. The decryption routine doesn't appear to be working at all for me.
Click to expand...
Click to collapse
Can you get a log? Is your data partition encrypted? I am guessing you are running the stock ROM?
I can mount data and wipe data. Not sure what issue you are having unless I am not understanding what you are trying to explain.
AndroidUser00110001 said:
Can you get a log? Is your data partition encrypted? I am guessing you are running the stock ROM?
I can mount data and wipe data. Not sure what issue you are having unless I am not understanding what you are trying to explain.
Click to expand...
Click to collapse
Yes, my data partition is encrypted. TWRP 2.8.2.0 on the N5 supports decrypting data. TWRP 2.8.2.0 on the N5 will ask for your password as soon as it boots, and when you input the proper password, it will decrypt data so it can be mounted.
TWRP 2.8.2.0 on palman does not ask for the password as soon as it boots, thus data is not decrypted. The exact error is:
"Could not mount /data and unable to find crypto footer"
AndroidUser00110001 said:
TWRP 2.8.2.0​PS...Working on CM12 for V510 now
Click to expand...
Click to collapse
OMG if you can get CM12 out for the V510 GPE device I am sure you would become an instant hero to thousands of users...
jk8260 said:
OMG if you can get CM12 out for the V510 GPE device I am sure you would become an instant hero to thousands of users...
Click to expand...
Click to collapse
invisiblek will be working on it with me. I have CM11 booting but with some hardware issue and I cannot get my CM12 build to boot yet. I am actually giving him my v510 so he can finish up the build. I am maintaining the d850 and just don't have enough time right now to continue with the v510.
I would say CM12 for the v510 in a week.
AndroidUser00110001 said:
invisiblek will be working on it with me. I have CM11 booting but with some hardware issue and I cannot get my CM12 build to boot yet. I am actually giving him my v510 so he can finish up the build. I am maintaining the d850 and just don't have enough time right now to continue with the v510.
I would say CM12 for the v510 in a week.
Click to expand...
Click to collapse
Awesome news! That will open up a whole new world for kernel development too. Really looking forward to it. Thank you for your hard work. Takes hours/days to get there.
AndroidUser00110001 said:
invisiblek will be working on it with me. I have CM11 booting but with some hardware issue and I cannot get my CM12 build to boot yet. I am actually giving him my v510 so he can finish up the build. I am maintaining the d850 and just don't have enough time right now to continue with the v510.
I would say CM12 for the v510 in a week.
Click to expand...
Click to collapse
This would definitely be great for the GPE! Looking forward to updates...
Any news on getting CM12 out for the V510 GPE, fingers crossed…
The device tree page won't come up. The link is broken.
AndroidUser00110001 said:
invisiblek will be working on it with me. I have CM11 booting but with some hardware issue and I cannot get my CM12 build to boot yet. I am actually giving him my v510 so he can finish up the build. I am maintaining the d850 and just don't have enough time right now to continue with the v510.
I would say CM12 for the v510 in a week.
Click to expand...
Click to collapse
Bump: Any Status or Beta's??

[RECOVERY][OFFICIAL] TWRP 3.1.1 for Exynos

Disclaimer: Usual disclaimer applies. I've tested this recovery but it might not work due to a different ROM / device / moon phase / etc. Use at your own risk.
Introduction
After working with upstream TWRP developers and fixing some bugs (in TWRP itself and in this port) this device finally has an official port
There were various builds available at different times (some with bugs) but most of them should now be fixed.
Features
Works
backup/restore
installing zips
ADB
MTP
Screen turns off
Basically the rest of this list
format /data
Adoptable storage
Decrypt /data
Doesn't work (please ask if you need this)
Encrypted backup (set password for /data/data)
USB-OTG
Untested
Backup/restore of stock system / data.
Installation instructions
Warning: only use it on the G800F/M/Y, NOT on the G800H! I only tested the G800F, but think G800M/Y will also work. G800H will most likely NOT work, as it is based on a different SoC (Qualcomm).
Download the recovery image from twrp.me. It also includes some installation instructions.
There are more extensive installation instructions over at the LineageOS ROM installation instructions.
I personally prefer using Heimdall, but you can also use Odin. Commands in Download/Odin mode (power off, then press home+Volume-Down+power):
Code:
heimdall flash --RECOVERY recovery.img
If you're using the stock ROM, use:
Code:
heimdall flash --RECOVERY recovery.img --no-reboot
When you come from the stock ROM you have to make sure the stock ROM doesn't overwrite TWRP: Pull the battery, wait 5 seconds, insert it again, and press home + volume up + power to enter TWRP and replace the stock ROM from there.
If you already have TWRP or LineageOS, it's much easier to install from there, see twrp.me.
Another method is using ADB (from your computer). I used it a lot during testing:
Code:
adb root
adb push twrp-3.1.1-1-kminilte.img /dev/block/mmcblk0p10
Changelog
Code:
2017-07-10:
* fix formatting /data while the partition is encrypted
(device is not encrypted by default)
* add support for adoptable storage
* accept kminiltexx etc. for flashing basebands
2017-06-20:
* ADB
* MTP at the same time as ADB
* Screen turns fully off
* fix for restoring backups made using `adb backup --twrp`
Source code
Kernel: https://github.com/TeamWin/android_kernel_samsung_kminilte/tree/cm-14.1
Device: https://github.com/TeamWin/android_device_samsung_kminilte/tree/cm-14.1
This recovery is built using a LineageOS tree. Instructions are similar to the instructions for building LineageOS for the S5 mini. Differences are: you don't need to patch the source (skip that step) and the last step is mka recoveryimage instead of mka bacon - this only builds the recovery resulting in much faster builds. Also see the official build instructions.
Thanks
Other people who have worked on this project:
Team Win, of course, for the recovery itself! In particular bigbiff which has worked with me to make this device official.
hennymcc
RVR
---
Note to moderators: this is my first DevDB thread started on XDA so I may have made mistakes.
XDA:DevDB Information
Team Win Recovery Project, ROM for the Samsung Galaxy S5 Mini
Contributors
ayke, hennymcc, RVR
ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.4.x
Version Information
Status: Stable
Current Stable Version: 3.1.1
Stable Release Date: 2017-06-20
Created 2017-06-24
Last Updated 2017-07-09
Thanks!
OFFICIAL TWRP...I can't believe it
Great work on this one...many thanks.
Thanks a million @ayke ! However, I found some bugs I'd like to submit some bugs I discovered:
- Recovery is not SEANDROID enforcing" message when booting TWRP, didn't cause any trouble for me but still - it was fine in your previous unofficial build
- Some zip files (tested with latest modem flashable zip) report "This package is for kminiltexx devices; this is a kminilte", so it doesn't flash and fails with ERROR:7
I can confirm that decrypting a File-Based encrypted /data partition works, I didn't test the backup tool though.
P.S. Is it possible to add support for adopted storage, that would be awesome!
Nevertheless - thanks for making this device officialy supported!
Friedensfurz said:
Thanks a million @ayke ! However, I found some bugs I'd like to submit some bugs I discovered:
- Recovery is not SEANDROID enforcing" message when booting TWRP, didn't cause any trouble for me but still - it was fine in your previous unofficial build
Click to expand...
Click to collapse
The current kernel used upstream is somewhat older and hasn't enabled SELinux yet. I don't see why you would want enforcing SELinux in TWRP, though.
Friedensfurz said:
- Some zip files (tested with latest modem flashable zip) report "This package is for kminiltexx devices; this is a kminilte", so it doesn't flash and fails with ERROR:7
Click to expand...
Click to collapse
I think I have a fix for that, please test https://aykevl.nl/download/2017-06-25-recovery-fix-ota-asserts.img (not tested by me)
Friedensfurz said:
I can confirm that decrypting a File-Based encrypted /data partition works, I didn't test the backup tool though.
Click to expand...
Click to collapse
Nice!
Friedensfurz said:
P.S. Is it possible to add support for adopted storage, that would be awesome!
Click to expand...
Click to collapse
I might look into it. I don't use it at the moment but am considering it.
EDIT: I have fixed it, it will be included in the next build.
any chance for g800h support?
sasukesama said:
any chance for g800h support?
Click to expand...
Click to collapse
Not from me. The G800H is a completely different device. I have a G800F so I can't test it.
ayke said:
I think I have a fix for that, please test https://aykevl.nl/download/2017-06-25-recovery-fix-ota-asserts.img (not tested by me)
Click to expand...
Click to collapse
Sorry, but the build doesn't fix the wrong device id issue - still throws error " This is for kminiltexx your device is kminilte. Anyway - maybe the next build will fix it[emoji6]
Friedensfurz said:
Sorry, but the build doesn't fix the wrong device id issue - still throws error " This is for kminiltexx your device is kminilte. Anyway - maybe the next build will fix it[emoji6]
Click to expand...
Click to collapse
Can you give a link to where you downloaded this zip? Then I can test it myself.
I also get the device error with latest official and 2017-06-25-recovery-fix-ota-asserts.img.
Tried to flash one of Spookcity's kernels, you can find it here (search for "test9" that is what I used lately).
https://github.com/Spookcity/ROMS-G800F/issues/10#issuecomment-301915315
The latest pre-official TWRP 3.1.1-0 works (says kminiltexx).
ayke said:
Can you give a link to where you downloaded this zip? Then I can test it myself.
Click to expand...
Click to collapse
This file causes problems with the device id: http://pt.tapatalk.com/redirect.php...1_22.05.2017_DRE-flashable.zip&au_id=13587482
It is a TWRP flashable baseband file, hope this helps
@Friedensfurz @Pat750
I couldn't find a (still online) kernel from Spookcity and I'd rather not flash a new modem unless I know why I should do that. So I haven't verified it.
But here's another build you can try. My previous attempt was incomplete.
https://aykevl.nl/download/2017-06-27-recovery-fix-ota-asserts-2.img
On my device I've verified it has a ro.product.device property of kminiltexx.
ayke said:
@Friedensfurz @Pat750
I couldn't find a (still online) kernel from Spookcity and I'd rather not flash a new modem unless I know why I should do that. So I haven't verified it.
But here's another build you can try. My previous attempt was incomplete.
https://aykevl.nl/download/2017-06-27-recovery-fix-ota-asserts-2.img
On my device I've verified it has a ro.product.device property of kminiltexx.
Click to expand...
Click to collapse
Yeah,I removed all of my test build links from my google drive, but have a thread on here. I already sent you this though. I will test your new build and see if it helps.
Edit:
Yep,fixed. Good work Ayke!
Sent from my SM-G800F using Tapatalk
Friedensfurz said:
...
I can confirm that decrypting a File-Based encrypted /data partition works, I didn't test the backup tool though.
...
Click to expand...
Click to collapse
I'm having a few issues with TWRP 3.1.1 where "wipe / format data" (where you have to key "yes") generates the following error msg (I posted a similar msg in Slim Rom 7 thread):
Code:
Error:unable to wipe /data unknown file system 'auto'
unable to format encryption.
I'm now wondering whether decrypting the data partition from within TWRP will address my format data issue reported above.
Can I ask how you did this? I've dug around the TWRP menus but nothing has jumped out at me (maybe it's something you need to run from the terminal?)
Many thanks!
fidoedidoe said:
I'm having a few issues with TWRP 3.1.1 where "wipe / format data" (where you have to key "yes") generates the following error msg (I posted a similar msg in Slim Rom 7 thread):
Code:
Error:unable to wipe /data unknown file system 'auto'
unable to format encryption.
I'm now wondering whether decrypting the data partition from within TWRP will address my format data issue reported above.
Can I ask how you did this? I've dug around the TWRP menus but nothing has jumped out at me (maybe it's something you need to run from the terminal?)
Many thanks!
Click to expand...
Click to collapse
I have the same problem
Here also this message in unofficial builds, don't tried it, but I think its still present in this version.
fidoedidoe said:
I'm having a few issues with TWRP 3.1.1 where "wipe / format data" (where you have to key "yes") generates the following error msg (I posted a similar msg in Slim Rom 7 thread):
I'm now wondering whether decrypting the data partition from within TWRP will address my format data issue reported above.
Can I ask how you did this? I've dug around the TWRP menus but nothing has jumped out at me (maybe it's something you need to run from the terminal?)
Many thanks!
Click to expand...
Click to collapse
I still haven't found a method to decrypt the /data volume from within TWRP (a reference earlier in the thread implied it was possible)..the hope being this would mitigate the "wipe / format data" error:
Code:
Error:unable to wipe /data unknown file system 'auto'
unable to format encryption.
What I did discover was that when reverting to an older version of TWRP (2.8.x) using Odin, " format data" (where you have to type "yes" to proceed) didn't error. I'm not sure whether that cured the issue, but after that I updated TWRP image back to 3.1.1.0 and installed my ROM as normal.
Still looking for a recognised method to wipe encrypted /data volume from within latest stable TWRP if anyone has any experience of that.
EDIT
Another thread suggests (to my untrained eye) that "unknown file system 'auto" may be related to how twrp.fstab is configured.
I'm very much out of my here ( so apologies for the crude suggestion), but could it be that another build of a TWRP image is needed where twrp.fstab is changed to allow "format data" to work, ie substitute "fstype" from "auto" to "ext4" as outlined below :
Code:
...
/data ext4 /dev/block/mmcblk0p21 length=-16384
...
fidoedidoe said:
I still haven't found a method to decrypt the /data volume from within TWRP (a reference earlier in the thread implied it was possible)..the hope being this would mitigate the "wipe / format data" error:
Code:
Error:unable to wipe /data unknown file system 'auto'
unable to format encryption.
What I did discover was that when reverting to an older version of TWRP (2.8.x) using Odin, " format data" (where you have to type "yes" to proceed) didn't error. I'm not sure whether that cured the issue, but after that I updated TWRP image back to 3.1.1.0 and installed my ROM as normal.
Still looking for a recognised method to wipe encrypted /data volume from within latest stable TWRP if anyone has any experience of that.
EDIT
Another thread suggests (to my untrained eye) that "unknown file system 'auto" may be related to how twrp.fstab is configured.
I'm very much out of my here ( so apologies for the crude suggestion), but could it be that another build of a TWRP image is needed where twrp.fstab is changed to allow "format data" to work, ie substitute "fstype" from "auto" to "ext4" as outlined below :
Code:
...
/dataext4/dev/block/mmcblk0p21length=-16384
...
Click to expand...
Click to collapse
I got it to work by formatting/repairing/changing filesystem in TWRP. Just try some combinations, it will work eventually
Yes, I think it's because of the 'auto' in the fstab. I've set it to ext4 in this build (for data and cache):
https://aykevl.nl/download/2017-07-03-recovery.img
This build also contains the previous fixes (adoptable storage, fixing the kminiltexx error).
If it fixes the issue for you, I'll push the change for inclusion in the next official build.
I didn't see any negative consequences of changing the FS type in fstab. Even setting the fstab entry to 'f2fs' mounts /data as usual (as ext4) so I think it's safe.
ayke said:
https://aykevl.nl/download/2017-07-03-recovery.img
Click to expand...
Click to collapse
Can someone test this change? Then I'll integrate it in the official build.

[RECOVERY][TREBLE] TWRP 3.2.3-0L v1.3 Labs Mod for the ZTE Axon 7

- T W R P 3.2.3-0L [Labs Mod] -
The Swiss Army Knife TWRP Mod for the Axon 7​
INTRODUCTION
This was a long term project that I have been using for a long time. I created some scripts to make it easier and faster to flash new roms and quickly restore the daily driver configuration after a testing session. For easier access I modified the TWRP interface to add direct access to the scripts. They had many problems but they were good to me since I created them and I knew how to used them well, but they were not ready for other users.
But the time has come and I have cleaned up most of the annoyances in the tools and in the UI. I have named it "Labs Mod" since it allows me to have my flashing lab on the go, making it extremely easy to switch to different configurations, or recover the daily driver configuration in a few minutes. I believe it is free of major bugs and now I can concentrate on adding new scripts, and more options to the current scripts.
FEATURES
On top of the latest improvements introduced in the official TWRP 3.2.3-0, this mod offers the following added features:
Full vendor partition support (mount, format, wipe, partition image flash, TWRP backup and restore).
Integrated Bootstack backup and restore.
Modem firmware image flash
Reboot to EDL
Button to enable device mapper verity (DM-Verity) enforcing
Button to disable the eMMC write protection (disemmcwp)
Backup/Restore internal storage to the TWRP Backup folder in the external SD. Ensure you have enough free space, free space check is not yet implemented.
EDL backup zip creation. Dual zip use since the resulting zip can be installed using TWRP from the phone or using MiFlash from the computer. It offers the following package creation options:
OS: Operating system (boot, vendor and system).
GPT: Partition table only.
CONFIG: Device config data (IMEI, SN, MAC, etc).
BOOTSTACK: Boot firmware without modem.
MINIMAL: Includes GPT+bootstack+modem+recovery.
EMERGENCY: Minimal + device config.
FULL: Minimal + OS.
FACTORY: Includes Full + config.​
Integrated Treble PARTY tool for creating and removing the vendor partition. Vendor partition is required for Treble ROMs. Removal is required for flashing old non-treble roms.
Lockscreen security removal. Removes password, pattern, fingerprint, etc... (in case you forget your password or the security descriptor gets corrupted).
Google account binding removal (in case you want to wipe from within recovery and test with different google accounts).
Bootloader unlock message removal.
New! Expand OS partitions (Vendor and System) to fit the whole partition. Useful for expanding the GSI filesystem for having space for adding GApps or moving apps to system.
New! Deep Wipe function performs a low level wipe of the partition data, erasing the remaining the portions of the eMMC that stored the partition information.
REQUIREMENTS
You need an unlocked Axon 7
INSTALLATION
WARNING, THIS SOFTWARE COULD WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.
IT REQUIRES TWRP CUSTOM RECOVERY IN AN UNLOCKED DEVICE, OTHERWISE YOUR DEVICE COULD BE BRICKED.
!!! Whatever you do, it is at your own risk !!!​
Follow these steps:
1. Download the TWRP Labs Mod image to your External SD card.
2. Boot to TWRP and select the Install option in the main manu.
3. Tap on the install image button and select your external SD. select the image file you downloaded, select the recovery partition and confirm.
4. Reboot to recovery again to ensure the changes are applied properly.
DOWNLOAD
TWRP_3.2.3-0L_v1.3-Axon7-Labs_Mod.img Flavor of the mod using the official TWRP 3.2.3-0 Kernel binary (Quick boot even when using F2FS, full ADB support, NO B12 Oreo encryption). Use this if you do not plan on using device encryption. Please note that you won't be able to use any tool of this version if your device is encrypted.
TWRP_3.2.3-0L_v1.3.B12-Axon7-Labs_Mod.img Device encryption enabled flavor of the Labs mod. It use the 3.2.1-8 TWRP Kernel binary (Long boot when using F2FS, NO ADB support, B12 Oreo encryption). Use this one if you use device encryption. Please note that this flavor doesn't support adb interface.
NOTES
1. I do not have the time and expertise to dig into kernel hack so this is why I do not provide a unified kernel with fast F2FS boot, ADB and B12 encryption. Probably people developing kernels could help on this issue. It would be nice having a kernel with proper F2FS boot support, B12 encryption and ADB interface. Until then, there is no other way than having 2 flavors depending on the features we require.
SOURCES
C'mon, all of them are scripts!!! the sources are at glance. Use them in your projects but don't forget to give credit to the source !!!
CREDITS
@NFound for the recovery kernel binary supporting Oreo B12 encryption.
@someone755 for the keycheck binary I use in my scripts.
@Chainfire for the TWRP install script hacks.
I hope you enjoy it as much as I did creating and learning throughout the enlightenment journey.
Nice.
Any info on the scripts that are included?
voetbalremco said:
Nice.
Any info on the scripts that are included?
Click to expand...
Click to collapse
Well, all of them are Bourne shell scripts. Some of them are stupidly simple such as those in the Reboot menu, and others in the Advanced > Oki Labs menu are very elaborated, specially:
- PARTY tool: for creating and removing the vendor partition. I released it a few days ago as a separated tool that could well work in other devices.
- EDL backup: for creating EDL flashable backups of a configuration. This tool will probably require a full thread due to the concepts involved. The big feature is that the generated zip can be also flashed using any TWRP.
- Internal Storage Backup/Restore: TWRP doesn't offer a straightforward solution for backing up the internal storage, since it is excluded from the data backup, now it is possible to create a backup and restore the contents of the internal SD in case you want to mess up with the userdata partition. Now this script creates a set of files under the TWRP/backup folder. I am planning to add the possibility of having different backup folders, the same way the GUI treats the data partition.
That is looking very sweet!!!
I'm excited, nice work man!
This is just fantastic!
Well, the non b12 version can't decrypt my device, running los 15.1
also, the lab options did nothing, and when I pressed on PARTY the recovery froze on me.
Hmm.
nfsmw_gr said:
Well, the non b12 version can't decrypt my device, running los 15.1
also, the lab options did nothing, and when I pressed on PARTY the recovery froze on me.
Hmm.
Click to expand...
Click to collapse
Well, that's why in the OP I provide 2 flavors of the mod. If you require decrypt then you have to use the B12. PARTY will not work either if your device is encrypted and you are using the 3.2.3-0L. In your case, using device encryption, you have to use the 3.2.3-0L(B12). You will have all the functions except for ADB. PARTY will work fine too.
Oki said:
Well, that's why in the OP I provide 2 flavors of the mod. If you require decrypt then you have to use the B12. PARTY will not work either if your device is encrypted and you are using the 3.2.3-0L. In your case, using device encryption, you have to use the 3.2.3-0L(B12). You will have all the functions except for ADB. PARTY will work fine too.
Click to expand...
Click to collapse
Got it.
I thought the B12 version was for stock-based ROMs.
Okay I'll flash the other one once I get home, thanks.
nfsmw_gr said:
Got it.
I thought the B12 version was for stock-based ROMs.
Okay I'll flash the other one once I get home, thanks.
Click to expand...
Click to collapse
I'll clarify it a bit more to avoid any misunderstanding. Sorry about that.
Oki said:
I'll clarify it a bit more to avoid any misunderstanding. Sorry about that.
Click to expand...
Click to collapse
Thnx for this tool ! I'll test that this weekend.
It would be great if you'd make a small guide on this with a couple of situations / a possible indepth review with screens / what's possible and what's definitely not possible with this twrp tool.
Anyway seems very promising :good:
Sheesh...i have no external sd card
I have garde flashed your TWRP_3.2.3-0L (B12) -Axon7-Labs_Mod.img but this version says when starting in twrp that my password is wrong. the version 3.2.1.8 of nfound unlocks my password quite normal
Excellent Job! I can't wait to get back my Axon 7 from RMA Services. I'm just going to need sometime to get this running coming from stock MIflavor.
Found bug. Installed the ADB version (thanks Cthulu!), wanted to check the functionality.
Went into the Storage Backup and my phone froze. Rebooting from ADB worked.
EDIT: tried to reproduce the issue - same thing happened 2nd time.
EDIT2: It freezes at any option in Oki Labs
docentore said:
Found bug. Installed the ADB version (thanks Cthulu!), wanted to check the functionality.
Went into the Storage Backup and my phone froze. Rebooting from ADB worked.
EDIT: tried to reproduce the issue - same thing happened 2nd time.
EDIT2: It freezes at any option in Oki Labs
Click to expand...
Click to collapse
I can't duplicate the issue. Are you sure you downloaded it properly? Do you have an SD card? The backup requires an SD card with enough space. Checking for free space is in the todo list for this weekend.
raystef66 said:
Thnx for this tool ! I'll test that this weekend.
Anyway seems very promising :good:
Click to expand...
Click to collapse
Not good enough!
It is downloaded properly. SD card has more than 100gb free space.
As mentioned in edit it is any option that I used in Oki Labs menu that froze my phone
docentore said:
It is downloaded properly. SD card has more than 100gb free space.
As mentioned in edit it is any option that I used in Oki Labs menu that froze my phone
Click to expand...
Click to collapse
What option are you testing? the Storage Backup? What format are you using in your SDCard? Does it happen at the beginning or after a while? Is there any file under TWRP/BACKUPS/STORAGE in your Micro SD after the failure?
@Oki this is amazing. Thank you.
Is it possible to use the recently released kernel sources from los15 to solve the issue of needing two revisions?

[RECOVERY][OneUI-2.5][UNOFFICIAL] TWRP 3.4.0_10.0 For Samsung M51 - Final

*** WARNING ***​This version of TWRP is not compatible with Samsung android 11 (OneUI 3.1) release and it won't work if you have updated your phone to that android version
If you need more detailed steps of what do then wait for my complete guide
I'M NOT RESPONSIBLE IF YOU BRICKED YOUR DEVICE BECAUSE YOU ARE STILL NEWBIE
This is recovery won't get further updates or support​
Bugs
-Userdata decryption is not working so you should use an external SD or USB OTG for putting ZIPs and IMGs on it in order to flash them
How to Install
1. Unlock your bootloader
2. Boot to Odin mode
3. Check AP box and select TWRP tar file
3. Hit start
4. Have fun
Download
TWRP 3.4.0_10 - Stable 1
Sources
TWRP device tree: https://github.com/Lehkeda/android_device_samsung_m51_pbrp/tree/android-10_pbrp/
Kernel source: https://github.com/Lehkeda/android_kernel_samsung_m51/tree/ten
Change Log:
Stable 1 - 19th of December 2020
- Fix MTP
- Fix data partition mounting
- Fix system image flashing
Beta 2 - 16th of December 2020
- Fix ADB
- Fix mounting partitions (Except userdata)
- Fix navigation bar
- Fix CPU temperature
- Add reboot to download mode
Beta 1 - 12th of December 2020
- Initial Release
F.A.Q
How to mount system root to flash ZIPs and other stuff?
-Go to Advanced > terminal
-Type "mkdir /system_root"
-Type "mount /dev/block/mapper/system /system_root"
How to mount data partition?
-Go to Advanced > terminal
-Type "mount /dev/block/by-name/userdata /data"
Thanks man. I ll try to fix mtp , storage and scaling.
bekirakil said:
Thanks man. I ll try to fix mtp , storage and scaling.
Click to expand...
Click to collapse
Storage is partially fixed now.
For MTP, I compiled the kernel without Samsung MTP and it's Kinda working... adb can detect it now, but it still now showing on my computer
I need to add a proper init stuff for it
i was able to fix mount sdcard but i couldn't fix data im working on it
The encryption is really annoying
That was the best i could do. Data mounting is not working because of encryption. I couldn't find the key directory of the encryption. But you can flash from external sd.
Hello. Backup, Restore, running smoothly? Can I back up without problems? Thank you very much, thank you.
onurmemo77 said:
Hello. Backup, Restore, running smoothly? Can I back up without problems? Thank you very much, thank you.
Click to expand...
Click to collapse
It would be nice if you can test that for me as I'm not able to test right now!
LahKeda said:
It would be nice if you can test that for me as I'm not able to test right now!
Click to expand...
Click to collapse
Sure, I'll help.
But I couldn't download the new version of the twrp. Would you please upload to sites like media fire gdrive? Thank you very much, thank you.
onurmemo77 said:
Sure, I'll help.
But I couldn't download the new version of the twrp. Would you please upload to sites like media fire gdrive? Thank you very much, thank you.
Click to expand...
Click to collapse
Download it from a pc or activate desktop site option before downloading it or click on download it anyway link
Can you give me your email please? I need your help at my project. Maybe you can help. (Sorry for my bad english i'm german )
bekirakil said:
Can you give me your email please? I need your help at my project. Maybe you can help. (Sorry for my bad english i'm german )
Click to expand...
Click to collapse
DM me at telegram @lehkeda
The userdata decryption bug, does that mean it can't access the phone's storage in TWRP?
Camack said:
The userdata decryption bug, does that mean it can't access the phone's storage in TWRP?
Click to expand...
Click to collapse
Yes, but you can still access the data on USB device or external sdcard
@LahKeda After installing TWRP and flashing Magisk, do I need to press power and volume up button every time I restart the phone to have Magisk root or can I boot it normally without pressing anything?
swiftez said:
@LahKeda After installing TWRP and flashing Magisk, do I need to press power and volume up button every time I restart the phone to have Magisk root or can I boot it normally without pressing anything?
Click to expand...
Click to collapse
+1 would like to know too as the current root method patching boot.img with Magisk, you have to press power and volume up every time you restart the phone to keep root.
Thanks for the recovery. I have a question. Can I simply flash this via odin (no stock firmware download required) and it will work? I'm asking because in the other twrp thread there is a requirement of downloading and flashing stock firmware. The firmware for my region hasn't released yet.
Affangta said:
Thanks for the recovery. I have a question. Can I simply flash this via odin (no stock firmware download required) and it will work? I'm asking because in the other twrp thread there is a requirement of downloading and flashing stock firmware. The firmware for my region hasn't released yet.
Click to expand...
Click to collapse
Yes, no need to flash stock firmware at all.

[RECOVERY][UNOFFICIAL][OneUI3.1] TWRP 3.5.1_10.0 For Samsung M51

I'M NOT RESPONSIBLE FOR ANY BRICKED DEVICES, DATA LOSS, OR THE WORLD WAR III...
FLASH THIS AT YOUR OWN RISK
ALWAYS READ THE INSTRUCTIONS BEFORE INSTALLING ANYTHING CAREFULLY.
IF YOU ARE NOT SURE, ASK IN THE COMMENTS BELOW OR IN THE TELEGRAM GROUP FOR HELP. OTHERWISE, DON'T BLAME ANYONE OTHER THAN YOURSELF
Bugs
-Userdata decryption is not working. You can flash multi disabler (check this before flashing) to disable encryption or use an external SD or USB OTG for putting ZIPs and IMGs on it in order to flash them
- Data backup is not working due to device encryption
How to Install
0. READ F.A.Q section first here
1. Unlock your bootloader
2. Boot to Odin mode
3. Check AP box and select TWRP tar file
4. Hit start
5. Reboot to TWRP and flash multi disabler if you want (check this before flashing it)
6. Have fun
Download
TWRP 3.5.1_10 - Beta 2
Multi Disabler
Sources
TWRP device tree
Kernel source
Change Log:
Beta 2 - 24th of March 2021
- Update to latest kernel 4.14.190
- Fix MTP on the latest kernel
- Clean up dynamic partitions
- Released kernel 4.14.190 source
Beta 1 - 20th of March 2021
- Initial Release
F.A.Q:
What is data encryption and why doesn't it work on TWRP?
Samsung M51 uses file-based encryption that encrypts the user data partition.
By default, TWRP can't decrypt user data partition, which makes it impossible for us to access the internal device storage from TWRP or recovery MTP, which means you can't put ROM files on your internal phone storage and flash them from there.
What is Multi disabler and how does it affect your phone?
- Multi disabler disables and removes the encryption on the data partition, which makes it possible for you to access your internal storage from TWRP or recovery MTP. thus, making it possible for you to flash files from internal storage.
- Removing the encryption on your device's internal storage makes it possible for you to access your files from recovery directly, which makes it possible for anyone to access your private files without your permission from recovery.
- All of the above means that your device will be less secure. So if you care about device encryption then don't flash the multi disabler and use a USB OTG or a sdcard to flash ROMs, which I recommend. Otherwise, flash the multi disabler at your own risk!!!
- FLASHINF MULTI DISABLER REQUIRES PERFORMING A FULL DATA WIPE WHICH MEANS YOU WILL LOSE YOUR DATA. SO BACKUP YOUR DATA BEFORE FLASHING IT.
My device keeps rebooting to recovery after flashing TWRP, why?
Most probably you will need to wipe your data partition and flash multidisabler
Data backup is not working even after flashing multidisabller, why?
Current multidisabler still can't fully disable FBE encryption, which means that TWRP can't read data partition at all, hence creating backups will always fail.
Reserved just in case
Thank you so much for your efforts,
Does backup, restore, work smoothly in this version of twrp? Does it fully restore after making a backup? Or are there still mistakes?
In Twrp 3.4.0 Data backup is not loading. Nonoperating. But the system is loading.
Oh, thank you, thank you.
onurmemo77 said:
Thank you so much for your efforts,
Does backup, restore, work smoothly in this version of twrp? Does it fully restore after making a backup? Or are there still mistakes?
In Twrp 3.4.0 Data backup is not loading. Nonoperating. But the system is loading.
Oh, thank you, thank you.
Click to expand...
Click to collapse
Currently I have no working ROM so I can't test back and restore functionality. But backing data should be working.. don't take that for granted tho..
It would be great if you can test that and report if it's working or not, or wait until I or someone else test that.
thank you for your efforts. i installed this twrp and flashed mutlidisabler. also formatted data before reboot. Unfortunately twrp does not allow to create backups. Cannot unmount system partition etc...Your android 10 TWRP version is creating and restoring backups allright. So for now have to continue using android 10!
ilya33 said:
thank you for your efforts. i installed this twrp and flashed mutlidisabler. also formatted data before reboot. Unfortunately twrp does not allow to create backups. Cannot unmount system partition etc...Your android 10 TWRP version is creating and restoring backups allright. So for now have to continue using android 10!
Click to expand...
Click to collapse
What error do you get? Can send me the recovery log?
LahKeda said:
What error do you get? Can send me the recovery log?
Click to expand...
Click to collapse
i do not remember how to retrieve recovery log. this is a screenshot after I tried to do twrp backup:
ilya33 said:
i do not remember how to retrieve recovery log. this is a screenshot after I tried to do twrp backup:
Click to expand...
Click to collapse
backups will not work because of device encryption. Even after flashing mutldisabler, the device will keep encrypting the data.
LahKeda said:
backups will not work because of device encryption. Even after flashing mutldisabler, the device will keep encrypting the data.
Click to expand...
Click to collapse
Thanks.
Do you think that Magisk prerooting prior to TWRP flash might help here?
Or maybe we should just for full official Android 11 twrp release...
TeamWin updates TWRP to 3.5.1, Android 11 support coming soon
They're calling it a 'mini release' with a few notable feature improvements
www.androidpolice.com
LahKeda said:
backups will not work because of device encryption. Even after flashing mutldisabler, the device will keep encrypting the data.
Click to expand...
Click to collapse
Fyi -i have spare m51 device with android 11 installed. Ready to use it for any kind of twrp test builds. This is a good phone and we must have twrp for android 11 developed here. Thanks
ilya33 said:
Thanks.
Do you think that Magisk prerooting prior to TWRP flash might help here?
Or maybe we should just for full official Android 11 twrp release...
TeamWin updates TWRP to 3.5.1, Android 11 support coming soon
They're calling it a 'mini release' with a few notable feature improvements
www.androidpolice.com
Click to expand...
Click to collapse
prerooting won't solve encryption issues. Maybe when TWRP can be build using android 11, we can fix encryption issues or at least partially fix it.
ilya33 said:
Fyi -i have spare m51 device with android 11 installed. Ready to use it for any kind of twrp test builds. This is a good phone and we must have twrp for android 11 developed here. Thanks
Click to expand...
Click to collapse
Then go ahead and test this one. plus lineage 18.1 will drop here soon!
Backup failed
Error code: 255
saleem137 said:
Backup failed
Error code: 255
Click to expand...
Click to collapse
Did you even read the FAQ section?
anyways, backups will fail because of data encryption
Does this TWRP require to format data after installing without Multi disabler?
smallKING81 said:
Does this TWRP require to format data after installing without Multi disabler?
Click to expand...
Click to collapse
Nope, but you may need to install multidisabler to prevent the phone from reverting back to stock recovery. Don't formate the data after flashing Multidisabler and see if the phone boots or not
LahKeda said:
Then go ahead and test this one. plus lineage 18.1 will drop here soon!
Click to expand...
Click to collapse
well i already tested that twrp build and it does not allow to create backup (which is the main reason i need twrp to start with). i will test your lineage roms no problem. Do you think that twrp will work properly with lineage 18?
ilya33 said:
well i already tested that twrp build and it does not allow to create backup (which is the main reason i need twrp to start with). i will test your lineage roms no problem. Do you think that twrp will work properly with lineage 18?
Click to expand...
Click to collapse
Data backup doesn't work because of data encryption.
Yes! it's working without any problems with lineage 18

Categories

Resources