How to modify a system configuration file on Android? On an Android device I would like to modify /data/misc/wifi/wpa_supplicant.conf with as minimal side effects to the rest of the device as possible. (there are unexposed APIs in Android framework)

Is it possible to just use a command line su executable to get permissions to modify the file?

Can I do this without an unlocked boot loader?

Would this be easier on a Nexus device?
In case this point is not clear; it's not enough to just have a su executable and run it.

Since you asked


  Is it possible to just use a command line su executable to get
  permissions to modify the file?


The su executable must be properly installed, meaning that for it to do its job 'on behalf of' the superuser/root it has to have the SUID bit set (Switch User ID) for root. This process, called rooting needs to be done before any su executable becomes valid.

You can read all about the SUID bit and Linux file permissions as well as the rooting process by doing a search.