- settings.xml: add conditional telephony block (mobile data, VoLTE, roaming, network mode) - res/xml/apns.xml: simple single-file APN fallback with full attribute documentation - assets/apns/global.xml: multi-file APN template compatible with LineageOS/android_vendor_apn - build.gradle: add assets srcDir, Gradle copy tasks to pull only *.xml from APN submodules
129 lines
4.4 KiB
XML
129 lines
4.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Settings applied by ConfigProvisioner after installing this APK.
|
|
ConfigProvisioner has WRITE_SECURE_SETTINGS and applies these as system.
|
|
|
|
Tags: <secure> → Settings.Secure
|
|
<system> → Settings.System
|
|
<global> → Settings.Global
|
|
|
|
Conditional blocks:
|
|
<if [conditions...]>
|
|
... settings applied only when ALL conditions match ...
|
|
</if>
|
|
|
|
Condition attributes on <if> (all optional, AND logic):
|
|
manufacturer="motorola" exact match, case-insensitive (Build.MANUFACTURER)
|
|
brand="motorola" exact match, case-insensitive (Build.BRAND)
|
|
model="razr" substring match, case-insensitive (Build.MODEL)
|
|
sdk="35" exact Android API level
|
|
sdk_min="31" minimum API level (inclusive)
|
|
sdk_max="34" maximum API level (inclusive)
|
|
form_factor="tablet" tablet | phone | flip | tv
|
|
feature="android.hardware.camera.flash" any PackageManager feature string
|
|
|
|
Nesting <if> inside <if> = AND (both must be true).
|
|
Put separate <if> blocks at the same level for OR-like behaviour.
|
|
-->
|
|
<settings>
|
|
|
|
<!-- Always applied -->
|
|
<!-- <secure name="launcher3.layout.provider" value="app.pawlet.config.layout" /> -->
|
|
<!-- <secure name="default_input_method" value="dev.patrickgold.florisboard/.ime.FlorisImeService" /> -->
|
|
<!-- <system name="screen_brightness" value="128" /> -->
|
|
<!-- <global name="stay_on_while_plugged_in" value="3" /> -->
|
|
|
|
<!-- Android 12 and below only -->
|
|
<!--
|
|
<if sdk_max="32">
|
|
<system name="some_legacy_key" value="1" />
|
|
</if>
|
|
-->
|
|
|
|
<!-- Android 13+ -->
|
|
<!--
|
|
<if sdk_min="33">
|
|
<secure name="some_new_key" value="1" />
|
|
</if>
|
|
-->
|
|
|
|
<!-- Motorola devices -->
|
|
<!--
|
|
<if manufacturer="motorola">
|
|
<system name="some_moto_setting" value="1" />
|
|
</if>
|
|
-->
|
|
|
|
<!-- Motorola flip/foldable devices (Razr etc.) -->
|
|
<!--
|
|
<if manufacturer="motorola" form_factor="flip">
|
|
<system name="some_flip_setting" value="1" />
|
|
</if>
|
|
-->
|
|
|
|
<!-- Tablets only -->
|
|
<!--
|
|
<if form_factor="tablet">
|
|
<system name="screen_brightness" value="200" />
|
|
</if>
|
|
-->
|
|
|
|
<!-- Phones only -->
|
|
<!--
|
|
<if form_factor="phone">
|
|
<system name="screen_brightness" value="128" />
|
|
</if>
|
|
-->
|
|
|
|
<!-- Devices with a front-facing camera -->
|
|
<!--
|
|
<if feature="android.hardware.camera.front">
|
|
<secure name="some_camera_setting" value="1" />
|
|
</if>
|
|
-->
|
|
|
|
<!-- Raspberry Pi 5 (by model substring) -->
|
|
<!--
|
|
<if model="Raspberry Pi 5">
|
|
<system name="some_rpi5_setting" value="1" />
|
|
</if>
|
|
-->
|
|
|
|
<!-- ===== Telephony ===== -->
|
|
<!-- Applied only when device has telephony hardware (SIM slot) -->
|
|
<if feature="android.hardware.telephony">
|
|
<!-- Mobile data on by default -->
|
|
<global name="mobile_data" value="1" />
|
|
<!-- Data roaming off by default — safe default, user can enable -->
|
|
<global name="data_roaming" value="0" />
|
|
<!--
|
|
Preferred network mode:
|
|
9 = LTE/WCDMA/GSM auto (most common)
|
|
22 = LTE/WCDMA/GSM/CDMA auto
|
|
-->
|
|
<global name="preferred_network_mode" value="9" />
|
|
<!-- VoLTE / enhanced 4G IMS mode on -->
|
|
<global name="enhanced_4g_mode_enabled" value="1" />
|
|
<!-- WiFi calling off by default — carrier may require activation -->
|
|
<global name="wfc_ims_enabled" value="0" />
|
|
<!-- WiFi calling mode: 0=WiFi only, 1=prefer cellular, 2=prefer WiFi -->
|
|
<global name="wfc_ims_mode" value="2" />
|
|
<!-- VT (video calling over IMS) on -->
|
|
<global name="vt_ims_enabled" value="1" />
|
|
<!-- Captive portal detection — 1=prompt, 2=avoid, 0=off -->
|
|
<global name="captive_portal_mode" value="1" />
|
|
</if>
|
|
|
|
<!-- GSM/LTE networks only -->
|
|
<if feature="android.hardware.telephony.gsm">
|
|
<!-- Force IPv4v6 dual stack by default (modern networks) -->
|
|
<!-- ConfigProvisioner handles APN insertion separately via apns.xml -->
|
|
</if>
|
|
|
|
<!-- Devices with IMS/VoLTE hardware support -->
|
|
<if feature="android.hardware.telephony.ims">
|
|
<global name="enhanced_4g_mode_enabled" value="1" />
|
|
</if>
|
|
|
|
</settings>
|