Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Package installer keeps stopping": can't install on new Pixel 8 #1112

Closed
NelsonMinar opened this issue Dec 21, 2023 · 11 comments
Closed

"Package installer keeps stopping": can't install on new Pixel 8 #1112

NelsonMinar opened this issue Dec 21, 2023 · 11 comments
Milestone

Comments

@NelsonMinar
Copy link

Thank you for GPSLogger, it's a great tool. I just got a new phone and am unable to install the app. Trying to install results in nothing happening after clicking "install" to run the APK, the install dialog just closes but nothing is installed. If I try several times in quick succession I get a popup "Package installer keeps stopping".

I've tried installing several versions: 129 on GitHub via sideload (from Chrome), 127, 128 and 129 on F-Droid via their installer, the 129 on F-Droid via a sideload. All fail the same way. I can install other apps no problem both with sideloading and F-Droid. I also have GPSLogger 129 installed on my old phone no problem. I was able to browse the GPSLogger APK in Solid Explorer and it looks like a plausible zip archive for a program.

The phone I can't install on is a new Pixel 8 running latest Android 14. I set the phone up with a restore from an old phone that had GPSLogger on it, but the GPSLogger app didn't get installed with the phone setup (no surprise.) I don't know if the phone migration stuff could have picked up some old state or config from GPSLogger on the old phone but it seems unlikely.

I've tried resetting Package Installer, clearing caches and rebooting. No joy.

There's no visible feedback on why the package installer keeps crashing so I'm not sure how to debug this further.

@NelsonMinar
Copy link
Author

In some sort of Christmas miracle I was able to install GPSLogger today. I didn't change anything in particular. I did run the installer this time from Google's Files app, instead of F-Droid or Solid Explorer. I don't think that should make a difference (F-Droid has installed other apps just fine) but I didn't test further.

Sorry to take up your time. Will close this but maybe the notes will help someone else with a similar problem in the future.

@ohhai
Copy link

ohhai commented Mar 11, 2024

@NelsonMinar it isn't just your issue: seems like the build from F-Droid can't be installed at Android 14. My Pixel 7a has same problem.
So it's worth reopening, I think (thank you for keeping).

@NelsonMinar
Copy link
Author

FWIW 129 has been running on my Android 14 phone OK since I managed to get it to install. At least mostly, it might have been stopped once or twice, I'm having other troubles with battery saving and background processing on this new phone.

When I visit the F-Droid store in the app I see a note "This app was built for an older version of Android and cannot be updated automatically."

On a quick glance I don't see an open GitHub issue about GPSLogger and Android 14. If it's known to be a problem it'd be nice to have a new ticket for that.

@mendhak mendhak reopened this Mar 12, 2024
@mendhak
Copy link
Owner

mendhak commented Mar 12, 2024

I've reopened (but not investigated yet), I will try to install from F-Droid store and see what happens. I have a Pixel 6 with Android 14

@mendhak
Copy link
Owner

mendhak commented Mar 12, 2024

I can't install from the F-Droid app at all. I managed to find a few other links with a similar issue, pointing at a bug in Android 14, but that's supposed to have been resolved.

https://android.stackexchange.com/questions/256015/package-installer-crashes-when-installing-certain-apps-java-lang-runtimeexcept

uazo/cromite#595

Catfriend1/syncthing-android#1075

Razeeman/Android-SimpleTimeTracker#144

Tracked to here: https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/libs/hwui/jni/Bitmap.cpp;l=883?q=Bitmap_writeToParcel&ss=android%2Fplatform%2Fsuperproject%2Fmain

Android Tracker issue link: https://issuetracker.google.com/issues/303849830

Stacktrace, I got this running logcat and saw this happen whenever I clicked Install in the F-Droid app.

FATAL EXCEPTION: main
Process: com.google.android.packageinstaller, PID: 17427
java.lang.RuntimeException: Could not copy bitmap to parcel blob.
	at android.graphics.Bitmap.nativeWriteToParcel(Native Method)
	at android.graphics.Bitmap.writeToParcel(Bitmap.java:2271)
	at android.os.Parcel.writeParcelable(Parcel.java:2584)
	at com.android.packageinstaller.PackageUtil$AppSnippet.writeToParcel(PackageUtil.java:151)
	at android.os.Parcel.writeParcelable(Parcel.java:2584)
	at android.os.Parcel.writeValue(Parcel.java:2485)
	at android.os.Parcel.writeValue(Parcel.java:2362)
	at android.os.Parcel.writeArrayMapInternal(Parcel.java:1298)
	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1843)
	at android.os.Bundle.writeToParcel(Bundle.java:1389)
	at android.os.Parcel.writeBundle(Parcel.java:1367)
	at android.content.Intent.writeToParcel(Intent.java:11807)
	at android.os.Parcel.writeTypedObject(Parcel.java:2203)
	at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2077)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1873)
	at android.app.Activity.startActivityForResult(Activity.java:5615)
	at android.app.Activity.startActivityForResult(Activity.java:5573)
	at android.app.Activity.startActivity(Activity.java:6071)
	at android.app.Activity.startActivity(Activity.java:6038)
	at com.android.packageinstaller.PackageInstallerActivity.startInstall(PackageInstallerActivity.java:701)
	at com.android.packageinstaller.PackageInstallerActivity.lambda$bindUi$0(PackageInstallerActivity.java:479)
	at com.android.packageinstaller.PackageInstallerActivity.$r8$lambda$RCIm8wl1VPqdfQgkgmrBIDbuvOQ(PackageInstallerActivity.java:0)
	at com.android.packageinstaller.PackageInstallerActivity$$ExternalSyntheticLambda0.onClick(R8$$SyntheticClass:0)
	at com.android.packageinstaller.AlertController$ButtonHandler.handleMessage(AlertController.java:144)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8248)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

But not clear to me what a workaround fix is. Is it something related to the monochrome icons?

@NelsonMinar
Copy link
Author

Glad you can reproduce the problem! I still don't know why it worked for me magically after several times it did not.

The monochrome icon comment makes me want to mention I'm using the Niagara Launcher with its built-in monochrome icon replacements ("Anycons", which get colored by Material You). I previously was using the Pix Material You icon pack. I'd like to think the launcher's icons wouldn't affect the installer and I've had no issues with other apps. But since you mentioned icons...

mendhak added a commit that referenced this issue Mar 13, 2024
…ea why.

Somehow this icon being 500dp was causing a "java.lang.RuntimeException: Could not copy bitmap to parcel blob." during APK installation.
The issue is incorrectly closed at https://issuetracker.google.com/issues/303849830
I've followed guesswork and reduced the size of this icon and somehow it works now.
Issue #1112
@mendhak
Copy link
Owner

mendhak commented Mar 13, 2024

Through hours of random guesswork a highly rigorous and scientific process, I have reduced this icon's size and this change works. I'll include it in Milestone 130.

43276a0

@mendhak
Copy link
Owner

mendhak commented Apr 1, 2024

v130 is now on FDroid and the releases.

@mendhak mendhak closed this as completed Apr 1, 2024
@NelsonMinar
Copy link
Author

I verified the fix. I just reinstalled v130 from F-Droid on my Pixel 8, Android 14. No problems. Thanks for figuring this out and fixing it.

F-Droid is still complaining on the app page "This app was built for an older version of Android and cannot be updated automatically" but that doesn't stop the install from working. Presumably you know all about that already.

@mendhak
Copy link
Owner

mendhak commented Apr 5, 2024

I don't know why it's appearing, I think that warning is because I have a low minSdk. I see this thread on the FDroid forums which talks about something similar :

https://forum.f-droid.org/t/play-protect-saying-old-version-of-apk-does-not-contain-latest-privacy-security-in-fdroid-apk/20391/25

If that is the reason it'll keep appearing for a long time. I try to keep backward compatibility with old devices, until some Android upgrades force a higher minimum.

@NelsonMinar
Copy link
Author

What worries me here is the "cannot be updated automatically part". I'll see how bad it is when the next version comes out and open a new issue if it makes upgrading too difficult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants