Open Bug 1752596 Opened 4 years ago Updated 4 years ago

Adding support for custom GeckoView application (Fenix, ...) preferences

Categories

(Testing :: geckodriver, task, P3)

Default
task

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

Details

GeckoView based applications will bring their own preferences that are not part of Gecko's prefs.js or user.js. Instead they are located in the app's own preferences folder. To set and restore these preferences you usually need a debug app. Then you could do something like the following:

adb shell
run-as org.mozilla.fenix.debug
cp /sdcard/custom_preferences.xml /data/data/org.mozilla.fenix.debug/preferences/[preferences_file_name].xml

Sadly in most cases we don't have such a build. Users of geckodriver usually use release builds of Firefox. So we will have to check if am set-debug-app --persistent might offer us permissions to update these files.

Note that https://github.com/mozilla/geckodriver/issues/1886 reported some issues with the tracking protection and the opened popup.

Note that when we are updating the preferences we are directly modifying an already installed app which means that we have to always restore the preferences. Including the situation when geckodriver gets killed. And here we have known problems. So it's kinda risky.

Perftools are actually using intents to set preferences. Then Fenix reads it.

As it looks like this seems to be the only way to achieve that for non-debuggable applications. am set-debug-app --persistent only modifies an internal flag so that the geckoview config file can be read.

Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.