The issue you're encountering is that the $ character in the value is being interpreted as a shell variable or causing the string to be truncated. In shell environments (including adb shell), the $ character has special meaning (e.g., for variables like $HOME or $USER). To pass the literal string com.termux.api/com.termux.api.apis.NotificationListAPI$NotificationService without interpretation, you need to escape the $ character or quote the string properly.
$ CharacterEscape the $ with a backslash (\):
bashadb shell settings put secure enabled_notification_listeners 'com.termux.api/com.termux.api.apis.NotificationListAPI\$NotificationService'
Double quotes in shell allow most special characters (including $) to be treated literally, except for $, backticks (`), and backslashes (\). However, if you want to ensure the \$ is treated as a literal, you can still escape it inside double quotes:
bashadb shell settings put secure enabled_notification_listeners "com.termux.api/com.termux.api.apis.NotificationListAPI\$NotificationService"
Single quotes in shell treat all characters literally, including $. This is the most reliable way:
bashadb shell settings put secure enabled_notification_listeners 'com.termux.api/com.termux.api.apis.NotificationListAPI$NotificationService'
If this didn't work for you, it might be due to how the settings command itself processes the input. In that case, try escaping the $ as shown in Solution 1 or 2.
set with Escaped $If the above fails, try using set to explicitly pass the value:
bashadb shell set secure enabled_notification_listeners "com.termux.api/com.termux.api.apis.NotificationListAPI\$NotificationService"
After running the put command, verify with:
bashadb shell settings get secure enabled_notification_listeners
The output should now include the full string:
textcom.termux.api/com.termux.api.apis.NotificationListAPI$NotificationService
$ is used for variable expansion (e.g., $USER). If not escaped or quoted, the shell may interpret $NotificationService as a variable name.') are the safest for literal strings, as they prevent all shell interpretations.Vibe can make mistakes. Check answers. Learn more