[Android Themes] nightwalker:
This is my first guide which I implemented with the help of b16h22 and carldeancatabay

​

Modding Settings.apk​

Step 1

Get these files from the extracted zip

res/layout/profile_info.xml
res/drawable/done.xml
res/drawable/pick_profile_picture.xml
res/drawable-ldpi/done_normal.png
res/drawable-ldpi/done_pressed.png
res/drawable-ldpi/ic_qs_default_user.png
res/drawable-ldpi/ic_settings_owner.png
res/drawable-ldpi/pick_profile_normal.png
res/drawable-ldpi/pick_profile_pressed.png
res/layout/nightwalkerisawesome.xml
res/layout/profile_info.xml

Decompile settings.apk and put the above files in respective folders​

Step 2

Get these smali files from the extracted zip and place it in the smali/ folder of decompiled apk

smali/com/b16h22/Profile.smali
smali/com/b16h22/Profile$1.smali
smali/com/b16h22/Profile$2.smali
smali.com/b16h22/about/ProfilePicture.smali
smali/com/b16h22/about/ProfilePicture$1.smali
smali/com/b16h22/about/ProfilePicture$2.smali
smali/com/b16h22/about/ProfileName.smali
smali/com/b16h22/about/ProfileName$1.smali

​

Step 3

Now open the ids.xml and add these ids in it

<item type="id" name="image">false</item>
<item type="id" name="owner">false</item>
<item type="id" name="linear_layout">false</item>
<item type="id" name="profile_pic">false</item>
<item type="id" name="layout1">false</item>
<item type="id" name="change_picture_text">false</item>
<item type="id" name="photo_picker">false</item>
<item type="id" name="linear_layout1">false</item>
<item type="id" name="layout2">false</item>
<item type="id" name="name_field">false</item>
<item type="id" name="name_edit">false</item>
<item type="id" name="profile">false</item>
<item type="id" name="profile_name">false</item>

​

Step 4

Open strings.xml and add these strings

<string name="change_pic">Change profile picture</string>
<string name="profile_pic">SET PROFILE PICTURE</string>
<string name="profile_name">CHANGE PROFILE NAME</string>

​

Step 5

Now recompile the apk and decompile it again. Now open the public.xml and find these ids.These may not be the same in your apk. It may differ so change them accordingly.

<public type="layout" name="profile_info" id="[COLOR="Sienna"]0x7f03005a[/COLOR]" />
<public type="drawable" name="ic_qs_default_user" id="[COLOR="DarkOliveGreen"]0x7f0200b2[/COLOR]" />
<public type="id" name="image" id="[COLOR="Red"]0x7f0b011b[/COLOR]" />
<public type="id" name="owner" id="[COLOR="Magenta"]0x7f0b011c[/COLOR]" />
<public type="id" name="photo_picker" id="[COLOR="Purple"]0x7f0b0121[/COLOR]" />
<public type="id" name="name_field" id="[COLOR="DarkOrange"]0x7f0b0124[/COLOR]" />
<public type="id" name="name_edit" id="[COLOR="Navy"]0x7f0b0125[/COLOR]" />
<public type="id" name="profile" id="[COLOR="Yellow"]0x7f09003a[/COLOR]" />
<public type="id" name="profile_name" id="[COLOR="Lime"]0x7f09003b[/COLOR]" />
<public type="drawable" name="ic_qs_default_user" id="[COLOR="DarkOrchid"]0x7f02012e[/COLOR]" />

​

Step 6

Open Public.xml and change them with your Ids.

Now open smali/com/b16h22/Profile.smali and find the method

.method protected onCreate(Landroid/os/Bundle;)V

And replace the ids in it with the ones from public.xml

.method protected onCreate(Landroid/os/Bundle;)V
.locals 4
.parameter "savedInstanceState"

.prologue
.line 27
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

.line 28
const v2, 0x7f03005a [B]# profile_info[/B]

invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->setContentView(I)V

.line 30
const v2, 0x7f0b0121 [B]#photo_picker[/B]

invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/widget/ImageView;

.line 31
.local v0, photo:Landroid/widget/ImageView;
const v2, 0x7f0b011c [B]# owner[/B]

invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;

move-result-object v2

check-cast v2, Landroid/widget/TextView;

iput-object v2, p0, Lcom/b16h22/Profile;->owner:Landroid/widget/TextView;

.line 32
const v2, 0x7f0b0124 [B]# name_field[/B]

invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;

move-result-object v2

check-cast v2, Landroid/widget/EditText;

iput-object v2, p0, Lcom/b16h22/Profile;->name:Landroid/widget/EditText;

.line 33
const v2, 0x7f0b0125 [B]# name_edit[/B]

invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;

move-result-object v2

check-cast v2, Landroid/widget/ImageView;

iput-object v2, p0, Lcom/b16h22/Profile;->done:Landroid/widget/ImageView;

.line 34
const v2, 0x7f0b011b [B]# image[/B]

invoke-virtual {p0, v2}, Lcom/b16h22/Profile;->findViewById(I)Landroid/view/View;

move-result-object v2

check-cast v2, Landroid/widget/ImageView;

iput-object v2, p0, Lcom/b16h22/Profile;->imageView:Landroid/widget/ImageView;

.line 37
const-string v2, "EvoPrefsFile"

const/4 v3, 0x0

invoke-virtual {p0, v2, v3}, Lcom/b16h22/Profile;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

move-result-object v1

.line 38
.local v1, sharedPreferences:Landroid/content/SharedPreferences;
const-string v2, "profileName"

const-string v3, "null"

invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

move-result-object v2

iput-object v2, p0, Lcom/b16h22/Profile;->profName:Ljava/lang/String;

.line 39
iget-object v2, p0, Lcom/b16h22/Profile;->profName:Ljava/lang/String;

const-string v3, "null"

if-ne v2, v3, :cond_0

.line 40
iget-object v2, p0, Lcom/b16h22/Profile;->owner:Landroid/widget/TextView;

const-string v3, "Owner"

invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

.line 46
:goto_0
const-string v2, "profilePic"

const-string v3, "null"

invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

move-result-object v2

iput-object v2, p0, Lcom/b16h22/Profile;->imageUri:Ljava/lang/String;

.line 47
iget-object v2, p0, Lcom/b16h22/Profile;->imageUri:Ljava/lang/String;

const-string v3, "null"

if-ne v2, v3, :cond_1

.line 48
iget-object v2, p0, Lcom/b16h22/Profile;->imageView:Landroid/widget/ImageView;

const v3, 0x7f0200b2 [B]#ic_qs_default_user[/B]

invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

.line 53
:goto_1
new-instance v2, Lcom/b16h22/Profile$1;

invoke-direct {v2, p0}, Lcom/b16h22/Profile$1;-><init>(Lcom/b16h22/Profile;)V

invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

.line 64
iget-object v2, p0, Lcom/b16h22/Profile;->done:Landroid/widget/ImageView;

new-instance v3, Lcom/b16h22/Profile$2;

invoke-direct {v3, p0}, Lcom/b16h22/Profile$2;-><init>(Lcom/b16h22/Profile;)V

invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

.line 80
return-void

.line 42
:cond_0
iget-object v2, p0, Lcom/b16h22/Profile;->owner:Landroid/widget/TextView;

iget-object v3, p0, Lcom/b16h22/Profile;->profName:Ljava/lang/String;

invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

.line 43
iget-object v2, p0, Lcom/b16h22/Profile;->name:Landroid/widget/EditText;

iget-object v3, p0, Lcom/b16h22/Profile;->profName:Ljava/lang/String;

invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

goto :goto_0

.line 50
:cond_1
iget-object v2, p0, Lcom/b16h22/Profile;->imageView:Landroid/widget/ImageView;

iget-object v3, p0, Lcom/b16h22/Profile;->imageUri:Ljava/lang/String;

invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

move-result-object v3

invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageURI(Landroid/net/Uri;)V

goto :goto_1
.end method

Open smali/com/b16h22/statusbar/ProfilePicture.smali and find this

.line 21
const v4, [B]0x7f09003a[/B]

replace the id with the id of "profile"

find

const v5, [B]0x7f02012e[/B]

replace it with the id of drawable "ic_qs_default_user"

Open smali/com/b16h22/statusbar/ProfilePicture$1.smali

Find

.line 19
const v2, [B]0x7f09003b[/B]

replace it with the id of "profile_name".​

Step 7

Now open the res/xml/settings.xml[2.3.x] or settings_header.xml[4.x.y.]

and add this iconpreferencescreen.You can add it anywhere you want.I'm assuming you have basic knowledge about preference xmls.

For 2.3.x

<com.android.settings.IconPreferenceScreen android:title="Owner Profile" settings:icon="@drawable/ic_settings_owner">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.b16h22.Profile" />
</com.android.settings.IconPreferenceScreen>

OR

For 4.x.y

<header android:icon="@drawable/ic_owner_settings" android:title="Owner Profile">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.b16h22.Profile" />
</header>

​

Step 8

Add this in your device_info_settings.xml

<PreferenceCategory android:title=" INFO " />
<Preference android:focusable="false" android:clickable="true" android:fragment=[COLOR="Red"]Add your App Package[/COLOR] android:layout="@layout/nightwalkerisawesome" />

​

Step 9

Add this activity in your androidmanifest.xml

<activity android:label="@string/change_pic" android:name="com.b16h22.Profile">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

​

Step 10

All Done.Now Recompile and push it to system.You have to resign the apk and other system apks or disable signature verification​

.

Files Download :-UPDATED_RESOURCES​

Credits

b16h22[Took everything and many things from his guide also]

iamareebjamal[just got an idea for adding lines in device_info_settings.xml]

carldeancatabay[Got this idea from his Rom.]

khan_frd2002[He is the person who helped me when I didn't knew how to decompile also.]

Super-droid BOND[He helped me a lot.]

​