Comments (26)
Thanks @phhusson, I managed to get the earpiece working in call, and Bluetooth audio working π
Here are the files if someone else wants to do it (It's a quick and dirty fix, please apologise me...)
audio_policy_configuration.xml
primary_audio_policy_configuration.xml
a2dp_audio_policy_configuration.xml
In order to modify theses files, you'll need to have root and remount /vendor as read/write.
This is done with the following command :
# mount -o remount,rw /dev/block/platform/soc/1da4000.ufshc/by-name/vendor
(your device path might be different, check /proc/mounts to know yours.
And then modify the files with a cat <<EOF > file_name
. Be sure to make backups before overwriting anything π
Best regards,
from treble_experimentations.
system/build.prop and vendor/build.prop are expected to be totally different
Ok, I'd forgotten what was the actual issue
So the issue is that stock ROM uses audio_policy.conf, which is deprecated as of Treble, it should be audio_policy_configuration.xml
HTC U11+'s vendor does contain one audio_policy_configuration.xml, but that's a dummy one.
So what needs to be done is to rewrite audio_policy.conf into a xml
from treble_experimentations.
from treble_experimentations.
earphone also doesnt work
from treble_experimentations.
Can you link me to a file dump of your system and vendor?
from treble_experimentations.
@phhusson do you mean the link to stock system and vendor files?
from treble_experimentations.
yes
from treble_experimentations.
I will upload file boot, system, vendor partition of stock rom.
Vendor HTC U11+ 1.24.400.2
https://drive.google.com/open?id=1oVjQvMKxKhc46_FZ-Ljn89oJ3vPsbARj
RUU 1.24.400.2
https://androidfilehost.com/?fid=745849072291700125
system.img (1.24.400.3) .
https://drive.google.com/open?id=1gX75ZTPx5g_Esov9wyKhh4Rc9V24XG5G
Vendor 1.24.400.3
https://drive.google.com/open?id=1e_aCJAiE7Zq7jnu0sKK8TY3HtUE2jdG1
Boot 1.24.400.3
https://drive.google.com/open?id=1QDrWTdYNhR07X2IRzKRNL59BIx_y3Zjh
Tool for extract RUU htc
https://forum.xda-developers.com/chef-central/android/tool-universal-htc-ruu-rom-decryption-t3382928
cmd:RUU_Decrypt_Tool.exe name ruu.zip
Hope this help you to solve the in-call audio probblem.
Many thanks, PHH
from treble_experimentations.
I found this in the U11+ source file where the kernel config mentioned the audio amplifier hardware below :
#HTC_AUD_START
CONFIG_SND_SOC_TAS2557_STEREO=y
CONFIG_HTC_AUD_OCM=y
CONFIG_HTC_DEBUG_DSP=n
#HTC_AUD_END
I am please to attached the config file for your reference. Hope with this information you can help to solve the in-cal audio only direct to speaker instead to earphone.
htc_ocm_defconfig.zip
from treble_experimentations.
@phhusson I noticed that /system/build.prop differs a lot from /vendor/build.prop. Isn't that related ?
Sorry if this is unrelated, it has been a lot if time since I've touched at Android's core, and I don't really know how Treble works π
But it would be really nice if it helps to fix this issue, because other things, like data connection, are really working better in your AOSP rom than in stock.
Best regards.
from treble_experimentations.
Ok cool, need some help with that ?
from treble_experimentations.
In theory, you could just have all the files in audio_policy_configuration.xml. But as it already imports configuration from primary_audio_policy_configuration.xml, I thought that it was cleaner to put a2dp related configuration in a separated file (which does not exists...)
So the change in the global file was just to add the import line for a2dp configuration.
I'll try to work on DSD tonight, will keep you updated about that π
from treble_experimentations.
thanks drksnw for your effort.
I have some audio config files grab from google Pixel 2 rom. I assumed that the audio setup in Pixel 2 similar to U11+. Hoping that those files can help.
Audio XML.zip
from treble_experimentations.
@phhusson
If you don't mind me asking how would you integrate. I want to tried build AOSP with different configuration files.
Those Audio configuration files attached was pulled from android latest factory image for Pixel 2.
from treble_experimentations.
Some news ?
from treble_experimentations.
Hi @phhusson,
is there any news on how to resolve this bug? Issue is still present in latest v25
from treble_experimentations.
@drksnw I guess it's really time I include your patch. Did you do some updates?
Do I include those files as is?
Does it work on Pie as well?
from treble_experimentations.
@phhusson Once the files have been pushed into the /vendor, the bug will be resolved. I'm not sure whether it will work on Pie, as I am unable to boot into Pie at all. Sry, I'm not currently able to test the rom at the moment.
from treble_experimentations.
Ok i'll consider this one to be a vendor bug, and I won't fix it.
For users passing by, please refer to this message to fix this issue
from treble_experimentations.
@drksnw
Thanks a lot for your scripts!!!! I wont have to bring another phone with me to listen to songs.
For the method, I tried yours but the "vendor" is neither a folder or an editable file, it has no extension so none of my apps can edit it.
I solved by copying those three files to /system/etc and reboot the phone, then everything is OK.
π
from treble_experimentations.
@drksnw I am having a similar issue I can make calls and video calls on Bluetooth, but music and videos play only thru speakers on HTC U12+, I would like try your fix, but not sure it will work, what would be your recommendation?
from treble_experimentations.
Hi @jeanrivera, I don't really know the differences between the U11 and the U12, but as the modifications doesn't rely on specific hardware, I think it might work as is. Just make sure to backup your actual configuration before π
from treble_experimentations.
@drksnw thanks for the reply, if I understand correctly I just need to replace those 3 files in my vendor partition inside the etc folder correct? also one last question, do I need to clean boot after replacing those files? or can I just replace and reboot on an already setup android?
from treble_experimentations.
@jeanrivera you should have these files (or at least audio_policy_configuration.xml) directly in the /vendor folder if I recall it correctly. The configuration should be applied after a reboot
from treble_experimentations.
@drksnw what about the other 2 files? do we copy them to /vendor or /vendor/etc/ ?
from treble_experimentations.
@drksnw Hi! I'm still using my U11+ and I noticed some issues after I patched your files. Camera apps won't record sound when taking videos and the usb earphones are not working. Are they possible to fix? If so, I'm really happy to help out :)
from treble_experimentations.
Related Issues (20)
- Galaxy A04 - Mobile internet bug HOT 4
- Can anybody pleas build pixel experience with android 14 ??
- battery drain and hot when charging HOT 1
- MTK No Internet HOT 5
- Error in repo sync step HOT 1
- What is the lisense for this? HOT 1
- Status bar inconsistency on Redmi 9
- Mblu hifi dac playback artifacts (crackles and sound fades) HOT 1
- Galaxy S21 FE Exynos not recieveing SMS HOT 2
- <title> HOT 1
- Touchscreen respone issues on Oneplus Open
- Samsung Galaxy A51: Some Android 14 GSI are not working
- Teclast M30 :TLA002
- Invalid partition metadata header table size.
- Pixel 4XL flashed Android 15, stuck on Google icon interface, unable to enter the system HOT 1
- [OPPO A12] Fingerprint scanner not working
- Cat S22 Flip GSI android 14 not getting incoming calls
- Magisk installation issue
- Screen flickering on Xiaomi Redmi Note 12 Pro 5G (ruby)
- cant access adb root
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from treble_experimentations.