[GUIDE][MOD][GB]Settings Shortcut in StatusBar [New method] 25/02/2013 - Galaxy Y GT-S5360 Themes and Apps

Well,this new method is much much easier than the old method.Minimal smali editing is involved.So even newbies can follow it.
Click to expand...
Click to collapse
You are going to need
1.SystemUI.apk
2.Apk manager,virtuos ten studio or any apk compiling/decompiling tool
3.Notepad++
4.Patience and some time.
Click to expand...
Click to collapse
STEP 1Decompile your SystemUI.apk and go to status_bar_expanded.xml.Open the file and look for this (stock systemUI).
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
paste this code below that
Code:
<ImageView android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings"[COLOR="Red"] android:onClick="settingsButton"[/COLOR] />
Now save the file.
Code:
[COLOR="Red"] android:onClick="settingsButton"[/COLOR]
is an xml attribute used to call a method when pressing something.Now the settingsButton is the name of the method.
Note;It doesnt matter where you put the code for settings button in statusbar expanded.The above steps are for sgy users.You can put that code anywhere you want.But think logical and use common sense.
STEP 2 Now we can add the method settingsButton to StatusBarService.smali.Open the file and look for the code
Code:
# virtual methods
Paste this method below
Code:
.method public settingsButton(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 1717
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
new-instance v1, Landroid/content/Intent;
const-string v2, "android.settings.SETTINGS"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/StatusBarService;->animateCollapse()V
.line 1720
return-void
.end method
Now save the file.
android.settings.SETTINGS is the intent for calling settings app activity.You can change the intent to call diffrent activities.For example
android.settings.WIRELESS_SETTINGS -wireless and network settings
android.settings.WIFI_SETTINGS -Wifi settings
android.intent.action.POWER_USAGE_SUMMARY -Battery usage summary
Click to expand...
Click to collapse
STEP 3Now download and extract this Settings_shortcut_drawables.zip.Put the ic_notify_quicksettings.xml inside your drawable folder and the the other two pngs inside drawable-ldpi folder.
STEP 4Now compile and push.
Before asking doubts think twice always.If there is any error in the codes,do let me know.Happy to help.​
Click to expand...
Click to collapse
Old method
Actually this mod is not made by me.I've just ported it and found the way to implement this in other roms.I've studied the SystemUI.apk from the theme by C.O.D.<D.J> for creed's rom.So all credit goes to him
EDIT:There is a small correction in the code
Code:
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/StatusBarService$8;-><init>(Lcom/android/systemui/statusbar/StatusBarService;)V
.I've forgot to add <init> after 'StatusBarService$8;->' in the guide.Thanks to 'chevanlol360' for pointing out this error.
Click to expand...
Click to collapse
It's easy if you follow every step correctly
STEP 1: Decompile the SystemUI.apk.There are several threads around xda to show you how to decompile an apk.Navigate to res/layout/ and find status_bar_expanded.xml.Find the following code in the file
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
Paste this code just below it
Code:
<ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:paddingLeft="0.0dip" android:paddingTop="0.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
Now save and close the file.
STEP 2.Open res/values/strings.xml.And add this line at the end
Code:
<string name="accessibility_settings_button">System settings.</string>
Save and close the file
STEP 3.Open res/values/ids.xml and paste this code at the end
Code:
<item type="id" name="settings_button">false</item>
Save and close the file.
STEP 4.Now extract the files from the attached zip.Take "ic_notify_quicksettings.xml' and put it in res/drawable/.Take 'ic_settings_normal.png' and 'ic_settings_pressed.png' and put it in res/drawable-ldpi/.
Now recompile the apk and push it to system/app to make sure the settings button is there and everything look right.Now decompile that systemUI.apk again.Navigate to res/values/ .We need to find an id from public.xml
STEP 5.Now open public.xml and find this line
Code:
<public type="id" name="settings_button" id="[COLOR="Red"]0x7f090027[/COLOR]" />
Remember the id highlighted in red above.We need to use it.
STEP 6.Open StatusBarService.smali and find this line of code
Code:
.field mScrollView:Landroid/widget/ScrollView;
Paste this code below it
Code:
.field mSettingsBut:Landroid/view/View;
.field private mSettingsButListener:Landroid/view/View$OnClickListener;
Now find this code
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStopTracing:Ljava/lang/Runnable;
Paste this code below
Code:
.line 1703
new-instance v0, Lcom/android/systemui/statusbar/StatusBarService$8;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/StatusBarService$8;-><init>(Lcom/android/systemui/statusbar/StatusBarService;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View$OnClickListener;
return-void
Now again find this code
Code:
iput v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I
And paste this code below
Code:
.line 333
const v7, [COLOR="Red"]0x7f090027[/COLOR]
invoke-virtual {v1, v7}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v7
iput-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
.line 334
iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View$OnClickListener;
invoke-virtual {v7, v8}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
The id highlighted in red must be the same as the id from public.xml.So make sure it's the same.Now save and close the file.
STEP 7.Take 'StatusBarService$8.smali' from the attached zip an put it in com/android/systemui/statusbar/.
STEP 8.Now recompile the apk and push it to system/app/ and put the permission rw--r--r--.
If you want to get the feel of it in your stock statusbar i've made one for you just in case. Download it from here:
DOWNLOAD
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Flash it through recovery.If you are running an odexed rom,delete SystemUI.odex from system/app before you flash the zip.​

Awesome tutorial....
Will impliment this in my upcoming custom rom....lol

great tutorial, but stuck on first step as i cant find those lines in my statusbarexpanded.xml , btw i have a galaxy gio but here is my systemui, can you take a look? :good:

alkspo said:
great tutorial, but stuck on first step as i cant find those lines in my statusbarexpanded.xml , btw i have a galaxy gio but here is my systemui, can you take a look? :good:
Click to expand...
Click to collapse
I'll look into it.I'm not near my pc.Actually step 1 puts the settings left to carrier text.You can add that code before the code for clear button.
sent while doin' some burnouts

alright, will tr, thanks

How to move 15toogle to down settings button
alkspo said:
great tutorial, but stuck on first step as i cant find those lines in my statusbarexpanded.xml , btw i have a galaxy gio but here is my systemui, can you take a look? :good:
Click to expand...
Click to collapse
if the Statusbar have this code :
Code:
.line 338
.local v4, qsv:Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
const-string v8, "ro.csc.sales_code"
invoke-static {v8}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 339
.local v1, code:Ljava/lang/String;
const-string v8, "XEC"
invoke-virtual {v8, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_1
you can delete it ,
If the statusbar have this :
Code:
.line 340
const v8, 0x7f030003
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v4
.end local v4 #qsv:Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
check-cast v4, Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
.line 348
.restart local v4 #qsv:Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
:goto_0
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
invoke-virtual {v8, v4, v13}, Lcom/android/systemui/statusbar/ExpandedView;->addView(Landroid/view/View;I)V
and delete this :
Code:
.line 344
:cond_1
const v8, 0x3030003
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v4
check-cast v4, Lcom/lidroid/systemui/quickpanel/PowerWidget;
.local v4, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v4}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
goto :goto_0
you can change into :
so the line like as :
Code:
.line 337
const/4 v4, 0x0
.line 344
const v8, 0x3030003
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v4
check-cast v4, Lcom/lidroid/systemui/quickpanel/PowerWidget;
.line 348
.local v4, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
const/4 v9, 0x1
invoke-virtual {v4}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
invoke-virtual {v8, v4, v9}, Lcom/android/systemui/statusbar/ExpandedView;->addView(Landroid/view/View;I)V
.line 352
new-instance v8, Landroid/widget/LinearLayout;
invoke-direct {v8, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V
iput-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mMiniCon:Landroid/widget/LinearLayout;
.line 353
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mMiniCon:Landroid/widget/LinearLayout;
const/4 v9, 0x1
invoke-virtual {v8, v9}, Landroid/widget/LinearLayout;->setOrientation(I)V
.line 354
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;
invoke-virtual {v8, v12}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/widget/LinearLayout;
iget-object v9, p0, Lcom/android/systemui/statusbar/StatusBarService;->mMiniCon:Landroid/widget/LinearLayout;
invoke-virtual {v8, v9, v13}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
.line 358
const v8, 0x7f030005
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/CallOnGoingView;
iput-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCallOnGoingView:Lcom/android/systemui/statusbar/CallOnGoingView;
.line 359
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCallOnGoingView:Lcom/android/systemui/statusbar/CallOnGoingView;
iput-object p0, v8, Lcom/android/systemui/statusbar/CallOnGoingView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
.line 361
return-void
.end method
Here you go , iam modify you systemui . view you new systemui . and Trying to Experiment xD . view my attatch
and i thinks the Guide not working on CM .
Thanks you, AWESOME Guide

Thanks for this tutorial mate! awesome as always will try this after i come back..

Boooom..! Pin! Thanks for this great tut bro... now i know.. i really mis the smalis.. haha i really hate smali...
____________________________________
Reserve for future use..
send thru postal codes supported with busybox command again

thanks for doing it for me, but my device is mdpi not hdpi, so will not work, can you make it again?

alkspo said:
thanks for doing it for me, but my device is mdpi not hdpi, so will not work, can you make it again?
Click to expand...
Click to collapse
If the resolution png (too small) with a resolution of handle you then I rename a ldpi, if png (fit) with a screen resolution of your handle then I rename a mdpi, if the png does not fit the screen resolution of your handle (too big) then I rename a hdpi .
thats trick to make png no zoom ( big or small icon ) . and make to past you screen resolution .
try my mods . push to system/app
sorry for bad english

oh i see what you mean, yes so it wont zoom in thanks, i tried it but it looks a bit messed up, can you put the date and the setting and x button under the toggles? or is that too much trouble ? o: i like have the toggle at the very top, and might fix overlap if do that thanks alot here is screenie

Thanks for the tut
Inviato dal mio GT-S5830i con Tapatalk 2

The codes in sgyd differ a little bit... failed on my first try... trying it again

hell_lock said:
The codes in sgyd differ a little bit... failed on my first try... trying it again
Click to expand...
Click to collapse
Try it in your sgy.It's easier to port if it works.
sent while doin' some burnouts

b16h22 said:
Try it in your sgy.It's easier to port if it works.
sent while doin' some burnouts
Click to expand...
Click to collapse
Yudhiez managed to make it fully working for me, but the date and settings and clear button is on top of toggles, while the one in your screenshot is below, how do i rearrange it? o:

Haha told it to samsoul16 bro he had this questions now u explain it good thanks pressed
Sent from my GT-S5360 using Xparent ICS Blue Tapatalk 2

Wow this tutorial is great. Thanks friend.
HYPOCRITES I'm gonna do it blind
HYPOCRITES your messiah was never mine!

beautiful. :good:

Galaxy Ace s5830i
Hey,I tried to add this is Galaxy Ace S5830i.
I don't have StatusBarService$7.smali,so I renamed StatusBarService$8.smali to StatusBarService$7.smali,and changed all the StatusBarService$8 lines to StatusBarService$7,the same in StatuBarService.smali,but it still not working,can you help me?

This work on stock deodex? Will try
Sent from my GT-S5360 using xda premium

Related

[GUIDE][HOW TO] Toggle to choose AOSP Lockscreen **11DEC**

For TouchWiz Jelly Bean Roms (LSJ)
This is a noob proof guide, very easy to do, and made to involve less :cond_ possible.
Is not a clean guide for developers, infact i will use existing parts of code (not used) to make the toggle.
Obviously, if u are a developer and have a little experience with smali code language and patience with cond you can figure this out easily
requirements:
-apktool use (i won t teach u how to use apktool, i assume u can use it)
-attention
this tutorial is made on 2 parts:
-create a switch to change circle lockscreen with aosp lockscreen
-create a toggle to set the aosp lockscreen when checked
ready?
PART 1
We need to decompile android.policy.jar for first.
navigate: smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali
look for .method createLockScreen()Landroid/view/View; and add the red lines
Code:
.method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 1319
[COLOR="Red"]iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "aosp_lock"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_mirko
[/COLOR]
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
[COLOR="Red"]goto :goto_ddd[/COLOR]
.line 1325
[COLOR="Red"]:cond_mirko
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
[/COLOR]
.local v0, lockView:Landroid/view/View;
[COLOR="Red"]:goto_ddd[/COLOR]
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
first part is done
recompile and push it on /system/framework
PART 2
this is the not clean part, i have not created new codes for a toggle, but i used an unused code with the form i needed (checkbox preference).
I decompiled SecSettings.apk /smali/com/android/settings/LockscreenSettings.smali
the unused code i used is "mSayCommand" one, infact has the checkbox preference form i needed as we can see
Code:
.field private mSayCommand:Landroid/preference/CheckBoxPreference;
ok let s start second part, we need to change all "mSayCommand" to "mAospLock" and change the keyword from "wake_up_lock_screen" to "aosp_lock" in order to recall the first part of the mod we made in android.policy.jar
red part is what we add, and purple what we delete.
Code:
[COLOR="Red"].field private mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
.field private mClock:Landroid/preference/CheckBoxPreference;
.field private mDualclock:Landroid/preference/SwitchPreferenceScreen;
.field private mHelpText:Landroid/preference/CheckBoxPreference;
.field private mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
.field private mInkEffect:Landroid/preference/PreferenceScreen;
.field mInkEffectSummary:[I
.field private mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
.field private mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
.field private mMotionDialog:Landroid/app/AlertDialog;
.field private mRippleEffect:Landroid/preference/CheckBoxPreference;
[COLOR="DarkOrchid"].field private mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
...
Code:
.line 319
:cond_f8
[COLOR="DarkOrchid"] iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-eqz v4, :cond_10e
.line 320
[COLOR="DarkOrchid"]iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[COLOR="DarkOrchid"]const-string v8, "wake_up_lock_screen"[/COLOR]
[COLOR="Red"]const-string v8, "aosp_lock"[/COLOR]
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_146
move v4, v5
:goto_10b
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
Code:
.line 225
const-string v9, "say_your_wakeup"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
[COLOR="DarkOrchid"] iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
.line 227
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-eqz v9, :cond_20d
.line 228
[COLOR="DarkOrchid"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
const v11, 0x7f090d6f
invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setSummary(Ljava/lang/CharSequence;)V
as u can see I left untouched keyword "say_your_wakeup", it s not a wrong writing, i left it and i will use that keyword in future steps.
Code:
.line 254
[COLOR="DarkOrchid"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-eqz v9, :cond_26d
.line 255
[COLOR="DarkOrchid"]invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
[/COLOR]
we delete this part of code to make the option visible, infact i said we re using an unused part of code, and has been hidden from preference screen.
Code:
.line 259
:cond_276
const/4 v9, 0x0
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-nez v9, :cond_287
[COLOR="DarkOrchid"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-eqz v9, :cond_296
if-eqz v7, :cond_296
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
if-nez v9, :cond_296
Code:
.line 262
:cond_296
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
if-nez v9, :cond_2af
[COLOR="DarkOrchid"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
if-nez v9, :cond_2af
if-nez v7, :cond_2af
Code:
.line 356
:cond_b3
[COLOR="DarkOrchid"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1e
.line 357
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[COLOR="DarkOrchid"]const-string v5, "wake_up_lock_screen"[/COLOR]
[COLOR="Red"]const-string v5, "aosp_lock"[/COLOR]
[COLOR="DarkOrchid"]iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/COLOR]
[COLOR="Red"]iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_ce
smali part is done, and now the toggle is set and working
last part is to edit our unused part of the code in res/xml folder, lockscreen_settings.xml
Code:
[COLOR="DarkOrchid"]<CheckBoxPreference android:title="@string/samsung_unlock_option_say_your_wakeup_command_to_unlock_screen" android:key="say_your_wakeup" android:summary="@string/wakeup_in_lockscreen_summary" />
[/COLOR]
[COLOR="Red"]<CheckBoxPreference android:title="@string/your_string" android:key="say_your_wakeup" android:summary="@string/your_summary_string" />[/COLOR]
asu can see we have again the keyword i said before "say_your_wakeup" , if u want u can change it, but change it in the smali part too if not the toggle won t work.
Now simply add the strings in /res/values/strings.xml
Code:
<string name="your_string">AOSP Lockscreen</string>
<string name="your_summary_string">Original Jelly Bean Lockscreen</string>
that s it.
easy and noob proof
and this is the result
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hey there bro A really nice tutorial, I miss you and all of XDA xD
where are you legend?
LegendK95 said:
Hey there bro A really nice tutorial, I miss you and all of XDA xD
Click to expand...
Click to collapse
Hello broooo hurry up, we have to work we have to work we have to work
malavan said:
where are you legend?
Click to expand...
Click to collapse
hello buddy, he is studying hard u.u in mid-june will be among us again
Great work mirko!
Very good stuff
Bologna said:
Great work mirko! Thanks a lot!
Click to expand...
Click to collapse
thank u mate means much for me some your congrats
Heyy,
Great tut! Thanks a lot!
I'm trying to get this to work on LP9
Button shows up correctly in settings, but I get a little compiling error of policy.jar.
The error I get is an undefined "goto_14" in line 3008.
There's 2 "goto_14" 's in LockPatternKeyguardView...
The one you pointed out and this seconde one in line 3008...
So I also changed the second one in "goto_1e" and after that the .dex compiles without errors...
Phone starts up with AOSP Lockscreen, but after that a bootloop...
Could you have a look at LP9's LockPatternKeyguardView.smali?
Here it is with the changes made to it, following exactly your tut:
http://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/LockPatternKeyguardView.smali
Thanks a lot in advance for looking into it!
Edit: Here it is zipped: http://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/LockPatternKeyguardView.zip
The Undertakerr said:
Heyy,
Great tut! Thanks a lot!
I'm trying to get this to work on LP9
Button shows up correctly in settings, but I get a little compiling error of policy.jar.
The error I get is an undefined "goto_14" in line 3008.
There's 2 "goto_14" 's in LockPatternKeyguardView...
The one you pointed out and this seconde one in line 3008...
So I also changed the second one in "goto_1e" and after that the .dex compiles without errors...
Phone starts up with AOSP Lockscreen, but after that a bootloop...
Could you have a look at LP9's LockPatternKeyguardView.smali?
Here it is with the changes made to it, following exactly your tut:
http://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/LockPatternKeyguardView.smali
Thanks a lot in advance for looking into it!
Click to expand...
Click to collapse
hello sure!
I told that mod was for LPF, probably there s some diff with LP9.
Let me watch into
PS: please upload your smali file, not a link with text
Here it is my man, and give my greetings to Doctor Maroun!
http://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/LockPatternKeyguardView.zip
The Undertakerr said:
Here it is my man, and give my greetings to Doctor Maroun!
http://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/LockPatternKeyguardView.zip
Click to expand...
Click to collapse
I m sure he will be, he s a smart guy
please the unmodified one mate I didn t explained myself good
Mirko ddd said:
I m sure he will be, he s a smart guy
please the unmodified one mate I didn t explained myself good
Click to expand...
Click to collapse
Here's the original LP9 LockPatternKeyguardView.smali :
http://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/ORIGINAL LP9 LockPatternKeyguardView.smali.zip
Thanks a lot!
The Undertakerr said:
Here's the original LP9 LockPatternKeyguardView.smali :
http://dl.dropbox.com/u/25779832/SGS2/ALLES ICS/ORIGINAL LP9 LockPatternKeyguardView.smali.zip
Thanks a lot!
Click to expand...
Click to collapse
here it is
let me know about
https://rapidshare.com/files/145593662/LockPatternKeyguardViewMirkoddd.zip
Mirko ddd said:
here it is
let me know about
https://rapidshare.com/files/145593662/LockPatternKeyguardViewMirkoddd.zip
Click to expand...
Click to collapse
You're the man!!
Will let you know within 10 minutes
EDIT:
The good news: It doesn't give bootloop anymore!!
The bad news: It stays on AOSP Lockscreen. Doesn't matter if I untick the aosp toggle or not, stays on aosp lockscreen.
Even a reboot doesn't change it...
Will try tommorow again, will start all over and make the toggle in settings. Maybe something went wrong over there....
Thanks very much for you help though, tommorow I'll report back ok?
The Undertakerr said:
You're the man!!
Will let you know within 10 minutes
Click to expand...
Click to collapse
haha no u are the man, I am the kid
The Undertakerr said:
You're the man!!
Will let you know within 10 minutes
EDIT:
The good news: It doesn't give bootloop anymore!!
The bad news: It stays on AOSP Lockscreen. Doesn't matter if I untick the aosp toggle or not, stays on aosp lockscreen.
Even a reboot doesn't change it...
Will try tommorow again, will start all over and make the toggle in settings. Maybe something went wrong over there....
Thanks very much for you help though, tommorow I'll report back ok?
Click to expand...
Click to collapse
just check if keyword match with the one assigned into Settings xml/display_settings.xml
that s the only thing that makes me think about ur prob
get ready for the how to for camera mod!
Tonight
lpd
I mirko and thanks for your work
I try with lpd rom but it doesn't work the display settins is right....but when I enable or disable aosp lockscreen there is not change in the lock
There is the zip with the changes, and here there is the zip with the original files.
Can you see if I made something wrong?
Thank you
.malo2000 said:
I mirko and thanks for your work
I try with lpd rom but it doesn't work the display settins is right....but when I enable or disable aosp lockscreen there is not change in the lock
There is the zip with the changes, and here there is the zip with the original files.
Can you see if I made something wrong?
Thank you
Click to expand...
Click to collapse
https://rapidshare.com/files/3030748809/silvia.rar
.malo2000 said:
I mirko and thanks for your work
I try with lpd rom but it doesn't work the display settins is right....but when I enable or disable aosp lockscreen there is not change in the lock
There is the zip with the changes, and here there is the zip with the original files.
Can you see if I made something wrong?
Thank you
Click to expand...
Click to collapse
Mirko, I believe you've left out a part of the patch. We are adding a brand new setting, so you need to add the code to handle when it's clicked (usually in onPreferenceTreeClick) and thus save the global setting (ultimately a call to putInt).
jeboo said:
Mirko, I believe you've left out a part of the patch. We are adding a brand new setting, so you need to add the code to handle when it's clicked (usually in onPreferenceTreeClick) and thus save the global setting (ultimately a call to putInt).
Click to expand...
Click to collapse
yay u r right jeboo, in fact i wrote that this was for LPF only, and i wanted not to make a full how to for rearrange that mod for different bases.
I have really few few few time, and i realize i can t manage a thread with several requests or specific helpings.
I read what shoman94 told in ur thread, and maybe it should be better to give to you the honor to talk about this mod, what do u think about?
Let me know asap mate

[TUTORIAL] How to add various framework mods

SKIP TRACK VIA VOL LONG PRESS
Requirements
1) android.policy.jar
2) APKTOOL
3) Notepad++
4)winrar or 7zip
5) and some patience.
1-STEP
open the android.policy.jar with winrar or 7zip archive and pull classes.dex file to ur apktool folder.
2-STEP
decompile the classes.dex using apktool
for this press shift and right mouse click to open cmd prompt..
then add the cmd in cmd prompt to decompile ..
Code:
java -jar baksmali.jar -o classout/ classes.dex
after that u will get a classout folder in apktool folder.
3-STEP
inside the classout folder navigate to com\android\internal\policy\impl\PhoneWindowManager.smali
once u open PhoneWindowManager.smali add the following lines.
Find:
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Add the RED color highlighted lines between them
Code:
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
[COLOR="Red"].field private static final LONG_PRESS_TIMEOUT:I = 0x3e8[/COLOR]
.field static final NAVIGATION_BAR_LAYER:I = 0x12
.field static final PHONE_LAYER:I = 0x3
Find:
Code:
.field mIncallPowerBehavior:I
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Add the RED color highlighted lines between them
Code:
.field mIncallPowerBehavior:I
[COLOR="red"].field mIsLongPress:Z
[/COLOR]
.field mKeyboardTapVibePattern:[J
.field mKeyguard:Landroid/view/WindowManagerPolicy$WindowState;
Find:
Code:
.field private mVolumeDownKeyTriggered:Z
.field private mVolumeUpKeyTriggered:Z
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Add the RED color highlighted lines between them
Code:
.field private mVolumeDownKeyTriggered:Z
[COLOR="red"].field private final mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
.field private mVolumeUpKeyTriggered:Z
[COLOR="red"].field private final mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
Find:
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
return-void
.end method
Add the RED color highlighted lines between them
Code:
.line 3586
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$21;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$21;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
[COLOR="red"]
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$23;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$23;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$24;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$24;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]
return-void
.end method
Find:
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
.method public hasNavigationBar()Z
.registers 2
Add the RED color highlighted lines between them
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v3}, Landroid/os/PowerManager$WakeLock;->release()V
throw v2
.end method
[COLOR="red"].method handleVolumeLongPress(I)V
.registers 6
.parameter "keycode"
.prologue
const/16 v1, 0x18
if-eq p1, v1, :cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_9
:cond_7
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_9
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method handleVolumeLongPressAbort()V
.registers 3
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR]
.method public hasNavigationBar()Z
.registers 2
Find:
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto :goto_c2
.line 2843
Add the RED color highlighted lines between them
Code:
.line 2841
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="red"]invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[/COLOR]
goto :goto_c2
.line 2843
Find:
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
goto/16 :goto_c2
.line 2879
Add the RED color highlighted lines between them
Code:
.line 2853
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPendingScreenshotChordAction()V
[COLOR="Red"] invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v12
if-eqz v12, :cond_c2
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move v12, v0
if-nez v12, :cond_c2
and-int/lit8 v12, v10, 0x1
if-nez v12, :cond_c2
const/4 v12, 0x3
move-object/from16 v0, p0
invoke-virtual {v0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V[/COLOR]
goto/16 :goto_c2
.line 2879
Find:
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
goto/16 :goto_23
.line 2902
Add the RED color highlighted lines between them
Code:
if-nez v12, :cond_23
.line 2894
const/4 v12, 0x3
[COLOR="red"]const/4 v7, 0x0[/COLOR]
invoke-virtual {p0, v12, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
[COLOR="red"]move v0, v7
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
move-object/from16 v0, p0
invoke-virtual {v0, v8}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress(I)V
[/COLOR]
goto/16 :goto_23
.line 2902
Find:
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
Add the RED color highlighted lines between them
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.registers 3
.parameter "reason"
.prologue
.line 3246
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 3247
return-void
.end method
[COLOR="red"].method protected sendFMBroadcast(Landroid/content/Intent;)V
.registers 3
.parameter "intent"
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v0, p1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
return-void
.end method
.method protected sendMediaButtonEvent(I)V
.registers 15
.parameter "code"
.prologue
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
.local v1, eventtime:J
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v11, downIntent:Landroid/content/Intent;
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v0, downEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v12, upIntent:Landroid/content/Intent;
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v3, upEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method[/COLOR]
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.registers 12
.parameter "win"
4-STEP
add the following smali files in classoutcom\android\internal\policy\impl
PhoneWindowManager$23.smali
PhoneWindowManager$24.smali
(i have provided these two files in resources.zip attached below this post)
5-STEP
recompiling
come back to apktool main folder.and in the cmd prompt type this cmd to recompile..
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
and once its recompiled rename the new-classes.dex to classes.dex
and open the android.policy.jar with winrar archive drag the newly recompiled classes.dex into the archive and select compression level to store.
and ur done..
6-STEP
push the android.policy.jar into system/framework..
flash it via cwm using a flashable zip (i have also provided a flashable zip formate see attachment)
and u have a working skip to track in ur rom
Hope it helps u guys
if u guys are having trouble making it ...make a req to me ill make one for u when iam free..
ps-when it comes to making a thread iam really bad at it plz co-operate
How to add xperia S/T lockscreen and small apps
Xperia S/T Lockscreen TUT​
requirements.
framework-res.apk
android.policy.jar
notpad++
winrar
knowledge of how to decompile and recompile
If u guys want a good tut for de/recompiling here is good guide by my good friend Stanlin salu
http://forum.xda-developers.com/showthread.php?t=2011254
1-STEP
decompile framework-res.apk
navigate to res/values
and open strings.xml
here add these two at the end (see pic for reference.) and save it
Code:
<string name="permlab_external_lockscreen">xperia lockscreen</string>
<string name="permdesc_external_lockscreen">xperia loxkscreen</string>
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2-STEP
in the same values folder
open public.xml
and these strings just below the line show in the below pic and save it
Code:
<public type="string" name="permlab_external_lockscreen" id="0x01040525" />
<public type="string" name="permdesc_external_lockscreen" id="0x01040526" />
IMPORTANT
0x01040525 ,0x01040526 these are called hex codes and should in a proper order
for ex from the above codes the last 4 hex codes should in this way
0x01040524
0x01040525
0x01040526
0x01040527
a little info about hex codes
hex codes starts from 0-9 and a-f and so one
so they must in the order according to it.
Click to expand...
Click to collapse
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
and add these line just below line shown in the pic and save it
Code:
<permission android:label="@string/permlab_external_lockscreen" android:name="com.sonyericsson.permission.EXTERNAL_LOCKSCREEN" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_external_lockscreen" />
4-STEP
recompile the framework-res.apk
5-STEP
decompile android.policy.jar
navigate to com\android\internal\policy\impl\
and add this ExternalLockScreen.smali file there (smali file is provided by in the resources zip attached in this post)
and recompile it back
6-STEP
i have attached a flashable zip for format in this post below
put the following files it
uxpnxtlockscreen.apk (provided in resorces zip by me)
settings.apk (which supports XS LS , which can be found easily in this forum) (or may be later ill tell how to add them in ur settings)
android.policy.jar
framework-res.apk
zip and flash it..and ur done ...
HOW TO ADD SMALL APPS​
1-STEP
Decompile framework-res.apk
and navigate to res/values/strings.xml
and add these 4 lines at the end as shown in the pic. and save it
Code:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_externalTaskSwitcher">Start as an external task switcher</string>
<string name="permdesc_externalTaskSwitcher">Allows the application to be an external task switcher replacing the native task switcher</string>
2-STEP
in the same values folder open public.xml
and add these 4 lines below the line shown in the pic and save it
Code:
<public type="string" name="permlab_smallapp" id="0x01040550" />
<public type="string" name="permdesc_smallapp" id="0x01040551" />
<public type="string" name="permlab_externalTaskSwitcher" id="0x01040552" />
<public type="string" name="permdesc_externalTaskSwitcher" id="0x01040553" />
3-STEP
come back to main framework-res folder
and open AndroidManifest.xml
now add this line as shown in the pic
Code:
<permission android:label="@string/permlab_externalTaskSwitcher" android:name="com.sonymobile.permission.EXTERNAL_TASK_SWITCHER" android:protectionLevel="signatureOrSystem" android:description="@string/permdesc_externalTaskSwitcher" />
and this line as shown in pic .and save it
Code:
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" android:protectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
Now recompile the framework-res.apk
4-STEP
decompile framework.jar
and the whole sony folder which consists of small apps samli (i have provided in small apps resources.zip )
recompile it
done
5-STEP
u need some framework files and some permissions files ( provided in resources.zip)
1-etc/permissions
2- small app framework jar file
3-small apps supported services.
4-the small apps
6-STEP
now all mods are ready only thing need is small apps (which i have provided in small apps resources.zip)
and also make u use the small apps supported susyemUI.apk (which can be found in this forum)
put all these files in the flashable zip formate i have provided below..
and enjoy ur small apps
CREDITS:
AOEN WORLD -for resources.
hmm
might need also
i better stop reserving posts...hehe
Wow nice :thumbup: request for hold back to kill app
hehe
Sent from my WT19i using Tapatalk 2
respect bro thanks
Sent from my SK17i using xda premium
tonnitube said:
Wow nice :thumbup: request for hold back to kill app
hehe
Sent from my WT19i using Tapatalk 2
Click to expand...
Click to collapse
no iam not adding back to kill tut...bcz its more complicated (even iam trying to understand it day by day) no req will be taken for back to kill
Nice, let's try the skip tracking on miui
anerik said:
Nice, let's try the skip tracking on miui
Click to expand...
Click to collapse
try it bro...if ur not successful make me a req ill do it ok
sandy7 said:
try it bro...if ur not successful make me a req ill do it ok
Click to expand...
Click to collapse
Sure, thanks!
I'll try this on xperia nexus and let u know asap....
Regards,
AJ
Sent from my Xperia Mini Pro using Tapatalk 2
Works fine on MIUI bro, thx!!
anerik said:
Works fine on MIUI bro, thx!!
Click to expand...
Click to collapse
so learnt some thing ,,,good for u..
You rock my friend!!!! :laugh:
Great thread!!!!
Nice guide
very nicely explained
serajr said:
You rock my friend!!!! :laugh:
Great thread!!!!
Click to expand...
Click to collapse
thanks buddy ...u are the inspiration for me
mv_style said:
Nice guide
very nicely explained
Click to expand...
Click to collapse
thanks ...still more coming up
xperia s lockscreen and small apps tut added.
Nice guide sandy7. Surely it will help me. Thanks btw.
A very useful guide! And well written too. Thanks!
Sent from my SK17i using xda premium
Ticklefish said:
A very useful guide! And well written too. Thanks!
Sent from my SK17i using xda premium
Click to expand...
Click to collapse
Ho thanks...I think my presentation is not so bad after all.
Sent from my SK17i using XDA Premium HD app

[MOD/GUIDE] Xperia Jelly Bean Style SystemUI | Customize Your Own Statusbar! [18/3]

Hi,
Well, I try to theme ICS systemui to Xperia JB style like Xperia Z.
But this so far the only I can do for now. I hope you guys like it.
More to come. Stay tuned.
Project Finished
Changelog
20/2: Initial release.
21/2: Fixed all statusbar background that cause FC on some user.
03/3: Style Z added. Change colour according to themes colour. (Special thanks to erorcun for the trick)
05/3: Style S added. Thanks to destroyy.
15/3: Special style added. Modified to look more like JB statusbar notification.
18/3: CM style added. Thanks to SpaceCaker.
Preview
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Brand new statusbar background style.
Style 1
Style 2
Style 3 (Fullscreen)
Style 4
Style Z (Change Color According to Themes)
Style S (Change Color According to Themes)
Style ZN6 (Change Color According to Themes)
Style CM (Change Color According to Themes)
Note
1. Before installing this, please delete any quickpanel setting or systemuipreferences if you using tab systemui before.
2. My systemui support smallapp.
3. Please PM me asking for permission first, if you want to incorporate it into your ROMs.
4. Style 1-4 is known to work for some user only. You need a luck for these
Instruction
1. Flash Universal_part_1.zip and reboot. Did the statusbar appear?
If it doesnt, probably there have problem with your rom. Flash stock rom via flashtool first.
2. If the statusbar appeared, continue to flash Style_x.zip via recovery.
3. Reboot you phone.
Credits
Niaboc79 for original xperia t systemui.
serajr for helping me in smali editing.
leloiboi for some tip and help.
Ticklefish for his tutorial.
erorcun for his trick to change colour according to theme.
destroyy for Sammy style.
SpaceCaker for CM style.
I'm do this for free. Damn... this take huge amount of time especially the smali editing.
Dont just know how to download and flash. Try appreciate my work by hit
.
[Guide/Tutorial] Customize Your Own Statusbar!
[Guide/Tutorial] Customize Your Own Statusbar!
Hi, again.
Some user keep PM'ing me how to change that, that and etc.
So I decide to do a simple guide to customize your own statusbar.
Make sure you have a basic knowledge to compile/decompile apk.
Change Statusbar Background Color
Decompile systemui.apk and navigate to SystemUI/res/values/drawables.xml and edit this line:
Code:
<item type="drawable" name="status_bar_background">#[COLOR="Red"]ff1a1a1a[/COLOR]</item>
Change red content to what ever you line. For more hex color reference, go here
For black color, change it to ff000000.
Save and compile back.
(This method only applicable for Style_Z and later version)
For style 1-4, change status_bar_background.png in drawable-hdpi folder
Look for transparent statusbar? Go here..
Change Navigation Button Background Color
Decompile systemui.apk and navigate to SystemUI/res/layout/navigation_bar.xml and edit this line.
Code:
<com.android.systemui.statusbar.phone.NavigationBarView android:id="@id/nav_background" [COLOR="Red"]android:background="#ff000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none"
Change red content to what ever you line. For more hex color reference, go here
The original Xperia Z nav backgroud color is ff1a1a1a.
Save and compile back
Change Clock Colour on Statusbar
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
And change it to this
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#[COLOR="Red"]ff09afed[/COLOR]" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Change the red content to what ever colour you like. For more hex color reference, go here
Remember! You can also change carrier label color, date, and etc. Just look respective line and xml.
Add Seconds To Statusbar Clock
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
[COLOR="Blue"]<com.android.systemui.statusbar.policy.Clock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
And replace blue line above with following red line:
Code:
<[COLOR="Red"]DigitalClock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Save change you have made and recompile back.
It easy, right?
Hide Clock,Battery Percentage and etc.
Hide clock.
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and change to this:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" [COLOR="Red"]android:visibility="gone"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Hide battery percentage
Find this line:
Code:
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
change to this:
Code:
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" [COLOR="Red"]android:visibility="gone"[/COLOR] />
Remember! Just added red word at the end of line you want to hide if you want to hide content on statusbar.
Add Battery Percentage On Statusbar.
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
And add red line below:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
[COLOR="Red"]<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />[/COLOR]
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Save change you have made. After that, look for this smali file:
PhoneStatusBar.smali
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
and add red lines below:
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
[COLOR="Red"].line 13
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0061
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addLabelView(Landroid/widget/TextView;)V[/COLOR]
also change the const v9, 0x7f0e0061 to your own value, look for it inside public.xml
Recompile back and flash.
Temporary Hide Statusbar When We Pull SystemUI/Fullscreen (For Advanced User Only)
Find this smali file:
PhoneStatusBar.smali:
Here when the expanded view is about to become visible, we hide the main status bar view (red):
Code:
[B].method private makeExpandedVisible()V[/B]
.line 1194
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const/4 v1, 0x2
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->requestFocus(I)Z
.line 1195
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V
[COLOR="red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const/4 v1, 0x4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]
goto :goto_0
.end method
Here when the expanded view is gone, we show the main status bar view again (red):
Code:
[B].method performCollapse()V[/B]
.line 1278
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedDialog:Landroid/app/Dialog;
invoke-virtual {v0}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedParams:Landroid/view/WindowManager$LayoutParams;
invoke-virtual {v0, v1}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V
.line 1279
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V
[COLOR="Red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]
.line 1281
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I
const/high16 v1, 0x2
and-int/2addr v0, v1
if-nez v0, :cond_2
.line 1282
const/4 v0, 0x1
const/high16 v1, 0x10a
invoke-virtual {p0, v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationIconVisibility(ZI)V
.line 1285
:cond_2
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
if-eqz v0, :cond_0
.line 1288
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
.line 1289
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
if-eqz v0, :cond_0
.line 1290
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
invoke-interface {v0}, Ljava/lang/Runnable;->run()V
.line 1291
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;
goto :goto_0
.end method
Now look for:
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
You´ll get 6 matches/lines with something like:
Code:
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
move-result v2
Insert red line (respect line spaces) only within following methods:
Code:
.method doAnimation()V
.method doRevealAnimation()V
.method getExpandedHeight(I)I
.method prepareTracking(IZ)V
.method updateExpandedViewPos(I)V
DON´T INSERT INSIDE THIS METHOD:
Code:
.method interceptTouchEvent(Landroid/view/MotionEvent;)Z
Code:
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I
move-result v2
[COLOR="red"]const/4 v2, 0x0[/COLOR]
(remember to change v2 to the same as "move-result v?")
Save and Compile. If you still got an error or force close on statusbar, just compare with style 3.
Change Color According to ThemeAccent Color (For Expert User Only)
Download the ThemeUtils.zip in attachment and extract it to smali/com/blah.../blah... You can put ThemeUtils.smali in any directory in smali folder. But when we want to run this file, we need to specific the directory where we put the file. For example,
I put in smali/com/sonymobile/systemui/statusbar/tools/
You will know what I mean
Something have to run this file and provide context object. For example, the main file which contain context object in systemui.apk is SystemUIService.smali. So look for this line:
Code:
.line 91
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
And added following red line:
Code:
.line 91
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;
aget-object v6, v6, v4
iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
[COLOR="Red"]invoke-static {p0}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->init(Landroid/content/Context;)V[/COLOR]
And save it.
If you want to change the clock color in expanded statusbar for example, find this line in com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Code:
.field mExpanded:Z
.field mExpandedContents:Landroid/view/View;
.field mExpandedDialog:Landroid/app/Dialog;
And add red line:
Code:
.field mExpanded:Z
[COLOR="Red"].field mExpandedClock:Landroid/widget/TextView;[/COLOR]
.field mExpandedContents:Landroid/view/View;
.field mExpandedDialog:Landroid/app/Dialog;
Find this line:
Code:
.line 1227
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
And add red line below:
Code:
.line 1227
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
[COLOR="Red"]iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColor()I
move-result v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]
Find this line:
Code:
.line 343
const v9, 0x7f0e003e
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
And add red line below:
Code:
.line 343
const v9, 0x7f0e003e
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;
[COLOR="Red"]const v9, 0x7f0e0095
invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;[/COLOR]
Now look for this line:
Code:
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v1, 0x7f0e002b
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
And add red line below:
Code:
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v1, 0x7f0e002b
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
[COLOR="Red"]move-result-object v1
.line 1084
if-eqz v1, :cond_0
.line 1085
if-eqz p1, :cond_1
const/4 v0, 0x0
:goto_0
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
.line 1087
:cond_0
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockExp(Z)V
return-void
.line 1085
:cond_1
const/16 v0, 0x8
goto :goto_0
.end method
.method public showClockExp(Z)V
.locals 2
.parameter
.prologue
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v1, 0x7f0e0095
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;[/COLOR]
And save change.
If you want to change the color for button toggle according to theme (colorizing button), look for ToolsButton.smali (com/sonymobile/systemui/statusbar/tools).
Fine this line:
Code:
.method private updateIcon()V
.locals 5
.prologue
.line 239
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;
iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
And change to this:
Code:
.method private updateIcon()V
.locals [COLOR="Red"]6[/COLOR]
.prologue
[COLOR="Red"].line 239
const/4 v5, 0x0
.local v5, applyFilter:Z[/COLOR]
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;
iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I
[COLOR="Red"]const/4 v1, 0x1
if-eq v4, v1, :cond_0
const/4 v5, 0x1
:cond_0[/COLOR]
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Integer;
Now look for this line:
Code:
.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :cond_0
And change the value to this
Code:
.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :[COLOR="Red"]cond_1[/COLOR]
Look for following line:
Code:
.line 249
:cond_0
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;
invoke-virtual {v3, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V
And change to following red content:
Code:
.line 249
:[COLOR="Red"]cond_1[/COLOR]
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;
[COLOR="Red"]invoke-virtual {v3, v1, v5}[/COLOR], Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;[COLOR="Red"]Z[/COLOR])V
Look for following line and delete red line:
Code:
.line 250
[COLOR="Red"]iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;[/COLOR]
invoke-virtual {v3}, Lcom/sonymobile/systemui/uicomponents/Image;->invalidate()V
Find this line:
Code:
.line 251
return-void
And add red line below:
Code:
.line 251
[COLOR="Red"].end local v5 #applyFilter:Z[/COLOR]
return-void
Look for following line:
Code:
.line 244
:catch_0
move-exception v0
And like usual, add following line:
Code:
.line 244
[COLOR="Red"].restart local v5 #applyFilter:Z[/COLOR]
:catch_0
move-exception v0
And save change you have made.
Now the last part is change the image.smali (com/sonymobile/systemui/uicomponents/)
Look for following line and add red line:
Code:
# instance fields
[COLOR="Red"].field protected mApplyFilter:Z[/COLOR]
.field protected mBitmap:Landroid/graphics/Bitmap;
.field protected final mMatrix:Landroid/graphics/Matrix;
.field protected mScalingX:F
.field protected mScalingY:F
Look for following line:
Code:
.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
.locals 1
.parameter "id"
.parameter "image"
.prologue
const/high16 v0, 0x3f80
And change to this:
Code:
.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
[COLOR="Red"].locals 2[/COLOR]
.parameter "id"
.parameter "image"
.prologue
const/high16 v0, 0x3f80
[COLOR="Red"]const/4 v1, 0x0[/COLOR]
Look for this line:
Code:
.line 54
invoke-virtual {p0, p2}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V
Change the entire line to this:
Code:
.line 54
[COLOR="red"]invoke-virtual {p0, p2, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;Z)V[/COLOR]
Find this line:
Code:
.method public onDraw(Landroid/graphics/Canvas;FF)V
.locals 3
.parameter "canvas"
.parameter "x"
.parameter "y"
.prologue
const/high16 v1, 0x3f80
And change to this:
Code:
.method public onDraw(Landroid/graphics/Canvas;FF)V
[COLOR="red"].locals 5[/COLOR]
.parameter "canvas"
.parameter "x"
.parameter "y"
.prologue
const/high16 v1, 0x3f80
Look for this line:
Code:
.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
if-eqz v0, :cond_1
...
Code:
.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
if-eqz v0, [COLOR="red"]:cond_2[/COLOR]
Look for this code:
Code:
.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F
cmpl-float v0, v0, v1
if-nez v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F
cmpl-float v0, v0, v1
if-eqz v0, :cond_2
Change to this:
Code:
.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F
cmpl-float v0, v0, v1
if-nez v0, :cond_0
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F
cmpl-float v0, v0, v1
if-eqz v0, [COLOR="Red"]:cond_3[/COLOR]
Look this line:
Code:
.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;
iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
Add red line below:
Code:
.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;
iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z
const/4 v3, 0x0
if-eqz v4, :cond_1
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;
move-result-object v3
:cond_1
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]
invoke-virtual {p1, v0, v1, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V
Now look for this line:
Code:
.line 190
:cond_1
:goto_0
return-void
And change to this value:
Code:
.line 190
[COLOR="Red"]:cond_2[/COLOR]
:goto_0
return-void
Look for following line:
Code:
.line 187
:cond_2
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
And change to this value/add red line:
Code:
.line 187
[COLOR="red"]:cond_3[/COLOR]
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;
[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z
const/4 v3, 0x0
if-eqz v4, :cond_4
invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;
move-result-object v3
:cond_4
invoke-virtual {v1, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
Look this line:
Code:
.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
.prologue
const/4 v1, 0x0
And ...
Code:
.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
[COLOR="red"].parameter "filter"[/COLOR]
.prologue
const/4 v1, 0x0
And LAST one
Code:
.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
And... you know what I mean, right?
Code:
.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;
[COLOR="red"]iput-boolean p2, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z[/COLOR]
erorcun is here said:
You are missing 2 thing. In older versions statusbar clock and expanded clocks' ids are same, so it will not work on normal systemui and you should add 0 to setbitmap's last parameters in ninepatchimage.smali.
Click to expand...
Click to collapse
Remember!
The png you want to colorize must be in white color.
This may take more than two hour. So, patient is require for this.
Good luck
End for now. Will post again if I find something useful.
nice done bro, can you make style 2 also without percentage in statusbar and there is no clock in status bar is that right?
Pandemic said:
nice done bro, can you make style 2 also without percentage in statusbar and there is no clock in status bar is that right?
Click to expand...
Click to collapse
I know you will request something like this.
No clock, no percentage and black background on statusbar.
ZN6 said:
I know you will request something like this.
btw here. No clock and percentage on statusbar.
Click to expand...
Click to collapse
thanks bro
yes i pressed it
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Plz can u send me step by step installation process??
As a beginer i need ur help..,it would b very thankfull:thumbup:
Sent from my ST25i using xda app-developers app
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
shourya jain said:
Plz can u send me step by step installation process??
As a beginer i need ur help..,it would b very thankfull:thumbup:
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
First, download any file that you like.
Put it in your sdcard. Reboot your phone into recovery. Select file you have put in your sdcard. Wait...and reboot your phone.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
screen shot?
support small apps?
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Now what really happend is that all my status bar is gone n i m unable to set any wallpaper n my home button is also nt working
Sent from my ST25i using xda app-developers app
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
silverbios said:
screen shot?
Click to expand...
Click to collapse
You didnt see the screenshot on the first post?
shourya jain said:
Now what really happend is that all my status bar is gone n i m unable to set any wallpaper n my home button is also nt working
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
What syatemui mod that you are using before?
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
not work on my sola!!
try to fix it
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
What to do plz help
Sent from my ST25i using xda app-developers app
shourya jain said:
What to do plz help
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
dude please read what he ask to you :/
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
No system mod..just stock ics rom
Sent from my ST25i using xda app-developers app
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
You post xperia 2011???
Gửi từ ST18i của tôi bằng cách sử dụng Tapatalk 2
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
There's a big chance to not working if you use tab systemui with preferences.
Here try this.
Delete systemui.apk and systemuipreferences.apk. After that reboot your phone. You will lost statusbar. Reboot you phone again and flash my systemui. If still doesnt work...flash on clean stock rom.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
support small apps?
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
anhmat122 said:
You post xperia 2011???
Gửi từ ST18i của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
And it not working on xperia 2011 phone.
Will try to make one if I have a time.
Feel free to hit
if this post help you anyway.
Sent from LT22i via Tapatalk.
anhmat122 said:
You post xperia 2011???
Gửi từ ST18i của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
dont i understand me you??
i dont get you thats why i talk like this and what thread is this no 2011, but 2012 !!
Re: [MOD] Xperia Jelly Bean Style SystemUI [20/2]
Delete systemui.apk and and systemuiprefernces.apk fom system/app?? If yes i'll delete it right now... And then rebot it again and install the zip u uploaded..right?
Sent from my ST25i using xda app-developers app

[MOD][HOW-TO][4.1.2]StatusBar Toggles+Custom Settings[Controlable]

Hi To all
Me again...
This mod and how to is come from my Rom!
After many request...i decided share that to all but if anybody will use that just dont forget give me a credit:laugh:
What is this mod and how to?
this mod and how to have:
how to make custome settings in "secsettings.apk"
how to add make 23 toggle statusbar
how to add toggle between stock and 23 toggle statusbar in custome settings
and many things will come...
what you tools you need?
you need apktools or apk manger or apkmulti tools for decompile and Tools and Not pad++(i always use apkmulti tools this is better or you can use wanam Apk_Manager Repack.
lets Go to start
post 1 have system files download my Attachment "systemfiles.zip" put all of the in your device system\app folder to system\app and system\framework to system\framework
post 2 is "how to make custome settings in "secsettings.apk" and secsettings.apk files"
post 3 is "how to make custome settings in "systemui.apk""
screen shots:
will upload
thanks:
Wanam
lets go strat with Secsettings.apk
part1:
decompile "Secsettings.apk"
download my Attachment file "SecSettings.apk.rar" extract that and copy all things from that to your "secsettings.apk"
go to decompiled "secsettings.apk" go "res/xml open "settings_headers.xml" with not pad ++
Find this line:
Code:
<header android:id="@id/manufacturer_settings" android:fragment="com.android.settings.WirelessSettings">
<intent android:action="com.android.settings.MANUFACTURER_APPLICATION_SETTING" />
</header>
put this after that line:
Code:
<header android:title="Custom Settings" />
<header android:icon="@drawable/biftor_rom_control" android:title="Custom Settings" android:fragment="com.android.settings.Biftor.BiftorMain" />
save and compile "secsettings.apk" after you compile that decompile it again you need change id
part 2:
Decompile your modded "Secsettings.apk" Go to res/values and open "public.xml" with not pad
try to find this:
Code:
<public type="xml" name="biftor_customsettings" id="
copy id of "biftor_customsettings"
Go to smali/com/android/settings/Biftor open "BiftorMain.smali" and try to find this:
Code:
.locals 5
const/4 v1, 0x1
const/4 v2, 0x0
invoke-super {p0, p1}, Landroid/preference/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V
const v0, [COLOR="Red"]0x7f07008d[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/settings/Biftor/BiftorMain;->addPreferencesFromResource(I)V
const-string v0, "23toggle_statubar"
invoke-virtual {p0, v0}, Lcom/android/settings/Biftor/BiftorMain;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v0
check-cast v0, Landroid/preference/CheckBoxPreference;
see red line
Chang that to id of "biftor_customsettings" you copied that befor
save and compile
Secsettings.apk finish
Go to post 3 for Systemui.apk
lets go start with "Systemui.apk"
part1:
decompile your "Systemui.apk"
download my Attachment file "systemui.apk.rar" extract that and copy all things from that to your "Systemui.apk" decompiled
go to res/values open "ids.xml" with not pad++
add this line to that"
Code:
<item type="id" name="exp_power_stat">false</item>
after that compile and after compile,decompile that again!
part 2:
Go to smali\com\android\systemui\statusbar\phone and open "PhoneStatusBar.smali" with Not pad++
try to find this line:
Code:
.field mPostCollapseCleanup:Ljava/lang/Runnable;
and add this line after that:
Code:
.field mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
try to find this method:
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
[COLOR="Blue"] .locals 13[/COLOR]
.prologue
.line 521
change the blue line to this:
Code:
.locals 15
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;"
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
if-eqz v9, :cond_9
.line 532
const v9, 0x7f03003e
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Blue"] iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;[/COLOR]
put this after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_Biftor
const v9, 0x7f030045
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
:cond_Biftor
exactly same this:
you can remove "##############" this is just for hint!
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
if-eqz v9, :cond_9
.line 532
const v9, 0x7f03003e
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
##############################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_Biftor
const v9, 0x7f030045 [COLOR="Red"]#biftor23_tw_super_status_bar[/COLOR]
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
:cond_Biftor
#################
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;":
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d004c
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ScrollView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
.line 700
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v10, 0x0
[COLOR="Blue"] invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
[/COLOR]
put this lines after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_arm
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d011b [COLOR="Red"]#exp_power_stat[/COLOR]
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/Biftor/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
.line 702
:cond_arm
exactly same this:
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d004c
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ScrollView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
.line 700
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
#################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_arm
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d011b [COLOR="Red"]#exp_power_stat[/COLOR]
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/Biftor/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
.line 702
:cond_arm
#################
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;":
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useAttPlmnDisplay:Z
const/4 v10, 0x1
if-ne v9, v10, :cond_7
.line 857
const-string v9, "android.intent.action.SCREEN_ON"
invoke-virtual {v2, v9}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 860
:cond_7
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
[COLOR="Blue"] invoke-virtual {v1, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;[/COLOR]
put this after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_ar
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
invoke-virtual {v9}, Lcom/Biftor/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 863
:cond_ar
exactly same this:
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useAttPlmnDisplay:Z
const/4 v10, 0x1
if-ne v9, v10, :cond_7
.line 857
const-string v9, "android.intent.action.SCREEN_ON"
invoke-virtual {v2, v9}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 860
:cond_7
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v1, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
#################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_ar
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
invoke-virtual {v9}, Lcom/Biftor/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 863
:cond_ar
#################
Important Note 1 Red lines:
Go to res/values open "public.xml" with Not pad++
Find new id of "exp_power_stat" and "biftor23_tw_super_status_bar"
after that replace new id to red lines.
i attached my modded "PhoneStatusBar.smali" you can use that maybe you need that!
final part:
go to decompiled SystemUI.apk open "AndroidManifest.xml"
try to find this:
Code:
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="com.sprint.permission.SPRINT4G" />
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />
[COLOR="Blue"] <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
[/COLOR]
put this after blue line:
Code:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.REBOOT" />
compile Systemui.apk and Signe that (dont forget do signe)
and put it in your device!
important Note 2:
you need do This [HOW TO][20Mar][How to Disable Signature Checker For System App[Sammy JB]
because you Changed "AndroidManifest.xml" and you singed SystemUi.apk
Dont Forget do this!
i attached my Modded Systemui.apk if you want you can use that!
Enjoy.
res3
res4
res5 maybe will need...
I'd like to know what makes this mod.
please post the screenshoot.
thanks
remuntada78 said:
I'd like to know what makes this mod.
please post the screenshoot.
thanks
Click to expand...
Click to collapse
This mod is your statusbar toggle
With this mod
You can make lidroid 23toggle statusbar
And make toggle for switch from stock toggle to lidroid 23 toggle or lidroid to stock toggle....
I haven't screen Shot from that
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?
rrgrrg said:
offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?
Click to expand...
Click to collapse
You just gotta wait. It can take aaagggeeesss
Sent from my GT-I9305 using Tapatalk 4 Beta
Goldieking said:
You just gotta wait. It can take aaagggeeesss
Sent from my GT-I9305 using Tapatalk 4 Beta
Click to expand...
Click to collapse
ok ,,thats why not every rom has this future :silly:
edit : i see that aapt.exe is taking more memory by the passage of time ,,but its a slight increase so its working yea
rrgrrg said:
offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?
Click to expand...
Click to collapse
rrgrrg said:
ok ,,thats why not every rom has this future :silly:
edit : i see that aapt.exe is taking more memory by the passage of time ,,but its a slight increase so its working yea
Click to expand...
Click to collapse
Hi
I suggest use apk multi tools that's much better than apktools for noob peoples...
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Biftor said:
Hi
I suggest use apk multi tools that's much better than apktools for noob peoples...
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Or apk manager
Sent from my GT-I9100 using Tapatalk 2
Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium
bombaybadboy said:
Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Should ask Goldie for this mate, but he is taking a break right now.
Namoi said:
Should ask Goldie for this mate, but he is taking a break right now.
Click to expand...
Click to collapse
Im just a seeker of knowledge and see parts of this guide could be useful to me mate
Sent from my GT-I9100 using xda premium
bombaybadboy said:
Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Hi
You can do it same me!
You can change lidorid stock to aosp theme that's easy just change layout xml for lidroid in systemui.apk
Just look again you have one tw_super_statusbar.xml for 23 toggle!!!
Change layouts to aosp style!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Biftor said:
Hi
You can do it same me!
You can change lidorid stock to aosp theme that's easy just change layout xml for lidroid in systemui.apk
Just look again you have one tw_super_statusbar.xml for 23 toggle!!!
Change layouts to aosp style!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Thankyou for the reply but how do you separate 2 tw_statusbar.xml and stat_battery_charge.xml and expandable_header ect can I ask. I will have a proper look when I next get back on my pc
Sent from my GT-I9100 using xda premium
bombaybadboy said:
Thankyou for the reply but how do you separate 2 tw_statusbar.xml and stat_battery_charge.xml and expandable_header ect can I ask. I will have a proper look when I next get back on my pc
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
For battery you should add your new xml to batterycontroller.smali with your lidroid toggle switch string I will check that!!
After that lock in Tw_super_statusbar.xml
You can add new Tw_statusbar.xml and new new expanded.xml and in tw_statusbar_expanded.xml
You have tw_statusbar_expanded_header.xml
You can make your aosp layouts and added to new Tw_super_statusbar.xml
Tw_super_statusbar.xml is same controller
Look into the Tw_super_statusbar.xml
I can't access to my pc now!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Biftor said:
For battery you should add your new xml to batterycontroller.smali with your lidroid toggle switch string I will check that!!
After that lock in Tw_super_statusbar.xml
You can add new Tw_statusbar.xml and new new expanded.xml and in tw_statusbar_expanded.xml
You have tw_statusbar_expanded_header.xml
You can make your aosp layouts and added to new Tw_super_statusbar.xml
Tw_super_statusbar.xml is same controller
Look into the Tw_super_statusbar.xml
I can't access to my pc now!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Thankyou for your time and will give me something to look into I only have a hour or 2 pc time a day and its hard for me to hunt blind. Thanks again
Sent from my GT-I9100 using xda premium

[MOD] [GUIDE] AOSP lock screen with toggle

How to enable AOSP lockscreen for the S4​
As always, for reasons of keeping things simple I use my Rom Control file to house all my MOD settings. Its easier to add and remove code and never changes with updates.
We will be working with three files:
SecSettings
framework-res
android.policy
We will begin with SecSettings
Navigate to res/values/strings and add the following:
Code:
<string name="lockscreen_title">Enable AOSP lockscreen</string>
<string name="lockscreen_summary">Choose AOSP or TW lockscreen</string>
Navigate to res/xml/rom_settings (or your xml of choice) and add the following:
Code:
<CheckBoxPreference android:title="@string/lockscreen_title" android:key="aosp_lock_enabled" android:summary="@string/lockscreen_summary" />
Navigate to smali/com/android/settings/didact/RomSettings.smali (or your settings smali of choice) and add the following:
The first lines just describe what method to add the code to. Dont copy them into the file.
Code:
.field mAospLock:Landroid/preference/CheckBoxPreference;
Code:
[B]In .method public onCreate(Landroid/os/Bundle;)V.....[/B]
:goto_4
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
const-string v1, "aosp_lock_enabled"
invoke-virtual {p0, v1}, Lcom/android/settings/didact/RomSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
check-cast v1, Landroid/preference/CheckBoxPreference;
iput-object v1, p0, Lcom/android/settings/didact/RomSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
iget-object v4, p0, Lcom/android/settings/didact/RomSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/didact/RomSettings;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v5, "aosp_lock_enabled"
invoke-static {v1, v5, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v2, :cond_5
move v1, v2
:goto_5
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
Code:
[B]in .method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z[/B]
:cond_9
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_0
:cond_a
iget-object v2, p0, Lcom/android/settings/didact/RomSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
if-ne p2, v2, :cond_1
invoke-virtual {p0}, Lcom/android/settings/didact/RomSettings;->getActivity()Landroid/app/Activity;
move-result-object v2
invoke-virtual {v2}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "aosp_lock_enabled"
check-cast p2, Landroid/preference/CheckBoxPreference;
invoke-virtual {p2}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v4
if-eqz v4, :cond_b
move v0, v1
:cond_b
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_0
.end method
Thats it for SecSettings. Again, you may wish to add these mods to lockscreen settings ot your own xml control. If you want to add them to lockscreen settings, have a look at my guide for the S3, it goes into how to do that. Now on to Framework-res in the next section......
AOSP Lockscreen with toggle, part 2.....framework-res​​
In this file we will be doing two things:
Centering the glowpad in your screen
adding lock targets with camera (stock only adds unlock).
Navigate to res/layout/keyguard_selector_view.xml and replace the whole file with the following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardSelectorView android:orientation="vertical" android:id="@id/keyguard_selector_view" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:contentDescription="@string/keyguard_accessibility_slide_unlock" android:layout_maxHeight="@dimen/keyguard_security_height" android:layout_maxWidth="420.0dip"
xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout android:gravity="center" android:layout_gravity="center" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<include android:layout_width="fill_parent" android:layout_height="wrap_content" layout="@layout/keyguard_message_area" />
<View android:id="@id/keyguard_selector_view_frame" android:background="@drawable/kg_bouncer_bg_white" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="16.0dip" android:layout_marginRight="16.0dip" />
<include layout="@layout/keyguard_glow_pad_container" />
<include android:layout_gravity="bottom|center" android:id="@id/keyguard_selector_fade_container" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="0.0dip" layout="@layout/keyguard_eca" />
</FrameLayout>
</com.android.internal.policy.impl.keyguard.KeyguardSelectorView>
Navigate to res/layout/keyguard_glow_pad_view.xml and replace the entire file with the following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.widget.multiwaveview.GlowPadView android:gravity="center" android:layout_gravity="center" android:orientation="horizontal" android:id="@id/glow_pad_view" android:layout_width="wrap_content" android:layout_height="wrap_content" prvandroid:innerRadius="@dimen/glowpadview_inner_radius" android:contentDescription="@string/keyguard_accessibility_slide_area" prvandroid:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" prvandroid:directionDescriptions="@array/lockscreen_direction_descriptions" prvandroid:outerRingDrawable="@drawable/ic_lockscreen_outerring" prvandroid:pointDrawable="@drawable/ic_lockscreen_glowdot" prvandroid:glowRadius="@dimen/glowpadview_glow_radius" prvandroid:firstItemOffset="@integer/kg_glowpad_rotation_offset" prvandroid:magneticTargets="true" prvandroid:allowScaling="true" prvandroid:targetDrawables="@array/lockscreen_targets_with_camera" prvandroid:handleDrawable="@drawable/ic_lockscreen_handle" prvandroid:outerRadius="@dimen/glowpadview_target_placement_radius" prvandroid:vibrationDuration="20" prvandroid:snapMargin="@dimen/glowpadview_snap_margin" prvandroid:feedbackCount="1"
xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" />
Thats it for framework-res. The last section is for android.policy
AOSP Lockscreen with toggle part 3, android.policy​
This last part will add the AOSP functionality with toggle.
Navigate to smali/com/android/internal/policy/impl/keyguard/KeyguardHostView.smali
Add the following:
Code:
.field private mAospLock:I
Find .method private getLayoutIdFor(Lcom/android/internal/policy/impl/keyguard/KeyguardSecurityModel$SecurityModeI
Replace from pswitch_0 to pswitch_1 with the following code:
Code:
:pswitch_0
iget-object v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "aosp_lock_enabled"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
iput v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAospLock:I
iget v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAospLock:I
if-eqz v2, :cond_nocrt
const v1, 0x1090084
goto :goto_1
:cond_nocrt
const v1, 0x1090091
goto :goto_1
:pswitch_1
Thats it. Recompile and push the files to your phone. Enjoy AOSP Lockscreen.
I am currently working to add more functions such as weather and added shortcuts so stay tuned....
Thanks Button!!
Nice!! I assume we would need to add the rom control bits you talk about. Where are they? They are not already there are they?
hlxanthus said:
Nice!! I assume we would need to add the rom control bits you talk about. Where are they? They are not already there are they?
Click to expand...
Click to collapse
No, you don't have to. I just geared this tutorial around the idea that you would. You can add it to any XML you want, just have to follow the flow of the xml you add it to.
Looks cool! Can you post some screenshots?
awesome job like always thanks
xShockz said:
Looks cool! Can you post some screenshots?
Click to expand...
Click to collapse
I will tomorrow, in bed now. Unless someone else has it going and would like to post a pic.
Nice work as always my man.
In order to get the AOSP lock screen working I had to set "Screen lock" to "Swipe" and "Unlock effect" to "None" in Lock screen settings.
Is that how it works or did I screw something up?
upndwn4par said:
Nice work as always my man.
In order to get the AOSP lock screen working I had to set "Screen lock" to "Swipe" and "Unlock effect" to "None" in Lock screen settings.
Is that how it works or did I screw something up?
Click to expand...
Click to collapse
It works for me no matter how I have the unlock effect.
Is this the actual aosp lockscreen or just the similar one that has the fixed unlock shortcuts?
Sent from my SCH-I545 using Tapatalk 4 Beta
andybones said:
It works for me no matter how I have the unlock effect.
Click to expand...
Click to collapse
Hmmmm...maybe I need to go through this again....
Edit:
Works perfect. Just needed to clean up some code.
Is it possible to get this in a zip file?
Sent from my SCH-I545 using xda app-developers app
I am having a it of an issue. I can't find pswitch_0 nor pswitch_1
Can someone direct me? I'm in keyguardhostview.smali
Error I'm getting while recompiling android.policy
Code:
C:\AndroidApktool>android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3630,7] Label "goto_1" is not defined.
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3635,10] Label "goto_1" is not defined.
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[0,0] mismatched tree node: UP expecting I_CATCHES
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3648,4] mismatched tree node: I_STATEMENT_FORMAT21c_STRING expecting <UP>
And here's the code that I have ended.
.method private getLayoutIdFor(Lcom/android/internal/policy/impl/keyguard/KeyguardSecurityModel$SecurityModeI
.registers 6
const/4 v0, 0x1
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "onehand_pattern_enabled"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-ne v2, v0, :cond_1c
:goto_10
sget-object v2, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView$21;->$SwitchMap$com$android$internal$policy$impl$keyguard$KeyguardSecurityModel$SecurityMode:[I
invoke-virtual {p1}, Lcom/android/internal/policy/impl/keyguard/KeyguardSecurityModel$SecurityMode;->ordinal()I
move-result v3
aget v2, v2, v3
packed-switch v2, switch_data_90
:goto_1b
return v1
:cond_1c
move v0, v1
goto :goto_10
switch_0
iget-object v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "aosp_lock_enabled"
invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
iput v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAospLock:I
iget v2, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAospLock:I
if-eqz v2, :cond_nocrt
const v1, 0x1090084
goto :goto_1
:cond_nocrt
const v1, 0x1090091
goto :goto_1
switch_1
switch_1e << this is the first pswitch I see [/b]
Click to expand...
Click to collapse
dscblu said:
Is it possible to get this in a zip file?
Sent from my SCH-I545 using xda app-developers app
Click to expand...
Click to collapse
I second this.
Sent from my SCH-I545 using xda premium
Adrozz07 said:
Is this the actual aosp lockscreen or just the similar one that has the fixed unlock shortcuts?
Sent from my SCH-I545 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Still wondering about this.
Sent from my SCH-I545 using Tapatalk 4 Beta
Hmm i'm on 4.2.2 TW
The outerring become smaller when i set gravity to center, but when i set it to left or right, it become normal.
any idea how to fix it?
Faye Reagan said:
Hmm i'm on 4.2.2 TW
The outerring become smaller when i set gravity to center, but when i set it to left or right, it become normal.
any idea how to fix it?
Click to expand...
Click to collapse
In keyguard_selector_view.xml you can change the size and position of the ring. You just need to play around a little.
upndwn4par said:
In keyguard_selector_view.xml you can change the size and position of the ring. You just need to play around a little.
Click to expand...
Click to collapse
Well i just play around, it's back to normal again after playing with android.policy since play with keyguard_selector_view.xml didn't works
mgbotoe said:
I am having a it of an issue. I can't find pswitch_0 nor pswitch_1
Can someone direct me? I'm in keyguardhostview.smali
Error I'm getting while recompiling android.policy
Code:
C:\AndroidApktool>android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3630,7] Label "goto_1" is not defined.
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3635,10] Label "goto_1" is not defined.
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[0,0] mismatched tree node: UP expecting I_CATCHES
android.policy\com\android\internal\policy\impl\keyguard\KeyguardHostView.smali[3648,4] mismatched tree node: I_STATEMENT_FORMAT21c_STRING expecting <UP>
And here's the code that I have ended.
Click to expand...
Click to collapse
Did you solve your issue yet? As i am facing exactly the same problem.. :/
Mr.Yawnie said:
Did you solve your issue yet? As i am facing exactly the same problem.. :/
Click to expand...
Click to collapse
naw, i gave up on this a while ago lol
mgbotoe said:
naw, i gave up on this a while ago lol
Click to expand...
Click to collapse
It's so frustrating!! haha. I know your comments were quite a long time ago but i decided to give it a try if you found the issue

Categories

Resources