We have moved to a new Sailfish OS Forum. Please start new discussions there.
6

cannot write to android storage

asked 2019-02-23 00:29:55 +0200

Jolla fan 007 gravatar image

updated 2019-02-24 15:01:07 +0200

olf gravatar image

Hello Jolla people,

I have Sailfish 3.0.1.14 running on Xperia XA2 -Dual SIM. I would like to import some data from my android applications. And therefore I need copy files to android storage. Problem is this is not possible, I cannot copy files to android storage.

Do you know about some way how to do it ?

Thank you in advance for your answer

edit retag flag offensive close delete

Comments

Sorry if I'm missing something - why can't you copy to Android storage, (file manager, /home/nemo/android_storage)?

Levone1 ( 2019-02-23 02:58:00 +0200 )edit
1

Same problem, when I copy the whatsapp history to android storage, AD crashed

TMavica ( 2019-02-23 15:36:32 +0200 )edit

Same problem here, I tried using three methods to copy data to android_storage on Xperia XA2 Sailfish beta -- all failed:

  1. Remote SSH to nemo and use cp command to copy to android_storage. This failed and I needed to re-install Android Support.
  2. Using cargodock to copy from either the SD card or from a local folder (Downloads etc) to android_storage. As above, this failed and I needed to re-install Android Support.
  3. Using an Android file manager app such as File Expert to copy from a local folder (nemo/Downloads) to android_storage. As above, again this failed.

Don't think I can use this version of the OS until I can copy files to android_storage... :(

caa ( 2019-02-23 21:59:05 +0200 )edit
1

When I tried to copy a file I usually got message: "Cannot create /home/nemo/android_storage/file_name.xml" Or when I want to switch android storage in file manager I got: "Android Storage not found" :(

Jolla fan 007 ( 2019-02-23 22:22:20 +0200 )edit

same here, it seems any attempt to write to android_storage triggers an error resultng in unmounting of the android_storage...only reappears after a restart of android system

pelupes ( 2019-02-28 14:00:50 +0200 )edit

4 Answers

Sort by » oldest newest most voted
2

answered 2019-02-24 13:40:31 +0200

TheOne gravatar image

I have the same problem. But I found a workaround that was allowing me to copy my Threema-Backup from Jolla phone to XA2 using the Terminal:

  1. Place your FILE in a not-Android folder on your XA2
  2. Stop Android on the XA2
  3. Copy via Terminal as root the FILE into android_storage
  4. Start Android on the XA2
  5. Now you can FILE in android_storage (via Terminal or File Browser) as you want

Before I tried to change the permissions (chmod, chown) of the android_storage folder on the XA2 so that they are as on the Jolla phone. But I am not sure if this affected the above described way to copy.

edit flag offensive delete publish link more

Comments

Thanks for hint. It worked with one difference. Android support has to run, otherwise android storage is not accessible. So my manual would be:

  1. Place your file to XA2 space
  2. Go to developer tools
  3. Enable developer mode and remote connection (define password, and usb ip)
  4. stop android support (I had to restart, otherwise it didn't work for me)
  5. start android support
  6. go terminal and log in via command: ssh nemo@192.168.2.15
  7. copy file to you desired folder in /home/nemo/android_storage
Jolla fan 007 ( 2019-02-24 23:13:22 +0200 )edit
1

answered 2019-02-23 01:33:33 +0200

Tonno gravatar image

updated 2019-02-23 01:36:07 +0200

Try Nitroshare from fdroid. You can share your data over WIFI directly from desktop or android into your alien dalvik. I don't know if this is a bug or a feature... But remember that alien dalvik 8.1.0 is still beta.

edit flag offensive delete publish link more

Comments

On the same principle I used SSHelper to scp into the android dirs..this seems indeed easiest way to do it

pelupes ( 2019-03-01 14:08:49 +0200 )edit
1

answered 2019-02-25 13:24:18 +0200

Alex gravatar image

updated 2019-02-25 13:41:14 +0200

Actually this is a duplicate of this question: https://together.jolla.com/question/198435/bug-transfer-files-to-android-storage-folder-ad-crashed/

Workaround:

Another workaround with that I managed to copy my WhatsApp backup from my Jolla1 to the Xperia XA2 is:

  1. Copy the files to your internal device memory
  2. Open the terminal (developer mode needs to be activated) and copy/move your files as root to the corresponding app folder inside /home/.android/data/media/0/ (instead of /home/nemo/android_storage)
  3. Adapt the permissions of the moved folders so that the Android apps are able to read and write to/from the folders: Change the user and group of all folders to media_rw using e.g. the command chown -c media_rw:media_rw * inside the corresponding app folder
edit flag offensive delete publish link more
1

answered 2019-05-26 16:36:07 +0200

DragonLich gravatar image

I had similar problem with data synchronization between native Syncthing and Android application. I'm posting here my solution because it could be interesting for your use-case. I achieve that by using:

bindfs --map=100000/1023:1023/100000:@100000/@1023:@1023/@100000 ~/syncthing ~/android_storage/syncthing

For the explanation bindfs mount will map users and groups. So user and group nemo (1023) will be mounted as user and group media_rw (100000) on the ~/android_storage/syncthing folder side. The media_rw is android storage user and this mapping will work even for written file. So this way you are able to make nemo folder accessible for write for android applications.

The only drawback is that I wasn't able to create a working systemd service for this solution. Do not know why, probably because of bad mounting order. Could someone here help me with this? It is annoying to run the script manually every time I reboot my phone.

Thanks!

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2019-02-23 00:29:55 +0200

Seen: 1,419 times

Last updated: May 26 '19