i m inserting one video in sdcard to show the video in emulator..
but showing error:
[2010-11-24 19:21:22] Failed to push sample.mov on emulator-5554: Read-only file system
pls help me how can i do that?
It probably has to do with the way you are creating your sdcard (check if you have the right permissions by doing adb shell, then ls -l on sdcard from terminal).
Also check this thread
Related
HI I am developing an android application for android on nexus 7 device.
I am trying to copy my database.db from assets to /data/data/myPackage/databases/ folder. Nothing wrong till here. No exceptions and everything runs smoothly.
But When i try to get into /data/data/ folder through adb shell or with file explorer it says permission denied or just doesnt show anything.
Am I missing something here ?
PS: myPackage is just symbolic i have my own package name in its stead
Command line is here
shell#tilapia:/ $ cd /data/
shell#tilapia:/data $ ls
opendir failed, Permission denied
You need to have your device rooted to be able to access that folder.
If you want to look at your database you can always export it to the sdcard and look at it there.
see this link for an example on how to do that
trying to export db to SDCARD
you can always get the db out of the emulator, but never from a live device or else it would be easy to write apps that read/write other apps' databases and create malware
I looked at the other question on how to insert image into android emulator. However i attempt this method.
Run the emulator
go to the ddms and click the sdcard folder
push file and select the image i want to insert into the folder
Here is the error
[2013-05-08 10:59:00 - ddms] transfer error: Read-only file system
[2013-05-08 10:59:00] Failed to push selection: Read-only file system
I have looked at other tutorial and most of them are able to push image into the sdcard file before proceeding to devtool. However, i'm stuck at pushing picture into files
Are you sure you even have an sdcard? If it's an emulator, you probably don't. If that's the case, then the mountpoint /sdcard will exist, but it's just an empty directory and part of the / filesystem, which will be read-only.
if there exists an sdcard try this command
adb push somepathtofile /sdcard/
adb remount I get the following error device not found.
I am trying to create a folder and push multiple files on sdcard. When I try to use the command I have already created sdcard for my emulator.
I am using android with eclipse.
Anyone have a solution to this?
Here is the tutorial about push files on SD Card
http://www.coderzheaven.com/2011/03/24/how-to-add-files-like-images-inside-your-emulator-in-android/
I can see the sd card in the file explorer with d--rwxr-x permission. When i tried adding any file to it it shows Failed to push the items. It is not adding even very small files.
Can you guys suggest how to fix this?
This is how you push files to the SD Card. First copy the file you want to push to the tools directory [android-sdk-windows]/tools/. Open a command prompt and if you don't have the tools directory in your path you will need to cd [drive]:\android-sdk-windows\tools. Then you just type this:
adb push [filename] /sdcard/[filename]
If you want to put the file into a subdirectory of sdcard you have to create it... you can do that in the adb shell or on the device with a file manager.
If you are working on Windows.
This site is very useful deltafalcon.com.
For debugging purposes, I wanted to have a couple of mp3 files located somewhere "in" my android emulator. Is there anyway to directly push files from my OS file system to the storage system of android?
If so, which directory does android keep audio files?
if not, how can I access an SD card via emulator?
[update2]: The problem in update1 solved. Should use adb push.
[update1]: I followed kgiannakakis's advice to create an sdcard for my avd. However, I got Permission denied error when I try to create new directory inside it.
$ cd sdcard
$ ls
LOST.DIR
$mkdir musics
mkdir failed for musics, Permission denied
$ su mkdir musics
su: uid 10016 not allowed to su
You can find directions for emulating an SD card here.
I believe that the easiest way to copy files to the SD card is to use the adb utility.
See here for a more advanced solution.
Regarding instructions at http://android-er.blogspot.com/2009/10/create-sd-card-in-android-emulator-and.html on creating the 'pictures' folder, you can run the same commands from the adb shell, instead of running them from inside the emulator.
So get a command line at e.g. C:\Program Files (x86)\Android\android-sdk-windows\platform-tools (on 64bit windows), and run adb shell.
Then you can run the same commands:
#cd sdcard
#mkdir pictures
and create the directory successfully with no permission denied error.
Following same instructions, in DDMS I had to browse to \mnt\sdcard to find the SD card volume.