-
-
Save TylerTemp/10a544fe68c6c50ebbd5c8af070a4207 to your computer and use it in GitHub Desktop.
sdcard4jolla
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[nemo@Jolla ~]$ devel-su | |
Password: | |
[root@Jolla nemo]# cd /etc/systemd/system | |
[root@Jolla system]# nano mount-sd4android.service | |
[root@Jolla system]# | |
[root@Jolla system]# nano /usr/local/sbin/mount-sd4android.sh | |
[root@Jolla system]# chmod ug+x /usr/local/sbin/mount-sd4android.sh | |
[root@Jolla system]# systemctl enable mount-sd4android.service | |
ln -s '/etc/systemd/system/mount-sd4android.service' '/etc/systemd/system/graphical.target.wants/mount-sd4android.service' | |
ln -s '/etc/systemd/system/mount-sd4android.service' '/etc/systemd/system/display.service.wants/mount-sd4android.service' | |
[root@Jolla system]# | |
[root@Jolla system]# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Mount sd for android | |
[email protected] | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/local/sbin/mount-sd4android.sh start | |
ExecStop=/usr/local/sbin/mount-sd4android.sh stop | |
[Install] | |
WantedBy=graphical.target display.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sd_uuid="$(blkid -o value -s UUID /dev/mmcblk1p1)" | |
if [ "$1" == "start" ] | |
then | |
systemctl stop aliendalvik | |
mkdir -p /data/media/"${sd_uuid}" | |
chown media_rw.media_rw /data/media/"${sd_uuid}" | |
mount -o bind /media/sdcard/"${sd_uuid}" /data/media/"${sd_uuid}" | |
systemctl start aliendalvik | |
elif [ "$1" == "stop" ] | |
then | |
systemctl stop aliendalvik | |
umount /data/media/"${sd_uuid}" | |
#rm -rf /data/media/"${sd_uuid}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment