Hi all using Samsung Galaxy GT-1900 ,In eclipse I am trying to access data folder in DDMS file explorer view of my application,its data folder visible but unable to open,facing same problem as posted here Can't access data folder in the File Explorer of DDMS using a Nexus One! I click plus on data folder if disappear for 2-6.I try to explore data folder with normal and also with debug mode.still unable to access this folder.when I run my application on emulator its working fine in emulator I can visit data folder in DDMS file explorer view.Any suited answer how I can access this folder to export/explore my database and txt files.Below I am attaching my DDMS view ..
On rooted device you can do this:
Open cmd
Type 'adb shell'
su
Press 'Allow' on device
chmod 777 /data /data/data /data/data/com.application.pacakage
Go to the DDMS view in Eclipse
After this you should be able to browse the files on the device.
Afaik, you need to root your phone to get access to /data, it's forbidden due to rights management, by default.
Related
I can use the file explorer fine with the emulator, but when I try to open directories with an actual device, it is unable to open the directory.
I have selected my device under the Devices tab, and I can see the directories under the file explorer tab.
If I try to used adb shell on the cmd line, I can see the directories but when I try to open them I get: "opendir failed, Permission denied"
the permissions on the directory are drwxrwx--x
I feel like there might be some permission setting on the device that I am overlooking, any ideas?
You cannot access most of the filesystem on production devices, except perhaps on rooted ones, by any means, let alone DDMS' file manager.
For your own app, you can use adb shell run-as to copy a file to external storage, then copy it off from there using DDMS' file manager, or adb pull, or just using your normal desktop OS to copy from the mounted storage.
I am writing an Android application using SQLite. How to view the .db file that's on the device without rooting it?
I tried Questiod SQLite Manager but "data/data/(my application name)/.db" cannot be opened. The method seems to be used for emulator and rooted devices only. I am using an unrooted device for debugging.
Screen for DDMS:
In your manifest file, add a property 'debuggable=true' in application tag. Then find your database in your given path.
I assume you mean for debugging?
You could copy the database file to a non-private directory (for example into the one returned by Context.getExternalFilesDir(). Afterwards you can use adb pull to copy it to your development machine.
Install this APK into your emulator and read your DB file and also add,update,delete record of your database
Yes , there are 2 methods from which u can view ur db data :
Go To DDMS -> Data -> Data -> Select ur Package ->Databases -> Pull them Out and view with SQlite Broswer
OR
Install Root Apk in ur bluestack and view in device or emulator itself..
From Command Prompt you can try this
Open cmd
Go into 'Platform tools'
Type 'adb shell'
su
Press 'Allow' on device
chmod 777 /data /data/data /data/data/com.application.package /data/data/com.application.package/*
Open DDMS view in Eclipse and from there open 'FileExplorer' to get your desired file
You can view (visualize) the data in the .db file by using the software called "DB Browser for SQLITE"
get your .db file from the device(smartphone) memory (by accessing the DDMS --> File explore)
download and install sqlitebrowser (http://sqlitebrowser.org/)
after installing, open "DB Browser for SQLITE" and go to "open database" to load your .db file
Choose the "Browse data" tab
Finally, select the table you want to visualize to display the data in the database.
I am using Windows7 and want to extract/pull the application database to the local windows machine's folder.
I have searched through internet and found the adb command as below :
adb shell su 0 cp /data/data/<package.name>/databases/<database.name> /mnt/shared/
I have tried the same by creating shared folder for the Virtual box.
But getting error is like : read-only file system
I have also check that read-only is disabled.
Please I need help.
Screenshots :
I'm not sure for Windows but on Mac you just call
adb pull /data/data/<package.name>/database/<database.name> <local.file.path>
As your phone under Genymotion is rooted, you can go in the DDMS of Eclipse.
Then, Click on the tab file explorer.
Then go to folder /data/data/<your.package.name>/ then pull the file from the path in which you saved your database.
I am not able to view SDCard folder in FileExplorer of DDMS in Android.
But I was able to view SDCard folder when I used adb command from command prompt like below:
androidsdk\tools>adb shell
$ ls
I am able to view list of folders when I typed ls in which I can see sdcard folder from the list of folders .my doubt how can we view the sdCard option in Eclipse using FileExplorer.Also I want I want to delete or insert some files in sdcard.How can this be possible for me.can anyone hel me in sorting out this issue.
Thanks in advance.
I had the same problem:
Using Eclipse DDMS File Explorer the content of sdcard was not visible in any folder (CyanogenMod with Android 4.2.2).
The solution was:
On the device you have to give ADB root access. Here: Settings / Developer options / Root access
Then the content of sdcard is visible in this folder:
/mnt/shell/emulated/0
You can download Astro file explorer from marketplace to do this. It is free.
Try looking into /mnt/sdcard folder instead of /sdcard. I had the same problem.
i want to load some photos into my sd card image in the emulator. how to do this by command prompt.how to do that?
I've found it to be incredibly clumsy and not work very well, but the command to use is: adb push yourfile.xxx /sdcard/yourfile.xxx. For this to work you've got to have the file in the same directory as adb.exe, which is in the tools folder of your SDK directory, or have set up adb as a system-wide recognisable command. (I don't remember how to do that, but I know it can be done). This also assumes you've set up an SD card through the AVD manager. However, the problem I faced when doing this is that sometimes the file would appear on the emulator with a size of 0 bytes. What I mean is that I could see the file in the DDMS file browser in Eclipse, but after doing the necessary emulator restart, the files would then be shown with the 0 byte size. I couldn't find a pattern on why that happened, but trying a few times in a row eventually worked.
I've just found out how to add some files in the SD card image.
Turn all running emulators off but keep Eclipse on.
Using thecommand line, start the ddms tool. ddms
Now start stand-alone emulator console.
emulator -avd myAVDname -sdcard mysdcard.img
Push a file into the sdcard. adb push yourfilename /sdcard/
You should get a message (how much memory it occupies)
In Eclipse, you will see the folders (including SD card and the files you just add) appear.
For me, the files didn't appear at the first time in File Explorer, then I closed the emulator and turned it on again. Now it works!
On Android Studio
Run Emulator
open android device monitor
scroll down and select sdcard
Click on Push file into sdcard icon at top right
choose the file
Hope this helps..
in Eclipse, Open the DDMS Perspective.
Start an Emulator. Select it in the Devices.
Click on the File Explorer Tab in DDMS.
THEN THE FOLLOWING DOCUMENTATION FROM OFFICIAL ANDROID WEBSTIE: http://developer.android.com/tools/debugging/ddms.html
Working with an emulator or device's file system
DDMS provides a File Explorer tab that allows you to view, copy, and delete files on the device. This feature is useful in examining files that are created by your application or if you want to transfer files to and from the device.
To work with an emulator or device's file system:
In the Devices tab, select the emulator that you want to view the file system for.
To copy a file from the device, locate the file in the File Explorer and click the Pull file button.
To copy a file to the device, click the Push file button on the File Explorer tab.
Answer here also. You need not open cmd when using eclipse.
Problems trying to push files into android device using eclipse
You can use the ADB via a terminal to pass the file From Desktop to Emulator.
adb push <file-source-local> <file-destination-remote>
You can also copy file from emulator to Desktop
adb pull <file-source-remote> <file-destination-local>
first,download magiciso(http://www.magiciso.com/Setup_MagicISO.exe)
after downloading When your emulator is not open go to your avd files(c:/document and settings/"user name"/.android)
there is your avd named folder
then open sdcard.img with magiciso
now you have to drag and drop files in your magic iso window
don't forget to save the file