Ask / Submit
8

SD-card access by android apps [duplicate]

asked 2014-04-23 15:50:49 +0200

RobNas gravatar image

updated 2014-11-26 14:18:11 +0200

jiit gravatar image

I'd like to see Android apps have access to my SD-card. I want to use Sygic (world) and save my maps to the external SD-card, because of >10GB size. Now it's not possible. Or (even better: tempt Sygic to make an app for Sailfish)

edit retag flag offensive reopen delete

The question has been closed for the following reason "duplicate question" by ortylp
close date 2014-04-25 23:02:39.589247

Comments

Same question as here mostly :) https://together.jolla.com/question/5755/how-to-let-android-apps-to-write-to-real-sdcard/

But i agree completely!

electristan ( 2014-04-23 16:28:57 +0200 )edit
1

in my opinion Sygic MUST NOT get ANY support from Jolla community after the N900 total fiasco.

ortylp ( 2014-04-25 23:04:03 +0200 )edit

@ortylp: That's not what I asked, I asked for Sygic supporting Sailfish, not the other way around. Which fiasco, by the way? Sygic still works on the N900, only maps can't be updated, unfortunately.

RobNas ( 2014-04-26 14:26:31 +0200 )edit
1

@RobNas No map updates, no bugfixes to their software. No bugfix releases for bugs that have been internally fixed. Writing "no support" I meant no more money for this company!

Go the FOSS way and install OSMAND or pay a company that cares about OSM community and use products of Skobbler. I would be for porting of OSMAND to Jolla or convince Skobbler (now Telenav) to support Jolla natively.

ortylp ( 2014-04-27 12:20:50 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2014-04-24 21:04:54 +0200

chemist gravatar image

updated 2014-04-26 18:25:58 +0200

What I did to share the space of my uSD between nemo and android without getting duplicates with bind-mounts or any other hickup:

  1. format the whole usdcard (mmcblk1 not mmcblk1p1) to btrfs
  2. mount that volume (=0)
  3. create two subvolumes > jolla and android
  4. set the default volume to jolla (the default is what gets mounted when something calls mount /dev/mmcblk1)
  5. stop alien-dalvik and copy everything form /data/sdcard to the new subvolume android (don't move the files, this way you have all basics alien-dalvik needs even after pulling the uSD)
  6. add mounting of that subvolume (android) to the sdcard-mounting-script provided by jolla, to be precise, in the section where it mounts non-fat volumes I added the android volume to be mounted to /data/sdcard
  7. reboot and wait for the device to settle, as soon as your jolla volume is mounted in /media/, you should see /dev/mmcblk1 being mounted to both /media/sdcard/#UUID and /data/sdcard

I 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 [1] or in the man-pages of the required tools

[1] https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android

edit flag offensive delete publish link more

Comments

I'd like to try, I'm very lazy :D :D so if you would be so kind, could you mail me the code to do this? robnas @ gmail.com. I will do it on my own responsibility.

RobNas ( 2014-04-24 21:46:21 +0200 )edit

@RobNas you want the precise commands?

chemist ( 2014-04-25 14:20:27 +0200 )edit

Yes, I think this should be it. I'm copying my contents of SD to PC as backup, and try the code. Thanks in advance, I will let you know if it worked.

EDIT: I can't find the btrfs mount part... I've added "mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/" right after: "*) mount ${DEVNAME} $MNT/${UUID} -o $MOUNT_OPTS || /bin/rmdir $MNT/${UUID}"

Rebooted phone, nothing. No sd-card available, so this isn't working.

RobNas ( 2014-04-26 12:29:56 +0200 )edit
1

@RobNas there is no specific btrfs case but *) is everything else... does it look like this?

*) 
  mount ${DEVNAME} $MNT/${UUID} -o $MOUNT_OPTS || /bin/rmdir $MNT/${UUID}
  mount -o subvol=android,compress,$MOUNT_OPTS $(DEVNAME) /data/sdcard/
  ;;

if your /media/sdcard/$(UUID) does not get mounted after editing the mount-sd.sh you messed up the file - see with mount or df -h what is mounted where, please.

chemist ( 2014-04-26 18:17:05 +0200 )edit

I've completely reinstalled the phone. I wanted to start fresh, so resetted it to factory and installed all updates (1.0.5.19). Because the card was already formatted btrfs (checked this with mount cmd), I've started again from: "cd /media/sdcard", etc. After editing the mount-sd.sh with wordpad (copied to home, edited on pc, copied back to usr/sbin/) and restarting the device, it is in a bootloop... Because there was space within wordpad before "mount ${DEVNAME}etc...", I've copied the line from the start to just behind "mount", to be sure this wouldn't cause any trouble. I hope I can save the phone...d#mned...

EDIT: saved the phone, I'm back @ 1.0.5.19 now. What's the best way to edit mount-sd.sh? I've tried wordpad now, but maybe that's causing problems...

RobNas ( 2014-04-27 01:54:13 +0200 )edit

Question tools

Follow
2 followers

Stats

Asked: 2014-04-23 15:50:49 +0200

Seen: 2,876 times

Last updated: Apr 26 '14