How is Android APK installed?

Source: Internet
Author: User

Http://justanapplication.wordpress.com/2009/08/22/a-standalone-android-runtime-application-installation/

 

It turns out that an application can be installed, such that it can
Subsequently be run, simply by placing the package containing it inData app
Directory. On a device this wowould usually be the Directory

    /data/app

When it is started by the systemserver the packagemanagerservice will
Scan this directory and find the package containing the application. It
Will then ask the installer to install the application.

The installer in the systemserver is simply a proxy forinstalld

Process which can be found here

    $(ANDROID_SRC)/frameworks/base/cmds/installd

It is responsible for creating the directories for the application being
Installed and for changing their ownership to that of the application.
This requires root privilege or something like it which is why it is
Being done by a standlone process rather than in the context of
Systemserver process.

The proxy in the systemserver communicatesinstalld

Using local sockets. Neither local sockets nor some of the functionality requiredinstalld

Are available in standard Java but we can mimic enough that the installation of the application succeeds.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.