Skip to content

Apple's open-source XNU kernel on Android phones: its own loader and drivers, Metal on the Adreno. Runs from RAM; a reboot gives the phone back to Android.

C

inject_sb: bars from the last real signal reading -- the kernel's NAS state alternates 'registered, signal not read' with 'not registered, -86 dBm', so at registration the dBm reads 0 and only one bar was forced; the last reading within a minute now stands in (cycle 41b: the icon shown, 1 bar)

shimoku74fa859c645d2e
diff --git a/prebuilt/SHA256SUMS b/prebuilt/SHA256SUMS
index 3feac60..d8831a2 100644
--- a/prebuilt/SHA256SUMS
+++ b/prebuilt/SHA256SUMS
@@ -1,4 +1,4 @@
-Built 2026-10-25 19:41 from this tree.
+Built 2026-10-25 19:56 from this tree.
04263e76d6cc8b13e8f9e89229afa8f4d3039d8f3714ca7fd1d6e8603091d28b prebuilt/mach.development.bcm2837
3de0d8b2095989a9a8f9f9679b8bec01d80bad38eee535d934d29b7b76fee984 prebuilt/loader.efi
@@ -11,7 +11,7 @@ b089fec6fe19149c3a61f8645ea3c28b19a051d4d053794ae459ff6a7c947805 prebuilt/userl
ef496beee457476dcda607d27cb26398b1fc463b6f6c7fe21012eb4c0c26edb9 prebuilt/userland/libhakios.app.dylib
530c2e681093ece2afe7f5180a4723bd46d92f7af39edc0a8c77136136a4dad6 prebuilt/userland/libhakios.dylib
d8680034e5f0cdecd396cd7488e9d0f30037223ebc57f5309f99a6cd45a4ad26 prebuilt/userland/libhakios.media.dylib
-e439776447a081cb1c57232b2df976e0dbe09c92e412e6b7973a8d89adbc10ee prebuilt/userland/libhakios.sb.dylib
+2ac431a5f5d588ab76a80abbe6f1be9934c13adc4794226de9ba777745075f36 prebuilt/userland/libhakios.sb.dylib
da392e632eb6978164c4c191b73773cf4ceac2c288d1b9697d35fd1f938f73f3 prebuilt/userland/libhakios.tweaks.dylib
8ba7ffba4ff62aff74ab144fc25c61873408320511a83c9b8faf941f32e965d0 prebuilt/userland/mg_test
8dccf07fb4d9f406fcf558355cc9f3a1614a39c29e5bb79740aa5c5e972023fe prebuilt/userland/net_test
diff --git a/prebuilt/userland/libhakios.sb.dylib b/prebuilt/userland/libhakios.sb.dylib
index edf8f84..11fe5e5 100755
Binary files a/prebuilt/userland/libhakios.sb.dylib and b/prebuilt/userland/libhakios.sb.dylib differ
diff --git a/userland/src/inject_sb.c b/userland/src/inject_sb.c
index 240cc98..946ad7a 100644
--- a/userland/src/inject_sb.c
+++ b/userland/src/inject_sb.c
@@ -32,6 +32,7 @@
* answered, with that program's layers.
*/
#include <CoreFoundation/CoreFoundation.h>
+#include <time.h>
#include <IOKit/IOKitLib.h>
#include <dispatch/dispatch.h>
#include <dlfcn.h>
@@ -307,6 +308,23 @@ update_signal_item(id self, SEL sel, long item, void *data, id sim, void *getter
* registration) at least one bar is forced so the icon is visibly present rather than empty.
* modem_bars_off=1 (as a sysctl) is not honoured; set kern.hakios.cellular_up=0 to hide it.
*/
+ /*
+ * The kernel's NAS state alternates between two reports -- "registered, signal not read" and
+ * "not registered, -86 dBm" -- so at the moments it says registered the dBm reads 0. The last
+ * real reading (within a minute) stands in for it.
+ */
+ {
+ static int last_dbm;
+ static time_t last_dbm_at;
+ time_t now = time(NULL);
+
+ if (dbm < 0) {
+ last_dbm = dbm;
+ last_dbm_at = now;
+ } else if (last_dbm < 0 && now - last_dbm_at < 60) {
+ dbm = last_dbm;
+ }
+ }
shown = bars;
if (shown <= 0 && dbm < 0) {
shown = dbm >= -95 ? 4 : dbm >= -105 ? 3 : dbm >= -115 ? 2 : 1; /* derive from dBm when bars is 0 */