Install Android App Bundle on device

后端 未结 7 1540
囚心锁ツ
囚心锁ツ 2021-01-30 03:43

I built my project using the new Android App Bundle format. With APK files, I can download the APK to my device, open it, and immediately install the app. I downloaded my app as

7条回答
  •  [愿得一人]
    2021-01-30 04:19

    Installing the aab directly from the device, I couldn't find a way for that.

    But there is a way to install it through your command line using the following documentation You can install apk to a device through BundleTool

    According to "@Albert Vila Calvo" comment he noted that to install bundletools using HomeBrew use brew install bundletool

    You can now install extract apks from aab file and install it to a device

    Extracting apk files from through the next command

    java -jar bundletool-all-0.3.3.jar build-apks --bundle=bundle.aab --output=app.apks --ks=my-release-key.keystore --ks-key-alias=alias --ks-pass=pass:password

    Arguments:

    • --bundle -> Android Bundle .aab file
    • --output -> Destination and file name for the generated apk file
    • --ks -> Keystore file used to generate the Android Bundle
    • --ks-key-alias -> Alias for keystore file
    • --ks-pass -> Password for Alias file (Please note the 'pass' prefix before password value)

    Then you will have a file with extension .apks So now you need to install it to a device

    java -jar bundletool-all-0.6.0.jar install-apks --adb=/android-sdk/platform-tools/adb --apks=app.apks

    Arguments:

    • --adb -> Path to adb file
    • --apks -> Apks file need to be installed

提交回复
热议问题