Skip to main content

Settings API

Description​

IDroidSettingsAPI is designed for modifying Android device system settings in ZennoDroid. It allows you to manage geolocation, time, language, baseband firmware, and LSPosed settings.

Methods​

SetBaseband​

  • void SetBaseband(string version)
    Sets the baseband version.

    Parameters:

    • version — modem/firmware version.

Example​

var settings = instance.DroidInstance.Settings;

settings.SetBaseband("G9300ZCU2API3"); // Set GSM module

SetGeo​

  • void SetGeo(double longitude, double latitude)
    Sets geolocation.

    Parameters:

    • longitude — longitude;
    • latitude — latitude.
  • void SetGeo(double longitude, double latitude, double altitude)
    Sets geolocation with altitude.

    Parameters:

    • longitude — longitude;
    • latitude — latitude;
    • altitude — altitude.
  • void SetGeo(double longitude, double latitude, double altitude, double bearing)
    Sets geolocation with bearing.

    Parameters:

    • longitude — longitude;
    • latitude — latitude;
    • altitude — altitude;
    • bearing — direction of movement (in degrees).
  • void SetGeo(double longitude, double latitude, double altitude, double bearing, double speed)
    Sets geolocation with full telemetry.

    Parameters:

    • longitude — longitude;
    • latitude — latitude;
    • altitude — altitude;
    • bearing — direction;
    • speed — movement speed.

Example​

var settings = instance.DroidInstance.Settings;

settings.SetGeo(37.617, 55.756); // Longitude and latitude
settings.SetGeo(37.617, 55.756, 150); // With altitude in metres
settings.SetGeo(37.617, 55.756, 150, 90); // With bearing
settings.SetGeo(37.617, 55.756, 150, 90, 60); // With bearing and speed

SetLanguage​

  • void SetLanguage(string language)
    Sets the system language.

    Parameters:

    • language — language code (e.g. en, ru).

Example​

var settings = instance.DroidInstance.Settings;

settings.SetLanguage("ru"); // Set the device system language

SetTime​

  • void SetTime(DateTime dateTime)
    Sets the system time. The device clock shows a time without a time zone, for example new DateTime(2025, 1, 1, 12, 0, 0), as it is, in the device's time zone. DateTime.Now and other times with a time zone set the same moment as on the computer.

    Parameters:

    • dateTime — a DateTime object.
  • void SetTime(string dateTime)
    Sets the time from a string. The device clock also shows a time from a string without a time zone as it is.

    Parameters:

    • dateTime — a string (e.g. 2025-01-01 12:00:00).

Example​

var settings = instance.DroidInstance.Settings;

settings.SetTime(DateTime.Now); // Set the current time

SetTimezone​

  • void SetTimezone(string timezone)
    Sets the time zone. If the device has no such time zone, the method throws the exception Unknown time zone ..., and the device's time zone doesn't change.

    Parameters:

    • timezone — a string (e.g. Europe/Moscow).

Example​

var settings = instance.DroidInstance.Settings;

settings.SetTimezone("Europe/Moscow"); // Set time zone

Working with LSPosed in ZennoDroid Enterprise​

ClearLSPosedSettings​

  • void ClearLSPosedSettings()
    Clears LSPosed settings.

Example​

var settings = instance.DroidInstance.Settings;

settings.ClearLSPosedSettings(); // Clear LSPosed spoofed data

GenerateRandomLSPosedSettings​

  • string GenerateRandomLSPosedSettings(IDeviceFilter filter, IDeviceOptions options)
    Generates random LSPosed settings.

    Parameters:

    • filter — device filter (IDeviceFilter);
    • options — additional device options (IDeviceOptions).

    Returns:
    A JSON string with the settings.

Example​

var settings = instance.DroidInstance.Settings;

var filter = new DeviceFilter();
filter.Country = "us"; // Choose country
filter.Version = "12|13|14|15"; // Choose Android version
filter.GpuVendor = "Qualcomm|ARM"; // Choose GPU vendor

var options = new DeviceOptions();
options.AddCanvasNoise = true; // Add canvas noise
options.AddGpu = true; // Add fake GPU

var json = settings.GenerateRandomLSPosedSettings(filter, options); // Get JSON for LSPosed spoofing
return json;

SetLSPosedSettings​

  • void SetLSPosedSettings(string json)
    Applies LSPosed settings.

    Parameters:

    • json — JSON with settings.

Example​

var settings = instance.DroidInstance.Settings;

var filter = new DeviceFilter();
filter.Country = "us"; // Choose country

var options = new DeviceOptions();
options.AddCanvasNoise = true;

var json = settings.GenerateRandomLSPosedSettings(filter, options); // Get JSON for LSPosed spoofing
settings.SetLSPosedSettings(json); // Apply device data spoofing

SetRandomLSPosedSettings​

  • void SetRandomLSPosedSettings(IDeviceFilter filter, IDeviceOptions deviceOptions)
    Applies random LSPosed settings in one step.

    Parameters:

    • filter — device filter;
    • deviceOptions — device options.

Example​

var settings = instance.DroidInstance.Settings;

var filter = new DeviceFilter();
filter.Country = "gb";

var options = new DeviceOptions();
options.AddCanvasNoise = true;

// Generate and immediately apply a random device. Use when the specific device doesn't matter and doesn't need to be reapplied.
settings.SetRandomLSPosedSettings(filter, options);