|
|
@@ -1,6 +1,7 @@
|
|
|
import { io } from "socket.io-client"
|
|
|
import axios from "axios"
|
|
|
import { setTimeout } from "timers/promises"
|
|
|
+import chalk from "chalk"
|
|
|
const axiosInstance = axios.create({
|
|
|
baseURL: "http://47.98.225.28/api",
|
|
|
headers: {
|
|
|
@@ -34,29 +35,32 @@ for (let device of devices) {
|
|
|
)
|
|
|
if (
|
|
|
!out.includes(
|
|
|
- "google/komodo_beta/komodo:15/AP41.240823.009/12329489:user/release-keys"
|
|
|
+ "samsung/herolteskt/herolteskt:8.0.0/R16NW/G930SKSU1ERE8:user/release-keys"
|
|
|
)
|
|
|
) {
|
|
|
- console.error(device.id, device.name, "update")
|
|
|
+ console.log(chalk.blue(device.id, device.name, "update"))
|
|
|
axiosInstance
|
|
|
.post(
|
|
|
`/device/${device.id}/sendMessage`,
|
|
|
{
|
|
|
action: "runScript",
|
|
|
data: {
|
|
|
- script: `/data/adb/magisk/busybox wget -O /data/adb/modules/playintegrityfix/pif.json https://nebuai.oss-cn-hangzhou.aliyuncs.com/application/20241016/yq6jx56d.json
|
|
|
-am force-stop com.google.android.gms`
|
|
|
+ script: `/data/adb/magisk/busybox wget -O /data/adb/modules/playintegrityfix/pif.json https://nebuai.oss-cn-hangzhou.aliyuncs.com/application/20241022/0knkzxmy.json
|
|
|
+am force-stop com.google.android.gms
|
|
|
+am force-stop com.google.android.apps.messaging`
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- timeout: 10000
|
|
|
+ timeout: 60000
|
|
|
}
|
|
|
)
|
|
|
- .catch(e => console.log(device.id, device.name, e.message))
|
|
|
+ .catch(e =>
|
|
|
+ console.log(chalk.red(device.id, device.name, e.message))
|
|
|
+ )
|
|
|
} else {
|
|
|
- console.log(device.id, device.name, "OK")
|
|
|
+ console.log(chalk.green(device.id, device.name, "OK"))
|
|
|
}
|
|
|
} catch (e) {
|
|
|
- console.log(e.message)
|
|
|
+ console.log(chalk.red(e.message))
|
|
|
}
|
|
|
}
|