Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
PowerShell opens instead. Outside the Debian family there is no `x-terminal-emulator`, so `$TERMINAL` or the first
installed common terminal (GNOME Console, Konsole, Alacritty, kitty, xterm …) opens (#73).

**Setup**
- When Smart App Control blocks the unsigned agent, `setup.ps1` no longer stops with "An Application Control policy
has blocked this file". It says that PhoneBox is installed but can't run until the agent is signed (#56), and it
no longer claims the release agent runs with Smart App Control on (#69).

## 0.9.10 — 2026-11-16

PhoneBox now speaks 11 languages. This is also a reliability release: updates are checked against the release
Expand Down
11 changes: 7 additions & 4 deletions docs/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@ curl -fsSL https://raw.githubusercontent.com/ersinkoc/phonebox/main/setup.sh | b
Windows SmartScreen or an antivirus may warn about a new, unsigned program, and some antivirus engines have flagged
it ([#69](https://github.com/ersinkoc/phonebox/issues/69)). Setup only installs a file that matches the release
checksum. If your antivirus removes `PhoneBoxAgent.exe`, setup says so; restore it from quarantine or report it.
- **Smart App Control** (Windows 11) blocks programs that are neither signed nor known to Microsoft. The release
agent has run with it on, while agents built from source can be blocked. Setup tells you when it is on. If it
blocks PhoneBox, don't turn it off for PhoneBox: it cannot be turned back on without resetting Windows. Report
the message in [#69](https://github.com/ersinkoc/phonebox/issues/69) instead.
- **Smart App Control** (Windows 11) blocks programs that are neither signed nor known to Microsoft. The agent is
not code-signed yet (signing through SignPath Foundation is pending, [#56](https://github.com/ersinkoc/phonebox/issues/56)),
so with Smart App Control on, Windows refuses to start it: "An Application Control policy has blocked this file"
([#69](https://github.com/ersinkoc/phonebox/issues/69)). Setup warns you first, still installs it, and explains
if Windows blocks it. Please keep Smart App Control on: on older Windows builds it cannot be turned back on without
resetting Windows. In evaluation mode it blocks nothing yet. On a work or school computer, an AppLocker or group
policy can block the agent too; its administrator can allow it.
- **USB debugging gives a computer you allow control over the phone.** Allow only your own computers. You can
withdraw them on the phone under *Developer options › Revoke USB debugging authorisations*.
- **Wi-Fi is off until you turn it on.** Until then the agent listens only on this computer (`127.0.0.1:8765`).
Expand Down
39 changes: 32 additions & 7 deletions setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,14 @@ function Install-PhoneBox {
# Smart App Control (Windows 11) blocks programs that are neither signed nor known to Microsoft: 1 on, 2 evaluation
$smartAppControl = 0
try { $smartAppControl = [int](Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\CI\Policy' -ErrorAction Stop).VerifiedAndReputablePolicyState } catch { }
if ($smartAppControl -eq 1 -or $smartAppControl -eq 2) {
Write-Caution "Smart App Control is $(if ($smartAppControl -eq 1) { 'on' } else { 'in evaluation mode' }). It blocks programs that are neither signed nor known"
Write-Caution 'to Microsoft. The release agent has run with it on; agents built from source can be blocked. If Windows'
Write-Caution 'blocks PhoneBoxAgent.exe, do not turn Smart App Control off for it (it cannot be turned back on without'
Write-Caution "resetting Windows); please report the message in https://github.com/$Repo/issues/69 instead."
if ($smartAppControl -eq 1) {
Write-Caution 'Smart App Control is on. It blocks programs that are neither signed nor known to Microsoft, and'
Write-Caution 'PhoneBoxAgent.exe is not code-signed yet (signing through SignPath Foundation is pending:'
Write-Caution "https://github.com/$Repo/issues/56), so Windows will probably refuse to start it. Setup still installs it."
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
Write-Caution 'Please keep Smart App Control on: on older Windows builds it cannot be turned back on without resetting Windows.'
} elseif ($smartAppControl -eq 2) {
Write-Caution 'Smart App Control is in evaluation mode: it blocks nothing yet. If Windows turns it on later, it will block'
Write-Caution "PhoneBoxAgent.exe until the agent is code-signed (pending: https://github.com/$Repo/issues/56)."
}

Write-Step 'Finding the release'
Expand Down Expand Up @@ -454,15 +457,37 @@ function Install-PhoneBox {
Write-Info "Start it with $exe"
} else {
Write-Step 'Starting PhoneBox'
Start-Process -FilePath $exe -WorkingDirectory $app
$blocked = $false
try {
Start-Process -FilePath $exe -WorkingDirectory $app -ErrorAction Stop
} catch {
# Smart App Control and other App Control / AppLocker policies refuse the file (Win32 errors 4551 and 1260).
# Start-Process keeps only the message, in the system language, so compare it with the system's own text.
$why = "$($_.Exception.Message)"
$says = { param($code) $text = ([ComponentModel.Win32Exception]::new($code).Message).Trim().TrimEnd('.'); $text -and $why.Contains($text) }
$appControl = & $says 4551 # App Control for Business, which Smart App Control uses
$groupPolicy = & $says 1260 # AppLocker or a software restriction policy
if (-not ($appControl -or $groupPolicy)) { throw }
$blocked = $true
Write-Caution "Windows did not let PhoneBoxAgent.exe start: $why"
if ($appControl -and $smartAppControl -eq 1) {
Write-Caution 'PhoneBox is installed, but Smart App Control will not run it until the agent is code-signed.'
Write-Caution "Signing is pending: https://github.com/$Repo/issues/56. Please keep Smart App Control on."
} else {
Write-Caution 'PhoneBox is installed, but a policy on this computer does not allow it to run. On a work or school'
Write-Caution 'computer, ask its administrator to allow PhoneBoxAgent.exe.'
}
}
$up = $false
for ($i = 0; $i -lt 30 -and -not $up; $i++) {
for ($i = 0; $i -lt 30 -and -not $up -and -not $blocked; $i++) {
Start-Sleep -Milliseconds 700
try { Invoke-RestMethod -UseBasicParsing "$SettingsUrl/api/info" -TimeoutSec 2 | Out-Null; $up = $true } catch { }
}
if ($up) {
Write-Ok "PhoneBox is running: settings at $SettingsUrl (also from the tray icon)"
try { Start-Process $SettingsUrl } catch { }
} elseif ($blocked) {
# explained above
} elseif (-not (Test-Path $exe)) {
Write-Caution "PhoneBoxAgent.exe was removed, probably by an antivirus. See https://github.com/$Repo/issues/69."
} else {
Expand Down
Loading