Hi All
{
"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"
}
iam apk5656 now with this new thread i think this is the first thread in whole world talking about android O easter egg and without xposed
/*I 'm Not Responsible For Any Damage Of Your Phone. Take Necessary Backup If You Are Indoubt.*/
this will work on any device GB/Ics/JB/KK even LP(not sure about LP+)
but give it a try you will lose nothing
Big Note
this is moded guide to suite android o plat logo the original thread is by aryan A.R and his Android N platlogo guide
his original theread: https://forum.xda-developers.com/an.../guide-add-android-n-platlogo-app-to-t3362744
so thx to him:fingers-crossed::fingers-crossed:
i didnt remove his name from the app he done a lot of greate works
so lets start with my moded guide over here
note: some pictures are low quality so you may see a crashed pictures
Features
Guide
Requirements:
1. De-compile your framework.jar. (In some cases like some Samsung Roms, and kitkat Roms it can be framework2.jar).
2. Know how to decompile JARs
3. PlatLogo app Download From-
HERE- https://drive.google.com/open?id=0B9PzgNqzqhBweWRsT05FdHJiZms
(If You Need To Just Test This App, You Are Free To Download It From Above)
Procedure:
1. Decompile framework.jar
2. Go to smali/com/android/internal/app and open PlatLogoActivity.smali
select all and replace with
Code:
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
.registers 7
.parameter "savedInstanceState"
.prologue
.line 16
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 18
new-instance v1, Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 19
.local v1, intent:Landroid/content/Intent;
new-instance v2, Landroid/content/ComponentName;
const-string v3, "com.aryan.nplatlogo"
const-string v4, "com.aryan.nplatlogo.PlatLogoActivity"
invoke-direct {v2, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 23
:try_start_16
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/Intent;)V
:try_end_19
.catch Landroid/content/ActivityNotFoundException; {:try_start_16 .. :try_end_19} :catch_1d
.line 39
:goto_19
invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
.line 41
return-void
.line 31
:catch_1d
move-exception v0
.line 35
.local v0, e:Landroid/content/ActivityNotFoundException;
const-string v2, "Install AndroidN PlatLogo By Aryan"
const/4 v3, 0x0
invoke-static {p0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v2
invoke-virtual {v2}, Landroid/widget/Toast;->show()V
goto :goto_19
.end method
4. Recompile framework.jar, Push it into system/framework. Set correct permissions(rw-r--r--).
5. Install My Android-O Platlogo. or push it into system
Credits:
Aryan A.R
iamareebjamal
[email protected]
Droidbuster
and me apk5656
If You Are Using This PlatLogo In Your ROM, Just Give A Credit To My Work.
If Your Liked My Work, Just Press Thanks Below
visit our site www.mohamedovic.com
Related
Based on this guide here
Description:
Transparent app drawer by definition means you can see the homescreen wallpaper whilst in app drawer instead of the default black background.
Tools needed:
1) apktool
2) notepad++
3) 7zip
Files needed: (Depending on ROM type)
1) Homescreen.apk
Steps [HOW TO]:
1) decompile Homescreen.apk
2) go to \res\layout\apps_customize_pane.xml
replace android:background="#ff000000"
There are two instances in this file.
Here
#00000000 - 100%transparency
#3F000000 - 75% transparency
#7F000000 - 50% transparency
#BF000000 - 25% transparency
2) now SMALI CODE.
go to
\smali\com\motorola\homescreen\
3) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$19.smali and Launcher$22.smali
However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.
Example of Smali:
Having done this deletion, use notepad++ to search for updateWallpaperVisibility
Use fine in files function in Notepadd++, it will tell you exactly where this method is referenced. Then delete all the lines containing this method reference.
Example:
Code:
invoke-virtual {v0, v1}, Lcom/motorola/homescreen/Launcher;->updateWallpaperVisibility(Z)V
or
Delete all this method starting from .method to .end mothod.
This code is in Launcher.smali.
Code:
.method updateWallpaperVisibility(Z)V
.locals 3
.parameter
.prologue
const/high16 v1, 0x10
.line 4162
if-eqz p1, :cond_1
move v0, v1
.line 4163
:goto_0
invoke-virtual {p0}, Lcom/motorola/homescreen/Launcher;->getWindow()Landroid/view/Window;
move-result-object v2
invoke-virtual {v2}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;
move-result-object v2
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->flags:I
and-int/2addr v2, v1
.line 4165
if-eq v0, v2, :cond_0
.line 4166
invoke-virtual {p0}, Lcom/motorola/homescreen/Launcher;->getWindow()Landroid/view/Window;
move-result-object v2
invoke-virtual {v2, v0, v1}, Landroid/view/Window;->setFlags(II)V
.line 4168
:cond_0
return-void
.line 4162
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
so, you have to delete the above line completely, and also any lines in all smali files containing "updateWallpaperVisibility"
After deleting the method and all of its references, just compile the apk and make your flashsable zip.
I use APKTOOL and 7zip for that.
Home:
{
"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"
}
LoL Boss!
Abraços.
Enviado do meu S4.
A garantia do meu aparelho sou eu que faço.
Anybody can upload the modded Homescreen.apk ? I don't have any computer for do it myself
First this is not my work. original thread http://forum.xda-developers.com/showthread.php?t=1952943
credits
@dcsms original poster
@samsoul16 the one i pulledout the codes from his mod
Steps
1.decompile systemUI.apk
2. go to public.xml... find the last id and add one more... in my case the last id is 0x7f090028 ....and then i add one id with name="lidroid" id="0x7f090029"
3. then open ids.xml and add new id name lidroid and give
it false value.
4. open statusbarservice.smali paste these code below #instance fields
Code:
.field powerwidget:Landroid/widget/LinearLayout;
5. on the statusbarservice.smali ...go to .line 334 and paste this below thoose group's line
Code:
.line 335
const v26, 0x7f090029 //these id must define in public.xml and ids.xml also
move-object v0, v10
move/from16 v1, v26
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v26
check-cast v26, Landroid/widget/LinearLayout;
move-object/from16 v0, v26
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/statusbar/StatusBarService;->powerwidget:Landroid/widget/LinearLayout;
6. then search for .line 418 and make it look like this
Code:
.line 418
.local v12, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v12}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->powerwidget:Landroid/widget/LinearLayout;
move-object/from16 v26, v0
const/16 v27, 0x0
move-object/from16 v0, v26
move-object v1, v12
move/from16 v2, v27
invoke-virtual {v0, v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
7.then on statusbar_expanded.xml and statusbar_expanded_dual_sim.xml. paste this in the place u want
Code:
<LinearLayout android:orientation="vertical" android:id="@id/lidroid" android:layout_width="fill_parent" android:layout_height="wrap_content" />
then recompile apk and push
this have been tested and worked on galaxy y duos and y pro duos
{
"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"
}
any questions ????
Oh...I was going to post it ... anyway nice guide.....i used @PineappleOwl's SystemUI to move lidroid
Himan Boro said:
Oh...I was going to post it ... anyway nice guide.....i used @PineappleOwl's SystemUI to move lidroid
Click to expand...
Click to collapse
I posted it before u
I would appreciate if u hit thanks.
Sent from my GT-B5512 using Carbon rom
acermedo said:
I posted it before u
I would appreciate if u hit thanks.
Sent from my GT-B5512 using Carbon rom
Click to expand...
Click to collapse
earn thnkx bro..dnt ask it lioe tht
acermedo said:
First this is not my work. original thread http://forum.xda-developers.com/showthread.php?t=1952943
credits
@dcsms original poster
@samsoul16 the one i pulledout the codes from his mod
Steps
1.decompile systemUI.apk
2. go to public.xml... find the last id and add one more... in my case the last id is 0x7f090028 ....and then i add one id with name="lidroid" id="0x7f090029"
3. then open ids.xml and add new id name lidroid and give
it false value.
4. open statusbarservice.smali paste these code below #instance fields
Code:
.field powerwidget:Landroid/widget/LinearLayout;
5. on the statusbarservice.smali ...go to .line 334 and paste this below thoose group's line
Code:
.line 335
const v26, 0x7f090029 //these id must define in public.xml and ids.xml also
move-object v0, v10
move/from16 v1, v26
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v26
check-cast v26, Landroid/widget/LinearLayout;
move-object/from16 v0, v26
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/statusbar/StatusBarService;->powerwidget:Landroid/widget/LinearLayout;
6. then search for .line 418 and make it look like this
Code:
.line 418
.local v12, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v12}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->powerwidget:Landroid/widget/LinearLayout;
move-object/from16 v26, v0
const/16 v27, 0x0
move-object/from16 v0, v26
move-object v1, v12
move/from16 v2, v27
invoke-virtual {v0, v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
7.then on statusbar_expanded.xml and statusbar_expanded_dual_sim.xml. paste this in the place u want
Code:
then recompile apk and push
this have been tested and worked on galaxy y duos and y pro duos
View attachment 2710461
any questions ????
Click to expand...
Click to collapse
Thankx to do this. I had wrote a whole guide on how to add all modes of my systemui to all ui's and not once but twice but lost the file due to pc issues both times so gave up. Was working on my own toggles and learning java but took a break on development since February now I have a moto g so this fone is with my mom. But still I gonna release the mod which I had made soon which has my own java made toggles and which don't need any Id comparison to add in other systemui + all other toggle mods u can get
Sent from my XT1033 using Tapatalk
samsoul16 said:
Thankx to do this. I had wrote a whole guide on how to add all modes of my systemui to all ui's and not once but twice but lost the file due to pc issues both times so gave up. Was working on my own toggles and learning java but took a break on development since February now I have a moto g so this fone is with my mom. But still I gonna release the mod which I had made soon which has my own java made toggles and which don't need any Id comparison to add in other systemui + all other toggle mods u can get
Sent from my XT1033 using Tapatalk
Click to expand...
Click to collapse
Waiting for your mod.
I'm sure it will be great and will help us a lot
Sent from my GT-B5512 using Carbon rom
is this gonna work for galaxy Y sir ? im desperately looking for similar guide like this
my problem is , every time i modded SystemUI.apk i lost my Status bar ... i dont know why :S on stock rom ..
Ok guys here I will tell you how to remove am/pm from statusbar. I decided to re write the whole method to get rid of unwanted code and make it more efficient. You can still use both 12hr and 24hr.
Things Needed:
Notepad ++
Tools
7zip
How to:
1. Unzip Tools folder to Desktop
2. Place Deodexed SystemUI.apk into folder
3. Hold shift key and Right click in folder. Then click `open command window here`
4. Type apktool d SystemUI.apk and hit enter. This will make a new folder called SystemUI
5. Go to SystemUI/smali/com/android/systemui/statusbar/policy/Clock.smali and open with Notepad++
6. Scroll down to the end of the file and near the end you will see:
Code:
[CENTER].method final updateClock()V[/CENTER]
[CENTER](CODE)[/CENTER]
[CENTER].end method[/CENTER]
Replace whole thing with:
Code:
[LEFT].method final updateClock()V[/LEFT]
[LEFT] .locals 7[/LEFT]
[LEFT] invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/Clock;->getContext()Landroid/content/Context;[/LEFT]
[LEFT] move-result-object v3[/LEFT]
[LEFT] .line 201[/LEFT]
[LEFT] .local v3, context:Landroid/content/Context;[/LEFT]
[LEFT] invoke-static {v3}, Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/Context;)Z[/LEFT]
[LEFT] move-result v2[/LEFT]
[LEFT] invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;[/LEFT]
[LEFT] move-result-object v0[/LEFT]
[LEFT] .line 37[/LEFT]
[LEFT] .local v0, cal:Ljava/util/Calendar;[/LEFT]
[LEFT] .line 38[/LEFT]
[LEFT] .local v2, h:Z[/LEFT]
[LEFT] const/4 v3, 0x0[/LEFT]
[LEFT] .line 40[/LEFT]
[LEFT] .local v3, sdf:Ljava/text/SimpleDateFormat;[/LEFT]
[LEFT] if-nez v2, :cond_0[/LEFT]
[LEFT] .line 41[/LEFT]
[LEFT] new-instance v3, Ljava/text/SimpleDateFormat;[/LEFT]
[LEFT] .end local v3 #sdf:Ljava/text/SimpleDateFormat;[/LEFT]
[LEFT] const-string v5, "h:mm"[/LEFT]
[LEFT] invoke-direct {v3, v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V[/LEFT]
[LEFT] .line 46[/LEFT]
[LEFT] .restart local v3 #sdf:Ljava/text/SimpleDateFormat;[/LEFT]
[LEFT] :goto_0[/LEFT]
[LEFT] invoke-virtual {v0}, Ljava/util/Calendar;->getTime()Ljava/util/Date;[/LEFT]
[LEFT] move-result-object v5[/LEFT]
[LEFT] invoke-virtual {v3, v5}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;[/LEFT]
[LEFT] move-result-object v1[/LEFT]
[LEFT] .line 47[/LEFT]
[LEFT] .local v1, dte:Ljava/lang/String;[/LEFT]
[LEFT] invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/policy/Clock;->setText(Ljava/lang/CharSequence;)V[/LEFT]
[LEFT] return-void[/LEFT]
[LEFT] .line 43[/LEFT]
[LEFT] .end local v1 #dte:Ljava/lang/String;[/LEFT]
[LEFT] :cond_0[/LEFT]
[LEFT] new-instance v3, Ljava/text/SimpleDateFormat;[/LEFT]
[LEFT] .end local v3 #sdf:Ljava/text/SimpleDateFormat;[/LEFT]
[LEFT] const-string v5, "HH:mm"[/LEFT]
[LEFT] invoke-direct {v3, v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V[/LEFT]
[LEFT] .restart local v3 #sdf:Ljava/text/SimpleDateFormat;[/LEFT]
[LEFT] goto :goto_0[/LEFT]
[LEFT].end method[/LEFT]
7. Save both files and close Notepad++
8. Hold shift key and right click folder again.
9. Type apktool b SystemUI nSystemUI.apk this will make a file called nSystemUI.apk
10. Open both files with 7zip and copy META-INF and AndroidManifest.xml form original apk to new apk
11. Flash, Enjoy and hit the thanks button.
Sorry for messy code. It changes the formatting when i post on here. Its good practice to keep code tidy
The attached apk is finished and is based on XXELL5. It has the theming show in screenshot.
{
"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"
}
Disable Bluetooth/Alarm/Volume Notifications in StatusBar
This MOD disables the ongoing Notifications for Bluetooth, Alarm and Volume
and can easily be modified to remove other ongoing statusbar notifications.
this MOD operates a little different it not only removes the icon but also the notification
as well, thus freeing up the statusbar. I tried several different mods for this and none seemed to work
the way I wanted them to so with a lot of searching and a little luck i found the smali code to disable
them rather than just hide the icons.
STEP 1:
Pull SystemUI.apk either from your device or from your ROM.zip file
from device: adb pull /system/priv-app/SystemUI.apk
from ROM.zip: extract /system/priv-app/SystemUI.apk
STEP 2:
using available tools decompile the apk (either using apktool or Virtuous Ten Studio) I recomend VTS
Locate smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali
make the changes listed below:
For Bluetooth notifications:
Search for .method private final updateBluetooth(Landroid/content/IntentV
in that method search for const-string v6, "bluetooth" it should look like this
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_aa[/COLOR]
const-string v6, "bluetooth"
invoke-virtual {v4, v6, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
invoke-virtual {v4, v5, v6}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_aa[/COLOR]
:cond_0
return-void"
For Alarm search for .method private final updateAlarm(Landroid/content/IntentV
Add the lines in BLUE
Code:
.method private final updateAlarm(Landroid/content/Intent;)V
.locals 3
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
[COLOR="Blue"]goto :goto_cc[/COLOR]
const-string v2, "alarm_clock"
invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_cc[/COLOR]
return-void
.end method
For volume search for .method private final updateVolume()V
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_bb[/COLOR]
const-string v7, "volume"
invoke-virtual {v6, v7, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
:cond_1
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
if-eq v4, v5, :cond_2
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v6, "volume"
invoke-virtual {v5, v6, v4}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
[COLOR="Blue"]:goto_bb[/COLOR]
:cond_2
return-void
STEP 3:
Save the smali file, recompile the SystemUI.apk and push to your device to test
adb push SystemUI.apk /system/priv-app/SystemUI.apk
adb shell
cd /system/priv-app
chmod 0644 SystemUI.apk
reboot
This smali fragment contains many other ongoing statusbar notifications that can be disabled using the same methods as above.
@cstayton
You made the community alive .... Till we have Official LP.... Awesome work as always Sir[emoji106]
{
"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"
}
cstayton said:
Disable Bluetooth/Alarm/Volume Notifications in StatusBar
This MOD disables the ongoing Notifications for Bluetooth, Alarm and Volume
and can easily be modified to remove other ongoing statusbar notifications.
this MOD operates a little different it not only removes the icon but also the notification
as well, thus freeing up the statusbar. I tried several different mods for this and none seemed to work
the way I wanted them to so with a lot of searching and a little luck i found the smali code to disable
them rather than just hide the icons.
STEP 1:
Pull SystemUI.apk either from your device or from your ROM.zip file
from device: adb pull /system/priv-app/SystemUI.apk
from ROM.zip: extract /system/priv-app/SystemUI.apk
STEP 2:
using available tools decompile the apk (either using apktool or Virtuous Ten Studio) I recomend VTS
Locate smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali
make the changes listed below:
For Bluetooth notifications:
Search for .method private final updateBluetooth(Landroid/content/IntentV
in that method search for const-string v6, "bluetooth" it should look like this
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_aa[/COLOR]
const-string v6, "bluetooth"
invoke-virtual {v4, v6, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
invoke-virtual {v4, v5, v6}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_aa[/COLOR]
:cond_0
return-void"
For Alarm search for .method private final updateAlarm(Landroid/content/IntentV
Add the lines in BLUE
Code:
.method private final updateAlarm(Landroid/content/Intent;)V
.locals 3
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
[COLOR="Blue"]goto :goto_cc[/COLOR]
const-string v2, "alarm_clock"
invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_cc[/COLOR]
return-void
.end method
For volume search for .method private final updateVolume()V
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_bb[/COLOR]
const-string v7, "volume"
invoke-virtual {v6, v7, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
:cond_1
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
if-eq v4, v5, :cond_2
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v6, "volume"
invoke-virtual {v5, v6, v4}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
[COLOR="Blue"]:goto_bb[/COLOR]
:cond_2
return-void
STEP 3:
Save the smali file, recompile the SystemUI.apk and push to your device to test
adb push SystemUI.apk /system/priv-app/SystemUI.apk
adb shell
cd /system/priv-app
chmod 0644 SystemUI.apk
reboot
This smali fragment contains many other ongoing statusbar notifications that can be disabled using the same methods as above.
Click to expand...
Click to collapse
Hey man! Thanks for this!
I was wondering if you could help me out with the following, I want to hide my bluetooth icon if bluetooth is enable and not connected to a paired device, but show it if I am connected to a paired device.
Thanks.
Rkr87 said:
Hey man! Thanks for this!
I was wondering if you could help me out with the following, I want to hide my bluetooth icon if bluetooth is enable and not connected to a paired device, but show it if I am connected to a paired device.
Thanks.
Click to expand...
Click to collapse
that'll take a little digging i'll see what i can find, no guarantees tho
You need:
• Notepad++
• Apktool
Lets Begin...
1.- Decompile the SystemUI.apk
Go to:
/smali/com/android/systemui/statusbar/phone/ and open PhoneStatusBar$FastColorDrawable.smali
Find this line:
Code:
.method public draw(Landroid/graphics/Canvas;)V
Delete the red code:
Code:
# virtual methods
[B].method public draw(Landroid/graphics/Canvas;)V[/B]
.locals 2
.param p1, "canvas" # Landroid/graphics/Canvas;
.prologue
.line 3191
[COLOR="Red"]iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;->mColor:I[/COLOR]
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V
.line 3192
return-void
.end method
Replace with it:
Code:
const v0, 0x[B]00[/B]000000
Hex Opacity Values:
• 100% — FF
• 95% — F2
• 90% — E6
• 85% — D9
• 80% — CC
• 75% — BF
• 70% — B3
• 65% — A6
• 60% — 99
• 55% — 8C
• 50% — 80
• 45% — 73
• 40% — 66
• 35% — 59
• 30% — 4D
• 25% — 40
• 20% — 33
• 15% — 26
• 10% — 1A
• 5% — 0D
0% — 00
I use in my example 75 % of transparency:
Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
.locals 2
.param p1, "canvas" # Landroid/graphics/Canvas;
.prologue
.line 3191
const v0, 0x[COLOR="Blue"][B]BF[/B][/COLOR]000000
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V
.line 3192
return-void
.end method
- Go to /res/layout and open status_bar_expanded_header.xml or gemini_status_bar_expanded_header.xml for MTK KK ROMS
Find this line
HTML:
android:background="@drawable/notification_header_bg"
Change to this:
HTML:
android:background="#bf000000"
Note: The #bf000000 code is the same in PhoneStatusBar$FastColorDrawable.smali
-Go to: /res/drawable-hdpi (as per the resolution of your device) and delete notification_panel_bg.9.png
2.- Decompile android.policy.jar
Go to: smali/com/android/internal/policy/impl/ and open PhoneWindowManager.smali
Find this line:
Code:
.method public getSystemDecorLayerLw()I
Delete the red code:
Code:
[B].method public getSystemDecorLayerLw()I[/B]
.locals 1
.prologue
[COLOR="Red"] .line 3187
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
.line 3189
:goto_0
return v0
.line 3188
:cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
goto :goto_0
[/COLOR]
.line 3189
:cond_1
const/4 v0, 0x0
[COLOR="DarkGreen"][B]goto :goto_0[/B][/COLOR]
.end method
And the green code replace with this:
Code:
[COLOR="Blue"]return v0[/COLOR]
The result will look like this:
Code:
[B].method public getSystemDecorLayerLw()I[/B]
.locals 1
.prologue
.line 3189
:cond_1
const/4 v0, 0x0
[COLOR="Blue"]return v0[/COLOR]
.end method
Finally recompile the SystemUI and android.policy.
Enjoy!
End Result:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Reserved