edit-config

edit-config and Patching AndroidManifest.xml

Most native settings have a preference, but some live only in AndroidManifest.xml. BookNest turns off Android's automatic backup of its app data, WebView storage included, with a manifest attribute. <edit-config> names a file, an XPath target in it and a mode: merge adds or replaces attributes on the target, overwrite replaces the element. Declare the Android namespace on <widget> for the android: prefix; Cordova 129 's parser tolerates its absence, XML editors do not. apkanalyzer shows what reached the APK:

Checking the patched manifest inside the built APKShell
cordova build android > /dev/null
apk=platforms/android/app/build/outputs/apk/debug/app-debug.apk
apkanalyzer manifest print $apk | grep -n "allowBackup\|<application"
apkanalyzer manifest version-code $apk
Output
44:    <application
48:        android:allowBackup="false"
10000

To add elements instead, such as a <uses-permission>, wrap them in <config-file target="AndroidManifest.xml" parent="/manifest">, as plugins do (plugin.xml Wiring). When a plugin and your config.xml edit the same attribute, cordova plugin add stops with a conflict error.