Silent applications

Asked

Viewed 129 times

1

Some applications or most of them have an "unassisted" or silent installation option, known as Silent install, which is to install an application without the user or support team needing to interact with that application in your installation.

I started working on a third application, in which you have the following related permission:

<uses-permission android:name="android.permission.INSTALL_PACKAGES" />

By default the Eclipse issues the following error:

Permission is only granted to system apps.

What should be considered when creating a silent application for Android outside the Google Play Store? 'Cause that kind of mistake happens?

  • 1

    By the message, it seems that it will only work if the app has root permissions on the system, which for most users will not occur. In some apps that need this, they usually issue an alert telling us to "allow unknown sources", and then install.

  • @diegofm thanks for the comment. Clarified me some things that I had not yet understood.

2 answers

4


The error states that this permission can only be obtained by system applications.

For this to happen the application will have to exist in the "Android ROM" and be signed with it key, or else, in a Rooted device installed in /system/app(/system/priv-app API4.4+)source

For Eclipse to fail to issue this error follow the following stepssource:

Window -> Preferences -> Android -> Lint Error Checking

Look for ID = ProtectedPermission in the list and define Severity for something other than error

If what you want is to install the application outside the Google Play Store, does not require permission android.permission.INSTALL_PACKAGES, just the device, where it will be installed, be configured to "allow unknown sources".

Permission android.permission.INSTALL_PACKAGES is required for applications that install other applications.

  • How to make don’t show up the error I had already searched and understood. The question was why of the error. I researched to understand a little more and managed to understand why and how exactly it is used.

  • And that why is not what is in the first two paragraphs of the answer?

  • Well, I paid attention to the @diegofm response posted as a comment on the question and went a little too deep. Really if the application does not have the "permission unknown sources" and successively I do not insert android.permission.INSTALL_PACKAGES in the manifest.xml, the application will not be installed. In order to app, using Silent install , work correctly, it is necessary to ignore the "error" doing exactly what you said from the third paragraph of your answer, which is what I already do currently.

  • I just wanted to understand a little bit the concept of INSTALL_PACKAGES

  • I don’t understand. Are you saying that you can install this application on a device that is not Rooted and that uses it to install other apps?

  • I’m saying you don’t have to be Rooted to install an application that is not in Google Play, just use android.permission.INSTALL_PACKAGES . I’m sure?!

  • No, if that’s all you need permission for android.permission.INSTALL_PACKAGES, is sufficient to be indicated on the device to "allow unknown sources"

  • Anyway, now I am more clear on the subject. Hugs. Thank you!

Show 3 more comments

1

  1. In the Eclipse:

    Window -> Preferences -> Android -> Lint Error Checking.

In the list find an entry with the id Protected permission. Set the gravity to something more recent than error. This way, you can still compile the project using Eclipse.

  1. In Android Studio

    File -> Settings -> Editor -> Inspections

Below the option Android Lint, locate Using system app permission. Uncheck the check-box or choose a lower gravity than this error.

Source: https://stackoverflow.com/a/13802178/6362228

Browser other questions tagged

You are not signed in. Login or sign up in order to post.