Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Android Market install application?

This is more like general knowledge to understanding Android Market. So, first and foremost, I am sorry I has to ask here. I search for quite a while and still don't understand it. So, here we go.

As far as my knowledge is concerned, packageInstaller does install applications on Android. It does ask for user permission before it carries out installation.

So my question is "Does android market use packageInstaller or it does installation by itself?"

If it does not, there are a few things that I am not clear about.

  • I am almost certain that permissions are extracted from AndroidManifest.xml file. Before downloading, how does Android Market knows what are permissions required from the app? (My guess is that Android Market Web-end has recorded permissions when apk is uploaded)

  • Android Market asks user to agree permissions before it downloads apk. If user agrees and downloads, installation is carried out straight away after downloading (i.e. without launching packageInstaller). How is that possible?

  • As a third party application, can any app does the same job as Android Market?

like image 663
PH7 Avatar asked Feb 09 '26 15:02

PH7


1 Answers

So, I think I can ask to some your questions. Package installer is not used for installing applications from Android Market - it does installation by itself.

  1. I do not know precisely but I think for the first question you are right. Android Market knows about the permission that the app requires. It also can simply parse the AndroidManifest file of the application.
  2. This is done with the help of GTalkService. You can read more here about it.
  3. In general case no. But yes, if your app is signed with the system signature.
like image 143
Yury Avatar answered Feb 12 '26 15:02

Yury