[Treble-Enabled Device Guides, News, & Discussion] CosmicDan:
OK, here's a technical rundown of where I'm at now (which is also a bit of a blocker).

Trying to get the extra MIUI resources (framework and platform APK's) seems to be impossible without replacing a large chunk of libs. That's a bummer. But I'll post the info here for posterity reasons, if not to catch the attention of someone clever and interested enough to know more.

First of all, we need to inject the new framework/platform APK's to the zygote whitelist. I do this by hooking the start of ZygoteInit.smali#preloadClasses()V:

# CosmicDan - inject miui platform APK's to whitelist
const-string/jumbo v0, "/system/app/miui/miui.apk"
invoke-static {v0}, Lcom/android/internal/os/Zygote;->nativeAllowFileAcrossFork(Ljava/lang/String;)V
const-string/jumbo v0, "/system/app/miuisystem/miuisystem.apk"
invoke-static {v0}, Lcom/android/internal/os/Zygote;->nativeAllowFileAcrossFork(Ljava/lang/String;)V
const-string/jumbo v0, "/system/framework/framework-ext-res/framework-ext-res.apk"
invoke-static {v0}, Lcom/android/internal/os/Zygote;->nativeAllowFileAcrossFork(Ljava/lang/String;)V

...this worked. Well, at least it got rid of the "not whitelisted:" errors on logcat. Still, even with this here, I get errors like this in logcat:

06-09 02:40:10.374 599 599 I Zygote : Preloading resources...
06-09 02:40:10.446 599 599 I Zygote : ...preloaded 86 resources in 71ms.
06-09 02:40:10.448 599 599 W ReflectionUtils:
06-09 02:40:10.448 599 599 W ReflectionUtils: java.lang.reflect.InvocationTargetException
06-09 02:40:10.448 599 599 W ReflectionUtils: at java.lang.reflect.Method.invoke(Native Method)
06-09 02:40:10.448 599 599 W ReflectionUtils: at miui.util.ReflectionUtils.callStaticMethod(Unknown Source:5)
06-09 02:40:10.448 599 599 W ReflectionUtils: at miui.util.ReflectionUtils.tryCallStaticMethod(Unknown Source:3)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInitInjector.preloadMiuiResources(Unknown Source:44)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInit.preloadResources(Unknown Source:95)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInit.preload(Unknown Source:41)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInit.main(Unknown Source:252)
06-09 02:40:10.448 599 599 W ReflectionUtils: Caused by: android.content.res.Resources$NotFoundException: Drawable miui:drawable/action_bar_back_normal_dark with resource ID #0x10020080
06-09 02:40:10.448 599 599 W ReflectionUtils: Caused by: android.content.res.Resources$NotFoundException: File res/drawable-xxhdpi-v4/action_bar_back_normal_dark.png from drawable resource ID #0x10020080
06-09 02:40:10.448 599 599 W ReflectionUtils: at android.content.res.ResourcesImpl.loadDrawableForCookie(Unknown Source:177)
06-09 02:40:10.448 599 599 W ReflectionUtils: at android.content.res.ResourcesImpl.loadDrawable(Unknown Source:338)
06-09 02:40:10.448 599 599 W ReflectionUtils: at android.content.res.MiuiResourcesImpl.loadDrawable(Unknown Source:25)
06-09 02:40:10.448 599 599 W ReflectionUtils: at android.content.res.Resources.getDrawableForDensity(Unknown Source:14)
06-09 02:40:10.448 599 599 W ReflectionUtils: at android.content.res.Resources.getDrawable(Unknown Source:1)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInit.preloadDrawables(Unknown Source:17)
06-09 02:40:10.448 599 599 W ReflectionUtils: at java.lang.reflect.Method.invoke(Native Method)
06-09 02:40:10.448 599 599 W ReflectionUtils: at miui.util.ReflectionUtils.callStaticMethod(Unknown Source:5)
06-09 02:40:10.448 599 599 W ReflectionUtils: at miui.util.ReflectionUtils.tryCallStaticMethod(Unknown Source:3)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInitInjector.preloadMiuiResources(Unknown Source:44)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInit.preloadResources(Unknown Source:95)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInit.preload(Unknown Source:41)
06-09 02:40:10.448 599 599 W ReflectionUtils: at com.android.internal.os.ZygoteInit.main(Unknown Source:252)
06-09 02:40:10.448 599 599 W ReflectionUtils: Caused by: java.io.FileNotFoundException: res/drawable-xxhdpi-v4/action_bar_back_normal_dark.png
06-09 02:40:10.448 599 599 W ReflectionUtils: at android.content.res.AssetManager.openNonAssetNative(Native Method)
06-09 02:40:10.448 599 599 W ReflectionUtils: at android.content.res.AssetManager.openNonAsset(Unknown Source:17)
06-09 02:40:10.448 599 599 W ReflectionUtils: at android.content.res.ResourcesImpl.loadDrawableForCookie(Unknown Source:429)
06-09 02:40:10.448 599 599 W ReflectionUtils: ... 12 more
06-09 02:40:10.448 599 599 I ZygoteInitInjector: ...preloaded 0 miui sdk resources in 2ms.

...that resource exists in miuisystem.apk (IIRC, might be miui.apk), which is whitelisted now and indeed on the classpath (I see it in all the dex2oat related calls elsewhere). But for some reason it still can't seem to find it - it's resources aren't "included" for some reason.

Back in the day we had to add framework apk's to framework smali (AssetManager or some such class) when porting to get resources included, but we're already using 100% MIUI framework anyway so that should already be done.....

Now this is only a preload error - system should still boot after that. But what's worse is this error later on:

06-09 02:40:21.360 1632 1632 W ResourceType: DynamicRefTable(0x10): No mapping for build-time package ID 0x10.
06-09 02:40:21.361 1632 1632 W ResourceType: e[0x01] -> 0x01
06-09 02:40:21.361 1632 1632 W ResourceType: e[0x7f] -> 0x7f
06-09 02:40:21.361 1632 1632 E ResourceType: Failed resolving bag parent id 0x100d0100
06-09 02:40:21.373 1632 1684 D SystemServerInitThreadPool: Finished executing ReadingSystemConfig
06-09 02:40:21.377 1632 1632 I libthemeutils: Theme´╝Ü libthemeutil.so load success
06-09 02:40:21.383 1632 1632 E System : ******************************************
06-09 02:40:21.383 1632 1632 E System : ************ Failure starting system services
06-09 02:40:21.383 1632 1632 E System : java.lang.RuntimeException: Failed to create service com.android.server.am.ActivityManagerService$Lifecycle: service constructor threw an exception
06-09 02:40:21.383 1632 1632 E System : at com.android.server.SystemServiceManager.startService(Unknown Source:178)
06-09 02:40:21.383 1632 1632 E System : at com.android.server.SystemServer.startBootstrapServices(Unknown Source:81)
06-09 02:40:21.383 1632 1632 E System : at com.android.server.SystemServer.run(Unknown Source:266)
06-09 02:40:21.383 1632 1632 E System : at com.android.server.SystemServer.main(Unknown Source:10)
06-09 02:40:21.383 1632 1632 E System : at java.lang.reflect.Method.invoke(Native Method)
06-09 02:40:21.383 1632 1632 E System : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
06-09 02:40:21.383 1632 1632 E System : at com.android.internal.os.ZygoteInit.main(Unknown Source:306)
06-09 02:40:21.383 1632 1632 E System : Caused by: java.lang.reflect.InvocationTargetException
06-09 02:40:21.383 1632 1632 E System : at java.lang.reflect.Constructor.newInstance0(Native Method)
06-09 02:40:21.383 1632 1632 E System : at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
06-09 02:40:21.383 1632 1632 E System : at com.android.server.SystemServiceManager.startService(Unknown Source:135)
06-09 02:40:21.383 1632 1632 E System : ... 6 more
06-09 02:40:21.383 1632 1632 E System : Caused by: android.content.res.Resources$NotFoundException: File res/xml/power_profile.xml from xml type xml resource ID #0x1170010
06-09 02:40:21.383 1632 1632 E System : at android.content.res.ResourcesImpl.loadXmlResourceParser(Unknown Source:190)
06-09 02:40:21.383 1632 1632 E System : at android.content.res.Resources.loadXmlResourceParser(Unknown Source:23)
06-09 02:40:21.383 1632 1632 E System : at android.content.res.Resources.getXml(Unknown Source:3)
06-09 02:40:21.383 1632 1632 E System : at com.android.internal.os.PowerProfile.readPowerValuesFromXml(Unknown Source:9)
06-09 02:40:21.383 1632 1632 E System : at com.android.internal.os.PowerProfile.<init>(Unknown Source:14)
06-09 02:40:21.383 1632 1632 E System : at com.android.server.am.BatteryStatsService.<init>(Unknown Source:104)
06-09 02:40:21.383 1632 1632 E System : at com.android.server.am.ActivityManagerService.<init>(Unknown Source:900)
06-09 02:40:21.383 1632 1632 E System : at com.android.server.am.ActivityManagerService$Lifecycle.<init>(Unknown Source:5)
06-09 02:40:21.383 1632 1632 E System : ... 9 more
06-09 02:40:21.383 1632 1632 E System : Caused by: java.io.FileNotFoundException: res/xml/power_profile.xml
06-09 02:40:21.383 1632 1632 E System : at android.content.res.AssetManager.openXmlAssetNative(Native Method)
06-09 02:40:21.383 1632 1632 E System : at android.content.res.AssetManager.openXmlBlockAsset(Unknown Source:17)
06-09 02:40:21.383 1632 1632 E System : at android.content.res.ResourcesImpl.loadXmlResourceParser(Unknown Source:48)
06-09 02:40:21.383 1632 1632 E System : ... 16 more

That's a resource that exists in the base framework-res.apk - but it's not being loaded for some reason.

I think the ResourceType errors just before it are a clue. The 0x10 might be a special ResourceType that MIUI adds. But ResourceTypes.cpp is part of androidfw (libandroidfw.so) - so it looks like it will need to be replaced.

This means that a true GSI MIUI may be impossible :( libandroidfw.so will definitely be linked against many other objects that MIUI has modified, and who knows how many of them are hardware-dependent.

I will make that attempt in replacing the required libs after libandroidfw.so (a tedious process of elimination) to at least see if it solves the resources problem. But if anybody knowledgeable enough comes a cross this and can help, please do.