Skip to content

The app crashes when Android 16 starts the shared VPN #698

@linggan-ua

Description

@linggan-ua

After updating to Android 16, the app crashes when I use it, and these are the system error logs:
java.lang.RuntimeException: Unable to start service be.mygod.vpnhotspot.TetheringService@5e4873a with Intent { xflg=0x4 cmp=be.mygod.vpnhotspot/.TetheringService (has extras) }: java.lang.SecurityException: Starting FGS with type specialUse callerApp=ProcessRecord{7f532f4 1983:be.mygod.vpnhotspot/u0a412} targetSDK=35 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_SPECIAL_USE]
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5955)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2909)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loopOnce(Looper.java:265)
at android.os.Looper.loop(Looper.java:358)
at android.app.ActivityThread.main(ActivityThread.java:10080)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:616)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1115)
Caused by: java.lang.SecurityException: Starting FGS with type specialUse callerApp=ProcessRecord{7f532f4 1983:be.mygod.vpnhotspot/u0a412} targetSDK=35 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_SPECIAL_USE]
at android.os.Parcel.createExceptionOrNull(Parcel.java:3362)
at android.os.Parcel.createException(Parcel.java:3346)
at android.os.Parcel.readException(Parcel.java:3329)
at android.os.Parcel.readException(Parcel.java:3271)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7704)
at android.app.Service.startForeground(Service.java:863)
at be.mygod.vpnhotspot.ServiceNotification$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)
at be.mygod.vpnhotspot.ServiceNotification.startForeground(ServiceNotification.kt:61)
at be.mygod.vpnhotspot.ServiceNotification.startForeground$default(ServiceNotification.kt:54)
at be.mygod.vpnhotspot.TetheringService.onStartCommand(TetheringService.kt:139)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5937)
... 9 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActiveServices.validateForegroundServiceType(ActiveServices.java:3060)
at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2736)
at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1925)
at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:15177)
at android.app.IActivityManager$Stub.onTransact$setServiceForeground$(IActivityManager.java:13847)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions