Miui Installation Guide

Miui Installation Guide

Milind | Pl2 ツ
(aka the "haha MIUI is such a garbage ROM you have to use a special snowflake installation" method for installation via vanced manager)

Table of contents


Guide for disabling MIUI optimization

  • Installing vanced microG, YouTube Vanced, or YouTube Music Vanced via vanced manager or Split Apk Installer (SAI) requires you to disable MIUI optimization first.
  • Otherwise, you will be unable to install any app and will receive the following error: ⬇️⬇️

Or when updating from old YouTube vanced version to new, this error will come;

⬇️ Instruction manual: ⬇️

STEP 1. Open system settings.

STEP 2. Tap on the About phone(as shown in the picture below).

STEP 3. Now tap on the MIUI version until it shows "you are now a developer". That is, it unlocked developer options.

STEP 4. Go back to the settings main menu and navigate to the "additional settings" (as shown in the picture below).

STEP 5. Now, you can see the "developer options" and tap on them.

STEP 6. Scroll down to the bottom and there you will find the "MIUI optimizations".

(⬇️⬇️ READ THE NOTE BELOW IF YOU CANNOT FIND MIUI OPTIMIZATION IN YOUR DEVICE ⬇️⬇️)

⚠️⚠️➡️ NOTE: Certain MIUI global variants have hidden miui optimization settings in developer options due to an update. To restore MIUI optimization, repeatedly tap "Reset to default values" until it appears. {Video tutorial} ⬅️
If the said setting is greyed out for you, Go to device Settings > Additional Settings > Languages & input, then Autofill service & set it to Google. Now you can go back to Developer options and the Auto-fill section will be enabled. If you still can't tap on "reset to default values", make sure you are not using "battery saver", if you are please turn off battery saver mode then reboot device (mandatory) and it will work. ⚠️⚠️
If this doesn't help you, use option C or D below in non-root installation.

STEP 7. Allow a warning and disable it.

STEP 8. Now you can proceed to use Vanced manager[OPTION A] or Split Apk Installer(SAI) [OPTION B] whatever you prefer for vanced installation.

Note: Xiaomi EU users need to make sure if they are on MIUI version 20.2.20 or later to use Vanced manager/SAI, they don't need to disable MIUI optimization. If you are on a version lower than the said version since the MIUI optimization feature is not available for you, you have 2 ways: Either use adb command "setprop persist.sys.miui_optimization false" via a PC to disable MIUI Optimization so you can go and use Vanced Manager/SAI or use option C or D below.

NON-Root Installation

There are four methods available for you to install Vanced applications. They are listed below:

OPTION A: Using Vanced Manager

  1. This method requires you to disable "MIUI optimization" first without which you CANNOT install vanced applications via vanced manager. (This can delete all permissions for apps, proceed at your own risk)
  2. Download Vanced manager from our official Vanced site.
  3. Tap on the blue arrow from the bottom right
  4. Begin with installing Vanced microG first then Youtube Vanced (or Youtube music vanced) whatever you were planning to install.
  5. Enjoy
{The link for a guide to disable MIUI optimization is here}
After installing Vanced, you can choose to enable "MIUI optimization" back again or keep it as it is.

OPTION B: Using Split Apk Installer(SAI) normal mode

  1. This method also requires you to disable "MIUI optimization" first without which you CANNOT install vanced applications via SAI. (Disabling optimization can delete all permissions for apps, proceed at your own risk)
  2. Install vanced microG latest available using Vanced Manager or using manual links provided here.
  3. Open SAI and check that the "signed APK" option is disabled in SAI settings.
  4. Proceed with the installation of Vanced using the files you need.
  5. Enjoy Vanced
{The link for a guide to disable MIUI optimization is here}
{Download links for both apps can be found here}

OPTION C: Shizuku method (Needs pc with adb installed)

  1. Install Shizuku from here following all instructions carefully.
  2. Enable Shizuku Mode from "installer" in Split Apk Installer(SAI) settings.
  3. First, install vanced microG using a manual APK file or using vanced manager.
  4. Download the YouTube vanced files using the MediaFire v15 link and install using SAI.
  5. Enjoy!
{Download links for both apps can be found here}

OPTION D: ADB installation (Needs pc with adb installed)

  1. Download the necessary Vanced files using the download links below.
  2. If you have downloaded it as a ZIP file, you have to extract them.
  3. Rename the "dark.apk" OR "black.apk" whatever you downloaded to the following name, "YouTube_XX.XX.XX_API21nodpivBlack-vX.X.X-vanced.apk"
  4. Run this command while connected to your phone: "adb install-multiple YouTube_XX.XX.XX_API21nodpivBlack-vX.X.X-vanced.apk split_config.arm64_v8a.apk split_config.en.apk".
  5. Install Vanced microG manually on your phone.
{Download links for both apps can be found here}

NOTES:

  • If you want to install a language other than English, add it at the end of the command (for example split_config.de.apk)
  • If you want to install Dark instead of Black, replace Black with Dark in the command.
  • Replace the X with the version that you are going to install in the command together with the build number. You can find the build number from a friend.
  • You can choose to keep the default name of base APK files without renaming in 3rd step and it will work fine.

Root Installation

For installation of YouTube vanced (or YouTube Music Vanced) root variant, you get 2 ways:

A) NON-MANUAL INSTALLATION:

There are 2 methods available, choose any you find comfortable.

IF USING VANCED MANAGER

NOTE: With the new manager from v1.3.1, you don't need to disable apk signature verification anymore.
  1. Deactivate MIUI OPTIMIZATION in Developer Options (Disabling optimization can delete permissions for your apps, proceed at your own risk). See the guide on how to disable MIUI optimization using this link.
  2. Download and install Vanced Manager using this link.
  3. Grant root permission by tapping on the magisk/root icon from the middle to use root installer mode.
  4. Begin installing YouTube Vanced (or YouTube Music Vanced)
  5. Profit!


IF USING SPLIT APK INSTALLER

Some IMPORTANT information to read first:

  • ⚠️⚠️⚠️Unfortunately, the same method won't work after version 15.43.32. Hence, it is advised to use the vanced manager or follow the epic root method under manual installation.⚠️⚠️⚠️
  • To install YouTube Vanced using Split Apk Installer(SAI) app, it's mandatory to disable "APK signature verification". It will not work without it since starting v15 Google has switched to a new signature scheme. You can use Xposed with CorePatcher or Lucky Patcher(Yellow smiley face app) to disable it.
  • Some ROMs include a feature to spoof signature and a lot of users mistake it as apk signature verification. It's not the same thing and it won't help you.

Let's jump to the process for installing YouTube Vanced:

  1. First, disable the APK Signature Verification. THIS IS A COMPULSORY STEP SO DON'T EVER THINK TO SKIP it. Instructions for both the Xposed and Lucky patcher method can be found after this process.
  2. After disabling signature verification, download and install the Split Apk Installer app.
  3. Download the necessary files for YouTube Vanced root variant.
  4. Open Split Apk Installer and configure it with "Root mode" and make sure "Sign APK is turned OFF".
  5. Locate the files using the picker and begin the installation.
  6. Enjoy!
{Download links for both apps can be found here}

INSTRUCTIONS for Lucky Patcher:

  1. Go to magisk manager settings and turn on "core only mode" and reboot. (If you are on magisk canary, then you can skip this step but we don't guarantee it will patch. if it did, 👍)
  2. Install the yellow smiley face app(LP) and give it all the permissions.
  3. Click on toolbox -> Patch to android -> disable ".apk signature verification" only. This option would be the 2nd one. [Dont select any other options & untick Dalvik cache]
  4. It will reboot automatically. If it looks stuck, don't panic, let Yellowman do changes and it will reboot.
  5. Come back to the yellow app and check. It should now say 'patched' below the .apk signature verification option and say either 1/2 or 2/2 on the first patch.
  6. Now install "Youtube Vanced" as you would using SAI.

WARNINGS:

  • If you don’t want to/can’t install Xposed, then you can use Lucky patcher to install vanced.
  • If you want to uninstall the Yellowface/Smiley face app after installing vanced, better revert the patches you applied first(tick first red color option of core.jar from the same dialog and hit apply) then uninstall yellow man.

INSTRUCTIONS for Xposed + CorePatcher:

  1. Install "Riru" from Magisk Module Repo in Magisk Manager.
  2. Install EdXposed Manager's latest available apk from GitHub (link here).
  3. Download the YAHFA or Sandhook canary zip(choose one from it) from EdXposed Manager and flash in Magisk Manager and reboot. (Download the canary release and make sure you're on the latest Magisk Or you may experience a boot loop).
  4. Install CorePatcher(核心破解) app (direct link can be found here). Then toggle the module in EdXposed and reboot your device.
  5. Open the Corepatcher app, configure and enable the "third option" from it to disable "APK signature verification".

NOTES:

  • After installing vanced, if you want to remove all these apps and modules, first revert the toggles of corepatcher you did and uninstall modules and app one by one.
  • To fix SafetyNet, enable signature verification back again then uninstall all Xposed modules and apps you installed above. After this, clear Google Play Services data and reboot device.

B) USING MANUAL INSTALLATION:

There are 2 methods available, choose any you find comfortable.

INSTRUCTIONS FOR Epic Root Method

  1. Install the stock official YouTube app of the same version as vanced as app update (like you install a normal app, not a system app).
  2. Download the vanced files from the links given here and extract the zip to someplace.
  3. Replace vanced base.apk into /data/app/com.google.android.youtube(replace me). Rename "theme".apk to "base.apk".
  4. Run this command via the terminal app in root mode. "chcon -R u:object_r:system_file:s0 /data/app/com.google.android.youtube(replace me)/base.apk"
  5. Force stop YouTube and Vanced will be installed.

How youtube stock app name looks like(for replaceme in step2)

⚠️Some extra info related to New Epic Root Method⚠️

  • No LP or Xposed is required.
  • Replace (replace me) with the string you see in the folder name from - to ==. Check the image
  • For step 3 use any emulator from the play store to run the command(can skip the step if you are on permissive SELinux always).
  • You can get a vanced base APK from Mediafire/afh from links down below. Base apk is just a theme APK.
  • If the vanced app uninstalls/vanishes after rebooting the device, install the vanced app using the old method. This happens only for few users and there's no workaround for it yet.

INSTRUCTIONS FOR Old School Method

⚠️⚠️⚠️Unfortunately, the same method won't work after version 15.43.32. Hence, it is advised to use the vanced manager or epic root method.⚠️⚠️⚠️

Since YouTube Vanced is in split apk form, it's really hard to integrate it, so you have to follow these steps one by one carefully.

Note: Though we download it for arm32, it'll work on arm64 too without any bugs. You can still Download for arm64 directly.

  1. Disable APK signature verification first. Use services.jar patch if you don't have access to the ROM source or use any method from above.
  2. Download the required vanced files for legacy|root from Mediafire/afh links down below and copy all files to /system/app/YouTube/.
  3. Extract the lib folder from the"split_config.armeabi_v7a.apk" and copy to /system/app/YouTube/lib/. (rename lib/armeabi-v7a to lib/arm)
  4. Rename YouTube_*.apk/theme.apk to "base.apk".
  5. Finally, check for all files. You should have the following files in /system/app/YouTube/base.apk, /lib/arm/ with all *.so files, split_config.language.apk for your language. You can remove all other files that aren't required.
  6. Reboot. If you've done everything, YouTube Vanced will be installed as a system app.
{Download links for both apps can be found here}

NOTE: If you are installing version 15.05.54, we have all separate apk files on Mediafire/afh now(not the whole apks file), you have to zip all "Base, Architecture and language" apk & make ZIP of them. Vanced will not install if you don't download all 3 respective apk files.
> It's not necessary to download every architecture, every language apk or both themes, you only require what's needed by you and which work on your device. The themes are black and dark and you can't install both at once(either black or dark.
NOTE: If you are installing version 15.33.34 and above, you can download a zip consisting of theme, architecture, and language using the Mega cloud link.

You can ask for support if you face any difficulties on either of the following platforms:


NOTE: To install the v14 version or below, check this link