-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbmake.ps1
27 lines (22 loc) · 842 Bytes
/
dbmake.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
param ($asuppk_srv_ip);
echo "trying to delete databases: asop, esk, pfr, mkassir";
adb shell "rm /sdcard/MobileBooking/ASOP/*.db";
adb shell "rm /sdcard/MobileBooking/ESK/*.db";
adb shell "rm /sdcard/MobileBooking/PFR/*.db";
adb shell "rm /sdcard/MobileBooking/mkassir.db";
echo "done";
if ([string]::IsNullOrWhitespace($asuppk_srv_ip)) {
echo "Didn't get any ip from you. Looking for IPv4 Address"
$asuppk_srv_ip = (
Get-NetIPConfiguration |
Where-Object {
$_.IPv4DefaultGateway -ne $null -and
$_.NetAdapter.Status -ne "Disconnected"
}
).IPv4Address.IPAddress
$asuppk_srv_ip += ";"
echo "Found your IPv4 Address: '$asuppk_srv_ip'"
}
echo "trying to add '$asuppk_srv_ip' to server-addr.txt"
adb shell "echo '$asuppk_srv_ip' > /sdcard/MobileBooking/server-addr.txt";
echo "done";