Android app on Android 12 keeps crashing upon connection to Mac server app

As soon as the Android app connects to the server app running on Mac, the phone screen keeps flashing a black screen (like it’s locked) and then flashes the home screen again and again. Device is completely unusable until I run ‘adb reboot’ and the device restarts.

Using 0.22.1 APK and Mac OS version 0.22.1

So it looks like the app doesn’t crash because I can still play audio from my Mac server app to the Android device. It’s just the screen freaks out, renders the device unusable until it’s rebooted and causes the screen to get really warm.

This is what I see in the logs in Android Studio:

2021-11-18 14:50:35.781 12599-12599/com.azefsw.audioconnect V/ViewRootImpl: title=com.azefsw.audioconnect/com.azefsw.audioconnect.ui.main.MainActivity enqueue motion: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=322.7012, y[0]=1120.5331, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=320279, downTime=320279, deviceId=6, source=0x1002, displayId=0, eventId=559022491 }
2021-11-18 14:50:35.844 12599-12599/com.azefsw.audioconnect V/ViewRootImpl: title=com.azefsw.audioconnect/com.azefsw.audioconnect.ui.main.MainActivity enqueue motion: MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=322.7012, y[0]=1120.5331, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=320361, downTime=320279, deviceId=6, source=0x1002, displayId=0, eventId=233308953 }
2021-11-18 14:50:35.875 12599-12599/com.azefsw.audioconnect D/ContextImpl: Create app context, Display =Display id 0: DisplayInfo{"Built-in Screen", displayId 0", displayGroupId 0, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, FLAG_TRUSTED, real 1080 x 2400, largest app 2190 x 2190, smallest app 1080 x 1020, appVsyncOff 1000000, presDeadline 11333333, mode 3, defaultMode 1, modes [{id=1, width=1080, height=2400, fps=60.000004, alternativeRefreshRates=[48.000004, 90.0, 120.00001, 144.00002]}, {id=2, width=1080, height=2400, fps=144.00002, alternativeRefreshRates=[48.000004, 60.000004, 90.0, 120.00001]}, {id=3, width=1080, height=2400, fps=120.00001, alternativeRefreshRates=[48.000004, 60.000004, 90.0, 144.00002]}, {id=4, width=1080, height=2400, fps=90.0, alternativeRefreshRates=[48.000004, 60.000004, 120.00001, 144.00002]}, {id=5, width=1080, height=2400, fps=48.000004, alternativeRefreshRates=[60.000004, 90.0, 120.00001, 144.00002]}], hdrCapabilities HdrCapabilities{mSupportedHdrTypes=[2, 3, 4], mMaxLuminance=500.0, mMaxAverageLuminance=250.005, mMinLuminance=0.01}, userDisabledHdrTypes [], minimalPostProcessingSupported false, rotation 0, state ON}, DisplayMetrics{density=2.5, width=1080, height=2190, scaledDensity=2.5, xdpi=397.565, ydpi=395.844}, isValid=true, SkipDeskVcWaCheck=false, HintUseDeskVcWa=false, UseDeskVcWa=false, DeskVcWaPackageFound=false, DeskVcWaLastRot=0
     configuration={1.0 311mcc480mnc [en_US] ldltr sw432dp w432dp h876dp 400dpi nrml long layoutCompatNeeded port mot-phone finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 1080, 2400) mAppBounds=Rect(0, 90 - 1080, 2280) mMaxBounds=Rect(0, 0 - 1080, 2400) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} as.4 s.98 fontWeightAdjustment=0 spnnull gidbae0000000000000}
     DisplayMetrics=DisplayMetrics{density=2.5, width=1080, height=2190, scaledDensity=2.5, xdpi=397.565, ydpi=395.844}
2021-11-18 14:50:35.876 12599-21571/com.azefsw.audioconnect W/ConnectivityManager.CallbackHandler: callback not found for CALLBACK_AVAILABLE message
2021-11-18 14:50:35.901 12599-12742/com.azefsw.audioconnect I/AR: Remotely connecting to 192.168.1.29...
2021-11-18 14:50:35.902 12599-12657/com.azefsw.audioconnect I/AR: Acquiring wakelocks...
2021-11-18 14:50:35.913 12599-12742/com.azefsw.audioconnect V/AR: Requesting audio focus...
2021-11-18 14:50:35.998 12599-12697/com.azefsw.audioconnect I/AR: New audio config...
2021-11-18 14:50:36.044 12599-21581/com.azefsw.audioconnect I/session_id_broadcaster: Starting session id 153
2021-11-18 14:50:47.261 12599-12618/com.azefsw.audioconnect D/CompatibilityChangeReporter: Compat change id reported: 150939131; UID 10375; state: ENABLED

Sorry about that!

Unfortunately, the logs don’t say much about the issue.
It’s fine on my phone with Android 12, I can’t see how the app could cause so much instability though.

Could you please provide these details?
Maybe we’ll see a pattern or something with the bug report of someone else.

Instead of adb reboot, check if the command adb shell am force-stop com.azefsw.audioconnect stops the freak out. This would help the testing.

  • Try to switch the audio output in the app’s settings
  • Does the issue appear if you connect your Mac to your phone via the app’s server mode?
  • What’s your device’s model?
  • Do you have a custom ROM? Do you have magisk? Is it rooted?

I’m assuming that only AudioRelay causes this on your phone?