Maybe this guide is too many right here, but i'm coming with a new innovasion with an alert dialog or pop up window. this guide for example like adding rom control on the settings. I am sure it should work for most devices running 2.3.x until 4.x.x
so, lets begin
Requirements:
1. Tools to compile-decompile
2. Notepad ++
3. Attach file
How to:
1. decompile your settings.apk
2. open res/xml/settings_headers.xml. now go to the end and add this code below (or whereever you want it to be)
3. open values/ids.xml and add this code
4. make sure to add a icon named "ic_setting_advanced" in the drawable folder
5. then, open res/values/strings.xml, add this code
6. next, you need to make new xml. example: named it to rom_settings.xml
inside rom_control.xml, paste this code
7. save as and then save to res/xml/here
8. now, recompile the apk and then decompile it again
9. open res/values/public.xml. search:
10. open com/android/settings/octo/MainActivity.smali
11. find this code 0x7f06005e and replace with your code from <public type="xml" name="rom_settings"
12. find this code 0x7f090be4 and replace with your code from <public type="string" name="alert"
13. find this code 0x7f090be5 and replace with your code from <public type="string" name="alert_summary"
14. save. recompile your settings then push/flash it
Screenshot on attach
so, lets begin
Requirements:
1. Tools to compile-decompile
2. Notepad ++
3. Attach file
How to:
1. decompile your settings.apk
2. open res/xml/settings_headers.xml. now go to the end and add this code below (or whereever you want it to be)
Code:
<header android:icon="@drawable/ic_settings_advanced" android:id="@id/custom_settings" android:title="@string/rom_settings" android:fragment="com.android.settings.octo.MainActivity" />
Code:
<item type="id" name="rom_settings">false</item>
5. then, open res/values/strings.xml, add this code
Code:
<string name="rom_settings">Rom control</string>
<string name="alert">Alert header title</string>
<string name="alert_summary">"alert header summary"</string>
inside rom_control.xml, paste this code
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/rom_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceScreen android:title="@string/testing_phone_info">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.RadioInfo" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/testing_battery_info">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.BatteryInfo" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/testing_usage_stats">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.UsageStats" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/testing_wifi_info">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.wifi.WifiInfo" />
</PreferenceScreen>
</PreferenceScreen>
8. now, recompile the apk and then decompile it again
9. open res/values/public.xml. search:
Code:
<public type="string" name="alert" id="0x7fxxxxxx" />
<public type="string" name="alert_summary" id="0x7fxxxxxx" />
<public type="xml" name="rom_settings" id="0x7fxxxxxx" />
11. find this code 0x7f06005e and replace with your code from <public type="xml" name="rom_settings"
12. find this code 0x7f090be4 and replace with your code from <public type="string" name="alert"
13. find this code 0x7f090be5 and replace with your code from <public type="string" name="alert_summary"
14. save. recompile your settings then push/flash it
Screenshot on attach