1set -e 2 3# Build both our APK and APEX combined together 4./build/soong/soong_ui.bash --make-mode -j64 MediaProviderLegacy com.google.android.mediaprovider 5 6# Push our updated APEX to device, then force apexd to remount it 7adb shell stop 8adb remount 9adb sync 10adb shell umount /apex/com.android.mediaprovider* 11adb shell rm -rf /data/apex/active/com.android.mediaprovider* 12adb shell rm -rf /data/apex/decompressed/com.android.mediaprovider* 13adb shell setprop apexd.status '""' 14adb shell setprop ctl.restart apexd 15adb shell rm -rf /system/priv-app/MediaProvider 16adb shell rm -rf /system/priv-app/MediaProviderGoogle 17adb shell start 18