In this guide , I will tell "How to add About ROM" option in Settings. :)
Tested this option on Android 4.2 and 4.4
Tested this option on Android 4.2 and 4.4
REQUIREMENTS :
1. Brain
2. Apktool
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
1. Decompile your Settings.apk and merge the file (given below).
2. Now add these lines in "device_info_settings.xml" or any other xml present in Settings.apk/res/xml.
PHP Code:
<PreferenceCategory android:layout="@layout/rom_logo" android:title="" />
<PreferenceScreen android:title="@string/about_rom" android:key="container" android:summary="@string/about_rom_summary">
<Preference android:title="@string/rom_name" android:summary="@string/rom_name_summary" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_developer" android:summary="@string/rom_developer_summary" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_version" android:summary="@string/rom_version_summary" style="?android:preferenceInformationStyle" />
<PreferenceScreen android:title="@string/rom_thanks" android:key="rom_thanks" android:summary="@string/rom_thanks_summary" android:fragment="com.android.settings.gurpreet.ContributorsCloud" />
<Preference android:title="@string/mywebsite" android:key="website" android:summary="@string/website">
<intent android:action="android.intent.action.VIEW" android:data="http://anythingultimate.blogspot.in/2014/01/i-am-writingthis-blogso-that-users-of.html" />
</Preference>
<PreferenceScreen android:title="@string/changelog_title" android:key="changelog">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.gurpreet.changelog.ChangeLog" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/additional_info" android:key="container" android:summary="@string/additional_info_summary">
<Preference android:title="@string/info" android:summary="@string/info_summary" style="?android:preferenceInformationStyle" />
</PreferenceScreen>
</PreferenceScreen>
PHP Code:
<intent android:action="android.intent.action.VIEW" android:data="http://anythingultimate.blogspot.in/2014/01/i-am-writingthis-blogso-that-users-of.html" />
3. Now open "strings.xml" and add these lines above </resources>.
PHP Code:
<string name="about_rom">About ROM</string>
<string name="about_rom_summary">This contains all information about the ROM</string>
<string name="rom_name">ROM Name</string>
<string name="rom_name_summary">ZINGERONE</string>
<string name="rom_developer">ROM Developer</string>
<string name="rom_developer_summary">Gurpreet Singh</string>
<string name="rom_version">ROM Version</string>
<string name="rom_version_summary">1.0</string>
<string name="rom_thanks">Special Thanks To</string>
<string name="rom_thanks_summary">Touch here to see the names</string>
<string name="mywebsite">Website</string>
<string name="website">Touch here to go to my website</string>
<string name="about_gen">General Information</string>
<string name="changelog_title">Changelogs</string>
<string name="changelog_dialog">ZINGERONE CHANGELOGS</string>
<string name="changelog_loading">Download the list of changes...</string>
<string name="changelog_error">Error loading list of changes</string>
<string name="additional_info">Additional Information</string>
<string name="additional_info_summary">Some additional information about ROM</string>
<string name="info">Guide By Gurpreet Singh</string>
<string name="info_summary">Enjoy guys. Keep helping each other</string>
4. Now open the "AndroidManifest.xml" and add this activity.
PHP Code:
<activity android:label="@string/changelog_title" android:name=".gurpreet.changelog.ChangeLog" android:theme="@android:style/Theme.Holo.Light.Dialog.Alert">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
5. Now Recompile your Settings.apk & Sign it and then again Decompile it.
6. Now go to smali/com/android/settings/gurpreet/changelog and open the "ChangeLog$1.smali". Then replace the id with the id present in public.xml of your Settings.apk
0x7f0c09fb
PHP Code:
<public type="string" name="changelog_dialog"
7. Now go to smali/com/android/settings/gurpreet/changelog and open the "ChangeLog.smali". Now again replace the ids with the ids present in public.xml of your Settings.apk.
0x7f0c09fd
PHP Code:
<public type="string" name="changelog_error"
PHP Code:
<public type="string" name="changelog_loading"
Important Information :
The contributors image is in Settings/assets folder. Change it according to your choice. You can change the background colour from gray to any by editing this "-0xbbbbbc" in ContributorsCloud.smali.
The changelog list is in the ROM/system/etc. You can change it according to you. Don't forget to change the permission of "rom-changelogs.txt" to rw-r--r--
You can change the ROM Logo by editing the "logo_rom.png" in Settings/drawable
Special Thanks To :
1. Cyanogenmod
2. XDA
3. GK-Lollipop ROM
4. Sumeet Darade
5. MAAaD