@echo off title LIAPP Signing & zipalign SETLOCAL ENABLEDELAYEDEXPANSION Color 3f rem Check the input value, please enter the value according to your environment. Set KeyStorePath="release-key.jks" Set ALIAS_NAME="key-alias" Set STORE_PASS="store-pass" Set KEY_PASS="key-pass" Set ZIP_ALIGN="C:\Users\username\AppData\Local\Android\Sdk\build-tools\29.0.0\zipalign" rem File Check SET CLASSPATH=%1 Set FILE_PATH=%~dp1%~n1 Set FILE_NAME=%~nx1 Set FILE_DIR=%~dp1 If %~x1==.apk ( echo APK File Checked! echo - %CLASSPATH% echo APK Signing Start! jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore %KeyStorePath% -storepass %STORE_PASS% -keypass %KEY_PASS% "%CLASSPATH%" %ALIAS_NAME% Color 0C echo. echo Please Check Signing Massage echo If you see "error" or "Exception", close the window. Echo If no problem, press any key. Pause>nul Color 3f Echo APK Signing Complete! echo. echo. echo Zip align Start! zipalign -f -v 4 "%CLASSPATH%" "%FILE_PATH%.zipaligned.apk" echo. echo. Echo Zip Align Complete! echo - %FILE_PATH%.zipaligned.apk echo. echo. echo Press any key to exit. Pause>nul exit ) If %~x1==.aab ( echo AAB File Checked! echo - %CLASSPATH% echo AAB Signing Start! echo. echo. jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore %KeyStorePath% -storepass %STORE_PASS% -keypass %KEY_PASS% "%CLASSPATH%" %ALIAS_NAME% echo. echo. Echo AAB Signing Complete! echo - %CLASSPATH% echo. echo. echo Press any key to exit. Pause>nul exit ) echo File is not APK or AAB type. echo Please check your file echo - %CLASSPATH% echo. echo. echo Press any key to exit. Pause>nul endlocal exit