[Samsung Galaxy J7 (2017) Themes, Apps, and Mods] maxx35000:
hi guy's i whant to share this guide :

Guide How to add Native Blur on stock rom 7.0 by [MENTION=7757203]DGCM7[/MENTION] and [MENTION=4438591]maxx35000[/MENTION]

first you have to find some compatible libs with your device "from device with native blur" :

libandroid_runtime.so
libgui.so
libsurfaceflinger.so
libsurfaceflinger_ddmconnection.so
if missing libsensorhub.so

so now first edit :

SamsungWindowState.smali

you can found it in Samsung-services.jar

got to android/server/wm/SamsungWindowState.jar

scearch:

[COLOR="Red"]invoke-virtual {v1}, Lcom/android/server/wm/WindowState;->getBridge()Lcom/samsung/android/view/IWindowStateBridge;

move-result-object v8

invoke-interface {v8}, Lcom/samsung/android/view/IWindowStateBridge;->getSystemUiVisibility()I
[/COLOR]

and replace with:

[COLOR="Blue"]invoke-virtual {v1}, Lcom/android/server/wm/WindowState;->getSystemUiVisibility()I[/COLOR]

scearch and replace :

[COLOR="Red"]:cond_5
iget v5, p0, Lcom/android/server/wm/SamsungWindowState;->mSystemUiVisibility:I[/COLOR]

with:

[COLOR="Blue"]:cond_5
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getSystemUiVisibility()I

move-result v5 [/COLOR]

and now find :

[COLOR="Red"]
.method public applyBlurEffect()V
.locals 0

return-void
.end method [/COLOR]

replace all the method with:

[COLOR="Blue"].method public applyBlurEffect()V
.locals 13

const/4 v12, -0x2

const/4 v7, 0x0

iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;

iget v8, v8, Landroid/view/WindowManager$LayoutParams;->flags:I

and-int/lit8 v8, v8, 0x2

if-eqz v8, :cond_0

iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;

iget v8, v8, Landroid/view/WindowManager$LayoutParams;->samsungFlags:I

and-int/lit8 v8, v8, 0x40

if-eqz v8, :cond_0

const/4 v5, 0x1

:goto_0
if-eqz v5, :cond_1

invoke-direct {p0}, Lcom/android/server/wm/SamsungWindowState;->getLegacyBlurRadius()I

move-result v0

:goto_1
if-eqz v5, :cond_2

invoke-direct {p0}, Lcom/android/server/wm/SamsungWindowState;->getLegacySaturation()I

move-result v6

:goto_2
iget v8, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I

if-ne v8, v0, :cond_3

iget v8, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I

if-ne v8, v6, :cond_3

return-void

:cond_0
move v5, v7

goto :goto_0

:cond_1
const/4 v0, 0x0

goto :goto_1

:cond_2
const/4 v6, 0x0

goto :goto_2

:cond_3
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

iget-object v8, v8, Lcom/android/server/wm/WindowState;->mWinAnimator:Lcom/android/server/wm/WindowStateAnimator;

if-nez v8, :cond_4

return-void

:cond_4
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;

iget-wide v8, v8, Landroid/view/WindowManager$LayoutParams;->dimDuration:J

const-wide/16 v10, -0x1

cmp-long v8, v8, v10

if-eqz v8, :cond_7

iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;

iget-wide v2, v8, Landroid/view/WindowManager$LayoutParams;->dimDuration:J

:goto_3
invoke-static {}, Landroid/view/SurfaceEffects;->newBuilder()Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v8

sget-object v9, Landroid/view/SurfaceEffects$PixEffectType;->BLUR:Landroid/view/SurfaceEffects$PixEffectType;

invoke-virtual {v8, v9}, Landroid/view/SurfaceEffects$Effect$Builder;->setPixelEffectType(Landroid/view/SurfaceEffects$PixEffectType;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v1

iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;

move-result-object v8

if-eqz v8, :cond_6

iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;

move-result-object v8

iget v8, v8, Landroid/view/WindowManager$LayoutParams;->height:I

if-eq v8, v12, :cond_5

iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;

move-result-object v8

iget v8, v8, Landroid/view/WindowManager$LayoutParams;->width:I

if-ne v8, v12, :cond_6

:cond_5
invoke-virtual {v1}, Landroid/view/SurfaceEffects$Effect$Builder;->makeFullscreen()Landroid/view/SurfaceEffects$Effect$Builder;

:cond_6
if-lez v0, :cond_8

sget-object v8, Landroid/view/SurfaceEffects$AnimationMode;->ONCE_STAY_END:Landroid/view/SurfaceEffects$AnimationMode;

invoke-virtual {v1, v8}, Landroid/view/SurfaceEffects$Effect$Builder;->setAnimationMode(Landroid/view/SurfaceEffects$AnimationMode;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v8

sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;

iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I

int-to-float v10, v10

sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;

invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v8

sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;

long-to-int v10, v2

int-to-float v11, v0

sget-object v12, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_IN:Landroid/view/SurfaceEffects$InterpMode;

invoke-virtual {v8, v9, v10, v11, v12}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v8

sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;

iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I

int-to-float v10, v10

sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;

invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v7

sget-object v8, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;

long-to-int v9, v2

int-to-float v10, v6

sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_IN:Landroid/view/SurfaceEffects$InterpMode;

invoke-virtual {v7, v8, v9, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;

:goto_4
invoke-virtual {v1}, Landroid/view/SurfaceEffects$Effect$Builder;->build()Landroid/view/SurfaceEffects$Effect;

move-result-object v7

invoke-virtual {v7}, Landroid/view/SurfaceEffects$Effect;->getBytes()[I

move-result-object v4

iget-object v7, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;

iget-object v7, v7, Lcom/android/server/wm/WindowState;->mWinAnimator:Lcom/android/server/wm/WindowStateAnimator;

iget-object v7, v7, Lcom/android/server/wm/WindowStateAnimator;->mSurfaceController:Lcom/android/server/wm/WindowSurfaceController;

invoke-virtual {v7, v4}, Lcom/android/server/wm/WindowSurfaceController;->startSurfaceAnimation([I)V

iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I

iput v6, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I

return-void

:cond_7
const-wide/16 v2, 0xc8

goto :goto_3

:cond_8
sget-object v8, Landroid/view/SurfaceEffects$AnimationMode;->ONCE_DESTROY:Landroid/view/SurfaceEffects$AnimationMode;

invoke-virtual {v1, v8}, Landroid/view/SurfaceEffects$Effect$Builder;->setAnimationMode(Landroid/view/SurfaceEffects$AnimationMode;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v8

sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;

iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I

int-to-float v10, v10

sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;

invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v8

sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;

long-to-int v10, v2

int-to-float v11, v0

sget-object v12, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_OUT:Landroid/view/SurfaceEffects$InterpMode;

invoke-virtual {v8, v9, v10, v11, v12}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v8

sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;

iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I

int-to-float v10, v10

sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;

invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;

move-result-object v7

sget-object v8, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;

long-to-int v9, v2

const/4 v10, 0x0

sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_OUT:Landroid/view/SurfaceEffects$InterpMode;

invoke-virtual {v7, v8, v9, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;

goto :goto_4
.end method[/COLOR]

add new method :

[COLOR="Lime"].method public getAspectRatio()F
.locals 1

iget v0, p0, Lcom/android/server/wm/SamsungWindowState;->mAspectRatio:F

return v0
.end method[/COLOR]

find and replace;

[COLOR="Red"].method public resetEffects()V
.locals 0
return-void
.end method[/COLOR]

by:

[COLOR="Blue"].method public resetEffects()V
.locals 1

const/4 v0, 0x0

iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I

iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I

return-void
.end method[/COLOR]

now open in services.jar\smali\com\android\server\wm\WindowStateAnimator.smali

scearch :

[COLOR="Red"]invoke-virtual {v4}, Lcom/android/server/wm/WindowSurfaceController;->setLayerStackInTransaction()V

return-void[/COLOR]

and replace with :

[COLOR="Blue"] invoke-virtual {v4}, Lcom/android/server/wm/WindowSurfaceController;->setLayerStackInTransaction()V

move-object/from16 v0, p0

iget-object v4, v0, Lcom/android/server/wm/WindowStateAnimator;->mWin:Lcom/android/server/wm/WindowState;

invoke-virtual {v4}, Lcom/android/server/wm/WindowState;->getBridge()Lcom/samsung/android/view/IWindowStateBridge;

move-result-object v4

invoke-interface {v4}, Lcom/samsung/android/view/IWindowStateBridge;->applyBlurEffect()V

return-void[/COLOR]

Now open android/server/policy/GlobalActions.smali in services.jar

find:

iput-boolean[COLOR="Red"] v5[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mIsSupportedBlur:Z

and change to :

iput-boolean [COLOR="Lime"]v4[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mIsSupportedBlur:Z

find in same file :

const-string/jumbo v4, "CscFeature_Common_ConfigBikeMode"

edit all part V4 to V6 & all V6 to V7

on original file for me :

const-string/jumbo [COLOR="Red"]v4[/COLOR], "CscFeature_Common_ConfigBikeMode"

invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;

move-result-object v3

const-string/jumbo [COLOR="Red"]v4[/COLOR], "bikemode"

invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

move-result v3

if-eqz v3, :cond_1

invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;

move-result-object v3

const-string/jumbo [COLOR="Red"]v4[/COLOR], "CscFeature_Common_ConfigBikeMode"

invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;

move-result-object v3

const-string/jumbo [COLOR="Red"]v4[/COLOR], "globalaction"

invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

move-result v3

if-eqz v3, :cond_1

const-string/jumbo v3, "com.samsung.android.app.bikemode"

invoke-direct {p0, v3}, Lcom/android/server/policy/GlobalActions;->isSBikeInstalled(Ljava/lang/String;)Z

move-result v3

if-eqz v3, :cond_1

iget-object v3, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;

invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v3

const-string/jumbo [COLOR="Red"]v4[/COLOR], "isBikeMode"

invoke-static {[COLOR="Red"]v4[/COLOR]}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

move-result-object [COLOR="Red"]v4
[/COLOR]
iget-object [COLOR="Red"]v6[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mBikeModeObserver:Landroid/database/ContentObserver;

invoke-virtual {v3, [COLOR="Red"]v4[/COLOR], v5, [COLOR="Red"]v6[/COLOR]}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

after editing :

const-string/jumbo [COLOR="Lime"]v6[/COLOR], "CscFeature_Common_ConfigBikeMode"

invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;

move-result-object v3

const-string/jumbo [COLOR="Lime"]v6[/COLOR], "bikemode"

invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

move-result v3

if-eqz v3, :cond_1

invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;

move-result-object v3

const-string/jumbo [COLOR="Lime"]v6[/COLOR], "CscFeature_Common_ConfigBikeMode"

invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;

move-result-object v3

const-string/jumbo [COLOR="Lime"]v6[/COLOR], "globalaction"

invoke-virtual {v3,[COLOR="Lime"] v6[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

move-result v3

if-eqz v3, :cond_1

const-string/jumbo v3, "com.samsung.android.app.bikemode"

invoke-direct {p0, v3}, Lcom/android/server/policy/GlobalActions;->isSBikeInstalled(Ljava/lang/String;)Z

move-result v3

if-eqz v3, :cond_1

iget-object v3, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;

invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v3

const-string/jumbo [COLOR="Lime"]v6[/COLOR], "isBikeMode"

invoke-static {[COLOR="Lime"]v6[/COLOR]}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

move-result-object [COLOR="Lime"]v6
[/COLOR]
iget-object [COLOR="Lime"]v7[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mBikeModeObserver:Landroid/database/ContentObserver;

invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR], v5, [COLOR="Lime"]v7[/COLOR]}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V