How to: Implement 3G/2G switch to LidroidBar 05/01/2013 - Galaxy S II Android Development

Hello friends today I want to share with you this little mod on how to integrate a button to switch 3G/2G in lidroidbar......:laugh:
We need to change 4 packages which include: lidroid-res.apk, the Secphone.apk, the quikpanel.apk and SystemUI.apk
First we have to add the receivers at Secphone.Apk and register them at runtime throug phone app startup..
Download this zip and paste into SecPhone.apk classes
1- Decompile Secphone.apk classes with apktool or simply extract the classes.dex and decompile with smali utility
Find the class PhoneApp.smali ( \com\android\phone ) and add this values : .
field private final mModeReceiver:Landroid/content/BroadcastReceiver; *
Code:
.field private mLastNumber:Ljava/lang/String;
.field private mLastPhoneState:Lcom/android/internal/telephony/Phone$State;
.field private mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
.field private final mMediaButtonReceiver:Landroid/content/BroadcastReceiver;
[COLOR=DarkRed].field private final mModeReceiver:Landroid/content/BroadcastReceiver;[/COLOR] *
.field public mMmiInitMsg:Landroid/os/AsyncResult;
Search for new-instance v0, Lcom/android/phone/PhoneApp$PhoneAppBroadcastReceiver;
And after this line add this :
Code:
new-instance v0, Lcom/android/phone/NetworkModeReceiver;
invoke-direct {v0}, Lcom/android/phone/NetworkModeReceiver;-><init>()V
iput-object v0, p0, Lcom/android/phone/PhoneApp;->mModeReceiver:Landroid/content/BroadcastReceiver;
Now search this line iget-object v1, p0, Lcom/android/phone/PhoneApp;->mReceiver:Landroid/content/BroadcastReceiver;
and after invoke-virtual {p0, v1, v0}, Lcom/android/phone/PhoneApp;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilterLandroid/content/Intent;
Add this code :
Code:
new-instance v0, Landroid/content/IntentFilter;
const-string v1, "com.android.phone.CHANGE_NETWORK_MODE"
invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
iget-object v1, p0, Lcom/android/phone/PhoneApp;->mModeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v1, v0}, Lcom/android/phone/PhoneApp;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Thats all for Secphone.apk and you can recompile them.....
2- Now we need to add the button values to lidroid-res.apk ( easy part )
Decompile the lidroid framework and add this values to string : <string name="quickpanel_networkmode_text">2G/3G/Auto</string>
After we need to add to drawable-hdmi 3 png image and renaming in stat_gsm_on stat_gsm_off stat_gsm_auto, search for your favorite icon araund the web. Thats all for lidroid framework recompile.
After compiling lidroid-res.apk you need to decompile again and copy the corresponding values from the public file : Example in my case the string
quickpanel_networkmode_text have this value 0x050b0063 ( 0x50b0063 in systemui ), do this even for images that you have added ....We will need these values ​​when we're going to add the button to lidroidbar within the systemui.
3- Add button to lidroid values inside the systemui:
Decompile your SystemUI classes.dex ( where the lidroidbar setting are ) and copy this file inside \com\lidroid\systemui\quickpanel
Search the power button.smali and add this values
Code:
[COLOR=DarkRed]sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;
const-string v1, "toggleNetworkMode"
const-class v2, Lcom/lidroid/systemui/quickpanel/NetworkModeButton;
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;[/COLOR]
.line 71
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
sput-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS_LOADED:Ljava/util/HashMap;
.line 80
sput-object v3, Lcom/lidroid/systemui/quickpanel/PowerButton;->GLOBAL_ON_CLICK_LISTENER:Landroid/view/View$OnClickListener;
.line 83
sput-object v3, Lcom/lidroid/systemui/quickpanel/PowerButton;->GLOBAL_ON_LONG_CLICK_LISTENER:Landroid/view/View$OnLongClickListener;
return-void
.end method
In case adjust for your directory...
Now enter to com/lidroid/constants/ and open statusbar.smali and add this line:
.field public static final BUTTON_NETWORKMODE:Ljava/lang/String; = "toggleNetworkMode"
Now open out/lidroid and search for R$drawable.smali open and add this values:
Code:
.field public static final stat_gsm_on:I = 0x50200ff
.field public static final stat_gsm_off:I = 0x50200fe
.field public static final stat_gsm_auto:I = 0x5020100
adjusted values ​​with those of your lidroid framework.....
Now open R$string.smali and add this line:
.field public static final quickpanel_networkmode_text:I = 0x50b0063
Also adjusted again values ​​with those of your lidroid framework.....
Finally open the file we added before: the "NetworkModeButton.smali"
We have to adjust the values for the image and string take from the lidroid framework....
Thats all for SystemUI you can recompile.....:laugh:
4- Final part...Add toggle in the quikpanel.apk
Decompile the quikpanel.apk and insert this value to string.xml ( inside values/string )
<string name="title_toggle_NetworkMode">Toggle 2G/3G</string>
Compile and after decompile again, We need the string value that we added, take this value...
Now search into smali files the PowerWidjetUtil.smali and add another button like this:
Code:
const-string v1, "toggleNetworkMode"
new-instance v2, Lcom/goatrip/statusbar/PowerWidgetUtil$ButtonInfo;
const-string v3, "toggleNetworkMode"
const v4, 0x7f080049
const-string v5, "goatrip:drawable/stat_gsm_on"
invoke-direct {v2, v3, v4, v5}, Lcom/goatrip/statusbar/PowerWidgetUtil$ButtonInfo;-><init>(Ljava/lang/String;ILjava/lang/String;)V
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
The button structure may be different than mine simply copy and paste a your existing button source.
Now adjust the string value with the one obtained first
Thats all Enjoy
If you like this mod simply give me a thanks!!!!!!
{
"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"
}

Added Modded Lidroid Framework......:laugh:

Hey, first of all, many thanks for your work.
But, I can´t make it work. I do all changes in SecPhone.apk, but any time I reboot the phone, all I get is SecPhone has sttoped. Any ideas to fix it.
The first point said: Download this zip and paste into SecPhone.apk classes
I decompiled SecPhone.apk first and copy the files later into \com\android\phone, I guess this the right order, isn´t it?.
If I replace the SecPhone.apk with the original one, there are not any fc, but this toggle does not appear anywhere. I can´t see it into the lidroidSettings.
ROM. LS8
Kernel: Jeboo
Thanks in advance, any help would be appreciated.

Josehg said:
Hey, first of all, many thanks for your work.
But, I can´t make it work. I do all changes in SecPhone.apk, but any time I reboot the phone, all I get is SecPhone has sttoped. Any ideas to fix it.
The first point said: Download this zip and paste into SecPhone.apk classes
I decompiled SecPhone.apk first and copy the files later into \com\android\phone, I guess this the right order, isn´t it?.
If I replace the SecPhone.apk with the original one, there are not any fc, but this toggle does not appear anywhere. I can´t see it into the lidroidSettings.
ROM. LS8
Kernel: Jeboo
Thanks in advance, any help would be appreciated.
Click to expand...
Click to collapse
+1

Does the toggle switch between 2G & 3G bands?

hi Neme77
Can you tell me how I can add 23 Toggles in In this SystemUI here
I want to add lidroid-res - LidroidSettings
Please,

Someone made work this mod on LSD or LSE?
Enviado desde mi GT-I9100 usando Tapatalk 2

Devil_1210 said:
Someone made work this mod on LSD or LSE?
Enviado desde mi GT-I9100 usando Tapatalk 2
Click to expand...
Click to collapse
+1
that would be awesome
anyone?

Josehg said:
Hey, first of all, many thanks for your work.
But, I can´t make it work. I do all changes in SecPhone.apk, but any time I reboot the phone, all I get is SecPhone has sttoped. Any ideas to fix it.
The first point said: Download this zip and paste into SecPhone.apk classes
I decompiled SecPhone.apk first and copy the files later into \com\android\phone, I guess this the right order, isn´t it?.
If I replace the SecPhone.apk with the original one, there are not any fc, but this toggle does not appear anywhere. I can´t see it into the lidroidSettings.
ROM. LS8
Kernel: Jeboo
Thanks in advance, any help would be appreciated.
Click to expand...
Click to collapse
in SecPhone, after all the changes, delete this string in the AndroidManifest.xml:
Code:
<uses-permission android:name="android.permission.DUMP" />
Recompile and Sign apk
Troy.main said:
hi Neme77
Can you tell me how I can add 23 Toggles in In this SystemUI here
I want to add lidroid-res - LidroidSettings
Please,
Click to expand...
Click to collapse
In LidroidSetting.apk\smali\com\lidroid\settings\statusbar\ PowerWidgetUtil.smali add this command to the end of the following method:
.method public static getButtons(Landroid/content/ContextLjava/util/HashMap;
Add the RED lines
Code:
const-string v6, "lidroid:drawable/stat_multiwindow_on"
invoke-direct {v3, v4, v5, v6}, Lcom/lidroid/settings/statusbar/PowerWidgetUtil$ButtonInfo;-><init>(Ljava/lang/String;ILjava/lang/String;)V
invoke-virtual {v1, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 189
:cond_18
[COLOR="DarkRed"] const-string v1, "toggleNetworkMode"
invoke-virtual {v0, v1, v7}, Lcom/lidroid/settings/Features;->has(Ljava/lang/String;Z)Z
move-result v1
if-eqz v1, :cond_mak
.line 186
sget-object v1, Lcom/lidroid/settings/statusbar/PowerWidgetUtil;->BUTTONS:Ljava/util/HashMap;
const-string v2, "toggleNetworkMode"
new-instance v3, Lcom/lidroid/settings/statusbar/PowerWidgetUtil$ButtonInfo;
const-string v4, "toggleNetworkMode"
const v5, 0x7f09009f
const-string v6, "lidroid:drawable/stat_gsm_on"
invoke-direct {v3, v4, v5, v6}, Lcom/lidroid/settings/statusbar/PowerWidgetUtil$ButtonInfo;-><init>(Ljava/lang/String;ILjava/lang/String;)V
invoke-virtual {v1, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 190
:cond_mak[/COLOR]
sget-object v1, Lcom/lidroid/settings/statusbar/PowerWidgetUtil;->BUTTONS:Ljava/util/HashMap;
goto/16 :goto_0
.end method
If you have the lidroid of wanam, edit the smali NetworkModeButton.smali, replacing all the words "lidroid" with "wanam"
example:
Code:
Before:
.class public Lcom/lidroid/systemui/quickpanel/NetworkModeButton;
.super Lcom/lidroid/systemui/quickpanel/PowerButton;
Later:
.class public Lcom/wanam/systemui/quickpanel/NetworkModeButton;
.super Lcom/wanam/systemui/quickpanel/PowerButton;

hi please help
i can't do this changes to my rom
here is files you need
LGTeleService.apk
View attachment 4269150
the network toggle is here but don't work ( it can't change network )
i spend a lot of time , i hope some one can fix it
actually can't understand what should i do with lgteleservice.apk ( how to add toggles to this apk?) how to add this codes to lgteleservice?
sorry for my bad english

Related

[Q] How to change jelly bean lock screen?

How to change jb lockscreen to this?
{
"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"
}
1. I want to remove white bounding box.
2. I want to move up the clock over widget boundary.
In ICS, there is a way to move clock upside.
By modifying keyguard_screen_unlock_portrait.xml file in framework-res.apk.
But in JB this method doesn't work well.
ps. I don't want to do this by 3rd party app like widget locker.
I may found a clue
I found a code about keyguard widget frame.
Code:
KeyguardWidgetFrame.java
public KeyguardWidgetFrame(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mLongPressHelper = new CheckLongPressHelper(this);
Resources res = context.getResources();
// TODO: this padding should really correspond to the padding embedded in the background
// drawable (ie. outlines).
float density = res.getDisplayMetrics().density;
int padding = (int) (res.getDisplayMetrics().density * 8);
setPadding(padding, padding, padding, padding);
mFrameStrokeAdjustment = 2 + (int) (2 * density);
// This will be overriden on phones based on the current security mode, however on tablets
// we need to specify a height.
mSmallWidgetHeight =
res.getDimensionPixelSize(com.android.internal.R.dimen.kg_small_widget_height);
mBackgroundDrawable = res.getDrawable(R.drawable.kg_widget_bg_padded);
mGradientColor = res.getColor(com.android.internal.R.color.kg_widget_pager_gradient);
mGradientPaint.setXfermode(sAddBlendMode);
}
If I can change following line or remove it. It will solve my problem.
setPadding(padding, padding, padding, padding);
I also decompiled android.policy.jar.
And found corresponding line.
Code:
.line 110
.local v1, padding:I
invoke-virtual {p0, v1, v1, v1, v1}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->setPadding(IIII)V
But I don't have knowledge of smali.
So how to manage that line?
Is is safe to remove or change to this?
invoke-virtual {p0, 0, 0, 0, 0}
I finally solved problem!
It took some hours to solve this.
So I put these information for someone who want to change JB lockscreen like me.
1. Increase widget maximum size.
Decompile framework-res.apk
In \res\layout-port\
Modify keyguard_widget_pager.xml
Change left, right, top padding and pageSpacing as follows.
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardWidgetPager
android:id="@id/app_widget_container" android:paddingLeft="[COLOR="red"]0dip[/COLOR]"
android:paddingTop="[COLOR="red"]0dip[/COLOR]" android:paddingRight="[COLOR="Red"]0dip[/COLOR]"
android:paddingBottom="@dimen/kg_widget_pager_bottom_padding"
android:clipToPadding="false" android:pageSpacing="[COLOR="red"]0dip[/COLOR]"/>
2. Disable initial page hint
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\KeyguardViewStateManager.smali
Remove following red string.
Code:
.method public showUsabilityHints()V
...
.line 307
iget-object v0, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardViewStateManager;->mKeyguardWidgetPager:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;
[COLOR="Red"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->showInitialPageHints()V[/COLOR]
...
.end method
3. Disable white box while scrolling
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetPager.smali
Change red string to green one as follows
Code:
.method animateOutlinesAndSidePages(ZI)V
...
.line 708
[COLOR="Red"].local v7, finalOutlineAlpha:F[/COLOR]
:goto_4e
invoke-virtual {v3, p0, p1, v7, p2}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->fadeFrame(Ljava/lang/Object;ZFI)V
...
.end method
Code:
.method animateOutlinesAndSidePages(ZI)V
...
.line 708
[COLOR="Lime"]const/4 v7, 0x0[/COLOR]
:goto_4e
invoke-virtual {v3, p0, p1, v7, p2}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->fadeFrame(Ljava/lang/Object;ZFI)V
...
.end method
4. Disable page hint when dragging beyond first or last page
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetPager.smali
Remove red string in the follwing.
Code:
.method protected screenScrolled(I)V
...
.line 533
invoke-static {v5}, Ljava/lang/Math;->abs(F)F
move-result v9
cmpg-float v7, v5, v10
if-gez v7, :cond_61
const/4 v7, 0x1
:goto_51
[COLOR="Red"]invoke-virtual {v6, v9, v7}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->setOverScrollAmount(FZ)V[/COLOR]
...
.end method
5. (similar to 4 but) Only disable white gradiant
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetFrame.smali
Change red string to green one.
Code:
.method setOverScrollAmount(FZ)V
...
.line 497
const/high16 v1, 0x3f00
mul-float/2addr v1, p1
const/high16 v2, 0x437f
mul-float/2addr v1, v2
[COLOR="Red"] invoke-static {v1}, Ljava/lang/Math;->round(F)I
move-result v1[/COLOR]
iput v1, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->mForegroundAlpha:I
...
.end method
Code:
.method setOverScrollAmount(FZ)V
...
.line 497
const/high16 v1, 0x3f00
mul-float/2addr v1, p1
const/high16 v2, 0x437f
mul-float/2addr v1, v2
[COLOR="Lime"]const/4 v1, 0x0[/COLOR]
iput v1, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->mForegroundAlpha:I
...
.end method
6. Only show bounding box boarder
In framework-res.apk
Modify kg_bouncer_bg_white.9.png as follows
xd123456ye said:
How to change jb lockscreen to this?
View attachment 1886054
1. I want to remove white bounding box.
2. I want to move up the clock over widget boundary.
In ICS, there is a way to move clock upside.
By modifying keyguard_screen_unlock_portrait.xml file in framework-res.apk.
But in JB this method doesn't work well.
ps. I don't want to do this by 3rd party app like widget locker.
Click to expand...
Click to collapse
hey bro nice job but one thing the clock icon , how can i make it small , mine is too big , i fllowed ur way and succesful but the lock ring icon get little in right sight of screen , is their any way to do ??
To arnabgharay
arnabgharay said:
hey bro nice job but one thing the clock icon , how can i make it small , mine is too big , i fllowed ur way and succesful but the lock ring icon get little in right sight of screen , is their any way to do ??
Click to expand...
Click to collapse
To arnabgharay
I'm not doing these things anymore.
And currently my phone is not jelly bean, I went back to ginger bread long time ago.
And I got a job, don't have time to do this, and I have no plan to do this.
Sorry.

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

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

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

Create your own MULTI DPI apks

So thanks goes out to @dagrim1 for his guide on how to create multiDPI apks for Samsung devices (please remember to thank him for his guide and work; this is just a copy and paste job to let people know!):
dagrim1 said:
*** Make samsung system apk multidpi compatible ***
Install APKTool v2
https://ibotpeaches.github.io/Apktool/
Copy Framework-res.apk and twframework-res.apk from framework folder to computer
Install frameworks in apktool using the following commands:
apktool if Framework-res.apk
apktool if twframework-res.apk
Copy relevant apk to folder
Decompile using apktool with the following command:
apktool d <name>.apk -o <name_output_folder>
Edit the dimens.xml file in <name_output_folder>\res\values\ folder (And also the dimens.xml file in <name_output_folder>\res\values-land\ folder if that exists, this contains the landscape mode values)
Change all the values "xxxdip", where xxx is a number, to "yyypx" where yyy is 4 times xxx. So "640dip" would become "2560px"
I created an awk script for this, which uses gawk on windows: replace_xml.awk. First copy the xml file to be edited (%xml_file%) to another location (%xml_copy%)
Next call the awk script on the copy, outputting to the xml file:
gawk -f replace_xml.awk %xml_copy% > %xml_file%
Recompile the apk, keeping the original META-INF content (which can be done because we don't change the manifest.xml file) using the following command:
apktool b <name_output_folder> -o <name_output_apk>
*** Contacts/Dialer & Patching Services.jar***
For the contacts/dialer an extra step has to be taken, that is patching services.jar to skip checks for properly signed files
Copy services.jar from system\framework to computer
Decompile it:
apktool d services.jar -o services_jar
Open services_jar\smali\com\android\server\pm\PackageMa nagerService.smali ( I used notepad++ )
Change the following part (might not be the exact same):
Code:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
.parameter "s1"
.parameter "s2"
.prologue
.line 2160
if-nez p0, :cond_8
.line 2161
if-nez p1, :cond_6
const/4 v6, 0x1
.line 2180
:goto_5
return v6
.line 2161
:cond_6
const/4 v6, -0x1
goto :goto_5
.line 2165
:cond_8
if-nez p1, :cond_c
.line 2166
const/4 v6, -0x2
goto :goto_5
.line 2168
:cond_c
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 2169
.local v3, set1:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p0
.local v0, arr$:[Landroid/content/pm/Signature;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_14
if-ge v1, v2, :cond_1e
aget-object v5, v0, v1
.line 2170
.local v5, sig:Landroid/content/pm/Signature;
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 2169
add-int/lit8 v1, v1, 0x1
goto :goto_14
.line 2172
.end local v5 #sig:Landroid/content/pm/Signature;
:cond_1e
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
.line 2173
.local v4, set2:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_26
if-ge v1, v2, :cond_30
aget-object v5, v0, v1
.line 2174
.restart local v5 #sig:Landroid/content/pm/Signature;
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 2173
add-int/lit8 v1, v1, 0x1
goto :goto_26
.line 2177
.end local v5 #sig:Landroid/content/pm/Signature;
:cond_30
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_38
.line 2178
const/4 v6, 0x0
goto :goto_5
.line 2180
:cond_38
const/4 v6, -0x3
goto :goto_5
.end method
TO:
Code:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const/4 v0, 0x0
return v0
.end method
Recompile the edited folder
apktool b services_jar -o services.jar
Click to expand...
Click to collapse
For the rest check out the ORIGINAL THREAD (remember to use b instead of c when compiling the final apk)
I have added two MultiDPI apks below that are compatible with 5.1.1 COH4 n910c deodexed (specifically with WanamLite Clean Stock).
1. Backup the old files (/system/app/SamsungCamera3/SamsungCamera3.apk AND /system/priv-app/SecContacts_Note/SecContacts_Note.apk)
2. Extract the archives and replace the original files in their original locations with the extracted ones
3. Change the permissions of the apks to rw-r--r-- (root explorer is handy)
4. Reboot
Also added the modded services.jar if someone needs it.
this is cool!! basic theming would be awesome also..
The camera and contacts are already multidpi? Can i use on odexed rom too?
Gesendet von meinem SM-N910F mit Tapatalk
Do Not Works
Gesendet von meinem SM-N910F mit Tapatalk
Camera is NOT multiDPI??
No
Gesendet von meinem SM-N910F mit Tapatalk
crazykiddo said:
Camera is NOT multiDPI??
Click to expand...
Click to collapse
It is. Working fine here with 512dpi. Decompile it yourself if you do not belive me.
proof:
{
"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"
}
Xenomorph said:
Do Not Works
Gesendet von meinem SM-N910F mit Tapatalk
Click to expand...
Click to collapse
What specifically isn't working? Contacts seems to require more effort than the camera. Only got contacts working on my 3rd try.
Here are some screenshots
Only need the camera.
I am using you attached camera
installed using update zip and manually with permissions etc.
And I am running 480
Funny in manifest It has this : <supports-screens android:anyDensity="true" android:normalScreens="true"/>
---------- Post added at 02:35 PM ---------- Previous post was at 01:43 PM ----------
All working now, issues with other camera versions (that installed to system)
I'm now working on adjusting gallery thumbnail and mode text/icon alignment
Will post updates
---------- Post added at 03:27 PM ---------- Previous post was at 02:35 PM ----------
Still no luck with adjusting the gallery frame and mode titles etc.
but all works good so far.
Here is my modded version of the posted one.
=================
CHANGELOG
=================
v9
- remove frame from gallery thumbnail
- adjusted modes title color and position
- homemade mode indicator
=================
NOTES
=================
Remember this is my version on density 480
=================
INSTALL
=================
1. Goto /system/app/SamsungCamera3/
2. Delete SamsungCamera3.apk
2b. Goto /system/app/SamsungCamera3/arm/
2c. Delete SamsungCamera3.odex
3. copy SamsungCamera3v9.apk to /system/app/SamsungCamera3/
4. Rename SamsungCamera3v9.apk to SamsungCamera3.apk
5. Set permissions to 644
6. Reboot
Attached is the latest version and screenshots
Tested on my note 4 5.1.1 with no found issues yet.
=================
ISSUES/BUGS
=================
- downloaded modes thumbnails are big/missing etc.
- modes title are black (will be changed to white)
- padding on modes list needs adjustments
- dual cam list also needs adjustments
THX for this is it possible for contacts too on 480dpi ?
I dont use the stock contact so sorry from my side.
What about the one posted in OP?
Ohh Ok will try... THX
Maybe I should start a new thread with the camera (what I want perfect mostly)

[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