How MDM install application on device without user interaction? - android

I am working on one assignment, I need to implement silent apk installation on android phone.I checked many posts and find out that it is possible to install apk only if hone is rooted. But MDM(Mobile Device Management) tools are capable to install apk without user interaction and remotely.Can any body explain me how MDM are capable to do so?

On Android, the MDM companies such as AirWatch must have an os-level app signature for their service app. For example, for Samsung there is this:
https://play.google.com/store/apps/details?id=com.airwatch.admin.samsung&hl=en
Once that service is installed, the OS allows AirWatch to do silent installs because the service is trusted as if it were part of the operating system.

Yes you can install an application silently without user interaction:
To do that your app must be system signed. Secondly you must have the apk of the application you want to install and then you need to run a command pm install which you can do programmatically something like this:
private boolean installApk(String apkPath)
{
Command installEvent = new Command(getCommandList("pm install "
+ apkPath));
return installEvent.executeCommandList();
}
This works for me.

Related

How to install android apk with authorization

I want to install my apk (my own application) to an android device, but this apk should be installed only if user is allowed to install (i.e. login needed)
I know that adb can be used to install an apk but I couldn't find any information about if I can protect adb port by a password. And, I don't know whether are there other methods or not.
You can't prevent the installation of an APK on a device. However, you can make the app working only on the devices you want, by adding a login form or a check on the unique ID of the device.
Keep in mind that a third person can bypass this protection by patching the app.

How to install .apk on multiple phones for testing

Hi I am developing a cloud application for android. While developing its a torture to install apk on every phone after a single line change in code. Is there a way to install it through script. or maybe i can put apk to some web/ftp server and from there I can install it somehow on each phone. Atleast I dont have to connect every phone through USB every time.
Please Help
For our production purposes, we use Dropbox on our computers and our devices, copy APKs into it, then click from Dropbox from each of our phones.
edit: When I've had to programatically install APKs in the past, I used something like this (which I can't find where I got it from anymore):
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "app.apk")), "application/vnd.android.package-archive");
startActivity(intent);
If you're willing to root some of those devices, you can do adb over wifi (unless they already have that option built-in).
You could also use a web server/gmail (or PushBullet for Jellybean-only devices) to deliver your apk to those devices, but that solution would still require a couple of additional steps from the user.
It's possible to install an application remotely over-the-air to your devices with your own google account without user intervention on the phone itself, but only if it's already published on Google Play. I suppose some of that process could be automated if you take a look at the new Google+ Sign-in api, and/or if you use a selenium script to trigger the installation from your desktop computer's web browser (because user authorization is still required through the web browser on the desktop itself, that's why you'd need Selenium to do that bit).

Installing an Android apk programmatically

I am trying to install APKs from our file server, and it needs to be done silently without the user being able to choose whether or not it's installed or accept permission settings/changes. This is a legit business requirement as we are working with a device vendor to preload our applications into /system/app. This is a custom Android tablet device, and as such, our business unit want to ensure we can push app updates (i.e. force the latest version).
I understand the usual security restrictions, but there seems to be a mechanism to install applications silently for vendor/manufacture level apps. However the information on how to do this seems very spotty at best.
It seems the package installer must be in /system/app and the installer must have the same signing cert key as the app being installed. That's not a problem, but info on how to implement this feature using this flow is something I have yet to find.
Anyone ever done this before?
I'm fairly certain you'll need to ship them a custom Android ROM that allows you to be able to do this (which I doubt their business will enjoy).
The Amazon App Store on a normal device can't install silently in the background like Google Play can. Maybe the Kindle Fire can do this (I don't own one), but if it can, its because its running on a custom ROM built by Amazon.
The best thing you could do is launch an intent that tells brings the user to the app needs to be updated, which brings them to installer activity, which then requires user interaction.
Not exactly an answer. However, we recently faced similar requirement for an android client-server app.
Whenever the application contacts server with a request, it sends the current versionCode as well.
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
//pInfo.versionCode;
//pInfo.versionName;
On server side we check the versionCode and if we have a new version, informs the client and client forces the user to upgrade to the new version. The client app will not work until it is upgraded to the new version. But obviously user can choose to not install etc.
Hope it helps.

Android Tablet: Automatically install/update app when connected to wifi

We have a large shipment of generic android tablets about to ship, and we only have enough time to install a small app at the factory before they ship. We want this app to automatically check for the latest version of our app ('call home', if you will), and install our new app or update an existing one automatically when it's powered up and connected to wifi.
Is this possible, and is there an app out there already that can do this?
The best that you can do is download the new apk from a server and prompt the user to install it.
The stock build of Android OS does not allow for installing 3rd party applications without user interaction.

How to install multiple apks at a time?

Am developing one Android application which is using thinkfreeoffice.apk for viewing documents in my application. My requirement is I have to download both my application and thinkfreeoffice apks at a time and also install both these apks at a time.
anybody did this one before?
You cannot literally, unless your application is signed with the system certificate or you are using the SDK/ADB install method from a connected PC, or you find and abuse some security bug. As a security measure, any installation done by a normal application on the phone will require the user to go through the confirmation dialog one app at a time.
What you can do is put check in your application for the one it depends on, and keep complaining/downloading/ACTION_VIEWing the downloaded package upon startup of your app until the user either decides they don't want to use your app or agrees with the system install dialogue for the app you depend on.
I think it's impossible to install multiple applications at the same time, as the user has to confirm installation for each apk.
You could of course make the user install your application first, then ask the user to install the office application after which you use an intent to start the installation or redirect them to the Market.
Similar implementations have been used in applications that use third party barcode scanning or speech recognition.

Categories

Resources