Guide is on post 3
Terms Explained
Clock Removed: The clock has been removed from the notification bar.
DateFormat-X: The date has been modified in the notification bar pulldown. Short (12.13.52) Medium (Dec 13, 1952) Long (December 13, 1952) Full (Monday, December 12, 1952)
TimeFormat-X: The time has been added to the notification bar pulldown. Short (3:30pm) Long (3:30:23pm) Full (3:30:23pm PST)
Alarm Clock Icon Removed: The alarm clock icon that appears when you have an upcoming alarm has been removed.
USB Debugging Icon Removed: When the usb is connected in debugging mode, the icon that usually appears will not.
Click to expand...
Click to collapse
DOWNLOADS
If you don't like the mod, or something when wrong when flashing another services.jar, use this.
1. Captivate (JPY or JS3)Stock Services.jar
2. i9000 JS3 Stock Services.jar
Click to expand...
Click to collapse
These Mods all include the clean backlight fix provided by sasovics. They should work with JPY JS3 and Rogers 2.2 Based Captivate Roms. This fix should get rid of any problems users were having with the phone.apk FC'ing.
3. Clock Removed. DateFormat-Medium. TimeFormat-Short.
4. Clock Removed. DateFormat-Medium. TimeFormat-Short. Alarm Clock Icon Removed.
5. Clock Removed. DateFormat-Medium. TimeFormat-Short. USB Debugging Icon Removed.
6. Clock Removed. DateFormat-Medium. TimeFormat-Short. Alarm Clock Icon Removed. USB Debugging Icon Removed.
Click to expand...
Click to collapse
These don't have the backlight fix. They will work with Captivate JPY, JS3, and Rogers 2.2 Roms . They will probably work on i9000 JPY and JS3 (As soon as someone tests, we'll know for sure)
7. Clock Removed. DateFormat-Medium. TimeFormat-Short.
8. Clock Removed. DateFormat-Medium. TimeFormat-Short. Alarm Clock Icon Removed.
9. Clock Removed. DateFormat-Short. TimeFormat-Short. Alarm Clock Icon Removed
10. Clock Removed. DateFormat-Medium. TimeFormat-Short. USB Debugging Icon Removed.
11. Clock Removed. DateFormat-Medium. TimeFormat-Short. Alarm Icon Removed. USB Debugging Icon Removed.
12. DateFormat-Medium. TimeFormat-Short. Alarm Icon Removed. USB Debugging Icon Removed.
Click to expand...
Click to collapse
These are Vibrant KA9 based Roms. Source is taken from Trigger 1.2 on the vibrant forums. If you are a Vibrant user, running a KA9 based Rom, try this out or request your own Mod!
13. Clock Removed. DateFormat-Full. TimeFormat-Short. Alarm Icon Removed.
Click to expand...
Click to collapse
14.
Click to expand...
Click to collapse
INSTRUCTIONS
To install, just flash the zip through Clockwork Recovery, or extract the services.jar and push the services.jar to /system/framework. The first boot will take a few minutes (up to 10 mins) then after that it should be a normal boot. This is because this mod wipes Dalvik-Cache.
REQUESTS
If you would like me to create a modded services.jar for your rom, just upload the services.jar and I'll see what I can do.
Request Format:
Rom Name and Version: Ex. Serendipity 5.4
Remove Time: Yes, No, Only AM/PM
Date in Notification Bar: None, Short, Medium, Long, Full
Time in Notification Bar: None, Short, Long, Full
Remove Alarm Icon: Yes or No
Remove Usb Debugging: Yes or No
Click to expand...
Click to collapse
Standard Disclaimer: As always, you should make a nandroid backup before doing any modifications to your phone. I am not responsible if this causes any damage.
{
"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"
}
Sorry, what does deodexed mean? I found something like this in the i9000 section and have been using it for a week or two, but I loved how serendipity's services.jar got rid of the usb debugging icon. Do you think you could make one without both the clock and usb debugging icon?
Guide for Removing and Adding Various Items to the servics.jar.
Directions for decompiling and recompiling the services.jar
I'm going to assume that you both have adb installed and know how to use it.
1. Extract the services.jar from your ROM (make a copy in case you mess something up) and place it in the /tools folder of your sdk.
2. Download smali and baksmali from http://code.google.com/p/smali/ and place them in the tools folder. Rename the files to baksmali.jar and smali.jar
3. Open the services.jar file with an archiving program. (I use 7zip because it's free)
4. Copy out the classes.dex file to the /tools folder of the sdk
5. To decompile, run the following command from the command prompt (Directory set as the /tools folder of your sdk)
Code:
java -jar baksmali.jar -o classout/ classes.dex
6. Now you should have a "classout" folder inside "tools"
7. Apply various mods
8. To recompile, Run the following command from the command prompt
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
9. If you applied the changes correctly, you should have a "new-classes.dex" file in your /tools folder.
10. Rename your old "classes.dex" to something else (or just delete it)
11. Rename "new-classes.dex" to "classes.dex"
12. Open the services.jar archive and place the "classes.dex" we just created in its place.
13. Place the services.jar back in the /system/framework folder.
Click to expand...
Click to collapse
Applying Mods
Remove Clock - Open the StatusBarPolicy.smali located in classout/com/android/server/status. Find the line
Code:
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
and replace with
Code:
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Click to expand...
Click to collapse
Remove Alarm Icon Open the StatusBarPolicy.smali located in /classout/com/android/server/status. Find the line
Code:
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
and replace with
Code:
const/4 v0, 0x0
const-string v1, "alarmSet"
const/4 v2, 0x0
Click to expand...
Click to collapse
Removing the USB Debugging Icon Open the NotificationManagerService.smali located in /classout/com/android/server. Find the following line and just comment it out.
Code:
iput v7, v6, Landroid/app/Notification;->icon:I
Becomes
Code:
#iput v7, v6, Landroid/app/Notification;->icon:I
Click to expand...
Click to collapse
Removing the Battery Open the StatusBarPolicy.smali found in classout/com/android/server/status. Find
Code:
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryIcon:Landroid/os/IBinder;
and ADD the following code below it
Code:
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Click to expand...
Click to collapse
Adding the Time to the Notification Pulldown - Open the DateView.smali located in classout/com/android/server/status. Find the following lines, or something very similar to it. The best way is to search for "getDateFormat". I have replaced the line numbers in my example with .line # because it will be different for every services.jar
Code:
.registers 3
.prologue
.line #
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
.line #
.local v0, now:Ljava/util/Date;
iget-object v1, p0, Lcom/android/server/status/DateView;->mContext:Landroid/content/Context;
invoke-static {v1}, Landroid/text/format/DateFormat;->getDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/android/server/status/DateView;->setText(Ljava/lang/CharSequence;)V
and replace that with
Code:
.registers 4
.prologue
.line #
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
.line #
.local v0, now:Ljava/util/Date;
const/4 v1, 0x2
const/4 v2, 0x3
invoke-static {v1, v2}, Ljava/text/DateFormat;->getDateTimeInstance(II)Ljava/text/DateFormat;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/android/server/status/DateView;->setText(Ljava/lang/CharSequence;)V
To control the length of the date and time edit
Code:
const/4 v1, 0x2
const/4 v2, 0x3
The first line is the date and the second line is the time. In My example, I am using a MEDIUM date (0x2) and a SHORT time (0x3)
FULL would be 0x0, LONG would be 0x1 etc., etc.
Click to expand...
Click to collapse
Adding Time and Removing Date from Pulldown - Open the DateView.smali located in classout/com/android/server/status. Find the following lines, or something very similar to it. The best way is to search for "getDateFormat". I have replaced the line numbers in my example with .line # because it will be different for every services.jar
Code:
.registers 3
.prologue
.line #
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
.line #
.local v0, now:Ljava/util/Date;
iget-object v1, p0, Lcom/android/server/status/DateView;->mContext:Landroid/content/Context;
invoke-static {v1}, Landroid/text/format/DateFormat;->getDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/android/server/status/DateView;->setText(Ljava/lang/CharSequence;)V
And replace with
Code:
.registers 3
.prologue
.line #
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
.line #
.local v0, now:Ljava/util/Date;
const/4 v1, 0x3
invoke-static {v1, v2}, Ljava/text/DateFormat;->getDateTimeInstance(II)Ljava/text/DateFormat;
move-result-object v1
invoke-static {v1}, Ljava/text/DateFormat;->getTimeInstance(I)Ljava/text/DateFormat;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/android/server/status/DateView;->setText(Ljava/lang/CharSequence;)V
Click to expand...
Click to collapse
Removing Date from Pulldown - Open the DateView.smali located in classout/com/android/server/status. Find the following lines, or something very similar to it. The best way is to search for "getDateFormat". I have replaced the line numbers in my example with .line # because it will be different for every services.jar
Code:
.registers 3
.prologue
.line #
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
.line #
.local v0, now:Ljava/util/Date;
iget-object v1, p0, Lcom/android/server/status/DateView;->mContext:Landroid/content/Context;
invoke-static {v1}, Landroid/text/format/DateFormat;->getDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/android/server/status/DateView;->setText(Ljava/lang/CharSequence;)V
And replace with
Code:
.registers 3
.prologue
.line #
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
.line #
.local v0, now:Ljava/util/Date;
const/4 v1, 0x3
invoke-static {v1, v2}, Ljava/text/DateFormat;->getDateTimeInstance(II)Ljava/text/DateFormat;
move-result-object v1
invoke-static {v1}, Ljava/text/DateFormat;->getTimeInstance(I)Ljava/text/DateFormat;
move-result-object v1
const-string v1, ""
invoke-virtual {p0, v1}, Lcom/android/server/status/DateView;->setText(Ljava/lang/CharSequence;)V
Click to expand...
Click to collapse
To only remove AM/PM from the Time- Open the StatusBarIcon.smali found in classout/com/android/server/status. Replace the following lines with their counterparts. TAKEN DIRECTLY FROM amosher13 IN THE EPIC FORUM NOTE: The .line numbers maybe be different from ROM to ROM.
At line 48 change:
Code:
.line 51
iget v6, p2, Lcom/android/server/status/IconData;->type:I
packed-switch v6, :pswitch_data_9a
TO:
Code:
.line 51
iget v6, p2, Lcom/android/server/status/IconData;->type:I
packed-switch v6, :pswitch_data_9c
---------------------------------
At line 93 change:
Code:
.line 63
const/4 v6, 0x6
invoke-virtual {v4, v6, v8, v8, v8}, Landroid/widget/TextView;->setPadding(IIII)V
.line 64
invoke-virtual {v4, v2}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
.line 65
iget-object v6, p2, Lcom/android/server/status/IconData;->text:Ljava/lang/CharSequence;
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 66
iput-object v4, p0, Lcom/android/server/status/StatusBarIcon;->view:Landroid/view/View;
goto :goto_10
.line 72
.end local v2 #layoutParams:Landroid/widget/LinearLayout$LayoutParams;
.end local v4 #t:Landroid/widget/TextView;
:pswitch_3f
const-string v6, "layout_inflater"
invoke-virtual {p1, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/view/LayoutInflater;
TO:
Code:
.line 63
const/4 v6, 0x6
const/16 v7, -0x26
invoke-virtual {v4, v6, v8, v7, v8}, Landroid/widget/TextView;->setPadding(IIII)V
.line 64
invoke-virtual {v4, v2}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
.line 65
iget-object v6, p2, Lcom/android/server/status/IconData;->text:Ljava/lang/CharSequence;
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 66
iput-object v4, p0, Lcom/android/server/status/StatusBarIcon;->view:Landroid/view/View;
goto :goto_10
.line 72
.end local v2 #layoutParams:Landroid/widget/LinearLayout$LayoutParams;
.end local v4 #t:Landroid/widget/TextView;
:pswitch_41
const-string v6, "layout_inflater"
invoke-virtual {p1, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/view/LayoutInflater;
-----------------------------------
At line 175 change:
Code:
.line 86
iget v6, p2, Lcom/android/server/status/IconData;->number:I
if-lez v6, :cond_93
TO:
Code:
.line 86
iget v6, p2, Lcom/android/server/status/IconData;->number:I
if-lez v6, :cond_95
------------------------------------
At line 208 change:
Code:
.line 90
:cond_93
const/16 v6, 0x8
invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V
goto/16 :goto_10
.line 51
:pswitch_data_9a
.packed-switch 0x1
:pswitch_11
:pswitch_3f
.end packed-switch
.end method
.method static getIcon(Landroid/content/Context;Lcom/android/server/status/IconData;)Landroid/graphics/drawable/Drawable;
.registers 9
.parameter "context"
.parameter "data"
.prologue
const/4 v5, 0x0
const-string v6, "StatusBar"
TO:
Code:
.line 90
:cond_95
const/16 v6, 0x8
invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V
goto/16 :goto_10
.line 51
:pswitch_data_9c
.packed-switch 0x1
:pswitch_11
:pswitch_41
.end packed-switch
.end method
.method static getIcon(Landroid/content/Context;Lcom/android/server/status/IconData;)Landroid/graphics/drawable/Drawable;
.registers 9
.parameter "context"
.parameter "data"
.prologue
const/4 v5, 0x0
const-string v6, "StatusBar"
Click to expand...
Click to collapse
Click to expand...
Click to collapse
And here are the links I used to create this Tutorial. I merely read what these guys did, and put it all together in one place. If you feel the need to donate, please donate to one of these guys.
[HOW-TO] Change status bar clock color
[HOW-TO] Hide various Icons from the Status Bar
Can the time be placed next to the date on status bar when clock is removed?
[MOD] Remove Clock and Date from Statusbar/Notification Clock and Remove Date
Looks great with Serendipity.
I always hated the clock in the NB anyway. lol
Thanks a lot, just what I was looking for
JS3/JPY Versions. (No Backlight Fix)
nice. i hate clocks
Do you think you could remove the clock from the latest services.jar from serendipity 5.4? File is attached
Thnikk said:
Do you think you could remove the clock from the latest services.jar from serendipity 5.4? File is attached
Click to expand...
Click to collapse
Normally, you would just be able to flash the same .zip I attached earlier, but the most recent change in 5.4 messes with the services.jar, so I'll give it a shot.
I went from 5.3 to 5.4 on Serendipity last night and the alarm never went off using this. I was an hour late to work and my cat exploded. :-(
Sent from my SAMSUNG-SGH-I897 using Tapatalk
Debugging Removed!
Serendipity Mods Added!
For anyone that wants the usb debugging icon removed, use these.
2 More Mods added! They were built from Firefly (Rogers 2.2) but will work on JPY and JS3
No Clock No Debugging No Backlight: Doesn't have the backlight fix,
No Debugging No Backlight: Is just Clock is stock, but debugging is gone and no backlight fix.
I'd like a verion that removes the clock but keeps the alarm notification, I'm on Serendipity 5.4
i would like the clock removed completely i use a widget for weather and clock on phoenix
OP Updated!
New Update's added!
*JPY No Clock with di11igaf's Backlight Fix
http://forum.xda-developers.com/showthread.php?t=943015
*JPY No Clock No alarm with di11igaf's Backlight Fix
* Serendipity 5.4 No Clock
* Serendipity 5.4 No Clock No Alarm
I also reworked the OP a little bit, so go check it out!
mikehe said:
i would like the clock removed completely i use a widget for weather and clock on phoenix
Click to expand...
Click to collapse
Do you want it removed from the Notification Pulldown as well?
It doesn't really do too much harm to have the Date and Time listed there, and you can still access the time in 3rd Party apps just by checking your notifications.
yes a cross the toolbar is worthless to me since my widget has it big and nice on home screen
mikehe said:
yes a cross the toolbar is worthless to me since my widget has it big and nice on home screen
Click to expand...
Click to collapse
Alright, try this
Its the basic clock removal found in the first post.
Phoenix is based off JPY, so this should work for you.
Rom Name and Version: Darky's 9.2
Remove Time: Yes
Date in Notification Bar: Short
Time in Notification Bar: Short
Remove Alarm Icon: Yes
Remove Usb Debugging: No
I know Darky's 9.2 is JS3, but i would assume its similar to JPY.....and i dont mind testing
Thanks
It worked fine on Darky 9.2. Just flashed it.
I didn't see what was posted above. Sorry
Related
I'm posting this here as I helped Kryten2k35 make this for his base XXEMB5 (4.1.2) but they are all likely very similar.
The code is very similar to the SGS2 and I have edited it for this base. My original thread is here: http://forum.xda-developers.com/showthread.php?t=2194003
I've been having many PM's on how to create this toggle and honestly I have been meaning to post this for a while.
Firstly thanks to Mirko-ddd for enabling Crt-Off Animation which allowed me to do this. Thank him HERE
No need to enable from the link above as I have included it with this toggle How-To.
Also Thanks to my teammate Jeboo for teaching me some smali and helping me with this function!
So I'm not a posting master and I do have 2 kids buzzing around me while I type this!.. LOL :highfive:
Here we start with SecSettings.apk
1)
/res/values/Strings.xml
Code:
<string name="crtanimation_title">CRT Animation</string>
<string name="crtanimation_summary">Enables animation when powering off screen</string>
2)
/res/xml/Display_Settings.xml (Input this line where you want it to show.)
Code:
<CheckBoxPreference android:title="@string/crtanimation_title" android:summary="@string/crtanimation_summary" android:key="crtanimation_toggle" />
3)
\SecSettings\smali\com\android\settings\DisplaySettings.smali
Add the RED
Code:
.field mSupportFolderType:Z
.field private mTouchKeyLight:Landroid/preference/ListPreference;
[COLOR="red"].field private mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
4)
Code:
const-string v13, "key_multi_window"
move-object/from16 v0, p0
invoke-virtual {v0, v13}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v13
check-cast v13, Landroid/preference/CheckBoxPreference;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[COLOR="red"] const-string v13, "crtanimation_toggle"
move-object/from16 v0, p0
invoke-virtual {v0, v13}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v13
check-cast v13, Landroid/preference/CheckBoxPreference;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual/range {p0 .. p0}, Lcom/android/settings/DisplaySettings;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v13
const-string v14, "com.sec.feature.multiwindow.phone"
invoke-virtual {v13, v14}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z
5)
Code:
:cond_15
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
[COLOR="Red"]if-eqz v0, :cond_new[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :cond_16
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v2, "multi_window_enabled"
invoke-static {v0, v2, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
:cond_16
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
[COLOR="red"] :cond_new
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 987
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 988
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "crtanimation_toggle"
if-nez v0, :cond_newA
const/4 v0, 0x0
goto :cond_newB
:cond_newA
const/4 v0, 0x1
:cond_newB
invoke-static {v3, v4, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
[/COLOR]
.end method
6)
Code:
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_5
:goto_2
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
:cond_2
[COLOR="red"] iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "crtanimation_toggle"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :goto_2b
const/4 v1, 0x1
goto :goto_2c
:goto_2b
const/4 v1, 0x0
:goto_2c
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
return-void
:cond_3
move v0, v2
goto :goto_0
:cond_4
iget v0, p0, Lcom/android/settings/DisplaySettings;->mDirect:I
That's it for SecSettings.
Recompile and test it functions before continuing.
Once that works lets enable the function.
I'm including the function to enable as previously linked to mirko_ddd's thread.
Next we mod services.jar
7)
\services\smali\com\android\server\PowerManagerService$ScreenBrightnessAnimator.smali
Code:
#setter for: Lcom/android/server/PowerManagerService;->mHighestLightSensorValue:I
invoke-static {v7, v9}, Lcom/android/server/PowerManagerService;->access$8202(Lcom/android/server/PowerManagerService;I)I
:cond_1
:goto_1
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
[COLOR="Red"] move-object v0, p0
iget-object v2, v0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/server/PowerManagerService;->access$2300(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v9, "crtanimation_toggle"
const/4 v10, 0x0
invoke-static {v2, v9, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_new2
if-eqz p2, :cond_new2
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_new2
[/COLOR]
const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
const/16 v9, 0xa
invoke-virtual {v7, v9, p1, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v2
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
And that's it!
Recompile and enjoy.
All I ask is for credit in your Mod or Rom.
Re: [How-To]CRT-OFF Animation Toggle (made using XXEMR2 [4.1.2])
thanx, I will try to add it to my frmaework
Chaos ^_^ said:
thanx, I will try to add it to my frmaework
Click to expand...
Click to collapse
when i tried to recompile SecSettings.apk i got this message
C:\apktoolv3>apktool b working/SecSettings built/SecSettings-unsigned.apk
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:243)
at brut.androlib.Androlib.buildSources(Androlib.java: 200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
any idea ?
Chaos ^_^ said:
when i tried to recompile SecSettings.apk i got this message
C:\apktoolv3>apktool b working/SecSettings built/SecSettings-unsigned.apk
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:243)
at brut.androlib.Androlib.buildSources(Androlib.java: 200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
any idea ?
Click to expand...
Click to collapse
Please attach/post the decompiled XML's and Smali that were modded so I can look at what was done.
ok
shoman94 said:
Please attach/post the decompiled XML's and Smali that were modded so I can look at what was done.
Click to expand...
Click to collapse
here is the files
Chaos ^_^ said:
here is the files
Click to expand...
Click to collapse
So I can see a typo (extra space) in string.xml which is likely not a problem but should be fixed.
You didn't attach display_settings.xml so I can't see that one.
But the main Issue I see is Edit#5.
You changed the line to cond_new but you didn't add the :cond_new code at the end of that method. Scroll down edit#5 in the OP and you will see.
I hope that helps.
shoman94 said:
So I can see a typo (extra space) in string.xml which is likely not a problem but should be fixed.
You didn't attach display_settings.xml so I can't see that one.
But the main Issue I see is Edit#5.
You changed the line to cond_new but you didn't add the :cond_new code at the end of that method. Scroll down edit#5 in the OP and you will see.
I hope that helps.
Click to expand...
Click to collapse
unfortunately its still not working, thanks anyway
Chaos ^_^ said:
unfortunately its still not working, thanks anyway
Click to expand...
Click to collapse
Sorry you are having trouble. Before adding the changes make sure you can compile it to begin with. I know it works as Kryten2k35 compiled it without issue and it all works fine.
Good luck.
shoman94 said:
Sorry you are having trouble. Before adding the changes make sure you can compile it to begin with. I know it works as Kryten2k35 compiled it without issue and it all works fine.
Good luck.
Click to expand...
Click to collapse
its working without adding your mod, anyway I will try again tonight
Works fine for me. CRT-OFF is correct enabled/disabled with this mod
I have only one problem with display correct name of the toggle added.
{
"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"
}
slim80 said:
Works fine for me. CRT-OFF is correct enabled/disabled with this mod
I have only one problem with display correct name of the toggle added.
Click to expand...
Click to collapse
What language is that?
I'm taking a guess here, but you need to add translations to other strings for different languages.
Like for example you want to add the mod to the russian language, you have to mod strings-ru.
Try that...
---------- Post added at 06:22 PM ---------- Previous post was at 06:18 PM ----------
Thanks for this mod.
Works perfect for me.
I cannot find :cond_0 from step #5 in the OP.
I even looking in Wanam's MB5 smali and could not find a match for it in there either. Was this a typo or can someone give me some surrounding code to port this over please? Tnx
Edit: Should it be :cond_new maybe?
tdunham said:
I cannot find cond_0 from step #5 in the OP.
I even looking in Wanam's MB5 smali and could not find it in there either. Was this a typo or can someone give me some surrounding code to port this over please? Tnx
Click to expand...
Click to collapse
What the condition was that you changed to cond_new will go in place of cond_0 in step 5. Understand?
Edit: that cond can depend on the decompiler.
Edit2: don't forget to scroll down in step 5 for more code to put in.
Sent from my Transformer Prime TF201 using Tapatalk 2
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
You cannot, you need a custom kernel to do that and there are'nt for leaked roms. Maybe you can have it working to some degree but it always be defective. That mod requires support by the kernel, smali modifications apart.
Ive done this mod on stock 4.1.2 also and there wasnt any problem.
And it works with stock kernel as long as your connected to wifi.
My question is since i cant find that specific smali, do i edit another smali or search in another folder?
I can do the rest x)
Sent from my GT-N7100 using Tapatalk 4 Beta
AskinSavascisi said:
Ive done this mod on stock 4.1.2 also and there wasnt any problem.
And it works with stock kernel as long as your connected to wifi.
My question is since i cant find that specific smali, do i edit another smali or search in another folder?
I can do the rest x)
Sent from my GT-N7100 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Sorry buddy, I think I misunderstood the thread for another one.
Sorry I can't help, though.
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
Maybe you can ask @criscan to help you out
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
It's totally different on 4.2.2.... look in the sgs4 section under themes and apps.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
@shoman94
Thanks to your awesome tutorial, I've added CRT Off animation to my ROM.. But there is something I'd like to mention... The CRT off effect works great.. no lag, no nothing.. but if I turn CRT animation off from Settings then there is always a "slight delay" when I lock my phone (i.e power off the display with the power button).. like the screen will be "almost dark" for a second then it will shut off completely..
Its kind of hard for me to explain this in words but I hope that you understood what I meant.. PS: In addition to your tutorial, I also followed this to prevent a "glitch turning off effect"
[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]
How to permenantly remove SysScope from your Samsung Touchwiz ROM
Tired of the constant custom padlock on startup? Want permenant device status "Official"?
Team Blackout and KoolKit ROMs are not responsible if you blow up your house, your dog eats your homework,
the zombie apacolypse, your wife/husband divorcing you or if your device turns into an unrecognizable
smoldering pile of plastic. by reading this you agree to take all responsibility for any damage you do to the
universe, your device, your marriage or your failing grades in school or college.
Click to expand...
Click to collapse
This guide and mod originated in the Galaxy S4 threads and was created by @Aou who has since left the AT&T world so development
stopped at that point, I have taken the code and modded it slightly to work for our S5 devices (All variants even the Active)
Click to expand...
Click to collapse
All devs are free to use this MOD with proper recognition in your OP make sure you provide a mention to "Aou" for the
original code found here Removing SysScope - Permanent "Official" Device Status
and myself for the re-write of the instructions and changes to make this work for our devices.
Click to expand...
Click to collapse
NOTICE:
This MOD is not for the squeamish or novice modder it requires patience and a good amount of time to complete.
Click to expand...
Click to collapse
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Main Instructions:
1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)
2. Pull a copy of the SecSettings.apk
adb pull /system/priv-app/SecSettings.apk
3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)
4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.
REMOVE:
Code:
.field private isSysScopeStatus:I
REMOVE:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
REMOVE:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
REMOVE:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
REMOVE:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.
Code:
.line 952
const v1, 0x7f0901a7
TO:
Code:
.line 952
const v1, [B]0x7f0901a5[/B]
CHANGE:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
TO:
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
[B]const v1, 0x7f0901a6[/B]
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
Delete: /smali/com/android/settings/deviceinfo/status$2.smali
re-compile SecSettings.apk
INSTALL:
Install! Use "adb shell" to begin, and use the following commands, one at a time:
rm /system/app/SysScope.apk
rm -r /data/dalvik-cache/*
push SecSettings.apk /system/priv-app/SecSettings.apk
chmod 0644 /system/priv-app/SecSettings.apk
reboot
Click to expand...
Click to collapse
reserved
reserved
Nice. People with o.c.d. are gonna love this. Nice work.
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
GDofWR420 said:
Nice. People with o.c.d. are gonna love this. Nice work.
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Click to expand...
Click to collapse
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
cstayton said:
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
Click to expand...
Click to collapse
Lol. Yea no coffee this morning but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.
Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Here is not working
The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?
or change this
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
for this
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f0901a6
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
?
eric-filth said:
Here is not working
The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?
or change this
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
for this
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f0901a6
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
?
Click to expand...
Click to collapse
you need to change the whole method out the lines with the ID are what you need to look up in your build to match to the appropriate status response.
GDofWR420 said:
Lol. Yea no coffee this morning but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.
Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Click to expand...
Click to collapse
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
cstayton said:
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
Click to expand...
Click to collapse
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.
Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
GDofWR420 said:
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.
Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
Click to expand...
Click to collapse
hmmmm, i wonder if it has an entry in csc that it couldnt handle because its locked down? I might have to re-think the whole "xPosed-Proof" feature mod.
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
{
"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"
}
deduction said:
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
Click to expand...
Click to collapse
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
cstayton said:
How to permenantly remove SysScope from your Samsung Touchwiz ROM
Tired of the constant custom padlock on startup? Want permenant device status "Official"?
NOTICE:
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Main Instructions:
1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)
2. Pull a copy of the SecSettings.apk
adb pull /system/app/SecSettings.apk
3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)
4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.
REMOVE:
Code:
.field private isSysScopeStatus:I
REMOVE:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
REMOVE:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
REMOVE:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
REMOVE:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.
Code:
.line 952
const v1, 0x7f0901a7
TO:
Code:
.line 952
const v1, [B]0x7f0901a5[/B]
CHANGE:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
TO:
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
[B]const v1, 0x7f0901a6[/B]
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
INSTALL:
Click to expand...
Click to collapse
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
elliwigy said:
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
from the error looks as if you are trying to decompile with the wrong frameworks youll need to make sure the framework-res.apk and twframework-res.apk are the ones unmodded stock ones from your rom base
elliwigy said:
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
once you have the mod completed yes, remove sysscope.apk and place modded secsettings in rom base and flash
ok...can you take a look at these? I get about half way through your guide and then it gets lost. I don't know if the info just isnt there or what?
Thanks!
deduction said:
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
Click to expand...
Click to collapse
your not looking sysscope your actually looking for " <public type="string" name="sysscope_normal" you have to be specific in the search
am having trouble getting dropbox or anywhere to work. Here is the untouched status.smali.
Thanks very much...I keep getting stumped because the edits I need to make just don't seem to be there when I decompile the apk. Not sure why.
small change in OP
small change in OP
Delete: /smali/com/android/settings/deviceinfo/status$2.smali
re-compile SecSettings.apk
Hello.thanks man. Working great on my 5.1.1 Samsung note edge ROM..
regards
@cstayton
"<public type="string" name="sysscope_tampered" id="0x7f0a01be" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0a01bd" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0a01bc" />"
Those are my public values.
Im having trouble with the last Change. I have changed and removed everything else, could you help me with the last step? Im not sure what needs to be changed. My smali.status should be attached. any help is appreciated. thank you
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
Hi guys,
Today I'm going to share a method with which you can add apps shortcuts to your SystemUI, well it's called Onclick method and it's not mine it's sir @SpaceCaker's and as I got he's permission to make a separate guide on it I'm posting this, I said separate because this guide is already there on he's 4.2.2 status bar guide but I thought a separate guide would be more helpful for some people so I'm posting this with permission so let's begin
Requirements:
Brain
Patience
Experience
Apktool or anything like it
How to:
1. Decompile your SystemUI.apk
2. Go to smali/com/android/systemui/SystemUIService.smali
3. Now add this:
Code:
.method public settings(Landroid/view/
View;)V
.locals 5
.parameter "view"
.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-
><init>()V
.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-virtual {v1, v2}, Landroid/content/
Intent;->setAction(Ljava/lang/String;)Landroid/
content/Intent;
.line 105
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/
Intent;->setFlags(I)Landroid/content/Intent;
.line 107
const-string v2, "com.android.settings"
const-string v3,
"com.android.settings.Settings"
invoke-virtual {v1, v2, v3}, Landroid/content/
Intent;->setClassName(Ljava/lang/String;Ljava/
lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Lcom/android/systemui/
SystemUIService;->startActivity(Landroid/
content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_
0 .. :try_end_0} :catch_0
.line 109
.line 112
.end local v1 #intent:Landroid/content/
Intent;
:goto_0
return-void
.line 115
:catch_0
move-exception v0
.line 117
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;-
>printStackTrace()V
goto :goto_0
.end method
4. Now you can edit 3 things in it and they are:
1. The Onclick title: "settings" above here or in easy words the one below between "****"
Code:
.method public "anything"(Landroid/view/View;)V
2. The package: const-string v2, "anything"
3. The activity: const-string v3, "anything"
4. So now you need to edit these 3 things to whatever you want, give your Onclick a title, change the package and than the activity, do note you have to edit both and you can add any shortcut with this but if you're adding user installed apps shortcuts than make sure you have the app installed
5. Now add this to res/layout/"wherever you want "
Code:
android:onClick="anything"
This is what adds the onclick method to something
6. Now recompile your SystemUI.apk, sign, push, reboot and enjoy a shortcut which will save some valuable time of yours
Credits:
@SpaceCaker
Use this app to get the activities:
https://play.google.com/store/apps/details?id=de.szalkowski.activitylauncher&hl=en
If your browser has problems with coping the code from the first post download this and copy:
https://www.androidfilehost.com/?fid=673368273298942983
Screenshot:
Couple Status Bar Icon Toggles I'll share. Thanks to @loserskater for his guides pointing me in the right direction. Also to @Goldie for the smali guide. And a little bit of digging through @tdunham and @rompnit's SystemUI from MOAR. I've gotten their permission to post these guides and I plan to expand upon it. Figured I'd give it its own thread too.
Add Toggle On/Off for Alarm Icon
First you will want to increase .locals by 1. Mine was .locals 5 and I changed it to .locals 6 for this. The basic idea when doing these is that you need to look at the locals you have right now. They are always 1 higher than what the highest value or v in the method is. Noting this so that this can be done on other devices besides the S5 in case code has changed and the values.
For a quick example of what values you need for the new code we're adding. We will look at what I've done with this alarm on/off toggle. We are adding 2 new values so look at the locals now. Look at the method and see what the highest value is. Where I have v4 in all the lines we're adding you will be putting it 1 value (v) higher than what the highest one in the file is. Next is the string for the toggle itself in this case it is const-string v5, "statusbar_hide_alarm". This is you key that the toggle runs off of. It will need to be 1 higher than the others. Next you will see this line with 3 values. v4 which we just went over is the first value. Then v5 which is the key will be second. And lastly v1 which is going to always be from the setIconVisibility line that was originally in the code where we are modifying to add the toggle. In this case. "invoke-virtual {v2, v3, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V" As you can see it is v1 in that line so you will place it last in the getInt line and replace it in the const/4 v1, 0x0 near the end of what we're adding.
invoke-static {v4, v5, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
As far as the cond (condition) lines go you can make them :condtm or whatever you want as long as the condition isn't already used in the method. Similar to the values.
In SystemUI.apk edit com/android/statusbar/phone/StatusBarPhonePolicy.smali
Search for .method private updateAlarm()V
Add lines in blue. Change lines in green.
Code:
.method private updateAlarm()V
[COLOR="Green"].locals 6[/COLOR]
.prologue
.line 221
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const-string v3, "alarm"
invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/AlarmManager;
.line 222
.local v0, "alarmManager":Landroid/app/AlarmManager;
const/4 v2, -0x2
invoke-virtual {v0, v2}, Landroid/app/AlarmManager;->getNextAlarmClock(I)Landroid/app/AlarmManager$AlarmClockInfo;
move-result-object v2
if-eqz v2, :cond_0
const/4 v1, 0x1
.line 223
.local v1, "alarmSet":Z
:goto_0
[COLOR="Blue"]iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "statusbar_hide_alarm"
invoke-static {v4, v5, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-nez v4, :cond_tm
const/4 v1, 0x0
:cond_tm[/COLOR]
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v3, "alarm_clock"
invoke-virtual {v2, v3, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 224
return-void
.line 222
.end local v1 # "alarmSet":Z
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
In your CustomSettings.apk add this line to preferences.xml where you want the toggle to appear.
<CheckBoxPreference android:title="Hide Alarm Icon" android:key="statusbar_hide_alarm" android:summaryOn="Alarm icon is visible." android:summaryOff="Alarm icon is hidden." />
Add Toggle On/Off for Bluetooth Icon
In SystemUI.apk edit com/android/statusbar/phone/StatusBarPhonePolicy.smali
First you will want to increase .locals by 2 because we are adding 2 new values. Mine was .locals 6 and I changed it to .locals 8 for this. The basic idea when doing these is that you need to look at the locals you have right now. They are always 1 higher than what the highest value or v in the method is. Noting this so that this can be done on other devices besides the S5 in case code has changed and the values.
Code:
.method private final updateBluetooth()V
[COLOR="green"].locals 8[/COLOR]
.prologue
const/4 v4, 0x0
.line 393
invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;
move-result-object v0
.line 394
.local v0, "adapter":Landroid/bluetooth/BluetoothAdapter;
const v2, 0x7f0202a8
.line 395
.local v2, "iconId":I
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const v5, 0x7f0c020a
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
.line 397
.local v1, "contentDescription":Ljava/lang/String;
if-eqz v0, :cond_2
.line 398
invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getState()I
move-result v3
const/16 v5, 0xc
if-ne v3, v5, :cond_1
const/4 v3, 0x1
:goto_0
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
.line 399
invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getConnectionState()I
move-result v3
const/4 v5, 0x2
if-ne v3, v5, :cond_0
.line 400
const v2, 0x7f0202a9
.line 401
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const v5, 0x7f0c0209
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
.line 407
:cond_0
:goto_1
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
invoke-virtual {v3, v5, v2, v4, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
.line 408
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v4, "bluetooth"
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
[COLOR="Blue"]iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v6}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v6
const-string v7, "statusbar_hide_bluetooth"
invoke-static {v6, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v6
if-nez v6, :cond_tm
const/4 v5, 0x0
:cond_tm[/COLOR]
invoke-virtual {v3, v4, v5}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 409
return-void
:cond_1
move v3, v4
.line 398
goto :goto_0
.line 367
:cond_2
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
goto :goto_1
.end method
In your CustomSettings.apk add this line to preferences.xml where you want the toggle to appear.
<CheckBoxPreference android:title="Hide Bluetooth Icon" android:key="statusbar_hide_bluetooth" android:summaryOn="Bluetooth Icon is visible." android:summaryOff="Bluetooth Icon is hidden." />
Volume Icons (Vibrate/Silent) on/off
This guide will be split into 2 parts. 1st for those that have enough registers left in this method we're adding then for those that don't. How to tell if you have enough room? If the locals is higher than 13 than you have too many in the method from the start for us to add these. Again I raised the locals by 2 since we're adding 2 more to it. So from 13 to 15 (the max). So if its 13 you'll be changing them to 15 like so
Code:
.method private final updateVolumeZen()V
[COLOR="Green"].locals 15[/COLOR]
Now that we fixed the locals search in the same method for these strings. It will make life easier than posting the long method for this since they're toward the end.
Search for Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V and add the blue lines above it.
Code:
iget-object v7, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v8, "volume"
[COLOR="Blue"] iget-object v14, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v14}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v14
const-string v13, "statusbar_hide_volume"
invoke-static {v14, v13, [COLOR="Purple"]v3[/COLOR]}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v14
if-nez v14, :cond_tm
const/4 [COLOR="Purple"]v3[/COLOR], 0x0
:cond_tm[/COLOR]
invoke-virtual {v7, v8, [COLOR="Purple"]v3[/COLOR]}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
Now we will have to repeat this a 2nd time for the 2nd icon.
Search again for Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V and add the blue lines above it.
I will make the values match those above because thats what it needs so adjust accordingly. Then you need to input the correct value from setIconVisibilty line like I showed in the first guide. It will be the 3rd Value(v) in this line which I marked them with purple. So as you'll see they match.
Code:
iget-object v7, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v8, "zen"
[COLOR="Blue"]iget-object v14, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v14}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v14
const-string v13, "statusbar_hide_volume"
invoke-static {v14, v13, [COLOR="Purple"]v6[/COLOR]}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v14
if-nez v14, :cond_b
const/4 [COLOR="Purple"]v6[/COLOR], 0x0
:cond_b[/COLOR]
invoke-virtual {v7, v8, [COLOR="Purple"]v6}[/COLOR], Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mZenVisible:Z
Now to add the toggle to custom settings. Add it in with the last 2 in preferences.xml
<CheckBoxPreference android:title="Hide Volume Icons" android:key="statusbar_hide_volume" android:summaryOn="Vibration and Silent Icons are visible." android:summaryOff="Vibration and Silent Icons are hidden." />
Part 2 for those of you like me who have too many registers.
Haven't figured this one out yet. Having some trouble with it.
Reserved 2
Awesome, thank you for this.
Almost forgot I did one for Home Key Wake too. I'll add this one in this post in a few minutes. Thanks to @rompnit and @tdunham for their guide for disabling this which pointed me in the right direction.
[Guide] How To Add Toggle for Home Key Wake
Edit android.policy.jar edit the smali/com/android/interal/policy/impl/PhoneWindowManager.smali
Search for .method private isWakeKeyWhenScreenOff(I)Z
Add lines in blue. Change ones in green.
Ignore .line codes they probably will be different. I changed the locals for this method from 3 to 5 because we're adding 2 more values here. The basic idea when doing these is that you need to look at the locals you have right now in the method. They are always 1 higher than what the highest value or v in the method is.
Code:
.method private isWakeKeyWhenScreenOff(I)Z
[COLOR="Green"] .locals 5[/COLOR]
.param p1, "keyCode" # I
.prologue
const/4 v0, 0x1
const/4 v1, 0x0
.line 5966
sparse-switch p1, :sswitch_data_0
.line 5992
:cond_0
:goto_0
return v0
.line 5971
:sswitch_0
iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mDockMode:I
if-nez v2, :cond_0
move v0, v1
goto :goto_0
:sswitch_1
move v0, v1
.line 5990
goto :goto_0
[COLOR="Blue"]:sswitch_2
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "wake_home"
const v4, 0x1
invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-nez v3, :cond_0
return v1[/COLOR]
.line 5966
:sswitch_data_0
.sparse-switch
[COLOR="Green"]0x3 -> :sswitch_2[/COLOR]
0x19 -> :sswitch_0
0x1b -> :sswitch_1
0x4f -> :sswitch_1
0x55 -> :sswitch_1
0x56 -> :sswitch_1
0x57 -> :sswitch_1
0x58 -> :sswitch_1
0x59 -> :sswitch_1
0x5a -> :sswitch_1
0x5b -> :sswitch_1
0x7e -> :sswitch_1
0x7f -> :sswitch_1
0x82 -> :sswitch_1
0xa4 -> :sswitch_0
0xde -> :sswitch_1
0x149 -> :sswitch_1
.end sparse-switch
.end method
Now to add it to CustomSettings.apk. This will add a screen just for Hardware Key Mods. You can just add the part in red wherever if you don't want it in its own screen.
<PreferenceScreen android:title="Hardware Key Mods">
<PreferenceScreen android:title="Home Button Wake" android:summary="Prevents screen wake with Home button.">
<CheckBoxPreference android:title="Disable Home Button Wake" android:key="wake_home" android:defaultValue="false" android:summaryOn="Home Button Enabled" android:summaryOff="Home Button Disabled" />
</PreferenceScreen>
</PreferenceScreen>
Very nice guides! I'm going to try these out on my S6. I'll let you know how it goes when I get a chance to try them. Thanks.
Awesome guides @talkingmonkeys keep em coming!! Can't wait to try these!
Perhaps @Goldie or @txr33 or @daxgirl if any of you have the time you could any of you help me with adding the code for a toggle when theres already too many values in the method? I have 23 locals for the method that the volume icons for status bar are in. @tdunham suggested trying to find some between 1-15 that were unused but after trying every one its always telling me its wrong on the compile. Thanks for any help! I'll provide files if needed.
I will gladly have a look
And btw although I was the first one with thanks, still didn't get time to congratulate! You always do amazing job! Any guide you make is amazing! Keep'em coming!
Sent from my awesome g920f powered by 6thGear
daxgirl said:
I will gladly have a look
And btw although I was the first one with thanks, still didn't get time to congratulate! You always do amazing job! Any guide you make is amazing! Keep'em coming!
Sent from my awesome g920f powered by 6thGear
Click to expand...
Click to collapse
Sent you what needs looked at in a pm. Thank you but if it wasn't for you, goldie, tdunham and rompnit I would still be lost with all of this.
talkingmonkeys said:
Couple Status Bar Icon Toggles I'll share. Thanks to @loserskater for his guides pointing me in the right direction. Also to @Goldie for the smali guide. And a little bit of digging through @tdunham and @rompnit's SystemUI from MOAR. I've gotten their permission to post these guides and I plan to expand upon it. Figured I'd give it its own thread too.
Add Toggle On/Off for Alarm Icon
First you will want to increase .locals by 1. Mine was .locals 5 and I changed it to .locals 6 for this. The basic idea when doing these is that you need to look at the locals you have right now. They are always 1 higher than what the highest value or v in the method is. Noting this so that this can be done on other devices besides the S5 in case code has changed and the values.
For a quick example of what values you need for the new code we're adding. We will look at what I've done with this alarm on/off toggle. We are adding 2 new values so look at the locals now. Look at the method and see what the highest value is. Where I have v4 in all the lines we're adding you will be putting it 1 value (v) higher than what the highest one in the file is. Next is the string for the toggle itself in this case it is const-string v5, "statusbar_hide_alarm". This is you key that the toggle runs off of. It will need to be 1 higher than the others. Next you will see this line with 3 values. v4 which we just went over is the first value. Then v5 which is the key will be second. And lastly v1 which is going to always be from the setIconVisibility line that was originally in the code where we are modifying to add the toggle. In this case. "invoke-virtual {v2, v3, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V" As you can see it is v1 in that line so you will place it last in the getInt line and replace it in the const/4 v1, 0x0 near the end of what we're adding.
invoke-static {v4, v5, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
As far as the cond (condition) lines go you can make them :condtm or whatever you want as long as the condition isn't already used in the method. Similar to the values.
In SystemUI.apk edit com/android/statusbar/phone/StatusBarPhonePolicy.smali
Search for .method private updateAlarm()V
Add lines in blue. Change lines in green.
Code:
.method private updateAlarm()V
[COLOR="Green"].locals 6[/COLOR]
.prologue
.line 221
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const-string v3, "alarm"
invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/AlarmManager;
.line 222
.local v0, "alarmManager":Landroid/app/AlarmManager;
const/4 v2, -0x2
invoke-virtual {v0, v2}, Landroid/app/AlarmManager;->getNextAlarmClock(I)Landroid/app/AlarmManager$AlarmClockInfo;
move-result-object v2
if-eqz v2, :cond_0
const/4 v1, 0x1
.line 223
.local v1, "alarmSet":Z
:goto_0
[COLOR="Blue"]iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "statusbar_hide_alarm"
invoke-static {v4, v5, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-nez v4, :cond_tm
const/4 v1, 0x0
:cond_tm[/COLOR]
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v3, "alarm_clock"
invoke-virtual {v2, v3, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 224
return-void
.line 222
.end local v1 # "alarmSet":Z
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
In your CustomSettings.apk add this line to preferences.xml where you want the toggle to appear.
<CheckBoxPreference android:title="Hide Alarm Icon" android:key="statusbar_hide_alarm" android:summaryOn="Alarm icon is visible." android:summaryOff="Alarm icon is hidden." />
Add Toggle On/Off for Bluetooth Icon
In SystemUI.apk edit com/android/statusbar/phone/StatusBarPhonePolicy.smali
First you will want to increase .locals by 2 because we are adding 2 new values. Mine was .locals 6 and I changed it to .locals 8 for this. The basic idea when doing these is that you need to look at the locals you have right now. They are always 1 higher than what the highest value or v in the method is. Noting this so that this can be done on other devices besides the S5 in case code has changed and the values.
Code:
.method private final updateBluetooth()V
[COLOR="green"].locals 8[/COLOR]
.prologue
const/4 v4, 0x0
.line 393
invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;
move-result-object v0
.line 394
.local v0, "adapter":Landroid/bluetooth/BluetoothAdapter;
const v2, 0x7f0202a8
.line 395
.local v2, "iconId":I
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const v5, 0x7f0c020a
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
.line 397
.local v1, "contentDescription":Ljava/lang/String;
if-eqz v0, :cond_2
.line 398
invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getState()I
move-result v3
const/16 v5, 0xc
if-ne v3, v5, :cond_1
const/4 v3, 0x1
:goto_0
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
.line 399
invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getConnectionState()I
move-result v3
const/4 v5, 0x2
if-ne v3, v5, :cond_0
.line 400
const v2, 0x7f0202a9
.line 401
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const v5, 0x7f0c0209
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
.line 407
:cond_0
:goto_1
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
invoke-virtual {v3, v5, v2, v4, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
.line 408
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v4, "bluetooth"
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
[COLOR="Blue"]iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v6}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v6
const-string v7, "statusbar_hide_bluetooth"
invoke-static {v6, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v6
if-nez v6, :cond_tm
const/4 v5, 0x0
:cond_tm[/COLOR]
invoke-virtual {v3, v4, v5}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 409
return-void
:cond_1
move v3, v4
.line 398
goto :goto_0
.line 367
:cond_2
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
goto :goto_1
.end method
In your CustomSettings.apk add this line to preferences.xml where you want the toggle to appear.
<CheckBoxPreference android:title="Hide Bluetooth Icon" android:key="statusbar_hide_bluetooth" android:summaryOn="Bluetooth Icon is visible." android:summaryOff="Bluetooth Icon is hidden." />
Click to expand...
Click to collapse
with .local 4 .local change and would be 5 or more things have to change?
talkingmonkeys said:
Almost forgot I did one for Home Key Wake too. I'll add this one in this post in a few minutes. Thanks to @rompnit and @tdunham for their guide for disabling this which pointed me in the right direction.
[Guide] How To Add Toggle for Home Key Wake
Edit android.policy.jar edit the smali/com/android/interal/policy/impl/PhoneWindowManager.smali
Search for .method private isWakeKeyWhenScreenOff(I)Z
Add lines in blue. Change ones in green.
Ignore .line codes they probably will be different. I changed the locals for this method from 3 to 5 because we're adding 2 more values here. The basic idea when doing these is that you need to look at the locals you have right now in the method. They are always 1 higher than what the highest value or v in the method is.
Code:
.method private isWakeKeyWhenScreenOff(I)Z
[COLOR="Green"] .locals 5[/COLOR]
.param p1, "keyCode" # I
.prologue
const/4 v0, 0x1
const/4 v1, 0x0
.line 5966
sparse-switch p1, :sswitch_data_0
.line 5992
:cond_0
:goto_0
return v0
.line 5971
:sswitch_0
iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mDockMode:I
if-nez v2, :cond_0
move v0, v1
goto :goto_0
:sswitch_1
move v0, v1
.line 5990
goto :goto_0
[COLOR="Blue"]:sswitch_2
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "wake_home"
const v4, 0x1
invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-nez v3, :cond_0
return v1[/COLOR]
.line 5966
:sswitch_data_0
.sparse-switch
[COLOR="Green"]0x3 -> :sswitch_2[/COLOR]
0x19 -> :sswitch_0
0x1b -> :sswitch_1
0x4f -> :sswitch_1
0x55 -> :sswitch_1
0x56 -> :sswitch_1
0x57 -> :sswitch_1
0x58 -> :sswitch_1
0x59 -> :sswitch_1
0x5a -> :sswitch_1
0x5b -> :sswitch_1
0x7e -> :sswitch_1
0x7f -> :sswitch_1
0x82 -> :sswitch_1
0xa4 -> :sswitch_0
0xde -> :sswitch_1
0x149 -> :sswitch_1
.end sparse-switch
.end method
Now to add it to CustomSettings.apk. This will add a screen just for Hardware Key Mods. You can just add the part in red wherever if you don't want it in its own screen.
<PreferenceScreen android:title="Hardware Key Mods">
<PreferenceScreen android:title="Home Button Wake" android:summary="Prevents screen wake with Home button.">
<CheckBoxPreference android:title="Disable Home Button Wake" android:key="wake_home" android:defaultValue="false" android:summaryOn="Home Button Enabled" android:summaryOff="Home Button Disabled" />
</PreferenceScreen>
</PreferenceScreen>
Click to expand...
Click to collapse
bro in the latest version of lollipop for note 4 there have been some changes .locals have been changed to .registers
does this make any difference ??
and i get bootloop when ever i try to make changes
i have attached stock file if you can take a look
Er. Aditya said:
bro in the latest version of lollipop for note 4 there have been some changes .locals have been changed to .registers
does this make any difference ??
and i get bootloop when ever i try to make changes
i have attached stock file if you can take a look
Click to expand...
Click to collapse
The registers instead of locals is because of the version of apktool you are using. It won't make any difference just for those.
tdunham said:
The registers instead of locals is because of the version of apktool you are using. It won't make any difference just for those.
Click to expand...
Click to collapse
il try again sir , but it gave me bootloop and report back here with all the reports
Didn't read all the posts
Can we utilize some .end local for hiding of the sound icon? Just thinking out loud.
evilvoice said:
Can we utilize some .end local for hiding of the sound icon? Just thinking out loud.
Click to expand...
Click to collapse
@daxgirl do you think we would?
{
"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"
}
talkingmonkeys said:
@daxgirl do you think we would?
Click to expand...
Click to collapse
I think it should be noted that there is only 1 setIconVisibility in the updateVolumeZen method. Also, in talking about .end local. I see v15 is never restarted. They also end a bunch of locals from dnd and noti settings. These are restarted AFTER the setIconVisibility. There is also this at the beginning of the mthod
Code:
.line 278
.local v18, "zenVisible":Z
const/16 v17, 0x0
.
.
.
.line 282
.local v14, "volumeVisible":Z
const/4 v13, 0x0
.
.
.
## and further down
.
.
.
:cond_5
if-eqz v14, :cond_6
.line 387
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
move-object/from16 v19, v0
const-string v20, "volume"
const/16 v21, 0x0
move-object/from16 v0, v19
move-object/from16 v1, v20
move/from16 v2, v21
invoke-virtual {v0, v1, v13, v2, v12}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
.line 389
:cond_6
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
move/from16 v19, v0
move/from16 v0, v19
if-eq v14, v0, :cond_7
.line 390
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
move-object/from16 v19, v0
const-string v20, "volume"
move-object/from16 v0, v19
move-object/from16 v1, v20
invoke-virtual {v0, v1, v14}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 391
move-object/from16 v0, p0
iput-boolean v14, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
.line 393
:cond_7
return-void
What stands out to me is the Visible portions of the code...maybe we can manipulate these to work for us
Very well written, thanks for sharing. I'm trying to add a toggle for center clock, and to add options for normal/small/no am/pm. No crazy color changing or size changing for the clock. If you have any input on that I would be very grateful!
Okay, so back to the volume hide mod, tdunham just posted a mod that increased locals from 31 to 33, so it is possible to go higher than 15. Maybe just try the mod and see what happens? I do know that only the 1st part of the mod is contained in that method, the 2nd part is contained in the public constructor and a bit different.