yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 9 Questions & Answers] phhusson:
Two, quite respected devs are saying GSI should be enough for everyone, and you - the non dev - say it is a joke.

Guess who's the joke?

Doing a device-specific tree implies /a lot/ of useless and repetitive work, that is basically non-sense when you have a Treble base.
[Xiaomi Mi 9 Questions & Answers] phhusson:
Thanks for the review. Made me realize I forgot few things in my release...

Yup that's fixed in my local tree that I forgot to commit before releasing... Sorry..

I'll try working on it, though I wouldn't mind help from the dev community really.

Edit: I just did a very crude fix for the low brightness issue (basically I ask Android to change brightness much faster, and I wait 60ms before starting FP sensor. Seem ok, I'll test it more.

I can confirm it works

My gut says that minimum backlight, and no "night mode" are likely culprits.

Yup thanks for the report, that's now fixed.

Well, my GSI on Mi9 is my daily-driver and I'm happy with it. And the two weeks I spent with MIUI were just totally awful.
[Xiaomi Mi 9 Questions & Answers] CrazyBeaver2377:
Calling me a joke wasn't really needed. I'm just sharing my thoughts and opinions here, no need to get mad about it.

There are numerous reasons for device specific development and I'm pretty sure we'll get a "quite respected dev" working on device tree bringup sooner than later.
[Xiaomi Mi 9 Questions & Answers] Potato997:
Hi, nice to see you here.

About the "waste" I was talking about, the video playback issue and the fp were a deal breaker for me.

It was a waste imo to watch video at 720p on a lot of videos, as I spend many time on YouTube it was just annoying.

Also the fp was really annoying to use at late hours.

I wanted to share my experience, but overall it's a great work already. It shows the potential of treble and if the little bugs gets solved I'd be happy with AOSP image too.

And yes, MIUI is awful no matter how much they update it.
[Xiaomi Mi 9 Questions & Answers] :
So it seems you will do a hard and good job to make this GSI Rom more and more stable.:good::laugh:

Looks like a great future for Mi9!:victory:
[Xiaomi Mi 9 Questions & Answers] phhusson:
[MENTION=5169444]AndroPlus[/MENTION] May I ask a how to contact you more directly?

Right, fair enough.

Well FP is "fixed" (at least improved) now.

For video decoding, since the issue doesn't appear with Google's GSI, it shouldn't be too hard to find the issue. I hope at least.

Hum don't keep your hopes too high there. Since it is usable for me, I won't spend too much time on it.
[Xiaomi Mi 9 Questions & Answers] phhusson:
I've fixed most bugs, here is a test image for anyone who wants to try it:

https://drive.google.com/open?id=1PcXo0-TkX8VETdLBdAWShkY78pA-nQIK

quick changelog for mi 9:

- much better fingerprint in low backlight (probably a bit slower with high backlight)

- fixed hardware video decoding/encoding (smooth 4k60 playback, and fixes camera recording)

- enabled AOD

- enabled auto-backlight

- enable battery details

- lower minimum brightness

All of those changes will of course be in my next AOSP GSI (v113?)

If you like what I did there, don't forget to click on the donate button :)
[Xiaomi Mi 9 Questions & Answers] Vihru:
has anyone got this working? i flashed vbmeta.img and then this.. no success..
[Xiaomi Mi 9 Questions & Answers] phhusson:
md5 is ca088b07a14f1eed0bba0bae52eb3f15 system-test-20190408-mi9-gapps.img

fingerprint is ro.build.fingerprint=Android/treble_arm64_bgS/phhgsi_arm64_ab:9/PQ2A.190405.003/phh04071851:userdebug/test-keys

Can you check that's the values you've got when flashing?
[Xiaomi Mi 9 Questions & Answers] Vihru:
yes sure, but how i check those? i mean that fingerprint.. it wont boot..
[Xiaomi Mi 9 Questions & Answers] phhusson:
Other people having issues to boot told me they had working adb (though they disappeared before I could ask for more infos...)
[Xiaomi Mi 9 Questions & Answers] Vihru:
i tried with

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

fastboot flash system system-test-20190408-mi9-gapps.img

factory reset in twrp

and no boot.. . just stuck in mi logo.
[Xiaomi Mi 9 Questions & Answers] phhusson:
Ok, but is adb working?
[Xiaomi Mi 9 Questions & Answers] Vihru:
718f48aa device

yes i think

adb shell getprop

[ro.build.fingerprint]: [Android/treble_arm64_bgS/phhgsi_arm64_ab:9/PQ2A.190405.003/phh04071851:userdebug/test-keys]
[Xiaomi Mi 9 Questions & Answers] phhusson:
then do adb shell getprop ro.build.fingerprint
[Xiaomi Mi 9 Questions & Answers] Vihru:
[ro.build.fingerprint]: [Android/treble_arm64_bgS/phhgsi_arm64_ab:9/PQ2A.190405.003/phh04071851:userdebug/test-keys]
[Xiaomi Mi 9 Questions & Answers] phhusson:
Here is an updated test image with fix for chinese vendor:

https://treble.phh.me/system-test-mi9-20190309.img
[Xiaomi Mi 9 Questions & Answers] Corra.:
Hi Phhusson, thank you for your hard work!

I'm reading the flash instruction on your github but i have some questions:

1) Gapps are present in system.img or i need to flash a zip package with TWRP?

2) Is it possible to flash newer vbmeta extracted from global dev 9.4.2 zip?
[Xiaomi Mi 9 Questions & Answers] Potato997:
I can confirm the latest build works and fp works too on lower light.

I will try for some time and share my experience here again :)
[Xiaomi Mi 9 Questions & Answers] :
Good to know, but its ok. Im not fastidious and i guess if the GSI Rom is stable enough for you, it will be the same for me ^^:D
[Xiaomi Mi 9 Questions & Answers] sdevaux:
I want to test it too, i'm done wirh miui pls how ro install it??
[Xiaomi Mi 9 Questions & Answers] Mohammed779:
Read this GSI's wiki for mi 9, literally 2 lines in fastboot to install.
[Xiaomi Mi 9 Questions & Answers] sdevaux:
off course, i tried 2 lines ok but no boot just bootlogo mi and then twrp!!!
[Xiaomi Mi 9 Questions & Answers] Philomene:
try the last test image of PhHusson, post 60 it boot well
[Xiaomi Mi 9 Questions & Answers] baggino:
Have you solved this problem?

If yes, how?

I keep receiving the same problem with vbmeta, while I don't have any problem flashing the system.img.

I have updated all the drivers, but keep unrecognising verity and verification command.

Thanks!
[Xiaomi Mi 9 Questions & Answers] Vihru:
update fastboot drivers
[Xiaomi Mi 9 Questions & Answers] baggino:
Thanks a lot for the quick reply!

Would you be able to link me where you have downloaded them? I recently tried with Android Studio and its android sdk, but no success.

Thanks in advance
[Xiaomi Mi 9 Questions & Answers] Vihru:
try this https://drive.google.com/file/d/1d-cgAseCGAFbE0HAGFlSwE8ug0zn_LbE/view?usp=drivesdk
[Xiaomi Mi 9 Questions & Answers] xjqlfq:
there have a bug when i use my bluetooth device to make a call,bluetooth device do not work on this time

---------- Post added at 11:06 AM ---------- Previous post was at 11:01 AM ----------

there have a bug when i use my bluetooth device to make a call,bluetooth device do not work on this time
[Xiaomi Mi 9 Questions & Answers] coderstory:
BUG

i found tow issues with this rom

1.Battery icon is blocked （need set Margin）

2.Camera area in the center of the screen ， the sawtooth at the edge of the screen is obvious （Missing configuration information）

look pic

https://imgur.com/UWbhVza
[Xiaomi Mi 9 Questions & Answers] phhusson:
Right, I need to add an option in treble settings for that.

In the meantime, use:

https://blog.coderstory.cn/wp-content/uploads/2019/04/QQ截图20190410190406.png

Issue tracked in https://github.com/phhusson/treble_experimentations/issues/470

Should be easy to fix it if I have the time.
[Xiaomi Mi 9 Questions & Answers] phhusson:
Right that's a known issue

I think you missed the part where this is an AOSP ROM :P

That's a long-standing issue:

https://github.com/phhusson/treble_experimentations/issues/374

But it seems like noone cares. Show that you care by adding yourself in the bounty-list.
[Xiaomi Mi 9 Questions & Answers] coderstory:
system time can not auto sync

maybe i need change ntp server

logcat （the day is 04-09）when i switch option will print this log

04-09 23:44:08.530 929 988 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
[Xiaomi Mi 9 Questions & Answers] phhusson:
Works fine here, but then if you're behind anti-google firewall, yes you'll need to change ntp server.
[Xiaomi Mi 9 Questions & Answers] coderstory:
Https://treble.andro.plus/

this rom use your config to build rom

i try it ，this problem is fixed。

Although the content of the displayed menu is wrong，But it can take effect
[Xiaomi Mi 9 Questions & Answers] xjqlfq:
Here is magisk path for BT in-call audio and tap to wake (force enabled):

https://drive.google.com/file/d/1JVQ...ew?usp=sharing

This module also works on other GSIs.

https://xdaforums.com/showpost.php?...sterm.img
i have test in another rom it works
[Xiaomi Mi 9 Questions & Answers] Potato997:
A little update about the latest test image (post #60):

Fingerprint:

FP now works with lowest brightness too, without blinding us

The fingerprint is over the 0 button, so it's a little difficult to press 0 after rebooting the device but nothing important

You need to wake the device first to use the FP as before,

but if you receive a notification and have AoD enabled, you will be able to unlock it if you try right away

Camera:

Camera works fine but it's limited to 1080p and 720p

To fix that you need to replace vendor/etc/media_profiles_V1_0.xml with the Pixel 3 one you can fine here:

https://github.com/TadiT7/google_bl...0821aeefd0/vendor/etc/media_profiles_V1_0.xml

Also, it's limited to 30fps because of a missing media_profiles.xml

You can find that in the attachment of this post and copy it under /vendor/etc, reboot and Gcam will have 60fps option available

System dark theme:

The dark theme is glitched atm, it will be kinda orange/pink instead of dark

To fix that, delete the faulty overlay in vendor/overlay/SysuiDarkTheme/SysuiDarkThemeOverlay.apk

I did that from TWPR (mount vendor first) and black theme works fine again

Battery:

Power save mode is broken, nothing happens if you enable it

Some people have deep sleep issue (including me) https://imgur.com/a/EcKQVbs

While other doesn't https://imgur.com/a/f4u3MW7

Still have to figure it out but it's not bad

Edit: do not enable out-of-pocket gesture from phh settings or the device won't go to deep sleep

Video playback:

60fps videos works good

I have 1080p60fps HDR videos on Youtube (not sure if the HRD is enabled by default or because of new media profiles lol)

Instagram:

On stock I hade some laggy videos, while with GSI everything's fluid as it should be

Overall, it can be a daily driver in my opinion, after some little fixes :)

Thanks to [MENTION=1915408]phhusson[/MENTION] for the update!
[Xiaomi Mi 9 Questions & Answers] Mohammed779:
What's the wakelock keeping the phone from deepsleep?
[Xiaomi Mi 9 Questions & Answers] Corra.:
Thank you for your review. Did you use the 9.3.1 vbmeta, or the newer 9.4.2?
[Xiaomi Mi 9 Questions & Answers] Potato997:
9.3.1
[Xiaomi Mi 9 Questions & Answers] AndroPlus:
smp2p-sleepstate is the cause.

To workaround it, disable AOD or install kernel which supports wakelock block and block it.

My kernel has wakelock bloker:

https://github.com/AndroPlus-org/android_kernel_xiaomi_sm8150/releases
[Xiaomi Mi 9 Questions & Answers] nicpas:
Thank you for testing for all of us!

Is Netflix working with Widevine L1?

And whats About GPay? Does it work or Need to patch via Magisk canary?

Do you have an easy tutorial for Noobs to Flash this GSI?
[Xiaomi Mi 9 Questions & Answers] Corra.:
Thank you. Is it possible to have root with magisk? If yes, do i need to install through twrp or patched boot.img?
[Xiaomi Mi 9 Questions & Answers] Potato997:
I'll try to disable AoD and check if deepsleep issue is fixed.

Safety net cts fails so I think GPay doesn't work. Maybe supersu files have to be remove, I'll try when I will have time.

For magisk, I sideloaded Magisk 19.0 and it roots successfully.

For installation, I recommend checking the last part of this wiki as always: https://github.com/phhusson/treble_experimentations/wiki/Xiaomi-Mi-9
[Xiaomi Mi 9 Questions & Answers] Corra.:
I have cts fails also on miui 9.4.2 beta. I pass safetynet with MagiskHide Props Config module choosing the right fingerprint prop.

The sideload installation of magisk need the twrp? I've never installed magisk with sideload
[Xiaomi Mi 9 Questions & Answers] mensoif:
Only Xiaomi.eu roms are passing Safety Net checks out of the box.

Envoyé de mon MI 9 en utilisant Tapatalk
[Xiaomi Mi 9 Questions & Answers] Potato997:
I disabled AOD but looks it's the same

https://imgur.com/a/sryIh4Z
[Xiaomi Mi 9 Questions & Answers] phhusson:
Also, could you give me kernel logs? (with dmesg from adb shell for instance)

SMP2P is used for WiFi/bluetooth.

So first, do you have WiFi and/or bluetooth enabled?

If so, start by disabling them, and see if issue persists.

If it persists, also disable passive scanning in settings => location

if it still persists, I guess we'll see something in the kernel logs.

If simply disabling fixes the issue, try to re-enable them, but with wifi not connected.

Based on those informations I'll try to narrow down the issue.
[Xiaomi Mi 9 Questions & Answers] Potato997:
Bluetooth is disabled and WiFi is enabled most of the day.

I'll try to disable WiFi for an hour and see what happens.

I already disabled passive scanning yesterday and it looks the same.

dmesg: https://drive.google.com/open?id=1thOAGWdmocE9yjZHOXJxQTg5z-lIqqVG

---------- Post added at 02:24 PM ---------- Previous post was at 01:42 PM ----------

Update: With both WiFi and bluetooth disabled, same situation
[Xiaomi Mi 9 Questions & Answers] baggino:
wanting to try test upgrade (post # 60) can I make dirty fastboot, without losing my settings?
[Xiaomi Mi 9 Questions & Answers] Potato997:
Found source of the deep sleep issue.

I had out of pocket gesture enabled (which didn't work anyway)
[Xiaomi Mi 9 Questions & Answers] extremegreat:
Thanks for the build

Is it planned to fix Face Unlock and Double tap to wake ?
[Xiaomi Mi 9 Questions & Answers] doggydog2:
^this and fingerprint circle conflicting with login keyboard.. that'd be a great start.
[Xiaomi Mi 9 Questions & Answers] doggydog2:
so i've learned to live with the fp circle .. you can still press the key in the green area by a swipe ...

the green circle is also almost invisible.

also getting unlock only after second try, or when brightness is very high.. during the process, screen brightness go up and down like crazy.

not missing facelock, but i insist on tap2wake, and got it with the magisk_patch_for_Mi9_v3.zip package.
[Xiaomi Mi 9 Questions & Answers] cd993:
Sorry if I've missed this, but is there a list of what the magisk patch for mi 9 fixes?
[Xiaomi Mi 9 Questions & Answers] doggydog2:
well i wish AndroPlus was updating changelogs more (also in ROM, no update for April).. i experienced & see in the files the patch is fixing dt2wake, bluetooth in-call and i guess more (e.g. Netflix). I don't quite understand why the patch v3 is so much bigger than v1.
[Xiaomi Mi 9 Questions & Answers] koenkk:
Could you share a link to this file?
[Xiaomi Mi 9 Questions & Answers] cd993:
https://drive.google.com/file/d/1jcJLJiLFtRda5P1bzOukAkZIj-9EIFUO/view
[Xiaomi Mi 9 Questions & Answers] koenkk:
With V3, my MI 9 automatically reboots +- 30 seconds after started, during this up-time it can also not establish a cellular connection (No service). With V1 which I got from here I don't have this issue.
[Xiaomi Mi 9 Questions & Answers] Philomene:
No issue for me with v3
[Xiaomi Mi 9 Questions & Answers] :
Can someone inaugurate me what about you are talking guys? What is that patch and where do you got it? I can see the download links, but I would to know where you got them?
[Xiaomi Mi 9 Questions & Answers] Philomene:
We spoke about FolokRom GSI with the Magisk patch v3 for Mi9 : https://treble.andro.plus/
[Xiaomi Mi 9 Questions & Answers] :
Ah okay thanks. Anyway I have to wait 10 days until unlock...:(
[Xiaomi Mi 9 Questions & Answers] FaserF:
The rom is great, but i am unable to install gapps with that rom. Any idea?

And could someone help me with PHHs GSI Rom?

I am unable to boot the latest test image. Using TWRP 3.3.0-0423 chinese version by wzsx150

1. Flashing latest Global Stable rom via twrp

2. Flashing vbmeta via fastboot

3. Flashing system image via fastboot

4. Rebooting to twrp and do a factory reset

5. Rebooting to system

-> Unable to boot the GSI, other GSI like the one mentioned above works.
[Xiaomi Mi 9 Questions & Answers] Mohammed779:
Usually it's just like that. Try format Data after the installation.

For gapps, you gotta go to wipe, click on system, go to it's options, resize, swipe to confirm, then go to mount and tick system, now u can install arm64 gapps.
[Xiaomi Mi 9 Questions & Answers] Philomene:
follow the post of andro+ : To install GApps, you have to do Wipe -> Advanced wipe -> Select system -> Resize, then Mount -> mount system, then install GApps zip.

i install nano Opengapps without problem
[Xiaomi Mi 9 Questions & Answers] FaserF:
Tried that for the gapps, when I check the remaining space there is also enough space available. Still get the error. I also tried removing the space check from the opengapps installer script, then it installs but after a boot to the OS there are still no gapps installed.
[Xiaomi Mi 9 Questions & Answers] lightcao:
I also had no problem with Gapps. Try booting into the LR.Team/wzsx150 TWRP. I believe they have a newer version that came out recently. I used that today and was able to get into FlokoROM with no issues after Formating < reboot to recovery < Flash img to system partition < resize system < reboot recovery < flash magisk, Gapps < reboot into first boot. Should work flawlessly.
[Xiaomi Mi 9 Questions & Answers] doggydog2:
this is not enough when swapping between different types of ROMs, have to

miflash

the global stock or global dev.

the 2.2GB package like miui_CEPHEUSGlobal_9.4.2_19357b30e9_9.0_compatible.zip is a delta update. flashable via TWRP but not enough when switching to AOSP.

the 3GB package like cepheus_global_images_9.3.1_20190301.0000.00_9.0_global_cdb3885bac.tgz is the full update.

as for gapps, i can't flash OpenGapps at all, so i use MindTheGapps-9.0.0-arm64-20190216_211116.zip.

---------- Post added at 01:16 PM ---------- Previous post was at 01:06 PM ----------

i'd like the following fixed in AOSP ROMs (e.g. Floko):

-LED: led light doesn't turn on when charging, without AOD there's no charging status visible after initial sound. Notifications\Battery light is with no function here, as there are no colors.

-full screen apps: some apps which don't use the whole screen will have empty bar in the bottom, but without the traditional text 'click to expand'. It's just empty bar. And if you go to the respective setting, it won't have effect and it won't be saved. So it means some apps will always stay in cropped display mode and there's no way to fix.

-all pickup, tilt functions in Ambient settings don't work as they overreact to any tiny movement
[Xiaomi Mi 9 Questions & Answers] Junyiguo:
Hi, AndroPlus, I have Repair/resize system partition in TWRP. But It still not enough space for opengapps.

How should I do?
[Xiaomi Mi 9 Questions & Answers] doggydog2:
doesn't work for me unless you format data each time: https://xdaforums.com/showpost.php?p=79428473&postcount=3

you have to hack installer.sh for each opengapps release by handling E_ARCH (error 64) and E_NOSPACE (error 70) errors or install MindTheGapps after resizing partition. i just want to move to opengapps to aquire the facelock but it's impossible - Play market not available. what a pain with this brand.
[Xiaomi Mi 9 Questions & Answers] AndroPlus:
I'll look into battery LED issue. Pickup and tilt worsk fine on my device...

Can you link what app shows black bar?

Did you mount system after resizing?
[Xiaomi Mi 9 Questions & Answers] Junyiguo:
It works!!!!!!!!!!

Thanks you very much, AndroPlus.
[Xiaomi Mi 9 Questions & Answers] FaserF:
Updating a GSI Rom works just with flashing the newer system.img over the old via fastboot without loosing data?

[MENTION=5169444]AndroPlus[/MENTION] The rom boots fine for me but I cant install opengapps.

I have used the newest twrp 3.3.0 from here:

There the gapps installer is sucessfull after increasing the system partition, but after booting your rom there are no gapps visable?

Also GPS seems not to work for me?

EDIT: Mindthegapps work, but as [MENTION=526216]doggydog2[/MENTION] says, there is no faceunlock which I would really like to have :(
[Xiaomi Mi 9 Questions & Answers] Philomene:
@ Andro Plus

Hi Andro

Thank you for your Floko Rom. The best

In Floko the notification bar icons do not appear completely (rounded corners) and are partially hidden I tried this in adb and local terminal but that does not change :

"adb shell settings put secure sysui_rounded_content_padding 8" i change the number too but no effect

Any idea?
[Xiaomi Mi 9 Questions & Answers] FaserF:
I did that. For some reason the latest official release from phh boots fine, the latest Mi9 test image wont boot for me.

And somehow my GPS now doesnt work on any GSI rom, is this a known issue?
[Xiaomi Mi 9 Questions & Answers] Wahidwahl:
V112 works for me for the last two weeks. If you mean the test image of 9th of 8th of april, you're right. That one didn't boot for me also.

GPS works fine, i tried navigation a couple of times.
[Xiaomi Mi 9 Questions & Answers] FaserF:
I installed Foloko in the way mentioned below but I am really unable to get GPS to work (on Stock MIUI it worked well). Anybody who can help me? The GSI is perfect but with no GPS it is kinda unusable for me.

I got the Foloko Rom booting with Gapps and Faceunlock with this Recovery and OpenGapps package:

https://xdaforums.com/Mi-9/development/twrp-3-3-0-arm64-gapps-support-t3925728

For anyone who is interested in using a GSI on their phone, this one worked for me:

1. Flash latest global stable via XiaoMiFlash.exe

2. Boot the MIUI rom

3. Boot into fastboot and flash the above mentioned TWRP

4. Boot twrp and do a factory reset and wipe internal storage (to remove the encrypted folders)

5. Start Fastboot mode and flash vbmeta.img mentioned here: https://github.com/phhusson/treble_experimentations/wiki/Xiaomi-Mi-9

6. Flash the GSI you want (in my example the Foloko GSI)

7. Boot TWRP and do another factory reset

8. Flash the gapps mentioned above and Magisk 19.0
[Xiaomi Mi 9 Questions & Answers] Philomene:
Stange. GPS work well on Foloko GSi. i tested this morning in my car. I uses chines recovery : https://xdaforums.com/Mi-9/development/recovery-unofficial-twrp-recovery-3-3-0-t3925800

i do not flash vbmeta just Foloko after global development with XiaomiFlash then open gapps nano with resize system in TWRP, then Magisk and patch Mi 9 v5. only problem I can not have face Unlock in Smartlock.