[Android Software/Hacking General [Developers Only]] bryantjopplin:
You wouldn't happen to be able and tell me if you see anything wrong with this code so far? Man this one is a pain. lol

:ZIPALIGNAPK
CLS
ECHO.
ECHO Before You Start Make Sure Your Device Has USB Debugging Enabled!
ECHO.
ECHO Presented By: B-RAD
ECHO FOR ADB ^& FASTBOOT ONLY
ECHO CHOOSE BELOW
ECHO __________________________________________________________________
ECHO 41 - /system/app VIA ADB
ECHO.
ECHO 42 - /system/priv-app VIA ADB
ECHO.
ECHO 43 - /data/app VIA ADB
ECHO.
ECHO 44 - OPTIMIZE ALL APKS VIA ADB
ECHO.
ECHO 99 - OPTIMIZATION MAIN MENU
ECHO.
ECHO.
set /p M=Type Your Choice Then Press ENTER:
ECHO.
ECHO.
IF %M% == 41 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\system\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /system/app TEMP
del /Q /S *.so
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP /system/app
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
Pause
goto zipalignapk
)
IF %M% == 42 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\system\priv-app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /system/priv-app TEMP
del /Q /S *.so
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP\priv-app /system/
pause
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
Pause
goto ZIPALIGNAPK
)
IF %M% == 43 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO ZIPALIGNING APK'S FROM '\data\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server
adb pull /data/app TEMP
del /Q /S *.so
del /Q /S *.odex
call :subzipalign
ECHO PUSHING APK'S
adb remount
adb push TEMP\app\ /data/
pause
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
CD /d "%~dp0"
Pause
goto zipalignapk
)
IF %M% == 44 (
ECHO.
CD /d "%~dp0FILES"
CLS
ECHO.
ECHO PREPARING FOR ZIPALIGN OF ALL APK'S
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\system\app'
ECHO.
ECHO PULLINGS APKs...
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /system/app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP /system/app >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\system\priv-app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /system/priv-app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP\priv-app /system/ >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO.
ECHO ZIPALIGNING ALL APK'S FROM '\data\app'
ECHO.
ECHO PULLING APK'S
IF exist TEMP rd /Q /S TEMP
mkdir TEMP
adb start-server >nul 2>&1
adb pull /data/app TEMP >nul 2>&1
del /Q /S *.so >nul 2>&1
del /Q /S *.odex >nul 2>&1
call :subzipalign
ECHO PUSHING APK'S
adb remount >nul 2>&1
adb push TEMP\app\ /data/ >nul 2>&1
ECHO CLEANING UP LOCAL TEMP FILES
rd /Q /S TEMP >nul 2>&1
ECHO.
ECHO ZIPALIGN COMPLETE
ECHO.
CD /d "%~dp0"
Pause
goto zipalignapk
)
IF %M% == 99 goto M6MENU

:subzipalign
@echo off
@echo Zip aligning now...
for /R %%X in (*.apk) do zipalign 4 "%%X" "%%~dpX%%~nX.new"
@echo Replacing non-aligned files with zip aligned files...
for /R %%X in (*.new) do move /Y "%%X" "%%~dpX%%~nX.apk"
@echo Zip aligning done, press any key to exit
pause
Goto :eof