[Android Software/Hacking General [Developers Only]] arpan.asr:
Hello Droiders!! The is a Tutorial About How To Add Lollipop Like Changeable Owner Icon In Statusbar Expand for ICS/JB/KK

Disclaimer:I or XDA Developers will not be responsible for any damage of your Device.A Backup is highly recomanded.

:::NOTE:::

- You Signature vefification must be disabled.you can disable it by using `Lucky Patcher` or editing your `services.jar`.

- You need to be "very patient" and have a lot of time as this is a time consuming tutorial.

- I won't explain how to do things like pushing the apps, setting the permission, or how to get a value in public.xml and use that to change something in a certain smali.

You can Try the LProfile_demo.apk from the attachment.

Things You Will Needed:

1) SystemUI.apk

2) Notepad++ or any other text editor.

3) Apktool/Any Other tool to deconlmpile apk.

4) Brain.jar Patient.apk :p

STEP 1:

• Decompile your Systemui.apk

• Download the LProfile_x.x.x.zip from the attachment,extract it and merge it into your decompiled systemui.

• Open statusbar_expand_header.xml in /res/layout and compare with this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="60.0dip" android:baselineAligned="false" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<RelativeLayout android:orientation="vertical" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true">
<com.android.systemui.statusbar.policy.CustomClock android:textSize="16.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/custom_clock" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<com.android.systemui.statusbar.policy.DateView android:textSize="14.0dip" android:textColor="#b2ffffff" android:id="@id/date" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/custom_clock"/>
<com.bloody.badboy.DateView android:textSize="14.0sp" android:textStyle="normal" android:textColor="#b2ffffff" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/custom_clock"/>
</RelativeLayout>
<LinearLayout android:gravity="right|center" android:orientation="horizontal" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0" android:layout_alignParentRight="true">
</LinearLayout>
[COLOR="Red"] <LinearLayout android:layout_width="27.0dip" android:layout_height="27.0dip" android:layout_marginRight="16.0dip">
<com.android.systemui.bloody.badboy.LProfilePicture android:id="@+id/image" android:background="@drawable/default_user_small" android:layout_width="27.0dip" android:layout_height="27.0dip" android:scaleType="centerCrop" android:onClick="LProfile" android:contentDescription="@null"/>
</LinearLayout>[/COLOR]
</LinearLayout>

• Open AndroidManifest.xml

add this at the bottom before </application>

<activity android:theme="@style/Theme.LProfile" android:name="com.android.systemui.bloody.badboy.LProfile">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

AndroidManifest.xml for compare

<?xml version="1.0" encoding="utf-8"?>
<manifest android:sharedUserId="android.uid.system" android:process="system" android:versionCode="19" android:versionName="4.4.4-bloody.badboy.creation" coreApp="true" package="com.android.systemui" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.STATUS_BAR_SERVICE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.MANAGE_USB"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<application android:label="@string/app_label" android:icon="@drawable/ic_launcher_settings" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false" android:hardwareAccelerated="true">
<service android:name="SystemUIService" android:exported="true"/>
<service android:name=".screenshot.TakeScreenshotService" android:exported="false" android:process=":screenshot"/>
<service android:name=".LoadAverageService" android:exported="true"/>
<service android:name=".ImageWallpaper" android:permission="android.permission.BIND_WALLPAPER" android:exported="true"/>
<receiver android:name=".BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<activity android:label="@*android:string/usb_storage_activity_title" android:name=".usb.UsbStorageActivity" android:excludeFromRecents="true"/>
<activity android:theme="@*android:style/Theme.Dialog.Alert" android:name="com.android.internal.app.ExternalMediaFormatActivity" android:excludeFromRecents="true"/>
<activity android:theme="@*android:style/Theme.Holo.Dialog.Alert" android:name=".usb.UsbConfirmActivity" android:permission="android.permission.MANAGE_USB" android:exported="true" android:excludeFromRecents="true" android:finishOnCloseSystemDialogs="true"/>
<activity android:theme="@*android:style/Theme.Holo.Dialog.Alert" android:name=".usb.UsbPermissionActivity" android:permission="android.permission.MANAGE_USB" android:exported="true" android:excludeFromRecents="true" android:finishOnCloseSystemDialogs="true"/>
<activity android:theme="@*android:style/Theme.Holo.Dialog.Alert" android:name=".usb.UsbResolverActivity" android:permission="android.permission.MANAGE_USB" android:exported="true" android:excludeFromRecents="true" android:finishOnCloseSystemDialogs="true"/>
<activity android:theme="@*android:style/Theme.Holo.Dialog.Alert" android:name=".usb.UsbAccessoryUriActivity" android:permission="android.permission.MANAGE_USB" android:exported="true" android:excludeFromRecents="true" android:finishOnCloseSystemDialogs="true"/>
<activity android:theme="@*android:style/Theme.Holo.Panel" android:name=".net.NetworkOverLimitActivity" android:permission="android.permission.MANAGE_NETWORK_POLICY" android:exported="true" android:taskAffinity="com.android.systemui.net" android:excludeFromRecents="true" android:launchMode="singleTop" android:finishOnCloseSystemDialogs="true"/>
<activity android:theme="@*android:style/Theme.Black.NoTitleBar.Fullscreen" android:label="Nyandroid" android:icon="@drawable/nyandroid04" android:name=".Nyandroid" android:exported="true" android:excludeFromRecents="true" android:launchMode="singleInstance" android:hardwareAccelerated="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<receiver android:name=".statusbar.ConnectedReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>
[COLOR="Red"] <activity android:theme="@style/Theme.LProfile" android:name="com.android.systemui.bloody.badboy.LProfile">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>[/COLOR]
</application>
</manifest>

• Open Styles.xml in /res/values and add this at the bottom before </resources>

<style name="Theme.LProfile" parent="@*android:style/Theme.Holo.Light.Dialog">
<item name="android:windowBackground">@*android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
</style>

• Open SystemUIService.smali in /smali/com/android/systemui and find the method:

# virtual methods

And add this below the method:

.method public LProfile(Landroid/view/View;)V
.locals 3
.parameter "v"

.prologue
.line 2431
new-instance v0, Landroid/content/Intent;

invoke-direct {v0}, Landroid/content/Intent;-><init>()V

.line 2432
const-string v1, "com.android.systemui"

const-string v2, "com.android.systemui.bloody.badboy.LProfile"

invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

const/high16 v2, 0x1000

invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

move-result-object v0

.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

const-string v1, "statusbar"

invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Landroid/app/StatusBarManager;

invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V

.line 1720
return-void
.end method

• Now recompile your SystemUI.apk and Sign it.Then Recompile it again.

STEP 2:

• Open LProfile.smali in /smali/bloody/badboy/here

•Search-

0x7f03003e

And replace with the value of

<public type="layout" name="lprofile_picture" from your public.xml

• Do the same for

• 0x7f0f00de <--- replace with <public type="id" name="photo_picker"

• 0x7f0f00df <--- replace with <public type="id" name="image_profile"

•0x7f020236 <--- replace with <public type="drawable" name="default_user"

• Open LProfilePicture$1.smali in smali/bloody/badboy

•0x7f020236 <--- replace with <public type="drawable" name="default_user"

• Open LProfilePicture.smali in smali/bloody/badboy

•0x7f020236<--- replace with <public type="drawable" name="default_user"

•0x7f0f0003 <--- replace with <public type="id" name="image"

• Now recompile your systemui.apk sign and push it into system/app/ and reboot.

If You Like it then Hit My Thanks Button.It will not cost but it will motivate me. :good: :good: