1

Google introduced system_ext partition in Android 11 which can use system resources and can include system modules that:

  • Extend AOSP system modules in the system partition. We recommend upstreaming such modules to AOSP so they can be installed to the system partition later.
  • Bundle OEM or SoC-specific modules. We recommend unbundling such modules so they can be installed to the product or vendor partition.

I want to remove 2 folders named Snap and Gallery2 from /system_ext/priv-app partition. So, I created addon.d survival script to remove automatically every time I dirty flash a ROM.

The scripts commands are-

#!/sbin/sh
rm -rf "system_ext/priv-app/Gallery2"
rm -rf "system_ext/priv-app/Snap"

But the script is not working. Every time I dirty flash a ROM, I have to remove those folders manually.

2
  • echo "$(date '+%Y-%m-%d.%H:%M:%S'): $0 started" >> /cache/addon.log
    – alecxs
    Jun 2 at 14:26
  • create some log via your script to confirm your script is executed at all. beware partition has to be mounted
    – alecxs
    Jun 2 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.