I've been using this simple script for messing with CSP policies:

adb pull /system/b2g/defaults/pref/user.js
vim user.js
adb shell mount -o rw,remount /system
adb push user.js /system/b2g/defaults/pref/user.js
adb shell mount -o ro,remount /system
adb reboot
sleep 5
adb logcat > temp.log &
tail -f temp.log

The reboot is probably not optimal but better safe than sorry.
  Lucas.

On Nov 7, 2012, at 7:23 AM, Jason Smith wrote:

> I know you can change the pref by modifying the profile via adb.
> 
> Sincerely,
> Jason Smith
> 
> Desktop QA Engineer
> Mozilla Corporation
> https://quality.mozilla.com
> 
> On 11/7/2012 7:18 AM, Lawrence Mandel wrote:
>>> You can spoof it right now with a hacky preference. Add the following
>>> to a file custom-prefs.js inside the gaia dir and reflash gaia.
>>> 
>>> user_pref("general.useragent.override", "[Spoofed UA]");
>> Thanks for the details. I'm actually looking for a way to do this at 
>> runtime. In this context, the test method is:
>> 
>> 1. Load site in Firefox and test.
>> 2. Spoof UA to Android phone UA and retest.
>> 
>> Can I change that pref via an app at runtime?
>> 
>> Lawrence
>> 
>>> On Tue Nov  6 14:11:40 2012, Lawrence Mandel wrote:
>>>> To support the mobile Web compatibility effort, I would like to add
>>>> functionality to B2G that allows switching/spoofing the UA.
>>>> Something like Phony
>>>> (https://addons.mozilla.org/en-US/mobile/addon/phony/) would work
>>>> well. AFAIK, the B2G browser does not support add-ons. Is there a
>>>> way for an app to change the B2G UA? Does anyone have any other
>>>> ideas for how to easily add this type of functionality to B2G?
>>>> 
>>>> Thanks,
>>>> 
>>>> Lawrence
>>>> _______________________________________________
>>>> dev-b2g mailing list
>>>> [email protected]
>>>> https://lists.mozilla.org/listinfo/dev-b2g
>>> 
>>> 
>> _______________________________________________
>> compatibility mailing list
>> [email protected]
>> https://lists.mozilla.org/listinfo/compatibility
> 
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to