Unable to write to SD Card in Android on Chromebook (ARC)
Reported by
jason.so...@gmail.com,
Jan 9 2018
|
|||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
Platform: 10032.75.0 (Official Build) stable-channel veyron_minnie
Steps to reproduce the problem:
Scenario 1
1. Run attached test case app
2. Choose "Save the file (Directory)" from the menu in the upper right hand corner
3. Choose the SD Card directory and hit Select
alternatively
Scenario 2
1. Run attached test case app
2. Choose "Save the file (File)" from the menu in the upper right hand corner
3. Choose the SD Card directory and hit Save
What is the expected behavior?
The user can save a file to the SD card
What went wrong?
Both scenarios work fine on an Android device with an SD card (at least with the emulator). On a Chromebook with ARC, you can perform both scenarios to locations other than the SD Card. For the SD Card, Scenario 1 will let you select the location but the save of the file fails with an exception like this :
W/DocumentsContract: Failed to create document
java.lang.IllegalStateException: Failed to touch /var/run/arc/media/removable/UNTITLED/20180103-131600-Started.log.txt: java.io.IOException: Permission denied
at android.os.Parcel.readException(Parcel.java:1692)
For the SD Card on a Chromebook, Scenario 2 will not even let you select the SD Card as the path (you can see it however, just not choose it). Reading files seems to work fine, but you cannot write them in Android/ARC on a Chromebook.
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 63.0.3239.116 Channel: stable
OS Version: 63.0.3239.116 (Official Build) (32-bit)
Flash Version:
Related to cr bug : 660189
The test case app is a modified Storage Client Framework example and uses the ACTION_OPEN_DOCUMENT_TREE and ACTION_CREATE_DOCUMENT intents
I was able to write to the SD Card from ChromeOS itself, so the card isn't read only. The SD card is formatted by ChromeOS, so it should be Fat32.
I see some crbugs (789045) mention using the removable storage API (https://developer.android.com/training/articles/scoped-directory-access.html#removable), but I need to support pre 7.0 devices (non ARC obviously).
Should I be trying something other than Storage Access Framework to write to an SD Card on Android on a Chromebook?
Version 63.0.3239.116 (Official Build) (32-bit)
Platform
10032.75.0 (Official Build) stable-channel veyron_minnie
Firmware
Google_Veyron_Minnie.6588.237.0
Channel
Currently on stable
ARC Version
4505339
Android version 7.1.1
Security patch level
November 1, 2017
Kernel version
3.1.14.0
chrome-bot@cros-beefy331-c2 #1
Mon Dec 18 20:22:56 PST 2017
Build number
R63-10032 75.0 release-keys
,
Jan 10 2018
,
Jan 11 2018
Thank you for filing this detailed report. I guess the scenario #1 can be fixed by changing the mount option in the container to make it not read-only. I think it's OK in terms of security, but let me consult someone for double check. The scenario #2 looks more complicated, I'll take a closer look later.
,
Jan 16 2018
Any updates on this yet?
,
Feb 6 2018
Any updates?
,
Apr 3 2018
,
Apr 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/3030923c51e087052549078b4ad40df3f6be3734 commit 3030923c51e087052549078b4ad40df3f6be3734 Author: Ryo Hashimoto <hashimoto@google.com> Date: Mon Apr 16 16:20:21 2018 arc-removable-media: Make /run/arc/media/removable writable BUG= chromium:800362 TEST=test_that cheets_RemovableMedia Change-Id: I300e92fa0ba324fa832ca985ef62f3ffccff2050 Reviewed-on: https://chromium-review.googlesource.com/1006714 Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org> Tested-by: Ryo Hashimoto <hashimoto@chromium.org> Reviewed-by: Shuhei Takahashi <nya@chromium.org> [modify] https://crrev.com/3030923c51e087052549078b4ad40df3f6be3734/arc/removable-media/arc-removable-media.conf
,
Apr 16 2018
Is it possible to get this moved in an earlier release?
,
Apr 20 2018
We are hoping in adding this functionality in our app this summer. It would help us considerably if we could get this moved to an earlier release. Looking at the change, it's a simple one line fix of changing permissions when mounting removeable media.
,
Apr 24 2018
Re #8 You can try out canary channel / dev channel and see if this feature works for you. M68 is going to be stable this summer.
,
Apr 27 2018
,
May 23 2018
Is it possible to get this moved to M67
,
May 24 2018
#12, The first step is to verify this actually works on M-68. Since we're already on second beta on M67 it's relatively risky to chnage M-67 at this point.
,
May 24 2018
#13, We tried it on M-68 and it does work. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by maxkir...@google.com
, Jan 9 2018