Rename to hkt.sh
This commit is contained in:
19
scripts/collect-phone-data.sh
Normal file
19
scripts/collect-phone-data.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
# 收集手机数据到文件
|
||||
|
||||
DATA_DIR=~/.openclaw/workspace/data
|
||||
mkdir -p $DATA_DIR
|
||||
|
||||
# 电量
|
||||
termux-battery-status > $DATA_DIR/battery.json 2>&1
|
||||
|
||||
# 最近10条短信
|
||||
termux-sms-list -l 10 > $DATA_DIR/sms.json 2>&1
|
||||
|
||||
# 最近20条通话记录
|
||||
termux-call-log -l 20 > $DATA_DIR/call-log.json 2>&1
|
||||
|
||||
# 时间戳
|
||||
date +%s > $DATA_DIR/last-update.txt
|
||||
|
||||
echo "Data collected at $(date)"
|
||||
Reference in New Issue
Block a user