Browse Source

Init commit

master
wchen342 4 months ago
parent
commit
4da4c1eec3
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
6 changed files with 73 additions and 1 deletions
  1. +33
    -0
      MountSDInEmulated0/META-INF/com/google/android/update-binary
  2. +1
    -0
      MountSDInEmulated0/META-INF/com/google/android/updater-script
  3. +6
    -0
      MountSDInEmulated0/module.prop
  4. +32
    -0
      MountSDInEmulated0/service.sh
  5. +0
    -0
      MountSDInEmulated0/skip_mount
  6. +1
    -1
      README.md

+ 33
- 0
MountSDInEmulated0/META-INF/com/google/android/update-binary View File

@ -0,0 +1,33 @@
#!/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

+ 1
- 0
MountSDInEmulated0/META-INF/com/google/android/updater-script View File

@ -0,0 +1 @@
#MAGISK

+ 6
- 0
MountSDInEmulated0/module.prop View File

@ -0,0 +1,6 @@
id=MountSDInEmulated0
name=MountSDInEmulated0
version=0.0.1
versionCode=3
author=wchen342
description=Mount SD card to an additional mount point in Internal Storage on boot

+ 32
- 0
MountSDInEmulated0/service.sh View File

@ -0,0 +1,32 @@
# Delay
while ! ( mount | grep '/storage/emulated' > /dev/null )
do
log -t Magisk "Delaying..."
sleep 10
done
# Create mount points
if [[ ! -d /storage/emulated/0/Mount_A ]]
then
mkdir -p /storage/emulated/0/Mount_A
fi
if [[ ! -d /storage/emulated/0/Mount_B ]]
then
mkdir -p /storage/emulated/0/Mount_B
fi
while ! ( mount | grep '/dev/block/vold/public:179,1' > /dev/null )
do
log -t Magisk "Delaying Mount..."
sleep 10
done
if [[ -e '/dev/block/vold/public:179,1' ]]
then
log -t Magisk "Mounting..."
/system/bin/mount -o nosuid,nodev,noexec,noatime '/dev/block/vold/public:179,1' /storage/emulated/0/Mount_A
sleep 5
mount -t sdcardfs -o nosuid,nodev,noexec,noatime /storage/emulated/0/Mount_A /storage/emulated/0/Mount_B
fi

+ 0
- 0
MountSDInEmulated0/skip_mount View File


+ 1
- 1
README.md View File

@ -1,3 +1,3 @@
# Magisk-SDMount
Magisk module to mount SD card to internal storage.
Magisk module to mount SD card to internal storage. Only tested on LineageOS 16, Xperia XZ1C.

Loading…
Cancel
Save