Author Topic: Jolla & SD card  (Read 11117 times)

0 Members and 1 Guest are viewing this topic.

Offline teunwinters

  • Newbie
  • *
  • Posts: 1
    • View Profile
  • Phone: nokia N9
Re: Jolla & SD card
« Reply #15 on: December 17, 2013, 03:31:15 PM »
so there is a native file manager.. install via terminal on your jolla using:

pkcon install jolla-fileman

with that go to path mentioned above and there is your sd card.. contents

/run/user/100000/media/sdcard

now to have it show up on the windows pc as a seperate drive
« Last Edit: December 17, 2013, 03:37:47 PM by teunwinters »

Offline der_pepe

  • Newbie
  • *
  • Posts: 1
    • View Profile
  • Phone: Nokia N900 , N9, Jolla
Re: Jolla & SD card
« Reply #16 on: December 17, 2013, 03:41:20 PM »
 btrfs is working fine with 64GB cards
Code: [Select]
/dev/mmcblk1p1         60G  184K   56G   1% /run/user/100000/media/sdcard


yet there's a bug in the startup mount script, that forces some specific parameters for FAT/FAT32/NTFS partitions that doesn't work with btrfs ones.
There's already a fix for this at the nemomobile repository, basically just replace the file /usr/sbin/mount-sd.sh with the following:

Code: [Select]
#!/bin/bash

SDCARD=/dev/sdcard
DEF_UID=$(grep "^UID_MIN" /etc/login.defs |  tr -s " " | cut -d " " -f2)
DEF_GID=$(grep "^GID_MIN" /etc/login.defs |  tr -s " " | cut -d " " -f2)
DEVICEUSER=$(getent passwd $DEF_UID | sed 's/:.*//')
MNT=/run/user/$DEF_UID/media/sdcard

if [ "$ACTION" = "add" ]; then
if [ -b /dev/mmcblk1p1 ]; then
ln -sf /dev/mmcblk1p1 $SDCARD
elif [ -b /dev/mmcblk1 ]; then
ln -sf /dev/mmcblk1 $SDCARD
else
exit $?
fi
su $DEVICEUSER -c "mkdir -p $MNT"
case "${ID_FS_TYPE}" in
vfat|ntfs|exfat)
mount $SDCARD $MNT -o uid=$DEF_UID,gid=$DEF_GID
;;
*)
mount $SDCARD $MNT
chown $DEVICEUSER: $MNT
;;
esac
else
umount $SDCARD

if [ $? = 0 ]; then
rm -f $SDCARD
else
umount -l $MNT
rm -f $SDCARD
fi
fi

After rebooting the device, you can find the card mounted correctly:
Code: [Select]
/dev/mmcblk1p1 on /run/user/100000/media/sdcard type btrfs (rw,relatime,ssd,noacl,space_cache)

Offline Whippler

  • Full Member
  • ***
  • Posts: 213
    • View Profile
  • Phone: Jolla
Re: Jolla & SD card
« Reply #17 on: December 18, 2013, 09:07:50 AM »
Ah, ran into that little program i used to format my SDcards to fat32, http://www.realmodscene.com/index.php?/topic/323-gui-format-fat32-drive-formatter/
Jolla
Nokia 6630 2004/12->2008/8 and 5310 2008/8 ->2010/12
HTC Desire Z 2010/12 -> 2013/12

Offline Igor80

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • Phone: Jolla
Re: Jolla & SD card
« Reply #18 on: December 23, 2013, 02:39:42 PM »
How to use SD card from Android application? I would like to use FBreader but it does not see SD card.
6310i->E61->E71->N900->N9->Jolla

Offline Whippler

  • Full Member
  • ***
  • Posts: 213
    • View Profile
  • Phone: Jolla
Re: Jolla & SD card
« Reply #19 on: December 23, 2013, 03:22:23 PM »
you can't access the sdcard from an android app
Jolla
Nokia 6630 2004/12->2008/8 and 5310 2008/8 ->2010/12
HTC Desire Z 2010/12 -> 2013/12

Offline robert.meier.94009

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Jolla & SD card
« Reply #20 on: December 23, 2013, 09:28:39 PM »
I just bricked my jolla by trying editing the /etc/fstab
is there any solution in how to unlock this jolla? maby some return to system defaults? or developer access?

never mind, fixed with support
« Last Edit: December 24, 2013, 09:16:36 AM by robert.meier.94009 »

Offline gcobb

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Jolla & SD card
« Reply #21 on: December 28, 2013, 11:26:48 AM »
you can't access the sdcard from an android app

This appears to be true.  I even tried bind-mounting the SD card into a directory in /data/sdcard/ -- Android apps could see the files on the card but they couldn't read or write any of them.  It wasn't a simple protections issue -- something in the Android environment seemed to be preventing the files being opened.

Any ideas why?  I realise Android apps are less "trusted" but the files on my SD card are typically just media files.

Anyone know of any configuration options for the Android environment?

Graham

Offline Igor80

  • Newbie
  • *
  • Posts: 9
    • View Profile
  • Phone: Jolla
Re: Jolla & SD card
« Reply #22 on: December 28, 2013, 12:25:09 PM »
This appears to be true.  I even tried bind-mounting the SD card into a directory in /data/sdcard/ -- Android apps could see the files on the card but they couldn't read or write any of them.  It wasn't a simple protections issue -- something in the Android environment seemed to be preventing the files being opened.

Any ideas why?  I realise Android apps are less "trusted" but the files on my SD card are typically just media files.

Anyone know of any configuration options for the Android environment?

Graham
Try to use chown after bind-mounting:
Code: [Select]
chown -R 10015:sdcard_rw /data/sdcard/<android_folder>
It helps me. FBReader can open books from sd card. But if Android writes files then you can lost data from sd card after reboot because  system does not unmount card from /data/sdcard.
6310i->E61->E71->N900->N9->Jolla

Offline gcobb

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Jolla & SD card
« Reply #23 on: December 28, 2013, 04:34:03 PM »
Try to use chown after bind-mounting:

Actually, that turned out not to be necessary.  After rebooting and trying again, it was working.

This requires developer mode.  Get root access then...

Code: [Select]
mkdir /data/sdcard/My\ real\ sdcard/
mount -o bind /run/user/100000/media/sdcard /data/sdcard/My\ real\ sdcard/


After this, Android apps could read my sdcard as "/sdcard/My real sdcard".  I tried a couple of media players and they worked.

You probably would need to change permissions if you wanted the apps to be able to create files.

Offline Mike BFD

  • Newbie
  • *
  • Posts: 8
  • A BFD guy, not a geek ;)
    • View Profile
Re: Jolla & SD card
« Reply #24 on: December 28, 2013, 05:56:16 PM »
Guys, I need help.
I bought and inserted a mSDHS card (32Gb); no "popup" notification, nothing. Tried to record some content to the card (on a PC), then inserted again - well, the file browser sees the file recorded but "so what??" :) "Tap-and-hold" offers the only option, delete the file. But how could I _use_ it?? And is it possible to move some stuff from phone memory (like mp3 songs) to the card? Does anybody have any further experience?..
Thanx in advance ;)
Jolla @Sailfish + Motorola Razr Max HD @Android (but who knows?..)
Languages: English and Czech are just OK, a bit worse with Finnish. Also some Russian (in urgent cases and preferably not on complicated topics)

Offline mariusmssj

  • Newbie
  • *
  • Posts: 2
    • View Profile
  • Phone: Nokia N9
Re: Jolla & SD card
« Reply #25 on: December 28, 2013, 06:29:00 PM »
I've asked for SD card file transfer via USB >>>here<<<

Offline Whippler

  • Full Member
  • ***
  • Posts: 213
    • View Profile
  • Phone: Jolla
Re: Jolla & SD card
« Reply #26 on: December 28, 2013, 06:30:41 PM »
Gallery app should see image, and video files automagically, and media app should see your music from it automagically.
Jolla
Nokia 6630 2004/12->2008/8 and 5310 2008/8 ->2010/12
HTC Desire Z 2010/12 -> 2013/12

Offline Mike BFD

  • Newbie
  • *
  • Posts: 8
  • A BFD guy, not a geek ;)
    • View Profile
Re: Jolla & SD card
« Reply #27 on: December 28, 2013, 07:02:44 PM »
Gallery app should see image, and video files automagically, and media app should see your music from it automagically.
It all doesn't ;(
Jolla @Sailfish + Motorola Razr Max HD @Android (but who knows?..)
Languages: English and Czech are just OK, a bit worse with Finnish. Also some Russian (in urgent cases and preferably not on complicated topics)

Offline Whippler

  • Full Member
  • ***
  • Posts: 213
    • View Profile
  • Phone: Jolla
Re: Jolla & SD card
« Reply #28 on: December 28, 2013, 07:12:36 PM »
seems like music went missing for me, pop the back of, and re insert the memory card (no need to turn of the phone) and should appear in a minute or so.

about a day ago i had some images on sdcard and the gallery app would crash right away when trying to open it. removed the files and the app works again, strange, wonder what image caused that.

What format you have the card in? fat32?
Jolla
Nokia 6630 2004/12->2008/8 and 5310 2008/8 ->2010/12
HTC Desire Z 2010/12 -> 2013/12

Offline Mike BFD

  • Newbie
  • *
  • Posts: 8
  • A BFD guy, not a geek ;)
    • View Profile
Re: Jolla & SD card
« Reply #29 on: December 28, 2013, 07:15:38 PM »
Tried both fat32 and ext4, no effect.

However, I still wander if it's possible to use the card as an "usable storage" (not just as a way to bring media from a PC to the phone)!
Jolla @Sailfish + Motorola Razr Max HD @Android (but who knows?..)
Languages: English and Czech are just OK, a bit worse with Finnish. Also some Russian (in urgent cases and preferably not on complicated topics)