Repository: reiryuki/Sound-Enhancement-Sony-Xperia-10-Magisk-Module
Branch: main
Commit: 7a74c71037df
Files: 55
Total size: 163.9 KB
Directory structure:
gitextract_4il4hl4e/
├── .github/
│ └── FUNDING.yml
├── LICENSE
├── META-INF/
│ └── com/
│ └── google/
│ └── android/
│ ├── update-binary
│ └── updater-script
├── README.md
├── acdb.conf
├── action.sh
├── aml.sh
├── cleaner.sh
├── copy.sh
├── customize.sh
├── function.sh
├── module.prop
├── package-dolby.txt
├── package.txt
├── post-fs-data.sh
├── sepolicy.rule
├── service.sh
├── system/
│ ├── bin/
│ │ └── sefx
│ ├── etc/
│ │ ├── default-permissions/
│ │ │ └── default-com.sonyericsson.soundenhancement.xml
│ │ ├── permissions/
│ │ │ ├── com.sonyericsson.idd.xml
│ │ │ ├── com.sonymobile.getmore.api.xml
│ │ │ ├── privapp-com.sonyericsson.soundenhancement.xml
│ │ │ ├── privapp-com.sonymobile.audioutil.xml
│ │ │ ├── semc_audioeffectif.xml
│ │ │ └── sonyaudioeffect.xml
│ │ └── sysconfig/
│ │ ├── config-com.sonyericsson.soundenhancement.xml
│ │ └── config-com.sonymobile.audioutil.xml
│ ├── framework/
│ │ ├── com.sonyericsson.idd_impl.jar
│ │ ├── com.sonymobile.getmore.api.jar
│ │ ├── semc_audioeffectif.jar
│ │ └── sonyaudioeffect.jar
│ ├── priv-app/
│ │ ├── AudioSettings/
│ │ │ └── AudioSettings.apk
│ │ ├── ExtendedAudioService/
│ │ │ └── ExtendedAudioService.apk
│ │ └── SoundEnhancement/
│ │ └── SoundEnhancement.apk
│ └── vendor/
│ └── etc/
│ ├── media_codecs_somc_audio.xml
│ └── sony_effect/
│ └── effect_params.data
├── system.prop
├── system_dolby/
│ ├── etc/
│ │ ├── permissions/
│ │ │ ├── dolby_dax.xml
│ │ │ └── privapp-com.dolby.daxservice.xml
│ │ └── sysconfig/
│ │ ├── config-com.dolby.daxappui.xml
│ │ └── config-com.dolby.daxservice.xml
│ ├── framework/
│ │ └── dolby_dax.jar
│ ├── priv-app/
│ │ ├── DaxUI/
│ │ │ └── DaxUI.apk
│ │ └── daxService/
│ │ └── daxService.apk
│ └── vendor/
│ ├── bin/
│ │ └── hw/
│ │ └── vendor.dolby.hardware.dms@1.0-service
│ └── etc/
│ ├── dolby/
│ │ └── dax-default.xml
│ └── media_codecs_dolby_audio.xml
├── system_dolby_36dB/
│ └── priv-app/
│ └── DaxUI/
│ └── DaxUI.apk
├── uninstall.sh
├── unused/
│ └── vendor/
│ └── etc/
│ ├── init/
│ │ └── vendor.dolby.hardware.dms@1.0-service.rc
│ ├── media_codecs.xml
│ └── selinux/
│ ├── vendor_file_contexts
│ └── vendor_hwservice_contexts
└── update.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: reiryuki # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: reiryuki # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: reiryuki # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: https://www.paypal.me/reiryuki # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2020 Rei Ryuki
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: META-INF/com/google/android/update-binary
================================================
#!/sbin/sh
#################
# Initialization
#################
umask 022
# echo before loading util_functions
ui_print() { echo "$1"; }
require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}
#########################
# Load util_functions.sh
#########################
OUTFD=$2
ZIPFILE=$3
mount /data 2>/dev/null
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
install_module
exit 0
================================================
FILE: META-INF/com/google/android/updater-script
================================================
#MAGISK
================================================
FILE: README.md
================================================
# Sound Enhancement & Dolby Atmos Sony Xperia 10 Magisk Module
## DISCLAIMER
- Dolby & Sony apps and blobs are owned by Dolby™ and Sony™.
- The MIT license specified here is for the Magisk Module only, not for Dolby nor Sony apps and blobs.
## Descriptions
- Equalizers sound effect ported from Sony Xperia 10 (I4113) and integrated as a Magisk Module for all supported and rooted devices with Magisk
- Global type sound effect
- Dolby Atmos changes/spoofs ro.product.manufacturer to Sony which may break some system apps and features functionality
- Dolby Atmos conflicted with `vendor.dolby.hardware.dms@2.0-service`
- Sound Enhancement doesn't support ACDB Magisk Module because using effect proxy
## Sources
- https://dumps.tadiphone.dev/dumps/sony/i4113 kirin_dsds-user-10-53.1.A.2.2-053001A00020000200894138764-release-keys
- libhscomp_jni.so & libhscomp.so: https://dumps.tadiphone.dev/dumps/sony/akari akari-user-9-TAMA2-2.0.1-191021-1837-1-dev-keys
- system_dolby: https://dumps.tadiphone.dev/dumps/sony/xq-at51 qssi-user-10-58.0.A.3.31-058000A003003102854466984-release-keys
- libhidlbase.so, libhidltransport.so, & libhwbinder.so: CrDroid ROM Android 13
- libutils.so: LineageOS 23 Android 16 BP2A.250605.031.A2 1758630651
- libmagiskpolicy.so: Kitsune Mask R6687BB53
## Screenshots
- https://t.me/androidryukimodsdiscussions/144433
## Requirements
- HIDL audio service
- Sound Enhancement:
- armeabi-v7a or arm64-v8a architecture
- 32 bit audio service (this also can be found in 64 bit ROM with 32 bit support, not only 32 bit ROM)
- Android 10 (SDK 29) and up
- Magisk or Kitsune Mask or KernelSU or Apatch installed
- Dolby Atmos:
- arm64-v8a architecture
- Android 10 (SDK 29) and up
- Magisk or Kitsune Mask or KernelSU or Apatch installed (Recommended to use Magisk Delta/Kitsune Mask for systemless early init mount manifest.xml if your ROM is Read-Only https://t.me/ryukinotes/49)
## WARNING!!!
- Possibility of bootloop or even softbrick or a service failure on Read-Only ROM with the Dolby Atmos if you don't use Magisk Delta/Kitsune Mask.
## Installation Guide & Download Link
- Recommended to use Magisk Delta/Kitsune Mask if Dolby Atmos is activated https://t.me/ryukinotes/49
- Remove any other else Dolby MAGISK MODULE with different name (no need to remove if it's the same name) if Dolby Atmos is activated
- Reboot
- If you are using KernelSU, you need to disable Unmount Modules by Default in KernelSU app settings and install https://github.com/KernelSU-Modules-Repo/meta-overlayfs first
- If you have Dolby in-built in your ROM, then you need to activate data.cleanup=1 at the first time install (READ Optionals bellow!)
- Install this module https://www.pling.com/p/1531791/ via Magisk app or Kitsune Mask app or KernelSU app or Apatch app or Recovery if Magisk or Kitsune Mask installed
- Install AML Magisk Module https://t.me/ryukinotes/34 only if using any other else audio mod module
- Reboot
- Disable the "No active profiles" notification and ignore it it's nothing
- If you are using KernelSU, you need to allow superuser list manually all package name listed in package-dolby.txt (and your home launcher app also) (enable show system apps) and reboot afterwards
- If you are using SUList, you need to allow list manually your home launcher app (enable show system apps) and reboot afterwards
- If you have sensors issue (fingerprint, proximity, gyroscope, etc), then READ Optionals bellow!
- If Sound Enhancement effect doesn't work, then type:
`su`
`sefx`
at Terminal/Termux app while playing music
- If sefx command triggers integrity failure in your ROM then you can use Xperia Music instead: https://github.com/reiryuki/Xperia-Music-Magisk-Module and choose Sound effects in the app
## Optionals
- https://t.me/ryukinotes/56
- Global: https://t.me/ryukinotes/35
- Stream: https://t.me/ryukinotes/52
## Troubleshootings
- https://t.me/ryukinotes/56
- Global: https://t.me/ryukinotes/34
## Support & Bug Report
- https://t.me/ryukinotes/54
- If you don't do above, issues will be closed immediately
## Credits and Contributors
- @HuskyDG
- https://t.me/viperatmos
- https://t.me/androidryukimodsdiscussions
- @HELLBOY017
- You can contribute ideas about this Magisk Module here: https://t.me/androidappsportdevelopment
## Sponsors
- https://t.me/ryukinotes/25
================================================
FILE: acdb.conf
================================================
# Audio Configuration Database
# gh
# acdb.conf is a module configuration file sourced by the ACDB module to add or remove the configuration of libraries and effects included in this module - determined by the status of a Magisk module being installed, disabled, or enabled.
# Simply insert the appropriate value for the required parameters below for consistent results:
# Required:
libraryid=dap_mod
libraryname=libswdap.so
effectid=dap_mod
effectuuid=9d4921da-8225-4f29-aefa-39537a04bcaa
# Optional:
musicstream=
================================================
FILE: action.sh
================================================
MODPATH=${0%/*}
# info
echo "- Apps caches from this module will be re-cleaned"
echo " at the next boot."
echo " "
# rename
FILE=$MODPATH/cleaner.sh
if [ -f $FILE.txt ]; then
mv -f $FILE.txt $FILE
fi
================================================
FILE: aml.sh
================================================
[ ! "$MODPATH" ] && MODPATH=${0%/*}
# destination
[ ! "$libdir" ] && libdir=/vendor
MODAECS=`find $MODPATH -type f -name *audio*effects*.conf`
MODAEXS=`find $MODPATH -type f -name *audio*effects*.xml`
MODAPS=`find $MODPATH -type f -name *policy*.conf -o -name *policy*.xml`
MODAPXS=`find $MODPATH -type f -name *policy*.xml`
# function
archdir() {
if [ -f $libdir/lib/soundfx/$LIB ]\
|| [ -f $MODPATH/system$libdir/lib/soundfx/$LIB ]\
|| [ -f $MODPATH$libdir/lib/soundfx/$LIB ]; then
ARCHDIR=/lib
elif [ -f $libdir/lib64/soundfx/$LIB ]\
|| [ -f $MODPATH/system$libdir/lib64/soundfx/$LIB ]\
|| [ -f $MODPATH$libdir/lib64/soundfx/$LIB ]; then
ARCHDIR=/lib64
else
unset ARCHDIR
fi
}
remove_conf() {
for RMV in $RMVS; do
sed -i "s|$RMV|removed|g" $MODAEC
done
sed -i 's|path /vendor/lib/soundfx/removed||g' $MODAEC
sed -i 's|path /system/lib/soundfx/removed||g' $MODAEC
sed -i 's|path /vendor/lib/removed||g' $MODAEC
sed -i 's|path /system/lib/removed||g' $MODAEC
sed -i 's|path /vendor/lib64/soundfx/removed||g' $MODAEC
sed -i 's|path /system/lib64/soundfx/removed||g' $MODAEC
sed -i 's|path /vendor/lib64/removed||g' $MODAEC
sed -i 's|path /system/lib64/removed||g' $MODAEC
sed -i 's|library removed||g' $MODAEC
sed -i 's|uuid removed||g' $MODAEC
sed -i "/^ removed {/ {;N s/ removed {\n }//}" $MODAEC
sed -i 's|removed { }||g' $MODAEC
sed -i 's|removed {}||g' $MODAEC
sed -i '/^[[:space:]]*$/d' $MODAEC
}
remove_xml() {
for RMV in $RMVS; do
sed -i "s|\"$RMV\"|\"removed\"|g" $MODAEX
done
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i 's|||g' $MODAEX
sed -i '/^[[:space:]]*$/d' $MODAEX
}
# store
RMVS="ring_helper alarm_helper music_helper voice_helper
notification_helper ma_ring_helper ma_alarm_helper
ma_music_helper ma_voice_helper ma_system_helper
ma_notification_helper sa3d fens lmfv dirac dtsaudio
dlb_music_listener dlb_ring_listener dlb_alarm_listener
dlb_system_listener dlb_notification_listener"
# setup audio effects conf
for MODAEC in $MODAECS; do
for RMV in $RMVS; do
sed -i "/^ $RMV {/ {;N s/ $RMV {\n }//}" $MODAEC
sed -i "s|$RMV { }||g" $MODAEC
sed -i "s|$RMV {}||g" $MODAEC
done
if ! grep -q '^output_session_processing {' $MODAEC; then
sed -i '$a\
\
output_session_processing {\
music {\
}\
ring {\
}\
alarm {\
}\
system {\
}\
voice_call {\
}\
notification {\
}\
bluetooth_sco {\
}\
dtmf {\
}\
enforced_audible {\
}\
accessibility {\
}\
tts {\
}\
assistant {\
}\
call_assistant {\
}\
patch {\
}\
rerouting {\
}\
}\' $MODAEC
else
if ! grep -q '^ rerouting {' $MODAEC; then
sed -i "/^output_session_processing {/a\ rerouting {\n }" $MODAEC
fi
if ! grep -q '^ patch {' $MODAEC; then
sed -i "/^output_session_processing {/a\ patch {\n }" $MODAEC
fi
if ! grep -q '^ call_assistant {' $MODAEC; then
sed -i "/^output_session_processing {/a\ call_assistant {\n }" $MODAEC
fi
if ! grep -q '^ assistant {' $MODAEC; then
sed -i "/^output_session_processing {/a\ assistant {\n }" $MODAEC
fi
if ! grep -q '^ tts {' $MODAEC; then
sed -i "/^output_session_processing {/a\ tts {\n }" $MODAEC
fi
if ! grep -q '^ accessibility {' $MODAEC; then
sed -i "/^output_session_processing {/a\ accessibility {\n }" $MODAEC
fi
if ! grep -q '^ enforced_audible {' $MODAEC; then
sed -i "/^output_session_processing {/a\ enforced_audible {\n }" $MODAEC
fi
if ! grep -q '^ dtmf {' $MODAEC; then
sed -i "/^output_session_processing {/a\ dtmf {\n }" $MODAEC
fi
if ! grep -q '^ bluetooth_sco {' $MODAEC; then
sed -i "/^output_session_processing {/a\ bluetooth_sco {\n }" $MODAEC
fi
if ! grep -q '^ notification {' $MODAEC; then
sed -i "/^output_session_processing {/a\ notification {\n }" $MODAEC
fi
if ! grep -q '^ voice_call {' $MODAEC; then
sed -i "/^output_session_processing {/a\ voice_call {\n }" $MODAEC
fi
if ! grep -q '^ system {' $MODAEC; then
sed -i "/^output_session_processing {/a\ system {\n }" $MODAEC
fi
if ! grep -q '^ alarm {' $MODAEC; then
sed -i "/^output_session_processing {/a\ alarm {\n }" $MODAEC
fi
if ! grep -q '^ ring {' $MODAEC; then
sed -i "/^output_session_processing {/a\ ring {\n }" $MODAEC
fi
if ! grep -q '^ music {' $MODAEC; then
sed -i "/^output_session_processing {/a\ music {\n }" $MODAEC
fi
fi
done
# setup audio effects xml
for MODAEX in $MODAEXS; do
for RMV in $RMVS; do
sed -i "s|||g" $MODAEX
sed -i "s|||g" $MODAEX
done
if ! grep -q '' $MODAEX\
|| grep -q 'Audio post processor configurations' $MODAEX; then
sed -i '/<\/effects>/a\
\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
\
<\/stream>\
<\/postprocess>' $MODAEX
else
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX; then
sed -i "//a\ \n <\/stream>" $MODAEX
fi
if ! grep -q '' $MODAEX\
|| grep -q '
================================================
FILE: uninstall.sh
================================================
mount -o rw,remount /data
[ ! "$MODPATH" ] && MODPATH=${0%/*}
[ ! "$MODID" ] && MODID=`basename "$MODPATH"`
UID=`id -u`
[ ! "$UID" ] && UID=0
# log
exec 2>/data/adb/$MODID\_uninstall.log
set -x
# run
. $MODPATH/function.sh
# cleaning
remove_cache
PKGS=`cat $MODPATH/package.txt`
#dPKGS=`cat $MODPATH/package-dolby.txt`
for PKG in $PKGS; do
rm -rf /data/user*/"$UID"/$PKG
done
remove_sepolicy_rule
#drm -f /data/vendor/dolby/dax_sqlite3.db
#dresetprop -p --delete persist.vendor.dolby.loglevel
resetprop -p --delete persist.sony.effect.ahc
resetprop -p --delete persist.sony.mono_speaker
resetprop -p --delete persist.sony.effect.dolby_atmos
resetprop -p --delete persist.sony.enable.dolby_auto_mode
resetprop -p --delete persist.sony.effect.clear_audio_plus
================================================
FILE: unused/vendor/etc/init/vendor.dolby.hardware.dms@1.0-service.rc
================================================
service dms-hal-1-0 /vendor/bin/hw/vendor.dolby.hardware.dms@1.0-service
class hal
user media
group audio media
on boot
mkdir /data/vendor/dolby 0770 media media
================================================
FILE: unused/vendor/etc/media_codecs.xml
================================================
================================================
FILE: unused/vendor/etc/selinux/vendor_file_contexts
================================================
/(vendor|system/vendor)/bin/hw/vendor\.dolby\.hardware\.dms@1\.0-service u:object_r:hal_dms_default_exec:s0
/data/vendor/dolby(/.*)? u:object_r:vendor_data_file:s0
================================================
FILE: unused/vendor/etc/selinux/vendor_hwservice_contexts
================================================
vendor.dolby.hardware.dms::IDms u:object_r:hal_dms_hwservice:s0
================================================
FILE: update.sh
================================================
copy_library() {
DIR=`find /data/app -type d -name *$PKG*`
DES=$DIR/lib/$ARCH
if [ "$ARCH" ]; then
if echo "$ABI" | grep 64; then
if echo $DES | grep $PKG; then
mkdir -p $DES
for NAMES in $NAME; do
if [ -f /system/lib64/$NAMES ]; then
cp -f /system/lib64/$NAMES $DES
else
cp -f /system/apex/*/lib64/$NAMES $DES
cp -f /apex/*/lib64/$NAMES $DES
fi
done
chmod 0755 $DIR/*
chown -R 1000.1000 $DIR/lib
fi
else
if echo $DES | grep $PKG; then
mkdir -p $DES
for NAMES in $NAME; do
if [ -f /system/lib/$NAMES ]; then
cp -f /system/lib/$NAMES $DES
else
cp -f /system/apex/*/lib/$NAMES $DES
cp -f /apex/*/lib/$NAMES $DES
fi
done
chmod 0755 $DIR/*
chown -R 1000.1000 $DIR/lib
fi
fi
fi
}
ABI=`getprop ro.product.cpu.abi`
if [ "$ABI" == arm64-v8a ]; then
ARCH=arm64
elif [ "$ABI" == armeabi-v7a ] || [ "$ABI" == armeabi ]; then
ARCH=arm
elif [ "$ABI" == x86_64 ]; then
ARCH=x64
elif [ "$ABI" == x86 ]; then
ARCH=x86
elif [ "$ABI" == mips64 ]; then
ARCH=mips64
elif [ "$ABI" == mips ]; then
ARCH=mips
fi
PKG=com.sonyericsson.soundenhancement
NAME="libhscomp_jni.so libhscomp.so"
copy_library