Skip to content

Commit fa592aa

Browse files
authored
v4.2_ryukimod.5
1 parent 397dafc commit fa592aa

File tree

4 files changed

+54
-30
lines changed

4 files changed

+54
-30
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ To uninstall, REMOVE WITH MAGISK MANAGER
99
* Module [GitHub](https://github.com/Zackptg5/Audio-Modification-Library)
1010

1111
## Ryuki Mod Version Adventages
12-
* Magisk Delta support. If your device using /odm/etc/ audio files and/or /my_product/etc/ audio files, then you need to use the latest Magisk Delta and this modded AML version instead.
12+
* /odm/etc & /my_product/etc audio files support with Magisk Delta
13+
* /odm/etc/ and /my_product/etc/ audio files mount bind support
14+
* KernelSU support
1315
* stage_policy.conf file support
1416
* Fixed permissions
1517

16-
## Ryuki Mod Version Download Link
18+
## Ryuki Mod Version Download Link and Changelog
1719
* https://www.pling.com/p/1981006/
1820

1921

module.prop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id=aml
22
name=Audio Modification Library Ryuki Mod
3-
version=v4.2_ryukimod.4
3+
version=v4.2_ryukimod.5
44
versionCode=57
55
author=Rei Ryuki the Fixer
66
description=AudModLib is a framework originally created by zackptg5 & ahrion that allows the seamless integration of multiple audio mods in Magisk. Ryuki Mod version has advantages that are not or have not been owned by the official version.

post-fs-data.sh

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
# ryukimod
12
# Variables
2-
# magisk --path isn't accessible during till part way through post-fs-data
3-
[ -d "/sbin/.magisk" ] && MAGISKTMP="/sbin/.magisk" || MAGISKTMP="$(find /dev -mindepth 2 -maxdepth 2 -type d -name ".magisk")"
4-
MODPATH=$MAGISKTMP/modules/aml
3+
mount -o rw,remount /data
4+
MODPATH=${0%/*}
55
API=
66
moddir=
77
amldir=
@@ -55,34 +55,49 @@ osp_detect() {
5555
exec 2>$MODPATH/debug-pfsd.log
5656
set -x
5757

58-
# ryukimod Paths
59-
MIRROR=$MAGISKTMP/mirror
60-
SYSTEM=`realpath $MIRROR/system`
61-
VENDOR=`realpath $MIRROR/vendor`
62-
ODM=`realpath $MIRROR/odm`
63-
MY_PRODUCT=`realpath $MIRROR/my_product`
58+
# ryukimod
59+
# Paths
60+
MAGISKPATH=`magisk --path`
61+
if [ "$MAGISKPATH" ]; then
62+
MAGISKTMP=$MAGISKPATH/.magisk
63+
MIRROR=$MAGISKTMP/mirror
64+
ODM=$MIRROR/odm
65+
MY_PRODUCT=$MIRROR/my_product
66+
fi
67+
SYSTEMPATH=`realpath /system`
68+
VENDORPATH=`realpath /vendor`
69+
ODMPATH=`realpath /odm`
70+
MY_PRODUCTPATH=`realpath /my_product`
6471

6572
# Restore and reset
6673
. $MODPATH/uninstall.sh
6774
rm -rf $amldir $MODPATH/system $MODPATH/errors.txt $MODPATH/system.prop
6875
[ -f "$moddir/acdb/post-fs-data.sh" ] && mv -f $moddir/acdb/post-fs-data.sh $moddir/acdb/post-fs-data.sh.bak
6976
mkdir $amldir
70-
# ryukimod Don't follow symlinks
77+
# ryukimod
78+
# Don't follow symlinks
7179
lists="*audio*effects*.conf -o -name *audio*effects*.xml\
7280
-o -name *policy*.conf -o -name *policy*.xml\
7381
-o -name *mixer*paths*.xml -o -name *mixer*gains*.xml\
7482
-o -name *audio*device*.xml -o -name *sapa*feature*.xml\
7583
-o -name *audio*platform*info*.xml -o -name *audio*configs*.xml"
76-
files="$(find $SYSTEM $VENDOR $ODM $MY_PRODUCT -type f -name $lists)"
84+
files="$(find $SYSTEMPATH $VENDORPATH $ODMPATH $MY_PRODUCTPATH -type f -name $lists)"
7785
for file in $files; do
78-
name=$(echo "$file" | sed -e "s|$MAGISKTMP/mirror||" -e "s|/system_root/|/|" -e "s|/system/|/|")
86+
name=$(echo "$file" | sed -e "s|/system_root/|/|" -e "s|/system/|/|")
7987
cp_mv -c $file $MODPATH/system$name
8088
modfiles="/system$name $modfiles"
8189
done
82-
if [ ! -d $ODM ] && [ ! -d $MY_PRODUCT ]; then
83-
files="$(find /odm /my_product -type f -name $lists)"
90+
if [ ! -d $ODM ]; then
91+
files="$(find /odm -type f -name $lists)"
92+
for file in $files; do
93+
name=$(echo "$file" | sed -e "s|/odm||")
94+
cp_mv -c $file $MODPATH/system/vendor$name
95+
done
96+
fi
97+
if [ ! -d $MY_PRODUCT ]; then
98+
files="$(find /my_product -type f -name $lists)"
8499
for file in $files; do
85-
name=$(echo "$file" | sed -e "s|/odm||" -e "s|/my_product/||")
100+
name=$(echo "$file" | sed -e "s|/my_product/||")
86101
cp_mv -c $file $MODPATH/system/vendor$name
87102
done
88103
fi
@@ -92,7 +107,8 @@ osp_detect "music"
92107
for mod in $(find $moddir/* -maxdepth 0 -type d ! -name aml); do
93108
modname="$(basename $mod)"
94109
[ -f "$mod/disable" ] && continue
95-
# ryukimod Move files
110+
# ryukimod
111+
# Move files
96112
files="$(find $mod/system -type f -name $lists 2>/dev/null)"
97113
[ "$files" ] && echo "$modname" >> $amldir/modlist || continue
98114
for file in $files; do
@@ -107,7 +123,8 @@ for file in $modfiles; do
107123
[ "$(find $amldir -type f -path "*$file")" ] || rm -f $MODPATH$file
108124
done
109125

110-
# ryukimod Set perms and such
126+
# ryukimod
127+
# Set perms and such
111128
set_perm_recursive $MODPATH/system 0 0 0755 0644
112129
if [ $API -ge 26 ]; then
113130
set_perm_recursive $MODPATH/system/vendor 0 2000 0755 0644 u:object_r:vendor_file:s0

service.sh

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
# ryukimod
12
# Variables
2-
[ "$(magisk --path 2>/dev/null)" ] && MAGISKTMP="$(magisk --path 2>/dev/null)/.magisk" || MAGISKTMP="/sbin/.magisk"
3-
MODPATH=$MAGISKTMP/modules/aml
3+
MODPATH=${0%/*}
44
API=
55
moddir=
66
amldir=
@@ -182,12 +182,15 @@ legacy_script() {
182182
exec 2>$MODPATH/debug.log
183183
set -x
184184

185-
# ryukimod Paths
186-
MIRROR=$MAGISKTMP/mirror
187-
SYSTEM=`realpath $MIRROR/system`
188-
VENDOR=`realpath $MIRROR/vendor`
189-
ODM=`realpath $MIRROR/odm`
190-
MY_PRODUCT=`realpath $MIRROR/my_product`
185+
# ryukimod
186+
# Paths
187+
MAGISKPATH=`magisk --path`
188+
if [ "$MAGISKPATH" ]; then
189+
MAGISKTMP=$MAGISKPATH/.magisk
190+
MIRROR=$MAGISKTMP/mirror
191+
ODM=$MIRROR/odm
192+
MY_PRODUCT=$MIRROR/my_product
193+
fi
191194

192195
# Detect/install audio mods
193196
for mod in $(find $moddir/* -maxdepth 0 -type d ! -name aml); do
@@ -218,7 +221,8 @@ for mod in $(find $moddir/* -maxdepth 0 -type d ! -name aml); do
218221
fi
219222
done
220223

221-
# ryukimod Reload patched files - original mounted files are seemingly deleted and replaced by sed
224+
# ryukimod
225+
# Reload patched files - original mounted files are seemingly deleted and replaced by sed
222226
dir=$MODPATH/system
223227
files=$(find $dir -type f)
224228
for i in $files; do
@@ -228,7 +232,8 @@ for i in $files; do
228232
done
229233
dir=$MODPATH/system/vendor
230234
files=$(find $dir/etc -maxdepth 1 -type f)
231-
if [ ! -d $ODM ] && [ "`realpath /odm/etc`" == /odm/etc ]\
235+
if [ ! -d $ODM ] && [ -d /odm/etc ]\
236+
&& [ "`realpath /odm/etc`" == /odm/etc ]\
232237
&& [ "$files" ]; then
233238
for i in $files; do
234239
j="/odm$(echo $i | sed "s|$dir||")"

0 commit comments

Comments
 (0)