Note: Creating this issue is the last thing I'm doing here with this app. I only helped here a bit, so it will simply be as it was before I did some stuff. I will not be creating a pull request but will add a link to a commit from my repo as the last thing I do there (link has been added).
See also: #266
Lower target does not help
- Lower target eg Android 15 still fails on Android 16. So this should cause the app to fail roughly in later versions of Android 16 or possibly Android 17, whenever they begin to enforce it. Expected change during year 2026.
Lower target can be kept if wanting
- App does not need to advance to higher sdk to do this. Just implement the changes as detailed below.
To user, app appears to be working but nothing happens
- The app start/stop toggle enables and FTP server appears to be running, however unable for anything to connect. There is a logcat entry "serverThread non-null but !isAlive()" as the only thing I'm seeing with quickly looking at this and w/o running debugger (not necessary here except for getting an exact socket error returned by the enforcement). The app is unable to use sockets so nothing can connect despite it looking like its running.
Working solution must be implemented app side:
-
Users cannot do this*. It requires app side permission added to app manifest.
- *In theory maybe
adb shell am compat disable RESTRICT_LOCAL_NETWORK <package_name> will work for users as a workaround, but this is unknown at this time, as the change is not yet in use. Package name eg "be.ppareit.swiftp_free" without quotes. Can obtain package name from ADB eg "adb shell pm list packages -f -3".
-
https://developer.android.com/about/versions/16/behavior-changes-16#developer-guidance-opt-in
-
According to the Android documentation here ^, it requires:
-
Ensure the app declares the NEARBY_WIFI_DEVICES permission in its manifest.
Build and install.
Go to Settings > Apps > [Application Name] > Permissions > Nearby devices > Allow.
-
Should add in a screen, message, and/or possibly open it directly, to direct users to the setting screen.
-
Users will have to toggle "Android OS settings > Apps > App > Nearby devices > Allow" before the app can work after the app has permission implemented. (Where possible, can instead long press on app icon to get to the Android OS app settings > Nearby devices > Allow.)
-
Unknown what this means "Note: In a future Android release, this feature will be guarded by a new permission in the Nearby devices permission group" if it means that a different Nearby devices related permission will be needed in manifest or that no other change will be needed as is user side difference. If its the former, the app will need another change to keep working.
-
This has been tested on Android 16 QPR0 with enforcement test enabled showing its going to be required in a future version when they enable it.
Commit with minimum required change for working app:
Note: Creating this issue is the last thing I'm doing here with this app. I only helped here a bit, so it will simply be as it was before I did some stuff. I will not be creating a pull request but will add a link to a commit from my repo as the last thing I do there (link has been added).
See also: #266
Lower target does not help
Lower target can be kept if wanting
To user, app appears to be working but nothing happens
Working solution must be implemented app side:
Users cannot do this*. It requires app side permission added to app manifest.
adb shell am compat disable RESTRICT_LOCAL_NETWORK <package_name>will work for users as a workaround, but this is unknown at this time, as the change is not yet in use. Package name eg "be.ppareit.swiftp_free" without quotes. Can obtain package name from ADB eg "adb shell pm list packages -f -3".https://developer.android.com/about/versions/16/behavior-changes-16#developer-guidance-opt-in
According to the Android documentation here ^, it requires:
Ensure the app declares the NEARBY_WIFI_DEVICES permission in its manifest.
Build and install.
Go to Settings > Apps > [Application Name] > Permissions > Nearby devices > Allow.
Should add in a screen, message, and/or possibly open it directly, to direct users to the setting screen.
Users will have to toggle "Android OS settings > Apps > App > Nearby devices > Allow" before the app can work after the app has permission implemented. (Where possible, can instead long press on app icon to get to the Android OS app settings > Nearby devices > Allow.)
Unknown what this means "Note: In a future Android release, this feature will be guarded by a new permission in the Nearby devices permission group" if it means that a different Nearby devices related permission will be needed in manifest or that no other change will be needed as is user side difference. If its the former, the app will need another change to keep working.
This has been tested on Android 16 QPR0 with enforcement test enabled showing its going to be required in a future version when they enable it.
Commit with minimum required change for working app: