[How to] Format your uSD-Card to btrfs and share space with android
>
Code:
Version: 1.1.2.15 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:
---------- detailed cmds use at your own risk ## preparing the sdcard, should only be needed once! ## first do Code:
systemctl stop aliendalvik.service Code:
umount /dev/mmcblk1p1 #unmount the card might be another /dev or even more than one create /etc/systemd/system/androidsdcard.service and fill with: # Code:
[Unit] with Code:
systemctl 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* Alternatively you may have a .mount systemd instead (not both!!!) of a service First, create /etc/systemd/system/data-media.mount file: Code:
[Unit] Code:
[Unit] Code:
systemctl enable data-media.mount Code:
data Code:
opt/alien/system/script/alien.sh move the value [data] from section Code:
for d in bin sbin lib usr var etc tmp home vendor data; do Code:
for d in dev sys run; do Code:
for d in bin sbin lib usr var etc tmp home vendor; do PLEASE Check Original Postings original posting on tjc https://together.jolla.com/question/...-with-android/ the .mount solution by Vuubi is https://together.jolla.com/question/...#post-id-46430 |
Re: [How to] Format your uSD-Card to btrfs and share space with android
Thanks!
Advantages/disadvantages of using service vs .mount systemd ? |
Re: [How to] Format your uSD-Card to btrfs and share space with android
Apart of that the .mount is probably the way sane people would do, I like the Exec of the .service and I have no idea if the .mount actually does what I want (I did not test it) - wasn't me who got it working (I tried the .mount first but failed)
|
Re: [How to] Format your uSD-Card to btrfs and share space with android
Hey Leinad, (why did you delete your post? it is ok to ask questions :) )
I ran into problems with the-vault so I changed the order it gets mounted, but you would not need to backup your .vault to the sdcard as it is already there my device is on its way to helsinki atm (broken vibrator) but the way you have it atm seems wrong my last lines would show something like Code:
tmpfs 406M 0 406M 0% /mnt/asec and now that btrfs is mounted without hassle a big fat why pops into my head, why are you using ~slow sdcard instead of internal mmc for $HOME? All the files are now properly sourced from sdcard so anything big you can just put on the sdcard and have it mounted with the shipped-with script, if you are about backups... what you are doing is no backup, what you are doing is making a device swap easy but in terms of backup this is pretty painfully wrong Please enlighten me why you do what you do and why you are trying it this way, and I try to figure out how I may help you. please note that android userdata is /data/media and gets fused to ~/android_storage by aliendalvik.service if you want to have all android files off at the sdcard we need to find the proper way first |
Re: [How to] Format your uSD-Card to btrfs and share space with android
Hi, i deleted my post, because i wanted to investigate a little bit further before posting, but since you read it anyways, we can go on :)
there are 2 main reasosns, why i want the complete home-folder on the sdcard: - i really like the behaviour of the config, because every data you put/save/download on the device is automatically saved to the sdcard, you don't need to handle big files seperately - i have 2 devices, because the screen of the first one broke, but it's still completely usable, so now i use it as "outdoor-device", because it's already broken. with this config, i can switch between those 2 devices easily, when i put the sdcard into the other device, everything is there, because of the complete mounting of the home-folder. ... and i never noticed any limitation, regarding speed. until 1.0.7 settings app showed 2.7G on the device were in use, now it shows 4.7G are in use. i wonder, where those extra 2G come from... df- h looks like this: Code:
Filesystem Size Used Avail Use% Mounted on |
Re: [How to] Format your uSD-Card to btrfs and share space with android
how about a slightly different approach?
partition your sdcard as one btrfs (I am just irritated by the mmcblk1p1, if btrfs I would expect mmcblk1) and add subvolumes user, home and android - set the default volume to user and use the part about android userdata (.service or .mount) of my approach for android on sdcard. Please keep in mind that I do not have a device atm! So there might be some flaws in the part below. write your own .service or .mount to mount subvolume home to /home/nemo after /home got mounted but before aliendalvik and your df output should get cleaned up a bit (especially not fusing stuff in circles) meaning the last entries - this still breaks with the-vault as the first sdcard partition visible to it would be mounted to /home/nemo and you would copy .vault to backup.tar in the same directory. after tmpfs you should have then /dev/mmcblk1 mounted to /home/nemo /dev/mmcblk1 mounted to /media/sdcard/($UUID) /dev/mmcblk1 mounted to /data/media /dev/fuse mounted to /home/nemo/android_storage You fuse the android storage a second time to your sdcard? That does not copy anything, you need to mount something to /data/media before it gets fused by aliendalvik... I try to kept the system alone to have everything still working even if the µSD is missing. |
Re: [How to] Format your uSD-Card to btrfs and share space with android
Thanks, i got it working correct again :)
I missed the part with /data/media. It seems, the update copied / moved the android-data which was on my sdcard to /data/media, which was on the device. that's why so much less space was available on the device. btw: it did not copy all files, some are lost, bu i can live with that. now i moved all data from /data/media back to the sdcard and mounted /data/media to the android-folder on the sdcard. the p1 is there, because i'm using ext4, not btrfs. my df -h output now looks like this: Code:
/dev/mmcblk1p1 59G 4.2G 52G 8% /mnt/sd Code:
mount /dev/mmcblk1p1 /mnt/sd so, except this second fuse mount, everything seems to be ok again :) thanks. |
Re: [How to] Format your uSD-Card to btrfs and share space with android
Ah ok, that 2nd fuse is cause of the bind mount, it shows both endpoints.
|
All times are GMT. The time now is 15:42. |
vBulletin® Version 3.8.8