Closed
Bug 820699
Opened 12 years ago
Closed 12 years ago
Preferences: Updating value in user.js not working
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: swu, Unassigned)
References
Details
STR:
1. Change "ril.debugging.enabled" to true in /system/b2g/defaults/pref/user.js
2. Restart b2g
Expected:
|adb logcat| shows RIL debug information.
Actual:
RIL debug information not shown in logcat.
Note:
1. Also updated /data/local/user.js, still getting wrong value.
2. The pref value retrieved by Services.prefs.getBoolPref("ril.debugging.enabled") is false.
https://mxr.mozilla.org/mozilla-beta/source/dom/system/gonk/RadioInterfaceLayer.js#32
3. Tested with mozilla-beta
Reporter | ||
Comment 1•12 years ago
|
||
Issue disappeared after factory reset, and unable to reproduce again.
Mark it resolved for now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Comment 2•12 years ago
|
||
/system/b2g/defaults/pref/user.js is only used if you reflash the phone, or reset the phone to the factory settiings.
/system/b2g/defaults/pref/user.js is used to create the initial profile, which you can find in /data/b2g/mozilla/*.default
You can do the following to set ril.debugging.enabled:
PREFS_JS=$(adb shell echo -n "/data/b2g/mozilla/*.default")/prefs.js
adb pull $PREFS_JS
echo 'user_pref("ril.debugging.enabled", true);' >> prefs.js
adb shell stop b2g
adb push prefs.js $PREFS_JS
adb shell start b2g
You can also modify a script I wrote for toggling the omtc pref:
https://gist.github.com/2656232
It was designed so that you create enable-omtc and make disable-omtc be a symlink to it. You could create a similar script to enable/disable ril debugging
Reporter | ||
Comment 3•12 years ago
|
||
Thanks for the detailed explanation and the script, Dave!
Reporter | ||
Comment 4•12 years ago
|
||
With latest gecko/gaia/gonk this issue happens again.
It can be reproduced by "./flash.sh gaia", and now even the method described in comment 2 doesn't work.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Reporter | ||
Comment 5•12 years ago
|
||
As discussed with Dave, if the method describe in comment 2 not work, we can create another user.js in /data/b2g/mozilla/*.default/user.js to override prefs.js, and that worked.
I found the issue happens when there is an existing /data/local/user.js which overrided the prefs.js. After further studying, the problem that /system/b2g/defaults/pref/user.js not taking effect can be fixed by the following procedures:
1) stop b2g
2) rm /data/local/user.js
3) rm /data/b2g/mozilla/*.default/prefs.js
4) start b2g
This bug can be closed now. :)
For more information on prefs.js and user.js difference, please refer to [1].
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•