Install .apk without User action - android

I have one requirement of installing the apk without user intervention.
I know there is very straight forward way to install the apk programmatically but that requires the user action. I want the way where user action is not required and that will happen in background.
It is required because the user will have mandatory to install the apk.
I think there is no easy way to do this and it may require to write the own apk installer or some firmware.
Please share if you have some pointers on how to start with this.
Thanks in advance.

If you want to install apk without user Interaction than plug Your Mobile Cable with the computer & than run your code in the sdk AS & when the project install on the emmulator it will automatically install on the Devise also Try this.

Your only realistic option to actually do this on the device is to become your own android device distributor and flash devices with a custom(ized) system image where the "mandatory" apk is installed on the system partition - the way carriers do with their assorted non-removable built-in apps.

Related

How to create Apps in android which can't be uninstalled? Can we make System apps?

We are providing one default app for our customers with android phone. Which user can not be uninstall. I have used Device Admin feature from this example But user can delete app by deactivate from settings.
Another possible way I have found to install app in System/apps folder like all google apps (I am not sure).
For that I need to root access, so I am planning to do following, But not sure how to implement it.
Programatically Root device
Install app in System/apps folder
Unroot device again
Like many System apps, How they are doing for such kind of feature ?
Please help.
I made custom Launcher, which can't be uninstalled.
Important: root the phone
install application as system application (install into /system/app) from recovery mode.
Optional: subscribe for package removal, check if user tries to delete your app - and don't allow him to do this action (close package removal activity)
I made archive, which can be installed from recovery mode. Also my Launcher requires custom Superuser application (I don't want see notifications from Superuser app, when my Launcher runs root commands - silently give root access to my Launcher).
What I have in result: Launcher application, installed as system app (can't be removed). Also I blocked other launchers installation, added white list of allowed applications (don't install applications, which can manage file system and modify something important).
This solution full of tricks, but it's easier to implement than custom ROM.
If you customize the ROM, and install it to device somehow (contact device manufacturer from China for ex., request target device drivers and build the ROM on device), you can sign your application with system key, place it with other system apps, and then it can't be removed. In this case root not needed, but it requires much more time and power to implement.
If you will root device programmatically, than you should have exploit, which makes rooting. And different devices are rooted differently.
It's simple there is something like Device Administrator but please note that user will be prompted to enable admin mode on installed app.
HERE you can find quite good example description and tutorial - please try.

In Android, preinstalled apps are always disable to uninstall?

Just that, I like to know is always all the preinstalled apps are with the uninstall button disable in Android.
If I am reading your question correctly, some of the pre-installed apps can't be uninstalled without rooting your phone using cyanogenmod or rooting your phone.
Some pre-installed applications can be uninstalled. For example in Android 4 (ICS) you can go to Settings -> Apps and select the "All" tab. There you can uninstall some of the preinstalled software.
Root the phone, put the APK into the /system/app folder and then unroot the phone. This is possible on a Droid 4 at least in theory. Not sure about other hardware models. If you can root and unroot the phones it should work.
This depends on the Device manufacturer. They have the possibility to install the app in any way they like before they freeze the image and flash it to the hardware in the factory.
For example some of the Branded apps might be installed under system privileges, but some of the more "friendly recommendation" apps might be free to uninstall.
From what i understand in ics apps in usolder can be uninsfreeled, apps in system folder instead of uninstall the button reads disable. Except for only s slight few only, these apps are reQuired by the os for the user to be able to"enable" a disable App, so i think i the app needs to be signed by the room cooker our needs top have a intent in the manifest like a launcher or home app (since if you disable your home launcher you bricked your phone, so you can't disable it, but if you give your app a intent label of copied from the Android source launcher then the phone will think it's a launcher, and not let you disable it, you will prob have to set the home launcher back to be default or Android will ask you witch launcher too use Every time user hits the home button, i was looking for the same answer found this page
Android 4.0 Api to Disable Apk Witch gave me the idea, currently thus reply is closest I've come to impinging the idea, i well be trying it soon, if you beat me to it, let me know tour results, and i well do the same.
And to install a app in /system/app a uninstall.zip won't do it, you need too root the phone, install the app, xfer it to system (i use system/app mover available in the play store free, the too secure ot Unindtsll app mover, and unroot, any way good luck.
P.s. I'm Not a Dev, i just understand the format format of the app language, and can c effectivly search for info, so please no code questions. i can't answer them, but google can.

Archos 43 Startup Wizard 3rd Party Apps Install

I contacted Archos and they said they don't give developer support because they use straight Android, so I am posting this question here. If someone knows of a better place, please let me know.
The company I work for is reselling the Archos 4.3 as a platform for our product. We have several APKs that we are installing in our production facility. I have some questions about different ways to do this. Can someone point me to a forum or maybe here is the place that can answer some specific questions about the Startup Wizard that can install 3rd party apps?
Our process is currently:
Connect Archos to PC
Touch screen calibration
Skip wizard
Mount as a drive on PC
Copy files to the .system/APK folder
Go to settings / recovery and turn on the startup wizard to run again
Reboot device
touch screen calibration (again)
Perform wizard including installing 3rd party apps
Now we are ready to ship
The problem is that his process takes a long time. We would like to shorten it. We did originally plan on using ADB to install our applications, but that was very unreliable. Sometimes ADB would get mixed up and we had to reboot the computer. Keep in mind we are making about 100 per day. ADB was really made for developers to debug and test and doesn't seem to be a real hardened production tool.
If we could change our process to be this:
Connect Archos to PC
Touch screen calibration
Complete wizard
Mount as drive on PC
Copy files to .system/APK
and here is the change if someone can tell me how to do it:
Just run the part of the wizard that installs 3rd party apps
Then we would be done. This would save us the reboot and having to do the touch screen calibration over again.
Does anyone know how to trigger just the process that the startup wizard uses to install 3rd party apps from the .system/apk folder?
I tried writing my own app that installs the APKs, but it makes you go through the UI of approving each app and installing them manually and that takes longer than the startup wizard. The startup wizard is somehow able to install everything in the .system/APK folder without asking the user to go through and approve each one. It assumes that since the user ran the wizard and said yes that they approve. It just shows a toast window that iterates through all of the APKs. There is also a .txt file for each APK that contains the work "shortcut" or "noshortcut" that puts a shortcut or doesn't on the home page.
Thanks....
What do you mean "part of the wizard that installs apps from the .system/apk folder"? There is no such part of that in the standard setup wizard. The closest thing I can think of is at the end of setup when you have configured your account, the restore of your installed apps from an older device. I'm also not sure what you mean by a ".system/apk" folder. Do you mean /system/app? If so, any .apks in there are automatically scanned and "installed" during the early boot of the device, well before setup wizard.
In general, currently Android is intended to be customized by building system images that are installed on devices. There are no facilities in the standard platform for automatically configuring a device without doing that by flashing an updated system image.
The stuff you are talking about installing from a .system/APK folder doesn't sound like anything that is in the standard platform. The only ways to install apps in the standard platform are through the app installer UI, through the shell with "adb install", and of course if you have the Google apps through the Market app. Manufacturers can certainly add their own customizations for installing apps other ways, though.

Loading APK into tablet

I have an application that needs to run in Android 2.1 tablet.
1) is there a location I can place the apk where it will automatically be picked by the system installer?
2) How do I bring up the system installer to install the application? Where do I find this application
in Android 2.1 device.
3) How do I tell the system installer where the file is located?
4) I have been told You have to activate "Settings" -> "Applications" -> "Unknown source" but I don't see goto settings application, Manage Applications and I don't see this option Unknown Source. Is this needed and if so where is it?
1) is there a location I can place the apk where it will automatically be picked by the system installer?
No.
2) How do I bring up the system installer to install the application? Where do I find this application in Android 2.1 device.
There is no end-user "system installer" application that is launchable in the manner you seek. Neither iOS nor Android have the old Windows Mobile concept of "here's a .CAB file, please install it".
3) How do I tell the system installer where the file is located?
In code, you call startActivity() on an ACTION_VIEW Intent that has the proper MIME type and a Uri pointing to the file in question.
As a user, you download Astro File Manager or a similar utility from the Android Market and use that.
Is this needed
Yes.
and if so where is it?
Right where you are looking. If it is not there, then the device manufacturer -- possibly at the request of the carrier -- has disabled that option. It is possible that it is configured to be always on, so you are welcome to try installing something. However, if this is an AT&T device, for example, they force device manufacturers to disable this option.
All devices that legitimately have the Android Market allow installation of APKs over USB, either using the Android SDK (which you presumably have) or apps like the "Sideload Wonder Machine".
What tablet are you running? Some (like the Nook Color) have very limited settings and can only be used for adb purposes once rooted. Typically what you have to do is either upload your .apk onto the web, download it using the browser and install it from your Downloads section, or, if you have the Android Debugging Bridge installed, do:
adb devices
adb install my_app.apk
The first line should return:
Your_tablet's_serial_number device
and the second line should say success.

how to install unsigned android application on the device?

Currently a team of developers is working on Android application and during the development process testers already have to test the current state and report issues.
So far I have simply installed the application by connecting the tester's device on my pc and hit run in the IDE. This way we waste a lot of time if an application has to be installed on multiple devices multiple times daily.
What I would like is to send the testing team the .apk file and let them install and run the application by themselves.
Does anyone know what's the best way to do it?
Thank you!
You can allow untrusted applications in the settings.
Settings / Applications / Unknown sources
with that setting on, you can just point your phone to the url of an .apk and install it IIRC.
It is also possible to install apks using debug mode and adb-commands over USB-cable.
Here is what I do for that, simple:
Build in debug mode, no need to sign with a special key.
Mail them the application by regular email to their computers. Then have them connect their USB cables (comes with the phone) and copy to sd card. Access the sd card from the within the phone using any available file browser, and they can install it from the SD card.
Regards
There is also software called Installapk that allows you to install APKs on your device very easily, though it is only available for Microsoft Windows, and is currently in beta.
Installapk

Categories

Resources