[Android Themes] :
{TUTORIAL}[How To] 4-Way Reboot + Theminig MediaTeK Devices - MTK & Low End Device

Hello Everyone,

First Of All and Everything, Let me Thank Some People First To made it possible what I am posting Today.

Credits
​

@iBotPeaches - Without Him Decompiling and Recompiling any apk is a dream. So we must thank him for this (ApkTool).

@Ticklefish - For His Wonderful Tool TMA. Just loving to work with that at ease,

@Adi Aisiteru Reborn - A Wonderful Person, Very Helpful and have so many nice guides to go through and learn.

@majdinj- A wonderful Guide to get 4-way reboot method.

@bombaybadboy - A nice person and a really a nice contributor to this community.

@joehanh88 - A Good Guide to follow and will help you in everything you do.

@akash akya- A good friend who helped me in doing some nice thing for MediaTek Device and So many guides are also by him to follow with.

@ XDA Forum - Can't Say anything, As Its my school and being a student I will never like to hear anything wrong related to it.

@ To All Other Dev Who Made It possible or If I am including anything from yours so please PM to mention your name in Credits. Please....

Now Let's Star With this Guide :-

-: Transparent Status bar & Notification Full Down:-

​

The Most Common thing to get first but then also a difficult thing to figure it out.

Decompile your SystemUI.apk and go to SystemUI/res/values--

So the First thing is Changing the "Drawables.xml" -

Find this

<item type="drawable" name="status_bar_background">#[COLOR=Red]3f000000[/COLOR]</item>

Change this RED Values with anything that you want to as accordingly with the HEX Color values.

Wait we are not done with that.

Now Copy these lines at the end of drawable before this line "</resources>"

<item type="drawable" name="notification_header_bg">#[COLOR=Red]88000000[/COLOR]</item>
<item type="drawable" name="notification_panel_bg">#[COLOR=Red]88000000[/COLOR]</item>
<item type="drawable" name="status_bar_bg_tile">#[COLOR=Red]00000000[/COLOR]</item>

Again Same Change RED values with what your need is.

Now Open "Colors.xml"

and change this line -

<color name="notification_panel_solid_background">#[COLOR=Red]3f000000[/COLOR]</color>

The Transparency Values are like :-

#00000000 - black with 100% transparency
#3F000000 - black with 75% transparency
#7F000000 - black with 50% transparency
#BF000000 - black with 25% transparency

Now You need to find some ".9.png" and delete it.

So Go to - SystemUI/res/drwable-hdpi (as per the resolution of your devices).

Notification_panel_bg.9.png

Status_bar_bg_tile.9.png

Notification_header_bg.9.png

Delete this image where ever you find it in your SystemUI.apk

"Notification_panel_bg.9.png"

Deleting this will give you your notification panel transparency.

Now Lets Move To Editing Smali. So now go to SystemUI/smali/com/android/systemui/statusbar/phone/

And Open "PhoneStatusBar$FastColorDrawable.smali"

Find this

.parameter "canvas"

And in that method change this line

iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;->mColor:I

To This

const v0, 0x[COLOR=Red]00000000[/COLOR]

. Again change RED to the transparency level to suit your need.

Now Decompile your "android.policy.jar"

And go to android.poliy.jar.out/smali/com/android/internal/policy/impl/---

Open "PhoneWindowManager.smali"

There do like mentioned below.

Delete RED Lines

.line 2627 ------*******
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I

iput v0, p1, Landroid/graphics/Rect;->bottom:I ------ Find This line.
[COLOR=Red]
.line 3061
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;

if-eqz v0, :cond_1b

iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;

invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I

move-result v0

.line 3063
:goto_1a
return v0

.line 3062
:cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;

if-eqz v0, :cond_26

iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;

invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I

move-result v0

goto :goto_1a
[/COLOR]
.line 3063 ------- *****This line number can be different in yours .
:cond_26
const/4 v0, 0x0

[COLOR=Blue]goto :goto_1a[/COLOR] -------- Change this to "[COLOR=Blue]return v0[/COLOR]"
.end method

Make Sure that the line marked with "******" will have a difference of 3.

So After Doing this it will look like this

.line 2627
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I

iput v0, p1, Landroid/graphics/Rect;->bottom:I

.line 2630
:cond_1
const/4 v0, 0x0

return v0
.end method

Now Recompile your SystemUI.apk & android.policy.jar and flash it.

4-Way Reboot Menu - Thanks to majdinj sir
​

Decompile Your "android.policy.jar"

Go To android.poliy.jar.out/smali/com/android/internal/policy/impl/

Open GlobalActions$3.smali and find this-***

invoke-interface {v0, v1}, Landroid/view/WindowManagerPolicy$WindowManagerFuncs;->reboot(Z)V

If its there then proceed and if not then find above line in all files with name "GlobalActions$#.smali" where "#" will be number.

Ok you find that so lets proceed.

Now in the same folder open "GlobalActions.smali"

And Change the lines (There will be two lines only) -

Lcom/android/internal/policy/impl/GlobalActions$3

Please Note :- You have to find the number same as in which you find the above *** mentioned lines.

So please make sure for this.

Now Change the "3" or "#" to "99" where "#" is the number in which you find the *** lines.

Done That.

Now Open - "GlobalActions$SinglePressAction.smali"

And Do like given -

Add the BLUE lines in that like its given below

# 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=Blue][COLOR=Black] -----------------------Make Sure the gap will be of 2(two) lines[/COLOR]
# static fields
.field protected static rebootMode:I

.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]

[COLOR=Blue][COLOR=Black] -----------------------Make Sure the gap will be of 2(two) lines[/COLOR][/COLOR]
# instance fields
.field private final mIcon:Landroid/graphics/drawable/Drawable;

Now Find "#direct methods"

and paste these lines just after this and whithout any gap between "#direct methods" and the lines you pasted.

.method static constructor <clinit>()V
.registers 3

const/4 v0, 0x4

new-array v0, v0, [Ljava/lang/String;

const/4 v1, 0x0

const-string v2, "Normal Reboot"

aput-object v2, v0, v1

const/4 v1, 0x1

const-string v2, "Soft Reboot"

aput-object v2, v0, v1

const/4 v1, 0x2

const-string v2, "Hard Reboot"

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

Now Download the given zip file and extract it. Copy all the files of the zip to -

"android.poliy.jar.out/smali/com/android/internal/policy/impl/ here" (here=files downloaded from this guide).

Done That. Now Recompile it and Flash it. Make sure to make a backup before you flash any MOD.

You Successfully Modded these things then Don't Forget To Hit "THANKS" Button for all the persons mentioned in the "CREDITS" section and to Me Also (:p:p:p) and Rate This Thread 5 star.

If you Got in Trouble then post it here. I will be there to help you out. I work as machine but very Unfortunate to say that I am also a human being and I too have Office work, personal life, friends, families, etc. So please have patience. The Time I will see your post, I promise, I will try my best to help you out.

Need More Guides- Find those in post #3.