4.4 Real External SDCard in Emulator - android

If I'm not wrong android no more allows 3rd party apps to write inside real external SD card since Honeycomb(except own data folder provided by OS) ? But no hardware manufacture followed that in their devices. But now Samsung and LG seems to be using it from 4.4 (API 19) and because of that I'm receiving bug reports of permission denied. Or maybe Im wrong about honeycomb.
Since I need to test my app, I'm unable to create an emulator using real external SD Card. I mean the SD Card I created is emulated by device. Which android allows for all apps. Is there any way I can create something that emulator treat it as real external card ?

Related

Can't find usb devices using Android app

I'm going to run Android app on Chromebook directly to access connected usb devices, not from ARC Welder.
I want to use ES File Explorer to access my usb devices.
Plugin a USB OTG wire and run ES File Explorer on normal Android devices, it can detect connected USB devices as expected.
However, if I run the same ES File Explorer Android app on Chromebook, it can not detect connected USB devices. Looks in this case, Chromebook intercepts USB low level data packages. Because I can use Chromebook built-in File Explorer(which is not an Android app) to access connected USB devices.
By the way, I'm using USB storage to do the test.
So my question is, how can an Android app access connected USB devices on Chromebook? Is current behavior by design? Is there any plan to add USB support for Android apps in the future?
Based on the following Chromium bug report:
https://bugs.chromium.org/p/chromium/issues/detail?id=660189
Summary:
It appears that access to external/USB storage (read and write) for container based Android Apps on ChromeOS (container ARC) is a known issue, appears to be on the roadmap, but behind other priorities.
Update 2017-11-30:
The Chromium team has implemented USB On-The-Go access for the SD card on ChromeOS 62 (Chromium M-61?) or higher. What this means is that developers who expect their apps to work with the SD card as if it was under the battery in their phone will be disappointed. This is due to the fact that a 'hot swappable' SD card such as those found on a Chromebook isn't considered Adoptable Storage by the Android Framework.
Additionally if you want to use the MediaStore APIs to access it, you are still out of luck as the Android Framework does not support access to removable hardware. The Chromium team is aware and considering options:
Old issue ticket: https://bugs.chromium.org/p/chromium/issues/detail?id=789045&desc=3
So what to do?
Use: Android Storage Access Framework
See this Commonware's post on Removable Storage for further details.
Update 2019-09-04
ChromeOS 72 onward is supporting Android's MediaStore API, and direct '/storage' support for accessing content on SD card.
See: https://bugs.chromium.org/p/chromium/issues/detail?id=789045#c98
Issue ticket for supporting Android's Adoptable Storage:
https://bugs.chromium.org/p/chromium/issues/detail?id=917451

Android app on Chromebook to access USB devices?

I am taking an Android app and making it run on Chrome using the ARC Welder. For best results we're only targeting the Chromebook / Chrome OS, not Windows or OSX.
The app is running with some minor glitches, but I need to enumerate photos on an inserted SD card.
The problem is that the /mnt folder accessible within Android Runtime only contains the virual sdcard folder, and does not reflect the real SD Card or USB Flash Drives attached to the Chromebook.
How can these photos be automatically loaded from the SD Card into the Android App in the Android Runtime.
I know that I could use a CRX (Chrome Extension) to read the SD Card photos, but how could they be passed to the Android app? And can this be in the same CRX as the ARC Welder creates or must it be a separate CRX?
I found a workaround which is to use the Additional Metadata section and add
{ "enableExternalDirectory": true }.
When the app first launches, it prompts the user for the folder. One must select the SD card.
Then my app works as expected, as the 'emulated sd card' becomes the 'real sd card'. This is not the most user-friendly approach, but it works.
I'd still prefer if we could load the files from a CRX into the Android Runtime...

External Storage Write Access for Kitkat devices

The Problem
My app supports 4.0+ and it is all about file handling. It works perfectly in all Android versions except Kitkat.
In Kitkat, my app is unable to modify or write any files in SD card. But I see various apps like,
1) Solid Explorer
2) ES File Explorer
3) CamScanner
4) UC Browser
All of these apps give write access to SD card even in Kitkat devices without even root access.
Requirements
I need to have a fully functional way to create or modify files stored in the SD card in Kitkat. I seems to have troubles a lot of users and a proper solution will help many developers like me.
Yeah I came across that problem as well. After a lot of reading across the web the solution is to write only in your app folder (Ex: /sdcard/Android/data/packagename).
About those apps, on my s4 mini, es explorer cannot delete from external sdcard, so I think is different from device to device.
If the devices is routed change the permissions to gain write access anywhere on the sdcard.

App/Utility for viewing files on Android phone memory?

Is there some utility available that will display all the files on an android phone, including local memory and sd card, even if the phone is not rooted?
It could be either some Android app or some PC-based utility that would display the files on a phone connected via USB.
Also, for those of you who develop on android phones, do you do your development and testing on rooted phones?
There's the Android Device Monitor that ships with the SDK. It's integrated into Android Studio and Eclipse.
Let's you inspect the file system and a lot more. I've only ever used it with simulators. Non rooted phones won't display their /data/data directory, from the ones I have. You'd have to root them for that, I believe.

Android Internal Storage advice

I am developing an app for University.
I have bought a Nexus 7 google tablet for the task (I wanted a tablet anyway :P)
I need to convert data I record on the app onto a text file that can be moved onto a PC.. Now, from what I can tell android has high security on 'Internal Storage' which is the only type of storage the Nexus 7 has, and I cant seem to be able to write a text file to a folder or anything.. and I can't even find the app's data folder on the windows explorer so I presume its hidden..
It appears its possible with 'External Storage' such as an SD card but the Nexus 7 does not have an SD card slot..
what should I do? Is it possible to be done on the Nexus 7?
All Android devices have "external storage" regardless whether or not they have SD card support (http://developer.android.com/guide/topics/data/data-storage.html#filesExternal). The naming is unfortunately misleading.
If you save your data to app's default external storage, you can access them on a PC in /Android/Data/[your app's package name]/files

Categories

Resources