Sources:
tns build android \
--bundle --release \
--key-store-path your/path/to/the/keystore \
--key-store-password your-keystore-password \
--key-store-alias your-keystore-alias \
--key-store-alias-password your-keystore-alias-password \
--compileSdk 28
tns build android \
--release \
--compileSdk 28 \
--key-store-path your-keystore-path \
--key-store-password your-keystore-password \
--key-store-alias your-keystore-alias \
--key-store-alias-password your-keystore-alias-password \
--aab \
--copy-to an/output/directory/aabs/app-release.aab
export BUNDLETOOL_PATH=/path/to/your/android-bundletool/android/bundletool/0.10.2/bundletool.jar
export BUNDLETOOL_INPUT=/an/output/directory/aabs/app-release.aab
export BUNDLETOOL_OUTPUT=/an/output/directory/app-release.apks
export KEYSTORE_FILE=/your/path/to/the/keystore
export KEYSTORE_PASS=your-keystore-password
export KEYSTORE_ALIAS=your-keystore-alias
java \
-jar $BUNDLETOOL_PATH build-apks \
--bundle=$BUNDLETOOL_INPUT \
--output=$BUNDLETOOL_OUTPUT \
--ks=$KEYSTORE_FILE \
--ks-pass=pass:$KEYSTORE_PASS \
--ks-key-alias=$KEYSTORE_ALIAS \
--key-pass=pass:$KEYSTORE_PASS
export DEVICE_ID=`adb devices | tail +2 | cut -f1`
java \
-jar $BUNDLETOOL_PATH install-apks \
--apks="$BUNDLETOOL_OUTPUT" \
--device-id=$DEVICE_ID