How To Guide Run an GSI on your Mi Pad 5

Search This thread

Coxxs

Member
Jun 10, 2022
14
12
I made a LSPosed module to fix the taskbar in PixelExperience. You can also hide the taskbar pill (optional).

Don't forget you can always long press on the taskbar to toggle show/hide in AOSP 12.1 : D

LSPosed: https://github.com/LSPosed/LSPosed
Module Release: https://github.com/Coxxs/android-fix-taskbar/releases
Module Source: https://github.com/Coxxs/android-fix-taskbar

New version (LSPosed is not required anymore): https://forum.xda-developers.com/t/run-an-gsi-on-your-mi-pad-5.4352591/post-87051579
 
Last edited:

vuoshinotizy

Senior Member
May 12, 2022
92
8
I made a LSPosed module to fix the taskbar in PixelExperience. You can also hide the taskbar pill (optional).

Don't forget you can always long press on the taskbar to toggle show/hide in AOSP 12.1 (if you didn't hide the pill : ) ).

LSPosed: https://github.com/LSPosed/LSPosed
Module Release: https://github.com/Coxxs/android-fix-taskbar/releases
Module Source: https://github.com/Coxxs/android-fix-taskbar
which roms is better for you? Pixel experience or the lineageos19? Thanks
 

Coxxs

Member
Jun 10, 2022
14
12
which roms is better for you? Pixel experience or the lineageos19? Thanks
I like PE a bit more because it can pass SafetyNet. AndyYan's LOS comes with `su`, which makes it harder to pass SafetyNet (other than that it's a great rom).

The problem with PE is that Pixel has not yet launched a tablet, so when using PE with a tablet there are some minor issues. It may be improved when Pixel launches a tablet in the future : )
 

Coxxs

Member
Jun 10, 2022
14
12
When using GSI on my Mi Pad 5 Pro, the screen often has a sharpening effect (white borders of text), which looks strange.

Here is the Magisk module to fix the issue (vendor.display.disable_dest_scaler), enjoy:
 

Attachments

  • Remove screen sharpening - Mi Pad 5 Pro.zip
    2 KB · Views: 39
  • Like
Reactions: stephtban

vuoshinotizy

Senior Member
May 12, 2022
92
8
When using GSI on my Mi Pad 5 Pro, the screen often has a sharpening effect (white borders of text), which looks strange.

Here is the Magisk module to fix the issue (vendor.display.disable_dest_scaler), enjoy:
How can i fix this problem on the normal tab 5 without magisk? I cant install it on the lineageos
 

nicflack

Senior Member
Aug 8, 2019
104
8
can't flash after unlock

PS D:\Program Files\Cellphone\platform tools> ./fastboot flash system d:\PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Invalid sparse file format at header magic
Resizing 'system_a' OKAY [ 0.016s]
Sending sparse 'system_a' 1/14 (262108 KB) OKAY [ 11.781s]
Writing 'system_a' OKAY [ 1.406s]
Sending sparse 'system_a' 2/14 (262120 KB) OKAY [ 11.734s]
Writing 'system_a' OKAY [ 1.297s]
Sending sparse 'system_a' 3/14 (262112 KB) OKAY [ 11.672s]
Writing 'system_a' OKAY [ 1.297s]
Sending sparse 'system_a' 4/14 (262116 KB) OKAY [ 11.719s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 5/14 (262128 KB) OKAY [ 11.707s]
Writing 'system_a' OKAY [ 1.267s]
Sending sparse 'system_a' 6/14 (262124 KB) OKAY [ 11.689s]
Writing 'system_a' OKAY [ 1.234s]
Sending sparse 'system_a' 7/14 (262124 KB) OKAY [ 11.969s]
Writing 'system_a' OKAY [ 1.266s]
Sending sparse 'system_a' 8/14 (262124 KB) OKAY [ 11.781s]
Writing 'system_a' OKAY [ 1.250s]
Sending sparse 'system_a' 9/14 (262124 KB) OKAY [ 11.625s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 10/14 (262124 KB) OKAY [ 12.063s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 11/14 (262120 KB) FAILED (Error reading sparse file)
fastboot: error: Command failed




PS D:\Program Files\Cellphone\platform tools> .\fastboot flash system PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Sending 'system' (3640652 KB) FAILED (Write to device failed (Unknown error))
fastboot: error: Command failed


PS D:\Program Files\Cellphone\platform tools> .\fastboot flash system PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Invalid sparse file format at header magic
 
Last edited:

mikefnz

Senior Member
Jan 30, 2008
737
211
Christchurch
OnePlus 7T
Xiaomi Mi Pad 5
can't flash after unlock

PS D:\Program Files\Cellphone\platform tools> ./fastboot flash system d:\PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Invalid sparse file format at header magic
Resizing 'system_a' OKAY [ 0.016s]
Sending sparse 'system_a' 1/14 (262108 KB) OKAY [ 11.781s]
Writing 'system_a' OKAY [ 1.406s]
Sending sparse 'system_a' 2/14 (262120 KB) OKAY [ 11.734s]
Writing 'system_a' OKAY [ 1.297s]
Sending sparse 'system_a' 3/14 (262112 KB) OKAY [ 11.672s]
Writing 'system_a' OKAY [ 1.297s]
Sending sparse 'system_a' 4/14 (262116 KB) OKAY [ 11.719s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 5/14 (262128 KB) OKAY [ 11.707s]
Writing 'system_a' OKAY [ 1.267s]
Sending sparse 'system_a' 6/14 (262124 KB) OKAY [ 11.689s]
Writing 'system_a' OKAY [ 1.234s]
Sending sparse 'system_a' 7/14 (262124 KB) OKAY [ 11.969s]
Writing 'system_a' OKAY [ 1.266s]
Sending sparse 'system_a' 8/14 (262124 KB) OKAY [ 11.781s]
Writing 'system_a' OKAY [ 1.250s]
Sending sparse 'system_a' 9/14 (262124 KB) OKAY [ 11.625s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 10/14 (262124 KB) OKAY [ 12.063s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 11/14 (262120 KB) FAILED (Error reading sparse file)
fastboot: error: Command failed




PS D:\Program Files\Cellphone\platform tools> .\fastboot flash system PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Sending 'system' (3640652 KB) FAILED (Write to device failed (Unknown error))
fastboot: error: Command failed


PS D:\Program Files\Cellphone\platform tools> .\fastboot flash system PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Invalid sparse file format at header magic
Out of date platform-tools? Corrupt download?
Why not put platform tools into a C: drive top directory?
 

manu_jedi

Member
Jun 28, 2018
49
21
OnePlus 8 Pro
Xiaomi Mi Pad 5
can't flash after unlock

PS D:\Program Files\Cellphone\platform tools> ./fastboot flash system d:\PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Invalid sparse file format at header magic
Resizing 'system_a' OKAY [ 0.016s]
Sending sparse 'system_a' 1/14 (262108 KB) OKAY [ 11.781s]
Writing 'system_a' OKAY [ 1.406s]
Sending sparse 'system_a' 2/14 (262120 KB) OKAY [ 11.734s]
Writing 'system_a' OKAY [ 1.297s]
Sending sparse 'system_a' 3/14 (262112 KB) OKAY [ 11.672s]
Writing 'system_a' OKAY [ 1.297s]
Sending sparse 'system_a' 4/14 (262116 KB) OKAY [ 11.719s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 5/14 (262128 KB) OKAY [ 11.707s]
Writing 'system_a' OKAY [ 1.267s]
Sending sparse 'system_a' 6/14 (262124 KB) OKAY [ 11.689s]
Writing 'system_a' OKAY [ 1.234s]
Sending sparse 'system_a' 7/14 (262124 KB) OKAY [ 11.969s]
Writing 'system_a' OKAY [ 1.266s]
Sending sparse 'system_a' 8/14 (262124 KB) OKAY [ 11.781s]
Writing 'system_a' OKAY [ 1.250s]
Sending sparse 'system_a' 9/14 (262124 KB) OKAY [ 11.625s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 10/14 (262124 KB) OKAY [ 12.063s]
Writing 'system_a' OKAY [ 1.281s]
Sending sparse 'system_a' 11/14 (262120 KB) FAILED (Error reading sparse file)
fastboot: error: Command failed




PS D:\Program Files\Cellphone\platform tools> .\fastboot flash system PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Sending 'system' (3640652 KB) FAILED (Write to device failed (Unknown error))
fastboot: error: Command failed


PS D:\Program Files\Cellphone\platform tools> .\fastboot flash system PixelExperience_Plus_arm64-ab-12.1-20220518-UNOFFICIAL.img
Invalid sparse file format at header magic

Try "fasboot reboot fasboot" to switch to fastbootd
 

Coxxs

Member
Jun 10, 2022
14
12
new problem ,how to get boot.img from pe12?

i cant find boot.img in pe12 rom with 7zip.
There are no boot.img file for gsi rom, why do you need that?

If you need a boot.img to install Magisk, get it from Xiaomi fastboot firmware .tgz.

The miui fastboot .tgz you downloaded should be exactly the same as your model and system version (before flashing PE).

Also, after patching boot.img, use fastboot boot boot.img to enter magisk-enabled system temporarily, and use Magisk Manager to install Magisk in your PE system. This way you won't flash the wrong boot.img by mistake.

* edit: fix typo
 
Last edited:
  • Like
Reactions: ImAdnanFarabi

nicflack

Senior Member
Aug 8, 2019
104
8
There are no boot.img file for gsi rom, why do you need that?

If you need a boot.img to install Magisk, get it from Xiaomi fastboot firmware zip.

The miui fastboot zip you downloaded should be exactly the same as your model and system version (before flashing PE).

Also, after patching boot.img, use fastboot boot boot.img to enter magisk-enabled system temporarily, and use Magisk Manager to install Magisk in your PE system. This way you won't flash the wrong boot.img by mistake.

here? Does region matter?

there is no boot.img in fireware....
 

Attachments

  • 2022-06-11 194841.png
    2022-06-11 194841.png
    15.1 KB · Views: 22

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Would this work on the global rom with unlocked Bootloader? So we could skip installing the China A11 rom first?
    I would recommend you to switch first to Chinese A11 Fastboot ROM. After that, install the A12 update.
    You'll have to do a factory reset though after updating to A12.
    1
    I am trying to install latest pe plus with magisk and follow these steps: download patched boot.img, flash it through command fastboot flash boot boot.img, reboot to system, seeing magisk installed, fastboot again, install vbmeta, reboot, then these 3 commands:
    fastboot delete-logical-partition product
    fastboot delete-logical-partition product_a
    fastboot delete-logical-partition product_b
    after that install pe plus through fastboot flash system system.img and has bootloop
    What i did wrong? It is not my first attempt, without magisk gsi was installed ok, but with that it is always bootloop
    1
    You can flash the normal version but first you try this command:

    fastboot delete-logical-partition product
    fastboot delete-logical-partition product_a
    fastboot delete-logical-partition product_b

    and run the fastboot flash command again

    It works for me.
    Thank you, this saved my ass.
    1
    Hi, do you know how to install gapps?
    Try this:

    It already has Google Apps included.
  • 8
    To run an GSI on your Mi pad 5 :
    Unlock bootloader

    Download an arm64 AB gsi: https://forum.xda-developers.com/f/treble-enabled-device-development-a-ab-roms.7260/
    I used system-roar-arm64-ab-vndklite-vanilla.img by Phh
    Download vbmeta.img from google

    Reboot to fastboot
    Open an cmd:

    fastboot flash vbmeta vbmeta.img

    fastboot reboot fastboot

    fastboot flash system system-roar-arm64-ab-vndklite-vanilla.img

    fastboot reboot recovery

    Make an factory reset

    Reboot
    5
    I can report that I am on a non-vndklite version of PE(plus)11 GSI (PixelExperience_Plus_arm64-ab-11.0-20211011-UNOFFICIAL.img.xz) (not that I understand what vndk is). And it seems to be working surpringly very well!!... except for the pen, of course! The pen is recognised as 'Xiaomi Smart Pen' as an input device according to DevCheck Pro app (and I got the same info on this app with stock MIUI). The buttons on the pen work as forward/backward keys... but still no input function on the touch screen. But other than that, the GSI has been working without a crash for about a couple of hours. The best of all I've tried so far! Surely, too good to be true...

    Some tweaks were necessary: as I said before, I installed 2 Magisk modules for stuttering audio (GSI Audio Stutter Fix - Mi NOTE 10 Lite (toco).zip) & totally broken bluetooth audio (Note9Taudio.zip):
    But the 2nd module might not be necessary if you follow the Phh Treble Settings the person on the 2nd link is suggesting.

    I used Migrate to copy all my apps. Some google apps (gmail, g-map, g-drive) weren't copied, so I had to install them manually.. and they're working fine. Other google apps (incl google play services & google play store) were installed fine and have been functioning well so far. I didn't install Magisk Gapps etc separately.

    In case you're starting out, I've tried the following GSIs in the last few days, but none of them worked (I came from MIUI CN 12.5.8 for Pad 5 Pro 5G):
    PixelExperience_Plus_arm64-ab-vndklite-11.0-20211011-UNOFFICIAL.img.xz
    PixelExperience_arm64-ab-vndklite-12.0-20211121-UNOFFICIAL.img.xz
    PixelExperience_arm64-ab-12.0-20211121-UNOFFICIAL.img.xz
    https://github.com/phhusson/treble_.../system-roar-arm64-ab-vndklite-vanilla.img.xz

    Oh someone mentioned the refresh rate. I can't find how to set it on Settings on PE11 GSI, so probably it's not changeable? I've tried Display Checker app, and it looks like mine is at 60Hz. I don't play games so it's acceptable for me. But if anyone knows how to change it to 120Hz, it would be good to know!

    I want to thank the OP who first brought this to our attention. I'd never tried GSIs (always spoilt with good custom or stock roms). Fingers crossed for my current GSI!
    5
    I made a LSPosed module to fix the taskbar in PixelExperience. You can also hide the taskbar pill (optional).

    ...

    I have made the module into a Magisk module (implemented using Resource Overlay). LSPosed is not required anymore. Enjoy : )

    You can use the module to fix the taskbar height in PixelExperience. You can also use it to hide the taskbar pill in PE and other ROMs.

    Download: https://github.com/Coxxs/hide-tablet-taskbar/releases
    4
    These settings were already enabled.
    I now disabled it and unpaired the headset, then reboot.
    Enabling the settings reboot,then pair the headset still no working Bluetooth audio.
    In the selection of the audio device if I select the headset it won't change to the headset and if I try to increase the volume of the headset it will always jump back to zero.
    Do not enable "Use alternate audio policy" in Qualcomm features (just make sure, that would create that bug)
    Misc features -> "Disable audio effects" and "Force-disable a2dp offload" and i would not enable the bluetooth workaround mediathek (works for me without that setting)
    4
    Please do a review about this Gsi in YouTube