Whenever I turn on my Bluetooth headphones, as soon as they connect to my Android phone it starts playing a song; I cannot figure out what app is playing that song or how to make it stop. I have deleted all the music-playing apps I could find from my phone and it makes no difference (in particular, I have deleted Spotify, which seems to be a leading contender for this problem). I believe that my only remaining audio apps are Audible, Libby, PocketCast, and Poweramp, none of which show that they are playing this music.
I have deleted the album it was playing from my Music/ folder, so now it only plays the last song it was playing from that album and stops when it reaches the end of the song (if I turn off the headphones and turn them back on, it will play the song again (presumably because it has it and only it cached). It will stop playing if I hit the pause button on my headphones.
Doing adb shell dumpsys media_session shows the last audio playback came from the package com.android.systemui which is not helpful (at least not to me). Full output of that command is below in case there is something there that I didn't understand.
If someone could lend me a clue, I'd appreciate it.
EDITED: added the output of "adb logcat -b all" at the bottom of this text.
Full output of "adb.exe -t 14 shell dumpsys media_session":
MEDIA SESSION SERVICE (dumpsys media_session)
8 sessions listeners.
Global priority session is com.android.server.telecom/HeadsetMediaButton/1 (userId=0)
HeadsetMediaButton com.android.server.telecom/HeadsetMediaButton/1 (userId=0)
ownerPid=1407, ownerUid=1000, userId=0
package=com.android.server.telecom
launchIntent=null
mediaButtonReceiver=null
active=false
flags=65537
rating type=0
controllers: 0
state=null
audioAttrs=AudioAttributes: usage=USAGE_VOICE_COMMUNICATION content=CONTENT_TYPE_SPEECH flags=0x800 tags= bundle=null
volumeType=LOCAL, controlType=ABSOLUTE, max=0, current=0, volumeControlId=null
metadata: null
queueTitle=null, size=0
User Records:
Record for full_user=0
Volume key long-press listener: null
Volume key long-press listener package:
Media key listener: null
Media key listener package:
OnMediaKeyEventDispatchedListener: added 0 listener(s)
OnMediaKeyEventSessionChangedListener: added 1 listener(s)
from com.android.bluetooth
Last MediaButtonReceiver: MBR {pi=null, componentName=ComponentInfo{com.audible.application/androidx.media.session.MediaButtonReceiver}, type=1, pkg=com.audible.application}
Media button session is null
Sessions Stack - have 4 sessions:
play_movies_media com.google.android.videos/play_movies_media/23 (userId=0)
ownerPid=9439, ownerUid=10186, userId=0
package=com.google.android.videos
launchIntent=null
mediaButtonReceiver=null
active=false
flags=3
rating type=0
controllers: 0
state=null
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=LOCAL, controlType=ABSOLUTE, max=0, current=0, volumeControlId=null
metadata: null
queueTitle=null, size=0
PocketCastsMediaSession au.com.shiftyjelly.pocketcasts/PocketCastsMediaSession/24 (userId=0)
ownerPid=9640, ownerUid=10326, userId=0
package=au.com.shiftyjelly.pocketcasts
launchIntent=PendingIntent{fe5169e: PendingIntentRecord{da2f57f au.com.shiftyjelly.pocketcasts startActivity}}
mediaButtonReceiver=MBR {pi=PendingIntent{469694c: PendingIntentRecord{bbf2d95 au.com.shiftyjelly.pocketcasts broadcastIntent}}, componentName=ComponentInfo{au.com.shiftyjelly.pocketcasts/androidx.media.session.MediaButtonReceiver}, type=1, pkg=au.com.shiftyjelly.pocketcasts}
active=false
flags=3
rating type=1
controllers: 1
state=PlaybackState {state=PAUSED(2), position=458618, buffered position=0, speed=1.0, updated=202640, actions=122703, custom actions=[Action:mName='Skip back, mIcon=2131231918, mExtras=Bundle[mParcelledData.dataSize=144], Action:mName='Skip forward, mIcon=2131231919, mExtras=Bundle[mParcelledData.dataSize=144], Action:mName='Change speed, mIcon=2131230973, mExtras=null, Action:mName='Star, mIcon=2131231031, mExtras=Bundle[mParcelledData.dataSize=144], Action:mName='Mark as played, mIcon=2131231030, mExtras=Bundle[mParcelledData.dataSize=144]], active item id=-1, error=null}
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=LOCAL, controlType=ABSOLUTE, max=0, current=0, volumeControlId=null
metadata: size=9, description=Throwback Episode: 'Best Of' Vol. 3, The Sarah Silverman Podcast, Lemonada Media
queueTitle=Up Next, size=0
AudibleMediaBrowserService com.audible.application/AudibleMediaBrowserService/25 (userId=0)
ownerPid=14234, ownerUid=10295, userId=0
package=com.audible.application
launchIntent=PendingIntent{687feaa: PendingIntentRecord{8fb6a9b com.audible.application startActivity}}
mediaButtonReceiver=MBR {pi=PendingIntent{c69ce38: PendingIntentRecord{d320e11 com.audible.application broadcastIntent}}, componentName=ComponentInfo{com.audible.application/androidx.media.session.MediaButtonReceiver}, type=1, pkg=com.audible.application}
active=true
flags=3
rating type=0
controllers: 3
state=PlaybackState {state=NONE(0), position=0, buffered position=0, speed=1.0, updated=236754, actions=4456319, custom actions=[Action:mName='Skip Backward_morris_miniplayer, mIcon=2131231617, mExtras=null, Action:mName='Skip Forward, mIcon=2131231624, mExtras=null, Action:mName='Bookmark, mIcon=2131230918, mExtras=null], active item id=-1, error=null}
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=LOCAL, controlType=ABSOLUTE, max=0, current=0, volumeControlId=null
metadata: size=20, description= , ,
queueTitle=null, size=0
androidx.media3.session.id.Libby com.overdrive.mobile.android.libby/androidx.media3.session.id.Libby/26 (userId=0)
ownerPid=16590, ownerUid=10304, userId=0
package=com.overdrive.mobile.android.libby
launchIntent=PendingIntent{bf5b76: PendingIntentRecord{29c1577 com.overdrive.mobile.android.libby startActivity}}
mediaButtonReceiver=null
active=true
flags=7
rating type=0
controllers: 1
state=PlaybackState {state=NONE(0), position=0, buffered position=0, speed=0.0, updated=325033, actions=4456069, custom actions=[], active item id=0, error=null}
audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null
volumeType=LOCAL, controlType=ABSOLUTE, max=0, current=0, volumeControlId=null
metadata: size=2, description=null, null, null
queueTitle=null, size=0
Audio playback (lastly played comes first)
uid=10238 packages=com.android.systemui
uid=1000 packages=android com.android.providers.settings com.google.SSRestartDetector com.android.location.fused com.google.pixel.iwlan com.android.dynsystem com.android.server.telecom com.android.DeviceAsWebcam com.google.android.settings.future.biometrics.faceenroll com.android.localtransport com.google.android.repairmode com.google.pixel.camera.services com.android.inputdevices com.android.keychain com.android.qns com.google.android.iwlan com.android.settings
Media session config:
media_button_receiver_fgs_allowlist_duration_ms: [cur: 10000, def: 10000]
media_session_calback_fgs_allowlist_duration_ms: [cur: 10000, def: 10000]
media_session_callback_fgs_while_in_use_temp_allow_duration_ms: [cur: 10000, def: 10000]
media_session_temp_user_engaged_duration_ms: [cur: 600000, def: 600000]
Full Output of 'adb -t15 logcat -b all' (starting at the time I turned on my headphones, ending when I was hearing music):
07-24 22:08:00.008 1407 1991 D ConnectivityService: NetReassign [no changes] [c 5] [a 6] [i 14]
07-24 22:08:02.565 1185 1185 I auditd : type=1400 audit(0.0:4508): avc: denied { write } for comm="TracingMuxer" name="traced_producer" dev="tmpfs" ino=1289 scontext=u:r:gxp_logging:s0 tcontext=u:object_r:traced_producer_socket:s0 tclass=sock_file permissive=0
07-24 22:08:02.565 1185 1185 W TracingMuxer: type=1400 audit(0.0:4508): avc: denied { write } for name="traced_producer" dev="tmpfs" ino=1289 scontext=u:r:gxp_logging:s0 tcontext=u:object_r:traced_producer_socket:s0 tclass=sock_file permissive=0
07-24 22:08:02.987 979 1030 I WifiHAL : Creating message to get link statistics; iface = 47
07-24 22:08:03.066 979 979 I WifiHAL : Getting cached scan results, iface handle = 0xb4000074adc28850
07-24 22:08:03.066 979 979 E WifiHAL : Creating message to get cached scan results
07-24 22:08:03.075 979 979 I WifiHAL : In GetCachedScanResultsCommand::handleResponse
07-24 22:08:03.149 1407 1991 D ConnectivityService: NetReassign [no changes] [c 6] [a 6] [i 14]
07-24 22:08:06.123 979 979 I WifiHAL : Creating message to get link statistics; iface = 47
07-24 22:08:06.190 979 1030 I WifiHAL : Getting cached scan results, iface handle = 0xb4000074adc28850
07-24 22:08:06.190 979 1030 E WifiHAL : Creating message to get cached scan results
07-24 22:08:06.196 979 1030 I WifiHAL : In GetCachedScanResultsCommand::handleResponse
07-24 22:08:06.255 1407 1991 D ConnectivityService: NetReassign [no changes] [c 4] [a 6] [i 14]
07-24 22:08:06.438 2239 2363 D TemperatureStateSource: sequence=6079 actualDelay=10002
07-24 22:08:06.446 2239 2363 D TemperatureStateSource: Reading temperature: sequence=6080
07-24 22:08:06.458 1698 1698 I pixel-thermal: VIRTUAL-SKIN:29.6132 raw data: VIRTUAL-SKIN:29613.2 VIRTUAL-SKIN-SUB-1:29613.2 VIRTUAL-SKIN-SUB-2:26912.9 VIRTUAL-SKIN-SUB-3:29154.9 charger_therm:31394 gnss_tcxo_therm:29991 modem_therm:30770 quiet_therm:29635 rffe_therm:30058 soc_therm:29791 usb_conn_therm:29791
07-24 22:08:06.459 2239 2363 D TemperatureStateSource: getDeviceTemperatures: sequence=6080 deviceTemperatureType=3 temperatureSource=0 temperatures=[29.613201]
07-24 22:08:06.459 2239 2363 D BusinessScope: Enqueuing the block
07-24 22:08:06.459 2239 2363 D TemperatureStateSource: sequence=6080 waitTime=10000
07-24 22:08:06.460 2239 2454 D BusinessScope: Start running the #12176 block
07-24 22:08:06.463 2239 2454 D BusinessScope: Enqueuing the block
07-24 22:08:06.464 2239 2454 D ImpulseStateSource: Notify clients: 6087
07-24 22:08:06.464 2239 2454 D BusinessScope: Finish running the #12176 block
07-24 22:08:06.468 2239 2454 D BusinessScope: Start running the #12177 block
07-24 22:08:06.472 2239 2454 D BusinessScope: Finish running the #12177 block
Asked by One Guy Hacking
(131 rep)
Jul 23, 2025, 10:29 PM
Last activity: Jul 25, 2025, 05:13 AM
Last activity: Jul 25, 2025, 05:13 AM