Skip to content

Instantly share code, notes, and snippets.

@gawel
Last active December 29, 2015 00:09
Show Gist options
  • Save gawel/7584142 to your computer and use it in GitHub Desktop.
Save gawel/7584142 to your computer and use it in GitHub Desktop.
#!/system/bin/sh
if [ -f adb ]; then
./adb push 11link2sd /system/etc/init.d/11link2sd
./adb shell chown root:shell /system/etc/init.d/11link2sd
./adb shell chmod +x /system/etc/init.d/11link2sd
exit
fi
LOG=/data/link2sd-11link2sd.log
echo "$(date) mounting..." > $LOG
umount /sd-ext 1>>$LOG 2>>$LOG
! [ -d /data/sdext2 ] && mkdir /data/sdext2
mount -t ext4 -o rw /dev/block/mmcblk0p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment