OTA for Android - android

I developed android application and put .apk on my website which runs on LAMP and I wish to enable somehow OTA (over the air) installation of my application, by simply providing URL to Android device.
How can I do it?
Scenario I wish to produce is (if someone didn't understand me correctly) that user scanns QR code of apk's URL and then install it seemlessly. Right now, user must download the file, then tap on it to install it.
Thanks in advance.

Just have the QR code point to the actual .apk and let the user download it and manually install it. There is no way to have a user read the QR and upon that automatically install the app. Thats not how OTA installations nor updates work. Even when you perform an actual OTA update of Android for example you have to confirm that you'd like the action to be performed.
Even if there is a way to achieve this it won't hinder anyone to just pull the .apk from his phone and take a look at it or reverse engineer it.

You may also see what adb install testapp.apk does and how it works...
Maybe you can initiate it from your app, once you download the new version to the phones (SD Card)

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.

Install apk on multiple android devices

I need to install an application in about 500 tablets with android.
Is there any way to do this automatically without me having to manually install on each device.
post the apk on a web server..access that page via the tablet and install the app...
i personally don't think there is any other way...there must be some sort of action on the device to install the app
you can do it through adb, put you apk file on a SD card or something or a given url and then through command prompt use
adb install <1>/<2>.apk
where <1> is path of the apk and <2> is the name of apk.
although its manual, but still be fast enough as you send a command and connect another tablet.
If you are going to have to reinstall the app over and over again you could always create another application to handle all this. Sometimes a reinstall will fail so you will have to uninstall first. This app could also check a web server once a day to see if your main application needs to be updated.

Auto Update APK version on Android Phone

If a user downloads my app (a .apk file) onto their android phone from the market place,
Where does the .apk file end up on their phone?
When they're running my application, if I detect that there is a new later version of the application available is it possible to from within the application that they're running download the latest version off an ftp link (I can programmatically do that now) and then replace the existing .apk that they're now running with the newer version. [Not sure about this one at all.]
Is the existing application all in memory when it's being run, so that when i download the new version, I can delete its apk file without it being locked up and replace it with the later build and then restart the app?
What's the best way to handle this scenario? I have an app where I want to ensure that users are on the latest version before they use it.
Apps are stored in /data/app see https://android.stackexchange.com/questions/3002/where-in-the-file-system-are-applications-installed.
IMHO, You should let the market manage updates for you, there's no need to bother doing anything by hand and as an user I would be "angry" if some app start downloading stuff on my phone without my consent, especially when abroad (some users are paying their datas).
If this user has rooted phone, you may use code provided in this answer: Android silent apk update.
If not, user has to be prompted, and you may start an activity with an intent (as usual), but also, before calling startActivity(intent), call intent.setDataAndType(Uri.fromFile(...)).

Private Android Application deployment/installation?

is it possible to create an android application that is meant only for internal use? Basically a private application not meant to be installed by non-approved phones?
If so what is the basic process of deployment? How do you get the app on the employees phone's?
thanks!
The easiest way is to email it to them. Any email with an .apk attachment will get an "Install" button that you can tap to install the app.
Installing from non-market sources needs to be enabled -- which is a bit of a security risk -- but the user will be prompted to turn that on if they need to, and even given a button that will take them right to the appropriate settings page. The whole process is really quite slick. :)
Alternatively, you can copy it to the phone (e.g. after connecting the phone in USB storage mode) and then use a file system app to locate the file and install it.
Emailing it is the easiest way, however.
Edit: I'm assuming you meant private as in "only sent to certain individuals" and you're not actually looking for a method that will prevent the apps from being run on non-approved devices should they end up on one.
There's a proper way to do it now: Google Play Private Channel for Google Apps. You publish app on Private Channel and then send invitations to users. It won't be seen by other users of Google Play.
Option 1
Using Google Play Private Channel is probably the best way, but is useful only for Google Apps users.
Option 2
You can use new Developer dashboard options that let your app be in Alpha or beta phase and is available to only selected google accounts (using groups or google plus circles). Your app can stay in beta indefinitely so not become visible to other users. if you like this method you can also use services like TestFlight.
Option 3
Mail distribution is also ok it's even mentioned in documentation which I find a little bit odd, but I would advise you to use some file storage like Dropbox and just distribute the link to selected people.
Two major ways:
You can either use the non-market application installation method, or adb from a connected PC to install an apk which you distribute as a bare file. The downside is that anyone in possession of the apk can install your application.
Alternatively, you can distribute the application through the android market, but make it require an account on a server you control in order to do anything useful. The upside is that possession of the apk doesn't get an unauthorized user much; the downside is negative ratings from confused randoms, and that you've made your apk very available for interested parties to know about and decompile. (There is or was also a way to put an app on the market but not list it so it was only accessible via a full url, however don't rely on that)
Yes. As of right now I use such a method, I have to manually load the app on the phone, however other techniques can be used. Once loaded the app checks the main server to see if it is up to date. If it is not, it downloads and installs the new version of itself.
If you go to your eclipse workspace and go to yours app's folder, in the bin folder assuming you develop with eclipse, you will find a .apk file somewhere in there. Copy it to the phone and then use something like EZ File Explorer (or something like that) to access your android filesystem, click on the .apk and it will install and be ready to use.

Installing apk from within application in android

I need to downloads and install apk from server to devices and i tried to do this task but it ask for user permission like "Insall" , "Cancel" . and if hits "Install" then it works fine and installed but i dont need this permission as i am to install 30 apk from server .
Thanks in advance .
The security model of android won't let you do such things without user interaction. It could be, if the particular phone was rooted, but I think you can't rely on that.
You can not do this on Android as said because it's a security limitation.
It could be possible if you create a system app but based on your question I think that is not what you are after.
However there is a possible workaround:
If those apps that you are installing are made by you and it is possible to modify them to act like plugins/libraries(Don't worry you can keep the activities and stuff) then you could load them dynamically when your apk is run, thus essentially giving you new code to be run on the device (Elements of these apps will run under same user ID but you can start them in a new process if you want with android:process=":YourProcessName".
Check out this tutorial on how to load external libraries at runtime http://xianminx.blogspot.com/2011/12/dynamic-loading-android-custom-library.html

Categories

Resources