# Variables
ARCH=$(getprop ro.product.cpu.abi)

# Delete WebView User App
if [[ "$ARCH" = "armeabi-v7a" ]]; then
	for WVUA in "com.android.webview" "org.axpos.aosmium_wv" "app.vanadium.trichromelibrary" "app.vanadium.webview"; do
	WVUP=$(ls -R /data/app | grep "$WVUA" | grep -o -m 1 "/data/app/~~.*/")
		if [[ -d "$WVUP" ]]; then
			rm -rf $WVUP
		fi
	done
else
	for WVUA in "com.android.webview" "org.axpos.aosmium_wv" "app.vanadium.trichromelibrary" "app.vanadium.webview"; do
	WVUP=$(ls -R /data/app | grep "$WVUA" | grep -o -m 1 "/data/app/$WVUA.*/")
		if [[ -d "$WVUP" ]]; then
			rm -rf $WVUP
		fi
	done
fi

# Delete WebView User Data
for WVD in "com.android.webview" "org.axpos.aosmium_wv" "app.vanadium.trichromelibrary" "app.vanadium.webview"; do
	if [ -d /data/data/"$WVD" ]; then
		rm -rf /data/data/$WVD
	fi
done
