[Android General] skyguy126:
DISCLAIMER: I TAKE NO RESPONSIBILITY FOR DAMAGE CAUSED TO ANYONE OR ANYTHING BY USING MY SCRIPT. USE THIS AT YOUR OWN RISK.

So pretty much this is a script that can:

1. Flash a new boot animation without going through all the hassle of entering remounting commands. (Main reason why I wrote this) (Requires root and maybe adb insecure by chainfire)

2. Flash a new startup logo. (Requires unlocked bootloader)

3. Basic reboot commands with the press of a number.

4. Push and Pull files without entering commands, just need to specify the file location by dragging and dropping into the command window. (Some cases may need root. If your case does not need root, and the script says failed to restart adb as root, your command will still work, hopefully)

5. Install an apk the same way as 4. (If it says failed to restart as root it will still work in most cases)

6. Extremely noob friendly :laugh:.

Just a small little script to make your life a bit easier.

I tested this numerous times on a Moto G xt1032 running cyanogenmod 11 m4 and it showed no flaws. If this does not work for you try installing adb insecure by chainfire.

This works on windows only (I think).

If you find any bugs please tell me and I will try to fix even though I am just starting out with the wonders of developing. Some of the functions of the script need root access!

To use this, just copy and paste the lines below into a notepad window. Then save the file as something.bat Make sure to change the dropdown menu from txt document to all files when saving. Put the script in the folder where adb.exe and fastboot.exe are located. Double-click and enjoy!

Press "Click to show content" below!

[MENTION=279333]ECHO[/MENTION] off

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo IF YOUR DEVICE IS LISTED BELOW TYPE 1

echo ELSE TYPE 2 TO EXIT

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

adb devices

SET /p startcheck= Type your choice:

if "%startcheck%" =="1" goto menu

if "%startcheck%" =="2" goto exit

:menu

cls

echo Type 0 for Device Check

echo Type 1 to Flash Boot Animation (ADB root required)

echo Type 2 to Flash Startup Logo

echo Type 3 to Reboot to Bootloader

echo Type 4 to Reboot

echo Type 5 to Pull a File

echo Type 6 to Push a File

echo Type 7 to Install Apk

echo Type 8 to Run ADB as Root

echo Type 9 to Browse and Copy Apps to Computer (ADB root required)

echo Type 10 to Browse and Copy SYSTEM Apps to Computer (ADB root required)

echo Type 11 to Exit

SET /p choice= Type your choice:

if "%choice%" =="0" goto devcheck

if "%choice%" =="1" goto anim

if "%choice%" =="2" goto logo

if "%choice%" =="3" goto rebootloader

if "%choice%" =="4" goto reboot

if "%choice%" =="5" goto adbpull

if "%choice%" =="6" goto adbpush

if "%choice%" =="7" goto apk

if "%choice%" =="8" goto adbroot

if "%choice%" =="9" goto apps

if "%choice%" =="10" goto sysapps

if "%choice%" =="11" goto exit

goto end

:end

cls

echo Type 1 to restart program

echo Type 2 to exit

SET /p restart= Type your choice

if "%restart%" =="1" goto menu

if "%restart%" =="2" goto exit

:exit

exit

:anim

cls

adb kill-server

adb start-server

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo IF YOUR DEVICE IS LISTED BELOW TYPE 1

echo ELSE TYPE 2 TO EXIT

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

adb devices

SET /p adb= Type your choice

if "%adb%" =="2" goto menu

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo TYPE THE PATH FOR YOUR bootanimation.zip

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET /p bapath= Type your path here and press enter:

cls

adb wait-for-device root

timeout -t 1 > nul

echo Remounting system in read-write mode!

adb wait-for-device remount

timeout -t 2 > nul

adb wait-for-device shell "su -c 'mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system'"

echo Deleting existing bootanimation!

adb wait-for-device shell "su -c 'rm /system/media/bootanimation.zip'"

echo Sending new bootanimation!

adb push %bapath% /system/media

echo Remounting system in read-only mode!

adb wait-for-device shell "su -c 'mount -o ro,remount -t yaffs2 /dev/block/mtdblock1 /system'"

echo Done!

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Press 1 to reboot!

echo Press 2 to exit!

SET /p dm= Type your choice

if "%dm%" =="1" goto reboot

if "%dm%" =="2" goto end

:logo

cls

echo Rebooting to bootloader...

adb reboot-bootloader

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo When device is in bootloader press any key to continue!

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PAUSE

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo IF YOUR DEVICE IS LISTED BELOW TYPE 1

echo ELSE TYPE 2 TO EXIT

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

fastboot devices

SET /p fbdev= Type your choice

if "%fbdev%" =="2" goto menu

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo TYPE THE PATH FOR YOUR logo.bin

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET /p lopath= Type your path here and press enter:

cls

echo Sending new logo!

fastboot flash logo %lopath%

echo Rebooting...

fastboot reboot

echo Done!

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Press any key to return to menu!

PAUSE

goto menu

:reboot

cls

adb reboot

echo Rebooting...

timeout -t 3 > nul

goto menu

:rebootloader

cls

adb reboot-bootloader

echo Rebooting to bootloader...

timeout -t 3 > nul

goto menu

:adbpull

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo TYPE THE PATH FOR THE FILE TO PULL

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET /p adbpullpath= Type your path here and press enter:

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo TYPE THE PATH FOR THE FILE TO SAVE

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET /p adbpullsave= Type your path here and press enter:

cls

echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!!

timeout -t 2 > nul

echo Pulling File!

adb wait-for-device pull %adbpullpath% %adbpullsave%

echo Done!

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Press any key to return to menu!

PAUSE

goto menu

:adbpush

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo TYPE THE PATH FOR THE FILE TO PUSH

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET /p adbpushpath= Type your path here and press enter:

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo TYPE THE PATH FOR THE DIRECTORY TO PUSH TO

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET /p adbpushsave= Type your path here and press enter:

cls

echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!!

timeout -t 2 > nul

echo Pushing File!

adb wait-for-device push %adbpushpath% %adbpushsave%

echo Done!

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Press any key to return to menu!

PAUSE

goto menu

:apk

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo IF YOUR DEVICE IS LISTED BELOW TYPE 1

echo ELSE TYPE 2 TO EXIT

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

adb devices

SET /p apkcheck= Type your choice

if "%apkcheck%" =="2" goto exit

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo TYPE THE PATH FOR THE APK TO INSTALL

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET /p apkinstall= Type your path here and press enter:

cls

echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!!

timeout -t 2 > nul

echo Installing Apk!

adb wait-for-device install %apkinstall%

echo Done!

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Press any key to return to menu!

PAUSE

goto menu

:devcheck

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo DEVICE CONNECTION CHECK

echo Your device should be listed below!

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

adb devices

PAUSE

goto menu

:adbroot

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Trying to run ADB as root!

adb wait-for-device root

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo !!!ONCE DEVICE RECONNECTS TO COMPUTER PRESS ANY KEY TO GET TO MENU!!!

PAUSE

goto menu

:apps

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

adb wait-for-device shell "su -c 'ls /data/app'"

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Do you want to copy an app to the computer?

set /p appans= (Y or N):

if "%appans%" =="N" goto menu

if "%appans%" =="n" goto menu

if "%appans%" =="no" goto menu

if "%appans%" =="No" goto menu

if "%appans%" =="NO" goto menu

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

adb wait-for-device shell "su -c 'ls /data/app'"

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Type the app's name EXACTLY including the .apk extension

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

set /p appcp= Type the name EXACTLY as it appears:

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Type the destination directory

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

set /p appdd= Destination Directory:

cls

echo Copying App!

adb pull /data/app/%appcp% %appdd%

echo Done!

PAUSE

goto menu

:sysapps

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

adb wait-for-device shell "su -c 'ls /system/app'"

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Do you want to copy an app to the computer?

set /p sappans= (Y or N):

if "%sappans%" =="N" goto menu

if "%sappans%" =="n" goto menu

if "%sappans%" =="no" goto menu

if "%sappans%" =="No" goto menu

if "%sappans%" =="NO" goto menu

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

adb wait-for-device shell "su -c 'ls /system/app'"

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Type the app's name EXACTLY including the .apk extension

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

set /p sappcp= Type the name EXACTLY as it appears:

cls

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo Type the destination directory

echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

set /p sappdd= Destination Directory:

cls

echo Copying App!

adb pull /system/app/%sappcp% %sappdd%

echo Done!

PAUSE

goto menu