Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access right on Data Folder

 
Pratik Goswami
Ranch Hand
Posts: 136
Android Chrome Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello mark..Warm welcome to this forum.

I am developing an application in which i have to show list of all files and folders including Data folder, but using the File Explorer program (that is already developed)the data folder is not accessible. I have tried to list all files using File class' listFiles() method but it skips the Data folder. Is there any way to access the same?

Thanks in advance
Pratik Goswami

 
Mark L. Murphy
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If by "the Data folder" you mean /data, that folder is inaccessible on a device except by system processes.

If you mean something else, could you explain further?
 
Pratik Goswami
Ranch Hand
Posts: 136
Android Chrome Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi mark.
Ya, I meant /data folder. Sorry for mistake.
So if /data folder is not accessible then how to fetch data from that it? There is no way to get it?
 
Mark L. Murphy
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So if /data folder is not accessible then how to fetch data from that it? There is no way to get it?


Your application has access to its own private portion of /data (/data/data/your.java.package.name/files). If I recall correctly, you can use adb push and adb pull to manipulate files in the private data areas of your debug apps. However, you cannot "explore" it because you do not have read access to /data.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic