Batch help
@Echo off
ECHO.
ECHO ****************************************************************
ECHO This progam allows you to change the carrier text
ECHO on lockscreen, and in the notifications bar.
ECHO It also will add the sysro (mount as Read-only) and sysrw (mount as read-write)
ECHO to any ROM.
ECHO ***************************************************************
ECHO.
:MENU
ECHO 1 - Reboot
ECHO 2 - Reboot to Recovery
ECHO 3 - Change Carrier Text
ECHO 4 - Add sysrw and sysro
ECHO 5 - Exit
SET /P START=Type a number then press ENTER:
IF %START%==1 GOTO REBOOT
IF %START%==2 GOTO REBOOTRECOVERY
IF %START%==3 GOTO SETCARRIERVAR
IF %START%==4 GOTO ADD
IF %START%==5 EXIT
IF DEFINED %START% !==1,2,3,4,5 goto resetmenu
:RESETMENU
CLS
ECHO.
ECHO ****************************************************************
ECHO This progam allows you to change the carrier text
ECHO on lockscreen, and in the notifications bar.
ECHO It also will add the sysro (mount as Read-only) and sysrw (mount as read-write)
ECHO to any ROM.
ECHO ***************************************************************
ECHO.
GOTO MENU
:SETCARRIERVAR
CLS
SET /P CARRIERVAR=Type carrier text here then press ENTER:
IF %CARRIERVAR%==LONGSTRINGWITHNOPATTERNKINDOFLIKEPI36523421745837564237869858invgiw (
ECHO You looked!
) else (
goto DELIFEXIST
)
:DELIFEXIST
if exist Files\eri.xml (
del Files\eri.xml
) else (
goto CREATE
)
:CREATE
ECHO ^<^E^r^i^F^i^l^e ^V^e^r^s^i^o^n^N^u^m^b^e^r^=^"^1^3^5^7^" ^N^u^m^b^e^r^O^f^E^r^i^E^n^t^r^i^e^s^=^"^1^" ^E^r^i^F^i^l^e^T^y^p^e^=^"^1^"^> >Files\eri.xml
ECHO ^<^C^a^l^l^P^r^o^m^p^t^I^d ^I^d^=^"^0^" ^C^a^l^l^P^r^o^m^p^t^T^e^x^t^=^"^C^a^l^l^P^r^o^m^p^t^I^d^0^"^/^> >>Files\eri.xml
ECHO ^<^C^a^l^l^P^r^o^m^p^t^I^d^ ^I^d^=^"^1^" ^C^a^l^l^P^r^o^m^p^t^T^e^x^t^=^"^C^a^l^l^P^r^o^m^p^t^I^d^1^"^/^> >>Files\eri.xml
ECHO ^<^C^a^l^l^P^r^o^m^p^t^I^d ^I^d^=^"^2^" ^C^a^l^l^P^r^o^m^p^t^T^e^x^t^=^"^C^a^l^l^P^r^o^m^p^t^I^d^2^"^/^> >>Files\eri.xml
ECHO ^<^E^r^i^I^n^f^o^ ^R^o^a^m^i^n^g^I^n^d^i^c^a^t^o^r^=^"^1^2^8^" ^I^c^o^n^I^n^d^e^x^=^"^1^" ^I^c^o^n^M^o^d^e^=^"^0^" ^E^r^i^T^e^x^t^=^"%CARRIERVAR%" CallPromptId="^0^" ^A^l^e^r^t^I^d^=^"^0^"^/^> >>Files\eri.xml
ECHO ^<^/^E^r^i^F^i^l^e^> >>Files\eri.xml
Echo Your carrier text will be set as %CARRIERVAR%
GOTO SETTEXT
:SETTEXT
Set /P C=Y to set %CARRIERVAR% as carrier text or N to Cancel:
IF /I %C%==Y goto PUSH
IF /I %C%==N goto RESETMENU
IF DEFINED /I %C% !== Y,N goto SETTEXTRESET
:SETTEXTREST
CLS
GOTO SETTEXT
:PUSH
CLS
files\adb push eri.xml /data/eri.xml
GOTO REBOOTORNO
:ADD
ECHO this will add the sysrw and sysro commands to your current rom
SET /P PUSHYN=Type Y to continue and push the commands or N to return to MENU:
IF /I %PUSHYN%==Y GOTO PUSH/CHMOD
:PUSH/CHMOD
Files\adb push sysrw /system/bin
Files\adb push sysro /system/bin
Files\adb chmod 755 /system/bin/sysrw
Files\adb chmod 755 /system/bin/sysro
:REBOOTORNO
ECHO The files have been pushed, in order for them to take effect you need to reboot
SET /P ReYN2=Type r to reboot or n to return to menu and reboot later:
IF /I %ReYN2%==r goto REBOOT
IF /I %ReYN2%==n goto MENU
IF /I %ReYN@% !==r,n goto REBOOTORNO
:REBOOTRECOVERY
Files\adb reboot recovery
CLS
goto MENU
--------------------------------------------------------------
This batch will only accept one word to be set as %carriervar% any ideas why and how to fix?
July 22nd, 2010 1:49am
Hi,
For script related questions, please discuss in Script Center forum.
The Official Scripting Guys Forum!
Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2010 1:08pm