Reply
Thread Tools
norayr's Avatar
Posts: 148 | Thanked: 216 times | Joined on Jul 2010 @ Yerevan
#101
ok i have followed to what this shows and it works now. thank you.
 
Posts: 594 | Thanked: 1,094 times | Joined on Aug 2012 @ Rhine
#102
sorry guys, but why do you change system files? this is never a good idea...

instead, just use 2 services, one for the general mounting and one for dalvik. i'm using these 4 files atm:

lib/systemd/system/mount-custom.service
Code:
[Unit]
Description=Handle custom sdcard
Before=aliendalvik.service
Requires=local-fs.target
After=local-fs.target
RequiresMountsFor=/home

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/mount-sd.custom.sh add
ExecStop=/usr/sbin/mount-sd.custom.sh remove

[Install]
WantedBy=local-fs.target aliendalvik.service
usr/sbin/mount-sd.custom.sh
Code:
#!/bin/bash

ACTION=$1

if [ "$ACTION" = "add" ]; then
  mount /dev/mmcblk1p1 /mnt/sd
  mount --rbind /mnt/sd/.home /home/nemo
else
  umount /home/nemo
  umount /mnt/sd
fi
lib/systemd/system/mount-android.service
Code:
[Unit]
Description=mount android stuff to sdcard
After=alien-service-manager.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/mount-android.custom.sh add %i
ExecStop=/usr/sbin/mount-android.custom.sh remove %i

[Install]
WantedBy=graphical.target aliendalvik.service
usr/sbin/mount-android.custom.sh
Code:
#!/bin/bash

ACTION=$1

if [ "$ACTION" = "add" ]; then
  mount -o bind /mnt/sd/.android/media /data/media
  mount -o bind /mnt/sd/.android/data/com.whatsapp /data/data/com.whatsapp
  mount -o bind /mnt/sd/.home /opt/alien/home/nemo
else
  umount /opt/alien/home/nemo
  umount /data/data/com.whatsapp
  umount /data/media
fi
this works pretty good with 2.0, there's only 1 problem: dalvik mounting is lost when restarting dalvik without restarting the phone, but i'm sure, this can be solved somehow

edit: the line
mount -o bind /mnt/sd/.android/data/com.whatsapp /data/data
is just my personal use case, only interesting for people who want to store their WA credentials on sd card for use on multiple phones

Last edited by Leinad; 2015-10-23 at 22:14.
 

The Following User Says Thank You to Leinad For This Useful Post:
Posts: 83 | Thanked: 91 times | Joined on Nov 2015 @ NIgeria
#103
Hi Leinad, sorry for being so late here, but am in need of help how to format my 128 GB SDXC to follow up with the tutorial. I hit a wall everytime mmcblk1p1 is mentioned as the system refers to it as inexistant, yet it is very much needed here, have waited long enough to get my hands on this sdcard and now am stuck, really, anybody please
 
Posts: 83 | Thanked: 91 times | Joined on Nov 2015 @ NIgeria
#104
I am a bit disappointed in the community as it has been quite a while i asked for help on the topic of this thread, my limited knowledge of linux filesystems makes it virtually impossible for me to do it on my own. Noone cared to assist me in my request, been days and I have not gotten it done, tried all methods applicable for a beginner on this thread and none worked, Thorke's method twice has made my device unable to mount any given sdcard anymore, forcing me to reset it both times. I only wish someone that got theirs working for mounting both home and android partitions on the sdcard to shed some light on the steps I am to take.
Thanks for the thread, and maybe for him that will be kind enough to lend me that helping hand
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#105
Hi!

Sorry you feel neglected, maybe people have just not noticed your question.

I'd suggest you format your sd card as ext4, btrfs works of course too but might be an overkill (and regarding the fact that some people have all kinds of problems with their root as btrfs mit might be better for stability to have it as ext4fs...)

As for your partitions, if you don't have mmcblk1p1 what does your card show up as?
 
Posts: 83 | Thanked: 91 times | Joined on Nov 2015 @ NIgeria
#106
Originally Posted by juiceme View Post
Hi!

Sorry you feel neglected, maybe people have just not noticed your question.

I'd suggest you format your sd card as ext4, btrfs works of course too but might be an overkill (and regarding the fact that some people have all kinds of problems with their root as btrfs mit might be better for stability to have it as ext4fs...)

As for your partitions, if you don't have mmcblk1p1 what does your card show up as?
Thanks Juiceme had to guess you would be among those that will pay attention. my device has mmcblk0 with about 28 partitions all dedicated to the device storage, when I format and mount my 128 sdxc card /dev/mmcblk1 is mounted to /media/sdcard without any partiton so there is no file as /dev/mmcblk1p1 even when I browse to that location with a file browser the file doesn't exist.
I am ready to follow any steps you ask me to, ever since I got this sdcard, I am yet to enjoy my jolla as I used to
 

The Following User Says Thank You to dameceno For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#107
OK, so I think you have managed to partition the sdcard so that it is not recognized correctly.
What does the command "sfdisk --json /dev/mmcblk1" output?
(you need to run it as devel-su)
 
Posts: 83 | Thanked: 91 times | Joined on Nov 2015 @ NIgeria
#108
Originally Posted by juiceme View Post
OK, so I think you have managed to partition the sdcard so that it is not recognized correctly.
What does the command "sfdisk --json /dev/mmcblk1" output?
(you need to run it as devel-su)

Sorry for the delay, as I just reset my jolla for the second time in 2 days having some issues, here is output of the command



[root@Jolla nemo]# sfdisk /dev/mmcblk1
Checking that no-one is using this disk right now ...
BLKRRPART: Succès
OK

Disk /dev/mmcblk1: 3902128 cylinders, 4 heads, 16 sectors/t
rack
sfdisk: /dev/mmcblk1: unrecognized partition table type

Old situation:
sfdisk: No partitions found

Input in the following format; absent fields get a default
value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s
> <c,h,s>
Usually you only need to specify <start> and <size> (and pe
rhaps <type>).

/dev/mmcblk1p1 :

As I myself can notice there is an issue with the formating of sdcard. My jolla sees and accesses the sdcard and it gets mounted as sdcard through MTP.

here is the code I used to format the sdcard and mount it

mkfs.ext4 /dev/mmcblk1p1
mount -t ext4 /dev/mmcblk1p1 /media/sdcard/

I do not have access to linux os on pc, only windows, so formating the sdcard through gparted or the likes of it is really an issue for me at the moment, how do you advise I proceed?

Last edited by dameceno; 2016-02-19 at 14:19.
 

The Following User Says Thank You to dameceno For This Useful Post:
Posts: 83 | Thanked: 91 times | Joined on Nov 2015 @ NIgeria
#109
@ Juiceme I might find a way to use gpart on boot on my pc, how do I format the sdcard properly for the tutorial and the steps to take so as to have it optimized for the procedures, I do not intend resetting my device anymore
 

The Following User Says Thank You to dameceno For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#110
Originally Posted by dameceno View Post
[root@Jolla nemo]# sfdisk /dev/mmcblk1
Checking that no-one is using this disk right now ...
BLKRRPART: Succès
OK

Disk /dev/mmcblk1: 3902128 cylinders, 4 heads, 16 sectors/t
rack
sfdisk: /dev/mmcblk1: unrecognized partition table type

Old situation:
sfdisk: No partitions found
From above I can see there's indeed something funny with partitioning; hence I asked what command "sfdisk --json /devmmcblk1" shows. (you forgot the --json part...)
That command will tell what is the type of partition it does not recognize....
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 19:58.