On LineageOS 23.2:

```bash
adb shell "cmd notification get '0|org.thoughtcrime.securesms|50039|null|10183'"
```
```
NotificationRecord(0x02f04806: pkg=org.thoughtcrime.securesms user=UserHandle{0} id=50039 tag=null importance=4 key=0|org.thoughtcrime.securesms|50039|null|10183: Notification(channel=messages_2 shortcut=142 contentView=null vibrate=null sound=null tick defaults=0 flags=0 color=0xff3b45fd category=msg groupKey=messages sortKey=9223370245041175738 actions=2 vis=PRIVATE locusId=LocusId[3_chars]))
uid=10183 userId=0
opPkg=org.thoughtcrime.securesms
icon=Icon(typ=RESOURCE pkg=org.thoughtcrime.securesms id=0x7f0802c9)
flags=0
originalFlags=0
pri=0
key=0|org.thoughtcrime.securesms|50039|null|10183
seen=true
groupKey=0|org.thoughtcrime.securesms|g:messages
notification=
fullscreenIntent=null
contentIntent=PendingIntent{e4aec7: PendingIntentRecord{64ccc9f org.thoughtcrime.securesms startActivity (allowlist: 8ac40ec:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}
deleteIntent=PendingIntent{3893cf4: PendingIntentRecord{981563e org.thoughtcrime.securesms broadcastIntent (allowlist: 8ac40ec:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}
number=1
groupAlertBehavior=2
when=1791813600069/1791813600069
tickerText=John: Hello from Signal
vis=0
contentView=null
bigContentView=null
headsUpContentView=null
color=0xff3b45fd
timeout=PT72H
actions={
[0] "Mark read" -> PendingIntent{ab97c1d: PendingIntentRecord{d7796f9 org.thoughtcrime.securesms broadcastIntent (allowlist: 8ac40ec:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}
[1] "Reply" -> PendingIntent{38de92: PendingIntentRecord{c2dc9c0 org.thoughtcrime.securesms broadcastIntent (allowlist: 8ac40ec:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}
}
extras={
android.title=String (John Doe)
android.hiddenConversationTitle=null
android.reduced.images=Boolean (true)
android.subText=null
android.template=String (android.app.Notification$MessagingStyle)
android.showChronometer=Boolean (false)
android.people.list=ArrayList ([android.app.Person@2da3331c])
android.text=SpannableString (Hello from Signal)
android.progress=Integer (0)
androidx.core.app.extra.COMPAT_TEMPLATE=String (androidx.core.app.NotificationCompat$MessagingStyle)
android.progressMax=Integer (0)
android.selfDisplayName=String (Benjamin)
android.conversationUnreadMessageCount=Integer (0)
android.appInfo=ApplicationInfo (ApplicationInfo{d773460 org.thoughtcrime.securesms})
android.messages=Bundle[] (1)
[0] Bundle[{extras=Bundle[{}], sender_person=android.app.Person@3a2534d2, sender=John Doe, text=Hello from Signal, time=1791813600069}]
android.showWhen=Boolean (true)
android.largeIcon=Icon (Icon(typ=BITMAP size=132x132))
android.messagingStyleUser=Bundle (Bundle[mParcelledData.dataSize=512])
android.messagingUser=Person (android.app.Person@680ee241)
android.infoText=String (1)
android.wearable.EXTENSIONS=Bundle (Bundle[{actions=[android.app.Notification$Action@9a2afbf, android.app.Notification$Action@88b368c]}])
android.progressIndeterminate=Boolean (false)
android.remoteInputHistory=null
android.shortCriticalText=null
android.isGroupConversation=Boolean (false)
}
publicNotification=
None
stats=SingleNotificationStats{posttimeElapsedMs=101084262, posttimeToFirstClickMs=-1, posttimeToDismissMs=-1, airtimeCount=1, airtimeMs=0, currentAirtimeStartElapsedMs=101087285, airtimeExpandedMs=0, posttimeToFirstVisibleExpansionMs=3025, currentAirtimeExpandedStartElapsedMs=101087287, requestedImportance=3, naturalImportance=4, isNoisy=true}
mContactAffinity=0.5
mPackagePriority=0
mPackageVisibility=-1000
mSystemImportance=UNSPECIFIED
mAsstImportance=UNSPECIFIED
mImportance=HIGH
mImportanceExplanation=user
mProposedImportance=UNSPECIFIED
mIsAppImportanceLocked=true
mSensitiveContent=false
mCanceledAfterLifetimeExtension=false
mIntercept=false
mHidden==false
mGlobalSortKey=crtcl=0x0002:intrsv=2:grnk=0x0001:gsmry=1:gsk=9223370245041175738:rnk=0x0001
mRankingTimeMs=1791813600069
mCreationTimeMs=1791813600154
mVisibleSinceMs=1791813603386
mUpdateTimeMs=1791813600154
mInterruptionTimeMs=1791813603386
mSuppressedVisualEffects= 0
mSound= content://settings/system/notification_sound
mVibration= Composed{segments=[Step{amplitude=0.0, frequencyHz=0.0, duration=0}, Step{amplitude=-1.0, frequencyHz=0.0, duration=350}, Step{amplitude=0.0, frequencyHz=0.0, duration=250}, Step{amplitude=-1.0, frequencyHz=0.0, duration=350}], repeat=-1}
mAttributes= AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800(FLAG_MUTE_HAPTIC) tags= bundle=null
mLight= Light{color=-16776961, onMs=500, offMs=2000}
mShowBadge=true
mColorized=false
mAllowBubble=false
isBubble=false
mIsInterruptive=true
effectiveNotificationChannel=NotificationChannel{mId='messages_2', mName=Messages, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=true, mLightColor=-16776961, mVibrationPattern=null, mVibrationEffect=null, mUserLockedFields=4, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='messages', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800(FLAG_MUTE_HAPTIC) tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false, mLastNotificationUpdateTimeMs=1791813600433}
mAdjustments=[]
shortcut=142 found valid? true
mUserVisOverride=-1000
hasSummarization=false
bundleType=0
```

How to call *Mark read* from ADB?
Oct 12, 9:45pm

Signal's Mark read action points to an internal broadcast (MarkReadReceiver, action org.thoughtcrime.securesms.notifications.CLEAR), but you can't fire it with am broadcast from ADB: the intent carries a threads extra that is an ArrayList<ConversationId> (a custom Parcelable), which am has no way to construct — and the receiver is app-internal anyway. (MarkReadReceiver.java)

Android/LineageOS also has no cmd notification subcommand to invoke a notification action, so the practical ADB route is to open the shade and simulate the tap with uiautomator:

bash
# 1. Expand the notification shade
adb shell cmd statusbar expand-notifications
sleep 1

# 2. Dump the view hierarchy
adb shell uiautomator dump /sdcard/ui.xml >/dev/null 2>&1
adb pull /sdcard/ui.xml . >/dev/null

# 3. Find the "Mark read" button bounds (text= or content-desc=)
B=$(grep -oE '<node[^>]*(text|content-desc)="Mark read"[^>]*' ui.xml \
    | grep -oE '[0-9]+,[0-9]+][0-9]+,[0-9]+' | head -n1 | tr -d ']' | tr ',' ' ')
x1=$(echo $B | cut -d' ' -f1); y1=$(echo $B | cut -d' ' -f2)
x2=$(echo $B | cut -d' ' -f3); y2=$(echo $B | cut -d' ' -f4)

# 4. Tap its center
adb shell input tap $(( (x1+x2)/2 )) $(( (y1+y2)/2 ))

# 5. Close the shade
adb shell cmd statusbar collapse

Notes:

  • If your notifications are grouped (your dump shows groupKey=g:messages), the button may not be in the shade until you first tap the collapsed "Messages" group to expand it — dump the UI again after expanding.
  • If the first dump comes back empty, the shade was still animating; just re-run steps 2–3.
  • The Reply action (RemoteInput) is likewise not reproducible via am broadcast — it also needs Signal-specific parcelable extras — so tapping is the only clean ADB approach for it too.
  • If uiautomator dump fails entirely, the fallback is blind keyevent navigation: open the shade, input keyevent KEYCODE_DPAD_* to focus the notification and its action button, then KEYCODE_ENTER/DPAD_CENTER — much more brittle than the dump-and-tap method.
Oct 12, 9:45pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more