[MOD][FIX] Audio Bitrate Increase For Poco X3 NFC

Jt380p

Senior Member
Apr 1, 2018
822
379
0
New South Wales
Disclaimer :
Code:
I am not responsible for any damage to your device!
Use this mod at your own risk!
What's this?
This mod increases the audio bitrate on video recording from a disgraceful 96kbps to a respectable 320kbps. Thus, giving a richer, more pleasing audio quality.
Still confused? Click here for a better explanation :)

Requirements :
- A rooted phone with magisk installed
- An opened mind (important!)

Contributors :
@Jt380p
@Slim K

* NOTES * (READ) :
- Not all ROMs are compatible with this mod, you might end up in a bootloop. YOU HAVE BEEN WARNED!

Download :
https://drive.google.com/file/d/1wr-p7puOL8nYb1wj1AyVbh9XmMp5kRKI/view?usp=sharing (Flash with magisk manager)

Source :
https://forum.xda-developers.com/Mi-9/themes/magisk-audio-bitrate-increase-t3927810
Audio files provided by @Slim K

Thanks to :
@Slim K
@topjohnwu for Magisk

Created : 7/11/2020
Last updated : 7/11/2020
 
  • Like
Reactions: joop1ter

Slim K

Senior Member
May 16, 2015
95
13
28
So which ROMs are not compatible?
This mod uses magisk module template to replace a file in vendor folder. A tip for beginners using such a mod is to inspect it to know what it does. For example in the root of the module zip you will find the folder system, which has the needed folders/files path for replacement. If you open install.sh in text viewer, you would read the line :
Bash:
set_perm $MODPATH/system/vendor/etc/media_profiles_vendor.xml 0 0 0644
That should tell you which file it is and their permissions. Now open the same path on your ROM and look for that file, if it exists, then it should work. Although not every camera app (e.g gcam) uses that file.
 
  • Like
Reactions: pnin and Aki-to

Aki-to

Member
Dec 3, 2020
29
11
13
This mod uses magisk module template to replace a file in vendor folder. A tip for beginners using such a mod is to inspect it to know what it does. For example in the root of the module zip you will find the folder system, which has the needed folders/files path for replacement. If you open install.sh in text viewer, you would read the line :
Bash:
set_perm $MODPATH/system/vendor/etc/media_profiles_vendor.xml 0 0 0644
That should tell you which file it is and their permissions. Now open the same path on your ROM and look for that file, if it exists, then it should work. Although not every camera app (e.g gcam) uses that file.
Thanks, this was very helpful.

Indeed, it seems like a very easy set of scripts, did not expect that. However, the only thing I could not find is where the default functions are actually called, though I assume these are generic functions that are always called by Magisk, no matter which module is being installed.

This mod is also so extremely tiny, you could pretty much make these changes manually. Just take care of permissions and replace the file, that's it. It's even less complicated than working with /etc/fstab, it seems.

Perhaps I should release a couple of mods myself, if mod devs are getting such a Magisk Module template thing, anyway, which pretty much does all the work, already.
 
  • Like
Reactions: Slim K

Slim K

Senior Member
May 16, 2015
95
13
28
Thanks, this was very helpful.
Indeed, it seems like a very easy set of scripts, did not expect that. However, the only thing I could not find is where the default functions are actually called, though I assume these are generic functions that are always called by Magisk, no matter which module is being installed.
You assume correctly. The path to the functions can be usually found in /data/adb/magisk/util_functions.sh on your device.
Perhaps I should release a couple of mods myself, if mod devs are getting such a Magisk Module template thing, anyway, which pretty much does all the work, already.
Why write code twice when it already exists and works for everyone. ;)
 
Last edited:
  • Like
Reactions: Aki-to