-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pong_Fastboot_NOS_Flash.bat
117 lines (96 loc) · 3.7 KB
/
Pong_Fastboot_NOS_Flash.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
@echo off
title Nothing Phone 2 Fastboot ROM Flasher (t.me/NothingPhone2)
echo ########################################################
echo # Nothing Phone 2 Fastboot ROM Flasher V5 #
echo # Developed And Tested By #
echo # Hellboy017, Ali Shahawez, Spike, Phatwalrus #
echo # [Nothing Phone (2) Telegram Dev Team] #
echo # Build Date:23/11/23 #
echo ########################################################
echo ##########################
echo # CHANGING ACTIVE SLOT #
echo ##########################
set current_slot=null
choice /c ab /m "Select the slot you wish to flash the firmware to"
if %errorlevel% equ 1 (
fastboot --set-active=a
set current_slot=a
) else if %errorlevel% equ 2 (
fastboot --set-active=b
set current_slot=b
)
echo Active slot is slot %current_slot%
echo #######################
echo # FORMATTING DATA #
echo #######################
choice /m "Wipe Data?"
if %errorlevel% equ 1 (
fastboot -w
)
echo ##############################
echo # FLASHING BOOT/RECOVERY #
echo ##############################
for %%i in (boot vendor_boot dtbo recovery) do (
fastboot flash %%i %%i.img
)
echo ##########################
echo # REBOOTING TO FASTBOOTD #
echo ##########################
fastboot reboot fastboot
echo #######################
echo # FLASHING FIRMWARE #
echo #######################
for %%i in (abl aop bluetooth cpucp devcfg dsp featenabler hyp imagefv keymaster modem multiimgoem multiimgqti qupfw qweslicstore shrm tz uefi uefisecapp xbl xbl_config xbl_ramdump) do (
fastboot flash %%i %%i.img
)
echo #################################
echo # RESIZING LOGICAL PARTITIONS #
echo #################################
for %%i in (odm_a system_a system_ext_a product_a vendor_a vendor_dlkm_a odm_b system_b system_ext_b product_b vendor_b vendor_dlkm_b) do (
fastboot delete-logical-partition %%i-cow
)
if %current_slot%==a (
for %%i in (odm_a system_a system_ext_a product_a vendor_a vendor_dlkm_a) do (
fastboot delete-logical-partition %%i
fastboot create-logical-partition %%i 1
)
) else if %current_slot%==b (
for %%i in (odm_b system_b system_ext_b product_b vendor_b vendor_dlkm_b) do (
fastboot delete-logical-partition %%i
fastboot create-logical-partition %%i 1
)
)
echo ###############################
echo # FLASHING LOGICAL PARTITIONS #
echo ###############################
for %%i in (system system_ext product vendor vendor_dlkm odm vbmeta vbmeta_system vbmeta_vendor) do (
fastboot flash %%i %%i.img
)
echo ###############
echo # REBOOTING #
echo ###############
fastboot reboot
echo ##########################
echo # JOIN OUR TG COMMUNITY #
echo ##########################
echo Feel free to join our Device Telegram Community by selecting an option below, or exit the script if you prefer (Use VPN if the links are not working):
echo ---------------------------------------------------
echo 1. Nothing Phone (2) Telegram Global Discussion
echo 2. Nothing Phone (2) Telegram Updates Channel
echo 3. Nothing Phone (2) Telegram Photography Group
echo 4. Join all of the above
echo 5. Exit
echo ---------------------------------------------------
set /p choice=Enter the number of your choice:
if %choice% equ 1 start https://t.me/NothingPhone2
if %choice% equ 2 start https://t.me/NothingPhone2updates
if %choice% equ 3 start https://t.me/NothingPhone2Photography
if %choice% equ 4 (
start https://t.me/NothingPhone2
timeout /t 5 /nobreak >nul
start https://t.me/NothingPhone2Updates
timeout /t 5 /nobreak >nul
start https://t.me/NothingPhone2Photography
)
if %choice% equ 5 exit /b
pause