Themes / Apps / Mods [MIX Fold 2][MAGISK] Global ROM-ify module collection [Add translations, Google Assistant, Android Auto]

Search This thread

frcraig

Senior Member
Jan 3, 2017
419
167
Halifax
I decided to create a module sharing thread here.

If Magisk is enabled, all modules will continue to work after the OTA update. (use "Install to Inactive Slot" method)
If Magisk is disabled, the module also loses its effectiveness.

Add official translations from Global ROM​

Since MIUI China ROM doesn't have translations other than English or China-related languages, I created Magisk module to add more languages.
I extracted official translations from MIUI Global ROM.

If there's no official translations, it will be showed in English (like search bar and some options only for China ROM).

This module also enables Google Location History & Nearby Share.

Global ROM Flag Patch​


This Magisk module changes ROM flag to Global.
You can't change region, but some settings and VoLTE icons will become Global version.
Please note Global version has less features than China version, so you can't see some settings like enhanced keyboard.

This module doesn't contain translations.

You can install both translation patch and flag patch.


--- If you want to use flag patch with MIUI optimization turned off (optional) ---
Please note if you disabled MIUI optimization, you'll get duplicate Package Installer (MIUI and AOSP) and it will cause bootloop.
Please don't disable MIUI optimization before installing this module, and disable one of the Package Installer to prevent bootloop.

So for installing flag patch module, you need to do:
1. Enable MIUI optimization and reboot
2. Install lite module and reboot
3. Disable MIUI optimization
4. Two "Package Installer" app will be available so disable one of them (I recommend non-Xiaomi logo one)
5. Reboot
-------------


Enable Android Auto​


Here's the guide for enabling Android Auto.
You have to uninstall Android Auto first, then install Magisk module, and set permissions in AOSP settings (use "MIUI Hidden Settings" or something)

Enable Google Assistant and hide dialog of Google Photo​


You can activate Google Assistant with this Magisk module.
It also systemize Google Photo app so that you don't need to press Allow when you edit photos/videos.

If my modules are helpful, I appreciate your donation.
Donate via PayPal
Donate via GitHub Sponsors
Thank you for your modules and detailed instructions. I have installed your modules on my Xiaomi Mix Fold 2 and it is running perfectly. Today, however, I received an OTA update notice on my phone. I attempted to follow the "install to inactive slot" method you provided the link to, but when I chose "uninstall", and then "restore images" in Magisk, it tells me "stock backup does not exist". What should I do next?
 

prospects

Senior Member
Aug 22, 2005
51
0
Hello im not sure how to install magisk on my mix fold 2 is there a link to help me please ^
 
Last edited:

AndroPlus

Senior Member
thank you for creating this. i am trying to get google login at fresh startup so i can enroll my device to android enterprise.

can i ask noob questions:
1. will global rom flag persist after factory data reset?
2. any way i can trigger google login during fresh factory reset since global rom is not available?
1. No, magisk module will be deleted on factory reset
2. If TWRP become available, factory reset -> Reboot to TWRP -> Install module in TWRP -> Reboot may work. Currently no TWRP, though.

Thank you for your modules and detailed instructions. I have installed your modules on my Xiaomi Mix Fold 2 and it is running perfectly. Today, however, I received an OTA update notice on my phone. I attempted to follow the "install to inactive slot" method you provided the link to, but when I chose "uninstall", and then "restore images" in Magisk, it tells me "stock backup does not exist". What should I do next?
You don't need to uninstall or restore, as Xiaomi's OTA downloads full zip even when the system is rooted.
Just follow "Devices with A/B Partitions" section.
 

frcraig

Senior Member
Jan 3, 2017
419
167
Halifax
1. No, magisk module will be deleted on factory reset
2. If TWRP become available, factory reset -> Reboot to TWRP -> Install module in TWRP -> Reboot may work. Currently no TWRP, though.


You don't need to uninstall or restore, as Xiaomi's OTA downloads full zip even when the system is rooted.
Just follow "Devices with A/B Partitions" section.
Thank you for your prompt response AndroPlus. I am trying to follow the "Devices with A/B Partitions" instructions, but they say "after restoring stock images ..." and that is my problem. To do that the instructions say to go into the Magisk Manager app and click "Uninstall Magisk (RESTORE IMAGES)", but when I do that Magisk tells me "stock backup does not exist". I can't follow the instructions "after restoring stock images, apply OTA ..." if I can't first restore the stock image.

Here the instructions you linked:
  • When an OTA is available, first go to (Magisk app → Uninstall → Restore Images). Do not reboot or you will have Magisk uninstalled. This will restore partitions modified by Magisk back to stock from backups made at install in order to pass pre-OTA block verifications. This step is required before doing any of the following steps written below!
restore_img.png

Devices with A/B Partitions​

It is possible to have the OTA installed to the inactive slot and have the Magisk app install Magisk onto the updated partitions. The out-of-the-box OTA installation works seamlessly and Magisk can be preserved after the installation.

  • After restoring stock images, apply OTAs as you normally would (Settings → System → System Update).
  • Wait for the installation to be fully done (both step 1 and step 2 of the OTA), do not press the “Restart now” or “Reboot” button! Instead, go to (Magisk app → Install → Install to Inactive Slot) to install Magisk to the updated slot.
 
  • Like
Reactions: dee163

frcraig

Senior Member
Jan 3, 2017
419
167
Halifax
@frcraig
Ignore "After restoring stock images", since other devices can't receive OTA before do that (updater detects root and block OTA) but Xiaomi allows OTA download even when rooted.
AndroPlus: Thank you very much! I googled "Magisk stock backup does not exist" for hours and none of the articles mentioned that you can just ignore "after restoring stock images" on Xiaomi devices. You are a genius. It worked like a charm!
 
  • Like
Reactions: dee163

frcraig

Senior Member
Jan 3, 2017
419
167
Halifax
Before the update the font on the folded screen was so small that I found myself unfolding the phone just to read emails and text messages. After installing the update the font on the folded screen is much larger and much more readable.
 

knives of ice

Senior Member
Jul 12, 2007
1,611
261
Xiaomi Mix Fold 2
AndroPlus: Thank you very much! I googled "Magisk stock backup does not exist" for hours and none of the articles mentioned that you can just ignore "after restoring stock images" on Xiaomi devices. You are a genius. It worked like a charm!


so with the OTA what steps did you do to install it since you are rooted with Magisk? it sounds like you can just install it normally, even if you are rooted. what did you end up doing, did you turn off magisk at all or anything?
 

dee163

Senior Member
Nov 5, 2010
234
30
I recently updated the software ND the only visual change I noticed is when you transition from fold to unfolded or vice versa you are required to swipe. This is better than the app you are using dating you have to restart to view.

Home screen seems to fit more , not sure but it seems the fonts are smaller
 

frcraig

Senior Member
Jan 3, 2017
419
167
Halifax
I recently updated the software ND the only visual change I noticed is when you transition from fold to unfolded or vice versa you are required to swipe. This is better than the app you are using dating you have to restart to view.

Home screen seems to fit more , not sure but it seems the fonts are smaller
You must have some setting enabled that I don't, because after the update I can switch from folded to unfolded and vice versa without having to swipe or unlock.
 

frcraig

Senior Member
Jan 3, 2017
419
167
Halifax
so with the OTA what steps did you do to install it since you are rooted with Magisk? it sounds like you can just install it normally, even if you are rooted. what did you end up doing, did you turn off magisk at all or anything?
I first turned off "automatically install updates" in Developer Settings. Then I went into Settings and clicked on my MIUI 13.1.16 version and it prompted me to check for updates. When it found an update it asked if I wanted to download it and I clicked yes. When it finished downloading it asked me if I wanted to install and I clicked yes. It quickly downloaded a relatively small 1.8 GB incremental update and began to install it and part way through it stopped and said "error installing MIUI ROM update". I went back and checked for update again and again was prompted to download the update. This time it downloaded a much larger 5.4 GB update and when I chose to install it took about twenty minutes to install but finished and then prompted me to reboot. I DID NOT reboot. Instead I opened the Magisk Manager app (I hadn't turned off Magisk or any of its modules) and within the Magisk Manager I chose to "install" Magisk (not 'install Magisk app) and I was then given three choices as to how to install Magisk. I chose "install to inactive slot after OTA"). When this completed within Magisk I was prompted to reboot my phone and it took about five minutes to boot back up (just like it did when I first flashed Magisk) and the phone was then up and running with the update installed and with Magisk still installed and all its modules still installed and active.

Xiaomi will allow OTA updates with root, but apparently only full, not incremental updates. When it first tries to install an incremental update it will fail, but just do it again and this time it downloads the full update and you are good to go.
 

knives of ice

Senior Member
Jul 12, 2007
1,611
261
Xiaomi Mix Fold 2
I first turned off "automatically install updates" in Developer Settings. Then I went into Settings and clicked on my MIUI 13.1.16 version and it prompted me to check for updates. When it found an update it asked if I wanted to download it and I clicked yes. When it finished downloading it asked me if I wanted to install and I clicked yes. It quickly downloaded a relatively small 1.8 GB incremental update and began to install it and part way through it stopped and said "error installing MIUI ROM update". I went back and checked for update again and again was prompted to download the update. This time it downloaded a much larger 5.4 GB update and when I chose to install it took about twenty minutes to install but finished and then prompted me to reboot. I DID NOT reboot. Instead I opened the Magisk Manager app (I hadn't turned off Magisk or any of its modules) and within the Magisk Manager I chose to "install" Magisk (not 'install Magisk app) and I was then given three choices as to how to install Magisk. I chose "install to inactive slot after OTA"). When this completed within Magisk I was prompted to reboot my phone and it took about five minutes to boot back up (just like it did when I first flashed Magisk) and the phone was then up and running with the update installed and with Magisk still installed and all its modules still installed and active.

Xiaomi will allow OTA updates with root, but apparently only full, not incremental updates. When it first tries to install an incremental update it will fail, but just do it again and this time it downloads the full update and you are good to go

awesome, really appreciate the detailed instructions

now, I just need the update as it still is telling me there is no update available.
 

frcraig

Senior Member
Jan 3, 2017
419
167
Halifax
awesome, really appreciate the detailed instructions

now, I just need the update as it still is telling me there is no update available.
On other phones I have downloaded the update from firmware repositories, placed it in my system updates folder, and then just went back into check for updates and it finds it on the device and asks you to install. Both the smaller 13.1.21 incremental update and larger 13.1.21 full recovery ROM are already available online. You could try placing the incremental update in your folder and see if it rejects that installation and then automatically downloads the full package.
 

knives of ice

Senior Member
Jul 12, 2007
1,611
261
Xiaomi Mix Fold 2
On other phones I have downloaded the update from firmware repositories, placed it in my system updates folder, and then just went back into check for updates and it finds it on the device and asks you to install. Both the smaller 13.1.21 incremental update and larger 13.1.21 full recovery ROM are already available online. You could try placing the incremental update in your folder and see if it rejects that installation and then automatically downloads the full package.

do you know where the system updates folder is located? i am using root file browser and can't find it anywhere. maybe its called something not as obvious that I'm missing
 

frcraig

Senior Member
Jan 3, 2017
419
167
Halifax
In Root/Data there are folders called "incremental" and "OTA_package". Mine are both empty, but I think the system deletes the packages after the update is installed. You could try putting the incremental download into the incremental folder and then go back to "check for updates" and see what it does. The 13.1.21 Recovery ROM and incremental OTA 13.1.16 - 13.1.21 update can be downloaded from: https://miuirom.org/phones/xiaomi-mix-fold-2
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    I decided to create a module sharing thread here.

    If Magisk is enabled, all modules will continue to work after the OTA update. (use "Install to Inactive Slot" method)
    If Magisk is disabled, the module also loses its effectiveness.

    Add official translations from Global ROM​

    Since MIUI China ROM doesn't have translations other than English or China-related languages, I created Magisk module to add more languages.
    I extracted official translations from MIUI Global ROM.

    If there's no official translations, it will be showed in English (like search bar and some options only for China ROM).

    This module also enables Google Location History & Nearby Share.

    Global ROM Flag Patch​


    This Magisk module changes ROM flag to Global.
    You can't change region, but some settings and VoLTE icons will become Global version.
    Please note Global version has less features than China version, so you can't see some settings like enhanced keyboard.

    This module doesn't contain translations.

    You can install both translation patch and flag patch.

    Please note this module can cause bootloops!

    --- If you want to use flag patch with MIUI optimization turned off (optional) ---
    Please note if you disabled MIUI optimization, you'll get duplicate Package Installer (MIUI and AOSP) and it will cause bootloop.
    Please don't disable MIUI optimization before installing this module, and disable one of the Package Installer to prevent bootloop.

    So for installing flag patch module, you need to do:
    1. Install above translation patch and reboot
    2. Enable MIUI optimization and reboot
    3. Install lite module and reboot
    4. Disable MIUI optimization
    5. Two "Package Installer" app will be available so disable one of them (I recommend non-Xiaomi logo one)
    6. Reboot
    -------------

    If bootloop happens, run this:
    adb wait-for-device shell su -c "touch /data/adb/modules/xiaomi-miui-conv-lite/disable;reboot"

    Enable Android Auto​


    Here's the guide for enabling Android Auto.
    You have to uninstall Android Auto first, then install Magisk module, and set permissions in AOSP settings (use "MIUI Hidden Settings" or something)

    Enable Google Assistant and hide dialog of Google Photo​


    You can activate Google Assistant with this Magisk module.
    It also systemize Google Photo app so that you don't need to press Allow when you edit photos/videos.

    If my modules are helpful, I appreciate your donation.
    Donate via PayPal
    Donate via GitHub Sponsors
    3
    so with the OTA what steps did you do to install it since you are rooted with Magisk? it sounds like you can just install it normally, even if you are rooted. what did you end up doing, did you turn off magisk at all or anything?
    I first turned off "automatically install updates" in Developer Settings. Then I went into Settings and clicked on my MIUI 13.1.16 version and it prompted me to check for updates. When it found an update it asked if I wanted to download it and I clicked yes. When it finished downloading it asked me if I wanted to install and I clicked yes. It quickly downloaded a relatively small 1.8 GB incremental update and began to install it and part way through it stopped and said "error installing MIUI ROM update". I went back and checked for update again and again was prompted to download the update. This time it downloaded a much larger 5.4 GB update and when I chose to install it took about twenty minutes to install but finished and then prompted me to reboot. I DID NOT reboot. Instead I opened the Magisk Manager app (I hadn't turned off Magisk or any of its modules) and within the Magisk Manager I chose to "install" Magisk (not 'install Magisk app) and I was then given three choices as to how to install Magisk. I chose "install to inactive slot after OTA"). When this completed within Magisk I was prompted to reboot my phone and it took about five minutes to boot back up (just like it did when I first flashed Magisk) and the phone was then up and running with the update installed and with Magisk still installed and all its modules still installed and active.

    Xiaomi will allow OTA updates with root, but apparently only full, not incremental updates. When it first tries to install an incremental update it will fail, but just do it again and this time it downloads the full update and you are good to go.
    1
    @knives of ice
    hmm, something went wrong since I set different ID for the modules...
    I reuploaded lite module with different file name:

    For the smart lock, you can enable it in "Trust agents" option and use "Activity Launcher" app to find and open smart lock options.
    1
    1. No, magisk module will be deleted on factory reset
    2. If TWRP become available, factory reset -> Reboot to TWRP -> Install module in TWRP -> Reboot may work. Currently no TWRP, though.


    You don't need to uninstall or restore, as Xiaomi's OTA downloads full zip even when the system is rooted.
    Just follow "Devices with A/B Partitions" section.
    Thank you for your prompt response AndroPlus. I am trying to follow the "Devices with A/B Partitions" instructions, but they say "after restoring stock images ..." and that is my problem. To do that the instructions say to go into the Magisk Manager app and click "Uninstall Magisk (RESTORE IMAGES)", but when I do that Magisk tells me "stock backup does not exist". I can't follow the instructions "after restoring stock images, apply OTA ..." if I can't first restore the stock image.

    Here the instructions you linked:
    • When an OTA is available, first go to (Magisk app → Uninstall → Restore Images). Do not reboot or you will have Magisk uninstalled. This will restore partitions modified by Magisk back to stock from backups made at install in order to pass pre-OTA block verifications. This step is required before doing any of the following steps written below!
    restore_img.png

    Devices with A/B Partitions​

    It is possible to have the OTA installed to the inactive slot and have the Magisk app install Magisk onto the updated partitions. The out-of-the-box OTA installation works seamlessly and Magisk can be preserved after the installation.

    • After restoring stock images, apply OTAs as you normally would (Settings → System → System Update).
    • Wait for the installation to be fully done (both step 1 and step 2 of the OTA), do not press the “Restart now” or “Reboot” button! Instead, go to (Magisk app → Install → Install to Inactive Slot) to install Magisk to the updated slot.
    1
    @frcraig
    Ignore "After restoring stock images", since other devices can't receive OTA before do that (updater detects root and block OTA) but Xiaomi allows OTA download even when rooted.
    AndroPlus: Thank you very much! I googled "Magisk stock backup does not exist" for hours and none of the articles mentioned that you can just ignore "after restoring stock images" on Xiaomi devices. You are a genius. It worked like a charm!