BluetoothDevice.uuids returning null crashes the app
Closed this issue · 19 comments
Describe the bug
aln crashes on start
To Reproduce
Steps to reproduce the behavior:
- Follow the workaround instructions
- Open aln
System information
I used this SO for the workaround: https://github.com/kavishdevar/aln/releases/download/v0.0.1/libbluetooth_jni-a15.so
$ sha256sum /data/adb/post-fs-data.d/bt.sh
962b9937d9783ad1ffe8a5908bb1640b3d6beae938075ca0f028906e08aaa47c
$ sha256sum /data/adb/modules/btl2capfix/module.prop
ee5e0aa0fd73e81319a5c04f55b7c8f58009e478dbaf96a7a29c146917524c81
$ sha256sum /data/adb/modules/btl2capfix/system/lib64/libbluetooth_jni.so
73cc59ddd10394f5ade71fa5952c64ed014d8ecf1d173f208fab197904a5ba1d
$ sha256sum /data/local/tmp/overlay/upper/libbluetooth_jni.so
73cc59ddd10394f5ade71fa5952c64ed014d8ecf1d173f208fab197904a5ba1d
$ sha256sum /data/local/tmp/overlay2/upper/libbluetooth_jni.so
73cc59ddd10394f5ade71fa5952c64ed014d8ecf1d173f208fab197904a5ba1d
$ sha256sum /system/lib64/libbluetooth_jni.so
73cc59ddd10394f5ade71fa5952c64ed014d8ecf1d173f208fab197904a5ba1d
$ ls /system/lib64/libblue*
/system/lib64/libbluetooth_jni.so
Additional context
Crash dump:
FATAL EXCEPTION: main
Process: me.kavishdevar.aln, PID: 17447
java.lang.RuntimeException: Unable to start service me.kavishdevar.aln.services.AirPodsService@f218dd2 with Intent { cmp=me.kavishdevar.aln/.services.AirPodsService }: java.lang.NullPointerException: getUuids(...) must not be null
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5165)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2469)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8706)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
Caused by: java.lang.NullPointerException: getUuids(...) must not be null
at me.kavishdevar.aln.services.AirPodsService.onStartCommand(AirPodsService.kt:322)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5147)
... 9 more
sudo logcat | grep me.kavishdevar.aln
:
01-05 21:53:07.817 1675 3494 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.kavishdevar.aln/.MainActivity bnds=[46,1666][158,1778]} with LAUNCH_MULTIPLE from uid 10579 (BAL_ALLOW_VISIBLE_WINDOW) result code=0
01-05 21:53:07.822 3065 3265 V WindowManagerShell: Transition requested (#27): android.os.BinderProxy@5434e1b TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=6374 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.kavishdevar.aln/.MainActivity } baseActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} topActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} origActivity=null realActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} numActivities=1 lastActiveTime=113694 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@356abb8} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 72 - 0, 0) topActivityInfo=ActivityInfo{c895d91 me.kavishdevar.aln.MainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= falseisLetterboxEducationEnabled= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=1080 topActivityLetterboxHeight=2340 isUserFullscreenOverrideEnabled=false isSystemFullscreenOverrideEnabled=false cameraCompatTaskInfo=CameraCompatTaskInfo { cameraCompatControlState=hidden freeformCameraCompatMode=inactive}}}, pipTask = null, remoteTransition = null, displayChange = null, flags = 0, debugId = 27 }
01-05 21:53:07.828 1675 2457 I ActivityManager: Start proc 11422:me.kavishdevar.aln/u0a661 for next-top-activity {me.kavishdevar.aln/me.kavishdevar.aln.MainActivity}
01-05 21:53:07.939 1675 2438 V WindowManager: Sent Transition (#27) createdAt=01-05 21:53:07.801 via request=TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=6374 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.kavishdevar.aln/.MainActivity } baseActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} topActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} origActivity=null realActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} numActivities=1 lastActiveTime=113694 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{RemoteToken{1aae32e Task{e1fb9a0 #6374 type=standard A=10661:me.kavishdevar.aln}}} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 72 - 0, 0) topActivityInfo=ActivityInfo{a8eeecf me.kavishdevar.aln.MainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= falseisLetterboxEducationEnabled= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=1080 topActivityLetterboxHeight=2340 isUserFullscreenOverrideEnabled=false isSystemFullscreenOverrideEnabled=false cameraCompatTaskInfo=CameraCompatTaskInfo { cameraCompatControlState=hidden freeformCameraCompatMode=inactive}}}, pipTask = null, remoteTransition = null, displayChange = null, flags = 0, debugId = 27 }
01-05 21:53:07.939 1675 2438 V WindowManager: {WCT{RemoteToken{1aae32e Task{e1fb9a0 #6374 type=standard A=10661:me.kavishdevar.aln}}} m=OPEN f=NONE leash=Surface(name=Task=6374)/@0x43fae2 sb=Rect(0, 0 - 1080, 2340) eb=Rect(0, 0 - 1080, 2340) d=0 taskParent=-1},
01-05 21:53:08.415 1675 3193 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{db5765 fr.neamar.kiss/10579} BLOCKED
01-05 21:53:08.638 1675 3964 I ActivityManager: Background started FGS: Allowed [callingPackage: me.kavishdevar.aln; callingUid: 10661; uidState: TOP ; uidBFSL: [BFSL]; intent: Intent { cmp=me.kavishdevar.aln/.services.AirPodsService }; code:PROC_STATE_TOP; tempAllowListReason:<null>; targetSdkVersion:35; callerTargetSdkVersion:35; startForegroundCount:1; bindFromPackage:null: isBindService:false]
01-05 21:53:08.704 11422 11422 E AndroidRuntime: Process: me.kavishdevar.aln, PID: 11422
01-05 21:53:08.704 11422 11422 E AndroidRuntime: java.lang.RuntimeException: Unable to start service me.kavishdevar.aln.services.AirPodsService@20e8e1 with Intent { cmp=me.kavishdevar.aln/.services.AirPodsService }: java.lang.NullPointerException: getUuids(...) must not be null
01-05 21:53:08.704 11422 11422 E AndroidRuntime: at me.kavishdevar.aln.services.AirPodsService.onStartCommand(AirPodsService.kt:322)
01-05 21:53:08.711 1675 3938 W ActivityTaskManager: Force finishing activity me.kavishdevar.aln/.MainActivity
01-05 21:53:08.753 1675 3964 I WindowManager: WIN DEATH: Window{1f32558 u0 me.kavishdevar.aln/me.kavishdevar.aln.MainActivity}
01-05 21:53:08.755 1675 4444 I ActivityManager: Process me.kavishdevar.aln (pid 11422) has died: fg TOP
01-05 21:53:08.756 1675 4444 W ActivityManager: Canceling start item Intent { cmp=me.kavishdevar.aln/.services.AirPodsService } in service me.kavishdevar.aln/.services.AirPodsService
01-05 21:53:08.756 1675 4444 W ForegroundServiceTypeLoggerModule: Logger should be tracking FGS types correctly for UID 10661 in package me.kavishdevar.aln
01-05 21:53:08.756 1675 4444 W ForegroundServiceTypeLoggerModule: Logger should be tracking FGS types correctly for UID 10661 in package me.kavishdevar.aln
01-05 21:53:08.756 1675 4444 W ForegroundServiceTypeLoggerModule: Logger should be tracking FGS types correctly for UID 10661 in package me.kavishdevar.aln
01-05 21:53:08.834 1675 2438 V WindowManager: {WCT{RemoteToken{1aae32e Task{e1fb9a0 #6374 type=standard A=10661:me.kavishdevar.aln}}} m=CLOSE f=NONE leash=Surface(name=Task=6374)/@0x43fae2 sb=Rect(0, 0 - 1080, 2340) eb=Rect(0, 0 - 1080, 2340) d=0 taskParent=-1},
01-05 21:53:08.862 1675 1675 I NotificationService: Cannot find enqueued record for key: 0|me.kavishdevar.aln|1|null|10661
01-05 21:53:09.215 1675 2441 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{301c2a3 u0 me.kavishdevar.aln/.MainActivity t-1 f}}
01-05 21:53:10.632 1675 2484 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{a2f29fe com.apps42.summarizer.app/10542} BLOCKED
01-05 21:53:12.607 1675 2484 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{e466f6e com.endel.endel/10678} BLOCKED
01-05 21:53:25.780 1675 2484 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{caa6731 com.apps42.summarizer.app/10542} BLOCKED
01-05 21:53:35.009 1675 2484 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{b96e74d com.nytimes.android/10539} BLOCKED
01-05 21:53:51.987 1675 2484 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{d6bc90a fr.playsoft.lefigarov3/10649} BLOCKED
01-05 21:53:53.042 1675 2484 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{7ec91ad inflow.adhd.productivity/10658} BLOCKED
01-05 21:54:08.037 1675 2484 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{9344262 inflow.adhd.productivity/10658} BLOCKED
01-05 21:56:11.655 1675 4032 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.kavishdevar.aln/.MainActivity bnds=[46,1370][158,1482]} with LAUNCH_MULTIPLE from uid 10579 (BAL_ALLOW_VISIBLE_WINDOW) result code=0
01-05 21:56:11.655 3065 3265 V WindowManagerShell: Transition requested (#55): android.os.BinderProxy@1f69998 TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=6378 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.kavishdevar.aln/.MainActivity } baseActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} topActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} origActivity=null realActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} numActivities=1 lastActiveTime=297532 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@c5be5f1} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 72 - 0, 0) topActivityInfo=ActivityInfo{c9685d6 me.kavishdevar.aln.MainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= falseisLetterboxEducationEnabled= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=1080 topActivityLetterboxHeight=2340 isUserFullscreenOverrideEnabled=false isSystemFullscreenOverrideEnabled=false cameraCompatTaskInfo=CameraCompatTaskInfo { cameraCompatControlState=hidden freeformCameraCompatMode=inactive}}}, pipTask = null, remoteTransition = null, displayChange = null, flags = 0, debugId = 55 }
01-05 21:56:11.661 3578 3578 I TopTaskTracker: onTaskMovedToFront: (moved taskInfo to front) taskId=6378, baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.kavishdevar.aln/.MainActivity }
01-05 21:56:11.661 3578 3578 I TopTaskTracker: onTaskMovedToFront: (removing task list overflow) taskId=6378, baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.kavishdevar.aln/.MainActivity }
01-05 21:56:11.672 1675 2457 I ActivityManager: Start proc 16214:me.kavishdevar.aln/u0a661 for next-top-activity {me.kavishdevar.aln/me.kavishdevar.aln.MainActivity}
01-05 21:56:11.706 1675 2438 V WindowManager: Sent Transition (#55) createdAt=01-05 21:56:11.637 via request=TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=6378 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.kavishdevar.aln/.MainActivity } baseActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} topActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} origActivity=null realActivity=ComponentInfo{me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} numActivities=1 lastActiveTime=297532 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{RemoteToken{56c8e50 Task{d7a4784 #6378 type=standard A=10661:me.kavishdevar.aln}}} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 72 - 0, 0) topActivityInfo=ActivityInfo{4752849 me.kavishdevar.aln.MainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= falseisLetterboxEducationEnabled= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=1080 topActivityLetterboxHeight=2340 isUserFullscreenOverrideEnabled=false isSystemFullscreenOverrideEnabled=false cameraCompatTaskInfo=CameraCompatTaskInfo { cameraCompatControlState=hidden freeformCameraCompatMode=inactive}}}, pipTask = null, remoteTransition = null, displayChange = null, flags = 0, debugId = 55 }
01-05 21:56:11.707 1675 2438 V WindowManager: {WCT{RemoteToken{56c8e50 Task{d7a4784 #6378 type=standard A=10661:me.kavishdevar.aln}}} m=OPEN f=NONE leash=Surface(name=Task=6378)/@0x73f4d76 sb=Rect(0, 0 - 1080, 2340) eb=Rect(0, 0 - 1080, 2340) d=0 taskParent=-1},
01-05 21:56:11.780 16214 16214 W ziparchive: Unable to open '/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.dm': No such file or directory
01-05 21:56:11.780 16214 16214 W ziparchive: Unable to open '/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.dm': No such file or directory
01-05 21:56:11.985 16214 16214 D nativeloader: Configuring clns-7 for other apk /data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.apk. target_sdk_version=35, uses_libraries=, library_path=/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/lib/arm64:/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/me.kavishdevar.aln
01-05 21:56:11.999 16214 16214 V GraphicsEnvironment: me.kavishdevar.aln is not listed in per-application setting
01-05 21:56:12.029 1675 2668 I AppsFilter: interaction: PackageSetting{8143d8 me.kavishdevar.aln/10661} -> PackageSetting{db5765 fr.neamar.kiss/10579} BLOCKED
01-05 21:56:12.143 1675 2668 D CoreBackPreview: Window{3f9ec0a u0 me.kavishdevar.aln/me.kavishdevar.aln.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@a52bed6, mPriority=-1, mIsAnimationCallback=false}
01-05 21:56:12.595 1675 2438 W ziparchive: Unable to open '/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.dm': No such file or directory
01-05 21:56:12.598 1675 2438 I ActivityTaskManager: Displayed me.kavishdevar.aln/.MainActivity for user 0: +969ms
01-05 21:56:12.620 1675 2668 W InputManager-JNI: Input channel object 'a1657f0 Splash Screen me.kavishdevar.aln (client)' was disposed without first being removed with the input manager!
01-05 21:56:12.635 1675 2668 I ActivityManager: Background started FGS: Allowed [callingPackage: me.kavishdevar.aln; callingUid: 10661; uidState: TOP ; uidBFSL: [BFSL]; intent: Intent { cmp=me.kavishdevar.aln/.services.AirPodsService }; code:PROC_STATE_TOP; tempAllowListReason:<null>; targetSdkVersion:35; callerTargetSdkVersion:35; startForegroundCount:0; bindFromPackage:null: isBindService:false]
01-05 21:56:12.674 16214 16214 E AndroidRuntime: Process: me.kavishdevar.aln, PID: 16214
01-05 21:56:12.674 16214 16214 E AndroidRuntime: java.lang.RuntimeException: Unable to start service me.kavishdevar.aln.services.AirPodsService@4c391f5 with Intent { cmp=me.kavishdevar.aln/.services.AirPodsService }: java.lang.NullPointerException: getUuids(...) must not be null
01-05 21:56:12.674 16214 16214 E AndroidRuntime: at me.kavishdevar.aln.services.AirPodsService.onStartCommand(AirPodsService.kt:322)
01-05 21:56:12.678 1675 2699 W ActivityTaskManager: Force finishing activity me.kavishdevar.aln/.MainActivity
01-05 21:56:12.710 1675 4032 I ActivityManager: Process me.kavishdevar.aln (pid 16214) has died: fg TOP
01-05 21:56:12.710 1675 3964 I WindowManager: WIN DEATH: Window{3f9ec0a u0 me.kavishdevar.aln/me.kavishdevar.aln.MainActivity}
01-05 21:56:12.711 1675 3964 W InputManager-JNI: Input channel object '3f9ec0a me.kavishdevar.aln/me.kavishdevar.aln.MainActivity (client)' was disposed without first being removed with the input manager!
01-05 21:56:12.711 1675 4032 W ActivityManager: Scheduling restart of crashed service me.kavishdevar.aln/.services.AirPodsService in 1000ms for start-requested
01-05 21:56:12.768 1675 2438 V WindowManager: {WCT{RemoteToken{56c8e50 Task{d7a4784 #6378 type=standard A=10661:me.kavishdevar.aln}}} m=CLOSE f=NONE leash=Surface(name=Task=6378)/@0x73f4d76 sb=Rect(0, 0 - 1080, 2340) eb=Rect(0, 0 - 1080, 2340) d=0 taskParent=-1},
01-05 21:56:12.774 1675 4032 W WindowManager: Exception thrown during dispatchAppVisibility Window{3f9ec0a u0 me.kavishdevar.aln/me.kavishdevar.aln.MainActivity EXITING}
01-05 21:56:12.842 1675 1675 I NotificationService: Cannot find enqueued record for key: 0|me.kavishdevar.aln|1|null|10661
01-05 21:56:13.181 1675 2441 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{3c00997 u0 me.kavishdevar.aln/.MainActivity t-1 f}}
01-05 21:56:13.733 1675 2457 I ActivityManager: Start proc 16945:me.kavishdevar.aln/u0a661 for service {me.kavishdevar.aln/me.kavishdevar.aln.services.AirPodsService}
01-05 21:56:13.838 16945 16945 W ziparchive: Unable to open '/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.dm': No such file or directory
01-05 21:56:13.838 16945 16945 W ziparchive: Unable to open '/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.dm': No such file or directory
01-05 21:56:13.989 16945 16945 D nativeloader: Configuring clns-7 for other apk /data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.apk. target_sdk_version=35, uses_libraries=, library_path=/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/lib/arm64:/data/app/~~udRg7piSu42-7xnUFyHF-g==/me.kavishdevar.aln-fGvFbOK5hnoXrx-_YAA6gA==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/me.kavishdevar.aln
01-05 21:56:13.999 16945 16945 V GraphicsEnvironment: me.kavishdevar.aln is not listed in per-application setting
01-05 21:56:14.099 16945 16945 E AndroidRuntime: Process: me.kavishdevar.aln, PID: 16945
01-05 21:56:14.099 16945 16945 E AndroidRuntime: java.lang.RuntimeException: Unable to start service me.kavishdevar.aln.services.AirPodsService@f218dd2 with Intent { cmp=me.kavishdevar.aln/.services.AirPodsService }: java.lang.NullPointerException: getUuids(...) must not be null
01-05 21:56:14.099 16945 16945 E AndroidRuntime: at me.kavishdevar.aln.services.AirPodsService.onStartCommand(AirPodsService.kt:322)
01-05 21:56:14.102 1675 2439 I ActivityManager: Showing crash dialog for package me.kavishdevar.aln u0
01-05 21:56:14.129 1675 2439 D CoreBackPreview: Window{1c87800 u0 Application Error: me.kavishdevar.aln}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.wi
This is weird. What devices do you have connected via bluetooth with your phone. Usually, the UUIDs of services for a device should not be null.
I will anyway fix the bug so that it doesn't crash at this stage.
What devices do you have connected via bluetooth with your phone.
I tried with none and with my AirPorts connected.
Usually, the UUIDs of services for a device should not be null.
Interestingly the app didn't crash before installing the workaround. Note that otherwise the Bluetooth still works properly with the workaround installed: I can connect to Bluetooth, list devices, play music, etc.
@devnoname120 please try the latest nightly release.
@kavishdevar The app now starts properly and displays my connected AirPods Pro 2 (version with the lightning connector). I was able to change the noise control mode from Noise Cancellation to Off (it worked), then from Off to Noise Cancellation (it worked), then from Noise Cancellation to Adaptive (it worked, but now clicking on other noise control options seems to work in the app but my AirPods Pro 2 (version with the lightning connector) are actually unaffected).
Edit: force closing ALN and then reopening it fixed switching to other modes (let's see how long it works).
Unrelated note: the app screen randomly switches to “AirPods not connected”. When this happens clicking on the refresh 🔄 button at the top right sometimes works, sometimes does nothing. I have to close the app from the app switcher and then reopen it. Sometimes it shows “AirPods not connected” suddenly then the normal screen again, sometimes it stays stuck on “AirPods not connected” until I kill the app from the recents.
Another issue: if I switch to another noise control mode using the touch control stem of my AirPods Pro 2 (version with the lightning connector) it doesn't show the change of mode in ALN. Pressing the refresh button doesn't fix it, and closing the app from the recents doesn't fix it either. I have to force close the app and reopen it in order ALN to show the correct noise control mode that is currently set on my AirPods Pro 2 (version with the lightning connector).
Another issue: the battery percentage of my AirPods Pro 2 (version with the lightning connector) is shown in ALN but the battery percentage of the case is never shown, no matter if it's closed or not.
Unrelated note: the app screen randomly switches to “AirPods not connected”. When this happens clicking on the refresh 🔄 button at the top right sometimes works, sometimes does nothing. I have to close the app from the app switcher and then reopen it. Sometimes it shows “AirPods not connected” suddenly then the normal screen again, sometimes it stays stuck on “AirPods not connected” until I kill the app from the recents.
Ah, that - I don’t know what happens with the service. If this happens often, the notification with the battery status would disappear and instead a “service is running” notification would be shown. Could you confirm if that happens. If this does happen, it means that the app is crashing after the some UI action. In that case, you might be able to grab logs and I can exactly know what is going wrong.
Another issue: if I switch to another noise control mode using the touch control stem of my AirPods Pro 2 (USB-C) it doesn't show the change of mode in ALN. Pressing the refresh button doesn't fix it, and closing the app from the recents doesn't fix it either. I have to force close the app and reopen it in order ALN to show the correct noise control mode that is currently set on my AirPods Pro 2 (USB-C).
Please check if any logs show up when you change the noise control mode in the Debug screen. If they don’t it’s probably AirPods that don’t send the packets. I am using the same model, and this doesn’t seem to happen on my device.
Another issue: the battery percentage of my AirPods Pro 2 (USB-C) is shown in ALN but the battery percentage of the case is never shown, no matter if it's closed or not.
Please keep your airpods in the case for a few seconds, the battery should show up. They only send the battery data for the case only when they’re in the case.
Also, for the Noise Control mode not updating - could you check if the QuickSetting Tile is updated? If it is updated it would mean that the service is working properly, and the app is not updating the UI.
Thanks!
Ah, that - I don’t know what happens with the service. If this happens often, the notification with the battery status would disappear and instead a “service is running” notification would be shown. Could you confirm if that happens. If this does happen, it means that the app is crashing after the some UI action.
Yes I confirm that the notification changes to “service is running”. It seems to be random and doesn't actually require me to press any buttons, I just need to wait a few seconds.
In that case, you might be able to grab logs and I can exactly know what is going wrong.
Which logs should I grab? Logcat or something else?
Please keep your airpods in the case for a few seconds, the battery should show up. They only send the battery data for the case only when they’re in the case.
I kept them in the case open, waited for a few seconds, pressed refresh and it didn't show the battery. Tried closing the case, didn't show either and after a few seconds the app showed them disconnected (which makes sense because they also disconnected from Bluetooth).
Edit: if I start ALN and then connect the following screen shows null and then this:
I am using the same model, and this doesn’t seem to happen on my device.
Do you have the AirPods Pro 2 lightning or USB-C? They have some subtle differences for example the former doesn't support head-tracking / 3D spatial audio (at least on iPhones). I made a mistake while writing my comments I confirm that I have the lightning version, not the USB-C version.
Also, for the Noise Control mode not updating - could you check if the QuickSetting Tile is updated? If it is updated it would mean that the service is working properly, and the app is not updating the UI.
Well for some reason it works now in the UI 🤷♂️ I didn't try the widget yet, will do next time this happens.
Update: so it looks like my other speaker secretly connected to my phone in addition to my AirPods Pro 2. I manually disconnected it and now it looks stable! Is this a bug from ALN where it picks up the top device in the Bluetooth list or something and that list is returned in random order by Android?
Case battery works too (only when AirPods are inside with case open). It would be nice if ALN could remember the last known case battery level, maybe greying it out when it's not a “live” value?
Which logs should I grab? Logcat or something else?
adb logcat | grep me.kavishdevar.aln
I kept them in the case open, waited for a few seconds, pressed refresh and it didn't show the battery. Tried closing the case, didn't show either and after a few seconds the app showed them disconnected (which makes sense because they also disconnected from Bluetooth).
The restart button is to restart the service, and when that happens, even the previously received battery data will be reset. And the app would be waiting until AirPods send it the next time. If you close the case, the AirPods will obviously disconnect. (working on how to connect to the case even when they're not connnected - findmy stuff, but gives us battery data even when not connected)
if I start ALN and then connect the following screen shows null and then this:
Known bug. Please rename the AirPods to whatever you'd like from the app once. I keep on forgetting about this. I'll fix this first now. If you'd like Android to see the new name, please re-pair the AirPods from the Android settings app. User apps can not rename a Bluetooth Device. The rename function of the app just sends the new name to the AirPods.
Update: so it looks like my other speaker secretly connected to my phone in addition to my AirPods Pro 2. I manually disconnected it and now it looks stable! Is this a bug from ALN where it picks up the top device in the Bluetooth list or something and that list is returned in random order by Android?
Huh, nop. The app only tries to connect to the device which advertize that specific UUID for AAP (Apple Accessory Protocol). It might be that the speaker is advertizing that UUID which is very unrealistic.
Case battery works too (only when AirPods are inside with case open). It would be nice if ALN could remember the last known case battery level, maybe greying it out when it's not a “live” value?
I already have that, but I disabled it for debugging. :p I'll add a toggle for that, if users want to see the last saved battery status. Along with that, I'll also become not-apple and give users freedom - like to what percentage to reduce the volume when conversational awareness is activated, or maybe just pause it instead of reducing volume, etc.!
Also, do you mind creating a new issue/discussion for the other bugs? Thanks.
Do you have the AirPods Pro 2 lightning or USB-C? They have some subtle differences for example the former doesn't support head-tracking / 3D spatial audio (at least on iPhones). I made a mistake while writing my comments I confirm that I have the lightning version, not the USB-C version.
Forgot to reply to this one — I have the USBC ones, but that should not really matter.
Fixed all bugs - found the root cause. The all was thinking the airpods were disconnected when only the audio was disconnected, which is something that the app did itself. Now there should be no random disconnections.
Only one bug left, the ‘null’ in the connection popup.
As usual, the binary is in the latest mightly release.
@devnoname120, do test it and confirm. Thanks!
@kavishdevar I confirm that it's really stable now! Even if I connect to an additional Bluetooth speaker :)
Not sure if you fixed it already but the app still doesn't remember the last case charge value (neither in the app nor in the notification).
if users want to see the last saved battery status.
IMO grayed out in the app with a tiny circled i next to it would be good since it's only visual rather than an AirPods setting. Pressing on the little i would show a message saying that this is the last known value and will update once the AirPods are put back in the case. This way you won't need to have an extra toggle :) (this is the approach taken by the official Sony app for the WH-1000XM5)
Also, do you mind creating a new issue/discussion for the other bugs? Thanks.
Will do! Thanks a lot
I confirm that it's really stable now! Even if I connect to an additional Bluetooth speaker :)
yay!!
Not sure if you fixed it already but the app still doesn't remember the last case charge value (neither in the app nor in the notification).
Nope, I was waiting on some free time so that I can add other customizations along with this.
IMO grayed out in the app with a tiny circled i next to it would be good since it's only visual rather than an AirPods setting. Pressing on the little i would show a message saying that this is the last known value and will update once the AirPods are put back in the case. This way you won't need to have an extra toggle :)
Thanks for the suggestion! Here’s what I will do - for now, show the battery status regardless of if it is connected, although with some gray tint to it in the app, and nothing in the notification. And then, later on when I eventually end up making the app settings
screen, I will keep an option for having disabling it, just in case someone wants that. I would love to give as many customizations as possible unlike apple. :)
@devnoname120 try out the latest nightly release - I have made changes for showing the last saved batter level. Thanks!
All other bugs kinda fixed. Closing.