Commit f267e94
feat(dhizuku): unfreeze server via AMS-mediated provider call
Wake the server with a real ContentProvider transaction instead of only
launching the Dhizuku app's UI, so cached/frozen servers recover without a
launcher activity.
Background: a server that keeps no foreground service (e.g. OwnDroid's
built-in server) is frozen by the OS once backgrounded. The first bind to a
frozen process returns "error -74 (sent to frozen apps)". Acquiring the
client or a raw binder call does not unfreeze it; an AMS-mediated provider
call does — delivering the transaction is what forces the thaw.
- New wakeDhizukuServer(): resolves the server's provider authority from the
active device owner (DhizukuVariables.getProviderAuthorityName) and pokes
it with a throwaway call(). Best-effort, fully guarded.
- ensureDhizukuAlive() now wakes via the provider (and re-wakes each poll,
since the process can re-freeze mid-wait) and no longer hard-returns when
com.rosan.dhizuku is absent — launching the standalone app's UI becomes an
additional path rather than a prerequisite.
Pairs with the server-agnostic-discovery change: that one lets isDhizukuAlive
recognise a running built-in server, this one revives it when it's frozen.
Together they make a frozen OwnDroid server usable; each stands alone too
(this one also lets a frozen standalone Dhizuku recover without a UI bounce).
┌─────────────────────────────────────────────────────────────┐
│ This change was written with AI assistance (Claude / Claude │
│ Code). Please review the behavior on real hardware before │
│ merging. │
└─────────────────────────────────────────────────────────────┘
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent f55f3f3 commit f267e94
1 file changed
Lines changed: 28 additions & 2 deletions
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
67 | 88 | | |
68 | 89 | | |
69 | 90 | | |
70 | | - | |
71 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
72 | 97 | | |
73 | 98 | | |
| 99 | + | |
74 | 100 | | |
75 | 101 | | |
76 | 102 | | |
| |||
0 commit comments