[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
SUPPORTS USERDATA DECRYPTION on Nougat ROMs!​

​

Just sharing my TWRP mod... This is the latest code from omnirom v.3.1.x-x, still not officially released by TeamWin. No official changelog yet but from the code and gerrit I can see some new features like option to install the new official TWRP App for keeping recovery up to date and flashing images from within Android, FBE encription support, A/B OTA udate support, abd backup support(WIP), kernel log export to /sdcard etc...

Chages from the official TWRP I have made:

1. Unified build for both hydrogen and helium;

2. Based on source from omnirom "android-8.1" repo - Thank you:good:;

3. All unnecessary input devices disabled including virtual mouse;

4. New features added:

- identifies and sets appropriate device props at boot time;

- enable/disable navbar in General Settings which automatically rearranges theme elements for the screen with/out navbar... The extra space is nice;:)

- enable/disable device capacitive buttons in General Settings;

- brightness control slider 0-100% for capacitive button's backlight in Screen Settings;

- Reset Lockscreen feature in Advanced > More... No more "can't unlock my phone after backup restore..." thing...:D

- Temporary disable Xposed framework feature in Advanced > More... for getting out of bootloops caused by bad modules etc.

- statusbar hide/snow keyboard button in Terminal;​

5. Fixed many bugs... Let me know if you find some more;:)

Note: Standard external themes on /sdcard are not supported!

You can help translate this thing by copying below code, translate the strings in green and post it here mentioning your language. I will add it in new build. Thank you!

<!-- Reset Lockscreen function strings -->
<string name="reset_lockscreen_btn">[COLOR="SeaGreen"]Reset Lockscreen[/COLOR]</string>
<string name="reset_lockscreen_hdr">[COLOR="SeaGreen"]Reset Lockscreen[/COLOR]</string>
<string name="reset_lockscreen_note1">[COLOR="SeaGreen"]If you cannot pass Lockscreen security[/COLOR]</string>
<string name="reset_lockscreen_note2">[COLOR="SeaGreen"]after backup restore you should do this.[/COLOR]</string>
<string name="swipe_to_reset_lockscreen">[COLOR="SeaGreen"]Swipe to Reset Lockscreen[/COLOR]</string>
<string name="resetting_lockscreen">[COLOR="SeaGreen"]Resetting Lockscreen...[/COLOR]</string>
<string name="reset_lockscreen_complete">[COLOR="SeaGreen"]Reset Lockscreen Complete[/COLOR]</string>

<!-- v.3.0.3-0 new TWRP App install strings -->
<string name="reboot_install_app_hdr">[COLOR="SeaGreen"]Install TWRP App?[/COLOR]</string>
<string name="reboot_install_app1">[COLOR="SeaGreen"]Would you like to install the Official TWRP App?[/COLOR]</string>
<string name="reboot_install_app2">[COLOR="SeaGreen"]The app can check for new TWRP versions.[/COLOR]</string>
<string name="reboot_install_app_prompt_install">[COLOR="SeaGreen"]Prompt to install TWRP app if not installed[/COLOR]</string>
<string name="reboot_install_app_system">[COLOR="SeaGreen"]Install as a System App[/COLOR]</string>
<string name="reboot_installing_app">[COLOR="SeaGreen"]Installing App...[/COLOR]</string>
<string name="swipe_to_install_app">[COLOR="SeaGreen"]Swipe to Install TWRP App[/COLOR]</string>

v3.1.1-3 new Xposed functions strings:

!-- v.3.1.1-3 Xposed functions strings -->
<string name="advanced2_btn">[COLOR="SeaGreen"]More...[/COLOR]</string>
<string name="xposed_dis_btn">[COLOR="SeaGreen"]Disable Xposed[/COLOR]</string>
<string name="xposed_en_btn">[COLOR="SeaGreen"]Enable Xposed[/COLOR]</string>
<string name="more_hdr">Advanced >[COLOR="SeaGreen"] More[/COLOR]</string>
<string name="xposed_dis_note1">[COLOR="SeaGreen"]If you experience bootloop after Xposed Framework[/COLOR]</string>
<string name="xposed_dis_note2">[COLOR="SeaGreen"]or Module install you should do this.[/COLOR]</string>
<string name="xposed_en_note1">[COLOR="SeaGreen"]Is your Xposed Framework or Module[/COLOR]</string>
<string name="xposed_en_note2">[COLOR="SeaGreen"]related bootloop issue fixed?[/COLOR]</string>
<string name="swipe_to_dis_xposed">[COLOR="SeaGreen"]Swipe to Disable Xposed[/COLOR]</string>
<string name="swipe_to_en_xposed">[COLOR="SeaGreen"]Swipe to Enable Xposed[/COLOR]</string>
<string name="xposed_dis">[COLOR="SeaGreen"]Disabling Xposed...[/COLOR]</string>
<string name="xposed_dis_complete">[COLOR="SeaGreen"]Xposed Disabled[/COLOR]</string>
<string name="xposed_en">[COLOR="SeaGreen"]Enabling Xposed...[/COLOR]</string>
<string name="xposed_en_complete">[COLOR="SeaGreen"]Xposed Enabled[/COLOR]</string>

TODO:

- translate the new stuff - partially done... Too complicated for Google translate. Need help.:rolleyes:

- rescale the UI to use the full screen space with navbar disabled - DONE:good:

- add new option to reset lockscreen security settings after userdata restore - DONE:good:

- maybe add option for quick Xposed enable/disable... Useful for testing when device boot loops after ROM flash; - DONE:good:

- rebuild it including kernel with Android 7.1 branch - DONE:good:

- open to more useful ideas... Just tell me...:)

Changelog:

08-02-2018

- implement extra step to ensure TWRP is not replaced after stock ROM flash(ensure "Mount > Mount system partition read-only" checkbox is cleared before reboot)

- sync with latest v.3.2.3 Omnirom sources

07-07-2018

- sync with latest Omnirom sources

03-02-2018

- fix no controls(navbar and buttons disabled) in some cases

- optimize Navbar disable/enable routine

- dynamic Oreo /vendor partition support if detected(mount, wipe, backup, restore)

- sync with latest Omnirom sources

01-29-2018

- fix and use busybox again for better compatability

- respect "Mount > Mount system partition read-only" setting when renaming stock recovery to prevent boot stuck [MENTION=745709]logo[/MENTION] if system verify flag is set in fstab

- sync with latest Omnirom sources

01-14-2018

- Fix for lame updater-scripts calling missing busybox

- actually set all device specific properties per code name... no more hydrolium unified device properties

01-03-2018

- Fix tar executable

12-17-2017

- Switch to latest android-8.1 TWRP v.3.2.1 branch

10-28-2017

- New Enable/Disable Xposed function(if installed) - Advanced > More, useful if experiencing bootloops after framework/module install.

- Moved Reset Lockscreen function to Advanced > More

10-14-2017

- Auto detect possible use of legacy props by update-binary - no more 2nd flash retry and confusing error/warning messages, any zip just works no matter what Android version it was build with/for

09-05-2017

- fix flashing zips using old update-binary(like my firmware zips). Recovery will retry 2nd flash so ignore 1st try errors!

09-03-2017_OREO

- v.3.1.1-2: Oreo ROMs flashing compatible!

09-03-2017_fixed-2

- fix missing (Up A Level) everywhere when browsing for file/folder

- remove ability for TWRP GUI to restore ADB Backup for now - braking the above

09-03-2017_fixed

- fix device identify props not set at boot

09-03-2017

- remove TWRP app

- add support for mixed adopted storage + removable storage partitioned SD Card

- add ability for TWRP GUI to restore ADB Backup

- recognize and use /persist as settings storage - try to load settings before decrypt

- add Brazilian Portuguese translation

- synced with latest TWRP 7.1 sources

07-07-2017

- kernel: enable EXFAT and NTFS support(does it fix OTG EXFAT/NTFS drives access!?)

- Backup Options: add option to exclude dalvik-cache for faster and smaller backups

- synced with latest TWRP 7.1 sources

06-12-2017

- use more reliable busybox instead of toolbox(should fix flash/backup restore corrupting /system and /modem in some cases - needs testing)

- synced with latest TWRP 7.1 sources

05-14-2017

- updated to v.3.1.1 code

- built with Android 7.1.2 tree

- synced with latest TWRP 7.1 sources

04-29-2017

- digest: Force lower case md5 compare - https://github.com/TeamWin/Team-Win-Recovery-Project/issues/912

- ADB Backup: fix adb restore issues - https://github.com/nijel8/TWRP/commit/d49427ec4917ab11fdd81d7d06f47bf298e56105

- synced with latest TWRP 7.1 sources

04-07-2017

- fix adb error: device unauthorized

- synced with latest TWRP 7.1 sources

03-24-2017

- switch to in-recovery decryption binaries: fixes decryption for MIUI A-6.0 ROMs

- fix reboot when no OS is present

03-17-2017

- fix ramdisk for 2/16GB hydrogen

- Turkish translation for extra functions added

03-14-2017

- v.3.1.0-1 first release

02-21-2017[/B

- removed logcat - was causing unmount /system failure after backup/restore operations

- fix missing libf2fs.so needed by mkfs.f2fs in some cases

02-21-2017

- added logcat capabilities

02-18-2017

- fixed a major issue with encrypted userdata. Now TWRP supports(should, need testing) userdata decryption with all types of passwords - default(hardware), PIN, pattern etc, regardless what ROM is in use.

- build with Lineage 14.1 sources

02-16-2017

- fixed MIUI userdata decryption this time for sure :), kinda pointless b/c MIUI wont boot once TWRP renames /system/boot-from-recovery.p file and /system verify flag present in fstab.qcom... but at least you wont loose your data

- userdata qualcomm hardware decryption works for any ROM now (MIUI/AOSP/Lineage based)

- fixed navbar still visible when disabled in "Select storage" screen

02-12-2017

- added encryption support, now you can backup/restore everything that matters (bootloader, modem, etc) - credit goes to [MENTION=5857684]TheStrix[/MENTION] (as usual):)

01-19-2017

- synced to latest TWRP code, added f2fs encryption support in kernel(full f2fs support yet to come), improved lockskreen reset routine

01-07-2017

- freshly build kernel, old sdcardfs enabled CM14.1 kernel might cause problems...

Update TWRP just in case!!!

12-28-2016

- added Chinese Traditional strings - Thanks [MENTION=6407372]tarkzim[/MENTION]

Download:

(08-02-2018)twrp_v323-4_hydrogen-helium_nijel8-MOD.img
​

Github sources:

Unified device tree

TWRP Mod repo

Kernel source