[펌] Android에서 rooting 없이 앱 폴더 접근하는 방법
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:
dennis@foofive ~ $ adb shell
shell@android:/ $ ls -al
...
drwxrwx--x system system 2012-09-24 23:38 data
...
shell@android:/ $ cd data/
shell@android:/data $ ls
opendir failed, Permission denied
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.
run-as com.your.package ls -l /data/data/com.your.package
run-as com.your.package rm /data/data/com.your.package/databases/mydatabase.db
That will allow you to run commands as your app. You can also use run-as in interactive mode.
run-as com.your.package
shell@android:/data/data/com.your.package $ ls
cache
databases
lib
shared_prefs
rm databases/mydatabase.db
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.
shell@android:/ $ run-as com.android.backupconfirm
run-as: Package 'com.android.backupconfirm' is not debuggable
Hope this helps save you some time and frustration.
나주 전 지역 어디든 숙련된 나주 출장마사지 관리사가 직접 방문하여, 호텔·자택·오피스 등 원하는 공간에서 프리미엄 힐링 서비스를 제공합니다.
나주에서 수준 높은 출장마사지 서비스를 원하신다면 전문 관리사의 차별화된 케어를 직접 경험해보시기 바랍니다.
나주출장샵
나주전 지역 프리미엄 방문 서비스
나주 전지역 어디든 고객이 계신 곳으로 직접 찾아가는 프리미엄 출장 케어 서비스를 제공합니다.
실시간 위치 기반 배차 시스템을 통해 가장 가까운 전문 테라피스트가 신속하게 배정되며,
24시간 언제든 평균 30분 내 방문을 원칙으로 수준 높은 힐링 경험을 완성합니다.
구리출장샵구리출장마사지구리출장샵 구리출장안마구리후불출장샵 구리일본인출장샵구리홈타이구리콜걸구리출장샵