We have moved to a new Sailfish OS Forum. Please start new discussions there.
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcardI did not want to write a detailed guide as I do not want to be responsible for any wrong doings all steps are pretty basic for people knowing their way around the cmdline - you can find every step somewhere here @tjc or in the man-pages of the required tools
detailed cmds use at your own risk
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/sdcard/* /media/sdcard/android
umount /dev/mmcblk1
/usr/sbin/mount-sd.sh
add mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
after the btrfs mount (btrfs mount is in line 53, add it just below in a newline)2 | retagged |
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcardI did not want to write a detailed guide as I do not want to be responsible for any wrong doings all steps are pretty basic for people knowing their way around the cmdline - you can find every step somewhere here @tjc or in the man-pages of the required tools
detailed cmds use at your own risk
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/sdcard/* /media/sdcard/android
umount /dev/mmcblk1
/usr/sbin/mount-sd.sh
add mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
after the btrfs mount (btrfs mount is in line 53, add it just below in a newline)3 | No.3 Revision |
Version: 1.0.5.19
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcardI did not want to write a detailed guide as I do not want to be responsible for any wrong doings all steps are pretty basic for people knowing their way around the cmdline - you can find every step somewhere here @tjc or in the man-pages of the required tools
detailed cmds use at your own risk
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/sdcard/* /media/sdcard/android
umount /dev/mmcblk1
/usr/sbin/mount-sd.sh
add mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
after the btrfs mount (btrfs mount is in line 53, add it just below in a newline)4 | No.4 Revision |
Version: 1.0.5.19
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcardI did not want to write a detailed guide as I do not want to be responsible for any wrong doings all steps are pretty basic for people knowing their way around the cmdline - you can find every step somewhere here @tjc or in the man-pages of the required tools
detailed cmds use at your own risk
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/sdcard/* /media/sdcard/android
umount /dev/mmcblk1
/usr/sbin/mount-sd.sh
add mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
after the btrfs mount (btrfs mount is in line 53, add it just below in a newline) *) mount ${DEVNAME} $MNT/${UUID} -o $MOUNT_OPTS || /bin/rmdir $MNT/${UUID} mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/ ;;
5 | No.5 Revision |
Version: 1.0.5.19
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcardI did not want to write a detailed guide as I do not want to be responsible for any wrong doings all steps are pretty basic for people knowing their way around the cmdline - you can find every step somewhere here @tjc or in the man-pages of the required tools
detailed cmds use at your own risk
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/sdcard/* /media/sdcard/android
umount /dev/mmcblk1
/usr/sbin/mount-sd.sh
add mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
after the btrfs mount (btrfs mount is in line 53, add it just below in a newline)lines look like this
*)
mount ${DEVNAME} $MNT/${UUID} -o $MOUNT_OPTS || /bin/rmdir $MNT/${UUID}
mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
6 | No.6 Revision |
Version: 1.0.5.19
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcardI did not want to write a detailed guide as I do not want to be responsible for any wrong doings all steps are pretty basic for people knowing their way around the cmdline - you can find every step somewhere here @tjc or in the man-pages of the required tools
detailed cmds use at your own risk
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/sdcard/* /media/sdcard/android
umount /dev/mmcblk1
/usr/sbin/mount-sd.sh
add mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
after the btrfs mount (btrfs mount is actually not specified so we go in the line for any other case *)
in line 53, add it just below in a newline)lines look like this
*)
mount ${DEVNAME} $MNT/${UUID} -o $MOUNT_OPTS || /bin/rmdir $MNT/${UUID}
mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
;;
7 | No.7 Revision |
Version: 1.0.5.19
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcarddetailed cmds use at your own risk
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/sdcard/* /media/sdcard/android
umount /dev/mmcblk1
/usr/sbin/mount-sd.sh
add mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) ${DEVNAME} /data/sdcard/
after the btrfs mount (btrfs mount is actually not specified so we go in the line for any other case *)
in line 53, add it just below in a newline)lines look like this
*)
mount ${DEVNAME} $MNT/${UUID} -o $MOUNT_OPTS || /bin/rmdir $MNT/${UUID}
mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) ${DEVNAME} /data/sdcard/
;;
8 | No.8 Revision |
Version:
1.0.5.191.0.7.16
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcarddetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/sdcard/* /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/usr/sbin/mount-sd.sh
add mount
create /etc/systemd/system/androidsdcard.service
and fill with:
[Unit] Description=Mount SDCard btrfs subvolume for Android ConditionPathExists=/dev/mmcblk1 ConditionPathIsDirectory=/data/media Requires=local-fs.target Before=aliendalvik.service After=local-fs.target BindsTo=mount-sd@mmcblk1.service
[Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/mount
-o[Install] WantedBy=local-fs.target aliendalvik.service
systemctl enable
androidsdcard.service
- the
service gets started everytime
alien is actually not specified so started
for the future we lines look like thisgo in the line for any other case only need to load the service file to its place and enable it, if something changes I will update the code*)
in line 53, add it just below in a newline) *)
mount ${DEVNAME} $MNT/${UUID} -o $MOUNT_OPTS || /bin/rmdir $MNT/${UUID}
mount -o subvol=android,compress,$MOUNT_OPTS ${DEVNAME} /data/sdcard/
;;
9 | No.9 Revision |
Version: 1.0.7.16
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcarddetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target
systemctl enable
enable androidsdcard.service
- for the future we only need to load the service file to its place and enable it, if something changes I will update the code
10 | No.10 Revision |
Version: 1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and detailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started for the future we only need to load the service file to its place and enable it, if something changes I will update the code
11 | No.11 Revision |
Version: 1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpointfor the future we only need to load the service file to its place and enable it, if something changes I will update the code
12 | No.12 Revision |
Version: 1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpointfor the future we only need to load the service file to its place and enable it, if something changes I will update the code
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
13 | No.13 Revision |
Version: 1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpointfor the future we only need to load the service file to its place and enable it, if something changes I will update the code
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
14 | No.14 Revision |
Version: 1.0.7.16
currently WIP as alien-dalvik is unable to read or write ~/android_storage this way
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpointfor the future we only need to load the service file to its place and enable it, if something changes I will update the code
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
15 | No.15 Revision |
Version: 1.0.7.16
currently WIP as alien-dalvik is unable to read or write ~/android_storage this way
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpointfor the future we only need to load the service file to its place and enable it, if something changes I will update the code
For upgrading from previous version: the group and owner of the files have changed, stop aliendalvik.service and chmod media_rw:media_rw -R /data/media/
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
BACKUP TO SDCARD UPDATE: I updated the service file to inlcude After=local-fs.target mount-sd@mmcblk1.service
, if you alter service files you need to remember to update the tree or it wont work (stop service, disable service, update file, systemctl daemon-reload, enable service; I am sure there is an easier way but I don't know it yet)
16 | No.16 Revision |
Version: 1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpointfor the future we only need to load the service file to its place and enable it, if something changes I will update the code
For upgrading from previous version: the group and owner of the files have changed, stop aliendalvik.service and chmod media_rw:media_rw -R /data/media/
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
BACKUP TO SDCARD UPDATE: I updated the service file to inlcude After=local-fs.target mount-sd@mmcblk1.service
, if you alter service files you need to remember to update the tree or it wont work (stop service, disable service, update file, systemctl daemon-reload, enable service; I am sure there is an easier way but I don't know it yet)
17 | No.17 Revision |
Version: 1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a for the future we only need to load the service file to its place and enable it, if something changes I will update the code
For upgrading from previous version: the group and owner of the files have changed, stop aliendalvik.service and chmod media_rw:media_rw -R /data/media/
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
BACKUP TO SDCARD UPDATE: I updated the service file to inlcude After=local-fs.target mount-sd@mmcblk1.service
, if you alter service files you need to remember to update the tree or it wont work (stop service, disable service, update file, systemctl daemon-reload, enable service; I am sure there is an easier way but I don't know it yet)
18 | No.18 Revision |
Version: 1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code
For upgrading from previous version: the group and owner of the files have changed, stop aliendalvik.service and chmod chown media_rw:media_rw -R /data/media/
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
BACKUP TO SDCARD UPDATE: I updated the service file to inlcude After=local-fs.target mount-sd@mmcblk1.service
, if you alter service files you need to remember to update the tree or it wont work (stop service, disable service, update file, systemctl daemon-reload, enable service; I am sure there is an easier way but I don't know it yet)
19 | No.19 Revision |
Version:
1.0.7.16>=1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code
For upgrading from previous version: the group and owner of the files have changed, stop aliendalvik.service and chown media_rw:media_rw -R /data/media/
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
BACKUP TO SDCARD UPDATE: I updated the service file to inlcude After=local-fs.target mount-sd@mmcblk1.service
, if you alter service files you need to remember to update the tree or it wont work (stop service, disable service, update file, systemctl daemon-reload, enable service; I am sure there is an easier way but I don't know it yet)
20 | No.20 Revision |
Version: >=1.0.7.16
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code
For upgrading from previous version: the group and owner of the files have changed, stop aliendalvik.service and chown media_rw:media_rw -R /data/media/
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
BACKUP TO SDCARD UPDATE: I updated the service file to inlcude After=local-fs.target mount-sd@mmcblk1.service
, if you alter service files you need to remember to update the tree or it wont work (stop service, disable service, update file, systemctl daemon-reload, enable service; I am sure there is an easier way but I don't know it yet)
21 | No.21 Revision |
Version:
>=1.0.7.16=1.1.0.39
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the cardmkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the codecode, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
For upgrading from previous version: the group and owner of the files have changed, stop aliendalvik.service and chown media_rw:media_rw -R /data/media/
BACKUP TO SDCARD NOTICE: For copying backups to the sdcard you need to deactivate the service systemctl stop androidsdcard.service
as the-vault does not account for other usecases than sdcards get mounted for nemo to /media/sdcard/($UUID)
. This only applies for jolla-settings
of course you can tar ~/.vault
to /media/sdcard/($UUID)
yourself
BACKUP TO SDCARD UPDATE: I updated the service file to inlcude After=local-fs.target mount-sd@mmcblk1.service
, if you alter service files you need to remember to update the tree or it wont work (stop service, disable service, update file, systemctl daemon-reload, enable service; I am sure there is an easier way but I don't know it yet)
22 | No.22 Revision |
Version: =1.1.0.39
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the mkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
23 | No.23 Revision |
Version:
=1.1.0.391.1.1.27
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
- format the card (no need for partition)mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
24 | No.24 Revision |
Version: 1.1.1.27
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for mount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
25 | No.25 Revision |
Version: 1.1.1.27
broken in >1.1.2, I will update as soon as I find out how to mount again - for now you need to stop aliendalvik.service & .path and make sure that it is defused then start androidsdcard.service or .mount
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
26 | No.26 Revision |
Version: 1.1.1.27
broken in >1.1.2, I will update as soon as I find out how to mount again - for now you need to stop aliendalvik.service & .path .path, stop androidsdcard.service or .mount and make sure that it is defused then start androidsdcard.service or .mountdefused
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible. This version does only apply to the SFOS release with the same version number!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
27 | No.27 Revision |
Version: 1.1.1.27
broken in >1.1.2, I will update as soon as I find out how to mount again - for now you need to stop aliendalvik.service & .path, stop androidsdcard.service or .mount and make sure that it defused
This is no beginners guide, you need to know your way around! I try to make everything as foolproof as possible.
This version does only apply to the SFOS release with the same version number!There are no warranties and for > 1.1.2
you need to alter dalvik files or follow the guide below how to circumvent it.
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop
then follow this listaliendalvik.servicealiendalvik.service & systemctl stop aliendalvik.path
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
Version 1.1.2.x
do everything just like for 1.1.1.27 and additionally move data
form the bind section of alien.sh to its rbind section so it survives a reboot too.
28 | No.28 Revision |
Version: 1.1.1.27
This is no beginners guide, you need to know your way around! There are no warranties and for > 1.1.2
you need to alter dalvik files or follow the guide below how to circumvent it.
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
Version 1.1.2.x
do everything just like for 1.1.1.27 and additionally move data
form the bind section (line19) of alien.sh /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too.
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
29 | No.29 Revision |
Version: 1.1.1.27
This is no beginners guide, you need to know your way around! There are no warranties and for > 1.1.2
you need to alter dalvik files or follow the guide below how to circumvent it.
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
Version 1.1.2.x
do everything just like for 1.1.1.27 and additionally move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
Version 1.1.4.x
please be aware that copying backup to uSD will stop working while aliendalvik is running and therefor the mount is active (you have to stop all of it to be able to restore from or save to uSD - TheVault has mismanagement, also MTP stopped working for me while the mount is active!
do everything just like for 1.1.1.27 and additionally move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
30 | No.30 Revision |
UPDATE: As of 1.1.4 copy/recover backup (vault) from uSD stopped working with as it cannot handle having it bind-mount+not being the only subvolume available.
MTP stopped working completely, tested Debian & Win7.
Also a problem of proper handling of multi partition/volume uSD cards as is, stopping dalvik & unmounting the android subvolume makes it work though!.
If you are OK with that go ahead reading this guide.
Version: 1.1.1.27
This is no beginners guide, you need to know your way around! There are no warranties and for > 1.1.2
you need to alter dalvik files or follow the guide below how to circumvent it.
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
Version 1.1.2.x
do everything just like for 1.1.1.27 and additionally move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
Version 1.1.4.x
please be aware that copying backup to uSD will stop working while aliendalvik is running and therefor the mount is active (you have to stop all of it to be able to restore from or save to uSD - TheVault has mismanagement, also MTP stopped working for me while the mount is active!
do everything just like for 1.1.1.27 and additionally move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
31 | No.31 Revision |
UPDATE: As of 1.1.4 copy/recover backup (vault) from uSD stopped working with as it cannot handle having it bind-mount+not being the only subvolume available.
MTP stopped working completely, tested Debian & Win7.
Also a problem of proper handling of multi partition/volume uSD cards as is, stopping dalvik & unmounting the android subvolume makes it work though!.
If you are OK with that go ahead reading this guide.
Version: 1.1.1.27
This is no beginners guide, you need to know your way around! There are no warranties and for > 1.1.2
you need to alter dalvik files or follow the guide below how to circumvent it.
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service
and fill with:#
[Unit]
Description=Mount SDCard btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Install]
WantedBy=local-fs.target aliendalvik.service
systemctl enable androidsdcard.service
- the service file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint (due to the-vault only looking for the biggest mounted sdcard partition we have to wait for mount-sd too to have it read by the-vault first)for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 went through without anything as the updates do not touch androidsdcard.service as of yet
Version 1.1.2.x
do everything just like for 1.1.1.27 and additionally move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
Version
1.1.4.x>1.1.4.x
please be aware that copying backup to uSD will stop working while aliendalvik is running and therefor the mount is active (you have to stop all of it to be able to restore from or save to uSD - TheVault has mismanagement, also MTP stopped working for me while the mount is active!
do everything just like for 1.1.1.27 and additionally move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
32 | No.32 Revision |
UPDATE:Update: Changed from service to mount. For upgrades it is probably better to disable this hack first and enable it after the upgrade went through (everything was running fine but sailfish-utilities failed stopping android-support, guess I should upgrade to latest release before I role back after a factory-reset, just to give you a heads up - no need to do anything fancy, after upgrading I disabled and then re-enabled the mount and everything is fine again). I also changed the how-to to reflect newest available only, if you need old stuff look into the question's history.
As of 1.1.4 copy/recover backup (vault) from uSD stopped working with as it cannot handle having it bind-mount+not being the only subvolume available.
MTP stopped working completely, tested Debian & Win7.
Also a problem of proper handling of multi partition/volume uSD cards as is, stopping dalvik & unmounting the android subvolume makes it work though!.
If you are OK with that go ahead reading this guide.
Version:
1.1.1.27>1.1.4.x
This is no beginners guide, you need to know your way around! There are no warranties and for >
you need to alter dalvik files or follow the guide below how to circumvent it. Old stuff in question's history1.1.21.1.4
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/androidsdcard.service/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=Mount SDCard Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target
Requires=local-fs.target systemd-user-session.service
Before=aliendalvik.service
After=local-fs.target mount-sd@mmcblk1.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o subvol=android,compress,dirsync,noatime,users /dev/mmcblk1 /data/media
ExecStop=/bin/sh/ -c 'systemctl stop aliendalvik.service;umount /data/media'
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run
systemctl enable androidsdcard.service
- the service data-media.mount. for the future we only need to load the service file to its place and enable it, if something changes I will update the code, update9 upgrade went through without anything (see first line for updates) as the updates do not touch androidsdcard.service data-media.mount as of yet
Steps since
Versiondo everything just like for 1.1.1.27 and additionally
data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around! move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run; run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
Version >1.1.4.x
please be aware that copying backup to uSD will stop working while aliendalvik is running and therefor the mount is active (you have to stop all of it to be able to restore from or save to uSD - TheVault has mismanagement, also MTP stopped working for me while the mount is active!
do everything just like for 1.1.1.27 and additionally move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
33 | No.33 Revision |
Update: Changed from service to mount. For upgrades it is probably better to disable this hack first and enable it after the upgrade went through (everything was running fine but sailfish-utilities failed stopping android-support, guess I should upgrade to latest release before I role back after a factory-reset, just to give you a heads up - no need to do anything fancy, after upgrading I disabled and then re-enabled the mount and everything is fine again). I also changed the how-to to reflect newest available only, if you need old stuff look into the question's history.
As of 1.1.4 copy/recover backup (vault) from uSD stopped working with as it cannot handle having it bind-mount+not being the only subvolume available.
If you are OK with that go ahead reading this guide.
Version: >1.1.4.x
This is no beginners guide, you need to know your way around! There are no warranties and for > 1.1.4
you need to alter dalvik files or follow the guide below how to circumvent it. Old stuff in question's history
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-session.service
systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
Steps since Version 1.1.4.x (just looks different in 1.1.2.x): move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
34 | No.34 Revision |
Update: Changed from service to mount. For upgrades upgrades it is probably better to disable this hack first and enable it after the upgrade went through (everything was running fine but sailfish-utilities failed stopping android-support, guess I should upgrade to latest release before I role back after a factory-reset, just to give you a heads up - no need to do anything fancy, after upgrading I disabled and then re-enabled the mount and everything is fine again). I also changed the how-to to reflect newest available only, if you need old stuff look into the question's history.
As of 1.1.4 >1.1.4 copy/recover backup (vault) from uSD stopped working with as it cannot handle having it bind-mount+not being the only subvolume available.
If you are OK with that go ahead reading this guide.
Version: >1.1.4.x
This is no beginners guide, you need to know your way around! There are no warranties and for > 1.1.4
you need to alter dalvik files or follow the guide below how to circumvent it. Old stuff in question's history
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
Steps since Version 1.1.4.x (just looks different in 1.1.2.x): move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
35 | No.35 Revision |
Update: changes of chrooting in 1.1.7 makes altering alien scripts obsolete, do not alter any files after upgrade, just re-enable the .mount and you should be good to go
Changed from service to mount. For upgrades it is probably better to disable this hack first and enable it after the upgrade went through (everything was running fine but sailfish-utilities failed stopping android-support, guess I should upgrade to latest release before I role back after a factory-reset, just to give you a heads up - no need to do anything fancy, after upgrading I disabled and then re-enabled the mount and everything is fine again). I also changed the how-to to reflect newest available only, if you need old stuff look into the question's history.
As of >1.1.4 copy/recover backup (vault) from uSD stopped working with as it cannot handle having it bind-mount+not being the only subvolume available.
If you are OK with that go ahead reading this guide.
Version: >1.1.4.x
This is no beginners guide, you need to know your way around! There are no warranties and for > 1.1.4
you need to alter dalvik files or follow the guide below how to circumvent it. Old stuff in question's history
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
part below is obsolete for >1.1.7 new chroot'ing of data
Steps since Version 1.1.4.x (just looks different in 1.1.2.x): move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
36 | No.36 Revision |
Update: no changes needed for upgrading to 1.1.9.x, even the-vault seems to work fine now, not tested MTP as of chrooting yet. Old stuff in 1.1.7 makes altering alien scripts obsolete, do not alter any files after upgrade, just re-enable the .mount and you should be good to go
Changed from servicequestion's history to mount. For upgrades it is probably better to disable this hack first and enable it after the upgrade went through (everything was running fine but sailfish-utilities failed stopping android-support, guess I should upgrade to latest release before I role back after a factory-reset, just to give you a heads up - no need to do anything fancy, after upgrading I disabled and then re-enabled the mount and everything is fine again). I also changed the how-to to reflect newest available only, if you need old stuff look into the question's history.
As of >1.1.4 copy/recover backup (vault) from uSD stopped working with as it cannot handle having it bind-mount+not being the only subvolume available.
If you are OK with that go ahead reading this guide.
Version:
>1.1.4.x>1.1.7.x
This is no beginners guide, you need to know your way around! There are no warranties and for around!> 1.1.4
you need to alter dalvik files or follow the guide below how to circumvent it. Old stuff in question's history
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
part below is obsolete for >1.1.7 new chroot'ing of data
Steps since Version 1.1.4.x (just looks different in 1.1.2.x): move data
form the bind section (line19) of /opt/alien/system/script/alien.sh
to its rbind section (line26) so it survives a reboot too. As always, you probably want to save the original file to alien.sh.bak before you start messing around!
move the value [data] from section
for d in bin sbin lib usr var etc tmp home vendor data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
to
for d in dev sys run media; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
result looks like
for d in bin sbin lib usr var etc tmp home vendor; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --bind /$d $ROOT/$d
fi
done
for d in dev sys run media data; do
if [ "" == "$(grep $ROOT/$d /proc/mounts)" ]; then
echo "mount $ROOT/$d"
mount --rbind /$d $ROOT/$d
fi
done
37 | No.37 Revision |
Update: no changes needed for upgrading to 1.1.9.x, even the-vault seems to work fine now, 2.0.0.x, MTP on Win10 broken (but that is not tested MTP as of yet. my fault!) Old stuff in question's history
If you are OK with that go ahead reading this guide.
Version:
>1.1.7.x>1.1.9.x
This is no beginners guide, you need to know your way around!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
38 | No.38 Revision |
Update:Update: JollaC not working due to missing btrfs support no changes needed for upgrading to 2.0.0.x, MTP on Win10 broken (but that is not my fault!) Old stuff in question's history
If you are OK with that go ahead reading this guide.
Version: >1.1.9.x
This is no beginners guide, you need to know your way around!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
39 | No.39 Revision |
Update: For JollaC not working see https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android/?answer=140223#post-id-140223 things changed due to missing btrfs supportsupport and android mounting has changed a bit Old stuff in question's history
If you are OK with that becoming root and follow a step by step guide on your own account, go ahead reading this guide.
Version: >1.1.9.x
This is no beginners guide, you need to know your way around!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
40 | No.40 Revision |
Update: For JollaC see https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android/?answer=140223#post-id-140223 at the bottom, things changed due to missing btrfs support and android mounting has changed a bitbit too Old stuff in question's history
If you are OK with becoming root and follow a step by step guide on your own account, go ahead reading this guide.
Version: >1.1.9.x
This is no beginners guide, you need to know your way around!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
This has major differences with the original solution for Jolla1 https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android/?answer=140223#post-id-140223
New instructions for JollaC are as follows:
Note: some ext4 formatted uSD cards did not show up or rendered unmountable on JollaC, best fit is to format on device
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.ext4 /dev/mmcblk1p1
- format the cardmount /dev/mmcblk1p1 /media/sdcard
cd /media/sdcard
mkdir .android
- create folder called .android - this is hidden (starts with a dot) so it does not appear in directory listingsI like to create a file on the card to remind me what I have done: so create a file called Android.README
and fill it with:
Android files are contained in a hidden directory called .android
See https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android/
I also like to create a file with a unique name to let me easily check that Android apps are seeing the expected SD card. Something like: touch .android/GRC-128GB-SD.android
chown -R nemo:nemo .android/
chmod -R a=rwX .android/
cp -r -a -v /home/nemo/android_storage/* /media/sdcard/.android
cd ..
umount /dev/mmcblk1p1
lsblk -no UUID /dev/mmcblk1p1
. The UUID is a string like 12345678-9abc-def0-1234-56789abcdef0. This string must be used instead of the string UUID-HERE in the file below (two occurrences). You can also find the UUID in the folder the uSD is mounted to as it follows that scheme (in /media/sdcard/
the folder of the currently mounted uSD)./etc/systemd/system/home-nemo-android_storage.mount
and fill with:#
[Unit]
Description=SD card bind mount for Android
ConditionPathExists=/dev/mmcblk1p1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/home/nemo/android_storage/
ConditionPathIsMountPoint=/media/sdcard/UUID-HERE/
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1p1.service
BindsTo=mount-sd@mmcblk1p1.service
[Mount]
What=/media/sdcard/UUID-HERE/.android/
Where=/home/nemo/android_storage/
Type=none
Options=bind
[Install]
WantedBy=local-fs.target aliendalvik.service
Then run systemctl enable home-nemo-android_storage.mount
.
the mount file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint
If you put a different SD card in, the mount file will do nothing (because the UUID does not match). The original /home/nemo/android_storage will be used. You can repeat the steps from the top, of course, for the new card.
41 | No.41 Revision |
Update: For JollaC see at the bottom, things changed due to missing btrfs support and android mounting has changed a bit too Old stuff in question's history
If you are OK with becoming root and follow a step by step guide on your own account, go ahead reading this guide.
Version: >1.1.9.x
This is no beginners guide, you need to know your way around!
Understand what to do before you do!
What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup, read carefully and use at your own risk:
mount /dev/mmcblk1
)/media/
, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/mediadetailed cmds use at your own risk
first dosystemctl stop aliendalvik.service & systemctl stop aliendalvik.path
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.btrfs -f /dev/mmcblk1
mkfs.btrfs -O ^extref -f /dev/mmcblk1
- format the card (no need for partition) - for now extref (this extends num of hardlinks available) needs to be disabled, even on the devicemount -o subvolid=0 /dev/mmcblk1 /media/sdcard
cd /media/sdcard
btrfs subvolume create jolla
- create folder called jollabtrfs subvolume create android
- create folder called androidbtrfs subvolume list .
- returns an ID for each subvolumebtrfs subvolume set-default *ID for jolla* /media/sdcard/
- sets jolla to be mounted as defaultchown nemo:nemo jolla/
- add -R
if neededchmod 775 jolla/
chmod 777 android/
cp -r -a -v /data/media/* /media/sdcard/android
cd ..
umount /dev/mmcblk1
/etc/systemd/system/data-media.mount
and fill with:#
[Unit]
Description=SD card btrfs subvolume for Android
ConditionPathExists=/dev/mmcblk1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/data/media
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1.service
BindsTo=mount-sd@mmcblk1.service
[Mount]
What=/dev/mmcblk1
Where=/data/media
Options=subvol=android,compress,dirsync,noatime,users
[Install]
WantedBy=local-fs.target aliendalvik.service
Second, create /etc/systemd/system/aliendalvik.service.d/sdcard.conf file:
[Unit]
PartOf=data-media.mount
Then run systemctl enable data-media.mount
.
for the future we only need to load the service file to its place and enable it, if something changes I will update the code, upgrade went through without anything (see first line for updates) as the updates do not touch data-media.mount as of yet
This has major differences with the original solution for Jolla1 https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android/?answer=140223#post-id-140223
New instructions for JollaC are as follows:
Note: some ext4 formatted uSD cards did not show up or rendered unmountable on JollaC, best fit is to format on device
first dosystemctl stop aliendalvik.service
then follow this list
umount /dev/mmcblk1p1
- unmount the card might be another /dev or even more than onemkfs.ext4 /dev/mmcblk1p1
- format the cardmount /dev/mmcblk1p1 /media/sdcard
cd /media/sdcard
mkdir .android
- create folder called .android - this is hidden (starts with a dot) so it does not appear in directory listingsI like to create a file on the card to remind me what I have done: so create a file called Android.README
and fill it with:
Android files are contained in a hidden directory called .android
See https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android/
I also like to create a file with a unique name to let me easily check that Android apps are seeing the expected SD card. Something like: touch .android/GRC-128GB-SD.android
chown -R nemo:nemo .android/
chmod -R a=rwX .android/
cp -r -a -v /home/nemo/android_storage/* /media/sdcard/.android
cd ..
umount /dev/mmcblk1p1
lsblk -no UUID /dev/mmcblk1p1
. The UUID is a string like 12345678-9abc-def0-1234-56789abcdef0. This string must be used instead of the string UUID-HERE in the file below (two occurrences). You can also find the UUID in the folder the uSD is mounted to as it follows that scheme (in /media/sdcard/
the folder of the currently mounted uSD)./etc/systemd/system/home-nemo-android_storage.mount
and fill with:#
[Unit]
Description=SD card bind mount for Android
ConditionPathExists=/dev/mmcblk1p1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/home/nemo/android_storage/
ConditionPathIsMountPoint=/media/sdcard/UUID-HERE/
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1p1.service
BindsTo=mount-sd@mmcblk1p1.service
[Mount]
What=/media/sdcard/UUID-HERE/.android/
Where=/home/nemo/android_storage/
Type=none
Options=bind
[Install]
WantedBy=local-fs.target aliendalvik.service
Then run systemctl enable home-nemo-android_storage.mount
.
the mount file gets started every time aliendalvik is started and stops aliendalvik when it gets stopped, on boot it prevents aliendalvik from starting if it is not started yet but waits for the local-fs to be settled and actually having a mountpoint
If you put a different SD card in, the mount file will do nothing (because the UUID does not match). The original /home/nemo/android_storage will be used. You can repeat the steps from the top, of course, for the new card.