I just wanted to post that I followed the instructions from the OP *with* the additions from YellowGT0 and I'm not having any problems leaving USB Debug mode.
Also for anyone trying this it's:
chmod 777 /dbdata/databases/com.android.providers.settings/settings.db
Needs the space between chmod and 777
* Also I used the app linked in the OP as well and had no problems installing it, so mission: accomplished I'd say