Skip to content

Latest commit

ย 

History

50 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Android-Daemon โ€” your Android phone, part of your Plasma desktop

CI KDE Plasma 6 Android scrcpy Stars

Your phone, right on your desktop.

Android-Daemon pins a live, touchable mirror of your Android phone to your Plasma desktop and tray.
Plug it in once and it follows you onto Wi-Fi, turns into a webcam when an app asks, and keeps you online when your network drops.

Get started ยท See it work ยท Webcam ยท Settings ยท Configuration ยท FAQ ยท More projects

The Phone Screen widget mirroring a phone, then handing the mirror to the Phone Manager in the tray


๐Ÿš€ Get started

git clone --recurse-submodules https://github.com/DevL0rd/Android-Daemon.git
cd Android-Daemon
./install.sh

That's it. The installer grabs adb, scrcpy, ffmpeg and the virtual webcam driver, starts the background services and adds two Plasma widgets: Phone Screen for your desktop and Phone Manager for your system tray. Everything is installed into your home folder, so you're free to delete the cloned folder afterwards.

Tip

Turn on USB debugging on your phone, plug it in and allow this computer when the phone asks. That one plug is all it needs: from then on the phone is found over USB or Wi-Fi on its own.

๐Ÿ”„ Update On Arch-based systems Android-Daemon updates itself with every system update and lets you know when it has. Anywhere else, or any time you like, run git pull && ./install.sh; it's safe to repeat and keeps your settings.
๐Ÿ“ฆ From a package Package builds run ./install.sh --aur, so your package manager handles updates instead.
๐Ÿงน Remove Run ./uninstall.sh. The services, widgets and webcam device go away and your system is left as it was. Your settings stay in ~/.config/Linux-Android-Daemon. Packages like adb and scrcpy from your package manager stay installed, and so does the adb key your phones trust.
๐Ÿ–ฅ๏ธ Needs KDE Plasma 6 and an Android phone with USB debugging. The webcam needs Android 12 or newer.
๐Ÿง Distros The installer sets everything up on Arch and Arch-based systems like CachyOS, Fedora, openSUSE Tumbleweed and Debian testing. Where your distro doesn't package scrcpy, it puts scrcpy's official build in your home folder. On Fedora the webcam driver comes from RPM Fusion.
๐ŸงŠ Atomic desktops On Fedora Atomic desktops like Kinoite, Aurora and Bazzite, and on SteamOS in Desktop Mode, the installer leaves the read-only system untouched and puts scrcpy and adb in ~/.local. If the system is missing something a feature needs, like the webcam driver, the installer tells you which features stay off and, on Fedora Atomic, what to add.

๐Ÿ”Œ Plug in once, then go wireless

Plug in over USB, wireless ADB is armed, unplug and the mirror moves to Wi-Fi, plug back in and it returns to USB

The first time a phone is plugged in it's added to your settings, its Wi-Fi address is saved and wireless debugging is switched on. Walk away with it and the mirror and webcam carry on over Wi-Fi; plug the cable back in and they hop onto the faster USB link. Wireless debugging stays on until the phone restarts.

back to top โฌ†


๐ŸŽฌ See it work

๐Ÿ“ฑ Phone Screen on your desktop

The Phone Screen widget showing the live phone, the lock screen, Wi-Fi, a paused mirror and an offline phone
Add Phone Screen to your desktop and your phone lives there: the real screen, live, and you can click, scroll and type into it like any other window.

The header shows which phone it is and whether it's on USB or Wi-Fi. Underneath are volume, Back, Home, Recent apps and a lock button that always matches the phone, even when it locks itself on a timeout.

Lock the phone and the mirror hides; double-click to unlock it again. When a game or video goes fullscreen the mirror steps aside and comes back when you're done. If the phone is out of reach, the widget says so and reconnects the moment it's back.

Want it bigger? Pop out opens the phone in its own movable window.

๐Ÿ—‚๏ธ Phone Manager in your tray


Phone Manager puts the same phone one click away in your system tray, along with the webcam and every setting.

There's only ever one mirror. Open the tray popup and the phone moves into it, unlocking as it goes; close the popup and it slides straight back to your desktop widget without reconnecting.

Drag the handle at the bottom to make the phone bigger or smaller, and the popup remembers the size for that phone's screen. Pin it open to keep using the phone while you click around your desktop.

๐Ÿ“ฑ PhoneThe live mirror with volume, navigation and lock
๐Ÿ“ท WebcamA live camera preview and every capture option
โš™๏ธ SettingsYour phones and everything about how they connect
Phone Manager opening from the tray on the Phone, Webcam and Settings tabs, then searching

๐Ÿ”Ž Search everything

Start typing in the popup to find any setting, phone or action. Press Enter to run the top result, so locking the phone or jumping to the webcam is a word away.

Searching Phone Manager for tether settings and the lock action

back to top โฌ†


๐Ÿ“ท Your phone is a webcam

Your phone's camera shows up as Phone Camera in every app that uses a webcam: OBS, browsers, Discord and video calls. Nothing connects until something actually opens it, so the phone isn't kept awake for nothing.

An app opens Phone Camera, the webcam daemon wakes the phone camera and streams it, then lets the phone go when the app closes

Webcam tab with a live preview

Live preview โ€” see the shot while you set it up

Webcam tab showing the camera in use by OBS

In use โ€” see which app has the camera


Pick your shot

๐Ÿ“ธ Back, front or external lens
๐Ÿ–ผ๏ธ Up to 4K, in 16:9, 4:3, 3:2 or 1:1
๐ŸŽž๏ธ 60, 30, 24 or 15 frames a second
๐Ÿ”„ Landscape, portrait, upside-down or mirrored
๐Ÿ” Zoom
๐Ÿ”ฆ Torch
โšก High-speed capture

The feed follows the faster link, switching between USB and Wi-Fi as you plug and unplug.

๐Ÿ›Ÿ Internet backup through your phone

When Wi-Fi or Ethernet drops, the plugged-in phone shares its connection over USB until the network is back

Turn on USB tether failover for a phone and your PC stays online through it. The moment your Wi-Fi or Ethernet goes away, the plugged-in phone starts USB tethering; when a real network comes back, tethering switches off again. Pick RNDIS or NCM to suit your phone.


โœจ And the little things

๐Ÿ”“ Unlocks for you

Save your PIN and the phone unlocks itself when the mirror opens.

๐ŸŒ‘ Screen stays dark

The phone's own display switches off while you use it on your desktop.

๐ŸŽฎ Steps aside for games

Fullscreen apps get the whole screen; the mirror comes back afterwards.

๐Ÿ“š Every phone you own

Each phone is remembered with its own settings. Pick which one to use, or ignore one entirely.

๐Ÿ”” Clickable notifications

With KDE Connect, click a phone notification on your PC to open the mirror with the notification shade pulled down.

๐Ÿ–ฅ๏ธ Extended display

Give the phone a second screen of its own instead of mirroring the one in your hand. Samsung phones can open DeX there if you turn on Samsung DeX on external; it's off by default.

๐Ÿงญ Rotation that holds

Keep the phone in portrait or landscape while it's mirrored, however you turn it.

๐Ÿ’ฌ Connect alerts

Get a desktop notification when a phone plugs in and when wireless debugging is ready.

๐Ÿ’พ Survives a restart

Each phone's Wi-Fi address is saved, so it's found again over Wi-Fi after your computer restarts.

back to top โฌ†


๐ŸŽ›๏ธ Settings

Everything lives on the Settings and Webcam tabs in Phone Manager and applies instantly. Each phone keeps its own settings, and you never need to edit a file.

Phone Manager settings with the phone list, device and connection options

Phones, device and connection โ€” name, auto-unlock, wireless debugging and tether failover

Phone Manager mirror and notification settings

Mirror and notifications โ€” screen off, stay awake, clone or extended display, rotation, scrcpy options and alerts

Right-click either widget and choose Configure for a few extras: which phone the desktop widget shows, whether it sits below other windows, a small position nudge for unusual scaling, extra scrcpy options for that widget and an accent colour.


๐Ÿง  How it fits together

The phone connects over USB or Wi-Fi to the adb server, the phone daemon and the webcam daemon, which feed the Phone Screen and Phone Manager widgets and the Phone Camera device

Three small user services do the work. The widgets never start scrcpy themselves: each one tells the phone daemon where it wants the phone to appear, and the daemon moves its one mirror window to whichever widget is showing. That's why the phone can jump between your desktop and the tray without reconnecting.

Service What it does
linux-android-adb Runs the adb server every other part shares
linux-android-daemon Wireless debugging, the mirror, auto-unlock, tether failover and KDE Connect notifications
linux-phonecam The on-demand webcam feed

Two command line tools come along for scripting: phonescreenctl (lock, unlock, volume, navigation, pop out) and phonecamctl (webcam settings and which phone to use).


โš™๏ธ Configuration

Every setting from the Settings tab is saved in ~/.config/Linux-Android-Daemon/config.json. It's created for you on install, kept when you uninstall, and picked up the moment you save a change. If an older install kept it in the repository folder, the installer moves it there for you. New phones are added automatically the first time they're plugged in, starting from defaults.

๐Ÿ“ฑ Per-phone settings
Key Default What it does
name phone model The name shown in the widgets and notifications
enabled true false ignores the phone completely
enable_tcpip true Switch on wireless debugging when the phone is plugged in
tcpip_port 5555 The wireless debugging port
unlock true Unlock the phone with lock_pin when the mirror opens
lock_pin "" Your PIN; nothing is typed while it's empty
screen_off true Turn the phone's display off while it's mirrored
stay_awake false Keep the phone awake while it's plugged in
mode "clone" "clone" mirrors the screen, "extended" gives the phone a second display
display_launcher "" An app to start on the extended display
dex_desktop_mode false Start Samsung DeX on the extended display. The phone's desktop mode setting is switched on while the mirror runs and put back when it closes
orientation "portrait" Hold the phone in "portrait" or "landscape" while mirrored, or "auto"
scrcpy_args [] Extra scrcpy options, added on top of the ones in defaults
tether_failover false Share the phone's connection over USB when your network drops
tether_function "rndis" "rndis" or "ncm"
notify false Desktop notifications when the phone connects
kdeconnect_notify false Clickable KDE Connect notifications (set in defaults)
last_ip saved for you The phone's Wi-Fi address, updated every time it's plugged in
๐Ÿ“ท Webcam settings

The webcam is shared by all phones, so its settings live in a separate camera block.

Key What it does
active_serial Which phone to use; empty picks the plugged-in phone first, then one on Wi-Fi
video_nr The /dev/videoN number of the Phone Camera device
facing "back", "front" or "external"
camera_id A specific camera, overriding facing
resolution A height like "1080", or an exact "1920x1080"
fps Frames per second
aspect_ratio "16:9", "4:3", "3:2" or "1:1"
rotation "@0", "@90", "@180", "@270" or "flip0" for mirrored
zoom Starting zoom
torch Turn the torch on
high_speed High-speed capture
extra_args Extra scrcpy options for the camera

Note

Your PIN is stored as plain text in config.json, which only lives on your machine and only your account can read. Leave auto-unlock off on a computer other people can log into.


๐Ÿ’ฌ Questions

Does my phone need to be rooted?
No. Everything goes through Android's own USB debugging, the same way scrcpy works.
It stopped connecting over Wi-Fi. Why?
Wireless debugging switches off when the phone restarts. Plug it in over USB once and it's back on. Your phone and PC also need to be on the same network.
Why does clicking the mirror close the tray popup?
The phone is its own window floating over the popup, and Plasma closes popups when you click somewhere else. Pin the popup open with the pin button and you can use the phone as long as you like.
Does the webcam drain my phone?
Only while it's in use. The camera connects when an app opens Phone Camera or you look at the preview, and lets go of the phone as soon as nothing is watching. The first frame takes a second or two to arrive.
Can I use more than one phone?
Yes. Every phone you plug in is remembered with its own settings. Choose the one to use from the list in Phone Manager, and point each desktop widget at a phone from its Configure dialog.
Where are the logs?
journalctl --user -u linux-android-daemon -u linux-phonecam -f

๐Ÿงฐ More from DevL0rd

Other Plasma projects made to sit on the same desktop. Click a banner to open it on GitHub.

Konveyor โ€” Scrolling tiling for KDE Plasma
Konveyor ยท Your windows, on a conveyor belt.

RVC Voice Changer โ€” Real-time AI voice changing for Plasma
RVC Voice Changer ยท Sound like anyone, in every app.

KBoard โ€” The on-screen keyboard for Plasma
KBoard ยท Type, glide and talk, right on your desktop.

Syncthing Monitor โ€” Syncthing, live in your Plasma panel
Syncthing Monitor ยท Your sync, at a glance.


Released under the MIT License. Built on scrcpy. Android-Daemon is an independent project and is not affiliated with Google, Genymobile or KDE.

back to top โฌ†

About

Manages an Android phone over USB/WiFi: re-arms wireless ADB, auto-unlocks, auto-launches scrcpy, follows the cable, and fails over to USB tethering.

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages