Skip to content

Commit

Permalink
modules: When shrinking modules.img, 100MB is now added
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterZtr committed Oct 13, 2024
1 parent ce3d9be commit 131108b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions recovery/root/system/bin/modules_mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# Если modules.img есть только в ksu
if [ -f "/data/adb/ksu/modules.img" ] && [ ! -f "/data/adb/ap/modules.img" ]; then
e2fsck -fy /data/adb/ksu/modules.img
resize2fs -M /data/adb/ksu/modules.img
size=$(du -m /data/adb/ksu/modules.img | awk '{print $1}')
let "rsize = $size + 100"
resize2fs /data/adb/ksu/modules.img "$rsize"m
mount -t auto -o loop /data/adb/ksu/modules.img /data/adb/modules

# Если modules.img есть в ap
Expand All @@ -17,9 +19,11 @@ elif [ -f "/data/adb/ksu/modules.img" ] && [ -f "/data/adb/ap/modules.img" ]; th
mkdir /data/adb/ksu-modules
mkdir /data/adb/ap-modules

e2fsck -fy /data/adb/ksu/modules.img
e2fsck -fy /data/adb/ap/modules.img
resize2fs -M /data/adb/ksu/modules.img
e2fsck -fy /data/adb/ksu/modules.img
size=$(du -m /data/adb/ksu/modules.img | awk '{print $1}')
let "rsize = $size + 100"
resize2fs /data/adb/ksu/modules.img "$rsize"m
mount -t auto -o loop /data/adb/ksu/modules.img /data/adb/ksu-modules
mount -t auto -o loop /data/adb/ap/modules.img /data/adb/ap-modules

Expand Down

0 comments on commit 131108b

Please sign in to comment.