[MOD][GUIDE][JB 4.1.2][MULTI-THREAD/NATIVE] Lockscreen Blur Effect/MULTITHREAD - Galaxy S Advance I9070 Themes and Apps

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

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

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

[GUIDE] How To Add -Apps Edge/Contacts/Task Panel - For Galaxy S5 - UX Port Roms [MM]

Hello Xda Users,
This Guide is for Adding Edge Panels To Latest Samsung UX Based Roms
What's Required:
*Apktool for Decompiling/Recompiling jars
*Notepad++ For Editing Smalis
Steps:
1. Open your " system/etc/floating_feature.xml " with Notepad++
And
Find The Following Code:
Code:
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE></SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE></SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>
REPLACE IT WITH:
Code:
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>[COLOR="DarkGreen"]people,task,circle,panel[/COLOR]</SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>[COLOR="darkgreen"]-1[/COLOR]</SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>
Now you must use ApkTool to decompile/Make Changes to smalis/Recompile
*Use Tickle My Android Apktool or Any other Apktool
2. Now Decompile your " Services.jar "
Find Red Text and Add Green Lines:
LOCATE TO:
smali/com/android/server/SystemServer.smali
Click to expand...
Click to collapse
Open up "SystemServer.smali" with Notepad++
SEARCH FOR:
Code:
[COLOR="Red"]const-string/jumbo v6, "spengestureservice"[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
const-string/jumbo v6, "spengestureservice"
new-instance v7, Lcom/android/server/smartclip/SpenGestureManagerService;
move-object/from16 v0, v218
invoke-direct {v7, v5, v0}, Lcom/android/server/smartclip/SpenGestureManagerService;-><init>(Landroid/content/Context;Lcom/android/server/wm/WindowManagerService;)V
invoke-static {v6, v7}, Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
:try_end_85
.catch Ljava/lang/Throwable; {:try_start_85 .. :try_end_85} :catch_53
:goto_57
const-string v6, "2"
invoke-static {v6}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v192
const/4 v6, 0x2
move/from16 v0, v192
if-lt v0, v6, :cond_32
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.aod.AODManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;
:cond_32
:try_start_86
const-string v6, "SystemServer"
Now add the Green lines:
Code:
const-string/jumbo v6, "spengestureservice"
new-instance v7, Lcom/android/server/smartclip/SpenGestureManagerService;
move-object/from16 v0, v218
invoke-direct {v7, v5, v0}, Lcom/android/server/smartclip/SpenGestureManagerService;-><init>(Landroid/content/Context;Lcom/android/server/wm/WindowManagerService;)V
invoke-static {v6, v7}, Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
:try_end_85
.catch Ljava/lang/Throwable; {:try_start_85 .. :try_end_85} :catch_53
:goto_57
[COLOR="DarkGreen"]move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.cocktailbar.CocktailBarManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;[/COLOR]
const-string v6, "2"
invoke-static {v6}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v192
const/4 v6, 0x2
move/from16 v0, v192
if-lt v0, v6, :cond_32
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.aod.AODManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;
:cond_32
:try_start_86
const-string v6, "SystemServer"
LOCATE TO:
smali/com/android/server/power/PowerManagerService.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"]const-string v8, "SEC_PRODUCT_FEATURE_COMMON_SUPPORT_COCKTAIL_FW: false"[/COLOR]
REPLACE IT WITH:
Code:
[COLOR="darkgreen"]const-string v8, "SEC_PRODUCT_FEATURE_COMMON_SUPPORT_COCKTAIL_FW: true"[/COLOR]
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService$6.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
return-void
.end method
Now Replace the Whole method with this one:
Code:
[COLOR="darkgreen"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->access$3700(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v3
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v4
move-object v1, p1
move-object v2, p2
move v5, p3
move-object v6, p4
move v7, p5
invoke-virtual/range {v0 .. v7}, Lcom/android/server/notification/NotificationManagerService;->enqueueEdgeNotificationInternal(Ljava/lang/String;Ljava/lang/String;IIILandroid/os/Bundle;I)V
return-void
.end method[/COLOR]
In Same Smali
SEARCH FOR:
Code:
[COLOR="Red"].method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 7
return-void
.end method
Now Replace the Whole method with this one:
Code:
[COLOR="darkgreen"].method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 7
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->access$3700(Ljava/lang/String;)V
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v0
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v1
const/4 v3, 0x1
const/4 v4, 0x0
const-string v5, "cancelNotificationWithTag"
move v2, p4
move-object v6, p1
invoke-static/range {v0 .. v6}, Landroid/app/ActivityManager;->handleIncomingUser(IIIZZLjava/lang/String;Ljava/lang/String;)I
move-result p4
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v1
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v2
move-object v3, p1
move v4, p2
move-object v5, p3
move v6, p4
invoke-virtual/range {v0 .. v6}, Lcom/android/server/notification/NotificationManagerService;->removeEdgeNotificationInternal(IILjava/lang/String;ILandroid/os/Bundle;I)V
return-void
.end method[/COLOR]
Done
3. Now Recompile your " services.jar "
4. *Now Decompile your " Framework.jar "
LOCATE TO:
smali/android/app/NotificationManager.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
.locals 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroid/app/NotificationManager;->mContext:Landroid/content/Context;
return-void
.end method
Now add the Green lines:
Code:
.method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
[COLOR="DarkGreen"].locals 4[/COLOR]
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroid/app/NotificationManager;->mContext:Landroid/content/Context;
[COLOR="darkgreen"]new-instance v0, Landroid/app/NotificationManager$EdgeNotificationManager;
invoke-direct {v0, p1}, Landroid/app/NotificationManager$EdgeNotificationManager;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Landroid/app/NotificationManager;->mEdgeNotificationManager:Landroid/app/NotificationManager$EdgeNotificationManager;[/COLOR]
return-void
.end method
LOCATE TO:
smali/android/app/SystemServiceRegistry.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"]const-string/jumbo v1, "multiwindow_facade"[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
const-string/jumbo v1, "multiwindow_facade"
const-class v2, Lcom/samsung/android/multiwindow/MultiWindowFacade;
new-instance v3, Landroid/app/SystemServiceRegistry$83;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$83;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
const-string v1, "2"
invoke-static {v1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v0
const/4 v1, 0x2
if-lt v0, v1, :cond_1
const-string v1, "AODManagerService"
const-class v2, Lcom/samsung/android/aod/AODManager;
new-instance v3, Landroid/app/SystemServiceRegistry$87;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$87;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
:cond_1
const-string/jumbo v1, "spengestureservice"
Now add the Green lines:
Code:
const-string/jumbo v1, "multiwindow_facade"
const-class v2, Lcom/samsung/android/multiwindow/MultiWindowFacade;
new-instance v3, Landroid/app/SystemServiceRegistry$83;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$83;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
[COLOR="darkgreen"]const-string v1, "CocktailBarService"
const-class v2, Lcom/samsung/android/cocktailbar/CocktailBarManager;
new-instance v3, Landroid/app/SystemServiceRegistry$85;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$85;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V[/COLOR]
const-string v1, "2"
invoke-static {v1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v0
const/4 v1, 0x2
if-lt v0, v1, :cond_1
const-string v1, "AODManagerService"
const-class v2, Lcom/samsung/android/aod/AODManager;
new-instance v3, Landroid/app/SystemServiceRegistry$87;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$87;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
:cond_1
const-string/jumbo v1, "spengestureservice"
5. Now Download
The " SystemServiceRegistry$85.smali " and
Add it to " framework.jar\smali\android\app "
Download From Here ->> View attachment SystemServiceRegistry$85.rar
Done
6. Now Recompile your " framework.jar "
7. Download the Attached
System Folder For " Edge Apks, Permissions Xmls "
Add them to correct location into your System Folder
Download From Here ->> https://www.androidfilehost.com/?fid=457095661767134120
Thank you
If Anyone has Access code Error, then only follow this post #2
Then Match the Access Code in the two smalis as below
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService$6.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
See the Red Code, the access code should be same in NotificationManagerService.smali Also
Code:
.method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->[COLOR="Red"][B]access$3700[/B][/COLOR](Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method static synthetic access$3700(Ljava/lang/String;)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
See the Red Code, the access code is same as in NotificationManagerService$6.smali
Code:
.method static synthetic [COLOR="Red"][B]access$3700[/COLOR][/B](Ljava/lang/String;)V
.locals 0
invoke-static {p0}, Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
return-void
.end method
Also make sure that access$3700 access right on NotificationManagerService
Hi mate @yash92duster, do you know how to make the background to blur? really needed... thank's before
Axl_Rush said:
Hi mate @yash92duster, do you know how to make the background to blur? really needed... thank's before
Click to expand...
Click to collapse
What background?
Explain more
Where you needed blur?
yash92duster said:
What background?
Explain more
Where you needed blur?
Click to expand...
Click to collapse
I mean, i want to make this blur. I have change in system/lib/libsurface.so but my phone dont even boot.
Axl_Rush said:
I mean, i want to make this blur. I have change in system/lib/libsurface.so but my phone dont even boot.
Click to expand...
Click to collapse
if you have S5 then that blur lib will work
it works fine on S5 G900F and G900H - no issues
if you tried this mod and blur lib on different device
specify the device model, stock rom or port rom
if you had tried on A Series device then native blur wont work
if J series also in some variants it wont work
so give more info so that i can see if i can help
yash92duster said:
if you have S5 then that blur lib will work
it works fine on S5 G900F and G900H - no issues
if you tried this mod and blur lib on different device
specify the device model, stock rom or port rom
if you had tried on A Series device then native blur wont work
if J series also in some variants it wont work
so give more info so that i can see if i can help
Click to expand...
Click to collapse
Oh I see.. Well ok my friend...
My device is J700F running on stock MM Indonesia firmware
I appreciate for your work and for your help my friend.. thank U
and sorry for my bad english
Axl_Rush said:
Oh I see.. Well ok my friend...
My device is J700F running on stock MM Indonesia firmware
I appreciate for your work and for your help my friend.. thank U
and sorry for my bad english
Click to expand...
Click to collapse
you can try to enable the EDGE PANELS in your J Series Device
but
Blur lib wont work on J series ( Many tried and failed )
only way for you is to use ACER BLUR to edge panels
Check for acer blur in
https://forum.xda-developers.com/showthread.php?t=2799050
https://forum.xda-developers.com/ga...ified-development/devs-helpingd-devs-t3321679
yash92duster said:
you can try to enable the EDGE PANELS in your J Series Device
but
Blur lib wont work on J series ( Many tried and failed )
only way for you is to use ACER BLUR to edge panels
Check for acer blur in
https://forum.xda-developers.com/showthread.php?t=2799050
https://forum.xda-developers.com/ga...ified-development/devs-helpingd-devs-t3321679
Click to expand...
Click to collapse
Ok i will try it.... thank's mate :good::good:
@yash92duster : this method really working on pure stock S5 MM? I tried many times but always FC when swipe... from another guide also..and tried your framework ans services.jar that you share on that guide, but still FC.
maybe something missing on pure stock. If anyone have success on pure stock, please share the framework & service.jar, me and others will greatly appreciate it.
thanks working fine in AJ A8 Rom
@yash92duster
nice guide, very well done. I was wondering if this would work on Nougat 7.X.X too...
I am trying to port that Galaxy Tab A, but when I decompile framework.jar, nothing really...in fact, its framework.jar is only 14kb size..so probably Samsung move that stuff somewhere in Galaxy Tab A...no idea..
jazzespresso said:
@yash92duster
nice guide, very well done. I was wondering if this would work on Nougat 7.X.X too...
I am trying to port that Galaxy Tab A, but when I decompile framework.jar, nothing really...in fact, its framework.jar is only 14kb size..so probably Samsung move that stuff somewhere in Galaxy Tab A...no idea..
Click to expand...
Click to collapse
Bad deodex
Lol
yash92duster said:
Bad deodex
Lol
Click to expand...
Click to collapse
oh crap...yeah saw -- Framework\arm folder is still there...funny though, it deodexed some, but not all...
what deodex utility you use usually?
jazzespresso said:
oh crap...yeah saw -- Framework\arm folder is still there...funny though, it deodexed some, but not all...
what deodex utility you use usually?
Click to expand...
Click to collapse
Use
Assayyed
It works perfectly till 7.0
7.1.1 also works in assayyed but for framework folder alone use flumics tool
yash92duster said:
Use
Assayyed
It works perfectly till 7.0
7.1.1 also works in assayyed but for framework folder alone use flumics tool
Click to expand...
Click to collapse
yeah I used Assayyed cook my ROM, so assumed it deodexed fine, then found out today, it is not...
it seems like, build ROM with Assayyed Kitchen, and switch over to flumics tool to deodex and copy back to Assayyed and finish the build
I got all figured out now..
following your guide up until framework.jar, smali/android/app/SystemServiceRegistry.smali, and search for "multiwindow_facade", which does not find in the file (found all other though) but i added Green lines change in the file anyway...
have not tested yet, we will see if it works:good:
jazzespresso said:
yeah I used Assayyed cook my ROM, so assumed it deodexed fine, then found out today, it is not...
it seems like, build ROM with Assayyed Kitchen, and switch over to flumics tool to deodex and copy back to Assayyed and finish the build
I got all figured out now..
following your guide up until framework.jar, smali/android/app/SystemServiceRegistry.smali, and search for "multiwindow_facade", which does not find in the file (found all other though) but i added Green lines change in the file anyway...
have not tested yet, we will see if it works:good:
Click to expand...
Click to collapse
Better ask in right place
This is not kitchen thread:silly:
yash92duster said:
Better ask in right place
This is not kitchen thread:silly:
Click to expand...
Click to collapse
wasn't really kitchen question, read my post again
Screenshots?

[GUIDE] Remove high volume warning for headphones

decompile services.jar.
open smali\com\android\server\audio\AudioService.smali.
Goto this method and add blue text:
.method private checkSafeMediaVolume(III)Z
.locals 4
.param p1, "streamType" # I
.param p2, "index" # I
.param p3, "device" # I
.prologue
const/4 v3, 0x3
const/4 v2, 0x0
.line 6263
iget-object v1, p0, Lcom/android/server/audio/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;
monitor-enter v1
.line 6264
:try_start_0
iget-object v0, p0, Lcom/android/server/audio/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v0
goto :goto_td
if-ne v0, v3, :cond_0
.line 6265
iget-object v0, p0, Lcom/android/server/audio/AudioService;->mStreamVolumeAlias:[I
aget v0, v0, p1
if-ne v0, v3, :cond_0
.line 6266
and-int/lit16 v0, p3, 0x3fc
if-eqz v0, :cond_0
.line 6267
iget v0, p0, Lcom/android/server/audio/AudioService;->mSafeMediaVolumeIndex:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-le p2, v0, :cond_0
monitor-exit v1
.line 6268
return v2
.line 6270
:goto_td
:cond_0
const/4 v0, 0x1
monitor-exit v1
return v0
.line 6263
:catchall_0
move-exception v0
monitor-exit v1
throw v0
.end method
Click to expand...
Click to collapse
recompile services.jar.
I've been looking for a method to turn off the high volume warning and I thank you for helping solve this... but I have no idea where to even start with this. Where is the service.jar located? And can I use a standard root file explorer to open it?
I tried doing some Google searches but it seems to point me towards windows. Does this have to be done on a computer?
what version are you using? B06, b08.
you need to decompile and modify it.
HallOfPromise said:
I've been looking for a method to turn off the high volume warning and I thank you for helping solve this... but I have no idea where to even start with this. Where is the service.jar located? And can I use a standard root file explorer to open it?
I tried doing some Google searches but it seems to point me towards windows. Does this have to be done on a computer?
Click to expand...
Click to collapse
There's a tutorial made by bkores about decompiling stuff. Just go read it
Or you could just add audio.safemedia.bypass=true to your build.prop
No more volume warnings
I'm on B32.
I'll attempt the build.prop edit. I've done that in the past before. Thanks for the help!
Tebor said:
Or you could just add audio.safemedia.bypass=true to your build.prop
No more volume warnings
Click to expand...
Click to collapse
This indeed worked for me! Super easy, as well. The warning has been bugging me since upgrading to Nougat. My biggest problem was having to hit OK on the warning message while driving, and having to volume back up after every phone restart. I honestly don't like messing with my phone while driving, and it's illegal to simply handle the phone here in California. It has to be mounted in order to mess with it.
since i dont know how to compile java i would like the more easy way too. i did a search with tc on the fon for "build.prop" without hits. how exactly is it done?
drahtwurst said:
since i dont know how to compile java i would like the more easy way too. i did a search with tc on the fon for "build.prop" without hits. how exactly is it done?
Click to expand...
Click to collapse
You need root and the file is in /system/build.prop.
@HallOfPromise,
Too loud music would damage to ear when in headphone, so here is the suggestion: Please turn down the volume when use headphone. The driving-mode idea great, ZTE engineer will take your idea. 
Tebor said:
Or you could just add audio.safemedia.bypass=true to your build.prop
No more volume warnings
Click to expand...
Click to collapse
Works. Thanks.
audio.safemedia.bypass alone doesn't work on UB32 for me. Neither does Xposed Gravitybox's disabler. However they do work when put together. :victory: Thanks
For those not wanting Xposed perhaps experimenting with the bypass combined with this other method may work. https://www.xda-developers.com/how-to-automatically-disable-the-high-volume-warning-without-root/ It doesn't work alone either, I had tried that before.
Quick tip that i've just discovered : Installing Viper4Android (last ver. 2.5.0.4) removed me that (autocensored) warning on my A2017G. And with the good settings, sound is so much better...

[GUIDE][MOD][Notch devices] Show both clock and notification icon on status bar notch

{
"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

Categories

Resources