diff --git a/scripts/runReleaseOnDevice.sh b/scripts/runReleaseOnDevice.sh index ed4bbc4..94c33ad 100755 --- a/scripts/runReleaseOnDevice.sh +++ b/scripts/runReleaseOnDevice.sh @@ -7,6 +7,9 @@ export PATH=${PATH}:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools cd "${0%/*}" # directory of the script cd .. # root directory of the project +# extract $PASS +source keys/keyPassword + #adb kill-server #adb start-server @@ -20,19 +23,4 @@ source keys/keyPassword cordova clean -cordova build --release android - -printf "\033[32m\n\nSIGNING APP...\033[0m\n\n\n" - -cp keys/autocosts.keystore platforms/android/app/build/outputs/apk/release/ -cd platforms/android/app/build/outputs/apk/release/ - -# old method of signing; after Android 11 one must use apksigner instead -#jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore autocosts.keystore -storepass $PASS app-release-unsigned.apk autocosts - -zipalign -v 4 app-release-unsigned.apk formParkingViolation.apk -apksigner sign --ks autocosts.keystore --pass-encoding utf-8 --ks-key-alias autocosts --ks-pass pass:$PASS --key-pass pass:$PASS formParkingViolation.apk - -cd ../../../../../../.. - -cordova run android --device --release --noprepare --nobuild +cordova run android --release -- --keystore=keys/autocosts.keystore --storePassword=$PASS --alias=autocosts --password=$PASS --packageType=apk