Bug 1157893 - Create a toggle for developer mode r=ochameau

This commit is contained in:
Fabrice Desré 2015-04-28 10:28:36 -07:00
parent f1b7222724
commit 63035f6659
2 changed files with 6 additions and 0 deletions

View File

@ -104,6 +104,9 @@ ProcessGlobal.prototype = {
} else if (params[0] == "root") {
log("unrestrict devtools");
Services.prefs.setBoolPref("devtools.debugger.forbid-certified-apps", false);
Services.prefs.setBoolPref("dom.apps.developer_mode", true);
// TODO: Remove once bug 1125916 is fixed.
Services.prefs.setBoolPref("network.disable.ipc.security", true);
let lock = settings.createLock();
lock.set("developer.menu.enabled", true, null);
}

View File

@ -135,10 +135,13 @@ function CheckLockState() {
function EnableCertApps() {
let device = AppManager.selectedRuntime.device;
// TODO: Remove `network.disable.ipc.security` once bug 1125916 is fixed.
device.shell(
"stop b2g && " +
"cd /data/b2g/mozilla/*.default/ && " +
"echo 'user_pref(\"devtools.debugger.forbid-certified-apps\", false);' >> prefs.js && " +
"echo 'user_pref(\"dom.apps.developer_mode\", true);' >> prefs.js && " +
"echo 'user_pref(\"network.disable.ipc.security\", true);' >> prefs.js && " +
"start b2g"
);
}