[Android General] skyguy126:
This is a simple script that automatically flashes a new boot animation. It does the remount and deletion commands automatically to provide an easy and fast way to flash boot animations.

ADB ROOT command must be functioning for this to work properly.

DISCLAIMER: THE CREATOR IS NOT RESPONSIBLE FOR DAMAGE CAUSED BY THE USE OF THIS SCRIPT! USE THIS AT YOUR OWN RISK!!!

1. Copy the code below into a new notepad window.

2. Save the file as bootanimation flasher.bat in the folder where adb and its components are located. (MAKE SURE YOU HAVE THE .bat EXTENSION)

3. Run the script!

Common Errors:

"error protocol failure" - this error occurs when the command adb root did not function properly. Fix the issue and try again. Try and re-enable usb debugging if it still doesn't work.

Try and use this app to get adb root functioning: http://xdaforums.com/showthread.php?t=1687590

This was tried and tested with success on a oneplus one and a moto g (1st gen)

Script (click button to show):

@echo off

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

echo ROOT ACCESS IS REQUIRED. ADB ROOT COMMAND MUST BE FUNCTIONING.

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

echo THE CREATOR OF THIS SCRIPT IS NOT RESPONSIBLE FOR ANY DAMAGE!

echo USE THIS AT YOUR OWN RISK!!!

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

PAUSE

cls

echo Starting ADB!

adb kill-server > nul

adb start-server > nul

echo Done!

timeout -t 1 > nul

:menu

cls

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

echo IF YOUR DEVICE IS LISTED BELOW TYPE 1

echo TYPE 2 TO TRY AGAIN

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

adb devices

SET /p startcheck= Type your choice:

if "%startcheck%" =="1" goto ask

if "%startcheck%" =="2" goto menu

goto menu

:ask

cls

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

echo TYPE 1 TO FLASH BOOTANIMATION!

echo TYPE 2 TO BACKUP EXISTING BOOTANIMATION THEN FLASH!

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

SET /p askbackup= Type your choice:

if "%askbackup%" =="1" goto anim

if "%askbackup%" =="2" goto backup

goto menu

:backup

cls

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

echo TYPE THE PATH TO BACKUP BOOTANIMATION TO!

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

SET /p backuppath= Type your path and press enter:

cls

echo Backing Up!

adb pull /system/media/bootanimation.zip %backuppath%

echo Done

PAUSE

goto anim

:anim

cls

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

echo TYPE THE PATH FOR YOUR bootanimation.zip

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

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

cls

echo Running command adb root...

adb wait-for-device root > nul

timeout -t 1 > nul

echo Success, Root Access obtained!

echo Remounting system in read-write mode!

adb wait-for-device remount > nul

timeout -t 1 > nul

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

echo Remount Succeded!

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 exit

:reboot

cls

echo Rebooting!

adb reboot

timeout -t 1 > nul

PAUSE

:exit

exit