Skip to content

android: the released APK declares no INTERNET permission, so joining an incident cannot work #381

Closed

Description

@DeepDiver1975

What

src/LageBuch.App.Android/AndroidManifest.xml declares no <uses-permission android:name="android.permission.INTERNET" />, and nothing in LageBuch.App.Android.csproj adds one.

.NET for Android injects INTERNET automatically only for Debug builds (for the debugger). The local debug output confirms the injection:

$ grep -o 'uses-permission[^/]*' src/LageBuch.App.Android/obj/Debug/net9.0-android/android/AndroidManifest.xml
uses-permission android:name="android.permission.INTERNET"
uses-permission android:name="de.codeforfire.lagebuch.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"

The shipped release APK does not have it. Checked against the published artifact:

$ gh release download v0.5.0 --pattern '*.apk'
$ unzip -p lagebuch-0.5.0.apk AndroidManifest.xml > m.axml
$ strings -el m.axml | grep -i 'android.permission'
android.permission.DUMP

android.permission.DUMP comes from androidx.profileinstaller's benchmark receiver. There is no INTERNET string anywhere in the manifest's string pool.

Impact

Without INTERNET, Android refuses every socket the app opens. The Android companion's entire purpose is joining an incident hosted on a laptop over LAN/Tailscale (RemoteIncidentSession, https://<host>:5859), so on a release build that must fail — the app can only ever work against a debug deployment.

This should be confirmed on a real device against a release APK before assuming the scope; it is possible something else masks it. But relying on a Debug-only auto-injection is wrong regardless of the outcome.

Fix

Declare it explicitly in src/LageBuch.App.Android/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

Worth adding alongside: a check that the release APK carries the expected permission set, so this cannot regress silently. The manifest is also the right place to keep android:usesCleartextTraffic="false" company — the app is TLS-only by design.

Found via

Verifying claims for docs/datenschutz-und-sicherheit.md (#380). The data-protection page deliberately makes no claim about Android network permissions until this is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions