Skip to content Skip to sidebar Skip to footer

How Do I Debug My App In Which Obb Expansion Packs Have Been Replaced With Pad (play Asset Delivery)?

Eager to retire our app's aging OBB Expansion Pack system and replace it with the shiny new Play Asset Delivery (PAD, formerly known as Dynamic Asset Delivery), I've been following

Solution 1:

OK, so the big picture is that our command line is going to do the work that the Play Store would normally perform when receiving our bundle, churning it through the mill and publishing it in APK format. The bundle spits out a blob of split .APKs which are then, in turn, used to perform installation on our device.

INSTALLING YOUR DEBUG BUILD WITH ON INSTALL ASSET PACK

  1. In AS, go to "Generate Signed Bundle -> Android App Bundle."

  2. Build a debug build with your credentials.

  3. With Bundletool 1.0 or higher:

bundletool build-apks --bundle=./app-debug.aab --output=./my_app.apks --ks <path to my keystore.jks> --ks-key-alias=<keystorealias> --local-testing

  1. Use our .apks blob for app installation:

bundletool install-apks --apks=./my_app.apks

  1. Tap your newly installed app

  2. Run -> Attach Debugger To Android Process.

  3. Enjoy the presence of your assets right there in your AssetManager.

But have we achieved "quick, iterative cycles?" Eh, sort of. Takes maybe 10 silent minutes to build that blob on my Dell XPS under WSL. Maybe it's time to take out the checkbook for that 64-core Ryzen Threadripper.

DEBUGGING YOUR FRESHLY-INSTALLED DEBUG BUILD WITH ASSET PACK

Here's what works for me. Before building the bundle, I temporarily copy all the asset pack assets from </my_asset_pack_dir> into the normal base assets directory, /app/src/main/assets/. That way I can verify that the app can reach them through AssetManager. Then these temporary files could be ignored during build, or deleted by a script.

This way the assets can be tested without the 10 minute wait for .AAB -> .APKS -> split install.

Solution 2:

I don't know how it is in Android Studio but in Intellij IDEA you need to change "Deploy" option from "Default APK" to "APK from app bundle" in edit configuration window. With this option changed I was able to debug my app using app bundle without problems. enter image description here

Post a Comment for "How Do I Debug My App In Which Obb Expansion Packs Have Been Replaced With Pad (play Asset Delivery)?"