I got my new galaxy s3 and I am all excited doing new android development. I fire up the adb shell to look around and I see this:

Grrrr. Ok so I can’t access the data folder because it is read protected. What do I do now? I can root the phone, but I don’t really want to do that for various reasons. All I really want is to see into my data folder application directories, be able to remove test files such as databases and preferences.

Turns out there is a simple solution, the run-as command.

That will allow you to run commands as your app. You can also use run-as in interactive mode.

Interactive mode will drop you into the data folder for your app. You can navigate from there.

For the run-as command to work the app must be debuggable. This means that run-as will work for apps that you are developing and have deployed through eclipse and for any apps that have been released with the debuggable flag turned on. It will not work for most android system and commercially released apps. Sorry, no hacking your favorite app this way.

Hope this helps save you some time and frustration.