What is the location of installed APK files?

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

What is the location of installed APK files?

Postby Timaphei » Sat Jul 18, 2009 3:08 pm

Hello guys,

I have some problems to determine the location of APK files that I have successfully installed on Android Google phone. Lots of references say that it should be /data/app directory. I am using Android File Browser and it shows me nothing in /data.....I am little bit confused....

What actually happens when we use adb install /path/to/some/apk command? Where the apk file is installed?

I am currently involved in some research on Android, and trying to figure out if there are any methods to extract .so file from APK file (I am using JNI right now).

Any ideas on these issues?
Timaphei
Freshman
Freshman
 
Posts: 8
Joined: Sat Jul 18, 2009 2:51 pm

Top

Postby TheChosen » Sat Jul 18, 2009 6:27 pm

I find them in the emulator under /system/app/
TheChosen
Experienced Developer
Experienced Developer
 
Posts: 62
Joined: Tue Jan 06, 2009 7:18 pm
Location: Germany

Postby Timaphei » Mon Jul 20, 2009 4:11 am

TheChosen wrote:I find them in the emulator under /system/app/


I meant on the DEVICE like T-Mobile G1, not on the emulator....but thanks anyway...

http://developer.android.com/guide/deve ... .html#move says that when we execute something like
"./adb install /path/to/apk", it copies and installes the .apk file on a device. Moreover, I executed "./adb logcat" and see a line:

D/PackageManager: New package installed in /data/app/com.android.multythread.apk

BUT I DON'T SEE IT IN /data/app!!! Do I need to have root privileges in order to get access to /data/app? When I connect my T-Mobile G1 to my Ububtu PC, and execute :

adb shell
cd data/app
ls

I get error message - opendir failed, Permission denied

What is wrong? Please, help.
Timaphei
Freshman
Freshman
 
Posts: 8
Joined: Sat Jul 18, 2009 2:51 pm

Postby tbg » Mon Jul 20, 2009 7:28 am

hi Timaphei,

you don't have permission to read on /data/app, since you're using Ubuntu i think you are familiar with Linux permissions

drwxrwx--x system system 2009-06-26 11:44 app


if you're using a Dev phone you need to su and then you can ls to see the installed apk, on a T-Mobile G1 I think you can use adb pull to get the apk, so try
Code: Select all
./adb pull /data/app/<package_name>.apk /local/path
tbg
Freshman
Freshman
 
Posts: 4
Joined: Wed Jan 21, 2009 2:29 pm

Postby TheChosen » Mon Jul 20, 2009 11:03 am

Maybe you can also define a permissions tag in the android-manifest.xml that allows you to browse the internal device data?
TheChosen
Experienced Developer
Experienced Developer
 
Posts: 62
Joined: Tue Jan 06, 2009 7:18 pm
Location: Germany

Postby WarrenFaith » Mon Jul 20, 2009 1:25 pm

The denied permission is one way to ensure the installed and maybe paid applications can't be copied...
Thats a simple copy protection you should respect :)
WarrenFaith
Moderator
Moderator
 
Posts: 227
Joined: Fri Mar 13, 2009 10:59 am
Location: Berlin, Germany

Top

Postby Timaphei » Mon Jul 20, 2009 1:28 pm

Thanks a lot, guys, it's solved! :)
Timaphei
Freshman
Freshman
 
Posts: 8
Joined: Sat Jul 18, 2009 2:51 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests