[Xiaomi Mi Pad 4] Android Generic System Image installation Guide

tayyh89

Member
Sep 8, 2015
28
3
0
Hi,

May I know if this is the correct procedure for updating a Treble rom for the device?
1. Boot into recovery
2. Push files into device:
a. adb push system-arm64-aonly-gaps-su.img /sdcard/
b. adb push Disable_Dm-Verity_FEC_v1.2.zip /sdcard/ (is this necessary for updating?)
3. Install files:
a. Click on install image, select system-arm64-aonly-gaps-su.img in /sdcard/
b. Click on install zip, select Disable_Dm-Verity_FEC_v1.2.zip in /sdcard/ (is this necessary for updating?)
4. Wipe cache/dalvik (optional, recommended)
5. Reboot system

Thanks.

PS: I've updated using the above procedure, and it seems to be correct, however, not sure if the disable Dm Verity zip is a necessary step.
 

Alex Kane

Senior Member
Mar 10, 2015
93
31
0
PS: I've updated using the above procedure, and it seems to be correct, however, not sure if the disable Dm Verity zip is a necessary step.
By flashing a Generic System Image, you effectively alter the contents of the system partition, not the kernel. Since GSIs don't ship their own kernels, they use those provided by whatever stock firmware was previously installed. In order for Android to verify the integrity of the system, stock linux kernels check the system partition before booting and if they detect changes like those introduced by flashing a GSI, they halt the boot sequence. This is where the Dm_Verity.zip comes in handy. It patches the stock kernel to skip the verification step, allowing us to boot a modified system. The .zip is required when flashing from stock (MIUI) to a GSI, but is not necessary when flashing a custom ROM or updating from one GSI to another.
 

Tomek0000

Senior Member
Jun 14, 2015
307
64
0
@Alex Kane are you sure ?
My opinion is : Disable_Dm-Verity changes system partion for check recovery partition . We need it only if we want to use TWRP with stock MIUI.
I installed miui 10 stable, TWRP (over fastboot) , restart to twrp, format data (remove encription), wipe cache and dalvik, install aicp(.img>system) + opengapps.zip + magisk17.2.zip , restart to system and works ok (including xposed).
 
Last edited:
  • Like
Reactions: thE_29

thE_29

Senior Member
Jul 12, 2010
374
32
0
@Alex Kane are you sure ?
My opinion is : Disable_Dm-Verity changes system partion for check recovery partition . We need it only if we want to use TWRP with stock MIUI.
I installed miui 10 stable, TWRP (over fastboot) , restart to twrp, format data (remove encription), wipe cache and dalvik, install aicp(.img>system) + opengapps.zip + magisk17.2.zip , restart to system and works ok (including xposed).
If I dont want XPosed, then dont flash Magisk or?

And could you test for Widevine L1 support?
https://play.google.com/store/apps/details?id=com.androidfung.drminfo

Also is that Android 9 or 8?
 

Tomek0000

Senior Member
Jun 14, 2015
307
64
0
@thE_29

If you do not need xposed you do not have to format /data and you can use custom rom build on android 9.
WL1 is not supported on mi pad 4. It has to be in the kernel, but the kernel you use from MIUI 10 .
Aicp is 8.1 .
 
  • Like
Reactions: thE_29

thE_29

Senior Member
Jul 12, 2010
374
32
0
@thE_29

If you do not need xposed you do not have to format /data and you can use custom rom build on android 9.
WL1 is not supported on mi pad 4. It has to be in the kernel, but the kernel you use from MIUI 10 .
Aicp is 8.1 .
Ok, so if it is a kernel "feature" it could be done with custom kernels.. At least there is hope
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone