[RECOVERY] [TREBLE] TWRP 3.3.1-0 with Tissot Manager

Giovix92

Recognized Developer
Oct 22, 2015
1,666
1,680
153
Catanzaro, Italy
Thread template from CosmicDan's thread.
About

This is a TWRP Installer ZIP and bootable IMG with extra capability such as Treble-izing and other power-user tools with integrated TWRP-powered submenus that CosmicDan originally called Tissot Manager.
Few months ago, CosmicDan officially decided to leave Tissot development, and his twrp was stuck on 3.2.3. So I decided to update that to 3.3 and convert all the aroma stuff into TWRP-powered menus etc, in order to preserve better future compatibility.

HIGHLY recommended reading and guide for everyone new to Treble - [TREBLE][GUIDE] From Stock to Treble - everything you need to know! by CosmicDan. It also has some general protips hidden within there, for example the seamless/slot system interactions and nuances, so it's worth reading for anyone who wants to be a master of the Android flashing domain ;)


Features:

  • TWRP fully Treble-ready based on 3.3.1-0;
  • Fully compatible with non-Treble devices - can be used as normal without Treble partitioning;
  • Full USB-OTG support;
  • Full MTP support;
  • Optional TWRP Survival function, that works both in hotboot and real recovery;
  • Optional Active slot install method, selectable right before the zip flash;
  • Option to ignore Payload<>Recovery certificate failures (fix for newer LOS-based ROMs);
  • Added a Tissot Manager list item under Advanced Menu, totally built-into TWRP itself that allows you to do:
    • Has the option to shrink Userdata to create Vendor partitions. All relevant partitions will be resized and formatted in one go.
    • Treble-izing will ERASE DATA AND INTERNAL STORAGE COMPLETELY - but your device will stay compatible with all existing non-Treble ROM's
    • Adds a "Patches" section with the following current options:
      1. Patch kernel from Enforcing to Permissive and vice versa
      2. More features coming!
    • All of this info is detailed inside the Tissot Manager GUI.
    • See screenshots in post 2.

Since this is an early version (still stable), some original features from 3.2.3 are still not available. I'll do my best to constantly add new functions when possible!


Instructions

  • Optionally boot the boot-recovery.img to get a temporary TWRP if you don't have it installed, unzipped from TWRP-3.3-withTM-BOOT.zip
    Code:
    fastboot boot boot-recovery.img
    Warning - do not EVER flash this img - hotboot it only.
  • Flash the TWRP Installer. Any slot, any ROM, any existing Recovery - it doesn't matter - it will be installed to both slot kernels.
  • Reboot Recovery
  • Optional - Use the "Advanced > Tissot Manager" option for repartition options and other advanced ROM patches, this time built-in TWRP itself for better compatibility with future versions.


About TWRP survival

Starting from 1.0, TWRP Survival will be able both in hotboot mode 'n real recovery mode. Just tick the checkbox 'n flash!


Download

All downloads (and source code) always at:

https://github.com/Giovix92/twrp_device_xiaomi_tissot/releases


Additional sources not able to be listed in DevBB:
Modified update_engine: https://github.com/Giovix92/android_system_update_engine


What's next?

See [TREBLE][GUIDE] From Stock to Treble - everything you need to know! by CosmicDan for detailed instructions and learning on how to Treble like a pro.


FAQ

Q) After I flash TWRP, I get kicked into a Recovery loop when trying to boot the ROM!
A) This is probably because you have a kernel that does not disable dm-verity. To fix this, flash Magisk.

Q) After I flash TWRP, I get kicked into fastboot when trying to boot the ROM!
A) Your kernel is not Treble-compatible.

Q) How do I update TWRP?
A) Just flash the ZIP installer again, then Reboot Recovery. Note that this will erase Magisk on BOTH slots if you have it installed to either, requiring you to reflash it to one/both slots. See my Treble guide FAQ section for more info on Magisk interaction.

Q) If I shrink Userdata for Treble, will stock and OTA work?
A) I have heard varying results on this. It does for some, not for others. Please assume that this will NOT work.

Q) Can I restore a non-Treble TWRP backup after I repartition for Treble? And the other way around?
A) Yes! In fact, this is the easiest way for using stock ROM on Treble repartition. May also require a custom kernel with dm-verity disabled (see Questions above regarding fastboot kick and recovery loop).

Q) I see "Failed to mount '/system' (Device or resource busy)" red error in TWRP after flashing a ROM
A) You can safely ignore it. You just need to reboot recovery before you can flash anything else (like Gapps) to this ROM. This may occur while flashing in the active slot.

Q) What "Inject TWRP after install" option does?
A) It's TWRP Survival. If you check that checkbox, then after the installation of your zip file the TWRP will automatically reinstall TWRP into your slot.


Bugs Report
If any bug/problem may occur, feel free to report it here! Explain the problem and attach the recovery log. You can get it by going to Advanced - Copy Log and sliding. Kernel log isn't necessary.
If, for some strange reasons, you are unable to get into that menu', connect your phone to PC, open up CMD (aka command prompt) and type:
Code:
adb pull /tmp/recovery.log

Credits and Thanks
- @CosmicDan for tips, helps and his amazing work on TWRP 3.2.3, which I've taken many things from
- @nicknitewolf for his DT
- @chondoe for always being present in testing and reporting bugs/good news
- @flex1911 for DT stuff
- @mauronofrio for inject twrp function

XDA:DevDB Information
TWRP 3.3.1-0 with Tissot Manager, ROM for the Xiaomi Mi A1

Contributors
Giovix92
Source Code: [url]https://github.com/Giovix92/device_xiaomi_tissot[/URL]

ROM OS Version: 9.x Pie
ROM Kernel: Linux 4.x

Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2019-10-01

Created 2019-10-01
Last Updated 2019-10-01
 
Last edited:

Giovix92

Recognized Developer
Oct 22, 2015
1,666
1,680
153
Catanzaro, Italy
Reserved

Changelog:
**10-11-2019**
- Fixed error 28 and 13, this led to some issues while doing a clean installation.
- Restored active slot install functionality, now it's fully working.

**18-10-2019**
Version: 2.0 (MAJOR UPDATE)
- Fixed all kind of problems while flashing:
- Error 51, 15, 31, 17, 35 (postinstall)
- Unability to make a clean flash
- Removed changelog section from Tissot Manager
- Added ADB God Mode
- Added missing binary, required in order to let selinux changer work properly
- Now the 2 new checkboxes won't stay checked anymore after any zip install
- Added system remount to r/w after zip flash in order to flash multiple zips in the same recovery session (like ROM + magisk + gapps and then reboot)
- Fixed linker problem that was causing some options in Tissot Manager to fail
- Smoother experience
Older changelogs:

**01-10-2019**
Version: 1.0
- Initial release with Tissot Manager, now powered by TWRP
- Optional TWRP Survival
- Ability to install into same slot
- Ability to repartititon to Treble and vice versa
- More features coming!
 
Last edited:

manchirua

Senior Member
Sep 22, 2017
150
46
38
Any way to flash it using cosmic dan's twrp? I don't have any pc now
Q) How do I update TWRP?
A) Just flash the ZIP installer again, then Reboot Recovery. Note that this will erase Magisk on BOTH slots if you have it installed to either, requiring you to reflash it to one/both slots. See my Treble guide FAQ section for more info on Magisk interaction.
 
  • Like
Reactions: Anikur Rahman