FORUMS

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

1,009 posts
Thanks Meter: 1,860
 
By Oki, Senior Member on 13th September 2018, 05:21 PM
Post Reply Email Thread
- 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.
The Following 54 Users Say Thank You to Oki For This Useful Post: [ View ] Gift Oki Ad-Free
13th September 2018, 05:35 PM |#2  
Oki's Avatar
OP Senior Member
Flag East Coast
Thanks Meter: 1,860
 
Donate to Me
More
I hope you enjoy it as much as I did creating and learning throughout the enlightenment journey.
The Following 9 Users Say Thank You to Oki For This Useful Post: [ View ] Gift Oki Ad-Free
13th September 2018, 06:03 PM |#3  
voetbalremco's Avatar
Inactive Recognized Developer
Flag gelderland
Thanks Meter: 1,933
 
Donate to Me
More
Nice.
Any info on the scripts that are included?
The Following 2 Users Say Thank You to voetbalremco For This Useful Post: [ View ] Gift voetbalremco Ad-Free
13th September 2018, 06:19 PM |#4  
Oki's Avatar
OP Senior Member
Flag East Coast
Thanks Meter: 1,860
 
Donate to Me
More
Quote:
Originally Posted by voetbalremco

Nice.
Any info on the scripts that are included?

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.
The Following 7 Users Say Thank You to Oki For This Useful Post: [ View ] Gift Oki Ad-Free
13th September 2018, 06:26 PM |#5  
nfsmw_gr's Avatar
Senior Member
Flag Salamina,Greece
Thanks Meter: 1,951
 
More
That is looking very sweet!!!
I'm excited, nice work man!
13th September 2018, 06:50 PM |#6  
Senior Member
Thanks Meter: 248
 
More
This is just fantastic!
13th September 2018, 07:10 PM |#7  
nfsmw_gr's Avatar
Senior Member
Flag Salamina,Greece
Thanks Meter: 1,951
 
More
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.
13th September 2018, 07:14 PM |#8  
Oki's Avatar
OP Senior Member
Flag East Coast
Thanks Meter: 1,860
 
Donate to Me
More
Quote:
Originally Posted by nfsmw_gr

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.

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.
The Following 3 Users Say Thank You to Oki For This Useful Post: [ View ] Gift Oki Ad-Free
13th September 2018, 07:21 PM |#9  
nfsmw_gr's Avatar
Senior Member
Flag Salamina,Greece
Thanks Meter: 1,951
 
More
Quote:
Originally Posted by Oki

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.

Got it.
I thought the B12 version was for stock-based ROMs.
Okay I'll flash the other one once I get home, thanks.
13th September 2018, 07:23 PM |#10  
Oki's Avatar
OP Senior Member
Flag East Coast
Thanks Meter: 1,860
 
Donate to Me
More
Quote:
Originally Posted by nfsmw_gr

Got it.
I thought the B12 version was for stock-based ROMs.
Okay I'll flash the other one once I get home, thanks.

I'll clarify it a bit more to avoid any misunderstanding. Sorry about that.
The Following 3 Users Say Thank You to Oki For This Useful Post: [ View ] Gift Oki Ad-Free
13th September 2018, 07:34 PM |#11  
raystef66's Avatar
Recognized Developer / Recognized Contributor
Flag
Thanks Meter: 4,584
 
Donate to Me
More
Quote:
Originally Posted by Oki

I'll clarify it a bit more to avoid any misunderstanding. Sorry about that.

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
Post Reply Subscribe to Thread

Tags
labs, recovery, treble, twrp

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes