Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Fixed some SELinux related bugs for Magisk v26.0's new magic mount feature.
  • Loading branch information
yzyhk904 authored Apr 11, 2023
1 parent f08933f commit 03eb496
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,4 @@ hexdumped "std_sample_rates[]={768000, 705600, 384000, 352800, 192000, 176400, 9

* I am not responsible for any damage that may occur to your device, so it is your own choice to attempt this module.

## Change logs

# v1.0
* Initial Release

# v1.1
* Recent higher sample rates added

# v1.2
* arm (32bit) bug fixed ("/vendor/lib64/libalsautils.so" phantom overlay makes stutters on arm devices)

# v1.3
* Added new properties related to an audio scheduling

# v1.4
* Added a workaround for Android 12 SELinux bug w.r.t. "ro.audio.usb.period_us" property

##
21 changes: 21 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Change logs

# v1.0
* Initial Release

# v1.1
* Recent higher sample rates added

# v1.2
* arm (32bit) bug fixed ("/vendor/lib64/libalsautils.so" phantom overlay makes stutters on arm devices)

# v1.3
* Added new properties related to an audio scheduling

# v1.4
* Added a workaround for Android 12 SELinux bug w.r.t. "ro.audio.usb.period_us" property

# v1.5
* Fixed some SELinux related bugs for Magisk v26.0's new magic mount feature

##
6 changes: 4 additions & 2 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ for d in "/system/vendor/lib" "/system/vendor/lib64"; do
mkdir -p "${MODPATH}${d}"
touch "${MODPATH}${d}/${lname}"
chmod 644 "${MODPATH}${d}/${lname}"
chcon u:object_r:vendor_file:s0 "${MODPATH}${d}/${lname}"
chown root:root "${MODPATH}${d}/${lname}"
chmod -R a+rX "${MODPATH}${d}"
if [ -z "${REPLACE}" ]; then
REPLACE="${d}/${lname}"
Expand All @@ -29,8 +31,8 @@ function replaceSystemProps_Kona()
{
if [ "`getprop ro.vendor.build.version.release_or_codename`" -ge "12" ]; then
sed -i \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2500/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2500/' \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=3500/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=3500/' \
"$MODPATH/system.prop"
else
sed -i \
Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=usb-samplerate-unlocker
name=USB Samplerate Unlocker
version=v1.4.1
versionCode=1401
version=v1.5.0
versionCode=1500
author=zyhk
description=USB (HAL) audio class drivers have a limiter of sample rates at 96kHz. This mod unlocks the limiter.

0 comments on commit 03eb496

Please sign in to comment.