[TWRP][3.0][RECOVERY] TWRP 3.0.3-0 TeamWin Recovery Project ZUK Z2

mauronofrio

Recognized Developer
Jun 29, 2012
4,356
13,318
263
24
Castellana Grotte
toolaio.tk
TeamWin is proud to present TWRP 3.0.3-0 for the ZUK Z2!



Youtube video: http://www.youtube.com/watch?v=RIvWVS_Rkxo

Full TeamWin credits are on the TWRP page on the TeamWin website: http://teamw.in/project/twrp2

Introduction:

Team Win Recovery Project or twrp2 for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added a lot of our own features. It's 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.

Key Features:

Touchscreen driven with real buttons and drag-to-scroll
XML-based GUI that allows full customization of the layout true theming!
Settings are saved to the sdcard and persist through reboots
Ability to choose which partitions to back up and which to restore
Ability to choose to compress backups now with pigz (multi-core processor support for faster compression times)
Onscreen keyboard
Decryption of /data
Easy selection of internal/external storage
See changelog below for new features

In addition to the above new features, TWRP features a scripting engine that allows an app to send commands to the recovery for the recovery to perform during startup. We call this scripting engine OpenRecoveryScript. This engine will be put to use immediately in the GooManager app. GooManager will be able to install recoveries automatically for most supported devices. The app will also let you choose to install multiple zips from within Android, wipe cache & dalvik, and run a backup.

We are looking for other talented developers, themers, and device maintainers if they are interested in helping with a free, open source project.

Source Code:

GitHub - https://github.com/omnirom/android_bootable_recovery

Gerrit for TWRP Official Device Configs - http://gerrit.twrp.me

Gerrit Instance - http://gerrit.omnirom.org

If you have made your own twrp build for an unsupported device, please let us know. We might add your build to the list of unofficial builds. Bear in mind that we are working hard to add more devices and we may add your device to our official build list later.

Device Config: https://github.com/TeamWin/android_device_zuk_z2

Kernel: https://github.com/TeamWin/android_kernel_zuk_z2

DOWNLOAD:

All official devices are listed at the top of the page on the Team Win website. Search for the device in the textbox.

https://dl.twrp.me/z2/


Support:

Click http://webchat.freenode.net/?channels=twrp for live support or join us in #twrp on Freenode IRC servers
 
Last edited:

SenK9

Senior Member
Nov 29, 2009
447
228
43
Just reporting decryption of device doesn't work. Error 'unable to decrypt /data', just as with other TWRP versions. Device is Z2 Z2131.
 

SenK9

Senior Member
Nov 29, 2009
447
228
43
So you have the same problem on the other TWRP?
I have tried three TWRPs:

1) This one from OP (official TWRP 3.0.3.0)
MD5 - f80527e6a30c3b863163612879e1ecdc

2) Chinese/EN TWRP (3.0.2.0) from http://zukfans.eu/community/threads...2-zuk-z2-plus-z2131-z2132-only.291/#post-3719
MD5 - eaee35ae037de181655cca8ecdc9ad7d

3) International TWRP (3.0.2.0) from http://zukfans.eu/community/threads...2-zuk-z2-plus-z2131-z2132-only.291/#post-3715
MD5 - 5490ed18eef5409621e59c50c6548c94

All are unable to decrypt encrypted device with same error. I had this issue with one of my previous phone (I think Oneplus One) and it was something in TWRP since a later version fixed it.

On this page, it refers to some config when building TWRP:
https://forum.xda-developers.com/showthread.php?t=1943625

Code:
length= -- usually used to reserve empty space at the end of the /data partition for storing the decryption key when Android's full device encryption is present, not setting this may lead to the inability to encrypt the device
canencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt the backup of this partition if the user chooses encryption (only applies to tar backups, not images)
userdataencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt only the userdata portion of this partition, certain subfuldes like /data/app would not be encrypted to save time
Could this be related somehow? Is there any other info which you need?

EDIT: I will try the other EDL button TWRP and see if that works

---------- Post added at 09:25 AM ---------- Previous post was at 09:16 AM ----------

I have tried the 4th TWRP (EDL Button one) from your other thread, still no good. I have posted the error log below from TWRP. It also has gibberish characters, which I will post a photo in the other thread. Anyway here is the decryption error:

/tmp/recovery.log:
Code:
I:Copying file /cache/recovery/log to /cache/recovery/last_log
I:Is encrypted, do decrypt page first
I:Switching packages (TWRP)
I:Set page: 'decrypt'
I:Set page: 'trydecrypt'
I:operation_start: 'Decrypt'
crypt_ftr->fs_size = 113540519
Using scrypt with keymaster for cryptfs KDF
Invalid hex string
Failed to convert passwd from hex, using passwd instead
could not find any keystore module
Failed to init keymaster
Signing failed
kdf failed
failure decrypting master key
Failed to decrypt master key
mount:
Code:
rootfs on / type rootfs (rw,seclabel,size=1825024k,nr_inodes=456256)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1897396k,nr_inodes=474349,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=1897396k,nr_inodes=474349)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/mmcblk0p39 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
blkid:
Code:
/dev/block/mmcblk0p46: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p40: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p39: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p34: UUID="00BC-614E" TYPE="vfat"
/dev/block/mmcblk0p24: LABEL="dsp" UUID="af32c008-2a39-7e5b-a5dc-201456d93103" TYPE="ext4"
/dev/block/mmcblk0p23: UUID="00BC-614E" TYPE="vfat"
/dev/block/mmcblk0p16: LABEL="system" UUID="da594c53-9beb-f85c-85c5-cedf76546f7a" TYPE="ext4"
 

mauronofrio

Recognized Developer
Jun 29, 2012
4,356
13,318
263
24
Castellana Grotte
toolaio.tk
I have tried three TWRPs:

1) This one from OP (official TWRP 3.0.3.0)
MD5 - f80527e6a30c3b863163612879e1ecdc

2) Chinese/EN TWRP (3.0.2.0) from http://zukfans.eu/community/threads...2-zuk-z2-plus-z2131-z2132-only.291/#post-3719
MD5 - eaee35ae037de181655cca8ecdc9ad7d

3) International TWRP (3.0.2.0) from http://zukfans.eu/community/threads...2-zuk-z2-plus-z2131-z2132-only.291/#post-3715
MD5 - 5490ed18eef5409621e59c50c6548c94

All are unable to decrypt encrypted device with same error. I had this issue with one of my previous phone (I think Oneplus One) and it was something in TWRP since a later version fixed it.

On this page, it refers to some config when building TWRP:
https://forum.xda-developers.com/showthread.php?t=1943625

Code:
length= -- usually used to reserve empty space at the end of the /data partition for storing the decryption key when Android's full device encryption is present, not setting this may lead to the inability to encrypt the device
canencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt the backup of this partition if the user chooses encryption (only applies to tar backups, not images)
userdataencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt only the userdata portion of this partition, certain subfuldes like /data/app would not be encrypted to save time
Could this be related somehow? Is there any other info which you need?

EDIT: I will try the other EDL button TWRP and see if that works
I need of a tester, Do you want to test it?
 

optimumpro

Senior Member
Jan 18, 2013
6,267
13,596
253
Hello. I am coming from Sony Xperia Z1.

Regarding: TWRP decryption. TWRP does not support decryption for most of Qualcomm's devices. The reason is you have to modify device tree so that qucomm's blobs responsible for encryption/decryption are embedded into recovery image, as they can't be pulled by TWRP from system, because of hardware based encryption. I have compiled TWRP for Sony Xperia Z1-Z3 and they all are able to decrypt data partition. I am working on my Jaguar N rom for Zuk Z2, as I got the device just today. I will be posting a working TWRP as soon as I can.

Also, a question: How to flash TWRP via fastboot? On Sony devices you do fastboot flash recovery recovery.img. It is probably different on Zuk2. Thanks in advance...
 
  • Like
Reactions: pipyakas