Offline settings



Rep: (1318)
Attached Image

AUTONOMOUS SETTINGS

Õ¯Õ¡Õ¶Õ£Õ¶Õ¥Õ¬-Õ´Õ¥Õ¶Õ¡Õ¯ Õ¯Õ¸Õ¶Ö†Õ«Õ£Õ¸Ö‚Ö€Õ¡ÖÕ«Õ¡


Current version: 5.5.4 from 09/16/2018
Composition of files:

The composition of the current version:
framework.jar - version 5.5.4
SystemUI.apk - version 5.5.3
framework-res.apk - version 5.5.4
Compositions of previous versions:

Version 5.5.3 (09/09/2018):
framework.jar - version 5.5.3
SystemUI.apk - version 5.5.3
framework-res.apk - version 5.5.1

Version 5.5.2 (09/02/2018):
framework.jar - version 5.5.2
SystemUI.apk - version 5.5.1
framework-res.apk - version 5.5.1

Version 5.5.1 (09/02/2017):
framework.jar - version 5.5.1
SystemUI.apk - version 5.5.1
framework-res.apk - version 5.5.1

Version 5.5 (August 13, 2017):
framework.jar - bugfix dated 08/14/2017
framework.jar - version 5.5
SystemUI.apk - version 5.5
framework-res.apk - version 5.5

Version 5.4.1 (06/05/2017):
framework.jar - version 5.4.1
SystemUI.apk - version 5.4
framework-res.apk - version 5.4

Version 5.4 (06/03/2017):
framework.jar - version 5.4
SystemUI.apk - version 5.4
framework-res.apk - version 5.4

Version 5.3 (05.22.2017):
framework.jar - version 5.3
SystemUI.apk - version 5.3
framework-res.apk - version 5.3

Version 5.2 (May 6, 2017):
framework.jar - version 5.2
SystemUI.apk - version 5.1
framework-res.apk - version 5.0

Version 5.1 (05/04/2017):
framework.jar - version 5.1
SystemUI.apk - version 5.1
framework-res.apk - version 5.0

Version 5.0 (04/29/2017):
framework.jar - version 5.0
SystemUI.apk - version 5.0
framework-res.apk - version 5.0


Compatibility with Android versions: ICS, JB, KK, LP, MM, N, O
Tested on smartphones:
Asus Zenfone 2 ZE551ML [Intel x86] (MM 6.0.1)
Asus ZenFone Max Pro (M1) ZB602KL (Oreo MR 8.1.0)
Lenovo P70 (Lineage OS 13 N 6.0.1)
Lenovo Vibe P1M (LP 5.1)
LG L90 (RR 5.8.3 N 7.1.2)
LG Magna (Lineage OS 14.1 N 7.1.2)
Moto X Play (MM 6.0.1, Lineage OS 14.1 N 7.1.2)
Moto Z Play (MM 6.0.1, N 7.0)
OnePlus 3T (N 7.1.1)
Samsung Galaxy A5-2016 (N 7.0)
Samsung Galaxy Note II (KK 4.4.4)
Samsung Galaxy Note 5 (N 7.0)
Samsung Galaxy S6 Edge Plus (N 7.0)
Samsung Galaxy S6 Edge (N 7.0)
Samsung Galaxy S6 (N 7.0)
Samsung Galaxy S8 (N 7.0)
Samsung Galaxy S8 + (N 7.0)
Samsung Galaxy Tab 3 7.0 Lite 3G (JB 4.2.2)
Sony Xperia SP (JB 4.3)
Sony Xperia E3 (KK 4.4.4)
Sony Xperia Z5 Dual (N 7.0)
Important!!!
1. The firmware must be correct and 100% deodexed (check along the way system / framework / arm missing file boot.oat ). If you have deodexed only the system framework, then your applications will not be able to find offline settings in the frame. In this case, the offline settings can be used locally in the autoset application , either locally in each application by copying the necessary smiles and changing the paths accordingly.
2. If you have installed XPosed and the offline settings from the frame did not work for you, you can use the offline settings locally in the autoset application , either locally in each application by copying the necessary smiles and changing the paths accordingly.
3. AT Android 7.0 Nougat and up application of offline settings in the application Settings.apk has some features
see the details in the section.Apply offline settingsunder the spoilerCommon uses .
4. In android, starting with version 6.0 in the application SettingsProvider.apk there is a parameter check targetSdkVersion which is specified in the block sdkInfo file apktool.yml any application:
sdkInfo:
minSdkVersion: '21'
targetSdkVersion: '23'

With the version in the application blocktargetSdkVersion above 22 any installed in the usual way or located in the folder / system / app the application will not be able to use the offline settings, as it is forced to prohibit the recording of keys in the vaults and stop the application.
But the restriction can be circumvented in three ways:
Method 1 :
Remove forced ban inSettingProvider.apk for what it was smiled /smali/com/android/providers/settings/SettingsProvider.smali
in the methodwarnOrThrowForUndesiredSecureSettingsMutationForTargetSdk (ILjava / lang / String;) V at the very beginning comment out one line (highlighted in bold):
.method private static warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk (ILjava / lang / String;) V
.locals 2
.param p0, "targetSdkVersion" # I
.param p1, "name" # Ljava / lang / String;

.prologue
.line 1169
const / 16 v0, 0x16

# if-gt p0, v0,: cond_1

.line 1170
sget-object v0, Landroid / provider / Settings $ System; ->PRIVATE_SETTINGS: Ljava / util / Set;

invoke-interface {v0, p1}, Ljava / util / Set; ->contains (Ljava / lang / Object;) Z


Method 2 :
DowngradetargetSdkVersion applications up 22 .

Method 3 :
Put the application in a folder/ system / priv-app by setting the required permissions ( 755 for a folder and 644 for the application).

ChangeLog:
------------
v5.5.4:
(changed: framework, framework-res, AutoSet. no change: SystemUI).
- introduced the automatic determination of the true path of the folder/ vendor , due to which the mount folder is correctly detected ( / system or / vendor ) for all versions of Android.
- the default folders for scripts and patches are now again/ system / vendor / scripts / and / system / vendor / overlay / , respectively.
- version limitation5.5.3 (see below) the location of the scripts autoload folder has been removed; now you can locate it where it suits you (as before).
- for type settingsAutoListPreference added new parameter notify-patch , allowing you to enable pop-up notifications when copying to a folder / system / vendor / overlay .

v5.5.3:
(changed: framework, SystemUI, AutoSet. no changes: framework-res).
- Fixed a critical error due to which a superuser request could be looped while executing scripts.
- for versions of Android 8.0 and above, the default path for scripts and patches folders is automatically changed instead of/ system / vendor / scripts / and / system / vendor / overlay / paths are used accordingly / vendor / scripts / and / vendor / overlay / . This is done in case the manufacturer of the smartphone has installed additional protection on the folder. vendor (like mine) and work with scripts and patches through mount / system It is not possible (see below for version 5.5.2, where I wrote about it), so the folder is directly mounted / vendor .
- Important!!! from the previous paragraph of innovations, it follows that now the startup folder of scripts, if it is locatedNOT in the internal memory and NOT on the SD card, must lie inside the folder vendor otherwise there will be no copying, deletion of scripts and their execution after a reboot. This is a temporary solution, in later versions this restriction will be removed.

v5.5.2:
(changed: framework, AutoSet. no changes: framework-res, SystemUI).
- on Android 8.1 due to the lack of remounting section/ system from the mode " a record "to mode" only for reading "after using it in stand-alone settings, the smartphone refuses to load (not all of them show it), so I added forced remounting to the mode" only for reading ".
- the default folder for the scripts executed at boot has been changed - instead of/ system / vendor / scripts now just used / system / scripts . This is due to the fact that on Android 8.0 and higher on some smartphones (in particular, on my Asus ZenFone Max Pro (M1) ZB602KL) there is an additional protection for changes in the folder vendor , it was not possible to bypass it yet.
- scripts are now really executed after rebooting from all types of settings, and not just fromAutoListPreference .
- if empty parameters are setrunscript , runscript-on or runscript off , the superuser's request is not made.
- in Android 8.0 and higher, SystemUI no longer has smudgedLcom / android / systemui / statusbar / BaseStatusBar so use for example Lcom / android / systemui / SystemBars .

v5.5.1:
(changed: redeemed code for framework.jar and SystemUI.apk, resources for framework-res.apk, AutoSet.apk for offline use).
- fixed bug with crash settings when trying to change the path to the source folder for lists of scripts, patches, images, sounds and files.
- for lists of images, sounds and files with the parameter valuetypevalue = "uri" now the original URI value is returned, without the reverse conversion. But the choice at the same time occurs immediately, without prior formation of the list.
- added escaping service characters" , \ , $ when passing parameters to scripts.

v5.5 bugfix 1:
- fixed bug with crash settings, if the key used to autoload scripts does not exist, is not used or is empty. To do this, change two smears for framework.jar, put the fix in the offline settings folder with the replacement. Adjustment of the AutoSet program is not required.

v5.5:
(changed: redeemed code for framework.jar and SystemUI.apk, resources for framework-res.apk, AutoSet.apk for offline use).
- expanded optionsbroadcast , broadcast-on and broadcast-off - now in the intent always current setting values ​​are added , as extra -parameters with key autoset_value_sendbroadcast "that can be read in your mod using the system method getStringExtra (...) ...
- expanded optionsrunscript , runscript-on and runscript off - now in scripts always the current setting values ​​are passed as parameters which scripts can accept when executed (the script should contain a standard code for accepting such parameters). Parameters are transferred to scripts not only at a one-time execution, but also at autoloading after a device reboot. Also, now, by default, scripts are added to the scripts startup folder, but when using special prefixes " o: "and" b: ", accordingly, they can be executed one-time without copying to the startup folder (as it was before) or copied to the startup folder without immediate execution.
- AutoSeekBarPreference permanently renamed to AutoSeekPreference , in connection with the future and already existing expansions of opportunities, which are further in the log.
- atAutoSeekPreference added new slider type - circular , as well as the opportunity to place the sliders not only under the title or in the dialog box, but also to the right of the headers , as checkboxes and switches. Also added features: rotation sliders on 90 , 180 and 270 degrees change of size in units dip , opportunity unit display . Added new parameters: typeseek , location , rotation , sweepangle , size , clockwise , unit . Removed parameter signdialog .
- layot ​​formatAutoColorPickerPreference redesigned and added new features: two new types of palette - circular and in the form of a flower , previews near the title can be displayed as a circle or a square. Added new parameters: typepicker , lightslider , typeview , coloredit , density .
- improved compatibility with software and hardware platforms other than processorsQualcomm .

------------

v5.4.1:
(changed: the code for the framework.jar and the AutoSet.apk program for autonomous use were redeemed. The code for SystemUI.apk and the resources for framework-res.apk were unchanged).
- fixed bug with defining the default startup folder for scripts, which led to crash of settings or generation of empty lists of scripts (thanks for the bug-reportlexadjsss).
- At the same time, possible similar problems with crashes of settings or the formation of empty lists of overlay patches were fixed.

------------

v5.4:
(changed: redeemed code for framework.jar and SystemUI.apk, resources for framework-res.apk, AutoSet.apk for offline use).
- memory leaks have been eliminated, leading to sudden phone bootloops due to the forced use of many static references to objects (thanksivan-68for bug reports and information sources).
- for settings in the form of lists of value arrays, analogs of system parameters were introducedandroid: entries and android: entryValues - entries and entryvalues , respectively. In the new parameters can be used as a usual way of prescribing arrays through the links of the form @array / ... " or " @android: array / ... "as well as a simple task in the form of a string sequence, where as a separator is used" ; "(semicolon), and as a prefix of the entire sequence -" string / ... "(unsigned @ ) or " android: string / ... "(unsigned @ ) when reading rows of an array from resources, or without a prefix to read rows of an array directly from the sequence.
- for settings in the form of lists in the parameterdrawablearray Now you can also set an array of icons in the form of a string sequence ( see above ) where as a separator is used " ; "(semicolon), and as a prefix of the entire sequence -" drawable / ... "(unsigned @ ) or " android: drawable / ... "(unsigned @ ) to read icons from resources. Directly register the icons in the string, as you understand, it is impossible.
- for settings in the form of lists, a new parameter was introducedfilterlist , allowing to filter the output of any types of lists by values ​​and names, and for activation lists, services and receivers - also by actions and categories.
- for settings like checkbox and switch display of text explanationsandroid: summaryOn and android: summaryOff now depends on the override parameter DEPEND-OUT which allows you to invert the state INCLUDED / DISABLED .
- for all types of settings (except for checkboxes and switches, since there are corresponding system parameters for them) new parameters have been introducedsummary-on and summary-off - for the possibility of setting text explanations for different settings states ( INCLUDED / DISABLED ).
- the parameter is expanded for all types of settingsneedreboot - Added the ability to reset the default home screen ( needreboot = "home" ), as well as the ability to stop any application specified in the application parameter ( needreboot = "application package name" ). At the same time, for each type of reboot, the pop-up windows contain messages corresponding to them.

------------

v5.3:
(changed: code for framework.jar has been smiled, resources for framework-res.apk, code for SystemUI.apk has been saved, AutoSet.apk for autonomous use).

- A new class has been introduced (smeared)AutoPreference , to facilitate interaction with offline settings from your mods. Currently contains general methods for starting / stopping applications, starting activites, starting / stopping services. A set of common methods with each new version of offline settings will be updated.
- added3 new types of lists (so far without filtering): activate ( typelist = "activity" ), Services ( typelist = "service" ) and broadcast receivers ( typelist = "receiver" ). Not all activations and services can visually see the fact of starting / stopping, since not all of them have any kind of interface, besides many will require you to add additional permissions to your application, but even this does not guarantee the launch due to security restrictions android .
- added extensions for script lists - typesscript-n and script-n * , in such lists the execution of scripts is not performed, only the values ​​in the configuration key are changed.
- for lists of scripts, patches, sound and arbitrary files you can now assign a custom array of icons as for lists of values.
- for all settings appeared3rd reboot view - only interface , for which you need to set the parameter needreboot = "ui" (thank Hal9k per command line), superuser rights are required.
- forSystemUI you no longer need to edit the manifest, since reloading applications when changing the path to the autoload folder of scripts is now performed from the command line requesting superuser rights ( see item above ).
- for offline configurationAutoColorPickerPreference Added a separate layout of the landscape color selection panel (thanks Hal9k per layout).
- fixed bugs:
... resetting the settings in Android Nougat to default values ​​when cleaning application data that uses offline settings, occurred only for the very first setting in the list.
... in the AutoSet application, using the AutoColorPickerPreference autonomous setting from the frame caused AutoSet to crash due to getting the layout in a different way.
... in the single lists of audio files on Android Nougat while listening to tunes there was no visual switching.

-----------

v5.2:
(changed the code forframework.jar and program AutoSet.apk for stand-alone use SystemUI.apk and resources for framework-res.apk remained unchanged).
- in parametertypeset All offline settings can now be set arbitrary storage settings in the form of a description of their full paths, which allows you to use not only the standard Android storage, but also specific storage device manufacturers. In connection with this, the parameter description was changed and parameter setting examples were added for Motorola models.
- a new parameter has been added for lists of images, sound or arbitrary filestypevalue that allows you to specify the type of key value storage as a special identifier URI (Uniform Resource Identifier), on a simple - links to the file. This allows the use of offline settings without changing some mods in which file paths are used in the form of such links. In this connection, the description of the parameters of the lists has been updated and supplemented. In the program Autoset examples added.
- for lists of scripts, patches, images, sound or arbitrary files, the ability to select (including multiple) at once was added, without first forming lists. For this in the parametertypelist you just need to add a symbol to the main list type * (star). In this connection, the description of the parameters of the lists has been updated and supplemented. In the program Autoset examples added.
- for image lists, the image scaling in the list and as an icon near the list header is changed. Now the image maintains the aspect ratio.
v5.1:
- for anroid versionshigher than MM 6.0.1 in the offline settings entered listening to the fact of resetting data of a particular application, to prevent unauthorized resetting the settings to default values ​​in the application Settings.apk (perhaps not only for him). In this regard, the code was updated for framework.jar and SystemUI.apk , as well as a description for installation in SystemUI.apk. Updated description of common applications in connection with the release of the new version. Resources for framework-res.apk remained unchanged. Program Autoset.apk for autonomous use remained unchanged.
v5.0:
- automatic cleaning of the key was added to all typical settings, if it was previously used for another type of settings. In previous versions, a similar situation led to the collapse of an application that used a standalone setting, if the application data was not previously cleared.
- to adjust the typeAutoListPreference added opportunities for the formation and selection of various types of lists (parameter typelist ): ordinary arrays of values, applications with and without a launcher, scripts, overlay patches, images, sounds, arbitrary files. Selected scripts can be executed once and automatically after the device is loaded, only automatically after loading, or only once. Scripts can be displayed in the list with an arbitrary name, specified in the body of the script according to a special format. The selected overlay patches are automatically copied to the system folder. / system / vendor / overlay and, if there is support from the firmware side, they are applied in real time or after the device is rebooted. Overlay patches can have an arbitrary name and icon, if you specifically define them in the patch resources. For images, their mini-versions are dynamically generated, allowing preview in the list. Sounds in the list when you select you can listen to the system player.
- to adjust the typeAutoListPreference parameter added pathlist , defining for lists of scripts, overlay patches, images, sounds or arbitrary files the path to the folders of their choice. If there is no parameter, the selection occurs throughout the device using the system browser.
- to adjust the typeAutoListPreference parameter added multichoice that determines the ability to select several items of the list at once (multiple choice), while in the key string the selected values ​​are separated ; (semicolon).
- to adjust the typeAutoListPreference parameter added search that determines the presence / absence of a search string in the list.
- to adjust the typeAutoListPreference parameter added visiblevalue that defines the visibility in the list of values ​​themselves.
- to adjust the typeAutoEditTextPreference Added the ability to send broadcast messages and execute scripts directly from the value entry field: with prefixes entered at the beginning of the field broadcasts: OR scripts: , respectively.
- parameter added to all types of settingsnotify-broadcast , which determines whether a pop-up notification should appear when sending broadcast messages.
- in all types of settings to the parameterbroadcast parameters added broadcast-on and broadcast-off defining the broadcast messages to be sent when the configuration state changes INCLUDED / DISABLED , respectively. Parameter broadcast takes precedence (when it is applied, the "child" parameters are ignored) and sending messages occurs in any configuration state.
- parameter added to all types of settingsnotify-script , defining the necessity of appearance of a pop-up notification when executing scripts.
- parameters added to all types of settingsrunscript , runscript-on , runscript off that define the paths to the scripts that need to be executed once: with any change in the settings or with a change in the state of the settings INCLUDED / DISABLED , respectively.
Parameterrunscript takes precedence (when using it, "child" parameters are ignored).
- parameter added to all types of settingsdepend-out , which determines at which current value its dependent settings will be inactive. Takes priority over default values.
- Now the dependence of the current setting is possible from any other type of settings.
- parameter added to all types of settingsdepend-in that determines at which value of the key (dependency) setting the current setting will be active. Takes priority over default values.
- parameter added to all types of settingsneedreboot that specifies the need for a normal or fast reboot of the device, with a request.
v4.0 bugfix:
- fixed a bug with non-displaying layouts of settings in the form of a list, color picker and a sycbar (slider).
v4.0:
- offline settings now work, in addition to storageSettings $ System with storages Settings $ Global and Settings $ Secure .
For this, a new field has been added to the offline settings.typeset = , description by spoiler
Description of offline settings ->Description of common setting fields ->Optional fields ->typeset = .
There are no changes in resources, only in smiles.
v3.0 fix 2:
- for full compatibility with all versions of Drews, changed the remaining fields of layots:layout_toEndOf on layout_toRightOf and layout_alignEnd on layout_alignRight . There are no changes in smiles, only in resources.
v3.0 fix:
- for better compatibility, I changed the light fields: instead ofalignParenStart and alignParenEnd - alignParentLeft and alignParentRight , respectively. There are no changes in smiles, only in resources.
- added field descriptionandroid: dependency - forgot to write that other settings can now also depend on the progress of the slider ( <=0 or >0 )
v3.0:
- added for the list the ability to assign an array of icons corresponding to an array of values,
depending on the presence of a specially entered fielddrawablearray .
- added the ability to display the slider (it’s the slider, it’s a sycbar) in the form of a dialogue,
depending on the value and the presence of a specially entered field "signdialog ".
- added for type settingsAutoColorPickerPreference , AutoSeekBarPreference , AutoListPreference , AutoEditTextPreference
possibility of setting an individual background color for the dialog, depending on the value and the presence of a specially entered fieldcolor .
- corrected and added the description of some fields.
- added description of optional fieldsandroid: icon and android: dialogIcon because The system has the ability to assign individual icons for settings headers and dialog headers.
v2.1:
- As it turned out, it works on ICS.
- corrected field descriptionsandroid: summary and summary .
- corrected the last microbag inAutoCheckBoxPreference and AutoSwitchPreference .
v2.0:
- corrected byaku inAutoCheckBoxPreference and AutoSwitchPreference .
v1.0:
- the beginning of time.
Sources:

All initial versions (up to v4.0 bugfix inclusive) of offline settings are here .

1. Instructions for editing system resources (Post sk0t # 24678076) ( under the spoiler "Easy way" ).
The source of the very idea of ​​making settings stand-alone.

2. AutoColorPickerPreference :
Palette in the form of a photoshop panel -
author:Sergey Margaritov , sources: https://github.com/att…ColorPickerPreference/
Circular palette and in the form of a flower -
author:Quadflask , sources: https://github.com/QuadFlask/colorpicker/
Adapted for offline settings.

3. AutoSeekPreference :
Linear slider - from the system framework.
Circular slider -
author:neild001 , sources: https://github.com/neild001/SeekArc/
Adapted for offline settings.

4. AutoCheckBoxPreference , AutoSwitchPreference , AutoListPreference , AutoEditTextPreference :
based on stockCheckBoxPreference , SwitchPreference , ListPreference , EditTextPreference of framework.jar ,
Redid for autonomous work.

5. 6htGear Rom control V2.1
I looked at the way of forming dynamic lists when the array is not set.
General description:

Why all this was done.
As you know, adding settings for a certain mod is always a rather non-trivial task.
Today there is at least3 ways their additions:
1. Using third-party programs like Uniprefs from sk0t or m7parts from 7OH .
This method is simple, due to the beginners, but many do not like this method due to subjective reasons.
In addition, in these programs, a rather limited set of added types of settings is added (only the checkbox, the switch and the list).
2. Using relatively new third-party programs like RomControl from the website XDA or some Customsettings , too, seemingly from the site XDA (not seen, but heard about it).
This method is also relatively simple and easy for beginners, but many do not like it for the same subjective reasons.
3. Using every time for a new fashion a handful of new incomprehensible smiles inserted into the stock application
(settings, dialer, etc., etc.), or the time-consuming addition of processing each key to the stock application.
In addition, for beginners it is usually not under force.

I want to present4th way .
Once added toframework.jar my set was smiled in framework-res.apk several layouts, pictures and lines, as well as adding SystemUI.apk one smeared and adjusting one stock, you can add without further problems with the oil later ANY your settings in ANY applications in which there are any settings.
You no longer need to think how and where to add a tool for changing a particular mod setting.
And also, there will be no need to use third-party programs to change the settings of your mods.
Although, the same offline settings can be used separately inside the same applications likeUniPrefs / m7parts / RomControl / CustomSettings .
Settings applyINDEPENDENTLY in real time.
The definitions of offline settings can be inserted separately into any xml-file of any settings of any applications, or as part of its own settings block inserted into other blocks.
Offline settings can also be used locally within any application by copying the necessary selected smiles into your application and changing the paths in the smiles and definitions accordingly.
The purpose of creating offline settings is to make mod settings as convenient and logical as possible.

Currently (version 5.5.4) the following types of settings are supported:
  • Checkbox
  • Switch
  • Input field of values ​​(text)
  • Slider (slider) - circular and linear
  • Color selection panel (color picker), three types of palette - the usual, in the form of a flower, in the form of a circle
  • Lists:
    • values
    • applications
    • activit
    • of services
    • broadcast receivers
    • scripts
    • overlay patches
    • of images
    • sound files
    • arbitrary files


For application it is enough toxml - settings file of your application to insert calls to offline settings, in the following forms:
<AutoCheckBoxPreference ... parameter set ... /> - modified setting in the form of a checkbox.
<AutoSwitchPreference ... parameter set ... /> - modified setting in the form of a switch.
<AutoListPreference ... parameter set ... /> - modified setting in the form of a list in a pop-up dialog.
<AutoEditTextPreference ... parameter set ... /> - modified setting in the form of a pop-up field for entering values.
<AutoSeekPreference ... parameter set ... /> - modified setting in the form of a circular or linear slider with the location under the title, to the right of it or in the dialog window.
<AutoColorPickerPreference ... parameter set ... /> - Modified setting in the form of a pop-up window with a choice of color (3 types of palette).

Naturally,lines and arrays , defining the contents of the settings, while it will also be necessary to add to your application (settings, dialer, mail, etc., etc.).
And, of course, no one has canceled the processing of the action itself when changing the key of your mod, and it remains yours: yes2:

Currently, offline settings allow you to determine the largest number of types and types of settings used in general in applications than anywhere else.

Screenshots:
Checkboxes:

Attached Image
Attached Image


Switches:

Attached Image
Attached Image


Lists of values:

Attached Image
Attached Image
Attached Image


Application Lists:

Attached Image
Attached Image
Attached Image


Activation lists:

Attached Image
Attached Image
Attached Image


Service listings:

Attached Image
Attached Image
Attached Image


Receiver lists:

Attached Image
Attached Image
Attached Image


Script lists:

Attached Image
Attached Image
Attached Image


Overlay patch lists

Attached Image
Attached Image
Attached Image


Image Lists:

Attached Image
Attached Image
Attached Image


Sound lists:

Attached Image
Attached Image
Attached Image


File Lists:

Attached Image
Attached Image
Attached Image


Input fields:

Attached Image
Attached Image
Attached Image


Circular Sliders:

Attached Image
Attached Image
Attached Image


Sliders linear:

Attached Image
Attached Image
Attached Image


Color Picker Panels (Regular Palette):

Attached Image
Attached Image
Attached Image


Color Picker Panels (Flower Palette):

Attached Image
Attached Image
Attached Image


Color selection panels (circular palette):

Attached Image
Attached Image
Attached Image


Installing offline settings to the system:

This action is done once, after which you can use the offline settings in any android application.

The third part of the manual (work with SystemUI.apk) is required only if you need to automatically execute the scripts you selected in your script lists after rebooting the device, as well as for the correct operation of the offline settings in the Settings.apk application on Android Nougat.


Files:

Current version 5.5.4:

Smaly for versions ApkTools 1.4.3 - 1.5.2:
Attached fileframework_v5.5.4_apktool152.zip(129.99 KB)

Attached fileSystemUI_v5.5.3_apktool152.zip(3.02 KB)


Smaly for ApkTools versions 2.0 and higher:
Attached fileframework_v5.5.4_apktool200.zip(132,02 KB)

Attached fileSystemUI_v5.5.3_apktool200.zip(3,07 KB)


Resources:
Attached fileframework-res_v5.5.4.zip(21.23 KB)



Outdated versions:

All outdated versions of offline settings are on Yandex.Disk:

https://yadi.sk/d/zyoNcM3V3JniD4

Very ancient versions can be downloadedhere.


1. Work with the framework.jar

Disassembledframework.jar put in the appropriate folder my set of smiles from the appropriate archive.

Important!
- if in your framework there is another folder smeared - "/ smali_classes2", then, most likely, it was necessary to put it there, observing the path, otherwise the framework may not be recompiled.
- if in your firmware there is a 2nd framework (in the folder "/ system / framework" there is a file "framework2.jar"), then, most likely, you also need to put the smiles there, since the main framework with the new ones may not be replicated .


2. Work with the framework-res.apk

2.1. Disassemble framework-res.apk .
2.2. Arrange the contents of the corresponding archive ( Only layots and pictures !!! ).
2.3. AT res / values ​​/ string.xml add lines:
<string name = "zff_autoset_hex_hint">\ # FF000000</ string>
<string name = "zff_autoset_empty_value">No</ string>
<string name = "zff_autoset_dialog_alert_title_1">Attention!</ string>
<string name = "zff_autoset_reboot_dialog_alert_message">To apply the settings you must% 1 $ s. Do it now?</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_normal">reboot the device</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_soft">reboot the system</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_ui">reboot the system interface</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_home">reboot the home screen</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_app">stop the application \ u0022% 1 $ s \ u0022</ string>
<string name = "zff_autoset_action_reboot">Reboot</ string>
<string name = "zff_autoset_reboot_progress_1">Rebooting% 1 $ s \ u2026</ string>
<string name = "zff_autoset_reboot_progress_2">Stopping% 1 $ s \ u2026</ string>
<string name = "zff_autoset_reboot_progress_normal">device</ string>
<string name = "zff_autoset_reboot_progress_soft">system</ string>
<string name = "zff_autoset_reboot_progress_ui">system interface</ string>
<string name = "zff_autoset_reboot_progress_home">home screen</ string>
<string name = "zff_autoset_reboot_progress_app">application \ u0022% 1 $ s \ u0022</ string>
<string name = "zff_autoset_notify_sendbroadcast">Broadcast messages sent:</ string>
<string name = "zff_autoset_notify_runscript">Executed scripts:</ string>
<string name = "zff_autoset_notify_runpatch">Run patches:</ string>


2.4. AT res / values-ru / string.xml add lines:
<string name = "zff_autoset_hex_hint">\ # FF000000</ string>
<string name = "zff_autoset_empty_value">Not</ string>
<string name = "zff_autoset_dialog_alert_title_1">Attention!</ string>
<string name = "zff_autoset_reboot_dialog_alert_message">To apply the settings you need% 1 $ s. Do it now?</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_normal">reboot device</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_soft">reboot the system</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_ui">reboot system interface</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_home">reload desktop</ string>
<string name = "zff_autoset_reboot_dialog_alert_message_app">stop the application \ u0022% 1 $ s \ u0022</ string>
<string name = "zff_autoset_action_reboot">Reboot</ string>
<string name = "zff_autoset_reboot_progress_1">Reboot% 1 $ s \ u2026</ string>
<string name = "zff_autoset_reboot_progress_2">Stop% 1 $ s \ u2026</ string>
<string name = "zff_autoset_reboot_progress_normal">devices</ string>
<string name = "zff_autoset_reboot_progress_soft">systems</ string>
<string name = "zff_autoset_reboot_progress_ui">system interface</ string>
<string name = "zff_autoset_reboot_progress_home">desktop</ string>
<string name = "zff_autoset_reboot_progress_app">applications \ u0022% 1 $ s \ u0022</ string>
<string name = "zff_autoset_notify_sendbroadcast">Broadcast messages sent:</ string>
<string name = "zff_autoset_notify_runscript">Run scripts:</ string>
<string name = "zff_autoset_notify_runpatch">Patches completed:</ string>


2.5. To collect framework-res.apk , if necessary, sign.

3. Work with the SystemUI.apk .

3.1. Disassemble SystemUI.apk .
3.2. Disassembled SystemUI.apk put in the appropriate folder one smali from the appropriate archive.
3.3. In smiles Lcom / android / systemui / statusbar / BaseStatusBar (on Android 8.0 and higher use grease Lcom / android / systemui / SystemBars ) find a method start () V and register before return-void additional method call, highlighted in bold:
if in the method the number of registers (parameter.locals ) more 15 , then write the code like this:
.method public start () V
.locals 19

.prologue
.
.
.
invoke-virtual / range {v2 .. v7}, Landroid / content / Context; ->registerReceiverAsUser (Landroid / content / BroadcastReceiver; Landroid / os / UserHandle; Landroid / content / IntentFilter; Ljava / lang / String; Landroid / os / Handler;) Landroid / content / Intent;

invoke-direct / range {p0 .. p0}, Lcom / android / systemui / statusbar / BaseStatusBar; ->updateCurrentProfilesCache () V

move-object / from16 v0, p0

invoke-virtual {v0}, Lcom / android / systemui / statusbar / BaseStatusBar; ->registerAutoSetReceiver () V


return-void

if in the method the number of registers (parameter.locals ) less or equal 15 , then write the code like this:
.method public start () V
.locals 15

.prologue
.
.
.
invoke-virtual {p0}, Lcom / android / systemui / statusbar / BaseStatusBar; ->registerAutoSetReceiver () V

return-void


3.4. At the end Lcom / android / systemui / statusbar / BaseStatusBar (on Android 8.0 and higher use grease Lcom / android / systemui / SystemBars ) add a new method:
.method public registerAutoSetReceiver () V
.locals 4

.prologue
iget-object v0, p0, Lcom / android / systemui / statusbar / BaseStatusBar; ->mContext: Landroid / content / Context;

new-instance v1, Landroid / content / IntentFilter;

invoke-direct {v1}, Landroid / content / IntentFilter; -><init>() V

const-string v2, "android.intent.action.BOOT_COMPLETED"

invoke-virtual {v1, v2}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

const-string v2, "ffx.intent.action.GLOBAL_BOOT_SCRIPTS_PATH"

invoke-virtual {v1, v2}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

new-instance v2, Lfreeflax / systemui / AutoSet $ ​​Receiver;

invoke-direct {v2}, Lfreeflax / systemui / AutoSet $ ​​Receiver; -><init>() V

invoke-virtual {v0, v2, v1}, Landroid / content / Context; ->registerReceiver (Landroid / content / BroadcastReceiver; Landroid / content / IntentFilter;) Landroid / content / Intent;

const / 16 v3, 0x18

sget v1, Landroid / os / Build $ VERSION; ->SDK_INT: I

if-lt v1, v3,: cond_0

new-instance v1, Landroid / content / IntentFilter;

invoke-direct {v1}, Landroid / content / IntentFilter; -><init>() V

const-string v3, "android.intent.action.PACKAGE_DATA_CLEARED"

invoke-virtual {v1, v3}, Landroid / content / IntentFilter; ->addAction (Ljava / lang / String;) V

const-string v3, "package"

invoke-virtual {v1, v3}, Landroid / content / IntentFilter; ->addDataScheme (Ljava / lang / String;) V

invoke-virtual {v0, v2, v1}, Landroid / content / Context; ->registerReceiver (Landroid / content / BroadcastReceiver; Landroid / content / IntentFilter;) Landroid / content / Intent;

: cond_0
return-void
.end method


3.5. Collect SystemUI.apk, sign if necessary.
3.6. For example, I am attaching my greed Lcom / android / systemui / statusbar / BaseStatusBar (for Android 8.0 and higher smoldered Lcom / android / systemui / SystemBars ) BEFORE and AFTER changes:

BEFORE :
Attached fileBaseStatusBar_DO.rar(23.92 KB)

for Android 8.0 and higher:
Attached fileSystemBars_DO.zip(1.33 KB)

AFTER :
Attached fileBaseStatusBar_POSLE.rar(24.17 KB)

for Android 8.0 and higher:
Attached fileSystemBars_POSLE.zip(1.63 KB)



Thanks:

People, one way or another, and at different times, contributed to the emergence and further development of the project:

sk0t
ivan-68
proscrit
DodgeWooW
madgit
grisha84
Hal9k
Pomidor666

A detailed description of the parameters of offline settings is in2nd messagethis topic.
A detailed description of how to use offline settings is in3rd messagethis topic.
AutoSet software for offline use of offline settings
Autonomous settings can not be installed in the system at all, and used in the old manner - in a third-party program.
For this purpose, I post an application based on the program.Uniprefs from sk0t .
The program already contains many examples and descriptions of various types of settings that you can modify / add / delete to your liking.
The program itself automatically executes the scripts you selected in your lists of scripts after the device is rebooted.
The program will be updated depending on the release of the offline settings.

Screenshots of the program:
Attached Image
Attached Image
Attached Image


Attached Image
Attached Image
Attached Image


Attached Image
Attached Image
Attached Image


Attached Image
Attached Image
Attached Image


Attached Image
Attached Image
Attached Image


Download current version 5.5.4 :
For versions Android 4.0 - 4.4.4

Archive with the program for versions ApkTools 1.4.3 - 1.5.2 (Full version - with examples of all settings):
Attached fileAutoSet_v5.5.4_apktool152.zip(366 KB)

Archive with the program for versions ApkTools 1.4.3 - 1.5.2 (Lite version - without examples of settings):
Attached fileAutoSet_v5.5.4_LITE_apktool152.zip(318.07 KB)

Archive with the program for versions ApkTools 2.0 and higher (Full version - with examples of all settings):
Attached fileAutoSet_v5.5.4_apktool200.zip(368.23 KB)

Archive with the program for versions ApkTools 2.0 and higher (Lite version - without examples of settings):
Attached fileAutoSet_v5.5.4_LITE_apktool200.zip(320.29 KB)


For versions of Android 5.0 - 7.0
Archive with the program for versions ApkTools 2.0 and higher (Full version - with examples of all settings):
Attached fileAutoSet_v5.5.4_apktool200_material.zip(371.9 KB)

Archive with the program for versions ApkTools 2.0 and higher (Lite version - without examples of settings):
Attached fileAutoSet_v5.5.4_LITE_apktool200_material.zip(323.57 KB)


Outdated versions:

All outdated versions of the program are on Yandex.Disk:

https://yadi.sk/d/zyoNcM3V3JniD4

The initial version of the program ishere.
The original program, on the basis of which the AutoSet program is made, is locatedhere(under the spoiler"Easy way" ).


Integrating "Offline Settings" into System Settings

Remember: everything that you do - you do at your own peril and risk.
I am not responsible for the performance of your device after installing the offline settings in the system,
since I do not have the gift of foresight and cannot answer for all existing versions of firmware and devices.
If you place somewhere a copy of someone else’s code or a modified version of it,
it is always in a good form to indicate the original source.


Useful links:
Practical examples of use:
Any ideas for the further development of autonomous settings, as well as bug reports are accepted.
Unsubscribe in the subject!


Post has been editedwasherron - 28.04.19, 10:09
Reason for editing: Integrating "Offline Settings" into the System Settings



Rep: (66)
Hello. The topic has already occurred, how to change the string "key" independent (getKeyParam) or free (getKeyInt) settings under the autonomous. And whether there is a stand-alone configuration of the analogue:
Landroid / preference / MiuiCoreSettingsPreference; ->getKeyTime (Landroid / content / Context; Ljava / lang / String;) J

Here is a piece of code, this can be rewritten under the stand-alone:
const / 4 v5, 0x4

iget-object v7, p0, Lcom / android / systemui / timer / Timer $ Main; ->mContext: Landroid / content / Context;

iget-object v0, p0, Lcom / android / systemui / timer / Timer $ Main; ->mHandler: Landroid / os / Handler;

iget-object v1, p0, Lcom / android / systemui / timer / Timer $ Main; ->mRunnable_Bluetooth: Ljava / lang / Runnable;

invoke-virtual {v0, v1}, Landroid / os / Handler; ->removeCallbacks (Ljava / lang / Runnable;) V

invoke-super {p0, v5}, Lcom / android / systemui / timer / Timer; ->releaseTimerWakeLock (I) V

const-string v2, "activitykey"

invoke-static {v7, v2}, Landroid / preference / MiuiCoreSettingsPreference; ->getKeyParam (Landroid / content / Context; Ljava / lang / String;) I

move-result v4

if-nez v4,: cond_0

goto: goto_0

: cond_0
const-string v2, "bluetoothkey"

invoke-static {v7, v2}, Landroid / preference / MiuiCoreSettingsPreference; ->getKeyTime (Landroid / content / Context; Ljava / lang / String;) J

move-result-wide v2

long-to-int v2, v2

if-nez v2,: cond_1

goto: goto_0



Rep: (3654)
* SvatSV , almost the same
invoke-static {v0, v1, v2, v3}, Landroid / provider / Settings $ System; ->getLong (Landroid / content / ContentResolver; Ljava / lang / String; J) J


Post has been editedvladrevers - 26.03.20, 17:47



Rep: (66)
Something not quite figured out the dependencies, and possibly with the broadcast (-on).
There is an option 1 (switch) such a plan (conditional):
AutoSwitchPreference android: key = "key_1" android: defaultValue = "false" runscript-on = ... / script_start "runscript-off =" ... / script_end "/>

And there is a setting 2 (switch, also suspended):
AutoSwitchPreference android: key = "key_2" android: defaultValue = "false" />

It is necessary that when you turn on the switch to setting 1 (the script) include a switch to setting 2.



Rep: (3654)
* SvatSV You can register script
settings put system key_2 1
True visual effect of switching the second switch there will be no current in the application perezayti



Rep: (679)
Hello!
Please help for an autonomous settings ... I want to help Overlaet patches change themes / accents single / multiple applications!
Vyor patches:
Attached Image
Attached Image


Added patches with color-flowers inside, but something I can not understand why do not work. Opt for at one time or another patch - autonomous request reboot, ok ... I reboot, and in the end nothing is selected. As if nothing at all to choose from!
What am I doing wrong?



Rep: (3654)
* f1 ^ ter And if you specify the source of patches not in the system, and the internal memory?



Rep: (679)
* vladrevers
I tried to change the location to internal memory and still the same after a reboot everything returns. It may have to be some kind of script to work with patches?
Excuse me, the problem was in the manifesto! Under the new resolution, and rewrote it worked!
Total
Attached Image
Attached Image



Post has been editedf1 ^ ter - 15.08.20, 21:36



Rep: (1815)
Prompt how to adapt such tag com.tn2009.romcontrol.v2.prefs.UriSelectionPreference android: title = "Solar" android: key = "weather_background_statusbar_priority_sunny_uri" />under the autonomous



Rep: (3654)
* Arhitektor58 , �
<freeflax.autoset.AutoListPreference android: title = "Solar" android: key = "weather_background_statusbar_priority_sunny_uri" typelist = "image" typevalue = "uri" />


Post has been editedvladrevers - 15.08.20, 22:36


Full version    

Help     rules

Time is now: 22/08/20, 00:20