Last active
November 15, 2016 00:38
-
-
Save javiermon/3551dc42f03625ccb9a2 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 |
Followed steps above after installing Nano, i replaced the UUID with my SDCard mount ID, are there any other changes required to file contents above?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesnt work for me, i says that bash nano command cannot be found.