Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Android permissions and grants

The permissions that the Tetheron app for Android (org.tether.android) declares, the special accesses it uses and the grants given over adb. To grant them, follow Grant Android permissions.

Permissions granted at installation

Android grants these without asking.

PermissionUsed for
INTERNETThe TLS connection to the desktop
ACCESS_NETWORK_STATEReconnecting when the network changes; Wi-Fi status for the desktop
ACCESS_WIFI_STATEWi-Fi signal level for the desktop
CHANGE_WIFI_MULTICAST_STATEReceiving the desktop’s UDP discovery beacon
FOREGROUND_SERVICE, FOREGROUND_SERVICE_CONNECTED_DEVICEThe background service that holds the connection
RECEIVE_BOOT_COMPLETEDStarting the service when the phone starts and after an app update
REQUEST_IGNORE_BATTERY_OPTIMIZATIONSShowing the system dialog for the battery optimisation exemption
REQUEST_COMPANION_SELF_MANAGEDThe companion device association
QUERY_ALL_PACKAGESNames and icons of the apps that post notifications or play media; the app list of the Apps tab
ACCESS_NOTIFICATION_POLICYDeclares the request for Do Not Disturb access
USE_FULL_SCREEN_INTENTThe “find my phone” alert over the lock screen; see Full-screen alerts
VIBRATEVibration during “find my phone”
MODIFY_AUDIO_SETTINGSMuting the microphone during a call
CALL_COMPANION_APPMakes the app eligible as a call companion; see MANAGE_ONGOING_CALLS

Permissions prompted at run time

Android shows a dialog for each group. The set-up wizard of the app asks for them step by step, and the app’s Settings screen asks again when a feature is switched on without its permission. Every step except the first can be skipped.

PermissionAsked inUsed forWithout it
POST_NOTIFICATIONSWizard, first stepThe status notification of the background service; file offers; the “send clipboard” actionAndroid hides the status notification
CAMERAWhen you tap Scan QRScanning the pairing QR codePair by code or by address
READ_SMS, SEND_SMSWizard, Messages and contactsReading conversations and sending messagesThe phone does not announce the messages capability; no Messages tab content
RECEIVE_SMS, RECEIVE_MMS, RECEIVE_WAP_PUSHSame stepRequested with the two above; not required for the messages capability
READ_CONTACTSSame stepContact names and photosNo contacts capability; numbers are shown without names
READ_PHONE_STATESame step, and CallsSIM, carrier and signal status; call stateNo SIM and signal status; no calls capability
READ_MEDIA_IMAGES, READ_MEDIA_VIDEOWizard, Photos and filesThe galleryNo photos capability. File transfer needs no permission.
ANSWER_PHONE_CALLSWizard, CallsAnswering, declining and ending callsNo calls capability
READ_CALL_LOGSame stepThe call log; the caller’s number for incoming callsNo calllog capability; incoming calls may show no number
CALL_PHONESame stepDialling from the desktopNo calls.dial capability
BLUETOOTH_CONNECTSame stepReporting the Bluetooth pairing and hands-free state to the desktopNo bluetooth capability; no guided set-up of call audio
BLUETOOTH_ADVERTISESame stepMaking the phone discoverable while the desktop pairs over BluetoothThe phone opens its Bluetooth settings instead
READ_PHONE_NUMBERSNever askedThe phone’s own number in the device informationThe number is left empty

The app declares READ_PHONE_NUMBERS and never asks for it. The runtime_permissions grant of the enhanced tier includes it.

The app declares no location permission, so it reports the Wi-Fi signal level without the name of the network.

Special accesses

These are switched on in Android’s settings. The app opens the matching settings screen.

Notification access

ServiceNotificationListener (BIND_NOTIFICATION_LISTENER_SERVICE)
Used forMirroring notifications, notification actions and replies, dismiss sync, media sessions and media control
Without itNo notifications and no media controls on the desktop
Granted inWizard step Notification access; app Settings → Notification access
Over adbGrant notification_listener

On Android 13 and newer, an app installed from an APK may first have to be allowed to use “restricted settings” in the system’s app information screen.

Battery optimisation exemption

Used forKeeping the connection while the phone is idle (Doze)
Without itNotifications are delayed and the connection drops while the phone is idle
Granted inWizard step for battery; system setting Battery → Unrestricted
Over adbGrant battery_whitelist

On Samsung phones the wizard has one more step: add the app to Never sleeping apps. No permission or grant covers that list.

Companion device association

PermissionREQUEST_COMPANION_SELF_MANAGED
Used forRegistering the paired desktop as a companion device. On Android 15 and newer this lets notifications with one-time codes through to the app, and it improves how long Android lets the app run in the background.
Without itAndroid 15 and newer hide the content of one-time-code notifications from the app, unless the grant sensitive_notifications is applied
Granted inWizard step after pairing

On some Android builds the permission is reserved for system apps (seen on Android 16 with One UI 8.5). The app detects this and skips the step.

Do Not Disturb access

PermissionACCESS_NOTIFICATION_POLICY
Used forChanging Do Not Disturb from the desktop
Without itThe desktop shows the Do Not Disturb state and cannot change it
Granted inApp Settings → Do Not Disturb access

Full-screen alerts

PermissionUSE_FULL_SCREEN_INTENT
Used forShowing the “find my phone” alert over the lock screen
Without itThe phone rings; the alert does not appear over the lock screen
Granted inApp Settings → Full-screen alerts

All files access

PermissionMANAGE_EXTERNAL_STORAGE
Used forDeleting gallery items from the desktop without a confirmation on the phone
Without itEvery delete from the desktop asks for confirmation on the phone’s screen
Granted inApp Settings → All files access
Over adbGrant manage_external_storage

Grants over adb

Some permissions cannot be granted on the phone itself. With the enhanced tier set up, the desktop applies them through the shell helper, from the set-up wizard of the desktop app or with tether-cli enhance <id> grants apply. With your own adb, run the command from the table.

The shell helper runs only the commands of this table. The grant names are fixed in the helper protocol (Wire protocol).

GrantCommandWhat it enablesWithout it
notification_listeneradb shell cmd notification allow_listener org.tether.android/org.tether.android.features.notifications.NotificationListenerNotification access without the settings screenGrant it on the phone
battery_whitelistadb shell dumpsys deviceidle whitelist +org.tether.androidThe battery optimisation exemptionGrant it on the phone
runtime_permissionsadb shell pm grant org.tether.android <permission>, once for each permission of Permissions prompted at run time that is not grantedAll run-time permissions without their dialogsGrant them on the phone
manage_external_storageadb shell appops set org.tether.android MANAGE_EXTERNAL_STORAGE allowAll files accessGrant it on the phone
read_logsadb shell pm grant org.tether.android android.permission.READ_LOGSWith system_alert_window: clipboard sync from the phone while the app is in the background. See READ_LOGS and SYSTEM_ALERT_WINDOW.Clipboard changes are sent only while the app is in the foreground, or by hand
system_alert_windowadb shell appops set org.tether.android SYSTEM_ALERT_WINDOW allowSee read_logsSee read_logs
sensitive_notificationsadb shell appops set org.tether.android RECEIVE_SENSITIVE_NOTIFICATIONS allowOne-time codes in notifications on Android 15 and newer, when the companion device association is not availableAndroid hides the content of those notifications
manage_ongoing_callsadb shell appops set org.tether.android MANAGE_ONGOING_CALLS allowSwitching call audio from the desktop. See MANAGE_ONGOING_CALLS.Only Phone works from the desktop
write_secure_settingsadb shell pm grant org.tether.android android.permission.WRITE_SECURE_SETTINGSSwitching Wireless debugging on again from the app. See WRITE_SECURE_SETTINGS.Switch Wireless debugging on by hand after each phone restart

The desktop reads the state of each grant back from the phone after applying it. Android stores the grants with the app, and they are lost when the app is uninstalled. Whether MANAGE_ONGOING_CALLS survives a phone restart has not been tested.

READ_LOGS and SYSTEM_ALERT_WINDOW

Android does not let an app read the clipboard while it is in the background. With these two grants the app watches the system log for the line that Android writes when it refuses the app access to a new clip. It then starts an invisible activity that takes focus for a moment, reads the clip and sends it. READ_LOGS allows reading the log. SYSTEM_ALERT_WINDOW allows starting the activity from the background. The app never asks for either permission on the phone.

Without them, text copied on the phone reaches the desktop in these ways:

  • At once, while the app is in the foreground.
  • With the Send clipboard Quick Settings tile, the share sheet or the action in the status notification.
  • Through the shell helper while the enhanced tier is running, which needs neither grant.

MANAGE_ONGOING_CALLS

This app-op makes Android’s telephony service bind the app’s call companion service (TetherInCallService). Through it the app can move a call’s audio between the Bluetooth device (the desktop), the earpiece and the loudspeaker, and it sees calls with their numbers.

Without it:

  • This PC and Speaker in the in-call window and tether-cli audio <id> pc fail with route_unsupported. Phone works, because the desktop can close the audio link by itself.
  • Call audio can still be moved to the desktop on the phone’s own call screen.
  • Answering, declining, ending, muting and dialling are not affected. They use the run-time permissions.

WRITE_SECURE_SETTINGS

Wireless debugging switches off when the phone restarts. With this permission the app can switch it on again when the desktop asks (tether-cli enhance <id> rearm, and automatically once per connection). The app uses the permission for this one setting.

The system may switch Wireless debugging off again at once when the current Wi-Fi network was not allowed for it on the phone. Choose Always allow on this network when the phone asks.

Without the permission the request is ignored and can re-arm in tether-cli enhance <id> status is false.

Permissions that protect the app’s components

These restrict who may call into the app. The app does not hold them.

ComponentRequired permission of the callerEffect
NotificationListenerBIND_NOTIFICATION_LISTENER_SERVICEOnly the system can bind the listener
TetherInCallServiceBIND_INCALL_SERVICEOnly the telephony service can bind it
ClipboardTileServiceBIND_QUICK_SETTINGS_TILEOnly the system can bind the tile
AdbLinkReceiverDUMPOnly the adb shell and the system can send the one-time token that links an adb device to a paired phone

What the shell helper can do

The enhanced tier does not add permissions to the app. The shell helper is a separate process that the desktop starts over adb. It runs with the privileges of the adb shell, which include capturing the screen, injecting input, capturing audio, opening the camera (0.5.0) and running the grant commands above. See Privilege tiers and adb and Security model.