[Android Software/Hacking General [Developers Only]] Sahaab:
​

In This Guide I Will Show You How to Make A New Activity Like For example :

- Credits

- About Rom

And Etc.

Requirements:

Any Tool that can Decompile & Recompile with it's requirements

Notepad++ (Will Be Much Easier To Use This)

I have tested this guide on my Xperia Arc S, But I am pretty sure it should work for most devices ;)

I Will Be Using Credits In About Phone As An Example:

First Of All You Should Know How To Decompile Settings.apk ( This Guide May Prove HelpFul : How to Decompile/Recompile Apk with Apk Multitool + Decompile/Recompile Jar Files )

First Of All Extract And Decompile Your Settings.apk

_

Now Navigate To /res/xml/ And Open ( Only Need To Do 1 Of The Below )

- device_info_settings.xml (If You Want It In The About_Phone Section)

Now Go To The End And Add (Or Whereever You Want It To Be)

<PreferenceScreen android:title="@string/device_credit" android:key="credits_info" android:summary="@string/device_credit_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.deviceinfo.Credits" />
</PreferenceScreen>

OR

- settings_headers.xml ( If You Want To Add To The Main Menu )

Now Go To The End And Add (Or Whereever You Want It To Be)

<header android:icon="@drawable/ic_settings_credits" android:id="@id/credits_settings" android:title="@string/device_credit">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.deviceinfo.Credits" />
</header>

and add this to /res/values/ids.xml

<item type="id" name="credits_settings">false</item>

Also Make Sure To Add A Icon Named "ic_setting_credits" in the drawable folder

_

Now Navigate To /res/values

And Open Strings.xml

Then Add This At The End

<string name="credits_activity_title">Credits</string>
<string name="device_credit">Credits</string>
<string name="device_credit_summary"></string>
<string name="credit_dev_header">Developed By:</string>
<string name="credit_dev_name">"Name Here"</string>
<string name="credit_header">Thanks To:</string>
<string name="credit_name">"-Name Here \n
-Name Here \n
-Name Here \n
-Name Here \n
-Name Here \n
-Name Here"</string>

Note :

\n Is used to add a new line

_

Now Download The File From The Attachment And Paste The Files Into Your Decompiled Directory

_

Now Edit AndroidManifest.xml

And Add This To The End

<activity android:label="@string/credits_activity_title" android:name=".deviceinfo.Credits">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

_

Now Recompile The Apk And Then Decompile it Again

_

In The Directory You Just Decompiled The Apk Navigate To /res/values/

And Open Public.xml

Search For : device_info_credits

And Copy The ID Beside What You Just Searched

Then Navigate To /smali/com/android/settings/deviceinfo/

And Open Credits.smali

And Find This Code

.line 20
const v0, [U]0x7f050039[/U]

Change the UnderLined Part To The ID You Just Copied From Public.xml

_

Now You May Recompile Your Settings.apk

Please Remember To Sign The APK

*ScreenShots Are Available Within The Hidden Contents*