drawpile / Drawpile

A collaborative drawing program
http://drawpile.net/
GNU General Public License v3.0
1.03k stars 130 forks source link

Installation on Android 14 fails #1363

Closed n0phx closed 1 week ago

n0phx commented 2 weeks ago

When trying to install the app on my Samsung Galaxy Lite S6 tablet (Running Android 14) (even after enabling the option to install APKs from unknown sources), the installation is blocked by the following message:

Unsafe app blocked

This app was built for an older version of Android and doesn't include the latest privacy protections...

Googling around I think the recommended solution to this is that the app must be rebuilt with a more recent version of the Android SDK which would solve the issue.

askmeaboutlo0m commented 2 weeks ago

Hrm, that is unfortunate, apparently Google now started enforcing the minimum SDK versions even for applications outside of the Play Store. Which means we have to choose between locking out users on older versions or locking out users on newer versions of Android, which is not a cool situation.

I also have an S6 Lite, so I guess I'll see about updating it to try and reproduce this. If there's no way around it, I guess we'll have to bump the SDK version.

n0phx commented 2 weeks ago

Not sure how much hassle would it introduce, but if maintainable, maybe even two different builds, one with an older and one with the newer SDK?

askmeaboutlo0m commented 2 weeks ago

Yeah, it would make sense. We got the 32 bit version for older devices anyway, so it'd make sense to keep it on the old SDK. Hopefully the intersection of devices that's on Android 14 but still stuck on a 32 bit ARM processor is empty.

askmeaboutlo0m commented 1 week ago

I'm still fighting with getting things to build properly and my S6 Lite doesn't feel like updating to Android 14, but I think I have an APK that targets the correct API now.

@n0phx can you check if it installs for you? I uploaded it to the continuous release, the artifact is called "APK with target API 34". If it won't install because it's an unsigned debug build then I gotta wrangle with it a bit further to get that working again.

n0phx commented 1 week ago

Thanks, that was fast! I tried to install it and it did succeed now. I haven't been able yet to extensively test the app, but it did install and it runs fine on my device. Thanks!

askmeaboutlo0m commented 1 week ago

Cool, that's a good sign anyway. Looks like we don't have to bump the minimum SDK level, so maybe this actually doesn't break compatibility with older devices after all.

I still gotta bang on this a bit further to actually get it to build again in CI, so I'll let you know when there's a newer build of it.

askmeaboutlo0m commented 1 week ago

Alright, it should be building in CI now, so you can install it from the continuous release in its regular capacity to try it out: https://github.com/drawpile/Drawpile/releases/tag/continuous

You'll probably have to uninstall the other one, since Android won't install a release build over a debug build.

n0phx commented 1 week ago

This version (the release build from CI) installed fine as well, and it runs on the device, thanks!

askmeaboutlo0m commented 1 week ago

Cool, I'll keep this ticket open for a bit until I've run it by some folks to check if we need to also provide a version against an older Android SDK.

askmeaboutlo0m commented 1 week ago

Had to make a minor patch to Qt to prevent it from trying to link against a function that doesn't exist on older Android versions and that we're not using anyway, thanks @MorrowShore for testing it on various devices. But looks like everything's good now and we can support both old and new devices without needing multiple builds.

Thanks for reporting it!