os-issue-tracker icon indicating copy to clipboard operation
os-issue-tracker copied to clipboard

Display issue for Files app name when installing APKs through it

Open antarctic3431 opened this issue 1 year ago • 1 comments

APKs downloaded using Vanadium, saved to the Downloads folder, and opened using the Files app (com.android.documentsui), are being blocked despite appropriate permissions being enabled. This behaviour is very similar to what was experienced shortly after the initial GrapheneOS update to Android 14 (since patched), as discussed in issue #2528.

Regarding that previous issue, the problem was resolved with the release of GrapheneOS 2023103000:

restore Android 13 behavior for installing APKs from the file manager by requesting permission for the app which created the APK (current Google Files behavior is a bit different and requests permission for Google Files, but the AOSP Files approach seems more useful)

I believe this resurfaced after updating to 2024030600, the first GrapheneOS release based on Android 14 QPR2.

Steps to replicate (example using Signal APK):

  1. Open Vanadium, and load the official Signal APK download page: https://signal.org/android/apk/ (Screenshot 1)
  2. Download the available APK
  3. Vanadium prompts where to save the download; the Downloads folder is populated (Screenshot 2)
  4. APK is downloaded and saved to the Downloads folder
  5. Open Settings > Apps > Special app access > Install unknown apps > Vanadium > toggle Allow from this source (Screenshot 3)
  6. Open Files > Downloads and open the Signal APK
  7. APK is blocked with the following message: (Screenshot 4) Download Manager For your security, your phone currently isn't allowed to install unknown apps from this source. You can change this in Settings.

This behaviour isn't expected, as the APK was downloaded and created by Vanadium, and the device has been granted the appropriate permission to install/update apps from Vanadium as the source.

Pixel 7: 2024032100 Stable Vanadium: 123.0.6312.40.0 Stable

Screenshots:

001 Screenshot 1

002 Screenshot 2

003 Screenshot 3

004 Screenshot 4

antarctic3431 avatar Mar 27 '24 16:03 antarctic3431

We removed our revert for this behavior. This approach seems to be more secure than granting the install permission to the app. It appears to be intended for it to work this way since the stock OS works this way via their Files app and they kept the behavior for Android 14 QPR1 and Android 14 QPR2. We need to make a fix for the display issue instead of reverting this change.

thestinger avatar Mar 27 '24 17:03 thestinger

Thank you for verifying.

Until a fix is released, are there any safe workarounds to permit updating any installed apps via APKs downloaded using Vanadium (whereas presently they are blocked per the above screenshots)?

antarctic3431 avatar Mar 28 '24 16:03 antarctic3431

@antarctic3431 They're not blocked, you just haven't permitted the Files app to do it.

thestinger avatar Mar 28 '24 16:03 thestinger

@thestinger Understood, thanks.

In Install unknown apps and toggling Show system, the Files app is not displayed. There is though Download Manager, and Downloads, among others. Would granting Download Manager permission allow APKs launched in the Files app to open?

I'm assuming that since this is a display issue, Files is being mislabeled in Install unknown apps?

antarctic3431 avatar Mar 28 '24 16:03 antarctic3431

Try giving it to download manager as it requested.

thestinger avatar Mar 28 '24 16:03 thestinger

Can confirm that granting permission to Download Manager permits APKs launched using the Files app to install/update as otherwise expected.

Tried this on two separate devices running 2024032100. Neither showed the Files app in the list of apps (including Show system) in Install unknown apps, but granting Download Manager permission on both devices allowed, in this case, Signal to install (or update if already installed).

antarctic3431 avatar Mar 28 '24 16:03 antarctic3431