2017년 3월 18일 토요일

TaifunFile1 Write to External


VALID STORAGE LOCATIONS:



Writable External Locations:

Must manually create directory with actual name of your app.

E.G. appinventor.ai_MxyzptlkHavok.fileTest
Final writable locations from testing results

CONCLUSION:
Need a way to MKDIR() or MKDIRS() [JAVA]
an activity starter perhaps [com.android.????]
end users who have to: 1. manually create directories, or, 2. rely on external apps, is inconvenient

if an app were able to be activityStarted with "appName", and in return, create only those directories; then, return those directory paths...

Notes: 
your paths may differ from mine, as well as your results...
but in my opinion, an app can only write to its' own folder in one of these three locations:
1. "android/data"
2. "android/obb"
3. "ext root"

sidenote:
would it be possible to get your zip extension for testing?

--
using my file extension, the directory should be created automatically in case it does not exist
that's interesting!

are you able to use the Copy block to copy a file to directory file:///storage/ext_sd/Android/obb/appinventor.ai_MxyzptlkHavok.fileTest/ on the external sdcard and at the same time creating that directory in case it does not exist? 

As you probably have seen, I'm not able to test this, because I do not have such device and for some the message "permission denied" occurred while copying to the external sdcard  

which device and Android version did you use for your tests?

btw. my zip extension is now available to download here https://puravidaapps.com/zip.php

--
TEST TRIAL 2

Test bed(s):


DEVICE 1
device: rooted HTC 510 desire
android version: 4.4.2
htc sense version: 6.0
htc sdk api level: 6.25
kernel version: 3.4.0
shinr...@shinru2004-MS-7693 #1
SMP PREEMPT
baseband version: 1.101.1372.19.0725_10.22.4205.00L_F
build number: NonSense Beta 1.01

ext_sd: Samsung 128 EVO+ Micro SD XC I
notes on test bed: non-stock device setup, custom rom, custom kernal


DEVICE 2
device: stock HTC 510 desire
android version: 4.4.2
htc sense version: 6.0
software number: 1.11.506.8
htc adk api level: 6.25
kernel version: 3.4.0-gb43dcd3
a...@AABM #1
SMP PREEMPT
baseband version: 1.101.1372.19.0921_10.29.4205.00L_F
build number: 1.11.506.8 CL374695 release-keys

ext_sd: SanDisk Ultra Plus 16GB MicroSD HC I           
Test 1: directory present/not present test
file to copy: test.jpg
dir to create: appinventor.ai_MxyzptlkHavok.fileTest/
locations to create dir in: 
storage/ext_sd/Android/data/
storage/ext_sd/Android/obb/
storage/ext_sd/
Syntax used:
results: 
1. fails with ENOENT if appinventor.ai_MxyzptlkHavok.fileTest/ directory does not exist
2. will not create dir, but will write to if present
Test 2: new directory if directory present test
file to copy: test.jpg
new dir to make: newTest/

locations to write to: 
storage/ext_sd/Android/data/appinventor.ai_MxyzptlkHavok.fileTest/
storage/ext_sd/Android/obb/appinventor.ai_MxyzptlkHavok.fileTest/
storage/ext_sd/appinventor.ai_MxyzptlkHavok.fileTest/

EACCES triggered if directory is not named in accordance to app (this is for trying to write to pre-existing directories).

Conclusions: 
As previously reached in trial 1, an app can only write to its own directory but can't create its own directory
and inline directories will only be created if an app is writing to its own directory. 
However, this test is for writing to external sd cards only, and should not be deemed conclusive for work on an internal structure.

--
thank you very much for your tests!

--

댓글 없음:

댓글 쓰기