6

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.)

4 Answers4

4

For newer android software use:

adb shell settings put secure install_non_market_apps 1
3

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.

    (Source)

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.
Firelord
  • 25,528
  • 21
  • 129
  • 295
1

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

0

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

su
settings put global install_non_market_apps 1
Firelord
  • 25,528
  • 21
  • 129
  • 295