Is it possible to send SD commands from Android app to SD card ? Commands are read SD card, write to SD card etc (CMD18, CMD24).
Even for the rooted phones..
I think he is doing this in
Sending SD commands from Android app
Any help is greatly appreciated.
Thanks
Related
I am assigned to run CTS on our Android device (Android TV). However, no SD card slot is in the design.
Can I still run CTS without any SD card? If I can what should I do to store media data?
Yes, You can run CTS without SD card implemented on device. Android is not mandated SDCard support.
Example, Pixel devices does not support SD card, but they passed android CTS certification.
is it possible for my app to do one or more of the following: read, write and detect data changes to phone storage while the phone is connected to the pc?
Note: The app is used on Android 4.1 and up
When SD card is connected to your pc your phone cannot read the sd card. So, naturally your app wont b able to read the SD card and detect changes as long as SD card is being read by your pc.
But once you disconnect the SD from your pc, you can detect any change in the SD card by comparing with the previous status of the sd card which u have to save for future comparisons!
I'm trying to test a cocoonjs app I made on an Nvidia Shield. I was able to get to my app from an express server I had running on another pc and that worked fine but I'd like to be able to run the app locally off of an SD card in the shield.
I tried putting my .zip onto a micro sd and putting that into the shield but the launcher dosent show anything in the sd card list. I'm assuming that I have to somehow get the .zip file onto the internal shield sd card itself? Has anyone else done this before? Thanks in advance for the help and I apologize if I'm just missing something simple.
The only requirement is that the zip file should be on the root of the SD card.
You can get more infor here:
http://support.ludei.com/hc/en-us/articles/201048463-CocoonJS-launcher-user-guide
Is it possible to send SD (Secure Digital) commands from Android app to SD card ?
Commands are read SD card, write to SD card etc (CMD18, CMD24).
The constraint is the phone should NOT be a rooted phone. With rooted phone we are able to send SD commands but not with unrooted phone. On attempting we get the error "permission denied".
Any help is greatly appreciated.
Thanks
It is not possible. The SD card hardware is abstracted away and mounted as a directory in the filesystem. Why would you want to send raw commands to the SD card anyway? Why not just read and write files on it?
I am developing an application that needs to write files to the SD card. I am using GetExternalStoragePublicDirectory() to determine the directory to write to.
I have two phones I am developing with. On a Google Nexus S, running Android 4.0.4 (Ice cream sandwich) it is returning a directory on the SD card. However, on a Samsung Exhibit 2 running Android 2.3.5, it is writing directly to the USB storage on the phone.
Is there a way to force the SD card?
edit:
I found that getExternalStoragePublicDirectory(), and getExternalStorageDirectory() are always returning "/mnt/sdcard/". This is not actually the mount location for the sd card. On the Samsung Exhibit 2, this is the USB storage location. The card mount location is "/mnt/sdcard/external_sd". Is there a way to return this actual sd location?
I see that the camera and other apps have found a way to do it. The camera app has a "storage" setting with options "phone" and "memory card". If "memory card" is specified, images are actually stored on the sd card.
Is there a way to return this actual sd location?
No, sorry, not in the current Android SDK.
I see that the camera and other apps have found a way to do it.
Mostly, they will either be ones written by the device manufacturer, or are reading information via MediaStore, which should index both sources.
If you want to write to SD card only use
File mySdCardPath = Environment.getExternalStorageDirectory();
File dir = new File (mySdCardPath.getAbsolutePath() + "/yourDirectoryName");