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

Search This thread

nijel8

Senior Member
Dec 24, 2011
2,423
5,650
All over US
Google Pixel 5a
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!
 
Last edited:

saimon05

Senior Member
Feb 8, 2011
78
0
you save my life thankyou sir. unlocked bootloader today as i waited for 720 hrs. as i known i can skip by 9001 mode i just wait the official unlock to play safe. missed you so much since max1 thankyou sir
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,650
All over US
Google Pixel 5a
Just noticed on 4PDA forum there is a bug when you try restore vendor is missing from the list of available partitions at first... Well, it's not a bug... It's something I had to add for hydrogen...
Yeah, I know exactly what you guys are talking about... Back in the days when I was trying to bring treble to Max1 I added some code to detect in the fly if vendor partition is available on the running device so I can hide it in UI if ROM was Nougat or show it if was treblelized. I forgot about it and now it causes inconvenience on Max3. Will get it fixed in the next release.
Thaks for the reminder 4PDA guys...
 
Last edited:

omer919

Senior Member
Nov 27, 2016
557
453
Just noticed on 4PDA forum there is a bug when you try restore vendor is missing from the list of available partitions at first... Well, it's not a bug... It's something I had to add for hydrogen...
Yeah, I know exactly what you guys are talking about... Back in the days when I was trying to bring treble to Max1 I added some code to detect in the fly if vendor partition is available on the running device so I can hide it in UI if ROM was Nougat or show it if was treblelized. I forgot about it and now it causes inconvenience on Max3. Will get it fixed in the next release.
Thaks for the reminder 4PDA guys...

I hope that you are able to create an un-official build of LineageOS for Mi Max 3

I thank you for your time for creating this un-offical twrp build as its faster than the official one

have a great week!
 
  • Like
Reactions: SUPERUSER

AsadP2013

Member
Jun 20, 2013
40
13
London
Going to keep an eye on this.

300 hours left for my Mi Max 3, will flash this when I unlock.

What's different between this and official TWRP may I ask?
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,650
All over US
Google Pixel 5a
I hope that you are able to create an un-official build of LineageOS for Mi Max 3

I thank you for your time for creating this un-offical twrp build as its faster than the official one

have a great week!
Don't know if it's faster but should be more bugs free...

...
What's different between this and official TWRP may I ask?
Read first post and changelog, then click the link for more info and read the looong changelog there as well.
But if I have to summarize the dev is listening and every bug terminated right away...
Oh... and the most important thing... Dev has the device and runs on it only what he builds himself... You get what the dev gets and he hates it when something's not working as intended.
Hope this helps...
 
Last edited:

AsadP2013

Member
Jun 20, 2013
40
13
London
Don't know if it's faster but should be more bugs free...


Read first post and changelog, then click the link for more info and read the looong changelog there as well.
But if I have to summarize the dev is listening and every bug terminated right away...

Thanks, no I have had a look but in short, what would you say?

Do you reckon that it has more features and is capable of doing slightly more?

Basically, should I use this TWRP over official as I'm a modder/tweaker?
Or should I flash it for the sake of it providing more than official?
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,650
All over US
Google Pixel 5a
Ohh Sir @nijel8 I've tried, but incremental OTA updates does not installable with this rec.
(Or I am making a mistake.)
More specifics, please, recovery.log. What not installable means?
The only reason OTA would not install is if the updater-script checks boot partition checksum. Can you post its content?
I would test it myself but I am away from home right now...
 
Last edited:

JulianJenner

Senior Member
Apr 17, 2013
4,796
1,936
Arnhem
Thx. I am back to miui with chinese PC suite (full clean install)
I will try again. When I have time again.
I've found on baidu a new TWRP a lot of settings and partition backup
http://www.mediafire.com/file/04xqp...-1030-XIAOMI_MAX3-CN-wzsx150-fastboot.7z/file
IMG_20181114_001552.jpeg
IMG_20181114_001058.jpeg
IMG_20181114_001106.jpeg
IMG_20181114_001112.jpeg

小米MIX标准版4GB128GB银色MIUI10中国开发者8.11.13
 
  • Like
Reactions: babay911

nijel8

Senior Member
Dec 24, 2011
2,423
5,650
All over US
Google Pixel 5a
Thx. I am back to miui with chinese PC suite (full clean install)
I will try again. When I have time again.
I've found on baidu a new TWRP a lot of settings and partition backup
http://www.mediafire.com/file/04xqp...-1030-XIAOMI_MAX3-CN-wzsx150-fastboot.7z/file
View attachment 4642012
View attachment 4642013
View attachment 4642014
View attachment 4642015

小米MIX标准版4GB128GB银色MIUI10中国开发者8.11.13
One thing I should've mentioned... Since recovery hardware decryption is not fixed yet after OTA update.zip is downloaded you have to move it to nonencrypted accessable location like external SD Card or OTG reboot to recovery and flash it manually.
Another thing I should mention is although decryption with default passwords is not working decryption with user password should work. Don't ask me how to switch from default to user password encryption... I am not familiar with MIUI.
 
Last edited:

JulianJenner

Senior Member
Apr 17, 2013
4,796
1,936
Arnhem
One thing I should've mentioned... Since recovery hardware decryption is not fixed yet after OTA update.zip is downloaded you have to move it to nonencrypted accessable location like external SD Card or OTG reboot to recovery and flash it manually.
Another thing I should mention is although decryption with default passwords is not working decryption with user password should work. Don't ask me how to switch from default to user password encryption... I am not familiar with MIUI.

I think, there is not the encryption/decryption is the bigger problem.
Max3 MIUI ROMs contains a scrip, that it rewrite MiRecovery, but this action occurs across boot. Earlier rewriting supervened after system installing/flashing. So far, we could have avoided this with Lazyflasher or something. At the moment, we install TWRP versions in vain, because after successfully TWRP install, MIUI system immediately restore MiRecovery at rebooting.
 

Bartos81

Senior Member
Oct 3, 2013
208
54
In Mi Max 1 I solved the problem of recovering stock recovery by deleting the file "Recovery from boot.p" in the system directory. You must do this before the first start of the system.
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,650
All over US
Google Pixel 5a
Guys, you have system verify in the kernel on Oreo so LazyFlasher doesn't work on Oreo and deleting files in system causes bootloop. The new approach for disabling recovery replace is to patch rc scripts in boot image. That's how this recovery does it.
Edit: BTW vendor is verified as well so modifying anything in that partition causes bootloop as well...
 
Last edited:
  • Like
Reactions: JulianJenner

JulianJenner

Senior Member
Apr 17, 2013
4,796
1,936
Arnhem
Guys, you have system verify in the kernel on Oreo so LazyFlasher doesn't work on Oreo and deleting files in system causes bootloop. The new approach for disabling recovery replace is to patch rc scripts in boot image. That's how this recovery does it.
Edit: BTW vendor is verified as well so modifying anything in that partition causes bootloop as well...

"nice" new security items... :( :rolleyes: :eek:
 

lowfat

Member
Sep 3, 2014
17
4
Installed the recovery today. It went well. When I tried to boot to the system afterward it started running OpenRecoveryScript 'checking if TWRP will survive system boot!'. It has been over 2 hours. Is this normal? If Any way to stop it? Rebooting doesn't stop it.

EDIT: Figured it out. Didn't have writer permissions for /data. Had to reformat it. After that it went ok.
 
Last edited:

nijel8

Senior Member
Dec 24, 2011
2,423
5,650
All over US
Google Pixel 5a
Installed the recovery today. It went well. When I tried to boot to the system afterward it started running OpenRecoveryScript 'checking if TWRP will survive system boot!'. It has been over 2 hours. Is this normal? If Any way to stop it? Rebooting doesn't stop it.

EDIT: Figured it out. Didn't have writer permissions for /data. Had to reformat it. After that it went ok.
Doesn't sound right. /data should not affect that. Post any recovery related log you find in /cache, please...
 

babay911

Member
Mar 27, 2016
10
1
Thanks for the recovery mod. I think that a translation into Russian will eventually be added. I am also grateful to nijel8 for his work!
 

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...