This tutorial is not the conventional type but more like a one way discussion for those familiar with decompiling/recompiling and the basic file structure of JARs and APKs.
So recently I have decided to take steps to minimize the effort involved in setting up new mods. Call me lazy, but it just seemed to make sense. Let me explain what I mean by that. The way I like to think about creating mods is that you have three pieces of the pie.
XML Settings
This is where you set up your toggles and/or list preferences as well as your strings and other attributes needed within your XML files. Located in SecSettings.apk
Smali Settings
This is the code behind the XML that allows the toggles to function. This code determines the true/false of toggles(Bools) as well as the values given to selections when there are more then two options (List preferences). Located in SecSettings.apk
Logic Code
This is the code that checks for preset values (set by your smali settings code) and performs actions based on those preset settings. The logic code is found in what ever smali you happen to be manipulating. If you wanted to change battery options, you would be working in BatteryController.smali, clock options would be clock.smali, etc.
So my goal was to eliminate 2 out of three of those steps by creating my own custom settings tab where I could develop my own XML code as well as my own smali code that would never be changed by android updates. The only time this code would change is when I change it. So now all you need to do is deal with the third piece of the pie, piece one and two are controlled now by you!
So here are the steps to setting up a custom tab within Androids settings menu.
It took some work to get here, but now you have secured your code on the SecSettings side and you wont have to worry about updates changing it!
Now its time to code the smali and get the new tab functional...........
So recently I have decided to take steps to minimize the effort involved in setting up new mods. Call me lazy, but it just seemed to make sense. Let me explain what I mean by that. The way I like to think about creating mods is that you have three pieces of the pie.
XML Settings
This is where you set up your toggles and/or list preferences as well as your strings and other attributes needed within your XML files. Located in SecSettings.apk
Smali Settings
This is the code behind the XML that allows the toggles to function. This code determines the true/false of toggles(Bools) as well as the values given to selections when there are more then two options (List preferences). Located in SecSettings.apk
Logic Code
This is the code that checks for preset values (set by your smali settings code) and performs actions based on those preset settings. The logic code is found in what ever smali you happen to be manipulating. If you wanted to change battery options, you would be working in BatteryController.smali, clock options would be clock.smali, etc.
So my goal was to eliminate 2 out of three of those steps by creating my own custom settings tab where I could develop my own XML code as well as my own smali code that would never be changed by android updates. The only time this code would change is when I change it. So now all you need to do is deal with the third piece of the pie, piece one and two are controlled now by you!
So here are the steps to setting up a custom tab within Androids settings menu.
It took some work to get here, but now you have secured your code on the SecSettings side and you wont have to worry about updates changing it!
Now its time to code the smali and get the new tab functional...........