-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathYaafi.bat
62 lines (54 loc) · 1.45 KB
/
Yaafi.bat
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@ECHO off
goto check_Permissions
:check_Permissions
net session >nul 2>&1
if %errorLevel% == 0 (
echo off
) else (
echo I know reading is hard but come on, it's the name of a file. Go RTFM.
echo If this was a 3ds you'd have bricked.
pause
exit
)
@ECHO off
CLS
:start
cd /d %~dp0
cls
echo Welcome to yet another ADB and Fastboot installer
echo Thanks to Erich Markus Pribitzer for the downloader
echo This'll install or update ADB and Fastboot to your windows directory so you can use it from any location.
echo 1. Install or update ADB/Fastboot
echo 2. Uninstall
echo 3. Exit
set /P A=Choose 1, 2, or 3 then press enter.
if %A%==1 goto inup
if %A%==2 goto upda
if %A%==3 goto exit
goto start
:inup
:start_inup
cls
echo Making sure adb isn't running.
adb kill-server
del C:\Windows\adb.exe C:\Windows\AdbWinApi.dll C:\Windows\AdbWinUsbApi.dll C:\Windows\fastboot.exe
cls
echo Working please wait.
mkdir Temp
curl -o Temp\ptw.zip -L https://dl.google.com/android/repository/platform-tools-latest-windows.zip
tar -xf Temp\ptw.zip -C Temp
robocopy Temp\platform-tools C:\Windows adb.exe AdbWinApi.dll AdbWinUsbApi.dll fastboot.exe /IS /NJH /NJS
cls
echo Cleaning temp files.
rmdir /S /Q Temp\
echo Done
pause
exit
:unin
:start_unin
cls
echo Removing files.
del C:\Windows\adb.exe C:\Windows\AdbWinApi.dll C:\Windows\AdbWinUsbApi.dll C:\Windows\fastboot.exe
cls Done
pause
exit