# How to Turn an Old Android Phone into a Widget Panel and Second Screen for Your Windows PC: phonebox Setup

> AI Release · @ai_release1 · https://ai-release.org/guides/kak-prevratit-staryy-android-smartfon-v-panel-vidzhetov_en.html

## TL;DR

- **Time to complete:** 25–40 minutes, plus one evening of observation to confirm the panel survives sleep and charging.
- **Difficulty:** Basic (one optional ADB step is Intermediate).
- **You need:**
  - A spare Android phone with a healthy battery and a working charge port.
  - A Windows 10 or 11 PC on the same local network as the phone.
  - A **data-capable** USB cable — many cables shipped with chargers carry power only and will fail in Step 2.
  - Optional: Android Platform Tools (`adb`) for verification.
  - Optional fallback: `scrcpy`, if the phonebox mirroring path is unavailable on your build.
  - A stand or dock that keeps the phone plugged in.

**What most tutorials skip:** before you touch a single app setting, confirm that your router actually lets the phone and the PC talk to each other. Guest Wi-Fi with client isolation, or a phone on 5 GHz and a PC on a different subnet, is the first failure mode to rule out — no widget app, kiosk mode or firewall exception fixes it.

## Requirements and setup
![Illustration: Requirements and setup](https://ai-release.org/guides/img/kak-prevratit-staryy-android-smartfon-v-panel-vidzhetov-en-1.jpg?v=1794386374)


- **OS on the PC:** Windows 10 or 11 (both expose the same Firewall and network-profile dialogs used below).
- **Android version:** the minimum supported Android version is stated on the phonebox build you install — **check it against the phonebox documentation** before flashing or resetting anything.
- **Network:** one router, one subnet. Note both IP addresses before starting.
- **Windows Firewall:** you need permission to allow an inbound rule; a non-administrator account will block Step 3.
- **Free space on the phone:** confirm the install size on the app page; a factory-reset spare phone usually has enough.
- **Recommended:** factory reset the phone if it was your daily driver. Leftover accounts, lock screens and notification banners will fight the panel for the screen.

Pre-flight checklist:

- [ ] Developer options unlocked (Settings → About phone → tap **Build number** seven times)
- [ ] USB debugging on (Settings → System → Developer options)
- [ ] **Stay awake** on (same screen — keeps the screen on while charging)
- [ ] Auto-rotate off, orientation locked to landscape or portrait as you plan to mount it
- [ ] Battery optimization disabled for the phonebox package
- [ ] Both devices on the same Wi-Fi SSID, or phone on Wi-Fi and PC on Ethernet of the *same* router

## Step 1. Prepare the phone so it behaves like an appliance

**What to do:** unlock developer options, force the screen to stay awake while charging, and whitelist the panel app from Android's doze logic. Then connect over USB once to confirm `adb` sees the device.

**Why:** Android is tuned for a phone in a pocket. Left alone it dims, sleeps, kills background services and re-enables rotation — three behaviors that turn a widget panel into a black rectangle after ten minutes.

```bash
adb devices
adb shell settings get global stay_on_while_plugged_in
adb shell dumpsys deviceidle whitelist
```

**Example output after enabling "Stay awake":**

```
List of devices attached
R58M12345AB  device
7
```

`7` means "stay on for AC, USB and wireless charging". `0` means the toggle did not take — re-open Developer options and flip **Stay awake** again.

**How to check:** `adb devices` must list your serial with the state `device`, not `unauthorized` and not `offline`. Second, `stay_on_while_plugged_in` must return a non-zero value.

**Example:** if you plan to run the phone on Wi-Fi only (no USB to the PC), the wireless path is the same developer-options screen — the connection procedure is described in [How to Add an Old Non-Rooted Android Phone to Your Tailscale Network](https://ai-release.org/guides/kak-podklyuchit-staryy-android-smartfon-bez-root-k-tail.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide), which covers key-only SSH and wireless ADB without root.

**Why this works:** `stay_on_while_plugged_in` is a global Android setting, not an app feature, so it survives app updates and reboots.

## Step 2. Install phonebox and lay out the widget panel
![Illustration: Step 2. Install phonebox and lay out the widget panel](https://ai-release.org/guides/img/kak-prevratit-staryy-android-smartfon-v-panel-vidzhetov-en-2.jpg?v=1794386404)


**What to do:** install the app, capture its real package name from the device (not from the store listing), grant the permissions it asks for, and place your widgets.

```bash
adb install -r phonebox.apk
adb shell pm list packages | findstr phonebox
```

**Example output:**

```
package:com.<vendor>.phonebox
```

Replace `<vendor>` with whatever your own output prints — the package id is build-specific and is the value you paste into every whitelist command below.

```bash
adb shell dumpsys deviceidle whitelist +com.<vendor>.phonebox
adb shell cmd appops set com.<vendor>.phonebox RUN_IN_BACKGROUND allow
```

**Example:** the second command returns nothing on success; the first prints a line containing your package id. Silence is success here.

**How to check:** reopen the app after a reboot. If the panel redraws by itself, the whitelist worked. If you get a blank grid, the widget host process was killed — repeat the two commands above and also disable the OEM autostart manager (Xiaomi/Oppo/Huawei ship one; the exact path differs per ROM, **check your device documentation**).

**Widget layout example:** add a clock widget in the top row, weather next to it, a calendar agenda below, and a to-do list at the bottom. Keep the launcher grid to a density you can read from your chair — if text looks small at arm's length, reduce the number of columns rather than enlarging the font.

**Where this does NOT work:** any widget that streams DRM-protected video (paid streaming apps) will render black, and apps that set the `FLAG_SECURE` window flag cannot be captured or mirrored at all. A widget panel built from clocks, calendars, notes, dashboards and local media is fine; a Netflix tile is not.

## Step 3. Pair with the Windows PC and verify the second-screen path
![Illustration: Step 3. Pair with the Windows PC and verify the second-screen path](https://ai-release.org/guides/img/kak-prevratit-staryy-android-smartfon-v-panel-vidzhetov-en-3.jpg?v=1794386416)


**What to do:** verify connectivity layer by layer, then test the mirroring or extended-display path. Do not debug the app until the network checks pass.

```powershell
ipconfig
ping -n 4 <phone-ip>
Test-NetConnection -ComputerName <phone-ip> -Port <port>
```

`<phone-ip>` is the address `ipconfig` shows for the PC's adapter and the phone shows under Wi-Fi → network details (for example `192.168.1.42`). `<port>` is the port phonebox listens on — it is displayed on the app's connection screen; **check it against the phonebox documentation**, do not guess.

| Layer | Check | Expected result |
|---|---|---|
| Subnet | `ipconfig` on PC vs. phone Wi-Fi details | Same first three octets, e.g. `192.168.1.x` |
| Reachability | `ping -n 4 <phone-ip>` | 4 replies, 0% loss |
| Port | `Test-NetConnection ... -Port <port>` | `TcpTestSucceeded : True` |
| Mirror | Start the panel connection in phonebox | A window appears on the PC desktop |

**Fallback mirroring check with scrcpy** (only if the app's own mirroring is unavailable):

```powershell
scrcpy --tcpip=<phone-ip> --max-size=1280 --bit-rate=4M
```

**Example:** the scrcpy window title shows your device model, and the phone screen appears within a few seconds. `--max-size=1280` caps the stream width so a weak Wi-Fi link stays smooth; `--bit-rate=4M` limits bandwidth. Drop the bit rate first if you see tearing.

**How to check:** success looks like three things at once — 0% packet loss on `ping`, `TcpTestSucceeded : True` on the port test, and a live window on the PC that updates when you tap the phone.

**Where this does NOT work:** a "second screen" in the true Windows sense (an *extended* desktop you can drag windows onto) is a separate capability from widget mirroring, and it depends on drivers and features shipped with the specific app. If the option is not in your build, treat the phone as a widget panel plus a mirrored view, not as a monitor.

## Troubleshooting

**Problem. `adb devices` lists the phone but nothing installs.**
- Error: `R58M12345AB	unauthorized`
- Cause: the RSA fingerprint prompt on the phone was never accepted, or was dismissed with "Deny".
- Solution: run `adb kill-server`, unplug and replug the cable, unlock the phone and tap **Allow** (tick "Always allow from this computer"). Re-run `adb devices` until the state reads `device`.

**Problem. The PC cannot reach the phone over Wi-Fi.**
- Error: `ERROR: Could not find ADB device` from scrcpy, or `TcpTestSucceeded : False` from `Test-NetConnection`.
- Cause, in order of likelihood: (1) the phone is on a guest SSID with client isolation; (2) the phone is on 5 GHz and the PC on a separate subnet or a VPN adapter; (3) Windows Firewall blocked the inbound rule after you dismissed the prompt.
- Solution: run `ipconfig` on the PC and compare the subnet with the phone's Wi-Fi details. If they differ, move both to the same SSID. If the subnets match, open Windows Security → Firewall & network protection → Allow an app through firewall and enable the phonebox entry for the **Private** profile, then repeat `Test-NetConnection`.

**Problem. The panel goes black or freezes a few minutes after you walk away.**
- Error in `adb logcat`: `W/ActivityManager: Background start not allowed: service Intent { ... }`
- Cause: the OEM battery manager killed the widget host, or doze suspended it during screen-off.
- Solution: `adb shell dumpsys deviceidle whitelist +com.<vendor>.phonebox`, then disable the vendor autostart manager for the app and re-test by leaving the phone untouched for 15 minutes while charging.

## Summary and next steps

You now have a spare Android phone that stays awake, survives doze, and renders a widget panel that the PC can reach on the local network. Next, harden the setup: assign a static DHCP lease to both devices so the connection survives router reboots, and if you want to drop Microsoft's tooling entirely, compare options in [How to Connect Android to Windows without Microsoft Phone Link](https://ai-release.org/guides/kak-svyazat-android-s-windows-bez-microsoft-phone-link.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide).

## FAQ

**Does the phone need root?**
No. Everything in Steps 1–3 uses standard developer options and ADB, which work on a stock, non-rooted device.

**Can I use the phone as a real second monitor instead of a widget panel?**
Only if your phonebox build exposes extended-display mode; widget mirroring and true extended desktop are different features. Verify the option in the app before buying a mount.

**Why does the PC not see the phone even though both are on Wi-Fi?**
Almost always client isolation on a guest network or a subnet mismatch. Confirm with `ipconfig` and `ping` before changing any app setting.

**Will the battery survive being plugged in permanently?**
Continuous charging stresses the battery; keep the phone out of direct sun and check the app's documentation for any charging-limit feature in your build.
