Set up the enhanced tier
The enhanced tier gives the desktop adb access to the phone, so that Tetheron can start its helper there. The phone screen, phone apps in windows, phone audio on the desktop and the webcam need it. You set it up once per phone and desktop.
For a guided first run over USB, follow the tutorial Mirror your phone screen.
Warning
A desktop with adb access has a full shell on the phone: it can see the screen, type, install apps and change settings. Set this up only on a computer you trust and keep to yourself. About privilege tiers and adb explains what is granted.
Before you begin
You need:
- The phone paired and connected to this desktop.
adbversion 34.0.0 or newer on the desktop. The Tetheron.debdepends on theadbpackage. On Fedora and Arch Linux it is inandroid-tools. To check, open Preferences from the main menu of the Tetheron app and look at Developer connection tool (adb) in the group Phone screen.- For USB: a USB data cable.
- For Wi-Fi: the phone and the desktop on the same Wi-Fi network, and Android 11 or later.
The menu names below are Samsung’s. Other phones name them slightly differently.
In the commands, replace <id> with the device id, or a unique prefix of it,
from tether-cli devices.
Turn on Developer options
If you installed the Android app with adb, Developer options and USB debugging are already on. Otherwise:
- On the phone, open Settings → About phone → Software information.
- Tap Build number seven times and enter the phone’s PIN.
Developer options now appears in Settings.
Set up over USB
- On the phone, open Settings → Developer options and switch USB debugging on.
- Connect the phone to the desktop with the cable and unlock it.
- In the Tetheron app, select the phone. On the Overview tab, press Set up in the group Phone screen.
- Press Continue, then The phone is connected by USB.
- If the phone asks whether to allow USB debugging, tick Always allow from this computer and allow it.
- Wait for the page Permissions. Continue with Apply and check grants, or press Continue to skip them.
From the command line, do steps 1, 2 and 5 and run:
tether-cli enhance <id> setup
The command prints the status when the helper has started.
A phone on a cable is reached through your own adb server and key. See
adb_server in Configuration and files.
Set up over Wireless debugging
- On the phone, open Settings → Developer options → Wireless debugging and switch it on. If the phone asks, choose Always allow on this network. Without it, Tetheron cannot switch Wireless debugging back on after the phone restarts.
- Keep the Wireless debugging screen open.
- In the Tetheron app, press Set up in the group Phone screen, then Continue, then Pair over Wi-Fi. The page Pair shows a QR code.
- On the phone, tap Pair device with QR code and point the camera at the code.
- Watch the line under the code. It goes from Waiting for the phone to scan the code… to Paired with the phone., and the wizard moves on to Connecting and then Permissions.
If the phone cannot scan the code:
- On the page Pair, press Use a pairing code instead.
- On the phone, tap Pair device with pairing code. The phone shows six digits.
- Type the digits into Pairing code and confirm.
From the command line:
tether-cli enhance <id> pair
tether-cli enhance <id> code <6 digits>
pair prints the QR code in the terminal and waits. Add --invert on a
terminal with a light background. Ctrl+C cancels. Run code while the
phone shows the pairing code.
A pairing attempt ends by itself after five minutes. After an update of the phone to a new Android version, you may have to pair again.
Apply and check grants
With adb access, the desktop can switch on permissions for the Tetheron app on the phone that otherwise need a walk through Android’s settings, and a few that cannot be granted on the phone at all. All of them are optional. Android permissions and grants lists each one and what it enables.
- Open the page Permissions. It is the wizard’s page after connecting. Later, open the More menu of the row in the group Phone screen and choose Permissions….
- Switch on the ones you want, or press Allow all.
- Read the line above the list. It says how many permissions are not allowed yet. A permission that the phone refused shows Could not be allowed: and the reason.
A switch that is on cannot be switched off here. Take a permission back in the phone’s settings.
From the command line:
tether-cli enhance <id> grants
tether-cli enhance <id> grants apply
The first command lists every grant as granted or missing. The second
applies all of them and prints the list again.
Re-arm after a phone reboot
Samsung phones switch Wireless debugging off when they restart. The row in the group Phone screen then reads Wireless debugging is off.
-
If you applied the grant Change protected settings (
write_secure_settings), Tetheron asks the phone app to switch Wireless debugging back on, once, when the phone reconnects. If that did not happen, press Turn on in the row, or run:tether-cli enhance <id> rearm -
Without that grant, switch Wireless debugging on again under Settings → Developer options on the phone.
One UI switches Wireless debugging straight back off on a Wi-Fi network that you did not allow with Always allow on this network. On such a network, switch it on by hand on the phone and choose that option.
A USB cable does not depend on Wireless debugging. Plug the phone in and use
Try again, or tether-cli enhance <id> setup.
Restart the helper
The daemon starts the helper whenever the phone is connected to Tetheron and
reachable over adb, and starts it again when it exits. To restart it
yourself, open the More menu of the row in the group Phone screen and
choose Restart, or run tether-cli enhance <id> restart.
Open phone-screen and app windows end when the helper restarts. Use Reconnect in the window.
Check the status from the command line
tether-cli enhance <id> status
adb: ready (34.0.4)
state: ready
serial: <adb serial of the phone>
transport: usb
can re-arm: false
abilities: mirror.main mirror.input mirror.screen_off …
| Line | Meaning |
|---|---|
adb | ready, missing or too_old, and the version found |
state | unavailable, not_set_up, debugging_off, offline, unauthorized, starting, ready or error, with a reason in brackets where there is one |
serial | the adb device linked to this phone, - if none |
transport | usb, wifi or - |
can re-arm | whether the phone app may switch Wireless debugging on |
abilities | what the helper can do on this phone. Features without their ability are hidden. |
mirror | one line per open phone-screen or app window |
Remove the set-up
Tetheron has no command that removes the link. Take the access back on the phone:
- Open Settings → Developer options.
- Switch Wireless debugging and USB debugging off.
- Choose Revoke USB debugging authorisations, so that no computer keeps its permission to connect.
The features of the enhanced tier stop. Everything else in Tetheron keeps working.
Permissions that were applied as grants stay with the Tetheron app on the
phone. Take them back in the phone’s settings. The desktop keeps the phone’s
adb serial as adb_serial in its configuration file. See
Configuration and files.
If something does not work
| What you see | Cause and remedy |
|---|---|
| Phone screen is not available, or the wizard’s Continue is greyed out under a banner about adb | adb is missing or older than 34. Install or update the adb package, then press Check again. If adb is installed in an unusual place, set adb_path (Configuration and files). |
| Waiting for permission on the phone | The phone has not authorised this desktop. Unlock the phone and accept the debugging question with Always allow from this computer. If no question appears, run the set-up again. The authorisation can drop after you replug the cable or toggle debugging. |
| Wireless debugging is off | See Re-arm after a phone reboot. |
| Phone screen cannot reach the phone | The phone is not connected to Tetheron at the moment, or adb cannot reach it. Put both devices on the same Wi-Fi network or plug in the cable, then press Try again. |
| Phone screen stopped working | The helper stopped or could not be started. The text underneath gives the reason. Press Try again. |
| That paired … Scan the code with the right phone. | Another paired phone scanned the QR code. Scan it with the phone the wizard was opened for. |
| The QR code could not be made. Use the pairing code below. | Use the pairing code. |
| Pairing did not work | Check that the Wireless debugging screen is still open on the phone and that both devices are on the same network, then press Try again. |
| Debugging cannot be switched on, or the set-up is refused, on a Samsung phone | Samsung’s Auto Blocker can stop debugging, above all over USB. Turn off Settings → Security and privacy → Auto Blocker and try again. |
To see why the helper fails, read the daemon’s log at debug level. See
Troubleshoot. Every action of tether-cli enhance is
listed in Command-line tools.