Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where .apk file is placed in phone after installation

I have following questions

  1. Please explain about the installation procedure for android app.
  2. What is the temporary folder location for .apk files,when we install an android app?

Thanks in advance

like image 457
prakhar Avatar asked Dec 21 '12 11:12

prakhar


People also ask

Where are APK files stored on phone?

If you want to locate the APK files in your Android phones, you can find the APK for user-installed apps under /data/app/directory while the preinstalled ones are located in /system/app folder and you can access them by using ES File Explorer.

What happens when APK is installed?

APK stands for Android Package (sometimes Android Package Kit or Android Application Package). It's the file format that Android uses to distribute and install apps. As a result, an APK contains all the elements that an app needs to install correctly on your device.


2 Answers

APK is copied to /data/app of root. Data related to apk is generated in /data/data/app_name

You could have got enough articles on this on StackExchange after searching, for example:

https://android.stackexchange.com/questions/5147/the-installation-steps-of-android-package

Android: Understanding the APK installation process

like image 52
Rahul Patil Avatar answered Sep 28 '22 12:09

Rahul Patil


Preinstalled applications are in

/system/app

folder. User installed applications are in /data/app. 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("/data/app");

        String[] files = appsDir.list();

        for (int i = 0 ; i < files.length ; i++ ) {
            Log.d(TAG, "File: "+files[i]);

        }
    }

see this video too to learn the work flow of .apk file installation

https://sites.google.com/site/io/inside-the-android-application-framework

like image 30
Azzy Avatar answered Sep 28 '22 13:09

Azzy