Need help with creating Magisk module/overlays to edit system/framework parameters...

Search This thread


Senior Member
Mar 13, 2012
Google Pixel C
Razer Phone 2
I'm currently able to build some customized ROM builds with certain personalized changes for my devices.

However, recently I'm considering using overlays (that'll be loaded as a custom Magisk module) to modify the parameters while staying on official ROM builds (so that I can apply official ROM OTA packages and retain the changes), as the environment for making working ROM builds might not always be available, such as that I'm still having issues when trying to build my own GSI images with the changes included, due to some other issues (mainly due to Treble-related patches that needed to be applied during building, as a good amount of patches are outdated and couldn't be applied).

Not sure to which extent I can modify. The things I currently wanted to modify are:

1. Changing the default captive portal URLs to my own servers (found in frameworks/base/services/core/java/com/android/server/connectivity/ Not sure if these values could be specified somewhere else in a XML as I couldn't find any helpful documents or google results that applies to Android Pie.
EDIT: I know how to set these values via ADB, but accesses to these values might be blocked by SELinux and it was possible to get it reverted when you update ROM (not sure if this also applies to GSI).
2. Change the network mode options to allow 4G/3G only (disabling 2G), by setting network mode to LTE/WCDMA (found in packages/services/Telephony/res/values/strings.xml, as well as build.prop parameter ro.telephony.default_network).
EDIT: I know how to set these values via *#*#4636#*#*, but the settings there won't persist this way. It'll be reverted to preferrably the value defined in the build.prop parameter when I reboot the phone, or when the phone lost signal then re-established it (or by toggling Airplane Mode on then off).

Currently I'm looking at developing magisk modules so I can start including some other relatively easier to include stuffs, but I'm still uncertain about these two parts.
Last edited:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone