phone_focus_mode: add persistent home-mode status notification
- New companion Android app (com.kuhy.focusstatus) under
phone_focus_mode/focus_status_app/ with a pure-Java, Gradle-less
command-line build pipeline (build.sh). Shows an ongoing
notification titled 'Focus: HOME / AWAY / DAEMON DOWN' with
distance, GPS, disabled-app count, last check, daemon checkmarks,
and a 'Re-check now' action button.
- focus_daemon.sh: write_status_snapshot() + sleep_with_recheck()
for JSON status + early-wake on trigger file. init() chmods
STATE_DIR 777 so the app can drop the trigger file.
- config.sh: new STATUS_FILE / RECHECK_TRIGGER; WHITELIST expanded
with com.kuhy.focusstatus and 11 more user-requested apps
(podcini X, mpv, bible/openbible, pkp/portalpasazera, orange,
runnerup, splitbills/splitwise, xiaomi smarthome).
- focus_ctl.sh: new 'recheck' + 'notif-status' subcommands.
- deploy.sh: new step [7/7] builds APK, installs, grants
POST_NOTIFICATIONS, pre-approves Magisk SU policy, launches
foreground service.
- .gitignore: exclude focus_status_app/build symlink + debug.keystore.
End-to-end verified on device: notification live with real values;
Re-check button triggers a daemon location check within ~1s.
2026-04-20 15:33:32 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
|
package="com.kuhy.focusstatus">
|
|
|
|
|
|
|
|
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
|
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
|
|
|
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
|
|
|
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
|
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
|
|
|
|
|
|
|
|
<application
|
|
|
|
|
android:label="Focus Status"
|
|
|
|
|
android:icon="@android:drawable/ic_menu_compass"
|
|
|
|
|
android:allowBackup="false"
|
|
|
|
|
android:hasFragileUserData="false"
|
|
|
|
|
android:usesCleartextTraffic="false">
|
|
|
|
|
|
|
|
|
|
<activity
|
|
|
|
|
android:name=".LaunchActivity"
|
|
|
|
|
android:exported="true"
|
|
|
|
|
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
|
|
|
|
android:excludeFromRecents="true">
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="android.intent.action.MAIN" />
|
|
|
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
|
|
|
</intent-filter>
|
|
|
|
|
</activity>
|
|
|
|
|
|
|
|
|
|
<service
|
|
|
|
|
android:name=".StatusService"
|
|
|
|
|
android:exported="false"
|
|
|
|
|
android:foregroundServiceType="specialUse">
|
|
|
|
|
<property
|
|
|
|
|
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
|
|
|
|
android:value="Persistent status of focus/home-mode daemon on rooted device" />
|
|
|
|
|
</service>
|
|
|
|
|
|
|
|
|
|
<receiver
|
|
|
|
|
android:name=".RecheckReceiver"
|
|
|
|
|
android:exported="false">
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="com.kuhy.focusstatus.RECHECK" />
|
|
|
|
|
</intent-filter>
|
|
|
|
|
</receiver>
|
|
|
|
|
|
2026-06-13 16:48:38 +02:00
|
|
|
<receiver
|
|
|
|
|
android:name=".CurfewToggleReceiver"
|
|
|
|
|
android:exported="false">
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="com.kuhy.focusstatus.CURFEW_TOGGLE" />
|
|
|
|
|
</intent-filter>
|
|
|
|
|
</receiver>
|
|
|
|
|
|
phone_focus_mode: add persistent home-mode status notification
- New companion Android app (com.kuhy.focusstatus) under
phone_focus_mode/focus_status_app/ with a pure-Java, Gradle-less
command-line build pipeline (build.sh). Shows an ongoing
notification titled 'Focus: HOME / AWAY / DAEMON DOWN' with
distance, GPS, disabled-app count, last check, daemon checkmarks,
and a 'Re-check now' action button.
- focus_daemon.sh: write_status_snapshot() + sleep_with_recheck()
for JSON status + early-wake on trigger file. init() chmods
STATE_DIR 777 so the app can drop the trigger file.
- config.sh: new STATUS_FILE / RECHECK_TRIGGER; WHITELIST expanded
with com.kuhy.focusstatus and 11 more user-requested apps
(podcini X, mpv, bible/openbible, pkp/portalpasazera, orange,
runnerup, splitbills/splitwise, xiaomi smarthome).
- focus_ctl.sh: new 'recheck' + 'notif-status' subcommands.
- deploy.sh: new step [7/7] builds APK, installs, grants
POST_NOTIFICATIONS, pre-approves Magisk SU policy, launches
foreground service.
- .gitignore: exclude focus_status_app/build symlink + debug.keystore.
End-to-end verified on device: notification live with real values;
Re-check button triggers a daemon location check within ~1s.
2026-04-20 15:33:32 +02:00
|
|
|
<receiver
|
|
|
|
|
android:name=".BootReceiver"
|
|
|
|
|
android:exported="true"
|
|
|
|
|
android:enabled="true">
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
|
|
|
|
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
|
|
|
|
|
</intent-filter>
|
|
|
|
|
</receiver>
|
|
|
|
|
</application>
|
|
|
|
|
</manifest>
|