问题
My project package doesn't show in DDMS > File Explorer (I had selected my phone in window devices). I found that an error is shown in logcat, which says can't open file for reading.
Is it possible that I didn't install Eclipse properly? Before that, my project ran well and I could see the project path in the file explorer (under data>data>). After I had make few changes (I don't recall what changes I had made, too many), when doing another project, I uninstalled and reinstalled Eclipse, then this error appeared. I can't find ALL my project package in file explorer.
May I know what is the problem and how to solve it.
回答1:
This is due to the permissions, DDMS will only show the files and folders he has enough access to reach.
You can change these permissions using the tool Android Debug Bridge (ADB).
ADB is located in the folder platform-tools
in your SDK directory.
On Windows you can access shell by opening a command prompt, go to the SDB path and use the following command:
cd (...)\android-sdk\platform-tools
adb shell
Once the command shell is opened, you can enter the command su - root
to get root access.
To change permissions on files and folders, you just need to use the command chmod
.
EDIT: here is an example showing gow to change the right on a specific folder, and all its contents:
chmod -R [permissions] [dirname]
R
means recursive, if you remove it, it will only change the permissions of the folder, not its contents.
In [permissions]
, put the permissions desired, a full access is for example 777
.
In [dirname]
, just replace with your folder name.
Example:
chmod -R 777 new_folder
This command gives full access to the folder "new_folder" and its sub-folders.
来源:https://stackoverflow.com/questions/16620330/cant-find-my-package-path-in-file-explorer