86

Development - [MIX Fold 2][MAGISK] Global ROM-ify module collection [Add transla...

 1 year ago
source link: https://forum.xda-developers.com/t/mix-fold-2-magisk-global-rom-ify-module-collection-add-translations-google-assistant-android-auto.4494733/page-4#post-87514981
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Development [MIX Fold 2][MAGISK] Global ROM-ify module collection [Add translations, Google Assistant, Android Auto]

frcraig

Senior Member
Jan 3, 2017 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.
forum.xda-developers.com

[MAGISK] Add languages to MIUI CN - Enables Google Location History & Nearby Share

I want to use the original MIUI Chinese version as it is, so I created a Magisk module to add the languages! The translation is extracted from MIUI Global ROM for Xiaomi 11T Pro. This module also enables Google Location History & Nearby Share...
forum.xda-developers.com forum.xda-developers.com

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

Releases · AndroPlus-org/magisk-module-miui-cn2global-lite

Change MIUI China ROM flag to Global. Contribute to AndroPlus-org/magisk-module-miui-cn2global-lite development by creating an account on GitHub.
github.com
--- 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)
androplus.org

How to enable Android Auto on Xiaomi MIUI Chinese ROM [Magisk] - AndroPlus

I created a Magisk module that solves the problem of not being able to use Android Auto with MIUI Chinese ROMs, etc. Need Android Auto app in /system
androplus.org androplus.org

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

Releases · AndroPlus-org/magisk-module-assistant

Contribute to AndroPlus-org/magisk-module-assistant development by creating an account on GitHub.
github.com
If my modules are helpful, I appreciate your donation.
Donate via PayPal
Donate via GitHub Sponsors

I see that you have released version 2 of your flag patch module. I take it this new version automatically uninstalls the second package installer that is created when you disable MIUI optimizations?

dee163

Senior Member
Nov 5, 2010
I see that you have released version 2 of your flag patch module. I take it this new version automatically uninstalls the second package installer that is created when you disable MIUI optimizations?

Yes , it is in the description

frcraig

Senior Member
Jan 3, 2017 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.
forum.xda-developers.com

[MAGISK] Add languages to MIUI CN - Enables Google Location History & Nearby Share

I want to use the original MIUI Chinese version as it is, so I created a Magisk module to add the languages! The translation is extracted from MIUI Global ROM for Xiaomi 11T Pro. This module also enables Google Location History & Nearby Share...
forum.xda-developers.com forum.xda-developers.com

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

Releases · AndroPlus-org/magisk-module-miui-cn2global-lite

Change MIUI China ROM flag to Global. Contribute to AndroPlus-org/magisk-module-miui-cn2global-lite development by creating an account on GitHub.
github.com
--- 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)
androplus.org

How to enable Android Auto on Xiaomi MIUI Chinese ROM [Magisk] - AndroPlus

I created a Magisk module that solves the problem of not being able to use Android Auto with MIUI Chinese ROMs, etc. Need Android Auto app in /system
androplus.org androplus.org

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

Releases · AndroPlus-org/magisk-module-assistant

Contribute to AndroPlus-org/magisk-module-assistant development by creating an account on GitHub.
github.com
If my modules are helpful, I appreciate your donation.
Donate via PayPal
Donate via GitHub Sponsors

Does the new version of your Google Assistant module magisk-module-assistant-android11.zip replace the previous module magisk-module-assistant.zip or do we still use the previous module on the Mix Fold 2 as it is Android 12 based?

I see that you have released version 2 of your flag patch module. I take it this new version automatically uninstalls the second package installer that is created when you disable MIUI optimizations?

Yes.

Does the new version of your Google Assistant module magisk-module-assistant-android11.zip replace the previous module magisk-module-assistant.zip or do we still use the previous module on the Mix Fold 2 as it is Android 12 based?

It's for Android 11 devices.
Older Android can't load system APK built for newer version so I added A11 version.

carlitobahsoun

Senior Member
Sep 26, 2012 3,791 1,558 beirut lebanon
hello guys , happy with my mix fold 2 :
plz if u can help :
1-when i fold , on lock screen , there is camera down the screen right and round circle on the left , can i change it ?.
2- how can i add more fount plz ?
iam not rooted.

Attachments

  • IMG_20221001_122051.jpg

    IMG_20221001_122051.jpg
    581.7 KB · Views: 4

frcraig

Senior Member
Jan 3, 2017 Halifax
You can enable both full and lite module.

As I wrote in OP, duplicated Package Manager causes bootloop when you use lite module and MIUI optimization off.
You can enter into safe mode by pressing volume down key to disable all modules, or
adb wait-for-device shell su -c "touch /data/adb/modules/xiaomi-miui-conv-lite/disable"
to disable lite module.

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

ANOTHER BOOTLOOP
After my last bootloop experience while trying to install the global flag module I was eventually able to wipe and reinstall everything, so I thought I would give it another try. This time I carefully read your instructions and did the following:
1. I enabled MIUI optimization and rebooted,
2. I installed the lite (most recent global flag) module and rebooted.

When rebooting the phone just goes to the Mi logo and after a few minutes brings up the screen with:
Main Menu
MIUI Recovery 5.0
Reboot
Wipe Data
Connect with Mi Assistant
Safe Mode

I use volume down key to select Safe Mode and power key to confirm. Phone boots past Mi Logo to my default lock screen (which says "safe mode" in the bottom left corner), but before I can enter my four digit PIN code to unlock the phone it goes to a black screen with a spinning which circle, hangs on that for a few mintues, and then reboots to the same Recovery screen menu. It won't go past that. I've tried several times and it doesn't stay on my lock screen long enough for me to enter a password.

The only module I had installed in Magisk, before installing the Global Flag module, was the Universal SafetyFix module. I really don't want to wipe and start all over again. Any advice as to how to proceed?

@frcraig
Maybe in some situations MIUI installer disappears and flag module try to remove AOSP installer so no installer become available and bootloop. So complicated... fxxk Xiaomi for having two abnormal installer...

I don't know why safe mode doesn't work since Magisk should disable all modules when entering safe mode (not after unlocking).
You can disable the module with this command:
adb wait-for-device shell su -c "touch /data/adb/modules/xiaomi-miui-conv-lite/disable;reboot"

knives of ice

Senior Member
Jul 12, 2007 1,583 Xiaomi Mix Fold 2
@frcraig
Maybe in some situations MIUI installer disappears and flag module try to remove AOSP installer so no installer become available and bootloop. So complicated... fxxk Xiaomi for having two abnormal installer...

I don't know why safe mode doesn't work since Magisk should disable all modules when entering safe mode (not after unlocking).
You can disable the module with this command:
adb wait-for-device shell su -c "touch /data/adb/modules/xiaomi-miui-conv-lite/disable;reboot"
should we have AOSP installer after installing both modules? All I have with both is still the Xiaomi installer.

with that being said - I think if you install full module, then lite module you are fine with no bootloop. if you don't do them in that order you can get bootloop.

I also think there are definitely weird changes in how the signal strength of cell connection is either measured or displayed because I constantly have zero bars now at home and that definitely is not the case.

Top Liked Posts

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

    [MAGISK] Add languages to MIUI CN - Enables Google Location History & Nearby Share

    I want to use the original MIUI Chinese...
    forum.xda-developers.com forum.xda-developers.com

    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!

    Releases · AndroPlus-org/magisk-module-miui-cn2global-lite

    Change MIUI China ROM flag to Global...
    github.com
    --- 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
    -------------

    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)

    How to enable Android Auto on Xiaomi MIUI Chinese ROM [Magisk] - AndroPlus

    I created a Magisk module that solves the...
    androplus.org androplus.org

    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
    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
    hmm, something went wrong since I set different ID for the modules...
    I reuploaded lite module with different file name:

    Release v01 · AndroPlus-org/magisk-module-miui-cn2global-lite

    Change MIUI China ROM flag to Global...
    github.com
    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. 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.

    OTA Upgrade Guides

    The Magic Mask for Android
    topjohnwu.github.io

    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!

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK