-
Notifications
You must be signed in to change notification settings - Fork 0
/
live_test.bat
23 lines (16 loc) · 954 Bytes
/
live_test.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@echo off
cls
echo [*] Building reparted
pushd cmd & go env -w GOOS=linux GOARCH=arm64 GO111MODULE=off & go build -o ..\bin\reparted .\ & popd
echo [*] Creating ramdisk
adb shell su -c umount /mnt/ramdisk & adb shell su -c mkdir -p /mnt/ramdisk & adb shell su -c mount -t tmpfs -o size=40M tmpfs /mnt/ramdisk & adb shell su -c chmod 777 /mnt/ramdisk
echo [*] Checking and deleting old install (warning: wipes /data/local/tmp/reparted)
adb shell su -c rm -rf /data/local/tmp/reparted/ & adb shell su -c rm -rf /mnt/ramdisk/reparted/
echo [*] Pushing reparted and dependencies
adb push bin /data/local/tmp/reparted & adb push reparted.json /data/local/tmp/reparted/
echo [*] Moving reparted to ramdisk
adb shell su -c mv /data/local/tmp/reparted/ /mnt/ramdisk/reparted/
echo [*] Marking reparted and dependencies as executable
adb shell su -c chmod +x /mnt/ramdisk/reparted/*
echo [*] Starting reparted
adb shell su -c /mnt/ramdisk/reparted/reparted