Xiaomi EU Source code? Need help with a Bluetooth predicament


darkjake

Members
28 Mar 2019
2
3
Hey is there a source code for Xiaomi EU? I am having an issue with bluetooth and a switch pro controller were there is massive delay with inputs and i want to recompile the BTA_HH_api.h and change the latency with define BTA_HH_SSR_MAX_LATENCY_DEF 800 /*500 to define BTA_HH_SSR_MAX_LATENCY_DEF 0 or 24. Have tried hex editing the Libbluetooth.so file manually but it hasn't had any effect hence why i am wanting to attempt the recompile. Any ideas were i can find the source code/change the value without the source code?


Edit: Device in question is a mi 8
Edit 2: Controller in question is a wireless switch pro controller made by powerA
 
Last edited:
Hey is there a source code for Xiaomi EU? I am having an issue with bluetooth and a switch pro controller were there is massive delay with inputs and i want to recompile the BTA_HH_api.h and change the latency with define BTA_HH_SSR_MAX_LATENCY_DEF 800 /*500 to define BTA_HH_SSR_MAX_LATENCY_DEF 0 or 24. Have tried hex editing the Libbluetooth.so file manually but it hasn't had any effect hence why i am wanting to attempt the recompile. Any ideas were i can find the source code/change the value without the source code?


Edit: Device in question is a mi 8
Edit 2: Controller in question is a wireless switch pro controller made by powerA
There are no source codes for MIUI ROMs. There are some kernel sources from Xiaomi here, but I doubt that would help your cause: https://github.com/MiCode/Xiaomi_Kernel_OpenSource
 
There are no source codes for MIUI ROMs. There are some kernel sources from Xiaomi here, but I doubt that would help your cause: https://github.com/MiCode/Xiaomi_Kernel_OpenSource

Hey thanks for the reply to start off!
Hmm bugger I don't think the kernel handles much of the fun Bluetooth material I'm trying to figure out. Because of my brilliant and definitely unflawed and never wrong math skills (he lied) I have tried a hex edit on the libbluetooth.so file and found the value to be I think 72 09 64 80 52 and because android being android 0x320 is 800 ms of lag (and because of unknown reason this is doubled hence 64) and I changed the 64 to 03 to reduce the bounce back of the latency to 24 ms however this hasn't made a difference, being a dev yourself do you know at all if the value of BTA_HH_SSR_MAX_LATENCY_DEF is stored anywhere else on a miui ROM?
And you wouldn't happen to know if my math is actually correct while changed the libbluetooth file in lib64 would you?
 
Hey thanks for the reply to start off!
Hmm bugger I don't think the kernel handles much of the fun Bluetooth material I'm trying to figure out. Because of my brilliant and definitely unflawed and never wrong math skills (he lied) I have tried a hex edit on the libbluetooth.so file and found the value to be I think 72 09 64 80 52 and because android being android 0x320 is 800 ms of lag (and because of unknown reason this is doubled hence 64) and I changed the 64 to 03 to reduce the bounce back of the latency to 24 ms however this hasn't made a difference, being a dev yourself do you know at all if the value of BTA_HH_SSR_MAX_LATENCY_DEF is stored anywhere else on a miui ROM?
And you wouldn't happen to know if my math is actually correct while changed the libbluetooth file in lib64 would you?
We don't fiddle with the binaries, usually, so don't really know what to tell you.