[GUIDE][MOD][Notch devices] Show both clock and notification icon on status bar notch - Xiaomi Mi 8 SE Themes, Apps, and Mods

{
"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"
}
Hello everybody!
Just wanted to write a guide to mod SystemUI for notch device cause I want to show both notification icon and clock. This mod is temporary because I believe that MIUI Team will fix this in next version
Big update: This mod is officially supported by mi-globe.com and made for all version of MIUI. Big thanks to mi-globe.com and @zapperbyte.
See more here:
https://mi-globe.com/miui-notification-icons-for-notch-phones/[/QUOTE]
Ok let start
Things needed:
1.Basic knowledge how to compile/decompile using Apktool/Apk Studio... whatever you prefered
3.Brain and pation
Thanks to @sacca25 for letting me know about mi-globe forum. Thanks mi-globe forum for awesome center-clock mod
Steps:
First, backup your original MiuiSystemUI.apk
1. Decompile center clock MiuiSystemUI
2. Edit status_bar layout
3. Edit status_bar smali code
4. Edit dimension for smaller clock
5. Recompile MiuiSystemUI. Done!
Dont forget to run "adb shell settings put system status_bar_show_notification_icon 1" from CMD
Edit smali code. Be careful
Note: Code can be different base on MIUI release version and devices. Find exactly code to remove. Just look at method name to find
1. Edit SystemUI\smali\com\android\systemui\statusbar\phone\CollapsedStatusBarFragment.smali
Find this code and remove RED line
Code:
.method public hideNotificationIconArea(Z)V
.locals 1
[COLOR="Red"] sget-boolean v0, Lcom/android/systemui/Constants;->IS_NOTCH:Z
if-nez v0, :cond_0[/COLOR]
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaInner:Landroid/view/View;
invoke-direct {p0, v0, p1}, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->animateHide(Landroid/view/View;Z)V
[COLOR="red"] :cond_0[/COLOR]
return-void
.end method
Next find this code and remove RED line too
Code:
.method public initNotificationIconArea(Lcom/android/systemui/statusbar/phone/NotificationIconAreaController;)V
.locals 3
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mStatusBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f0a01d1
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/view/ViewGroup;
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/NotificationIconAreaController;->getNotificationInnerAreaView()Landroid/view/View;
move-result-object v1
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaInner:Landroid/view/View;
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaController:Lcom/android/systemui/statusbar/phone/NotificationIconAreaController;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaInner:Landroid/view/View;
invoke-virtual {v1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v1
if-eqz v1, :cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaInner:Landroid/view/View;
invoke-virtual {v1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v1
check-cast v1, Landroid/view/ViewGroup;
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaInner:Landroid/view/View;
invoke-virtual {v1, v2}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
:cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaInner:Landroid/view/View;
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
const/4 v1, 0x0
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->showNotificationIconArea(Z)V
[COLOR="Red"] sget-boolean v1, Lcom/android/systemui/Constants;->IS_NOTCH:Z
if-nez v1, :cond_1[/COLOR]
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mStatusBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f0a01a9
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/statusbar/StatusBarIconView;
invoke-virtual {p1, v1}, Lcom/android/systemui/statusbar/phone/NotificationIconAreaController;->setMoreIcon(Lcom/android/systemui/statusbar/StatusBarIconView;)V
[COLOR="red"] :cond_1[/COLOR]
return-void
.end method
Finally for this file, found this code and remove RED line
Code:
.method public showNotificationIconArea(Z)V
.locals 1
[COLOR="Red"] sget-boolean v0, Lcom/android/systemui/Constants;->IS_NOTCH:Z
if-nez v0, :cond_0[/COLOR]
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaInner:Landroid/view/View;
invoke-direct {p0, v0, p1}, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->animateShow(Landroid/view/View;Z)V
[COLOR="red"] :cond_0[/COLOR]
return-void
.end method
2. Edit SystemUI\smali\com\android\systemui\statusbar\phone\StatusBar.smali
Find this code and remove RED line
Code:
.method private updateNotificationIconsLayout()V
.locals 5
iget v3, p0, Lcom/android/systemui/statusbar/phone/StatusBar;->mState:I
const/4 v4, 0x1
if-ne v3, v4, :cond_1
const/4 v1, 0x1
:goto_0
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/StatusBar;->mMiuiStatusBarPrompt:Lcom/android/systemui/miui/statusbar/phone/MiuiStatusBarPromptController;
const/4 v4, 0x2
invoke-virtual {v3, v4}, Lcom/android/systemui/miui/statusbar/phone/MiuiStatusBarPromptController;->isShowingState(I)Z
move-result v0
[COLOR="Red"] sget-boolean v3, Lcom/android/systemui/Constants;->IS_NOTCH:Z
if-nez v3, :cond_2[/COLOR]
iget-boolean v3, p0, Lcom/android/systemui/statusbar/phone/StatusBar;->mShowNotifications:Z
if-eqz v3, :cond_2
if-eqz v0, :cond_0
if-eqz v1, :cond_2
:cond_0
iget-boolean v3, p0, Lcom/android/systemui/statusbar/phone/StatusBar;->mDemoMode:Z
xor-int/lit8 v2, v3, 0x1
:goto_1
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/StatusBar;->mNotifications:Landroid/view/View;
if-eqz v2, :cond_3
const/4 v3, 0x0
:goto_2
invoke-virtual {v4, v3}, Landroid/view/View;->setVisibility(I)V
return-void
:cond_1
const/4 v1, 0x0
goto :goto_0
:cond_2
const/4 v2, 0x0
goto :goto_1
:cond_3
const/4 v3, 0x4
goto :goto_2
.end method
Done. Now you have notification icon show on status bar, but it covered by the notch. Next, we going to edit layout file to show notification icon
Edit status bar layout
Just need to replace status_bar.xml attach below to exist one in res/layout folder
For one who have knowledge about editting xml layout file, you can edit layout file to what you prefered.
Edit dimension (Optional)
Edit dimension for smaller clock size and smaller notification icon size
Open res/values/dimens.xml and find code to edit
For clock size. Mine is 9.0sp:
Code:
<dimen name="status_bar_clock_size">11.5sp</dimen>
For clock padding. Mine is 2.0dp
Code:
<dimen name="status_bar_clock_end_padding">3.0dip</dimen>
Code:
<dimen name="status_bar_clock_starting_padding">3.0dip</dimen>
For notification icon size. Mine is 10dp:
Code:
<dimen name="status_bar_icon_size">13.0dip</dimen>
You can edit another dimensions like status_bar_notification_icon_padding for notification icon padding, status_bar_padding_start for statusbar padding...
Recompile APK and use it. Again, dont forget to run "adb shell settings put system status_bar_show_notification_icon 1" from CMD
Problem fixing:
1. For one who facing problem with pip_dismiss_scrim.9.png when recompiling, download attachment below, unzip it and override exist one
2. Statusbar missing after reboot:
- Open both original MiuiSystemUI.apk and recompiled MiuiSystemUI.apk in winrar.
- Replace classes.dex from new apk to original one
- Replace status_bar.xml from new apk to original one
- Replace resources.arsc from new apk to original only if you modify dimens
- Use the original with replaced files
Thanks for reading. Any idea/comments would be appriciated
Bonus: Here my mod for Mi8 SE using 8.9.20 ROM. Backup and flash via twrp:
https://drive.google.com/file/d/1Huq9zcHtOHs9bQL80U8ikqaW-fLCEEXC/view

Thanks for your great tutorial.

Guml3y said:
Thanks for your great tutorial.
Click to expand...
Click to collapse
You're welcome

I'm trying to apply it on MI 8 SE (sirius) w/o success
I'm a beginner...could you pls check my steps below
miuisystemui.apk decompiled but I didn't find smali files... I used ui.apk extract fm zip archive downloaded...I need to use the original one on my phone?

lerch82 said:
I'm trying to apply it on MI 8 SE (sirius) w/o success
I'm a beginner...could you pls check my steps below
miuisystemui.apk decompiled but I didn't find smali files... I used ui.apk extract fm zip archive downloaded...I need to use the original one on my phone?
Click to expand...
Click to collapse
You must to decompile using apktool or another, with properly installed framework. MiuiSystemUI.apk from your phone or zip rom for your phone accepted

Thank you for this tutorial!!
But i've and error with the pip_dismiss_scrim.9.png
This is the error i got with original MiuiSystemUI.apk recompile:
Code:
W: ERROR: 9-patch image C:\Users\user\Desktop\ApkTool\ApkTool\MiuiSystemUI\res\drawable-xxhdpi\pip_dismiss_scrim.9.png malformed.
W: No marked region found along edge.
W: Found along left edge.
W: ERROR: Failure processing PNG image C:\Users\user\Desktop\ApkTool\ApkTool\MiuiSystemUI\res\drawable-xxhdpi\pip_dismiss_scrim.9.png
So i've replaced the PNG with the one you provided, but now i've another error:
Code:
W: ERROR: 9-patch image C:\Users\user\Desktop\ApkTool\ApkTool\MiuiSystemUI\res\drawable-xxhdpi\pip_dismiss_scrim.9.png malformed.
W: Image must be at least 3x3 (1x1 without frame) pixels.
W: ERROR: Failure processing PNG image C:\Users\user\Desktop\ApkTool\ApkTool\MiuiSystemUI\res\drawable-xxhdpi\pip_dismiss_scrim.9.png

gulp79 said:
Thank you for this tutorial!!
But i've and error with the pip_dismiss_scrim.9.png
This is the error i got with original MiuiSystemUI.apk recompile:
Click to expand...
Click to collapse
I've updated attachment for this 9-patch. XDA has problem while downloading 9-patch attach directly

Trần Anh VN said:
I've updated attachment for this 9-patch. XDA has problem while downloading 9-patch attach directly
Click to expand...
Click to collapse
All ok now! Thank you!

gulp79 said:
All ok now! Thank you!
Click to expand...
Click to collapse
Glad to hear that

Trần Anh VN said:
You must to decompile using apktool or another, with properly installed framework. MiuiSystemUI.apk from your phone or zip rom for your phone accepted
Click to expand...
Click to collapse
many thanks

Hi! Can i flash bonus file for miui eu stable OEBCNFH??

Thank you very much for mod!!!
One different question!!
What tempered glass do you have? It seems to have great fit. Every one that i bought (cheap ones) was rubbish.
Thanks again

gulp79 said:
Thank you for this tutorial!!
But i've and error with the pip_dismiss_scrim.9.png
This is the error i got with original MiuiSystemUI.apk recompile:
Code:
W: ERROR: 9-patch image C:\Users\user\Desktop\ApkTool\ApkTool\MiuiSystemUI\res\drawable-xxhdpi\pip_dismiss_scrim.9.png malformed.
W: No marked region found along edge.
W: Found along left edge.
W: ERROR: Failure processing PNG image C:\Users\user\Desktop\ApkTool\ApkTool\MiuiSystemUI\res\drawable-xxhdpi\pip_dismiss_scrim.9.png
So i've replaced the PNG with the one you provided, but now i've another error:
Code:
W: ERROR: 9-patch image C:\Users\user\Desktop\ApkTool\ApkTool\MiuiSystemUI\res\drawable-xxhdpi\pip_dismiss_scrim.9.png malformed.
W: Image must be at least 3x3 (1x1 without frame) pixels.
W: ERROR: Failure processing PNG image C:\Users\user\Desktop\ApkTool\ApkTool\MiuiSystemUI\res\drawable-xxhdpi\pip_dismiss_scrim.9.png
Click to expand...
Click to collapse
hellow
change that file by the same name, but change to jpg extension and remove the png
fixed up
regards
---------- Post added at 12:51 PM ---------- Previous post was at 12:48 PM ----------
thanks man:
we will use it, as long as the Chinese do not fix it
a greeting

lmj2261 said:
Hi! Can i flash bonus file for miui eu stable OEBCNFH??
Click to expand...
Click to collapse
Not sure but you can try

ageloskalp said:
Thank you very much for mod!!!
One different question!!
What tempered glass do you have? It seems to have great fit. Every one that i bought (cheap ones) was rubbish.
Thanks again
Click to expand...
Click to collapse
Try to find full glue tempered glass with black border. They call 5D, 6D...
Like this

Can you make a flashable zip for lastest stable eu?
Thanks in advance.
(Em cảm ơn)

any direct and easy flashable zip available. just download and flash over twrp on xiaomi.eu stable rom?

thanhnvt194 said:
Can you make a flashable zip for lastest stable eu?
Thanks in advance.
(Em cảm ơn)
Click to expand...
Click to collapse
Plabon7 said:
any direct and easy flashable zip available. just download and flash over twrp on xiaomi.eu stable rom?
Click to expand...
Click to collapse
Finding a way to make a flashable zip which work for all devices, all version of rom. Not sure I can right now

Seem like android P for mi 8 has a little bit different. Waiting for update
Code:
.method public hideNotificationIconArea(Z)V
.locals 1
invoke-static {}, Lcom/android/systemui/Util;->isNotch()Z
move-result v0
if-nez v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->mNotificationIconAreaInner:Landroid/view/View;
invoke-direct {p0, v0, p1}, Lcom/android/systemui/statusbar/phone/CollapsedStatusBarFragment;->animateHide(Landroid/view/View;Z)V
:cond_0
return-void
.end method

I have installed the zip file but only 3 points appear in the notification bar, do not see the icons
What should I do to finish seeing the icons in the notification bar and thanks for this help

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

[GUIDE][MOD][GB]Settings Shortcut in StatusBar [New method] 25/02/2013

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

[MOD][GUIDE][JB 4.1.2][MULTI-THREAD/NATIVE] Lockscreen Blur Effect/MULTITHREAD

Lockscreen Blur Effect
EDIT : Updated guide with Native function. Now it is ~60% faster​
I wanna share this mod with you which i made for my HarshJelly ROM. Before starting guide let's see what it does. Actually idea came from GravityBox Module.
What it does : It'll simply blur the background activity which you left before locking device (something like iOS 7's notification bar). Here are some caps to make it more clear.
{
"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"
}
Yeah this mod is compatible with all Lockscreens (AOSP, Sammy's circle lockscreen, pattern etc). I tested this mod on my SGSA running stock TW 4.1.2. Since all TW roms are almost same, it should work on all TW 4.1.2 ROMs.
Before starting tutorial, let me clear one thing that i won't respond to posts without full log. If you found any difficulty, feel free to ask me but please keep in mind above sentence.
What is required?
android.policy.jar
Apktool
Notepad++
So, let's begin...
Decompile android.policy.jar
Navigate to : com\android\internal\policy\impl\sec
Download attached file, extract it and put WallpaperWidget$1.smali to above folder.
In the same folder, open WallpaperWidget.smali
before #instance field add following code
Code:
# static fields
.field static mutex_acquired:Z
Search for .field private mEnhancedWallpaper:Lcom/android/internal/policy/impl/sec/EnhancedWallpaperWidget; and add this below it
Code:
.field private mHandler:Landroid/os/Handler;
Search for iput-boolean v2, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mIsLiveWallpaper:Z and add this below
Code:
new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mHandler:Landroid/os/Handler;
after # direct methods add following code
Code:
.method static constructor <clinit>()V
.locals 1
const-string v0, "harsh"
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
const/4 v0, 0x1
sput-boolean v0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mutex_acquired:Z
return-void
.end method
Now search for .method public constructor <init>(Landroid/content/Context;Landroid/content/res/ConfigurationV and replace whole method with following :
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/content/res/Configuration;)V
.locals 5
const/4 v4, 0x0
const/4 v3, -0x1
const/4 v2, 0x1
invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
const-string v0, "WallpaperWidget"
iput-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->TAG:Ljava/lang/String;
iput-boolean v2, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mIsLiveWallpaper:Z
new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mHandler:Landroid/os/Handler;
const/4 v0, 0x0
iput-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
const-string v0, "/data/data/com.sec.android.gallery3d/lockscreen_wallpaper.jpg"
iput-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->PORTRAIT_WALLPAPER_IMAGE_PATH:Ljava/lang/String;
iput-object p1, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mContext:Landroid/content/Context;
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "lockscreen_wallpaper"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-ne v0, v2, :cond_0
iput-boolean v4, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mIsLiveWallpaper:Z
:cond_0
iget-boolean v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mIsLiveWallpaper:Z
if-eqz v0, :cond_1
:goto_0
return-void
:cond_1
new-instance v0, Landroid/widget/ImageView;
invoke-direct {v0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
sget-object v1, Landroid/widget/ImageView$ScaleType;->CENTER_CROP:Landroid/widget/ImageView$ScaleType;
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
invoke-virtual {p0, v0, v3, v3}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->addView(Landroid/view/View;II)V
invoke-direct {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->BlurImage()V
goto :goto_0
.end method
.method private BlurImage()V
.locals 2
new-instance v0, Ljava/lang/Thread;
new-instance v1, Lcom/android/internal/policy/impl/sec/WallpaperWidget$1;
invoke-direct {v1, p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget$1;-><init>(Lcom/android/internal/policy/impl/sec/WallpaperWidget;)V
invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V
invoke-virtual {v0}, Ljava/lang/Thread;->start()V
return-void
.end method
.method static synthetic access$0(Lcom/android/internal/policy/impl/sec/WallpaperWidget;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;I)V
.locals 0
invoke-direct {p0, p1, p2, p3}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->blurImage(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;I)V
return-void
.end method
.method static synthetic access$1(Lcom/android/internal/policy/impl/sec/WallpaperWidget;)Landroid/os/Handler;
.locals 1
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mHandler:Landroid/os/Handler;
return-object v0
.end method
.method private native blurImage(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;I)V
.end method
Now search for # virtual methods and add this code after it
Code:
.method public updateWallpaper()V
.locals 3
const-string v1, "/data/data/com.sec.android.gallery3d/lockscreen_wallpaper.jpg"
iput-object v1, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mWallpaperPath:Ljava/lang/String;
new-instance v0, Landroid/graphics/drawable/BitmapDrawable;
invoke-virtual {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->getResources()Landroid/content/res/Resources;
move-result-object v1
iget-object v2, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mWallpaperPath:Ljava/lang/String;
invoke-direct {v0, v1, v2}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Ljava/lang/String;)V
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
return-void
.end method
Follow xperiacle's guide for TRANSPARENT STATUSBAR on lockscreen http://forum.xda-developers.com/showthread.php?t=2384892 (this is required, don't worry, it won't make it transparent)
From the extracted files, push libharsh.so to /system/lib/libharsh.so and chmod it to 644 (rw-r--r--)
Make sure that /data/data/com.sec.android.gallery3d/lockscreen_wallpaper.png & /data/data/com.sec.android.gallery3d/lockscreen_wallpaper.jpg file exists before you reboot your device. If it doesn't then put any valid png file there with name lockscreen_wallpaper.png/lockscreen_wallpaper.jpg and chmod it to 777
We're done :highfive: compile it and push it to device :good:
To add toggle for it, read here
Click to expand...
Click to collapse
What we're doing here?
Basically we are taking screenshot when device is getting locked and then we apply blur effect and sets it as wallpaper.
I know there are many way's to do it but i've preferred hacking WallpaperWidget's constructor. You can go for another way if you want.
Another thing to tell is that it depend on you device that how much time it'll require to do this process. On my device it nearly take 2 seconds (it depends on background). Multithreading can also be used. Read second post for more info and other tweaks., By default we're using Multi threading
Tips, Tricks & FAQs
Bugs & Remedies :
If multithreading is not enabled & device is woke up suddenly after locking then sometimes device stays unlocked for a moment --> Enabled multithreading or don't wake up device soon after locking it
[*] When mutithreading is enabled & device is suddenly woke up (soon after locking), it shows older image --> Disable mutithreading or don't wake up device soon after locking it
All bug are solved..
Click to expand...
Click to collapse
As this tutorial is written for 4.1.2 (API 16), we don't have native image processing support (which came in API 17).This is the reason why it takes long time to blur image. As told above, i' trying to implement native method for blurring image anybody interested in it can help me.
Tweaks :
Blur Radius : (Value in Hex)
Code:
.local v4, out:Landroid/graphics/Bitmap;
const/16 v5, [COLOR="Red"]0x19[/COLOR]
(lower radius --> better performance)
JPEG Quility: (Value in Hex)
Code:
.local v1, bytes:Ljava/io/ByteArrayOutputStream;
sget-object v5, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;
const/16 v6, [COLOR="red"]0x64[/COLOR]
Lower Quality --> better performance, weird colors
Click to expand...
Click to collapse
Changelog:
26th May 2014 --> Solved bug with delay while locking, Uses Multi Threading by default
xth February 2014 --> Native function Implementation (x > 6 )
6th February 2014 --> Initial Release
Click to expand...
Click to collapse
GReat Work!!!!!!
Amazing Job, Harsh as usual you surprise us every time....Man keep it UP!!
Thankz a Ton..!:good::good::good::good::good::good::good:
when i use this, can i still use normal wallpapers if i want? or does that need a toggle or something like that?
mjz2cool said:
when i use this, can i still use normal wallpapers if i want? or does that need a toggle or something like that?
Click to expand...
Click to collapse
+1
@BOOTMGR, Please make a short tutorial (if possible) for setting up a Toggle to switch it on or off from the Settings app :good:
Updated thread with new implementation. Now we are using Native function to blur image which is ~60% faster than previous implementation. Follow tutorial again if you've already done so.
mjz2cool said:
when i use this, can i still use normal wallpapers if i want? or does that need a toggle or something like that?
Click to expand...
Click to collapse
Sami Kabir said:
+1
@BOOTMGR, Please make a short tutorial (if possible) for setting up a Toggle to switch it on or off from the Settings app :good:
Click to expand...
Click to collapse
Adding toggle in secsetting is easy but only reason behind not providing it is that some people would have enabled AOSP lockscreen in that case method will be slightly different. But you can follow this tutorial to add toggle for it using build.prop
How to add Toggle :
Follow main tutorial
Inside WallpaperWidget.smali, search for invoke-direct {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->BlurImage()V and add following code above it
Code:
const-string v0, "ro.harsh.blurlockscreen"
invoke-static {v0, v2}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v0
if-eqz v0, :cond_2
Search below for .end method (2 - 3 lines down) and add this below it
Code:
:cond_2
invoke-direct {p0}, Lcom/android/internal/policy/impl/sec/WallpaperWidget;->setLockScreenWallpaper()V
goto :goto_0
That's all. Compile it.
Now you can toggle its state by adding ro.harsh.blurlockscreen=true or ro.harsh.blurlockscreen=false
You can also type in terminal setprop ro.harsh.blurlockscreen true/false to toggle state on the fly.
Click to expand...
Click to collapse
off topic: You keep doing stock jb more and more better
I'm Sorry But i'm Naive I cannot Follow this tutorial Can you Make a Flashable zip Plz Plz Plz Plz Plzzzzzzzzzzzzzzzzzzzzz
rajeev994 said:
I'm Sorry But i'm Naive I cannot Follow this tutorial Can you Make a Flashable zip Plz Plz Plz Plz Plzzzzzzzzzzzzzzzzzzzzz
Click to expand...
Click to collapse
He did on his ROM.
shut_down said:
He did on his ROM.
Click to expand...
Click to collapse
No he did not I'm using his harshjelly
Even if he did can you tell me how to do that
Sent from my GT-I9070 using Tapatalk 4
rajeev994 said:
No he did not I'm using his harshjelly
Even if he did can you tell me how to do that
Sent from my GT-I9070 using Tapatalk 4
Click to expand...
Click to collapse
It is written here step by step what to do.
If it is not, then I am sure he will add it to next release.
Upgrading Android OS...
Opening apllications...
I'm getting this again and again after I reboot my device, I think the files aren't compatible with my 4.1.2 TW deodexed..
but this mod looks so cool, I want this
http://www.xda-developers.com/android/blur-the-lock-screen-on-your-samsung-galaxy-s-advance/
You got to the portal
Seems interesting, great work! btw is this tut possible for CM11 roms? I would like to try compiling this on our CM11 builds
Is there anyway to make this into an xposed module?
Geddd said:
Upgrading Android OS...
Opening apllications...
I'm getting this again and again after I reboot my device, I think the files aren't compatible with my 4.1.2 TW deodexed..
but this mod looks so cool, I want this
Click to expand...
Click to collapse
It should be. Check again that & make sure you did everything properly. Did you pushed libharsh.so to /system/lib and changed its permission?
JovieBrett said:
Seems interesting, great work! btw is this tut possible for CM11 roms? I would like to try compiling this on our CM11 builds
Click to expand...
Click to collapse
You can do it easily by Xposed. Gravitybox doesnot suppot this on 4.1.2 because of unavailable API
francop311 said:
Is there anyway to make this into an xposed module?
Click to expand...
Click to collapse
Making this available through xposed is very easy. I make module later when i'll be free.
Awesoem!!! Looks Cool!
BOOTMGR said:
It should be. Check again that & make sure you did everything properly. Did you pushed libharsh.so to /system/lib and changed its permission?
Yes bro, I did follow the steps carefully and push the lib file (rw-r-r). I tried to do it again now it boot up but my homescreen is just blinking with black screen. If you have enough time can you please check my work?
here's my output classout folder and my untouched android policy..
if you're just not busy bro, I can wait. Thank you.
Click to expand...
Click to collapse
Geddd said:
BOOTMGR said:
It should be. Check again that & make sure you did everything properly. Did you pushed libharsh.so to /system/lib and changed its permission?
Yes bro, I did follow the steps carefully and push the lib file (rw-r-r). I tried to do it again now it boot up but my homescreen is just blinking with black screen. If you have enough time can you please check my work?
here's my output classout folder and my untouched android policy..
if you're just not busy bro, I can wait. Thank you.
Click to expand...
Click to collapse
Compile attached sources (don't forget to add META-INF folder). There were some additional things in your constructor. Please if it doesn't work then provide me full log.
Click to expand...
Click to collapse
BOOTMGR said:
Geddd said:
Compile attached sources (don't forget to add META-INF folder). There were some additional things in your constructor. Please if it doesn't work then provide me full log.
Click to expand...
Click to collapse
Still no luck sorry but I don't know how to make a log/logcat..
Anyway, but thanks again sir.
Click to expand...
Click to collapse

[MOD - LG L9-II] Adv Power menu, Back Long Press Kill app, Trans status

This is some mods for LG L9-II Stock ROM.
{
"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"
}
Required ROOT
Advanced Power Menu
Reboot - Hot Boot - Download - Recovery - Shutdown
Got the idea from this thread
Long Press back key -> kill app
Long pressing the Back key will kill the foreground app
Idea from here
Transparent status bar ready
I mean, edits made to android.policy.jar, so a user can change the status bar as will:
1. Open yours LGSystemUI.apk with 7zip and replace (drag & drop) the \res\drawable\xhdpi\stat_sys_indi_bg.png with any png image you want as status bar (rename it first to stat_sys_indi_bg.png).
2. Put back the LGSystemUI.apk to /system/app folder.
How to install (ONLY for stock ODEX version)
Download file(s) from this post and put to sd card.
Install it with CWM from Varcain (install zip from sdcard)
More edits to come...
Thanks mate, but there's no \res\drawable\xhdpi\stat_sys_indi_bg.png location, just \res\drawable-hdpi\stat_sys_indi_bg.png so i am missing something??
Is your phone LG L9-II?
Very useful mod
thanks
UserXP_ said:
This is some mods for LG L9-II Stock ROM.
Required ROOT
Advanced Power Menu
Reboot - Hot Boot - Download - Recovery - Shutdown
Got the idea from this thread
Long Press back key -> kill app
Long pressing the Back key will kill the foreground app
Idea from here
Transparent status bar ready
I mean, edits made to android.policy.jar, so a user can change the status bar as will:
1. Open yours LGSystemUI.apk with 7zip and replace (drag & drop) the \res\drawable\xhdpi\stat_sys_indi_bg.png with any png image you want as status bar (rename it first to stat_sys_indi_bg.png).
2. Put back the LGSystemUI.apk to /system/app folder.
How to install (ONLY for stock ODEX version)
Download file(s) from this post and put to sd card.
Install it with CWM from Varcain (install zip from sdcard)
More edits to come...
Click to expand...
Click to collapse
hi, what did you modified in the android.policy i am tring for weeks to make a transparent status bar for l5 II without succes. thanks sorry for the english
Transparent StatusBar ready (how to)
After many attempts with no luck, solution was easy:
At folder smali\com\android\internal\policy\impl open the PhoneWindowManager.smali
There you will find (search for something similar in your system) this method:
.method public getSystemDecorRectLw
Code:
.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
.locals 1
.parameter "systemRect"
.prologue
.line 3549
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemLeft:I
iput v0, p1, Landroid/graphics/Rect;->left:I
.line 3550
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I
iput v0, p1, Landroid/graphics/Rect;->top:I
.line 3551
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I
iput v0, p1, Landroid/graphics/Rect;->right:I
.line 3552
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I
iput v0, p1, Landroid/graphics/Rect;->bottom:I
.line 3553
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
[COLOR="Red"]goto :cond_1[/COLOR]
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
.line 3555
:goto_0
return v0
.line 3554
:cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
goto :goto_0
.line 3555
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
So, inside I just add the
goto :cond_1
to jump the getSurfaceLayer
That's all.
Now, you can change the background by changing the \res\drawable\xhdpi\stat_sys_indi_bg.png
NOTE for LGHome (if this is your launcher)
In order to change the status bar with LGHome we must edit/change the LGHome.apk also.
for LGHome v. 3.0 can be done with some trick,
but BETTER
use LGHome v 4.0 (edited from LG G2) from here (has 5 columns also)
UserXP_ said:
Transparent StatusBar ready (how to)
After many attempts with no luck, solution was easy:
At folder smali\com\android\internal\policy\impl open the PhoneWindowManager.smali
There you will find (search for something similar in your system) this method:
.method public getSystemDecorRectLw
Code:
.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
.locals 1
.parameter "systemRect"
.prologue
.line 3549
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemLeft:I
iput v0, p1, Landroid/graphics/Rect;->left:I
.line 3550
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I
iput v0, p1, Landroid/graphics/Rect;->top:I
.line 3551
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I
iput v0, p1, Landroid/graphics/Rect;->right:I
.line 3552
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I
iput v0, p1, Landroid/graphics/Rect;->bottom:I
.line 3553
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
[COLOR="Red"]goto :cond_1[/COLOR]
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
.line 3555
:goto_0
return v0
.line 3554
:cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
goto :goto_0
.line 3555
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
So, inside I just add the
goto :cond_1
to jump the getSurfaceLayer
That's all.
Now, you can change the background by changing the \res\drawable\xhdpi\stat_sys_indi_bg.png
NOTE for LGHome (if this is your launcher)
In order to change the status bar with LGHome we must edit/change the LGHome.apk also.
for LGHome v. 3.0 can be done with some trick,
but BETTER
use LGHome v 4.0 (edited from LG G2) from here (has 5 columns also)
Click to expand...
Click to collapse
thanks for the help but i cant recompoile the android.policy i get smali error that cond_1 not defined
Post the
.method public getSystemDecorRectLw(Landroid/graphics/RectI
here
UserXP_ said:
Post the
.method public getSystemDecorRectLw(Landroid/graphics/RectI
here
Click to expand...
Click to collapse
.method public getSystemDecorRectLw(Landroid/graphics/RectI
.registers 3
.parameter "systemRect"
.prologue
.line 3213
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemLeft:I
iput v0, p1, Landroid/graphics/Rect;->left:I
.line 3214
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I
iput v0, p1, Landroid/graphics/Rect;->top:I
.line 3215
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I
iput v0, p1, Landroid/graphics/Rect;->right:I
.line 3216
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I
iput v0, p1, Landroid/graphics/Rect;->bottom:I
.line 3217
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
.line 3219
:goto_1a
return v0
.line 3218
:cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_26
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
goto :goto_1a
.line 3219
:cond_26
const/4 v0, 0x0
goto :goto_1a
.end method
---------- Post added at 08:43 AM ---------- Previous post was at 08:37 AM ----------
and did you used smali and baksmali to modify the odex file?
For you the correct command is
goto :cond_26
before the command
if-eqz v0, :cond_1b
If you have an ODEX rom, you can NOT simply change the odex file at /system/framework.
You must Re-Odex the jar file, using your phone.
I use xdaAutoDEOTool v1.0.3 for De-Odex jar files.
After, I use apktool for decompiling/compiling and Notepad++ for editing.
At end I use a script for Re-Odex the edited jar file, inside phone (required root and busybox)
[There are scripts for this (carefull with bootclasspath). I use my own]
In case something goes wrong with Re-Odex, you must have a way to restore system (a .zip file with original .jar and .odex file to install with CWM?)
UserXP_ said:
For you the correct command is
goto :cond_26
before the command
if-eqz v0, :cond_1b
If you have an ODEX rom, you can NOT simply change the odex file at /system/framework.
You must Re-Odex the jar file, using your phone.
I use xdaAutoDEOTool v1.0.3 for De-Odex jar files.
After, I use apktool for decompiling/compiling and Notepad++ for editing.
At end I use a script for Re-Odex the edited jar file, inside phone (required root and busybox)
[There are scripts for this (carefull with bootclasspath). I use my own]
In case something goes wrong with Re-Odex, you must have a way to restore system (a .zip file with original .jar and .odex file to install with CWM?)
Click to expand...
Click to collapse
thanks man, it seems that this piece of crap phone doesn't wan't to boot if i modify the android.policy.
wooooo such a nice look for LG L9 II
UserXP_ said:
This is some mods for LG L9-II Stock ROM.
Click to expand...
Click to collapse
How did you write your name on the status bar?
Thank you.

Samsung Galaxy Note 4 Phone Mods Thread-Guides & Links Updated 12/3/2014

Howdy I have been compiling a list mods for the Verizon Note 4, but most should work across all variants!!
{
"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"
}
This thread is posted in the Samsung Galaxy Note 4 Unified Development Thread and can be viewed across all Note 4 Variants.
This is and will always be a work in progress, so feel free to contribute and please do!!!!
This thread assumes you know how to decompile and compile using APKTOOL.
Enjoy!!!
[Guide How-to] Verizon Note 4 Remove CD Installer & ASEC Note 4
This removes the annoying CD installer that pops up when you plug into your computer and your phone will go straight to MTP.
Enjoy!!
Remove CD Installer Download: http://d-h.st/Wm7
Just flash with TWRP
[Guide How-to] Verizon Note 4 Enable Native Call Recording Note 4
Smali edit for InCallUI.apk:
com/android/services/telephony/common/PhoneFeature.smali
Add the lines that are highlighted in RED
Code:
const-string v3, "CscFeature_VoiceCall_ConfigRecording"
invoke-virtual {v0, v3}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
[COLOR="Red"]const-string v0, "RecordingAllowed"[/COLOR]
.line 1693
sget-object v3, Lcom/android/services/telephony/common/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v6, "voice_call_recording"
const-string v7, "RecordingAllowed"
const-string v3, "CscFeature_VoiceCall_ConfigRecording"
invoke-virtual {v0, v3}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v0, "RecordingAllowed"
.line 1693
sget-object v3, Lcom/android/services/telephony/common/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v6, "voice_call_recording"
const-string v7, "RecordingAllowed"
For those not capable of doing smali edits just flash this via TWRP. Enable Call Recording
[Guide How-to] Remove Lockscreen Carrier Note 4
This removes the lockscreen carrier text.
Keyguard.apk smali edit:
smali/com/android/keyguard/CarrierText.smali:
Change if-nez to if-eqz in the indicated edit in BLUE:
Code:
.method private static concatenate(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
.locals 5
.param p0, "plmn" # Ljava/lang/CharSequence;
.param p1, "spn" # Ljava/lang/CharSequence;
.prologue
const/4 v2, 0x1
const/4 v3, 0x0
.line 310
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v4
[COLOR="Blue"]if-eqz[/COLOR] v4, :cond_1
move v0, v2
For those of you not capable of smali edit's, just flash this via TWRP Remove Lock Screen Carrier Text
[Guide How-to] Remove Safe Volume Warning Note 4
This removes the safe volume warning that pops up when you turn up the volume beyond a certain point
This mod requires modifying framework.jar
Edit smali/android/media/AudioService.smali:
Changes are in .method private checkSafeMediaVolume(III)Z
, new lines are in BLUE:
Code:
iget-object v6, p0, Landroid/media/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v6
[COLOR="Blue"]goto :goto_td[/COLOR]
if-ne v6, v7, :cond_4
Code:
goto :goto_1
.line 6873
.end local v0 # "e":Ljava/lang/Exception;
.end local v1 # "pm":Landroid/os/PowerManager;
.end local v3 # "wl":Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"]:goto_td[/COLOR]
:cond_4
monitor-exit v5
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
goto :goto_0
.end method
For those not capable of smali edit's just flash this in TWRP Remove Safe Volume Warning
[Guide How-To] Enable Call & MSG Blocking Note 4
This enables call and msg blocking natively.
Simple CSC edit.
system/csc/feature.xml edit
Must be inserted BEFORE
</FeatureSet>
</SamsungMobileFeature>
(** please note that feature.xml can be overwritten so this may not stick if using a third party software like Xposed)
Code:
<CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
For those of you not capable of this edit, just flash this with TWRP Native Call & Message Block
[Guide How-to] Replace Recents with Menu Note 4
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from APP_SWITCH to MENU
key 254 MENU
Download: Generic.kl
Now Recent Apps capacitive key is Menu (single-press) and Search (long-press).
However, we have now lost access to recent apps via a hardware key.
[Guide How-to] VZW Note 4 4 Way Reboot Power Menu EPM Note 4
This will work with Odex or Deodexed Rom. To see the 4 way Menu you must hit restart on the Primary Menu!!!
First grab your Deodexed android.policy.jar from system/framework
Decompile it with APKTOOL. Look in smali\com\android\internal\policy\impl\
Find GlobalActions$SinglePressAction.smali and open with NotePad++
Look for this:
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
# instance fields
.field public customAction:I
.field public isKnoxCustom:Z
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field mLayoutId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
.method protected constructor <init>(II)V
.locals 2
.param p1, "iconResId" # I
.param p2, "messageResId" # I
Add in the Red Text to look like this:
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
[COLOR="Red"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
# instance fields
.field public customAction:I
.field public isKnoxCustom:Z
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field mLayoutId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
[COLOR="Red"].method static constructor <clinit>()V
.locals 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Boot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method[/COLOR]
.method protected constructor <init>(II)V
.locals 2
.param p1, "iconResId" # I
.param p2, "messageResId" # I
Save file and look for GlobalActions.smali in the same folder.
Find this:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1126
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$8;
const-string v2, "VZW"
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
const v2, 0x1080b2d
:goto_2
const v4, 0x10401cf
move-object/from16 v0, p0
invoke-direct {v3, v0, v2, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1164
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
Change the red text to look like this:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1126
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];
const-string v2, "VZW"
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
const v2, 0x1080b2d
:goto_2
const v4, 0x10401cf
move-object/from16 v0, p0
invoke-direct {v3, v0, v2, v4}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1164
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
Save file.
Add the 3 smali files in this zip to the same folder: Smali-Files-Zip
Now recompile. That's it.
For those of you not able to edit smali. Here is a zip flashable with TWRP. VZW Note 4 4 Way EPM Menu
To see the 4 way Menu you must hit restart on the Primary Menu!!!
Enjoy!!!
Framework Mods- Note 4 Native WiFi Tether, All Rotations, Safe Media Volume Disabled, Dreams enabled, Battery Critical Warnings lowered to 1%.
Here is the download: Framework Mods
Here is the download to return to stock: Stock Framework
Enjoy!!!
[Guide How-to] Remove NFC notification icon in status bar Note 4
First grab your Features.xml from /system/csc/
Open with Notepad++ and look for following text:
Code:
<!-- NFC -->
<CscFeature_NFC_SetSecureEventType>ISIS</CscFeature_NFC_SetSecureEventType>
<CscFeature_NFC_StatusBarIconType>Vzw</CscFeature_NFC_StatusBarIconType>
<CscFeature_SmartcardSvc_SetAccessControlType>GPAC, MODE1</CscFeature_SmartcardSvc_SetAccessControlType>
<CscFeature_SmartcardSvc_HideTerminalCapability>eSE</CscFeature_SmartcardSvc_HideTerminalCapability>
<CscFeature_NFC_CardModeRoutingTypeForUicc>ROUTE_ON_WHEN_SCREEN_UNLOCK</CscFeature_NFC_CardModeRoutingTypeForUicc>
<CscFeature_NFC_EnableSecurityPromptPopup>all</CscFeature_NFC_EnableSecurityPromptPopup>
<CscFeature_NFC_EnableInvalidTagPopup>true</CscFeature_NFC_EnableInvalidTagPopup>
<CscFeature_NFC_ConfigAdvancedSettings>Disable</CscFeature_NFC_ConfigAdvancedSettings>
<CscFeature_NFC_DefaultCardModeConfig>DH:UICC</CscFeature_NFC_DefaultCardModeConfig>
Change the red text to look like this:
Code:
<!-- NFC -->
<CscFeature_NFC_SetSecureEventType>ISIS</CscFeature_NFC_SetSecureEventType>
<CscFeature_NFC_StatusBarIconType>[COLOR="Red"]none[/COLOR]</CscFeature_NFC_StatusBarIconType>
<CscFeature_SmartcardSvc_SetAccessControlType>GPAC, MODE1</CscFeature_SmartcardSvc_SetAccessControlType>
<CscFeature_SmartcardSvc_HideTerminalCapability>eSE</CscFeature_SmartcardSvc_HideTerminalCapability>
<CscFeature_NFC_CardModeRoutingTypeForUicc>ROUTE_ON_WHEN_SCREEN_UNLOCK</CscFeature_NFC_CardModeRoutingTypeForUicc>
<CscFeature_NFC_EnableSecurityPromptPopup>all</CscFeature_NFC_EnableSecurityPromptPopup>
<CscFeature_NFC_EnableInvalidTagPopup>true</CscFeature_NFC_EnableInvalidTagPopup>
<CscFeature_NFC_ConfigAdvancedSettings>Disable</CscFeature_NFC_ConfigAdvancedSettings>
<CscFeature_NFC_DefaultCardModeConfig>DH:UICC</CscFeature_NFC_DefaultCardModeConfig>
Save file and copy back to /system/csc, reboot and boom its gone!!!
Enjoy!!
[Guide How-to] Enable Private Mode with a deodexed Rom and SecureStorage=false Note 4
First thing you need to do is grab PersonalPageService.apk from system/priv-app
Decompile with APKTOOL
Find PersonalPageService\smali\com\samsung\android\personalpage\service\util\SecureProperties.smali open with Notepad++
Find the follow code:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
.param p1, "context" # Landroid/content/Context;
.prologue
const/4 v1, 0x1
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 54
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 63
invoke-static {}, Landroid/os/Debug;->isProductShip()I
move-result v0
if-nez v0, :cond_3
.line 64
invoke-static {}, Lcom/sec/android/securestorage/SecureStorage;->isSupported()Z
move-result v0
if-nez v0, :cond_2
.line 65
const/4 v0, 0x0
sput-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
.line 72
:goto_0
sget-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
if-eqz v0, :cond_0
Replace the items in Red like this:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
.param p1, "context" # Landroid/content/Context;
.prologue
const/4 v1, 0x1
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 54
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 63
invoke-static {}, Landroid/os/Debug;->isProductShip()I
move-result v0
[COLOR="Red"]if-nez v0, :cond_0[/COLOR]
.line 64
invoke-static {}, Lcom/sec/android/securestorage/SecureStorage;->isSupported()Z
move-result v0
[COLOR="Red"]if-nez v0, :cond_0[/COLOR]
.line 65
const/4 v0, 0x0
sput-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
.line 72
:goto_0
sget-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
if-eqz v0, :cond_0
Save file and compile apk. Push to system/priv-app
For those not capable of changing smali files here is a flashable zip: PersonalPageService.apk
Enjoy!!!
[Guide How-To] Enable Lockscreen Rotation Note 4
First grab Keyguard.apk from system/priv-app
Decompile with APKTOOL.
Open smali file smali/com/android/keyguard/KeyguardViewManager.smali
Look for the following:
Code:
.method private shouldEnableScreenRotation()Z
.locals 3
.prologue
const/4 v1, 0x0
.line 249
iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 250
.local v0, "res":Landroid/content/res/Resources;
const-string v2, "lockscreen.rot_override"
invoke-static {v2, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
Replace the Red text to look like this:
Code:
Code:
.method private shouldEnableScreenRotation()Z
.locals 3
.prologue
[COLOR="Red"]const/4 v1, 0x1[/COLOR]
.line 249
iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 250
.local v0, "res":Landroid/content/res/Resources;
const-string v2, "lockscreen.rot_override"
invoke-static {v2, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
Compile and push to system/priv-app
For those that are unable to edit smali here is a flashable zip: LockSceen Rotation
Enjoy!!
[Guide How-to] Disable Screen Wake Plugged/Unplugged Note 4
First grab your services.jar from system/framework and decompile with APKTOOL
Find smali\com\android\server\power\PowerManagerService .smali and open PowerManagerService with Notepad++
Look for the following:
Code:
.method private shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
.locals 4
.param p1, "wasPowered" # Z
.param p2, "oldPlugType" # I
.param p3, "dockedOnWirelessCharger" # Z
.prologue
const/4 v1, 0x1
const/4 v0, 0x0
.line 2216
iget-boolean v2, p0, Lcom/android/server/power/PowerManagerService;->mWakeUpWhenPluggedOrUnpluggedConfig:Z
if-nez v2, :cond_1
Change to Red text to look like this:
Code:
.method private shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
.locals 4
.param p1, "wasPowered" # Z
.param p2, "oldPlugType" # I
.param p3, "dockedOnWirelessCharger" # Z
.prologue
[COLOR="Red"]const/4 v1, 0x0[/COLOR]
const/4 v0, 0x0
.line 2216
iget-boolean v2, p0, Lcom/android/server/power/PowerManagerService;->mWakeUpWhenPluggedOrUnpluggedConfig:Z
if-nez v2, :cond_1
That's it. Compile and push to system/framework
For those of you not capable of editing smali files here is a flashable zip: Disable Screen Wake Plug/unpluged
Enjoy!!!
[Guide How-to] Bluetooth Scan Dialog Removal
First grab your SecSettings.apk from system/priv-app and decompile with APKTOOL
Find smali/com/android/settings/Bluetooth/BluetoothScanDialog.smali
Look for the follow in .method private initialize()V method:
Code:
.line 79
new-instance v4, Lcom/android/settings/bluetooth/BluetoothScanDialog$3;
invoke-direct {v4, p0, v0}, Lcom/android/settings/bluetooth/BluetoothScanDialog$3;-><init>(Lcom/android/settings/bluetooth/BluetoothScanDialog;Landroid/app/AlertDialog;)V
invoke-virtual {v0, v4}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V
.line 86
[COLOR="Red"]invoke-virtual {v0}, Landroid/app/Dialog;->show()V[/COLOR]
.line 87
return-void
.end method
Delete the text in Red, save file and compile. That's it. push to system/priv-app
Enjoy!!!
Flashlight Toggle & Battery Stats Toggle Mod Flashable-Settings-About Phone-Status-OFFICIAL Zip Updated 12-3-2014
Here is the flashable Flashlight Toggle Mod: VZW Flash Light Battery Stats Toggle Mod-Official Status
YOU MUST WAIT AT LEAST 5-10 MINS AFTER FLASHING FOR THE MOD TO WORK.
Some of you might also have to add "Flashlight" to your settings DB via SQLite. To see the toggle.
1) Download sqlite editor app. I got it from here.
2) Open the app and give it root permissions. It should populate a list.
3) Scroll and Tap the "Settings Storage"
4) Tap "Settings.db"
5) Tap "System"
6) Scroll down until you find "notification_panel_active_app_list", tap to highlight it. I noticed its a little hard to get it highlighted because it seems to want to highlight the one under it. So you might have to tap the one right above it to get it highlighted. Make sure its the notification_panel_active_app_list, and I also updated my notification_panel_active_app_list_reset NOT the notification_panel_default_active_app_list. I picked the wrong one the first time and it didnt work.
7) Once it is highlighted tap the phones menu button.
8) Tap "Edit Record"
9) You'll see a list of all the toggles that are currently enabled to show in notification area.
10) At the bottom of the list or anywhere else in the list add ; and the words Flashlight and Battery then another ;. So it will look like this at the end. ;TouchSensitivity;Flashlight;Battery; Then press Save.
11) Reboot and you should have a Flashlight and a Battery Stats toggle now. You can now use the edit feature and move it anywhere you want in the list of toggles.
This might also have a positive side effect of the following:
When you go to Settings-About Phone-Status it might say OFFICIAL!!!
Enjoy!!!
Enable Tab view in Settings
First grab your SecSettings.apk from system/priv-app
Decompile with APKTOOL and open res.values/bools with Notepad++
look for the following 2 lines:
Code:
<bool name="settings_list">false</bool>
<bool name="settings_grid">true</bool>
Change them to look like this:
Code:
<bool name="settings_list">[COLOR="Red"]true[/COLOR]</bool>
<bool name="settings_grid">[COLOR="Red"]false[/COLOR]</bool>
That's it. Compile and push to System/priv-app
Enjoy!!
How to enable Flashlight operation with Volume
First grab your SecSettings.apk from system/priv-app and decompile with APKTOOL.
Look in res/xml for display_settings_2014.xml and open with Notepad++
Add the following line in Red. When you are done look in settings-Display and you will see Torch Light options menu
Code:
<CheckBoxPreference android:title="@string/led_indicator_settings" android:key="key_simple_led_indicator_settings" android:summary="@string/led_indicator_settings_summary" android:widgetLayout="@touchwiz:layout/preference_widget_twcheckbox" />
[COLOR="Red"]<PreferenceScreen android:title="@string/torchlight_settings" android:key="torchlight" android:fragment="com.android.settings.torchlight.TorchlightSettings" />[/COLOR]
<ListPreference android:persistent="false" android:entries="@array/touch_key_light_entries" android:title="@string/touch_key_light" android:key="touch_key_light" android:summary="@string/touch_key_light_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/touch_key_light_values" />
Compile and push to system/priv-app
That's it.
Enjoy!!!!
How to Enable add Apps Ops to Settings.
First grab SecSettings.apk from system/priv-app and decompile with APKTOOL
Get gridlist_settings_headers.xml from res/xml and edit with Notepad++
Look for:
Code:
<header android:icon="@drawable/ic_setting_grid_powersaving" android:id="@id/power_saving" android:title="@string/power_saving_mode_title_k" android:fragment="com.android.settings.powersavingmode.MenuPowerSavingModeSettings" />
and add right below it the following:
Code:
<header android:icon="@drawable/ic_settings_applicationpermissions" android:title="@string/app_ops_settings" android:fragment="com.android.settings.applications.AppOpsSummary" />
Save file and compile. That's it.
Push to system/priv-app
Enjoy!!!
Great post...
Will the Wi-Fi tether mod work with the ATT Variant?
thesilentnight said:
Great post...
Will the Wi-Fi tether mod work with the ATT Variant?
Click to expand...
Click to collapse
I have not seen the AT&T firmware. You must be rooted. If you are rooted and want to send me your framework-res.apk I can take a look for you.
Sadly as far as i know, root isnt yet available yet for the ATT variant....
thesilentnight said:
Sadly as far as i know, root isnt yet available yet for the ATT variant....
Click to expand...
Click to collapse
OMG, I'm sooo glad I could write what's written in my signature.
EMSpilot said:
...Here is the flashable Flashlight Toggle Mod...
Click to expand...
Click to collapse
You sir, ROCK!!! Very good work
the "Verizon Note 4 Enable Native Call Recording Note 4"
Will this work on N910G snapdragon variant ? also, does this enable automatic call recording ?
pratik_193 said:
the "Verizon Note 4 Enable Native Call Recording Note 4"
Will this work on N910G snapdragon variant ? also, does this enable automatic call recording ?
Click to expand...
Click to collapse
If you can send me your InCallUI.apk I can take a look. No automatic call recording. When you get a call or make a call you simply tap the call recording button once on the screen.
EMSpilot said:
If you can send me your InCallUI.apk I can take a look. No automatic call recording. When you get a call or make a call you simply tap the call recording button once on the screen.
Click to expand...
Click to collapse
Here it is..
Can you make a modded secphone something we had for note 3 ? link below
http://forum.xda-developers.com/showthread.php?t=2498449
CZ Eddie said:
OMG, I'm sooo glad I could write what's written in my signature.
Click to expand...
Click to collapse
Why is that?
thesilentnight said:
Sadly as far as i know, root isnt yet available yet for the ATT variant....
Click to expand...
Click to collapse
CZ Eddie said:
OMG, I'm sooo glad I could write what's written in my signature.
Click to expand...
Click to collapse
thesilentnight said:
Why is that?
Click to expand...
Click to collapse
My sig is pretty self explanatory in regards to your earlier statement.
I ditched my grandfathered unlimited data plan with AT&T in November 2014 because AT&T won't let anyone root their Galaxy phones.
Hello, T-Mobile!
Click to expand...
Click to collapse
pratik_193 said:
Here it is..
Can you make a modded secphone something we had for note 3 ? link below
http://forum.xda-developers.com/showthread.php?t=2498449
Click to expand...
Click to collapse
Hey @EMSpilot any luck ?
pratik_193 said:
Hey @EMSpilot any luck ?
Click to expand...
Click to collapse
Where did this InCallUI.apk come from? It won't build.
EMSpilot said:
Where did this InCallUI.apk come from? It won't build.
Click to expand...
Click to collapse
i got it from the current ROM i have a N910G snapdragon... you need anything else ?
Hmm, get a whole bunch of errors when trying to decompile SecSettings.apk. I can decompile other apks fine so don't think it's something with my setup.
Code:
W: Skipping "android" package group
W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info
Great post op!!
Did by any chance someone tried this in an international N4?
Awesome thread!
Subscribed!
Thanks contributors!
@EMSpilot
when i try to add the torchlight mod it makes all the checkboxes in the settings menu disappear.
any idea what the problem could be? the mod itself works perfect, but the checkboxes are pretty usefull as well.
thanks in advance :good:
Psycho_666 said:
@EMSpilot
when i try to add the torchlight mod it makes all the checkboxes in the settings menu disappear.
any idea what the problem could be? the mod itself works perfect, but the checkboxes are pretty usefull as well.
thanks in advance :good:
Click to expand...
Click to collapse
What Rom are you running? NJ5? or? The mods are based on NI2. If you are running NJ5 you have to decompile do the mod compile and push back to the phone.
I'm running an ANK5 rom.
but I don't understand how it has anything to do with the checkboxes.
it's pretty frustrating
Sent from my Note 4

Categories

Resources