Skip to content

Instantly share code, notes, and snippets.

@c4software
Forked from nobodyzxc/ad_remove_main.sh
Created March 6, 2020 14:11
Show Gist options
  • Save c4software/c150ba9e6107e80824deb8a077fec4cd to your computer and use it in GitHub Desktop.
Save c4software/c150ba9e6107e80824deb8a077fec4cd to your computer and use it in GitHub Desktop.
remove ads in apk
APK="$1"
if [ -f $APK ];then
./apktool d "$APK"
grep -lR "\->loadAd" "${APK%.*}" | xargs sed -i '/\->loadAd/d'
./apktool b "${APK%.*}" -o "${APK%.*}_no_ad.apk"
java -jar sign.jar --overwrite --apks "${APK%.*}_no_ad.apk"
rm -rf "${APK%.*}"
else
echo "please input apk file"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment