System Settings

You can use FIRERPA’s Settings-related interfaces to configure certain Android system parameters or read system settings. This feature covers a wide range of actions, for example setting screen brightness, toggling developer mode, or even adjusting the ringtone volume. Here we only demonstrate a few simple examples.

Calling the Interface

Before you begin, you need to obtain a Settings instance. You can call it as shown below.

settings = d.stub("Settings")

Set the system screen brightness to manual mode, so that your device’s screen brightness will not change with ambient light, allowing you to set a fixed brightness value.

settings.put_system("screen_brightness_mode", "0")

Get the current screen brightness, then lower it to 5.

settings.get_system("screen_brightness")
settings.put_system("screen_brightness", "5")

Check whether developer mode is enabled, then disable it.

settings.get_global("development_settings_enabled")
settings.put_global("development_settings_enabled", "0")

Check whether the screensaver is enabled, then disable it.

settings.get_secure("screensaver_enabled")
settings.put_secure("screensaver_enabled", "0")

The following example sets the screen brightness to manual, brightness to 64, and keeps the screen on forever.

settings.put_system("screen_brightness", "64")
settings.put_system("screen_brightness_mode", "1")
settings.put_system("screen_off_timeout", "604800000")

Available Parameters

If you’re unsure about strings like screen_brightness, this section is for you. The parameters available for this interface depend entirely on what the system supports. Please note that some constants may be incompatible across different Android versions, and some manufacturers have their own custom variables. You can find the relevant available parameters in the Android official documentation linked below, and then use the above interfaces to configure system settings.

Tip

We list the officially defined available fields below, but the actual available fields in the system are far more than these. You can use the command settings list [system|global|secure] to see what settings are actually available in each category.

Official Documentation

CategoryLink
Global Settings, containing system-level preferences accessible to all usershttps://developer.android.com/reference/android/provider/Settings.Global
System Settings, containing legacy system preferences primarily for ringtone, brightness, and other device-related configurationshttps://developer.android.com/reference/android/provider/Settings.System
Secure Settings, containing settings related to privacy and securityhttps://developer.android.com/reference/android/provider/Settings.Secure

Global

Field Name (lowercase)TypeDescriptionAdded in VersionRemoved in Version
adb_enabledintWhether ADB (Android Debug Bridge) over USB is enabled.API 17
airplane_mode_onintWhether airplane mode is turned on.API 17
airplane_mode_radiosstringComma-separated list of radios to disable when airplane mode is on.API 17
always_finish_activitiesintIf not 0, the activity manager will finish activities and processes as soon as they are no longer needed. If 0, the normal extended lifecycle is used.API 17
animator_duration_scalefloatScaling factor for Animator-based animations.API 17
apply_ramping_ringerintWhether to apply ramping ringer to incoming calls.API 29API 33
auto_timeintWhether to automatically set the device’s UTC system clock (e.g., using cellular signal like NITZ or other sources).API 17
auto_time_zoneintWhether to automatically set the device’s time zone system property (e.g., using MCC, NITZ, or other mechanisms like location).API 17
bluetooth_onintWhether Bluetooth is enabled (0=disabled, 1=enabled).API 17
boot_countintNumber of times the device has booted since API level 24.API 24
contact_metadata_sync_enabledintWhether contact metadata sync is enabled (1=enabled, 0=disabled).API 24
data_roamingintWhether data roaming is enabled (0=no, 1=yes).API 17
debug_appstringPackage name of the application to debug.API 17
development_settings_enabledintWhether the user has enabled developer options (0=no, 1=yes).API 17
device_namestringThe device name.API 25
device_provisionedintWhether the device has been provisioned (0=no, 1=yes).API 17
http_proxystringHostname and port for the global HTTP proxy (separated by a colon).API 17
install_non_market_appsintWhether installation of non-market applications is allowed.API 17API 21
mode_ringerintRinger mode (internal use; changing this value will not change the actual ringer mode, see AudioManager).API 17
network_preferenceintUser preference for which network to use (only modifiable by the connectivity service).API 17
radio_bluetoothstringConstant for specifying the Bluetooth radio in airplane mode or satellite mode radio lists.API 17
radio_cellstringConstant for specifying the cellular radio in airplane mode radio lists.API 17
radio_nfcstringConstant for specifying the NFC radio in airplane mode or satellite mode radio lists.API 17
radio_wifistringConstant for specifying the Wi‑Fi radio in airplane mode or satellite mode radio lists.API 17
secure_frp_modeintIndicates whether the device is in restricted secure FRP (Factory Reset Protection) mode.API 34
show_processesintControls whether to show the process CPU usage meter.API 17API 25
stay_on_while_plugged_inintWhether to keep the device awake while plugged in (combinable values: AC, USB, wireless, dock charger).API 17
transition_animation_scalefloatScaling factor for activity transition animations.API 17
usb_mass_storage_enabledintWhether USB mass storage is enabled.API 17
use_google_mailintIf this setting is set (any value), all references to Gmail on the device must be changed to Google Mail.API 17
wait_for_debuggerintIf 1, when launching DEBUG_APP it will wait for the debugger to connect before executing user code; if 0, it starts normally.API 17
wifi_device_owner_configs_lockdownintControls whether Wi‑Fi configurations created by a device owner app should be locked down (only the device owner app can edit or delete them).API 23
wifi_max_dhcp_retry_countintMaximum number of times to retry connecting to an access point after failing to obtain a DHCP IP address (N means a total of N+1 attempts).API 17
wifi_mobile_data_transition_wakelock_timeout_msintMaximum milliseconds to hold a wakelock while waiting for a mobile data connection after Wi‑Fi disconnects.API 17
wifi_networks_available_notification_onintWhether to notify the user when open networks are available.API 17API 26
wifi_networks_available_repeat_delayintDelay (in seconds) before repeating the notification of available Wi‑Fi networks.API 17API 30
wifi_num_open_networks_keptintWhen the number of open networks exceeds this value, the least-recently-used excess networks will be removed.API 17API 30
wifi_onintWhether Wi‑Fi should be on (only modifiable by the Wi‑Fi service).API 17
wifi_sleep_policyintPolicy that determines when Wi‑Fi goes to sleep.API 17API 30
wifi_sleep_policy_defaultintValue for the default Wi‑Fi sleep policy (based on STAY_ON_WHILE_PLUGGED_IN).API 17API 30
wifi_sleep_policy_neverintValue for never sleeping.API 17API 30
wifi_sleep_policy_never_while_pluggedintValue for using the default policy on battery and never sleeping while plugged.API 17API 30
wifi_watchdog_onintWhether the Wi‑Fi watchdog is enabled.API 17
window_animation_scalefloatScaling factor for normal window animations.API 17

System

Field Name (lowercase)TypeDescriptionAdded in VersionRemoved in Version
accelerometer_rotationintControls whether the accelerometer is used for auto-rotation of the screen (0=disabled, 1=enabled)API 3
alarm_alertstringURI of the system default alarm alert soundAPI 5
bluetooth_discoverabilityintBluetooth discoverability setting (2=discoverable and connectable, 1=connectable but not discoverable, 0=neither)API 1
bluetooth_discoverability_timeoutintTimeout (in seconds) for the Bluetooth discoverable stateAPI 1
date_formatstringDate format (deprecated, no longer used)API 1API 31
dtmf_toneintWhether to play DTMF tones when dialing (1=yes, 0=no)API 1
dtmf_tone_typeintType of DTMF tone for CDMA dialing (0=normal, 1=long)API 23
end_button_behaviorintBehavior when pressing the end call button during non-call (0=do nothing, 1=go to home screen, 2=sleep and lock, 3=go to home screen or sleep)API 1
font_scalefloatFont scaling factorAPI 1
haptic_feedback_enabledintWhether haptic feedback (vibration on tap) is enabled (1=enabled, 0=disabled)API 3API 33
mode_ringer_streams_affectedintBitmask of audio streams affected by the ringer modeAPI 1
mute_streams_affectedintBitmask of audio streams affected by muteAPI 1
notification_soundstringURI of the system default notification soundAPI 1
ringtonestringURI of the system default ringtoneAPI 1
screen_brightnessintScreen brightness value (1-255)API 1
screen_brightness_modeintBrightness mode (0=manual, 1=automatic)API 8
screen_off_timeoutintScreen timeout before sleep (in milliseconds)API 1
setup_wizard_has_runintWhether the setup wizard has run (non-zero means it has run)API 1
show_gtalk_service_statusintWhether to show GTalk service statusAPI 1
sound_effects_enabledintWhether sound effects (key clicks, etc.) are enabled (1=enabled)API 1
text_auto_capsintWhether the text editor should auto-capitalize (1=on)API 1
text_auto_punctuateintWhether the text editor should auto-punctuate (1=on)API 1
text_auto_replaceintWhether the text editor should auto-replace (1=on)API 1
text_show_passwordintWhether the text editor should show password characters (1=show)API 1
time_12_24stringTime display format ("12" or "24", region default if not set)API 1
user_rotationintDefault screen rotation angle (Surface rotation constant)API 11
vibrate_onintWhether vibration is enabled (internal use, actual vibration controlled by AudioManager)API 1
vibrate_when_ringingintWhether to vibrate when ringing (1=vibrate, 0=not vibrate)API 23API 33

Secure

Field Name (lowercase)TypeDescriptionAdded in VersionRemoved in Version
accessibility_display_inversion_enabledintWhether color inversion is enabled.API 21
accessibility_enabledintWhether accessibility is enabled.API 4
accessibility_speak_passwordintWhether to speak passwords in accessibility mode (deprecated, now controlled by individual accessibility services).API 15API 26
allowed_geolocation_originsstringList of origins (space-separated) that the browser is allowed to access geolocation by default.API 8
allow_mock_locationintWhether to allow mock locations (deprecated, no longer used).API 3API 23
android_idstringUnique Android ID of the device (64-bit hex string, behavior scoped since Android 8.0).API 3
default_input_methodstringComponent name (as a flattened string) of the current default input method.API 3
enabled_accessibility_servicesstringList of enabled accessibility services (string-encoded).API 4
enabled_input_methodsstringList of enabled input methods (colon-separated, includes subtype information).API 3
input_method_selector_visibilityintVisibility state of the input method selector.API 11
install_non_market_appsintWhether installation of non-market apps is allowed (1=allowed, 0=disallowed; on API 26+ use PackageManager.canRequestPackageInstalls()).API 3API 26
location_modeintCurrent location mode (integer value; on API 28+ prefer LocationManager.isLocationEnabled()).API 19API 28
lock_pattern_enabledintWhether the lock pattern is enabled (0=no, 1=yes; on API 23+ use KeyguardManager).API 8API 23
lock_pattern_visibleintWhether the lock pattern lines are visible (0=no, 1=yes; on API 23+ reading throws SecurityException).API 8API 23
parental_control_enabledintWhether parental controls are enabled (no longer supported).API 3
parental_control_last_updatestringLast update time of parental controls (no longer supported).API 3
parental_control_redirect_urlstringRedirect URL for parental controls (no longer supported).API 3
rtt_calling_modeintWhether RTT calling mode is enabled (0=off, 1=on).API 28
secure_frp_modeintWhether the device is in restricted FRP (Factory Reset Protection) mode (0=no, 1=yes).API 30API 34
selected_input_method_subtypestringID of the selected input method subtype.API 11
settings_classnamestringClass name of the Settings application.API 3
skip_first_use_hintsintWhether to skip first-use hints (0=show hints, 1=skip).API 21
touch_exploration_enabledintWhether touch exploration (accessibility) is enabled.API 14
tts_default_pitchintDefault TTS pitch (100 = 1x).API 4
tts_default_rateintDefault TTS speech rate (100 = 1x).API 4
tts_default_synthstringDefault TTS engine (package name).API 4
tts_enabled_pluginsstringList of enabled TTS plugins (space-separated).API 8