I have a corrupted Settings app in CyanogenMod and have a possible idea to restore a backup of it (App and Data) in Titanium Backup. But it's currently set to not allow "unknown sources" so Titanium cannot actually restore the old Settings over the current (corrupted) one.

I have a Terminal app installed on the phone. Is there a command in Terminal to essentially 'tick' that "unknown sources" setting, since I can't open the Settings app itself? (It gives this.)

  • 2
    I'll comment here if this helps others (I see someone has starred it): I googled further and it appeared that the relevant file to modify in the file system is data/data/com.android.providers.settings/databases/settings.db and is an SQL file, and you can edit the SQL tables by using an sql editing app like Sqlite Editor. For instructions see: forum.xda-developers.com/showthread.php?t=2784173. I'm too busy doing other things to make this into an official answer, if someone does (and preferably tests themselves to confirm), I'll gladly upvote it and mark as accepted answer! :)
    – user31812
    Commented Jul 22, 2014 at 9:05

4 Answers 4


For newer android software use:

adb shell settings put secure install_non_market_apps 1

As mentioned in the comments by OP, SQLite Editor is fit for the job. Following solutions tested on Stock Android 4.2.1 and 4.4.2.

Instructions for root users:

  1. Install and launch SQLite Editor from Play Store.
  2. Under APPS, tap Settings Storagesettings.dbglobal.
  3. Tap install_non_market_apps → click pencil icon (at the top) to edit it and change the Value to 1.
  4. The changes took effect immediately in my device. Otherwise, restart and Unknown Sources would be found enabled.


Instructions for non-root users:

  1. Install ADB in your PC, connect your device, and enter:

    adb shell settings put global install_non_market_apps 1

    Unknown Sources would now be enabled. (Source)

  2. Change the last command's value to 0 to disable the Unknown Sources.
  • 2
    Note for non-root users: USB-debugging needs to be enabled from "Developer Options".
    – Firelord
    Commented Jun 26, 2015 at 7:14

If you can somehow obtain a zip style backup of the settings app you can try to manually push it from a computer through ABD (Android Debug Bridge) from your bootloader/recovery (If it is unlocked)

More info here. http://teamw.in/ADBSideload


For rooted users: to enable unknown sources use Terminal Emulator with these commands:

settings put global install_non_market_apps 1
  • This is an exact copy of another answer of this question, except you used the global flag. Does your device not run the command using the secure flag? Commented Mar 30, 2016 at 22:47

You must log in to answer this question.