Droid-ify / client

F-Droid client with Material UI.
GNU General Public License v3.0
4k stars 86 forks source link

[Crash] Installation permission prompt acceptance. #822

Open RokeJulianLockhart opened 2 months ago

RokeJulianLockhart commented 2 months ago

Describe the bug

Allowing Droid-ify to install untrusted applications caused Package Installer to crash:

```log FATAL EXCEPTION: main Process: com.google.android.packageinstaller, PID: 16376 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.packageinstaller/com.android.packageinstaller.PackageInstallerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.pm.PackageInstaller$SessionInfo.getResolvedBaseApkPath()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3783) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3923) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2444) 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:8223) 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:977) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.pm.PackageInstaller$SessionInfo.getResolvedBaseApkPath()' on a null object reference at com.android.packageinstaller.PackageInstallerActivity.onCreate(PackageInstallerActivity.java:371) at android.app.Activity.performCreate(Activity.java:8595) at android.app.Activity.performCreate(Activity.java:8573) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1457) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3765) ... 12 more ```

I don't know whether the AOSP JVM needs debug symbols, nor how one would install them if so.

To Reproduce

Steps to reproduce the behavior:

  1. Attempt to install https://f-droid.org/packages/us.spotco.malwarescanner/
  2. After the dialog (attributed to Droid-ify, but evidently provided by the OS) to allow Droid-ify to install untrusted applications was accepted and I was taken to com.android.settings, Package Installer crashed, and Scoop caught the trace.

Smartphone :

Additional context

I'm unable to cancel the installation, now:

https://github.com/user-attachments/assets/2191a46e-035f-4bed-9db6-e353b59ff9a9