yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi Max 3 Guides, News, & Discussion] MrColdbird:
Those are among the files that need copying over... But also their depending .so files.

In addition to that the init scripts need to be slightly modified to ensure the services are getting started as well (and probably a few other small things).

As I said. I didn't have the time to look into this further yet. This is my only phone and at the end of the day I always have to return to MIUI to ensure it works fine for the next day of work.

EDIT: Decided to collect all vendor patches we've gathered so far, as well as treblizing patch #1 so that the manual adb approach is no longer required.

To prepare your Max 3 for GSI usage, coming from any cleanly installed MIUI ROM (Xiaomi.eu in my case), follow the following steps:

Extract the attached zip and copy the vendor folder contents into your /vendor partition (root & remount,rw or compatible recovery required!)

Execute the command inside the install-overlay.sh script to give the framework overlay APK it's proper access permission flags

After doing said changes you should have working bluetooth, flicker-free as well as automatic brightness controls.

Still missing / on the to-fix list are:

VoLTE support (missing IMS services in /vendor)

MTP file transfer (only on Pie? seems to work in AICP Oreo?)
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
Oh thank you so much for making a consolidated archive :D

This shortens the config time by several minutes!

I'm trying out Havoc and had to drain the battery a little bit with a cpu stress test to see if Quick charging would work and it does switch to it after a little while.

It will not do so if its on 99%..probably because it does not need it this high up.

Good result to start with!

Edit 2:

Forgot permissions so the phone didn't start... every file must of course have permission 644 :)

Yay! Brightness is working fine.

MTP starts working after installing the patch file

https://xdaforums.com/showpost.php?p=77616311&postcount=77

I'm not sure the audio fix works very good on havoc.

The sound migh be lower but the gain is super amplified like you cranked the gain up above -0db so it sound distorted and crackling

Edit 3:

Sound is fine on AICP mordiford..perhaps the mod don't work as planned on pie?

Edit 4:

Audio does not seem to work with headphones when connecting to the 3.5mm

The rom works and audio works with the 3.5mm jack.

This does not work on havoc.

But bluetooth audio does work but the audio is highly distorted and a loud bang is heard when pausing the music when the media server shuts down.

Another good news is that quick charge works in the latest Benzo build.

Also notification sounds even without the sound modification at the op post has distorted sound.

I am now back on revolution os by restoring system from nandroid backup..I'm out of time for today to play with my phone
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
One little question:

Why is do not disturb automatically started when I switch of vibration.

This is totally weird.

So I have to choose between vibration (for work stupid) or do not disturb but then no led light and not screen on when notifications come in

Did I something missed in Havoc?

---------- Post added at 03:18 PM ---------- Previous post was at 03:14 PM ----------

Found a solution but it's very complicated. Have to switch all apps I want to see in settings > notifications > single app>overwrite do not disturb and led in do not disturb
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
How can I replicate the sound super amplification that you are experiencing in Havoc?

I am using v3 audio policy and I am not noticing distortion or cracklings on ringtones, alarm, media playback (connected in bt or not), and phone calls (connected to bt or not).
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
Not manifesting to me. How can I replicate that concern?
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Sorry. I don't understand.

Did you have the same problem or you don't find the setting for overwrite the dnd-mode?
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
I don't experience the same problem you are experiencing as you've stated here "Why is do not disturb automatically started when I switch of vibration. "
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Ok thx now I understand. (sorry for my bad english)

Step by step: (for Havoc Rom)

I use the quick tile in status bar for switch the profile.

There I have "Ring" "vibrate" and the third Selection is "dnd"

So I have to choose between vibrate or dnd. There is no "mute" or Similar to choose.

But with "dnd" the follow feature not working:

- led by notification

- display on by notification

- symbol in status bar

What I want is:

No vibration but Led and display on when notifications is incoming.

So my solution was to go into settings>apps/notifications>for example whatsapp>notification>group or single notification > overwrite dnd and led show in dnd mode.

But I have to do this for all apps that I want to show when vibrate is off. And that I find very complicated.

Additionally the problem that sometimes whatsapp or threema not always shows new message by push. Have to go in the app and then it show me the new messages. Switch off battery optimation for this two apps not really work. Cannot replicate when it shows push and when not. It is very Randomly..
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
Now I understand. I don't use that feature. Either I am on DND or not. No vibrate for me. Btw, have you tried configuring DND (New feature I suppose because I haven't seen this in any Oreo I flashed before) by going to Settings > Sound > Do Not Disturb > Notifications > Custom? It has options on how do you want DND to behave.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
With the v3 audio XML in first post all works. Especially the 3.5mm jack. Tested it on havoc.

Alarm is also now fix with this that you cannot lower the alarm tone. Early today I was woke up with a low volume alarm. Not as yesterday when I woke up the whole house :)

BTW have written a German tutorial in other forum. Thanks for all help here from all. So now German friends can also install the gsi file. Have also linked this thread.
[Xiaomi Mi Max 3 Guides, News, & Discussion] opasha:
[MENTION=5536965]Andyxmas[/MENTION], use Silent Mode Widget. It does exactly what you want between ringer, vibrate and silent. I have used it for years and works great currently on my Mi Max 3.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Okay Thanks. Will test it.
[Xiaomi Mi Max 3 Guides, News, & Discussion] opasha:
You're very welcome :highfive:
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Test it. Don't work :(

When I switch off max3 still vibrate. Also when toggle the widget to off the vibrate symbol stay in status bar.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
You see
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
With the help from the widget I found a new bug.

Ringer shortcut:

Ring

Vibrate

Dnd

When under vibrate I tap on the dnd shortcut vibrate still is active.

Thats why I think the widget don't work proper
[Xiaomi Mi Max 3 Guides, News, & Discussion] opasha:
Hmm, maybe silent and vibrate are connected. I turned it off and on in settings here, but they both become vibrate or silent if toggled. I just leave it toggled on vibrate in settings, but when the widget is silenced, no vibration occurs. So, it works, but in an odd way.

Silent could very well just default to dnd every time. Not sure why.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Are you on Android 8 or 9?

Because my settings looks very different.

Switch for sharing to English system language

First Screenshot my audio settings

Second vibrate toggle on without dnd toggle

Third I press the toggle for dnd and vibrate is still there

But when I press the toogle from vibrate to "mute" the dnd toggle automatically toggle in addition.
[Xiaomi Mi Max 3 Guides, News, & Discussion] opasha:
May be a treble rom thing. I'm on 8.8.9 xiaomi.eu miui beta weekly still. Just want a few more things ironed out before hopping back to gsi.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
I search in Google. It's an android 9 thing. In miui with 8.1 it's how you show it. But I think when 9 comes with miui this year the dnd mode will be the same behavior.

Have a solution I can live with. Led now working when in dnd mode. That's okay. So I see when a message is there.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
After a complete full load the battery the stats are there.

Go in akku settings then on graph above. After that use 3 dot menu for display hardware.

After first install my stats stand still. But after a new full battery load the stats are stable there.
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
Hi [MENTION=5536965]Andyxmas[/MENTION], I have few questions...

1. Are you using Pie or Oreo when you noticed that the graph is working?

2. What was your previous MIUI rom prior going to GSI? i.e. Xiaomi eu 8.8.9, Miui china dev 9.20, etc...

3. Did you make any change in your verndor other than those that are in this thread?

4. What are the Magisk modules that you have installed recently prior to noticing that Batt stats is already working?

5. What type of Gapps are you using?

I hope to hear from you soon as that doesn't display on mine even after full battery load.
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
Hi [MENTION=5084869]SUPERUSER[/MENTION]

you have posted such a lengthy but comprehensive enough observation. Thank you for this.

However, I am on Havoc with 10.0.3.0 non-arb firmware (previously from Xiaomi EU 8.8.9 ROM), and am not noticing the problem you mentioned.

1. Whenever I play media (using VLC) on phone speaker and then inserted an earphone (3.5mm), the music shifts to earphone.

2. I am not experiencing the cracking sounds while trying to adjust tones.
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
Revised the OP to make it clearer for first time viewers.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
1. Use havoc 2.0 from 21.10. As Android Pie version but not the VOlte version.

2. I had to reset my phone complete with Miflashtool because it didn't boot after first try. So I was on 8.10.18 China original dev and install then xiaomi.eu 8.10.18. And then the gsi.

3. I only use the tricks in the first post for repair flickering screen, automatic brightness and the audio thing.

4. Magisk module only the camera 2 Api enabler for the gcam

5. At first I install Pico but voice unlock with Google Assistent was grayed out. So I install Nano Gapps. To use Google Assistant for unlock.
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
Thanks for your reply. I changed my Gapps to nano as well, since nano has Device Health Service (BatteryUsage) included in it. Hope this will fix the empty battery stats.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Yesterday evening the device health service get an update also but it works before the update.
[Xiaomi Mi Max 3 Guides, News, & Discussion] nijel8:
Device Health Service(completely useless IMO) is part of Google Play services for Pixel devices and has nothing to do with Android battery stats...
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
I took out my spare phone and gave it another try.

I included a sound sample for how it sounds

This is selecting sound in alarm app

https://instaud.io/2QtY

Backup in attachments
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
That's sounds eerie. :D

Anyways, may you please try the latest compiled xmls in the OP, if that for some reason address this concern?

I don't experience this in my current setup.
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
It sounds like one of those old Pokemon games when entering the Ghost town

I already tried applying the sound fix before and it didn't help.

Anyway I think I fixed it.

I downloaded the latest Xiaomi eu and flashed it.

Then I rebooted to recovery again and flashed benzo rom on top of this and the sound is now normal.

I believe ROS-MIUI-8.10.25_MIMAX3-8.1.0_v10.zip was the cause if this issue
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
I see. how about battery stats, is yours fixed just like andyxmas'?
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
I have nothing flashed other than the system.img and in the settings app it says "Battery usage isn't available."

Does it mean it don't work? Uptime is only a few minutes so maybe there is not enough data yet
[Xiaomi Mi Max 3 Guides, News, & Discussion] srg84:
Fix for BT Incall problem:

When you change to another android user, bluetooth disables and can't be reactivated, if you have more than one user.

"Qualcomm audio has stopped working" error appears sometimes.

Rebooting phone and works again.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
And why is this in the description to the device health service?

"Personalized battery estimates based on your actual usage"

Without this you have no access. That's why Pico gapps not show the battery status
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
Now I get a bootloop on AICP mordiford as soon as I reboot after executing

chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/framework-res__auto_generated_rro.apk

With the respond

nitrogen:/ $ su
_file:s0 /vendor/overlay/framework-res__auto_generated_rro.apk <
chcon: '/vendor/overlay' to u:object_r:vendor_overlay_file:s0: Read-only file sy
stem
chcon: '/vendor/overlay/framework-res__auto_generated_rro.apk' to u:object_r:ven
dor_overlay_file:s0: Read-only file system

I don't remember if it should say "Read-only file system" or not.

I've been at thing too long.

I think I had it working earlier today.

I set the framework-res__auto_generated_rro.apk permission to 644 and another try I ignored it.

Another try I set permission to 777 and still a bootloop.

Removing the file from file manager in twrp sets the phone too boot again.

I played around with Pie roms but discovered that they don't play nice with small dpi.

The smallest dpi possible to set is "smallest width is 531 which is around 324dpi".

Any lower than that creates a black bar over the navigation bar when opening apps that hides the buttons.

A tap on an empty area in the app brings the navigation bar back in shape but its annoying to do all the time.

Edit:

I give up I flashed havoc vanilla and opengapps pico and the brightness mod works fine.

Phone boots after executing the command.

I'll just have to live with a slightly higher dpi, circa 324 instead of 300

Navigationbar seems a bit taller in Pie than Oreo which is annoying
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
Per my experience with AICP-M I didn't even execute any command. I just placed the overlay file to its supposed location then give it the right permission and rebooted the phone then it works. Btw, i also didnt execute that command in Havoc.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
[MENTION=5084869]SUPERUSER[/MENTION]

Thanks for this Tipp. Now I can use my swift keyboard with the German letters äöü without having the whole display for the keyboard. And the websites in Opera are not so unclear to read.

---------- Post added at 06:49 AM ---------- Previous post was at 06:40 AM ----------

I installed yesterday the nfs injector module for magisk.. Now the laggs that I have by scrolling from websites are away. Also the small lags in the UI and the lags by typing texts in any messenger apps are away.

Today I test how the battery is getting with this module.

But the performance is definitely better.

https://xdaforums.com/apps/magisk/module-nfs-injectorv1-t3857231
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
I tried it again this morning and it goes strait to a bootloop after moving the file into /vendor/overlay and rebooting.

I set the file permission to 644. I also downloaded the file again in case it was corrupted.

I have no idea what to do now.

I cleaned flashed the rom and moved the file to the location in twrp and set permission to 644 and still it bootloops
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Got a strange bug now. When I tapped the fingerprint sensor in a messenger app it behave like press the enter on the keyboard.

Next bad thing is that all apps that login with fingerprint said too often input. But I don't put finger on the sensor.

Delete the fingerprint in security settings is not the solution.

Dalvik and cache also delete. Nfs Modul in magisk disable for test.

Edith

The app logins now are working after delete the data from the app which want to login with fingerprint and delete all fingerprints in security settings.

Then reboot and reconfigure the apps.

But the enter-key behavior is still there
[Xiaomi Mi Max 3 Guides, News, & Discussion] PianoMonkey:
Testing out Havoc2

Double tap to wake doesn't exist, nor does face unlock

Also when using fingerprint on any page that isn't the lock screen will select whatever's on the screen (an icon, a file, etc...)
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Face unlock is under settings > security > smart unlock. Face recognition. When you installed Nano Gapps. Not the pico

The fingerprint bug have also but only in textboxes
[Xiaomi Mi Max 3 Guides, News, & Discussion] srg84:
Can't mute calls with Vendor_xml file also volume in calls is too high...
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
6h Display on time an 60% battery left. Respect the Nfs module do what it said.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
https://sourceforge.net/projects/ha...1027-GSI-ARM64-Aonly-Official.img.xz/download

Update for havoc 2.0

Hm. When I only flash the img the system without wiping? Will it start and did I have to install and write all anti-bugs from first thread new?
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
Can't get viper4android working on Pie

Tried all module in magisk, tried this oreo guide https://droidfeats.com/install-official-viper4android-oreo/

But its not working..

Some suggest its due to missing files

https://xdaforums.com/project-trebl...sion/discussion-viper4android-treble-t3796495

And headphone jack don't work on pixel experience oreo.

Is AICP mordford the only oreo rom with fully working headphone jack?

Ehm weird I seem to gotten brightness to work without the overlay apk in aicp mordford.

I changed the value in default.prop and rebooted
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
I just noticed this big now. :( Let me know if you found a fix
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
I'm thinking... Maybe you are using a more updated version of mordiford than I was hence the overlay issue? Maybe the latest version comes with an auto brightness overlay already?
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
Pleaee update us [MENTION=5536965]Andyxmas[/MENTION] if you can update it directly. That's what I would do but don't have time now.
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
What ROM were you using when you encountered this?
[Xiaomi Mi Max 3 Guides, News, & Discussion] jngiag:
The latest few updates of Eu rom seem to have caused the problem of installing Viper4Android (magisk) on Pie. This is how I get it work on Havoc 2.0 (2018-10-21). Delete folder (or rename) /vendor/lib/soundfx & /vendor/lib64/soundfx. I rename it to soundfx.old just in case I need it back. I do not know what's the use of soundfx.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
With nfs injector module.

Think this is worth to install.

BTW overnight from 23:00-07:00 only 1% Akku drop with this.
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Not Today. Will wait a few days because no time when it failed to set up my max3 new. In the havoc thread there is one person who install dirty and he said it goes without problems.

Only install new update.

After that gapps

Magisk

And reboot.

But I don't want to test this because of what I written above
[Xiaomi Mi Max 3 Guides, News, & Discussion] srg84:
LineageOS 15.1
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
So after 27h battery with 11h Sot now the max 3 have to load. Still 15% left. Without energy-safe mode.

Think 12-13h sot is possible.. Very very good.
[Xiaomi Mi Max 3 Guides, News, & Discussion] pakudaboy:
looking forward to jump on treble roms, will wait a bit more for it to be stable first :)
[Xiaomi Mi Max 3 Guides, News, & Discussion] Andyxmas:
Forgot Compare without nfs injector there was only 6-7h sot.

This test was with the module
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
The reason why I didn't include the usb xml file already in the vendor xml zip is that the usb xml file that came with our vendor is the same as in the original audio xml.

Anyways, I am no longer using aicp-m so can't really validate anything now. Ill just link in the OP (when Im already using a computer), your post above, for other people's reference. Thanks for sharing your experiences.
[Xiaomi Mi Max 3 Guides, News, & Discussion] srg84:
Tested Audio Fix and Works, Speaker works, volume works, (although cant mute calls), the sound is better now. ROM tested LineageOS 15.1

BUG: Changing to another android user breaks Bluetooth.
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
Ah okay I did not check the hash between the two files.

I'm not really happy to test a clean flash now that I have it working, I'll keep this file open for further investigation

Do you mean pressing the mute button in the in-call ui while a call is connected?

This works for me at least, the microphone gets muted so the other receiver don't hear anything from me.

Did you test to replace the usb_audio_policy_configuration.xml?

If replacing this file it could confirm if it does make a difference or not to replace it.
[Xiaomi Mi Max 3 Guides, News, & Discussion] srg84:
I mean lowering volume with the down button it goes down until last step. Mute microphone works well.

I think the other files are different too so i overwrite all the files.
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
And btw, my v3 audio config policy xml file that is included in the vendor xml zip no longer calls for usb xml.
[Xiaomi Mi Max 3 Guides, News, & Discussion] jaflendrino:
i tested yesterday bluetooth calls with fix page 1, and dont works.
[Xiaomi Mi Max 3 Guides, News, & Discussion] SUPERUSER:
I noticed the same issue on Oreo now when configuring my phone.

I renamed the two folders as you suggested and uninstalled the module and reinstalled it.

After a reboot the prompt to install the driver was gone :D, thank you so much!
[Xiaomi Mi Max 3 Guides, News, & Discussion] famaTV:
My apologies if I am missing anything in here. What config file are you referring to? I copied all the 7 files in the attached zip file (first thread) to /vendor/etc. Should there be any file (or those files) in /vendor/etc/audio?

I am still having a mono speaker (the right one is working only). My version is 8.1 by the way.

I truly appreciate your help in here.
[Xiaomi Mi Max 3 Guides, News, & Discussion] xgneilx:
I believe there is only one speaker at the bottom, and that is the right. The secondary speaker is the one near your front camera. It is not as loud as the bottom speaker though. Please research on it so we can confirm. But based on YouTube, only 1 bottom and 1 near front camera.
[Xiaomi Mi Max 3 Guides, News, & Discussion] PianoMonkey:
Using AICP-M Oreo, auto-brightness is really slow (each tick of brightness is delayed by 1s), is there any fix for this?

Bluetooth audio and brightness fix work fine

Xposed works for me using systemless from Magisk (haven't tried non-systemless)

Youtube Vanced works for me using root version (not from Magisk), though on some ROMs I need to install Youtube and run it before uninstalling and then installing Vanced
[Xiaomi Mi Max 3 Guides, News, & Discussion] Roykooiman:
Maybe OP could update the first post with the newest fixes/solutions?