On Android can users choose to install any apps permanently?
And if so how does this work? I know when you first get an Android there are pre-installed apps that are permanent and you cant uninstall them but is there anyway in which we can permanently install apps ourselves?
What you're looking for is a 'system app'.
The apps installed on your Android devices can be broadly categorized as system apps or user apps, based on their installation location. The user apps are just all your normal app installations through the Google Play Store, Amazon Appstore or sideloading. These go into the /data partition of your Android phone, which is the part of the internal memory made available for user data and apps.
System apps are basically the apps that come pre-installed with your ROM. In a standard Android user environment, the user doesn’t have write access to the /system partition and thus, installing or uninstalling system apps directly isn’t possible. The process isn’t as hard as it may sound. However, there is a catch.
In order to install an app as a system app on your Android device, your device must either be _root_ed, or have a custom recovery installed (or both).
Here's how to install an app as a system app
By permanantly, I assume installing them as System Apps.
For that, you might need to root your phone. Google "installing android app as system app" and you will get a lot of answers. This is one sample
As the question is generic, so I am not adding the steps.
Easy way- If you don't uninstall an app, it will stay there permanantly. In addition, you can use additional security for preventing accidental uninstallation.
Related
For instance, Hangout allows you (on an old phone) to uninstall the updates to downgrade it to GTalk.
Can I allow the user to do so with my app?
I mean, I will push an update on the store, will we be able to uninstall this update and restore to the previous version?
No, you cannot. What you're describing only works in situations where the downgrade is resident in the device's /system partition (meaning it was pre-installed when the device firmware was built). Unless you're building your own ROM with the application resident, the old version won't be there to downgrade to.
Note that when building ROMs there are two ways to provide applications -- one by simply placing the APK into the right directory in /system, and the other by placing it somewhere that some other code locates and performs a pm install on. The downgrade feature is only possible when the APK has simply been placed where it needs to be with no pm install required.
As far as my understanding goes in the case of Hangouts/GTalk: GTalk is most likely installed as a system app, Hangouts is an update to GTalk which also renames the application. As with every application installed as a system app and updated via Google Play, the user may decide to remove the update (same as uninstalling any non-system app), thus restoring the factory-version of that app.
When updating an application which was previously installed via Google Play, the old version does not remain in the system. Therefore, I doubt that restoring an old version is possible when using Google Play to distribute your app.
If you really want your users to be able to go back to previous version, you should consider hosting older versions of your app on some sort of web server / dropbox / ftp / etc. Users may then grab those files and do a manual downgrade.
I'm developing a remote-control application for Android.
I want to be able to lock/unlock the screen.
To do this there are two ways:
Making the app a Device Administrator.
Using PowerManager.goToSleep(), which requires the DEVICE_POWER permission, which is a system permission.
So eclipse tells me "this permission is only granted to system apps".
I really need this and some other system permissions in my app, as it's a remote control app that must be able to control system features.
From the support page:
Uploading System Applications
Most developers will not need to upload system applications and may ignore this section. System applications may come pre-installed on certain devices and may or may not already be published in the Play store.
If you need to upload a system application and encounter an error message when doing so, please contact us. Please be sure to select the Publishing issues and distribution option.
If I'm understanding it right, It's possible to make a system application. how?
I'm developing a remote-control application for Android
Fortunately, this is not possible, except perhaps if you run as root, or you download the Android source code, modify it, and roll it into your own ROM mod.
If I'm understanding it right, It's possible to make a system application. how?
Build your own ROM mod. Sign the app with the same signing key as is used to sign your ROM mod. Put your app in your ROM mod. Install your ROM mod on your device.
This, of course, will limit your app's distribution to those devices running your ROM mod.
A lot of “system” permissions are really SIGNATURE_OR_SYSTEM permissions. For those, you need to do one of the following:
After building the APK, install it as a system app.
Sign the app with the same key as the Android distribution on your device.
For the first option, you would need to be root on your device. Regular APKs reside in /data/app, while system APKs need to be placed in a different folder (on Android 6 and 7 it’s /system/priv-app, earlier versions may differ). However, this is not very suitable for an app to be distributed to end users, especially if your target audience is not very tech-savvy.
For the second option, you need to build Android from source for your target device. If you sign the app with the same key as your Android build, then users running that build of Android can install it in the usual manner.
I have a question. How can I make an Android app installation to work similar as works installation from the official App Store for Android? (http://en.wikipedia.org/wiki/List_of_mobile_software_distribution_platforms) Do I need to have Root access? Or should it be a special version of Android where App Store will work as Google Play? Currently, I’m only able to install applications as “Unknown Sources”, where my application downloads the apk File and calls a system installation window where user confirms the installation. The problem here is that the file to be installed can be copied (even just a brief moment). It may be ok for free applications or the ones with server authentication (log/pas) but for paid apps it could be a problem.
Even if you install the app and delete the APK, it's still very easy to recover the APK of an installed application. The only way you can really protect your app is by using in-app licensing checks or locking the app to a certain device by using the device's id.
Further, on unrooted devices, you can not install apps outside of the Google Play store, unless you enable installation from unknown sources. To get around that restriction -- and to allow auto-updating or silent installation -- you will need to root and install a modified package manager.
I am developing a customer care android application. The client want that only the customer care application should be installed in the Android phone and we should prevent installation of other application. Is there any hack we can do to do that?
Is there any hack we can do to do that?
Fortunately, not from a standard SDK app -- the technical term for this would be "malware".
As the comments to your question indicate, you are welcome to root the device, remove the Google Play Store client (if it exists), and disable the ability to install from non-Play sources by adjusting the secure settings. However, I suspect that this will prevent you from updating your own app without rooting.
Can somebody explain to me what are the benefits of Android System App over a "normal" app
(besides that fact that a system app cannot be uninstalled)?
Special permissions?
There is some confusion here.
First, if you are talking about "system app" as just being one with FLAG_SYSTEM set, all this means is that the app is located on the /system partition, which is the read-only partition that is basically the firmware of the device. (It can only be modified as part of an OTA firmware update.) These apps can't be removed simply because they are on a partition that can't be modified.
The only thing special about a system application beyond this is that there are a handful of signature permissions that can also be granted to any app on the system image. For example there is a permission to directly talk with the package manager to install an app (without going through the system UI) that such an app can have; this is useful for any app store / market pre-loaded on a device.
Being signed with the platform certificate is an orthogonal concept -- such an app can be either on the system image or installed as a third party app (though obviously in almost all cases these come pre-installed). Such apps have access to a whole suite of low-level permissions for interacting with the platform. Very few apps are signed with this certificate; it is only for core platform applications. Unless you are working with a hardware vendor on a device, you won't have access to this.
All of the platform's certificates (whether they be available to all apps, require an app be signed with the platform cert, or are available to apps installed on the system partition) are declared by the platforms manifest, just like any other app:
https://android.googlesource.com/platform/frameworks/base/+/master/core/res/AndroidManifest.xml
There are permissions that can only be obtained by systems apps. For example the permission brick can be requested by every app but it is only granted to apps that are signed as system apps. There are some other features that make more sense I think directly installing and removing apps would be a system only permission too.
From your explanation I guess you mean the the pre-installed applications (like the Browser or the Messages app). You can take a look in these apps at https://android.googlesource.com. (search for platform/packages/apps/...).
You will find that these application are no difference to your own custom developed Apps, except you can't remove them. They cannot be removed as they provide the basic functionality to operate your phone / device. So, same security constraints apply there.