I am developing fot Android using NetBeans. I have moved from Eclipse, where I have often used file explorer, for pushing and pulling data from and to device.
Is there in Netbeans simple window, if co, how to activate?
Thanks
To anyone still wondering, the Android SDK comes with a tool called DDMS located at
<android sdk>\tools\ddms.bat
that also has a file explorer once the program is open, located at
Device>File Explorer...
You can read more about DDMS from the android docs
If you just want to access a directory that is locally "available" (e.g. a drive in Windows, or something mounted in *Nix), then you can simply use the "Favorites" window and add that directory (or multiple directories) to that.
Then you can access the files directly in an "Explorer" like fashion.
The Favorites Window is available through "Window -> Favorites"
Related
There are many posts saying how to access the /data/data/com.your.packagename/databases/your.databasename
folder by using an emulator or rooting your phone. However, I am using an emulator and I am still not able to access the /data/data/com.your.packagename/databases/your.databasename
folder in the android device manager. See picture below (click on android device manager) where I accessed the ADM --> went to my application (com.bartboersma.myfootballapplication) but could not open the data folder (it appears to be empty but after reading only it seems that access is not granted).
How come?
Solved it by doing the following:
https://stackoverflow.com/a/31137694/7971387 so I could locate the platform-tools map and all in it.
Next up I followed these steps: https://android.stackexchange.com/a/82271
Lastly, I typed this into the terminal: https://stackoverflow.com/a/40097307/7971387
That granted me access to the data/data/com.your.packagename/databases/your.databasename
picture: Picturing showing access to data\data folder
Thanks guys for all the responses
I've created an app using Android Studio and it has a database file handler. I've gone through a few post and everywhere they are saying go to data\data\ folder to get the app folder. But mine doesn't show any folder for my app. Do I have to manually set this file location to be created? How can I find my database.db file?
It should be automatically placed in data/data/databases in your app folder unless you specify otherwise. Are you sure it is created?
That is /data/data/package-name/databases/dbfilename
I have another suggestion. If you have enabled backup for your application, you might be able to use ADB BACKUP, like suggested here: http://blog.shvetsov.com/2012/09/backup-your-android-without-root-or.html
The database files are located in the following folders.
/data/data/packagename/databases/
You can access the .db file only on emulator, its not possible on actual device. In the android studio open the DDMS perspective, there on the left hand side you will find the storage structure, there in data/data/ you will get the file you are looking for
I have been using genymoton for quite some time now.
Could someone pls. tell me if there is a way by which I can access the files present in the sd card of genymotion emulator?
Currently I have to upload them to google driver and then download on windows.
You can use shared folder for that. It is well explain on this Google+ post.
Here is the brief:
Go to your VirtualBox VM setting / Shared folder tab
Add a shared folder with the folder you want to shared, and check the "auto mount" option
Start your VM as usual from the Genymotion software
Your shared folder is available in the /mnt/shared directory (multiple shared folders are supported)
This is also possible using the Android Device Monitor.
You already have this if you have the Android SDK installed.
This method works for all connected devices, including emulators like genymotion.
In Android Studio, click the icon that says Android Device Monitor in the toolbar.
(This is also available from Eclipse or you can just type monitor in the command line after moving to the tools folder of your installed sdk)
In the Android Device Monitor, go to the File Explorer tab.
Make sure you have a device selected on the left side.
Find the desired file and select it.
For the sdCard you might need to open the storage folder and open the sdcard there.
Click the button on top that says "Pull a file from the device".
Make sure you select Pull, not Push. Unless if you want to put new files on your device ofcourse.
Save the file to your computer...
and voila! The file from your genymotion is now among your other files on your computer. Ready to be used however you like.
Or alternatively you can also use a third party app like airdroid or any advanced file explorer to exchange files between your device and your computer.
(For installing third party apps you either need to find the apk or flash gapps on your genymotion first and go to the play store.)
Another way that I adopted, just install EsFileEx on genymotion.
Grab your files that you want to copy from e.g
/sdcard/WhatsApp/media/dp.jpeg
Swipe to LAN, here you can see your local machine as 10.0.3.2 or any IP. Here you can access your shared folder/drive of local machine/PC, past copied file here and you done!
NOTE! R/W permission should be set on shared folder/drive of local machine/PC
You can use the eclipse with the ADT plugin and browse the file system like any other android virtual emulators. I have been using this for a while, but eclipse crashes at some times.
I implemented my first app using Xamarin Studio (Mono for Android). This app stores some data in a SQLite db, which works fine on a Sony Tablet S device.
My question is: is there a way to get db file and see, for example, its size?
I looked up to the following path
/data/data/My-Application-Package-Name/databases/My-database-name
but it doesn't seem to exist.
Thanks for any help!
You can use Eclipse to go right to it using the sqlite manager plug-in (http://www.coderzheaven.com/2011/04/18/sqlitemanager-plugin-for-eclipse/)
Download the *.jar file from the website I reference above to the
"dropins" folder in eclipse (open your eclipse folder and you should
see it)
Then restart eclipse and go to the DDMS. You may have to do
windows->views-ddms if it isn't already being displayed...
Select your device from the left panel then use the file explorer to go to your data
directory/YOURAPP/databases. Hopefully there will be an icon that
shows up when you select your database. If not, rename your database to use the "db" ext.
Click it and it should open in the manager tab.
This is a valid database location (//data/data/My-Application-Package-Name/databases/My-database-name), but you can access it from file managers if you have root access only.
Look how it can be done here. Otherwise, if you want to get some info trough the code, you're doing something wrong, so publish the code and logcat.
I have developed an Android app using Appcelerator Titanium. This app will create a file in applicationDataDirectory and install a database as well.
If run on emulator, I can locate those files using "adb" command. But how about on Android device? Can I use the "My Files" app to view those file I created? (since I can see files created by other application there.)
Moreover, I expect once I removed the app on device, it will automatically remove the related files and database. Is that true?
Because I found that even I removed the app from the device, the database seems left behind. I can tell because after deleting app and re-run on device(from Titanium), it show previous data.
I am using Ti SDK 2.0.1GA2, Android Runtime V8. And using Samsung Galaxy Tab for testing.
Thanks in advance.
Application Private Data files are stored within <internal_storage>/data/data/<package>
Files being stored in the internal storage can be accessed with openFileOutput() and openFileInput()
When those files are created as MODE_PRIVATE it is not possible to see/access them within another application such as a FileManager.
On Android 4.4 KitKat, I found mine in:
/sdcard/Android/data/<app.package.name>
Use Context.getDatabasePath(databasename). The context can be obtained from your application.
If you get previous data back it can be either a) the data was stored in an unconventional location and therefore not deleted with uninstall or b) Titanium backed up the data with the app (it can do that).
You can get if from your document_cache folder, subfolder (mine is 1946507). Once there, rename the "content" by adding .pdf to the end of the file, save, and open with any pdf reader.
This is a simple way to identify the application related storage paths of a particular app.
Steps:
Have the android device connected to your mac or android emulator open
Open the terminal
adb shell
find .
The "find ." command will list all the files with their paths in the terminal.
./apex/com.android.media.swcodec
./apex/com.android.media.swcodec/etc
./apex/com.android.media.swcodec/etc/init.rc
./apex/com.android.media.swcodec/etc/seccomp_policy
./apex/com.android.media.swcodec/etc/seccomp_policy/mediaswcodec.policy
./apex/com.android.media.swcodec/etc/ld.config.txt
./apex/com.android.media.swcodec/etc/media_codecs.xml
./apex/com.android.media.swcodec/apex_manifest.json
./apex/com.android.media.swcodec/lib
./apex/com.android.media.swcodec/lib/android.hidl.memory.token#1.0.so
./apex/com.android.media.swcodec/lib/libcodec2_soft_common.so
./apex/com.android.media.swcodec/lib/android.hardware.graphics.mapper#2.0.so
./apex/com.android.media.swcodec/lib/libcodec2_soft_vorbisdec.so
./apex/com.android.media.swcodec/lib/libcodec2_soft_h263dec.so
./apex/com.android.media.swcodec/lib/libhidltransport.so
./apex/com.android.media.swcodec/lib/libcodec2_soft_h263enc.so
./apex/com.android.media.swcodec/lib/libcodec2_vndk.so
./apex/com.android.media.swcodec/lib/android.hardware.graphics.mapper#2.1.so
./apex/com.android.media.swcodec/lib/libmedia_codecserviceregistrant.so
./apex/com.android.media.swcodec/lib/libhidlbase.so
./apex/com.android.media.swcodec/lib/libcodec2_soft_aacdec.so
./apex/com.android.media.swcodec/lib/libcodec2_soft_vp9dec.so
.....
After this, just search for your app with the bundle identifier and you can use adb pull command to download the files to your local directory.