forked from Nazky/ForcedAndroidW11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForcedAndroidW11.bat
214 lines (136 loc) · 4.15 KB
/
ForcedAndroidW11.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
@echo off
title ForcedAndroidW11 - v0.2
cd %temp%
goto :MENU
:MENU
echo ---------------------------------
echo - ForcedAndroidW11 -
echo - A script to install the WSA -
echo - With GAPPS :) -
echo ---------------------------------
echo - By @NazkyYT -
echo ---------------------------------
REM echo Wokring Directory : %temp%
echo.
echo MAKE SUR TO RUN THIS SCRIPT IN ADMIN MODE !!!!
echo.
echo IF YOU HAVE ANDROID ALEARDY INSTALL YOU NEED TO UNISTALL IT BEFORE CONTINUED !!!!
echo.
echo.
echo 1 - Run all
echo 2 - Enable devloper mode
echo 3 - Download WSA with GAPPS
echo 4 - Install WSA with GAPPS
echo 5 - Fix Google Sign in
echo.
set /P var="Please select a numaber : "
if %var% == 1 goto :ALL
if %var% == 2 goto :DEVM
if %var% == 3 goto :DWSA
if %var% == 4 goto :IWSA
if %var% == 5 goto :FG
echo Please choose a right numaber
pause
cls
goto :MENU
:DEVM
echo Enable devmode...
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
DISM /Online /Add-Capability /CapabilityName:Tools.DeveloperMode.Core
echo Devmode Enable
echo.
echo You maybe have to restart after this !
echo.
pause
goto :MENU
:DWSA
echo Download file...
powershell [Text.Encoding]::Utf8.GetString([Convert]::FromBase64String('aHR0cHM6Ly9iaXQubHkvMllxVThyWg==')) > output
set /p url=<output
del output
powershell Invoke-WebRequest %url% -o WSA.zip
echo Download Finish
echo Extract archive...
powershell Expand-Archive -path "WSA.zip" "WSA"
echo Archive Extracted
echo.
pause
goto :MENU
:IWSA
echo Install WSA...
powershell Add-AppxPackage -Register "WSA/WSA-Patched/AppxManifest.xml"
echo WSA Installed
echo.
pause
goto :MENU
:FG
if exist ADB\ (
echo Fix Sign in...
echo Activate the devloper mode on the WSA and run it once before continued !!!!!
pause
cd ADB/platform-tools
adb connect 127.0.0.1:58526 && adb shell "su -c 'setenforce 0'"
echo Google Sign In Fixed
pause
goto :MENU
) else (
echo Fixing Google sign in...
echo Download ADB...
powershell Invoke-WebRequest "https://dl.google.com/android/repository/platform-tools-latest-windows.zip" -o adb.zip
echo Extract ADB...
powershell Expand-Archive -path "adb.zip" "ADB"
echo Fix Sign in...
echo Activate the devloper mode on the WSA and run it once before continued !!!!!
pause
cd ADB/platform-tools
adb connect 127.0.0.1:58526 && adb shell "su -c 'setenforce 0'"
echo Google Sign In Fixed
pause
goto :MENU
)
pause
:ALL
echo Enable devmode...
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
DISM /Online /Add-Capability /CapabilityName:Tools.DeveloperMode.Core
echo Devmode Enable
echo.
echo You maybe have to restart after this !
echo.
echo Download file...
powershell [Text.Encoding]::Utf8.GetString([Convert]::FromBase64String('aHR0cHM6Ly9iaXQubHkvMllxVThyWg==')) > output
set /p url=<output
del output
powershell Invoke-WebRequest %url% -o WSA.zip
echo Download Finish
echo Extract archive...
powershell Expand-Archive -path "WSA.zip" "WSA"
echo Archive Extracted
echo.
echo Install WSA...
powershell Add-AppxPackage -Register "WSA/WSA-Patched/AppxManifest.xml"
echo WSA Installed
echo.
if exist ADB\ (
echo Fix Sign in...
echo Activate the devloper mode on the WSA and run it once before continued !!!!!
pause
cd ADB/platform-tools
adb connect 127.0.0.1:58526 && adb shell "su -c 'setenforce 0'"
echo Google Sign In Fixed
echo.
) else (
echo Fixing Google sign in...
echo Download ADB...
powershell Invoke-WebRequest "https://dl.google.com/android/repository/platform-tools-latest-windows.zip" -o adb.zip
echo Extract ADB...
powershell Expand-Archive -path "adb.zip" "ADB"
echo Fix Sign in...
echo Activate the devloper mode on the WSA and run it once before continued !!!!!
pause
cd ADB/platform-tools
adb connect 127.0.0.1:58526 && adb shell "su -c 'setenforce 0'"
echo Google Sign In Fixed
echo.
)
pause