# CloudPhone Daemon Magisk Module

This module launches `cloudphone_daemon` from Magisk lifecycle scripts.

Files:

- `post-fs-data.sh`: early boot hook, currently logs only
- `service.sh`: boot stage entry, waits for boot completion then delegates to `server.sh`
- `server.sh`: module internal daemon control wrapper
- `action.sh`: restart or inspect daemon state from the Magisk app action button
- `uninstall.sh`: stop daemon during module removal
- `cloudphone.conf`: runtime configuration loaded by scripts
- `bin/cloudphone_daemon`: packaged daemon binary
- `bin/anxinchong-lsposed.apk`: packaged LSPosed APK, installed during module start

Logs on device:

- service/script log: `/data/local/cloudphone/magisk-service.log`
- daemon log: `/data/local/cloudphone/cloudphone.log`
- logcat tag: `cloudphone-magisk`

To inspect logs:

```sh
su
cat /data/local/cloudphone/magisk-service.log
cat /data/local/cloudphone/cloudphone.log
logcat -s cloudphone-magisk
```

To edit config after installation:

```sh
su
vi /data/adb/modules/cloudphone_daemon/cloudphone.conf
ASH_STANDALONE=1 /data/adb/magisk/busybox sh /data/adb/modules/cloudphone_daemon/action.sh restart
```
