Questions tagged [packageinstaller]

PackageInstaller offers the ability to install, upgrade, and remove applications on Android devices.

PackageInstaller Class offers the ability to install, upgrade, and remove applications on the Android device. This includes support for apps packaged either as a single "monolithic" APK, or apps packaged as multiple "split" APKs.

An app is delivered for installation through a PackageInstaller.Session, which any app can create. Once the session is created, the installer can stream one or more APKs into place until it decides to either commit or destroy the session. Committing may require user intervention to complete the installation.

Sessions can install brand new apps, upgrade existing apps, or add new splits into an existing app.

Apps packaged as multiple split APKs always consist of a single "base" APK (with a null split name) and zero or more "split" APKs (with unique split names). Any subset of these APKs can be installed together, as long as the following constraints are met:

  • All APKs must have the exact same package name, version code, and signing certificates.
  • All APKs must have unique split names.
  • All installations must contain a single base APK.

enter image description here

Read more

56 questions
1
vote
0 answers

Android PackageInstaller INSTALL_FAILED_INTERNAL_ERROR: Session relinquished

I'm facing a problem while trying to install an apk with package installer. Installation fails with the very obscure status message "INSTALL_FAILED_INTERNAL_ERROR: Session relinquished". Here is the code that installs the package: public static void…
Ukk
  • 101
  • 6
1
vote
0 answers

install and update apk - targetSdkVersion 29 (Android 10)

since I updated targetSdkVersion to 29 I am facing many troubles, this one realted to downloading - installing - updating my app. The apk with the new version is downloaded successfully (because I find it through the file explorer in my phone) but I…
1
vote
1 answer

Is there any way to use PackageInstaller below API level 21?

My application minSdkVersion is 19 and application installs 3rd party app using following code, Intent intent = Intent(android.content.Intent.ACTION_VIEW); intent.setDataAndType(android.net.Uri.fromFile(new java.io.File(APK_PATH)), …
suresh
  • 415
  • 3
  • 9
  • 20
1
vote
1 answer

Can I get Android PackageInstaller Install cancel button callback?

I using PackageInstaller API to install my apk. Can I get Android PackageInstaller cancel button callback ? if yes , How can I do? Or it just impossible.
TimChang
  • 2,249
  • 13
  • 25
1
vote
1 answer

PackageInstaller closing immediately while start activity intent

I've got problem about intent in the Xamarin.Forms. I want to install downloaded APK file,which stored in the Internal Storage root. I have written code and it works perfectly on the Android 6 but it doesn't work on the Android 8 and 9. I used…
1
vote
1 answer

AndroidStudio doesn't run app on device

I'm developing an Android application with Android Studio and since today I can no longer run the app because when Android Studio installs the apk on my device, the package installer crashes with the following message "Unfortunately, package…
Federico Taschin
  • 2,027
  • 3
  • 15
  • 28
1
vote
0 answers

Create Qgis installer

I have successfully build Qgis on msvs 2010 and running fine. Now I want to create windows installer of above. Please help me in making installer after build. Thanks
Sachin
  • 121
  • 5
1
vote
2 answers

Usage of 'public void uninstall (String packageName, IntentSender statusReceiver)' method of PackageInstaller

Have you ever used public void uninstall (String packageName, IntentSender statusReceiver)' ofPackageInstaller` ? This is new API added in apilevel 21. And this API description is Uninstall the given package, removing it completely from the…
YanceyWang
  • 77
  • 1
  • 6
0
votes
1 answer

Installing app with android.permission.INSTALL_PACKAGES permission and root

This is just a POC app that I am creating to try something but I have an older rooted device and trying to create an installer app that can manage other apps on the device by itself. I added the permissions
tyczj
  • 71,600
  • 54
  • 194
  • 296
0
votes
0 answers

What Is packageappinstaller for android? What other kind of apps are available?

I'm curious as to what packageappinstaller can do and what kind of apps are available through. Also what is an apk and what's its purpose? Just need an explanation
0
votes
0 answers

Silent update application with device owner rights

I try to update application in background. My code: suspend fun installApk(file: File) { withContext(Dispatchers.IO) { if (extractVersion(file.absolutePath) <= BuildConfig.VERSION_CODE) { return@withContext } …
0
votes
0 answers

Is it possible to programmatically cancel an ongoing package installing that I've initiated with PackageInstaller?

I have an app that lets users download an apk fetched through a url, and they can cancel its download via the DownloadManager API in Android, I've been wondering if the PackageInstaller API has a method like the DownloadManager's remove(), which…
0
votes
1 answer

Restarting self-updating android app following user acceptance of the update

I am new to Android development, and I am trying to add a feature into an app to support checking our server for an update, and if one is available, downloading it and installing it. The app is for a dedicated set top box, where it is the only app…
paul
  • 1
  • 1
0
votes
2 answers

PackageInstaller does not work on MIUI optimization mode

I created a test application for installing apk files. PackageInstaller was used for this. The app works well. However, for Xiaomi in BroadcastReceiver I get the "INSTALL_FAILED_INTERNAL_ERROR: Permission Denied" error. But if you enable developer…
0
votes
6 answers

Getting error Bad File Descriptor while installing pip

whenever i try to install pip i always get this error. pls help . i dont know how to fix this i tried doing it using the default python executable using the modify method and also tried the get-pip.py file method nothing works. i have checked my…
mysteri0us
  • 33
  • 1
  • 8