After android installs an application from the Marketplace, does it keep the .apk file?
Is there a standard location where Android would keep such files?
After android installs an application from the Marketplace, does it keep the .apk file?
Is there a standard location where Android would keep such files?
In /data/app but for copy protection I don't think you can access it.
You can pull apps with ADB. They are in /System/App/, I believe.
adb pull (location on device) (where to save)
Note that you have to root your phone to pull copy protected apps.
It is in /system/app
folder.
I guess you can't access unless you have a rooted phone.
I don't have a non rooted phone here but try this code out:
public class Testing extends Activity {
private static final String TAG = "TEST";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
File appsDir = new File("/system/app");
String[] files = appsDir.list();
for (int i = 0 ; i < files.length ; i++ ) {
Log.d(TAG, "File: "+files[i]);
}
}
It does lists the apks in my rooted htc magic and in the emu.
There is no standard location, however you can use the PackageManager to find out about packages and the ApplicationInfo class you can get from there has various information about a particular package: the path to its .apk, the path to its data directory, the path to a resource-only .apk (for forward locked apps), etc. Note that you may or may not have permission to read these directories depending on your relationship with the other app; however, all apps are able to read the resource .apk (which is also the real .apk for non-forward-locked app).
If you are just poking around in the shell, currently non-forward-locked apps are located in /data/app/.apk. The shell user can read a specific .apk, though it can't list the directory. In a future release the naming convention will be changed slightly, so don't count on it remaining the same, but if you get the path of the .apk from the package manager then you can use it in the shell.
When i installed my app on emulator, it showed my the .apk file in
data/app Then I used ls data/app //to see if it exists or not
After you install your app just use ls command vie shell and check desired directory but it depends what kind of application you are trying to install. I used this method to Install Point if any thing is wrong.