I am working on an Android App where a file is given its location like the code given below.
The method is like this:
public boolean log(ApplicationInfo aplinfo)
{
ApplicationInfo objAppinfo;
objAppinfo = apinfo;
_strFilePath = objAppinfo.dataDir;
_strFilePath += "/";
}
Where Appicationinfo is my activity name.
When I see in logcat I am getting file path as
09-07 06:34:41.355: INFO/System.out(525):
FileName::::::::::/data/data/com.andr.activity/Info_SA1.txt
My doubt is where can I find this file, where does this file exist?
When I am trying to read the contents of this file, then the contents that are written in to this file are also visible. But I am not able to find the physical location of the file.
Where does data/data/com.andr.activity path exists?
Can anyone help me in sorting out this issue?
Thanks in Advance.
This lives in the android filesystem, which is different from your computer’s file system. To view the files in android filesystem, use adb shell on the command prompt. Run:
adb shell ls /data/data/com.andr.activity. Make sure your device/emulator is connected before you do this.
Or if you are using eclipse, switch to DDMS view and check out the file explorer.
To View file:
Inside shell use:
Or Use
adb pullto copy file to your computer’s local filesystem and then view it using any editor. Read more aboutadb pullhere