[Recovery] Unofficial TWRP 3.x (on Omni base) - peregrine - Moto G 4G Android Development

2016-09-25 Update:
_that has had an official 3.x build for some time now, built on top of a CM-based tree.
My device and kernel trees build TWRP 3.x on top of an Omni 6.0 codebase, see below for more instructions. I won't be posting images for the foreseeable future, I do not have time to provide any support or troubleshooting these days.
2015-04-08 Update:
Somcom3X has a few recent builds in this thread.
2014-08-18 Update:
Somcom3X has posted a new build here.
2014-08-06 Update:
I'm currently quite busy IRL and haven't had time to update my build in the last while. I don't expect to until sometime in September. However I will keep on checking in here on a regular basis to update the OP as needed.
@Somcom3X and @shabbypenguin have made more recent builds which have been reported as working well.
@meekrawb has packaged Somcom3X's build and mine in flashable zip files in this post.
---------------------------------------------------------------
Here's my current TWRP build for the Moto G LTE "peregrine".
Features:
TWRP 3.x
Boots.
Works with the external microSD card and USB OTG.
Known issues:
Build tree needs work so that falcon, peregrine, condor and titan can coexist easily. Well, this is still true, but far enough down the list that I don't expect it to happen.
Some microSD cards have been reported to work on the Motorola stock ROM and not with this recovery. Not much can be done about it unless those with the issue provide meaningful data for myself and others to look at. Device Tree Blobs (DTB) have been updated, shouldn't be an issue anymore.
Likely more to come, this has not been tested extensively.
Changelog:
2014-07-16 18:45
Changed kernel remote from OmniROM to @shabbypenguin's, at least until the Omni team pulls in the new Motorola kernel release.
Minor changes
Thanks
The entire TWRP team for their work, and in particular to @Dees_Troy and @cybojenix for their assistance.
Enjoy,
Darkshado

(Reserved post, just in case)

Thanks for your work on this..a donation is certainly awaiting..
Sent by my Motorola Droid XYBoard MZ617-32 10.1_ICS 4.04

@NWKENT I just uploaded a working version.
(Thanks! I'll have to look into the donation stuff, will put up a link once that's done...)

Great work! I assume backups work or will we have to wait for a later build?

I've made some backups, haven't needed to restore yet. I tried to be exhaustive in terms of the partitions you could backup.

Darkshado said:
@NWKENT I just uploaded a working version.
(Thanks! I'll have to look into the donation stuff, will put up a link once that's done...)
Click to expand...
Click to collapse
Thank you friend..please post a donation link..I will gladly contribute..
Sent by my Motorola Droid XYBoard MZ617-32 10.1_ICS 4.04
---------- Post added at 11:37 PM ---------- Previous post was at 10:40 PM ----------
Report: v201407062144
Flashed with no problems..
(Install) option works perfectly..to install SuperSU for Root..
Vibrate and screen saver works great..
No SDCard recognized
No OTG-USB recognized
File Manager seems to work
Will boot into recovery from home screen with XPosed..
Will boot to recovery from bootloader..
EDIT: Backup have NOT completed due to lack of free space..
Hope this helps the Dev.
Sent from my 4.4.3_21.23.4
(Unlocked) XT1045 Moto G 4G LTE
http://waynekent.com/page6.html

I'm busy with something else at the moment, could you try the same things with mfastboot boot instead? If not I will look into this soon.

Darkshado said:
I've made some backups, haven't needed to restore yet. I tried to be exhaustive in terms of the partitions you could backup.
Click to expand...
Click to collapse
First try..my backup attempt failed..musta done something wrong myself..I have used TWRP for awhile now (about 1 year)..and have many backups on my other devices..I will try again..lol
EDIT: Backup fail because my device didn't have enuff free space, not your fault..mine only..lol
I will work on freeing up some space and try again..what would be "swell" is if we can choose the SDCard to back up to..and I realize once, if ever that issue is resolved, then we could backup to SDCard like SafeStrap..
Sent from my:
(Jaocagomex debloated)
4.4_19.6.3 (Unlocked)
XT1080M Droid Maxx #2
http://waynekent.com/page6.html
---------- Post added at 12:07 AM ---------- Previous post was at 12:03 AM ----------
Darkshado said:
I'm busy with something else at the moment, could you try the same things with mfastboot boot instead? If not I will look into this soon.
Click to expand...
Click to collapse
I used mfastboot to flash your version..
Sent from my:
(Jaocagomex debloated)
4.4_19.6.3 (Unlocked)
XT1080M Droid Maxx #2
http://waynekent.com/page6.html

Backup and restore worked fine.
The OP needs to be updated
Features:
TWRP 2.7.0.1
should be 2.7.1.0

Looks great, was able to back up boot/system/data to my SD card. Could not flash it, got a mismatched partition size error (I have an XT1045). Boots OK though.
I also noticed there was not an option to back up the recovery partition, like on some other TWRP's I've used.
Awesome start !

Thanks alot!

Darkshado said:
Booting from a computer via mfastboot allows the microSD to work
Click to expand...
Click to collapse
Not for me, but maybe that's a general TWRP issue? I used "mfastboot boot twrp.img", booted fine, battery shows "50+" as expected, I can backup data, system etc., but can't mount/access MicroSD. It's a Transcend 32GB Class 10 UHS1 MicroSDHC card. Works fine in the booted system, also accessible from PC when android is connected . DiskInfo app shows filesystem as "vfat".

I can confirm backup to external sd card working only if you boot from PC (fastboot boot recovery.img)... Using a 32GB sandisk ultra class 10...
Tested backup and tested restore... all fine...
Will we ever be able to backup to external SD without using a PC? Will the developer fix this issue or it´s some kind of limitation from this phone?

eteles said:
I can confirm backup to external sd card working only if you boot from PC (fastboot boot recovery.img)... Using a 32GB sandisk ultra class 10...
Tested backup and tested restore... all fine...
Will we ever be able to backup to external SD without using a PC? Will the developer fix this issue or it´s some kind of limitation from this phone?
Click to expand...
Click to collapse
That is really up to TWRP and CWM. They both need to have some interest in officially supporting this phone. So far they have both showed very little interest and I think that is because there is some confusion about how critical the differences between the Moto G and the Moto G 4G LTE are. While the hardware differences are few, the ones that do exist are critical. XDA forums have not done the users of this phone any favors by including a development thread under the Moto G parent thread. You cannot use custom recoveries or custom ROM's created for the Moto G on a Moto G 4G LTE. I do understand that that that means that the differences are really in development but by not providing this phone it's own parent thread, XDA is helping to perpetuate the myth that the phones are the same. This in turn simply supports the thought over at TWRP and CWM that the existing Moto G custom recovery will work.

@USCanthony I've spent a bit of time over on Freenode talking with a few TWRP/Omni devs, I think everyone over there is aware that we're dealing with two different devices, and their feedback is that it should be relatively easy to cater to both falcon and peregrine from common trees once our device is brought up.
@eteles I am very much interested in solving this as well, but I'm navigating uncharted waters so don't expect it to be quick or easy.
Supporting a large number of devices is difficult, more so if you don't have all the devs on your team with ready access to one exemplar. Given the volunteer/community nature of FOSS projects like Omni, CM and TWRP, you need people with the technical skills, resources, time and devices to pull this off for every single device out there.

I have asked another developer with some experience with TWRP to take a look at the code if he can and has the time...
Let's see if he can help... One problem: he doesn't have the phone...

@Darkshado
Here's the answer from the developer I talked about (@SciBee)... Hope it helps getting the external SD to mount correctly without PC booting:
"Tried to put my answer directly to XDA but as I did not post >10 BlaBla posts in the BlaBla section I was not allowed to do so
However - I suggest to change a line in his twrp.fstab file from
Code:
/sdcard1 auto /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="microSD card";storage;wipeingui;removable
into
Code:
/sdcard1 vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="microSD card";storage;wipeingui;removable
maybe the auto detection of the filesystem fails when booting off the internal ROM.
It's a little strange that this works if booted via fastboot
There also is a USB-OTG entry. Did you try to run the backup to a USB Stick connected to OTG - if the phone supports OTG at all?
And, what people also miss some times - you have to select the storage in TWRP before you run the backup.
Regards"

I had initially put the SD card as auto, and while I haven't had the time to try it again as vfat, the Moto E's (condor) TWRP build has the external listed as vfat in its fstab.twrp.
The phone supports OTG, that's a known fact. (And I've got an adapter to test as needed.)
I know how to change storage in TWRP, the entries are visible, but listed as 0MB and selecting them does nothing useful.
If it isn't as trivial as changing the "auto" to "vfat" then I don't really know what to make of this, it would imply the issue is somewhere in the kernel or device tree blob code.

Darkshado said:
I had initially put the SD card as auto, and while I haven't had the time to try it again as vfat, the Moto E's (condor) TWRP build has the external listed as vfat in its fstab.twrp.
The phone supports OTG, that's a known fact. (And I've got an adapter to test as needed.)
I know how to change storage in TWRP, the entries are visible, but listed as 0MB and selecting them does nothing useful.
If it isn't as trivial as changing the "auto" to "vfat" then I don't really know what to make of this, it would imply the issue is somewhere in the kernel or device tree blob code.
Click to expand...
Click to collapse
I´ve passed this info to him... I´ve confirmed USB OTG is working inside recovery too, but only when booting from PC, like the external SD...
Would you change auto to vfat and see what happens, please? It´s the only thing we can do right now?
thanks
EDIT: I've done some commands in the terminal and showed the logs to Scibee... He said the only thing there's being detected is the internal nand, so there's no way for TWRP to mount it like this... In the other hand, he has no idea why everything works when booting from PC using fastboot...
This is a real mystery...... We need some quite experienced developers here...

Related

[RECOVERY] Safestrap for Droid 3 [2012/10/17: Version 3.05 SD BUGFIX]

SAFESTRAP v3.05 (2nd-System Bootstrap / Recovery)
PRIOR TO UPGRADING TO V3.x FROM V2.x MOVE THE /sdcard/safestrap FOLDER FROM YOUR /sdcard TO THE /sdcard-ext. THIS OPENS UP VALUABLE INTERNAL EMMC SPACE WHERE ROM SLOTS ARE CREATED. AND KEEPS YOUR V2 BACKUPS SAFE IN CASE YOU WANT TO REVERT TO V2 AND USE THEM TO RESTORE.
** INSERT STANDARD DISCLAIMER: I'm not responsible for any damage you do to your phone using my tools. Always have a fastboot available for disaster recovery. **
Download the "Droid3Safestrap-3.05.apk" Installer Here for "DROID 3"
FOLLOW THESE INSTRUCTIONS: How to Safestrap
[ DOUBLE-CHECK you have the DROID3 VERSION ]
CHANGES:
[10/17] (3.05) Fixed SD card / emmc sharing in recovery (UMS)
[10/17] (3.05) Fixed recovery installation/removal from ROM-slots
[10/14] Updated to v3.04 BETA.
[10/14] Recovery is now based off TWRP 2.2.2.1 (fully featured touch-based recovery)
[10/14] Can create up to 4 Virtual ROM-slots to flash ROMs to and when "Active" ALL TWRP functions affect that ROM-slot (For example: Flashing .zips, Backup and Restore)
[10/14] Nearly instant swapping from ROM to ROM
[10/14] User selectable data partition sizes during ROM slot creation: 1GB, 2GB or 3GB
[10/14] ROM slots are saved on the internal emmc space so that preinstall and webtop partitions are no longer used and shouldn't break OTAs.
[10/14] Charging in recovery
[10/14] Supports "Reboot Recovery" from Android OS
Entry to recovery via Splashscreen on boot-up. The screen stays up for around 8-10 seconds and if you hit the menu button, it takes you to Safestrap Recovery.
SPECIAL THANKS TO:
The entire TWRP team who has built an AMAZING recovery system.
The testers which have helped in past and present versions of Safestrap, knowing that it could mean they brick their devices.
As always, let me know what you think!
A quick note about why I made a MotoBlur 5.6.890 ROM .zip for Safestrap:
1. This is the stock version of our Phone's software. If you want to swap back and forth between CM7 and the standard software, but NOT turn off "Safe System" then you need a stock ROM to use. This is it.
2. Devs can use this ROM as a sort of base for making their skinned ROMs without fear of bootlooping into an SBF. Feel free to tweak and hack away.. nothing you can do to the ROM will force you to fastboot restore. At worst you're looking at a battery pull -> bp-tools -> recovery -> restore.
3. I know some people are checking dev servers for future Moto updates. In theory I will pull the /system images from those updates and put out updated MotoBlur ROMs in the future as a way of test driving upcoming Moto patches w/o fear of leaving yourself stranded on an upgrade path that won't be supported.
So, im just curious, if I wanted to...
I could run say steel droid, then install safestrap, flash cm7,
And by turning safestrap off/on, I could technequally go back and forth
between 2 custom roms? Or do I have to keep the /system partition clean?
Sent from my DROID3 using Tapatalk
Actually the idea for Safestrap is to keep the main system clean.
I'm working with ChevyCam to get a Safestrap version of SteelDroid. Then you can use Safestrap exactly like regular recovery where you would swap from ROM to rom via backup and restore. The advantage being your method of recovery entry and ROM booting is always protected.
Great news !!!
Safestrap works on the XT883 rom too at least w/o the ota update, I'm going to test it on the updated system.
Thanks so much for clarifying, and thanks a million times over for all the great work you've selflessly done for the Droid3 community. I look forward to future CM7 updates.
hey hashcode, just a clarification, we can use safestrap like koush's bootstrap, but we just must turn safe system off right? cause your post makes it seem as if we cant do this
Right now, zips applied with Safestrap are applied to the 2nd-system only. In theory I could make some adjustments to allow for applying zips to the original system as well.. and while I understand the idea of "dual booting" a phone seems fantastic, it's really just an unrecoverable bootloop waiting to happen.
I'd rather that Droid 3 users turn on "Safe System" and never turn it off again (or need to). If all of our ROMs were installable via Safestrap I really feel that we would see alot less "I've bootlooped" postings on the boards.
For the recovery portion of Safestrap: it does NOT backup the original system. Only the 2nd-system, data and cache partitions. (Remember the idea is that you basically root your original system, toss on Safestrap and then enter recovery and toss a .zip onto your 2nd system)
I'm considering changing this in the next version of Safestrap so that backups from Safestrap can be used for full system recovery.
Another question with which to bother you...
When you have the option to do a backup, will you have the ability to choose the destination where the backup is stored as well as the location from where the backup can be restored (either internal or external storage)?
Thank you for your time.
Excellent work, I think this is a fabulous idea and should be the de facto standard for these locked devices. Were you still thinking about using a 2nd data/cache partition as well?
I think it would be pretty sweet if you could loopback mount file system images stored on internal storage for the system/data/cache partitions to implement a proper and safe multiboot system. I don't know how much of a performance hit this would take though.
Anyway, the one suggestion I would make about backing up the original system is to not do it as part of the regular backup/restore. Since system should rarely change, it'd be a waste of time and storage space to back it up every time. Could you either make it a separate option, or perhaps only back it up if the partition's checksum changed?
Besides, if you hose your system and need to restore it, you're probably not going to be using this recovery anyway.
The Solutor said:
Great news !!!
Safestrap works on the XT883 rom too at least w/o the ota update, I'm going to test it on the updated system.
Click to expand...
Click to collapse
I can confirm it works on the updated system too, btw for some odd reasons I'm unable to do a nandroid backup.
I''m investigating what's going on...
So in order to switch to another ROM (from CM7), that is not Safestrap compatible, I just need to toggle safe mode in recovery?
Sent from my DROID3 using XDA App
Yes. But beware of bootloops caused by not wiping your data between ROM switches.
To prevent that from happening you currently need to maintain copies of your data via backup/restore.. This will get addressed in the next version of Safestrap.
I have a version of Steel Droid that is supposed to be safestrap compatible. Im uploading it now. Will test it really quick, to be sure, and if its all good, will post a link!
The Solutor said:
I can confirm it works on the updated system too, btw for some odd reasons I'm unable to do a nandroid backup.
I''m investigating what's going on...
Click to expand...
Click to collapse
Ok I spoke too soon, backup and restore doesn't works on XT883
The backup folder is created correctly on the SDcard, the backup process starts normally with the /system partitons and then the process fails telling that there was an error while backing up the system partition.
Hashcode do you have any idea ?
The only differences in the partitioning between the two systems are the mount options
this is the 862
/dev/block/system on /system type ext3 (ro,noatime,nodiratime,barrier=1,data=ordered)
and this the 883
/dev/block/system on /system type ext3 (rw,relatime,barrier=1,data=ordered)
Do we install the MOTOBLUR Rom via safestrap or can we install it via bootstrap if coming from another Rom?
Sent from my DROID3 using XDA App
I guess it's safe to assume that this is not OK for international Droid3's like the XT860 / ME863?
Just a few short hours later I'm feeling adventurous, but the backup step indicates the MD5 generation failed. Any ideas?
Sent from my DROID3 using XDA App
LaZiODROID said:
I guess it's safe to assume that this is not OK for international Droid3's like the XT860 / ME863?
Click to expand...
Click to collapse
There would probably be radio issues.
Joe.cotto said:
Do we install the MOTOBLUR Rom via safestrap or can we install it via bootstrap if coming from another Rom?
Sent from my DROID3 using XDA App
Click to expand...
Click to collapse
This MotoBlur ROM is specifically for Safestrap to run as 2nd-system.

[THOR/RECOVERY LOCKED] Safestrap Recovery v3.72/v3.75 [B02 2014-07-03]

ATTENTION: I will be stopping official Safestrap support on 9/1/2014. For more information please see:
https://plus.google.com/111109372727398356624/posts/AtoJ3xLj35b
*** DISCLAIMER ***
I work on projects that may brick your device. Don't sue me, hate me or try and kill my dog if that happens. I will feel bad the community will feel bad and hopefully we'll find a way to get you going again. But, the very nature of my projects involves a certain amount of risk taken by YOU. And by using the projects that I work on, you've accepted that fact.
PLEASE PLEASE BE VERY CAREFUL WITH SAFESTRAP!!
MAKE A BACKUP OF STOCK RIGHT AFTER YOU GET SAFESTRAP INSTALLED SO THAT YOU HAVE SOME KIND OF DISASTER RECOVERY.
THEN YOU CAN RESTORE IT TO A ROM-SLOT (AFTER YOU MAKE ONE).
ONLY MODIFY ROM-SLOT FILES. LEAVE YOUR STOCK ROM ALONE!!
WARNING: THERE IS AN UNKNOWN ISSUE WHERE IF YOU HAVE ENCRYPTION ENABLED AND INSTALL SS IT BOOTLOOPS. IF YOU FIT THIS DESCRIPTION PLEASE STAY AWAY FROM SAFESTRAP FOR NOW.
UNKNOWN ISSUE: If you try and start Wifi and the device crashes/reboots, try turning on bluetooth prior to enabling wifi and see if that works.
CURRENT PROJECT STATUS:
BETA-STABLE
WHAT IS SAFESTRAP?
Safestrap is a Bootstrap / Recovery for locked bootloader phones. The goal is to avoid touching your primary system (I'll call this "stock" system) and only flash or make large changes to another place on your phone that Safestrap treats as a "2nd system" (in this case, it's a series of virtual ROM slots located on the internal emmc area: "/sdcard"). Once installed, you will see a "Splashscreen" giving you the option to hit "menu" to enter recovery. The recovery portion of Safestrap is now based on TWRP 2.7.x.x (a touch based recovery) and you can perform .zip installs, backups and restores here. The additional features I've added to TWRP are mostly located under the "Boot Options" menu:
Here you can create virtual ROM-slots for flashing ROMs. These ROM-slots allow for different sizes of /system, /data and /cache partitions. The defaults *SHOULD* be good enough for flashing the stock-based ROMs.
NOTE: The bigger you make these partition the less room you will have to make other ROM-slots.
You can activate a new ROM-slot by choosing the slot you wish to make active and then selecting the "Activate" button. Once active, you will see the "rom-slot#" up in the top of the screen shown in green. If you make the "stock" ROM active, then you can see it in the top shown in red.
Once a ROM-slot is active, all actions you would normally perform using TWRP are directed to that ROM-slot. For example, "Install" to flash a .zip, backup and restore.
For more information you can read up here:
http://blog.hash-of-codes.com/how-to-safestrap/
HOW DO I INSTALL SAFESTRAP?
Requirement: Rooted w/ SuperSU installed
Requirement: Allow APK install from Unknown Sources
Download the Safestrap APK
Find the APK using a Filemanager tool and open it on your device, then click "Install".
(If updating from an existing Safestrap you might be warned that this will over-write the existing installation. Click the "Yes" equivalent to this message.)
Once installed, open up the Safestrap application as you would any other app.
Agree to the disclaimer that you won't try to sue me and hunt me down with a rifle if you manage to break your phone..
Then use the "Install Recovery" button. You should see the current version down in the lower left corner of the window. And the "Status:" should say "Installed" when you're done.
From there you can reboot and you *should* see a new splash screen during the boot up. While this is showing you can enter Safestrap Recovery using the [ menu ] button.
That's it for the installation! Read below for a brief overview of Safestrap Recovery v3.x
HOW DO I ENTER RECOVERY?
During each reboot a splashscreen will be displayed showing whether the device is running a rom-slot or on the "Stock ROM".
Press the button shown on the screen to either enter "RECOVERY" or "CONTINUE" booting.
HOW DO I UPGRADE SAFESTRAP?
Push the APK up to your sdcard.
Boot back into the "stock" rom-slot.
Go into your old Safestrap app and use the "Uninstall Recovery" button
Open an "explorer" of some sort (ESFileExplorer, etc)
Browse to where you pushed the APK
Click on it and install like normal
Once installed, open the APK
Grant SU access
Use the "Install Recovery" button
All set, now you can reboot and re-activate whatever rom-slot you were using
DOWNLOADS:
CONFIRM YOUR STOCK OS VERSION BELOW AND THAT YOU ARE USING THE KINDLE FIRE HDX 7" (THOR)
[13.3.2.1 and earlier] LATEST FILE: Safestrap-Thor-3.72.apk
[13.3.2.3.2 and later] LATEST FILE: Safestrap-Thor-3.75-os3.2.4-B02.apk
Mirror 1: Crackflasher Download
Mirror 2: Goo.im Download
Here's an amazon-os .zip that can be used on rom-slots for re-flashing the OS -- MUST MATCH STOCK ROM:
THOR ONLY (HDX 7") 13.3.1.0: Download from goo.im
md5sum: 24fee10d8c6b0dbf583465baa938e842
It's the straight Amazon OS:
not DeOdexed
will not stop OTAs
is not rooted
the only changes I made, were to strip out the boot.img or modem.img flashing stuff.
To root, I recommend flashing SuperSU.zip from here and flash in Safestrap to the active rom-slot after flashing the ROM:
http://download.chainfire.eu/supersu
As of version 3.x, Safestrap Recovery is now based on TWRP. For more on TWRP you can visit their website: http://www.teamw.in/
WARNING: Safestrap is heavily modified to be "Safe" for your device. Do not download TWRP from their website and expect it to work the same way. Also TWRP does not support Safestrap, tho some issues that may come up will be TWRP dependant, please try and contact myself or look on the forums for your device for answers before hunting down TWRP people. They won't be able to help w/ Safestrap specific questions.
For the purposes of direct user testing I've established a channel on freenode.net IRC: #safestrap
I'm in the channel mostly all the time, but may not be active for discussion.
Special Thanks To
DeesTroy & TeamWin for all their hard work making TWRP such a fantastic recovery
For those that missed it in the 1st post:
PLEASE PLEASE BE VERY CAREFUL WITH SAFESTRAP!!
MAKE A BACKUP OF STOCK RIGHT AFTER YOU GET SAFESTRAP INSTALLED SO THAT YOU HAVE SOME KIND OF DISASTER RECOVERY.
THEN YOU CAN RESTORE IT TO A ROM-SLOT (AFTER YOU MAKE ONE).
ONLY MODIFY ROM-SLOT FILES. LEAVE YOUR STOCK ROM ALONE!!
KNOWN ISSUES WHEN USING ROM-SLOTS (The ROMs are kept on loop device mounted partitions)
1. In theory you will lose an extra 3-4 percent battery compared to normal usage from 100% to 0% due to the extra read/write work involved when using ROM-slots.
2. The /data partition is kept separate from the "/sdcard" contents on SS ROMs. This causes the Storage settings to only show the size of the loopback data partition and then it shows "used" which includes the "sdcard" + /data so this can look odd at times (larger usage than partition size). It doesn't have any adverse affects that I know of.
3. No custom kernel flashing support at this time. Don't try it. It won't work. All kernels need to be signed by Amazon at the moment.
CHANGELOG:
[v3.75-B02]Bugfix rom-slot booting
[v3.75-B01]TWRP 2.7.1.0 update + display fix for 13.3.2.3.2/13.3.2.4
[v3.72]TWRP 2.7.0.0 update. *** This includes a bugfix for backup time showing correctly ***
[v3.72]Raised /data partition size to 16gb
[v3.72]Swapped "Reboot" -> "Download" mode to "Reboot" -> "Bootloader" (places you in fastboot mode)
[v3.70-B01]Seems like I have a solid fix for the "snow" effect when getting into Safestrap sometimes
[v3.70-B01]System partition now matches stock EXACTLY. You can't even change it in the settings due to the way I'm creating it during rom-slot creation. It's not a bug, that's on purpose. That being said, there should be plenty of room in that space to do what we want.
[v3.70-B01]Battery % now being displayed correctly in recovery
[v3.70-B01]Updated to latest Safestrap sources
[v3.65-B01]Initial release for Thor (Kindle HDX 7")
Congrats, Hash!
Sent from my iPod touch using Tapatalk
Nice, just got my my hdx last night. Will let you know my results once I'm not at work .
Thanks!
Sent from my Nexus 4 using Tapatalk
things are moving well, many thanks for your efforts!
I'm new to safestrap world. Can you tell me if there are downside of any sort using safestrap?
I mean, are roms installed via safestrap slower or limited under any aspect? I know it's the only way atm, but just asking...
zooster said:
I'm new to safestrap world. Can you tell me if there are downside of any sort using safestrap?
I mean, are roms installed via safestrap slower or limited under any aspect? I know it's the only way atm, but just asking...
Click to expand...
Click to collapse
GOOD QUESTION!
The ROMs are kept on loop device mounted partitions. This causes a few known issues:
1. In theory you will lose an extra 3-4 percent battery compared to normal usage from 100% to 0% due to the extra read/write work involved when using ROM-slots.
2. The /data partition is kept separate from the "/sdcard" contents on SS ROMs. This causes the Storage settings to only show the size of the loopback data partition and then it shows "used" which includes the "sdcard" + /data so this can look odd at times (larger usage than partition size). It doesn't have any adverse affects that I know of.
3. No custom kernel flashing support at this time. Don't try it. It won't work. All kernels need to be signed by Amazon at the moment.
Hashcode said:
GOOD QUESTION!
The ROMs are kept on loop device mounted partitions. This causes a few known issues:
1. In theory you will lose an extra 3-4 percent battery compared to normal usage from 100% to 0% due to the extra read/write work involved when using ROM-slots.
2. The /data partition is kept separate from the "/sdcard" contents on SS ROMs. This causes the Storage settings to only show the size of the loopback data partition and then it shows "used" which includes the "sdcard" + /data so this can look odd at times (larger usage than partition size). It doesn't have any adverse affects that I know of.
3. No custom kernel flashing support at this time. Don't try it. It won't work. All kernels need to be signed by Amazon at the moment.
Click to expand...
Click to collapse
Thank you for the answer.
I'm not yet an owner of this tab. I'd really want to buy this beast (8.9), but the fireOS is stopping me. So I'm eagerly awaiting for a custom rom. Locked bootloader "turned me off"
So, 1) do you think safestrap can be a solution for a real daily driving custom rom (I guess CM)? Or just something to try/play with?
2) is there any chance/hope to unlock that armored bootloader?
Awesome work Hashcode. You've made two of my devices bearable to live with.
Thanks so much Hashcode!!
zooster said:
Thank you for the answer.
I'm not yet an owner of this tab. I'd really want to buy this beast (8.9), but the fireOS is stopping me. So I'm eagerly awaiting for a custom rom. Locked bootloader "turned me off"
So, 1) do you think safestrap can be a solution for a real daily driving custom rom (I guess CM)? Or just something to try/play with?
2) is there any chance/hope to unlock that armored bootloader?
Click to expand...
Click to collapse
Sorry, but not yet. I talked to Hashcode and he was saying that since we can't use custom kernels yet, we can't use AOSP (Paranoid Android, Cyanogenmod, AOKP, CarbonROM, etc.) roms. It's okay, though. I plan on making a rom that will give you as close to CM experience as possible while still staying on an Amazon ROM.
As for the question regarding bootloader unlock, I'm not sure. I'm still in the process of experimenting with different things. I haven't had time recently though.
Sent from my iPod touch using Tapatalk
Reporting back - Safestrap worked fine for me. Haven't done anything but make a backup of stock yet, but everything seems to be in order. Looking forward to have something to flash .
Thanks again.
Sent from my Nexus 4 using Tapatalk
Gotta love this guy
Sent from my XT926 using Tapatalk
---------- Post added at 11:55 PM ---------- Previous post was at 11:29 PM ----------
HASHCODE I mean. Of course. I'm so giddy...oops I fell off my chair.
Sent from my KFTHWI using XDA Premium 4 mobile app
i dont own one and prob never will but awesome work as always bro!!
Installed and currently running a backup. Would it be a good idea once we get a flashable rom to uninstall all apps from stock to make as much free space as possible? Thanks again Hash for your hard work on this next best thing to an unlocked bootloader.
Noticed that there is some graphics driver issues leaving static / snow on occasion. Other than that, great tool, it saved me once already. Thanks Hashcode!
_Alex_ said:
Noticed that there is some graphics driver issues leaving static / snow on occasion. Other than that, great tool, it saved me once already. Thanks Hashcode!
Click to expand...
Click to collapse
Static / Snow in recovery?
Sent from my XT1060 using Tapatalk
Hashcode said:
Static / Snow in recovery?
Sent from my XT1060 using Tapatalk
Click to expand...
Click to collapse
This happens to me as well. But only if i start recovery by pressing the button on boot. If i start it from the "reboot to recovery" button in the app, it looks fine.
Sent from my KFTHWI using XDA Premium 4 mobile app
Hashcode said:
Static / Snow in recovery?
Sent from my XT1060 using Tapatalk
Click to expand...
Click to collapse
If I go into the safestrap app then reboot into recover everything works fine and looks fine. If I shutdown the hdx then enter the recovery on power up it looks snowy BUT is still usable. Check it out.

TWRP, ROOT and disable Encryption for Yoga Tab 3 Plus (YT-X703F/L)

TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our IRC channel or on forums like xda-developers.
Team Win was originally formed to work on porting WiMAX to CM7 for the HTC EVO 4G. After our work on the EVO 4G we wanted to work on a project that would work on more devices than just the EVO 4G and we settled on working on a recovery. Today TWRP is the leading custom recovery for Android phones.
A custom recovery is used for installing custom software on your device. This custom software can include smaller modifications like rooting your device or even replacing the firmware of the device with a completely custom "ROM" like OmniROM
Click to expand...
Click to collapse
WARNING!!! Be careful what you do here. One mistake and the device is soft-bricked. I take no responsibility for bricked devices, lost warranty or even OTAs not working!! Booting and/or flashing files from this post is on your own risk.
Requirements
Unlocked bootloader
Yoga Tablet 3 Plus with and without LTE (YT-X703L and YT-X703F) are supported
Known Issues
WARNING! Our device uses dm-verity (verified boot). The system partition should remain read-only. Otherwise a bootloop will occur. You can flash my modified kernel or SuperSU to resolve this but OTA's are no longer possible! You have to restore a factory image or clean system backup to receive OTAs
Potentially DRM keys are lost! Pure unlocking and rooting does not cause the issue. However, there have been reports of lost DRM keys by some unknown action. It is advised to act with caution. Losing your DRM keys can lead to issues with some apps which use DRM which could then have limited or no functionality. E.g. Netflix will only stream in SD (480p). You can check with DRM info if you still have L1 security level which means DRM keys are intact.
Download
Official TWRP for YT-X703F (Wifi): twrp.me
Official TWRP for YT-X703L (LTE): twrp.me
Instructions
Install fastboot and adb on your PC, e.g. from here
Enable developer options and in there select to unlock your bootloader by enabling OEM unlock and enable USB debugging
Connect your PC to your tablet and run
Code:
adb reboot bootloader
using adb on command line. The tablet will reboot into bootloader mode where you will only see the Lenovo logo. Now you use
Code:
fastboot oem unlock-go
to unlock. This will factory reset your device
Setup the tablet again and reboot again to the bootloader
Then run
Code:
fastboot boot twrp-3.2.1-0-yt_x703f.img
to temporarily boot into TWRP. You can also flash if you are sure
Select to keep system read only when TWRP starts to avoid modification which will make OTAs impossible
Optionally flash SuperSU or Magisk in TWRP which should install system less. Keep OEM unlock enabled if you flash or modify anything
Additional Downloads
Backup of original boot, recovery and system image for YT-X703F S000936: MEGA
Modified Boot image with forceencrypt disabled and it switches off CABC fully. You need to factory reset after flashing to format data without encryption boot_yt_x703f_s000963_noforceencrypt_cabc.img (YT-X703F S000963) / boot_yt_x703l_s000963_noforceencrypt_cabc.img (YT-X703L S000963) . Use
Code:
fastboot flash boot boot_yt_x703f_s000963_noforceencrypt_cabc.img
to flash the kernel in fastboot. SuperSU or Magisk should be flashed afterwards if root is desired.
Full factory images with flash tool and instructions YT_X703F_S000689, YT_X703L_S000704, YT_X703F_S000725, YT_X703L_S000725, YT_X703F_S000734, YT_X703L_S000734, YT_X703L_S000744, YT-X703F_S000744, YT-X703L_S000963, YT-X703F_S000963 and OTA updates: MEGA (These images contain the individual boot, recovery and system images that you need to restore from any modification mentioned above)
System Updates (OTA)
In order to successfully apply Lenovo system updates after root you have to restore the original boot, recovery (if you flashed TWRP) and system partitions from your current installed version (e.g. S000744) for your variant of the tablet. This will NOT delete your apps and data but will unroot. Note that OTAs are block based and always check the contents of most of the partitions. This means that all of these partitions (except your data) have to be original and have to be on the exact same version (e.g. S000734) for the update to succeed.
See here for instructions how to restore the partitions with fastboot.
Credits
@pogo1975 - for providing the factory images and fixing the AV sync issue
@launcher20 and @deecept - for testing the LTE version
TeamWin
Changelog
v4:
Now official TWRP with version 3.0.3-0
v3:
enable full disk encryption for access to the encrypted data partition
update TWRP kernel to latest S000725 version
v2:
add support for LTE variant (YT-X703L)
add further mount points to be able to backup more data
Thanks buddy! You are an absolute champion! Tell me what you need me to do and I'll do it before rooting and up load what you need.
Doing good work here.
Who wants to bet on a race between matshias and Lenovo support for who can fix the issues with this device first?
That's great and fast, I'm thinking tab 3 plus is getting hot now.
Great to see there is something moving for the yoga now. You think it will support the lte Version anytime? Or maybee even lineageos?
so you know, i've managed to install xposed thanks to this thread https://forum.xda-developers.com/xposed/unofficial-systemless-xposed-t3388268 and is working well.
wayney said:
Thanks buddy! You are an absolute champion! Tell me what you need me to do and I'll do it before rooting and up load what you need.
Click to expand...
Click to collapse
Well if you haven't modified anything yet then it'd be great if you can boot into TWRP with system read only and then connect via ADB to the tablet with a big SD card inserted which has enough free space (4 GB).
The run the following command
Code:
dd if=/dev/block/bootdevice/by-name/system of=/sdcard1/system.img
This will take a while. Then copy the file system.img from your SD card to a PC and zip it (or 7z, rar). Then upload it
Gogoho said:
Great to see there is something moving for the yoga now. You think it will support the lte Version anytime? Or maybee even lineageos?
Click to expand...
Click to collapse
The LTE variant is probably very similar and it wouldn't be much work. But I don't own the device, so I would need some help. So someone with the LTE variant who is not afraid to experiment with fastboot and adb and who can provide me with the details needed I am happy to compile a TWRP for it.
LineageOS is much much more work than TWRP. For an experienced cyanogenmod/LineageOS dev it is not much of a thing and would take only a few days, especially since it is a Qualcomm device and there are already ports for devices with SD 652. But for me this is new as well so it'll take much longer. As soon as I have time I'll look into it.
matshias said:
Well if you haven't modified anything yet then it'd be great if you can boot into TWRP with system read only and then connect via ADB to the tablet with a big SD card inserted which has enough free space (4 GB).
The run the following command
Code:
dd if=/dev/block/bootdevice/by-name/system of=/sdcard1/system.img
This will take a while. Then copy the file system.img from your SD card to a PC and zip it (or 7z, rar). Then upload it
Click to expand...
Click to collapse
You forgot to tell me to go to adb shell :silly:
DD is currently doing a dump, non interactive so I hope it is still alive, it has been close to 1 hour so far. I will upload the clean image once it is done and await further instructions from you. :good:
I'm in Perth, Western Australia (UTC +8:00), so we might be playing timezone tag.
wayney said:
You forgot to tell me to go to adb shell :silly:
DD is currently doing a dump, non interactive so I hope it is still alive, it has been close to 1 hour so far. I will upload the clean image once it is done and await further instructions from you. :good:
I'm in Perth, Western Australia (UTC +8:00), so we might be playing timezone tag.
Click to expand...
Click to collapse
I think I forgot one more thing. The external SD card needs to be mounted in the TWRP menu. I believe it's not mounted automatically. So the DD command does nothing. It shouldn't take that long. Sorry about that!
It's UTC +1:00 here in Germany
matshias said:
Well if you haven't modified anything yet then it'd be great if you can boot into TWRP with system read only and then connect via ADB to the tablet with a big SD card inserted which has enough free space (4 GB).
The run the following command
Code:
dd if=/dev/block/bootdevice/by-name/system of=/sdcard1/system.img
This will take a while. Then copy the file system.img from your SD card to a PC and zip it (or 7z, rar). Then upload it
Click to expand...
Click to collapse
matshias said:
I think I forgot one more thing. The external SD card needs to be mounted in the TWRP menu. I believe it's not mounted automatically. So the DD command does nothing. It shouldn't take that long. Sorry about that!
It's UTC +1:00 here in Germany
Click to expand...
Click to collapse
I was wondering why nothing was happening after 3 hours.
I have rared it and it is uploading at the moment, it is going to take 5 hours.
wayney said:
I was wondering why nothing was happening after 3 hours.
I have rared it and it is uploading at the moment, it is going to take 5 hours.
Click to expand...
Click to collapse
Wow ok. Well thanks a lot for your efforts. This will not just help me but anyone with modified system partition to get OTAs.
Unmodified System Image
Here is the vanilla image via DD of the system partition.
Software Version : YT-X703F_160817
Android Version : 6.0.1
Security Patch Level : 1 September 2016
Kernel Version : 3.10.84-perf
Build Number : YT-X703F_S000689_161105_ROW
Tablet purchased retail from Australia.
https://mega.nz/#!bos0GIjI!vcO9dpSJX...Grjb7k3z6mjnqA
wayney said:
Here is the vanilla image via DD of the system partition.
Software Version : YT-X703F_160817
Android Version : 6.0.1
Security Patch Level : 1 September 2016
Kernel Version : 3.10.84-perf
Build Number : YT-X703F_S000689_161105_ROW
Tablet purchased retail from Australia.
https://mega.nz/#!bos0GIjI
Click to expand...
Click to collapse
Perfect!!
Can you send me the key for the download via PM or post it?
matshias said:
Perfect!!
Can you send me the key for the download via PM or post it?
Click to expand...
Click to collapse
Let's try that again.
https://mega.nz/#!bos0GIjI!vcO9dpSJXp6cKtdH07Kt0RSaqpqQ7Grjb7k3z6mjnqA
matshias said:
Wow ok. Well thanks a lot for your efforts. This will not just help me but anyone with modified system partition to get OTAs.
Click to expand...
Click to collapse
Thank you guys for spending times on it, it would be wonderful if Lenovo people do thing like this way, too.
In the depths of the Russian Internet i have found this
YT-X703F_USR_S000689_1611051146_Q00237_ROW.zip
https://drive.google.com/drive/folders/0B_jGuhC9WsNfYUZzZmhRY2NhQlU?usp=sharing
it is supose to be complete image to Wifi-Version.
I HAVE NOT FLASHED THIS YET. Do it on your risk.
pogo1975 said:
In the depths of the Russian Internet i have found this
YT-X703F_USR_S000689_1611051146_Q00237_ROW.zip
https://drive.google.com/drive/folders/0B_jGuhC9WsNfYUZzZmhRY2NhQlU?usp=sharing
it is supose to be complete image to Wifi-Version.
I HAVE NOT FLASHED THIS YET. Do it on your risk.
Click to expand...
Click to collapse
Hahaha got to love the dark corner of the Russian internets :laugh:
pogo1975 said:
In the depths of the Russian Internet i have found this
YT-X703F_USR_S000689_1611051146_Q00237_ROW.zip
https://drive.google.com/drive/folders/0B_jGuhC9WsNfYUZzZmhRY2NhQlU?usp=sharing
it is supose to be complete image to Wifi-Version.
I HAVE NOT FLASHED THIS YET. Do it on your risk.
Click to expand...
Click to collapse
If that's real it would have saved me a lot of time finding the loophole in the system to extract the boot and recovery image. But still a great find which will rescue some soft-bricked devices.
matshias said:
If that's real it would have saved me a lot of time finding the loophole in the system to extract the boot and recovery image. But still a great find which will rescue some soft-bricked devices.
Click to expand...
Click to collapse
so long as it's safe and not loaded with malware...

[RECOVERY][EXPERIMENT/TEST] TWRP 3.2.1.x for TF701T

Hi, I don't post much on here but I wanted to share something with everyone since this is one of my fav tablets (before one of my drives crash and the data is lost, lol).
Disclaimer: I'm providing this AS-IS, I've been using this for about a few weeks now and while there may be bugs, it's been working for me and figure I'd share a newer version of TWRP for the TF701T. This will need some testing, I haven't tried flashing a newer rom - just using a "dirty port" of Remix OS I'm using (SK1WG base).
Hopefully this helps someone who loves this lil tegra transformer as much as I do!
I'll post links to source later on but to build this but if anyone wants to try;
-I used a slightly modded version of the zombi-x device tree
-tweaked the rm-wrapper (from the timduru katkiss device tree) so it references the correct includes (I was building under zombi-x 5.1 using omni twrp 8.x)
-Since the device tree was already using a prebuilt kerenel, I plugged the one from the TWRP 2.8.x kang/area51 by sdbags release
-The "rom base" folder I was building under was "zombi-x" 5.1/LP
-and the TWRP sources were from omnirom's oreo/8.x source
Here's a link to my dropbox tf701t folder, I keep a backup in the recovery folder.
I also built a 3.0.0.0 "area51" version, think I found that in the zombi-x repositories also. Both booted, roms I had installed, backups were made and restored under both however I've used the 3.2.1.x version more exetensively.
DROPBOX TF701T LINK!
Anyways, happy holidays everybody! I'll try and keep up with this post and update things when I get a chance, but for now rock on!
PS. Should be able to
Code:
fastboot boot <recoveryimagefile.img>
to test it before flashing permanently with
Code:
fastboot flash recovery <recoveryimagename.img>
PS2. Added images to post for 3.2.1.0 and the "Area51" 3.0.0.0 builds, Enjoy!
PS3. UPLOADED SOURCES! (finally, lol)
DEVICE TREE
-The device tree is still setup to use the prebuilt kernel (I compiled from source posted below this, with gcc 8.x toolchain). If using the kernel source below, use recovery_tf701t_defconfig - otherwise just make sure whatever config you run is setup to use LZMA for ramdisks here.
-Also this device tree is setup to use F2FS, I left the original ext4 fstab files included with a ext4_* prefix if anyone's curious. I'll fix that eventually and split them into 2 branches (ext4-only and f2fs).
KERNEL SOURCE
-This experimental kernel has some tweaks, F2FS support (no encryption), O/C @ ~2.5Ghz, bunch of extra governors (lionheart works nicely), but in it's base form works great for booting recovery.
Hopefully this stuff helps others bulding for this awesome lil tablet! Back to some more compilations while I got time.
UPDATE: F2FS Test (12/30/17)
-Added a recovery build that I have been running for a bit with F2FS support
-Use this with a ROM that supports F2FS, or repack a boot.img with a F2FS kernel and mod the ramdisk (edit fstab to mount /data /system and /cache with F2FS.).
-It supports the usual ext4 and other filesystems, but defaults to f2fs when using the format data and wipe commands (modded fstab on /system /cache /data).
-Also haven't had any issues formatting /cache, or touch not working with this kernel. I'll get around to a normal ext4 version and upload that as it seems to fix the /cache issues.
Just here to say it all works as before and there aren't any new/strange problems. The issues with not being to format /cache and so on without going back and forth to ext4 still persist, though.
hitmancho said:
Just here to say it all works as before and there aren't any new/strange problems. The issues with not being to format /cache and so on without going back and forth to ext4 still persist, though.
Click to expand...
Click to collapse
Glad it works for you too, I noticed the /cache issue also on the other TWRP 2.8.x version posted for this tablet too. One thing that I do (even on the other TWRP) is wipe the partition I want (or change its fs type) first, and if I need to touch another partition then I reboot the recovery and it works.
It's annoying, I'm currently testing building the kernel inline instead of using the 2.8.x kernel (from that other posted recovery) in the device tree. I'm using sources that I know boot, just playing with the configs to see how it plays with TWRP. I ported over the f2fs stuff from the katkiss kernel to mess around with, boots in the rom fine - so if I can get it to boot recovery then the f2fs formatting stuff should work and mount correctly.
Sidenote - one thing I notice with the 3.2.1-0 version is the screen seems to work better, I haven't had the touchscreen not responsive issue I had with the previous TWRP 2.8.x version.
Going for a coffee, I'll play around with it tonight (and remember to upload stuff to my github eventually to share). Long day of work, time to unwind
Small Update (Progress is good!)
So, took some time to dig around why it wasn't booting the recovery when I built from the same (working) kernel source I'm booting the normal android os with. Turns out, most likely due to space savings, the recovery is set to boot LZMA - turned that on in the config and that kernel now booted up recovery perfectly!
I'm rebuilding the kernel, since in my infinite wisdom, I compiled with my selinux disabled kernel - which also worked, but bombed out on any rom zips that ran anything to do with contexts/perms. Good news was F2FS worked mounting, formatting, etc.. Hopefully tomorrow I'll have a selinux friendly f2fs supporting kernel for recovery that'll work.
Random sidenote: I was eyeing the newer kernel drivers (from 4.x), If everything works as it's currently configured, I'll give try backporting the newer stuff and see how she runs. Just wanted to post a small update with some notes just in case anyone in wants to try building it themselves.
Thanks for your work! If you could manage to fix the format issues with current TWRP, that would be excellent. I've never been able to dirty flash due to this pesky recovery problem, I always have to go back and forth to ext3 -> ext4 and then flash clean and restore my apps .. quite a bit of time waster.
silverchairbg said:
Thanks for your work! If you could manage to fix the format issues with current TWRP, that would be excellent. I've never been able to dirty flash due to this pesky recovery problem, I always have to go back and forth to ext3 -> ext4 and then flash clean and restore my apps .. quite a bit of time waster.
Click to expand...
Click to collapse
I need to reformat /system and /cache only - most times. No need to reinstall apps.
You're lucky then, I always end up with errors on dirty flash and format /data also fails, so I resort to changing FS. Sometimes even this gives errors and I need to do it several times until errors are gone.
I just restart recovery and try formatting again.
AmauryRR great work! Please use the memory card of the docking station
Sorry for offtop, but... I saw on your dropbox remixOS. Where I can find info about how to install it? Main theme on tf701t about remix os is not having this. (or i am blind).
I haven't tried flashing a newer rom - just using a "dirty port" of Remix OS I'm using (SK1WG base)
Click to expand...
Click to collapse
Can you, please, describe how it is working?
---------- Post added at 11:22 AM ---------- Previous post was at 11:20 AM ----------
Sasisco said:
Sorry for offtop, but... I saw on your dropbox remixOS. Where I can find info about how to install it? Main theme on tf701t about remix os is not having this. (or i am blind).
Click to expand...
Click to collapse
Yes, please, more info on that!
Tf701t update
Hi AmauryRR,
Any chance you could break the process down step by step for none-IT people like me? i have tried everything but think i have to accept that this is above my pay grade .
i am especially having a difficult time with the boot loader. Indicates the following: "An unknown error occurs, which may be a network......try again later"
i can email you the screenshots as i can't seem to upload them here.
regards
rob
Can someone get me recovery work in android 4.2.2 ,
10.14.1.47 bootloader please?
"" I searched in google all recovery file can't be downloaded''
Any chance of a flashable version of this?

[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?

Categories

Resources