I have created an xml file here: /data/data/com.appName/emergency.xml
Now I want to access this file from my desktop.
I am able to access the SD card through my java code. In this case, I think, the file is created in the internal memory of the device. So is it possible to access the file emergency.xml?
if you have a non-rooted device then you can’t get that file from your desktop since it is readable only for the “com.appName” app. You can try to do “
adb pull /data/data/com.appName/emergency.xml“, but that should not work on a normal device.But if “com.appName” is your app then you can let the app copy the file to a place where you can access it from your desktop (e.g.
/sdcard).Example Code for file copy: http://www.roseindia.net/java/beginners/CopyFile.shtml