[RECOVERY][UNOFFICIAL_MOD][DECRYPTION][UPDATED-02-01-2019] TWRP 3.2.3-4 for nitrogen

Search This thread

Wmateria

Senior Member
Oct 13, 2015
771
212
Samsung Galaxy S21 Ultra
Hello so i have flashed nigel's twrp for my device, i have the latest global Pie 10.2.1.0 PEDMIXM and my bootloader is unlocked. I had my phone bricked previosly and restored.

I was able to go fasboot boot to TWRP, but after decrypting, i tried flashing the recovery image... And then reboot to recovery... And my phone did not go back to TWRP and left me with brick. Again, i got my phone fixed by EDL. So now i try to boot to TWRP but then the display goes to black screen with the backlight of the display turned on still.

There's no more signs of brick, but i wonder if i can log the process to see what happened.
 

Attachments

  • IMG_20190320_183519.jpg
    IMG_20190320_183519.jpg
    257.5 KB · Views: 1,017
Last edited:
  • Like
Reactions: sfairmm

nokiagye

Senior Member
Aug 15, 2012
3,009
440
40
thessaloniki
I have many xiaomis i have brick and fix 2 of them but i don't won't to do all this again. I can't understand this antiroll and why we have to wipe data. On olders version of miui we just flash lazy flasher and we are ready. If anyone can post a good tested and working method please post. Thanks
 

eresen

Senior Member
Apr 1, 2007
228
16
Brackley
TWRP 3.2.3-4

Hello All

We have been using TWRP 3.2.3-4 for few months Thanks to the developers it is running well. Will there be any updates for this near or far future. We may never know!:eek:
English versions.
Regards
Tunc
 

sfairmm

Senior Member
Nov 25, 2018
254
57
São Paulo
Peeps, flash this TWRP cannot see internal storage for backup option, did the format data.. Manage a backup to sd card only... Any ideas?

You can go at Advanced options and Mount partitions.

Good luck.

---------- Post added at 09:26 AM ---------- Previous post was at 09:22 AM ----------

How can I get rid of encryption? Tryna do a backup, even my password don't help, is there a default password? Have I missed something?

I remember that Mi Max 3 has problems with decryption (i dont know if was adjusted) , so wipe data and do not registry digital or any password ... so flash TWRP normaly.

God luck.
 

SuperL0L

Senior Member
Jan 28, 2010
76
7
You have to do this:
1. Download the Global Fastboot image ROM.
2. Download the Xiaomi Flash Tool (Create a "log" folder inside the main Xiaomi Flash Tool folder)
3. Backup and restart the SmartPhone into Fastboot by holding down the buttons "Power + Volume Down" when the SmartPhone boots up.
4. In the Xiaomi Flash Tool select "refresh" and then select "Clean install" and then flash you SmartPhone.
5. Install TWRP over Fastboot (see first topic post).
6. Download the EU image ROM and Flash (Install) it from inside the TWRP tool.
 
Last edited:

propi62

Senior Member
May 1, 2016
82
13
hello friend
i flashed the twrp version from post ~188.
google camera is working great with the camer2api and some other magisk plugins like youtube spezial app and google dialer.
i am on global beta.
today i received OTA from xiaomi over the air and it installed sucessfully in twrp. (version MIUI10 Global 9.5.16)

my problem is, i cant access TWRP anymore. what keys to press on boot?
if i press power and volume down the fastload starts.
if i press power and volume up the xiaomi bootloader starts.
do i have to install twrp again?
 
Last edited:

propi62

Senior Member
May 1, 2016
82
13
ok i will do it. thanks god its weekend so i have time.
just in case: is there another solution to update ota without loosing twrp?
 

sfairmm

Senior Member
Nov 25, 2018
254
57
São Paulo
hello friend
i flashed the twrp version from post ~188.
google camera is working great with the camer2api and some other magisk plugins like youtube spezial app and google dialer.
i am on global beta.
today i received OTA from xiaomi over the air and it installed sucessfully in twrp. (version MIUI10 Global 9.5.16)

my problem is, i cant access TWRP anymore. what keys to press on boot?
if i press power and volume down the fastload starts.
if i press power and volume up the xiaomi bootloader starts.
do i have to install twrp again?

Hi,
You will have to do the TWRP flash through (fastboot flash recovery ...) and then again through the (fastboot boot recovery ...). After the last command the device will reboot in TWRP mode, then again go to the TWRP upgrade options and flash TWRP with TWRP. After these procedures you will be able to fill in the TWRP with the keys vol + ....

Look for tutorials on how to do each step quoted above.

Below is the TWRP link that I have installed.
https://forum.xda-developers.com/mi-max-3/development/recovery-twrp-3-2-3-1-nitrogen-t3866084

Look too this link below in post #170.
https://forum.xda-developers.com/mi-max-3/development/recovery-twrp-3-2-3-1-nitrogen-t3866084/page17

Good luck.
 
Last edited:

Wmateria

Senior Member
Oct 13, 2015
771
212
Samsung Galaxy S21 Ultra
The following TWRP recovery works for anyone that has stock Miui 10 Pie/ Unlocked Bootloader, post 46 on AOSiP ROM Thread. What I did is.

You must extract zip to flash image, here are the steps.


1) Fasboot boot (recovery).img
2) Change language to English
3) Press cancel in decrypt password and press and slide to use modifications
4) Go to Wipe --> Advanced Wipe--> Check "Data" partition in order to use repair change file system and change to EXT4
5) Now you can flash required Firmware/ ROM/ GApps/ and Magisk in that order
6) I made sure to flash TWRP zip one more time to make sure..
7) Reboot
8)If there's any bug in ROM, just got back to TWRP, Wipe system, cache, date, internal and repeat steps 5 and 7.

This is what i did to get @MrColdbird AOSip fully working
 
Last edited:
  • Like
Reactions: sfairmm

Top Liked Posts

  • There are no posts matching your filters.
  • 66
    SUPPORTS ALL TYPES OF USERDATA DECRYPTION FOR BOTH OREO AND PIE ROMS - PASSWORD, DEFAULT_PASSWORD, PATTERN, PIN!!!

    SUPPORTS BOTH FULL AND INCREMENTAL OTA UPDATE PACKAGES AUTOMATIC INSTALL!!!​


    Sharing my unofficial TWRP recovery mod for nitrogen which I have started about 2 years ago for hydrogen/helium. For more details visit https://forum.xda-developers.com/mi-max/development/recovery-twrp-3-0-2-2-hydrogen-helium-t3512981...
    This is and will be work in progress with fixes and reasonable features to be added.



    To install:
    - USB connect device to PC
    - reboot to fastboot
    - open Command prompt/Terminal in the folder with the recovery image and run these commands line by line:
    Code:
    fastboot flash recovery (XX-XX-XXXX)twrp_v323-X_nitrogen_nijel8-MOD.img
    fastboot boot (XX-XX-XXXX)twrp_v323-X_nitrogen_nijel8-MOD.img
    or just flash the image with TWRP selecting recovery partition
    - reboot from the fresh recovery - it'll take few seconds... let it do its magic to survive MIUI stock recovery replace at system boot. This will happen whenever you install any new ROM.
    Done... This TWRP will not go anywhere, /system is untouched so you can get MIUI OTAs, no need to root if you don't want to, no need to flash anything else, MIUI boots just fine having no idea about the recovery, everybody's happy...;)


    NOTES:

    ROM install:
    - skip wiping Data even if switching different ROMs. Do dirty install, see how it runs, if no problems, great... you saved yourself from doing the initial
    setup. If having issues then wipe Data and see how it goes...
    - You do not need to wipe/format/factory reset anything before install(see above), especially System and Vendor.
    - Do not install any patches like lazyflasher, sound or whatever mods, root-on-system etc that are altering System or Vendor partitions on stock MIUI without installing Magisk first or system will not boot!!!

    MIUI OTA Install:
    - Let MIUI download update and press "Reboot" when prompted
    - Device will reboot to TWRP and start installing it.
    - If device reboots to system automatically - all good, update successful
    - If device does not reboot you should see some error in red
    - Just flash the zip package in Internal storage -> downloaded_rom folder and reboot to system
    - Done - you just got your OTA :)

    Decryption:
    If MIUI asks for decription password after reboot from TWRP don't panic!
    You will most likely never see this but as anything in this live sh*t happens. I for example have seen this only once in hundreds of TWRP and MIUI flashings and reboots to system and it happen after reboot from MIUI OTA testing. Did I mentioned I never do clean installs? Why bother wiping if no post-install issues, right...
    Anyway... here is how to get back to normal without loosing any data:
    - Reboot back to recovery by pressing and holding POWER + VOLUME UP buttons
    - Run Data backup in TWRP
    - USB connect device to computer and copy all personal data you don't wanna loose from Internal storage to computer
    - DO NOT FORGET TO COPY THE DATA BACKUP YOU JUST MADE FROM TWRP/BACKUPS/XXXXXX TO COMPUTER TOO!!!
    - Click Wipe -> Format data -> type yes -> [ENTER]
    - Reboot to MIUI and let it encrypt the device. You will see Setup new device wizard when its done
    - Reboot back to recovery by pressing and holding POWER + VOLUME UP buttons
    - Copy back all your personal data including the recent Data backup from computer to Internal storage -> TWRP/BACKUPS/XXXXXX
    - Reboot recovery so TWRP can detect the Data backup you copied
    - Restore Data backup and reboot to MIUI
    - Done - MIUI should boot without complaining and all your data is intact... even your old lockscreen password and fingerprints should work

    Backup/restore:
    - normal backup includes Data only, you can always flash what you are running currently to restore boot, system and vendor
    - if you have modified boot,system or vendor post install you can back them up to keep your changes
    - You do not need to wipe/format/factory reset anything before restore... restore does that for you


    Some observations during my extended decryption testing with China and Global MIUIs 8.1 and 9.0, EU MIUIs, MIUIPro, etc:
    - Downgrading to ROM with lower security patch level brakes encryption in Android but not in TWRP so just boot back to recovery, backup your data to safe location, format data, restore data back and you are good to go...
    - Some times switching back and forth passwords types(pin, pattern etc...) brakes encryption and you loose your data, no way back!!! This is ROM fault and not TWRP. Crypto footer just gets corrupted from Android... I have taken good measures for this not to happen in my TWRP so don't blame recovery if that happens to you...

    Changelog:

    [02-01-2019
    - hide navbar during running operarions
    - more userdata decryption reliability improvements
    - Mi bunny is terrified loosing recovery control :D
    - sync with latest Omnirom android-9.0 sources

    [01-28-2019
    - fix decryption with good user password on next retry if wrong password was entered before that
    - improve TWRP persist
    - sync with latest Omnirom android-9.0 sources

    [01-09-2019
    - fix system boot after restoring regular file-for-file backup on ext4 file systems(System and Vendor) - now any backup type works for any partition of any ROM
    - sync with latest Omnirom android-9.0 sources

    [01-07-2019
    - fix installing incremental OTA patching boot - this will start working properly after your first full ROM install with new recovery(boot.img flash)
    - fix loading settings from /persist if decryption fails
    - made sure we always keep current settings copy on /persist
    - remove excessive save settings calls
    - some minor improvements
    - sync with latest Omnirom android-9.0 sources

    [01-05-2019
    - fix incremental OTA update automatic install
    - sync with latest Omnirom android-9.0 sources

    [01-04-2019
    - new much smaller Pie kernel built from source with LineageOS 16.0
    - much smaller recovery image(see above)
    - sync with latest Omnirom android-9.0 sources

    [12-29-2018
    - improved decrypt routine
    - some minor fixes and improvements
    - sync with latest Omnirom android-9.0 sources

    12-28-2018
    - much improved and reliable decryption routine for preventing crypto footer corruption and loosing all your data - this update is highly recomended
    - fix Android 9.0 userdata decryption with custom user set password, pin or pattern
    - more reliable format data routine for crypto footer support
    - disable useless and sometime buggy reboot check for system size(No OS installed msg)
    - sync with latest Omnirom android-9.0 sources

    12-27-2018
    - migrate to Android-9.0 for android tree and TWRP sources
    - switch to MIUI Pie prebuilt kernel
    - speed up userdata decryption
    - fix userdata decryption for Android-9.0 with default password only. At this time userdata decryption wit user set password is not supported! Working on it...
    - sync with latest Omnirom android-9.0 sources

    11-25-2018
    - fix survival routine hang/bootloop after openrecoveryscript execution(OTA)
    - improved decryption handling

    11-23-2018
    - fix userdata decryption - no more inaccessible userdata in TWRP
    - fix vendor missing from partitions to restore list in some cases
    - fix TWRP bootloop trying to apply survive magic in some cases
    - finaly fix crypto footer for F2FS partition formating(tested and working!!! - you can format userdata in TWRP without any system boot issues now)
    - skip survive magic for good ROMs to speed up reboot
    - translatable and more user friendly survive system boot screen - If you want to help translate and PM me these strings:"
    Code:
        <!-- Survive system boot strings -->
        <string name="survive_line1">Checking if TWRP will survive system boot!</string>
        <string name="survive_line2">Please, wait...</string>
    - sync with latest Omnirom android-8.1 TWRP sources

    11-12-2018
    - fix TWRP system boot survive - no need to flash anything to prevent stock recovery reflash at MIUI boot
    - fix crypto footer for F2FS partition format - need no more fastboot format userdata for system boot with forced encription enabled(needs testing)
    - fix error when creating ext2, ext3, or ext4 filesystem in some cases(needs testing)
    - some minor fixes and optimizations
    - kernel compiled from source at build time
    - build with latest Lineage OS 15.1 sources
    - sync with latest Omnirom android-8.1 TWRP sources


    Github sources:
    NITROGEN TWRP device tree
    TWRP Mod repo
    Kernel source

    Thank you:
    TeamWin for the initial device tree!
    Omnirom/TeamWin for the TWRP source code!
    @topjohnwu for the magiskboot source code!
    13
    Updated... Now any backup type works for any partition of any ROM, stock/custom doesn't matter, dm-verity doesn't matter, Magisk doesn't matter.
    13
    Updated... New Pie kernel built from source with LineageOS 16.0!
    13
    Updated... Pie decryption completely fixed among other critical things! Fill very good about this release...
    It's LOS time...

    WoW! Nice work!
    Booted (not flashed permanently). Working. No data encryption issue! I could make a full backup with this version!
    But after backup, system does not reboot, stucked on MI logo.
    It's just an experience, there's no problem.
    But the experience is that this recovery still doesn't work smoothly with the stock MIUI ROM ( I know, you hate this).
    Maybe last TWRP survival script? I do not know...

    I will continue to explore. Now, check if the new recovery works well with TREBLED ROM.

    To be continued...
    Sorry, can't help with that. Done countless backups/restore in my testing and had zero issues...

    @nijel8

    Thank you very much.

    I always had problems installing MiuiPro with the previous version.

    The installation was repeated again and again after it was finished, after a restart.

    Something about your script triggered that.
    That was fixed couple of versions back. Also reading about data partition size issues after flashing MIUIPro but I personally never experienced it in my testing.
    But to tell you the true MIUIPro looks kinda fishy in my eyes as a dev, poor porting job IMO. And on top of that with paid OTA updates!? Shame on that guy... Just my 2 cents...
    8
    Posted 12-30-2018 update earlier taken down. What I thought was easy fix for incremental OTA updates proved to be much harder... Fixing it breakes decryption. Fixing decryption breakes incremental OTA.
    So decryption it is for the time being. You can always update with full package ROM.
    If anybody installed 12-30-2018 update, please redownload and install again. Sorry for the inconvenience...