How Google play store updates user apps automatically - android

How does Google play store app installs updates to the existing user apps ? I am trying to mimic a part of the functionality of Google play store, which is auto updating my app. I tried with the following approaches :
1) Run adb command "install -r -g /sdcard/myapp.apk" --> It failed giving the error:
'IOException:Error executing command'
2) Intent i = Intent(Action_View); i.setDAtaAndType(Uri.fromFile("pathTomyapk"); But no luck, this intent launches a launcher which inturn asks user to install the updates.
I want to get rid of that launcher, any ideas?

Build your own custom ROM, where your Play Store replacement is the designated market for the device, the way the Amazon AppStore for Android is on Fire devices.
There might be something for auto-update for devices that are part of Android for Work, though I haven't looked into that.
Otherwise, apps cannot silently update themselves, for obvious security reasons.

You should have a look at https://www.pushlink.com/
It has different update strategies that may be interesting for you. Of course, the "totally silent" update is only for rooted device, but the other more conventionnal strategies have the advantage of updating the app without neither leaving the app nor opening the Play Store to validate etc.
PS : I'm not affiliated to PushLink :)

Well the answer for my question is - It's not possible. Atleast without rooting or without flashing a custom ROM. If you are trying on a rooting device probably the adb commands would work. If you are able to include your app in /system partition of a device then it is possible. For now Thanks for reading this.

Related

check if an android app is malware before installation

I want to access the apk file of any app before installation.
In more details: in google play store when the user clicks on Install button I want my application to access the apk file of the application that the user wants to download, and analyze this apk file and be able to whether allow the installation or stop it.
is that possible and if so how to approach this
On Android this functionality was introduced in Android 4.2. It is usually used by anti-malware products like Google Play Protect is known as a "Package Verifier". There is a good blog post on it here.
The short answer is this has to be done as part of the phone manufacturing process as it is so critical to security. So the answer is it can be done, but if you write this code you will need to get a phone manufacturer to include your code as part of a phone system image.
Most third party anti-malware products instead rely on analyzing the APK after the install happens by listening to the package added notification.
Definitely not possible in the way that you want. Android's OS is pretty well locked down. You might be able to do something if the device was rooted but at that point you may as well write your own OS fork. You can attempt to do someting with https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED broadcast but you will not be able to analyze the apk freely nor will you be able to stop the installation of it.

How To Remotely Install Enterprise Android App on Multiple Devices

I spend a lot more time in the iOS space than Android, so apologies if this is an obvious question ...
We have an enterprise Android app that we need to roll out to a lot of locations nationwide. Ideally, we'd like to be able to install our current app (and future apps) without involving the onsite staff. Is there a way to do remote installs for Android devices? We could do the installs ourselves then ship out the devices, but there will be additional apps added to this project over the next year, so we don't want to keep shipping the devices back and forth. And due to the nature of the industry and end users, it would be best if we could control install centrally instead of relying on those remote staff to do so. And we are looking at >1000 devices, if that affects the answer.
All the solutions I've found so far are more for individual users, not for a large setup like ours.
Unfortunately I think this question may be closed as it is off topic (https://stackoverflow.com/help/on-topic) - however having dealt with the problem I feel your pain.
There are a few options (I have done several of these myself):
1. Write your own store: Requires creating a service and client, not easy
2. Use a BYOD tool such as MobiControl: https://www.soti.net/mobicontrol/
There are some solutions for this case, some are better than others and may not be helpful for your case, but these are some of them:
1 - Put your APK on a Web Server and config your APK to look on this server for new versions. Using an intent you can download it and open it, but it should prompt the user to accept the install.
2 - If devices are rooted, you can use the ADB commands to install the new APK without prompt the user to accept it.
3 - If you're able to do it, you can configure a VPN on your client's network, and use it to remote connect and use ADB for each device trough the network.
4 - If your App is in the Play Store, your app should auto-update if the app is configured to auto-update from the Play Store.
I'm sure there are some others ways to do it, so if none of these help you at all, don't worry.

Install app and make it undeletable

Does anybody has the Idea of making an android app undeletable.I want to install selected apps on the system memory so that anyone having an access to my phone cannot delete those apps even after resetting the phone...
What I earlier saw was that the apps installed on the system memory cannot be changed or modified by ordinary users...I tried resetting my phone but saw some apps preinstalled from the company remained and all the apps that were downloaded from the play store were deleted..
The answer I got from searching the web was that I could make install an Android app to the system memory...does it make the app undeletable even after resetting or formatting the phone?
You can achieve this by making your application by Developing a Device Administration Application, follow this link http://developer.android.com/guide/topics/admin/device-admin.html.
you could only do this if you root your phone and place the apps inside system/apps.
However, if this is about your phone, why don't you use a password protector for apps, so nobody can access the app manager?
Removing a users choice to uninstall your app, goes against everything most programmers strive for. It's probably against the Google T&Cs also. And as already said, other than Malware or some dodgy virus attempt, there would be no practical (ethical) use for such an app, IMO.

Android install apk programmatically

Is it possible to install an apk programmatically in the background or does the user have to accept the installation.
My scenario is that I want my employees to all have the same set of applications installed.
Of course they can install applications by them self, but I want them all to have at least some applications installed.
I'm not talking about installing applications from the market.
solution in this link
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);
Let me get this straight, you want to remotely put an app on a large number of phones and have it install itself? I don't think that's possible. If it were, think of the virus possibilities!
I think you can email the APK to the phones and have the user use something like Apps-Installer to install it, but I've heard of problems with that method. For your situation though, I would recommend trying it.
The only other alternative I can see beside putting them in the market would be to manually collect all the phones you want it on and manually put it on each one with the ADB, but that would be a huge pain.
adb install <apk name>
using above statement we can install apk into devices.For more information
install apk
It's a huge security concern and I do not think that Android allows that!
At least, I would not allow any util or service to install any app without informing me.
The best way would be console installation using command adb install <apk name>. You can have APKs in a remote server and all employees have to install them and send you the console output.
Some more requirements would be useful. Is the user required to have these apps? Do you want the apps to be updatable through the market? here's my thoughts in lieu of that information ...
The problem with not going through the market is that they won't get update notices and won't see those apps in the "my apps" list in the market. i'd rethink that ... It's probably not what the user wants, unless you are installing for example enterprise apps that aren't on the market anyway.
You could for example create a "recommended apps" app. It can show your list of apps, and indicate which are installed, and link to the market install page. This of course doesn't force them to have the app installed, but this is actually a friendlier thing to do.
There's also nothing stopping you from creating your own market app. The tools are all there in the SDK. Personally, I'd hate this as a user and would prefer the lighter weight integration on top of the existing market I mentioned above.

Silent installation on Android devices

I've accepted for a while now that it's impossible to silently install an application on Android - that is, to have a program install an application bundled as an APK without providing the standard OS installation prompt and going through the app installer activity. But now I've picked up a copy of the Appbrain fast web installer, and it does exactly this.
How on earth is this possible? :D
I think the clue is pretty much in this statement I found here in the FAQ.
The fast web install worked for me yesterday, but it doesn't work anymore today. What's wrong?
The permission to install apps directly on your phone needs to be refreshed once every few days. Go back to the "Fast Web Install" app on your phone and click the button to give us the permission again. We are working on a future update that will optionally automatically refresh this setting.
I presume this is very similar to what Google does in the kill switch. I am assuming that the kill switch is an application on my device, just hidden from me. When Google wants to remove an application, it silently uninstalls it without asking for our permission. I am very sure this security hole is of their making. Now we just need to figure that out... =D
You can ( in a very hackish way ) install apps silently using adb. You have to enable USB Debugging, but just push the APK to /data/app. ie:
adb push MyApp.apk /data/app
or -
adb install MyApp.apk (cleaner way)
The second command MAY prompt for an installation, I don't remember off the top of my head.
IF you can work out what the standard installer does when it installs, you can replicate that behaviour in your app, however yours would need quite extensive permissions to do everything properly.
Seriously, don't even try.

Categories

Resources