Related
This is work done by clockworx which can originally be found: http://forum.xda-developers.com/showthread.php?t=877752
I just grabbed the original patch and merged it into 1.1.0 framework.jar; and I'm posting this here for reference on how to patch framework.jar in future B&N releases.
Things you'll need:
APKtool(by brutall): http://code.google.com/p/android-apktool/
framework.jar: Just grab it from the official sideload update.zip
Patch: http://dl.dropbox.com/u/9992367/TelephonyManager.patch
Pastebin: http://pastebin.com/4gxqHw6B
How-to:
You'll need to decompile the framework.jar from the sideload update.zip.
Create a separate folder to do all of this.
Code:
apktool d framework.jar
Should output:
Code:
I: Baksmaling...
I: Copying assets and libs...
Then you'll grab the above patch, and copy it to /framework.jar.out/smali/android/telephony/
Code:
cp TelephonyManager.patch /framework.jar.out/smali/android/telephony/TelephonyManager.patch
Then cd to the directory, and patch the file!
Code:
cd framework.jar.out/smali/android/telephony
patch -p0 -E < TelephonyManager.patch
output:
Code:
patching file TelephonyManager.smali
and you're done patching the file!
Remove the patch file before continuing!
You'll now need to build framework.jar again. Go back to the initial directory and run:
Code:
apktool b framework.jar.out
output:
Code:
I: Checking whether sources has changed...
I: Smaling...
W: Could not find resources
I: Building apk file...
Don't worry about the warning about not finding resources, it's expected.
And thats about it.
Here's the patched framework.jar for 1.1.0 that's already included in IOMonsters rootpack: http://dl.dropbox.com/u/9992367/framework.jar
Hopefully this will be a valuable reference in the future!
Credits:
Clockworx
brut.all
Full patch, visualized:
(for analysis)
Code:
--- TelephonyManager.smali 2011-02-15 16:14:11.000000000 -0600
+++ TelephonyManager.smali 2011-02-02 19:17:21.000000000 -0600
@@ -82,6 +82,8 @@
.field private static final TAG:Ljava/lang/String; = "TelephonyManager"
+.field private static final TAG_CWX:Ljava/lang/String; = "CLOCKWORX"
+
.field private static sInstance:Landroid/telephony/TelephonyManager;
@@ -687,52 +689,73 @@
.end method
.method public getDeviceId()Ljava/lang/String;
- .locals 3
+ .locals 5
.prologue
- const/4 v2, 0x0
+ .line 191
+ const-string v0, "35828001"
- .line 187
- :try_start_0
- invoke-direct {p0}, Landroid/telephony/TelephonyManager;->getSubscriberInfo()Lcom/android/internal/telephony/IPhoneSubInfo;
+ .line 192
+ .local v0, fakeDevId:Ljava/lang/String;
+ new-instance v1, Ljava/util/Random;
- move-result-object v1
+ invoke-direct {v1}, Ljava/util/Random;-><init>()V
- invoke-interface {v1}, Lcom/android/internal/telephony/IPhoneSubInfo;->getDeviceId()Ljava/lang/String;
- :try_end_0
- .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
- .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_1
+ .line 193
+ .local v1, randomGenerator:Ljava/util/Random;
+ new-instance v2, Ljava/lang/StringBuilder;
- move-result-object v1
+ invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
- .line 191
- :goto_0
- return-object v1
+ invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- .line 188
- :catch_0
- move-exception v1
+ move-result-object v2
- move-object v0, v1
+ const v3, 0xf4240
- .local v0, ex:Landroid/os/RemoteException;
- move-object v1, v2
+ invoke-virtual {v1, v3}, Ljava/util/Random;->nextInt(I)I
- .line 189
- goto :goto_0
+ move-result v3
- .line 190
- .end local v0 #ex:Landroid/os/RemoteException;
- :catch_1
- move-exception v1
+ invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
- move-object v0, v1
+ move-result-object v2
- .local v0, ex:Ljava/lang/NullPointerException;
- move-object v1, v2
+ invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- .line 191
- goto :goto_0
+ move-result-object v0
+
+ .line 203
+ const-string v2, "TAG_CWX"
+
+ new-instance v3, Ljava/lang/StringBuilder;
+
+ invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
+
+ const-string v4, "Generated:"
+
+ invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
+
+ move-result-object v3
+
+ invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
+
+ move-result-object v3
+
+ const-string v4, "."
+
+ invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
+
+ move-result-object v3
+
+ invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object v3
+
+ invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
+
+ .line 204
+ return-object v0
.end method
.method public getDeviceSoftwareVersion()Ljava/lang/String;
@@ -1139,70 +1162,20 @@
.end method
.method public getPhoneType()I
- .locals 3
+ .locals 2
.prologue
- .line 282
- :try_start_0
- invoke-direct {p0}, Landroid/telephony/TelephonyManager;->getITelephony()Lcom/android/internal/telephony/ITelephony;
-
- move-result-object v1
-
- .line 283
- .local v1, telephony:Lcom/android/internal/telephony/ITelephony;
- if-eqz v1, :cond_0
-
- .line 284
- invoke-interface {v1}, Lcom/android/internal/telephony/ITelephony;->getActivePhoneType()I
-
- move-result v2
-
- .line 296
- .end local v1 #telephony:Lcom/android/internal/telephony/ITelephony;
- :goto_0
- return v2
-
- .line 287
- .restart local v1 #telephony:Lcom/android/internal/telephony/ITelephony;
- :cond_0
- invoke-direct {p0}, Landroid/telephony/TelephonyManager;->getPhoneTypeFromProperty()I
- :try_end_0
- .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
- .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_1
+ .line 318
+ const-string v0, "CLOCKWORX"
- move-result v2
+ const-string v1, "Returning 1."
- goto :goto_0
+ invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
- .line 289
- .end local v1 #telephony:Lcom/android/internal/telephony/ITelephony;
- :catch_0
- move-exception v2
-
- move-object v0, v2
-
- .line 292
- .local v0, ex:Landroid/os/RemoteException;
- invoke-direct {p0}, Landroid/telephony/TelephonyManager;->getPhoneTypeFromProperty()I
-
- move-result v2
-
- goto :goto_0
-
- .line 293
- .end local v0 #ex:Landroid/os/RemoteException;
- :catch_1
- move-exception v2
-
- move-object v0, v2
-
- .line 296
- .local v0, ex:Ljava/lang/NullPointerException;
- invoke-direct {p0}, Landroid/telephony/TelephonyManager;->getPhoneTypeFromProperty()I
-
- move-result v2
-
- goto :goto_0
+ .line 319
+ const/4 v0, 0x1
+
+ return v0
.end method
.method public getSimCountryIso()Ljava/lang/String;
Deca, anyway to move files with root explorer? I am lazy.
bdcrim said:
Deca, anyway to move files with root explorer? I am lazy.
Click to expand...
Click to collapse
lol, no. You need to decompile framework.jar to be able to patch telephony manager to generate an AndroidID
This patch file does not work with the framework.jar for NF. Could we get an updated patch file? Or the method on how the patch file was created?
brianf21 said:
This patch file does not work with the framework.jar for NF. Could we get an updated patch file? Or the method on how the patch file was created?
Click to expand...
Click to collapse
The patch file itself will give you an idea of what needs to be done. There are a lot of differences between the 2.1 Telephony Manager and the 2.2(NF) Telephony Manager so you'll have to take those things into account when merging them in.
Decad3nce said:
The patch file itself will give you an idea of what needs to be done. There are a lot of differences between the 2.1 Telephony Manager and the 2.2(NF) Telephony Manager so you'll have to take those things into account when merging them in.
Click to expand...
Click to collapse
When i did, i was getting a 15 digit IMEI number error in logcat when i opened thr market.
Huh, I had no idea this was still in use
I might be able to do a 2.2 version over weekend if no one else gets around to it (on the road currently and my Dev tools are back at home)
Also, at some point I need to have it save to a SqlDB. Right now it generates a new one each request, which doesn't matter for most people since you only get the Android ID once, but I did see a thread complaining that their app validated by IMEI and it generated a new one each time. Oops!
For what it's worth, I've never had to use a hacked framework.jar for NF, otherwise I would have done one already. Does anyone have a further description of why they want it? The main purpose this was used for was to make Market/Talk work, and they both work for me in NF out of the box.
Just wanted to say thanks for the patch. After I replaced my framework.jar with the patched one. Some apps that were FC'ing now runs. Especially my NBA Gametime is back up and running. Some of my GAMELOFT HD games that were FC'ing is also running as well now. Guess it has to do with the app looking for an AndroidID.
Stock 1.1.0 Rooted
Update: My apps work now but it broke my stock B&N shop. Goes to a black screen after loading. Im able to exit out of it. What could be causing this?
Edit: Neva mind. Seems that the modified framework didn't include the META and preloaded-class files from my original framework.jar. Guess shop is dependent on it somehow. Everything works now. Thanx again.
Little bit confused...
1) What problem(s) does this address?
2) Will this fix my current inability to use the web-based market?
3) Can we simply replace our framwork.jar file with the one in the OP, or do we have to compile our own? What directory is it in?
Note: I used the unofficial AN3.0 on top of stock 1.1 to root and install gapps...
Thanks ahead of time!
Not working in Windows
Okay, I have the file decompiled but there is nothing to execute "patch" on my Windows system. Where do I get the tool to do the actual patching. Or how do you do the patch in Windows?
jboxer said:
Okay, I have the file decompiled but there is nothing to execute "patch" on my Windows system. Where do I get the tool to do the actual patching. Or how do you do the patch in Windows?
Click to expand...
Click to collapse
Just google for UnxUtil or GNUWin32.
Sent from my "NookDroid" using XDA App
racks11479 said:
Just google for UnxUtil or GNUWin32.
Sent from my "NookDroid" using XDA App
Click to expand...
Click to collapse
Okay. I did that and tried to patch the file but I got the following error:
patching file `TelephonyManager.smali'
Assertion failed: hunk, file patch.c, line 321
What do I need to do to fix this problem?
Thanks again for your help.
Any chance of getting a pre-patched framework.jar for 1.1.0? I'm on a road trip and don't have access to a computer with the necessary setup to do this.
i replaced my framework.jar with the one provided by decadence, and, as racks11479 suggested i also added the META-INF and the preloaded-class from my original file.
it works, it also fixed my gameloft games problems, but now it takes a lot more time when booting and once booted, the startup time (show my homescreen) also takes longer. i have rebooted 3 times to check if the delay dissapear, but no....
is there any logical explanation for this behaviour?
Strange. Because mine only delayed the first time after replacing my framework.jar file. Seems fine since. I've just rebooted again to make sure. And no delay whatsoever. Not sure what could be causing your problem.
Please excuse my ignorance, but what exactly does this patch provide? Is it for stability issues with the stock eclair rom?
Also want to confirm that since the framework patch. My XDA app is surviving login like it used to on 1.0.1.
I understand that this was an issue with the 1.1.0 release.
Stock 1.1.0 rooted.
Sent from my "NookDroid" using XDA App
don_ernesto said:
i replaced my framework.jar with the one provided by decadence, and, as racks11479 suggested i also added the META-INF and the preloaded-class from my original file.
it works, it also fixed my gameloft games problems, but now it takes a lot more time when booting and once booted, the startup time (show my homescreen) also takes longer. i have rebooted 3 times to check if the delay dissapear, but no....
is there any logical explanation for this behaviour?
Click to expand...
Click to collapse
The first boot, yes, as it would force a dalvik cache rebuild, but on subsequent boots no
paleh0rse said:
Little bit confused...
1) What problem(s) does this address? ie. What is this for??
2) Can we simply replace our framwork.jar file with the one in the OP, or do we have to compile our own? What directory is it in?
Note: I used the unofficial AN3.0 on top of stock 1.1 to root and install gapps...
Thanks ahead of time!
Click to expand...
Click to collapse
Anyone? Please?
Here is the modded lines from Gingerbread services.jar:
http://forum.xda-developers.com/showpost.php?p=18082627&postcount=1
Code:
diff -urN a/smali/com/android/server/NotificationManagerService.smali b/smali/com/android/server/NotificationManagerService.smali
--- a/smali/com/android/server/NotificationManagerService.smali
+++ b/smali/com/android/server/NotificationManagerService.smali
@@ -2064,7 +2064,7 @@
:goto_0
iget-boolean v4, p0, Lcom/android/server/NotificationManagerService;->mScreenOn:Z
- if-nez v4, :cond_0
+ #if-nez v4, :cond_0
iget-object v4, p0, Lcom/android/server/NotificationManagerService;->mLedNotification:Lcom/android/server/NotificationManagerService$NotificationRecord;
@@ -2114,7 +2114,7 @@
iget-boolean v4, p0, Lcom/android/server/NotificationManagerService;->mScreenOn:Z
- if-nez v4, :cond_3
+ #if-nez v4, :cond_3
.line 1147
iput-boolean v7, p0, Lcom/android/server/NotificationManagerService;->mPendingPulseNotification:Zdiff -urN a/smali/com/android/server/NotificationManagerService.smali b/smali/com/android/server/NotificationManagerService.smali
--- a/smali/com/android/server/NotificationManagerService.smali
+++ b/smali/com/android/server/NotificationManagerService.smali
@@ -2064,7 +2064,7 @@
:goto_0
iget-boolean v4, p0, Lcom/android/server/NotificationManagerService;->mScreenOn:Z
- if-nez v4, :cond_0
+ #if-nez v4, :cond_0
iget-object v4, p0, Lcom/android/server/NotificationManagerService;->mLedNotification:Lcom/android/server/NotificationManagerService$NotificationRecord;
@@ -2114,7 +2114,7 @@
iget-boolean v4, p0, Lcom/android/server/NotificationManagerService;->mScreenOn:Z
- if-nez v4, :cond_3
+ #if-nez v4, :cond_3
.line 1147
iput-boolean v7, p0, Lcom/android/server/NotificationManagerService;->mPendingPulseNotification:Z
If someone capable could try to implement this to ICS services.jar, I would be more than glad!!
Here is Services.jar from Deodexed LPQ.
Ooops! Didn't see your thread. Posted my own.
Will link to this thread as yours is much better with code as well! I am hoping someone in the sgs1 community might help us out.
would also love to have this if anyone can help
We all know that there is no CRT-off mod for the Neo V. This is because only changing the value of config_animateScreenLights from true to false in framework-res.apk is not working anymore!
The problem is that are some missing commands in the /system/framework/services.jar
After comparing files from GB and ICS, i might have come up with a Method.
This will require some devs to continue on my work, as i don't have the proper tools to work on.
Hands-on:
This is what have to be done:
First of all decompile classes of services.jar (I won't provide any information to this, there are many tutorials out there how to use the smali tools!)
Then in com/android/server/PowerManagerService.smali we have to make the method nativeStartSurfaceFlingerAnimation(I)V callable from inner classes. To do that, we have to add the following after the last access$XXXX method:
Code:
.method static synthetic access$9000(Lcom/android/server/PowerManagerService;I)V
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 110
invoke-direct {p0, p1}, Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerAnimation(I)V
return-void
.end method
Than we have to add some commands to the file com/android/server/PowerManagerService$BrightnessState.smali to trigger the CRT-off-effect. For that add the red part between :cond_38 and iget-object v4, p0, Lcom/a.... like this (its around line 400 in code):
Code:
.line 2679
.restart local v3 #turningOff:Z
:cond_38
[COLOR="red"]iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
const/16 v3, 0x11 # CRT-On and CRT-Off
#calls: Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerAnimation(I)
invoke-static {v4, v3}, Lcom/android/server/PowerManagerService;->access$9000(Lcom/android/server/PowerManagerService;I)V[/COLOR]
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightness:Lcom/android/server/PowerManagerService$BrightnessState;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->access$6000(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState;
move-result-object v4
Lastly, recompile the file, put it on your phone CRT-off effect will be magically displayed.
Lastly, i really seek the devs help to work on this and bring success to this work
Howdy I have been compiling a list mods for the Verizon Note 4, but most should work across all variants!!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This thread is posted in the Samsung Galaxy Note 4 Unified Development Thread and can be viewed across all Note 4 Variants.
This is and will always be a work in progress, so feel free to contribute and please do!!!!
This thread assumes you know how to decompile and compile using APKTOOL.
Enjoy!!!
[Guide How-to] Verizon Note 4 Remove CD Installer & ASEC Note 4
This removes the annoying CD installer that pops up when you plug into your computer and your phone will go straight to MTP.
Enjoy!!
Remove CD Installer Download: http://d-h.st/Wm7
Just flash with TWRP
[Guide How-to] Verizon Note 4 Enable Native Call Recording Note 4
Smali edit for InCallUI.apk:
com/android/services/telephony/common/PhoneFeature.smali
Add the lines that are highlighted in RED
Code:
const-string v3, "CscFeature_VoiceCall_ConfigRecording"
invoke-virtual {v0, v3}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
[COLOR="Red"]const-string v0, "RecordingAllowed"[/COLOR]
.line 1693
sget-object v3, Lcom/android/services/telephony/common/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v6, "voice_call_recording"
const-string v7, "RecordingAllowed"
const-string v3, "CscFeature_VoiceCall_ConfigRecording"
invoke-virtual {v0, v3}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v0, "RecordingAllowed"
.line 1693
sget-object v3, Lcom/android/services/telephony/common/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v6, "voice_call_recording"
const-string v7, "RecordingAllowed"
For those not capable of doing smali edits just flash this via TWRP. Enable Call Recording
[Guide How-to] Remove Lockscreen Carrier Note 4
This removes the lockscreen carrier text.
Keyguard.apk smali edit:
smali/com/android/keyguard/CarrierText.smali:
Change if-nez to if-eqz in the indicated edit in BLUE:
Code:
.method private static concatenate(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
.locals 5
.param p0, "plmn" # Ljava/lang/CharSequence;
.param p1, "spn" # Ljava/lang/CharSequence;
.prologue
const/4 v2, 0x1
const/4 v3, 0x0
.line 310
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v4
[COLOR="Blue"]if-eqz[/COLOR] v4, :cond_1
move v0, v2
For those of you not capable of smali edit's, just flash this via TWRP Remove Lock Screen Carrier Text
[Guide How-to] Remove Safe Volume Warning Note 4
This removes the safe volume warning that pops up when you turn up the volume beyond a certain point
This mod requires modifying framework.jar
Edit smali/android/media/AudioService.smali:
Changes are in .method private checkSafeMediaVolume(III)Z
, new lines are in BLUE:
Code:
iget-object v6, p0, Landroid/media/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v6
[COLOR="Blue"]goto :goto_td[/COLOR]
if-ne v6, v7, :cond_4
Code:
goto :goto_1
.line 6873
.end local v0 # "e":Ljava/lang/Exception;
.end local v1 # "pm":Landroid/os/PowerManager;
.end local v3 # "wl":Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"]:goto_td[/COLOR]
:cond_4
monitor-exit v5
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
goto :goto_0
.end method
For those not capable of smali edit's just flash this in TWRP Remove Safe Volume Warning
[Guide How-To] Enable Call & MSG Blocking Note 4
This enables call and msg blocking natively.
Simple CSC edit.
system/csc/feature.xml edit
Must be inserted BEFORE
</FeatureSet>
</SamsungMobileFeature>
(** please note that feature.xml can be overwritten so this may not stick if using a third party software like Xposed)
Code:
<CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
For those of you not capable of this edit, just flash this with TWRP Native Call & Message Block
[Guide How-to] Replace Recents with Menu Note 4
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from APP_SWITCH to MENU
key 254 MENU
Download: Generic.kl
Now Recent Apps capacitive key is Menu (single-press) and Search (long-press).
However, we have now lost access to recent apps via a hardware key.
[Guide How-to] VZW Note 4 4 Way Reboot Power Menu EPM Note 4
This will work with Odex or Deodexed Rom. To see the 4 way Menu you must hit restart on the Primary Menu!!!
First grab your Deodexed android.policy.jar from system/framework
Decompile it with APKTOOL. Look in smali\com\android\internal\policy\impl\
Find GlobalActions$SinglePressAction.smali and open with NotePad++
Look for this:
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
# instance fields
.field public customAction:I
.field public isKnoxCustom:Z
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field mLayoutId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
.method protected constructor <init>(II)V
.locals 2
.param p1, "iconResId" # I
.param p2, "messageResId" # I
Add in the Red Text to look like this:
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
[COLOR="Red"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
# instance fields
.field public customAction:I
.field public isKnoxCustom:Z
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field mLayoutId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
[COLOR="Red"].method static constructor <clinit>()V
.locals 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Boot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method[/COLOR]
.method protected constructor <init>(II)V
.locals 2
.param p1, "iconResId" # I
.param p2, "messageResId" # I
Save file and look for GlobalActions.smali in the same folder.
Find this:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1126
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$8;
const-string v2, "VZW"
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
const v2, 0x1080b2d
:goto_2
const v4, 0x10401cf
move-object/from16 v0, p0
invoke-direct {v3, v0, v2, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1164
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
Change the red text to look like this:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1126
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];
const-string v2, "VZW"
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
const v2, 0x1080b2d
:goto_2
const v4, 0x10401cf
move-object/from16 v0, p0
invoke-direct {v3, v0, v2, v4}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1164
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
Save file.
Add the 3 smali files in this zip to the same folder: Smali-Files-Zip
Now recompile. That's it.
For those of you not able to edit smali. Here is a zip flashable with TWRP. VZW Note 4 4 Way EPM Menu
To see the 4 way Menu you must hit restart on the Primary Menu!!!
Enjoy!!!
Framework Mods- Note 4 Native WiFi Tether, All Rotations, Safe Media Volume Disabled, Dreams enabled, Battery Critical Warnings lowered to 1%.
Here is the download: Framework Mods
Here is the download to return to stock: Stock Framework
Enjoy!!!
[Guide How-to] Remove NFC notification icon in status bar Note 4
First grab your Features.xml from /system/csc/
Open with Notepad++ and look for following text:
Code:
<!-- NFC -->
<CscFeature_NFC_SetSecureEventType>ISIS</CscFeature_NFC_SetSecureEventType>
<CscFeature_NFC_StatusBarIconType>Vzw</CscFeature_NFC_StatusBarIconType>
<CscFeature_SmartcardSvc_SetAccessControlType>GPAC, MODE1</CscFeature_SmartcardSvc_SetAccessControlType>
<CscFeature_SmartcardSvc_HideTerminalCapability>eSE</CscFeature_SmartcardSvc_HideTerminalCapability>
<CscFeature_NFC_CardModeRoutingTypeForUicc>ROUTE_ON_WHEN_SCREEN_UNLOCK</CscFeature_NFC_CardModeRoutingTypeForUicc>
<CscFeature_NFC_EnableSecurityPromptPopup>all</CscFeature_NFC_EnableSecurityPromptPopup>
<CscFeature_NFC_EnableInvalidTagPopup>true</CscFeature_NFC_EnableInvalidTagPopup>
<CscFeature_NFC_ConfigAdvancedSettings>Disable</CscFeature_NFC_ConfigAdvancedSettings>
<CscFeature_NFC_DefaultCardModeConfig>DH:UICC</CscFeature_NFC_DefaultCardModeConfig>
Change the red text to look like this:
Code:
<!-- NFC -->
<CscFeature_NFC_SetSecureEventType>ISIS</CscFeature_NFC_SetSecureEventType>
<CscFeature_NFC_StatusBarIconType>[COLOR="Red"]none[/COLOR]</CscFeature_NFC_StatusBarIconType>
<CscFeature_SmartcardSvc_SetAccessControlType>GPAC, MODE1</CscFeature_SmartcardSvc_SetAccessControlType>
<CscFeature_SmartcardSvc_HideTerminalCapability>eSE</CscFeature_SmartcardSvc_HideTerminalCapability>
<CscFeature_NFC_CardModeRoutingTypeForUicc>ROUTE_ON_WHEN_SCREEN_UNLOCK</CscFeature_NFC_CardModeRoutingTypeForUicc>
<CscFeature_NFC_EnableSecurityPromptPopup>all</CscFeature_NFC_EnableSecurityPromptPopup>
<CscFeature_NFC_EnableInvalidTagPopup>true</CscFeature_NFC_EnableInvalidTagPopup>
<CscFeature_NFC_ConfigAdvancedSettings>Disable</CscFeature_NFC_ConfigAdvancedSettings>
<CscFeature_NFC_DefaultCardModeConfig>DH:UICC</CscFeature_NFC_DefaultCardModeConfig>
Save file and copy back to /system/csc, reboot and boom its gone!!!
Enjoy!!
[Guide How-to] Enable Private Mode with a deodexed Rom and SecureStorage=false Note 4
First thing you need to do is grab PersonalPageService.apk from system/priv-app
Decompile with APKTOOL
Find PersonalPageService\smali\com\samsung\android\personalpage\service\util\SecureProperties.smali open with Notepad++
Find the follow code:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
.param p1, "context" # Landroid/content/Context;
.prologue
const/4 v1, 0x1
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 54
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 63
invoke-static {}, Landroid/os/Debug;->isProductShip()I
move-result v0
if-nez v0, :cond_3
.line 64
invoke-static {}, Lcom/sec/android/securestorage/SecureStorage;->isSupported()Z
move-result v0
if-nez v0, :cond_2
.line 65
const/4 v0, 0x0
sput-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
.line 72
:goto_0
sget-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
if-eqz v0, :cond_0
Replace the items in Red like this:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
.param p1, "context" # Landroid/content/Context;
.prologue
const/4 v1, 0x1
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 54
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 63
invoke-static {}, Landroid/os/Debug;->isProductShip()I
move-result v0
[COLOR="Red"]if-nez v0, :cond_0[/COLOR]
.line 64
invoke-static {}, Lcom/sec/android/securestorage/SecureStorage;->isSupported()Z
move-result v0
[COLOR="Red"]if-nez v0, :cond_0[/COLOR]
.line 65
const/4 v0, 0x0
sput-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
.line 72
:goto_0
sget-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
if-eqz v0, :cond_0
Save file and compile apk. Push to system/priv-app
For those not capable of changing smali files here is a flashable zip: PersonalPageService.apk
Enjoy!!!
[Guide How-To] Enable Lockscreen Rotation Note 4
First grab Keyguard.apk from system/priv-app
Decompile with APKTOOL.
Open smali file smali/com/android/keyguard/KeyguardViewManager.smali
Look for the following:
Code:
.method private shouldEnableScreenRotation()Z
.locals 3
.prologue
const/4 v1, 0x0
.line 249
iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 250
.local v0, "res":Landroid/content/res/Resources;
const-string v2, "lockscreen.rot_override"
invoke-static {v2, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
Replace the Red text to look like this:
Code:
Code:
.method private shouldEnableScreenRotation()Z
.locals 3
.prologue
[COLOR="Red"]const/4 v1, 0x1[/COLOR]
.line 249
iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 250
.local v0, "res":Landroid/content/res/Resources;
const-string v2, "lockscreen.rot_override"
invoke-static {v2, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
Compile and push to system/priv-app
For those that are unable to edit smali here is a flashable zip: LockSceen Rotation
Enjoy!!
[Guide How-to] Disable Screen Wake Plugged/Unplugged Note 4
First grab your services.jar from system/framework and decompile with APKTOOL
Find smali\com\android\server\power\PowerManagerService .smali and open PowerManagerService with Notepad++
Look for the following:
Code:
.method private shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
.locals 4
.param p1, "wasPowered" # Z
.param p2, "oldPlugType" # I
.param p3, "dockedOnWirelessCharger" # Z
.prologue
const/4 v1, 0x1
const/4 v0, 0x0
.line 2216
iget-boolean v2, p0, Lcom/android/server/power/PowerManagerService;->mWakeUpWhenPluggedOrUnpluggedConfig:Z
if-nez v2, :cond_1
Change to Red text to look like this:
Code:
.method private shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
.locals 4
.param p1, "wasPowered" # Z
.param p2, "oldPlugType" # I
.param p3, "dockedOnWirelessCharger" # Z
.prologue
[COLOR="Red"]const/4 v1, 0x0[/COLOR]
const/4 v0, 0x0
.line 2216
iget-boolean v2, p0, Lcom/android/server/power/PowerManagerService;->mWakeUpWhenPluggedOrUnpluggedConfig:Z
if-nez v2, :cond_1
That's it. Compile and push to system/framework
For those of you not capable of editing smali files here is a flashable zip: Disable Screen Wake Plug/unpluged
Enjoy!!!
[Guide How-to] Bluetooth Scan Dialog Removal
First grab your SecSettings.apk from system/priv-app and decompile with APKTOOL
Find smali/com/android/settings/Bluetooth/BluetoothScanDialog.smali
Look for the follow in .method private initialize()V method:
Code:
.line 79
new-instance v4, Lcom/android/settings/bluetooth/BluetoothScanDialog$3;
invoke-direct {v4, p0, v0}, Lcom/android/settings/bluetooth/BluetoothScanDialog$3;-><init>(Lcom/android/settings/bluetooth/BluetoothScanDialog;Landroid/app/AlertDialog;)V
invoke-virtual {v0, v4}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V
.line 86
[COLOR="Red"]invoke-virtual {v0}, Landroid/app/Dialog;->show()V[/COLOR]
.line 87
return-void
.end method
Delete the text in Red, save file and compile. That's it. push to system/priv-app
Enjoy!!!
Flashlight Toggle & Battery Stats Toggle Mod Flashable-Settings-About Phone-Status-OFFICIAL Zip Updated 12-3-2014
Here is the flashable Flashlight Toggle Mod: VZW Flash Light Battery Stats Toggle Mod-Official Status
YOU MUST WAIT AT LEAST 5-10 MINS AFTER FLASHING FOR THE MOD TO WORK.
Some of you might also have to add "Flashlight" to your settings DB via SQLite. To see the toggle.
1) Download sqlite editor app. I got it from here.
2) Open the app and give it root permissions. It should populate a list.
3) Scroll and Tap the "Settings Storage"
4) Tap "Settings.db"
5) Tap "System"
6) Scroll down until you find "notification_panel_active_app_list", tap to highlight it. I noticed its a little hard to get it highlighted because it seems to want to highlight the one under it. So you might have to tap the one right above it to get it highlighted. Make sure its the notification_panel_active_app_list, and I also updated my notification_panel_active_app_list_reset NOT the notification_panel_default_active_app_list. I picked the wrong one the first time and it didnt work.
7) Once it is highlighted tap the phones menu button.
8) Tap "Edit Record"
9) You'll see a list of all the toggles that are currently enabled to show in notification area.
10) At the bottom of the list or anywhere else in the list add ; and the words Flashlight and Battery then another ;. So it will look like this at the end. ;TouchSensitivity;Flashlight;Battery; Then press Save.
11) Reboot and you should have a Flashlight and a Battery Stats toggle now. You can now use the edit feature and move it anywhere you want in the list of toggles.
This might also have a positive side effect of the following:
When you go to Settings-About Phone-Status it might say OFFICIAL!!!
Enjoy!!!
Enable Tab view in Settings
First grab your SecSettings.apk from system/priv-app
Decompile with APKTOOL and open res.values/bools with Notepad++
look for the following 2 lines:
Code:
<bool name="settings_list">false</bool>
<bool name="settings_grid">true</bool>
Change them to look like this:
Code:
<bool name="settings_list">[COLOR="Red"]true[/COLOR]</bool>
<bool name="settings_grid">[COLOR="Red"]false[/COLOR]</bool>
That's it. Compile and push to System/priv-app
Enjoy!!
How to enable Flashlight operation with Volume
First grab your SecSettings.apk from system/priv-app and decompile with APKTOOL.
Look in res/xml for display_settings_2014.xml and open with Notepad++
Add the following line in Red. When you are done look in settings-Display and you will see Torch Light options menu
Code:
<CheckBoxPreference android:title="@string/led_indicator_settings" android:key="key_simple_led_indicator_settings" android:summary="@string/led_indicator_settings_summary" android:widgetLayout="@touchwiz:layout/preference_widget_twcheckbox" />
[COLOR="Red"]<PreferenceScreen android:title="@string/torchlight_settings" android:key="torchlight" android:fragment="com.android.settings.torchlight.TorchlightSettings" />[/COLOR]
<ListPreference android:persistent="false" android:entries="@array/touch_key_light_entries" android:title="@string/touch_key_light" android:key="touch_key_light" android:summary="@string/touch_key_light_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/touch_key_light_values" />
Compile and push to system/priv-app
That's it.
Enjoy!!!!
How to Enable add Apps Ops to Settings.
First grab SecSettings.apk from system/priv-app and decompile with APKTOOL
Get gridlist_settings_headers.xml from res/xml and edit with Notepad++
Look for:
Code:
<header android:icon="@drawable/ic_setting_grid_powersaving" android:id="@id/power_saving" android:title="@string/power_saving_mode_title_k" android:fragment="com.android.settings.powersavingmode.MenuPowerSavingModeSettings" />
and add right below it the following:
Code:
<header android:icon="@drawable/ic_settings_applicationpermissions" android:title="@string/app_ops_settings" android:fragment="com.android.settings.applications.AppOpsSummary" />
Save file and compile. That's it.
Push to system/priv-app
Enjoy!!!
Great post...
Will the Wi-Fi tether mod work with the ATT Variant?
thesilentnight said:
Great post...
Will the Wi-Fi tether mod work with the ATT Variant?
Click to expand...
Click to collapse
I have not seen the AT&T firmware. You must be rooted. If you are rooted and want to send me your framework-res.apk I can take a look for you.
Sadly as far as i know, root isnt yet available yet for the ATT variant....
thesilentnight said:
Sadly as far as i know, root isnt yet available yet for the ATT variant....
Click to expand...
Click to collapse
OMG, I'm sooo glad I could write what's written in my signature.
EMSpilot said:
...Here is the flashable Flashlight Toggle Mod...
Click to expand...
Click to collapse
You sir, ROCK!!! Very good work
the "Verizon Note 4 Enable Native Call Recording Note 4"
Will this work on N910G snapdragon variant ? also, does this enable automatic call recording ?
pratik_193 said:
the "Verizon Note 4 Enable Native Call Recording Note 4"
Will this work on N910G snapdragon variant ? also, does this enable automatic call recording ?
Click to expand...
Click to collapse
If you can send me your InCallUI.apk I can take a look. No automatic call recording. When you get a call or make a call you simply tap the call recording button once on the screen.
EMSpilot said:
If you can send me your InCallUI.apk I can take a look. No automatic call recording. When you get a call or make a call you simply tap the call recording button once on the screen.
Click to expand...
Click to collapse
Here it is..
Can you make a modded secphone something we had for note 3 ? link below
http://forum.xda-developers.com/showthread.php?t=2498449
CZ Eddie said:
OMG, I'm sooo glad I could write what's written in my signature.
Click to expand...
Click to collapse
Why is that?
thesilentnight said:
Sadly as far as i know, root isnt yet available yet for the ATT variant....
Click to expand...
Click to collapse
CZ Eddie said:
OMG, I'm sooo glad I could write what's written in my signature.
Click to expand...
Click to collapse
thesilentnight said:
Why is that?
Click to expand...
Click to collapse
My sig is pretty self explanatory in regards to your earlier statement.
I ditched my grandfathered unlimited data plan with AT&T in November 2014 because AT&T won't let anyone root their Galaxy phones.
Hello, T-Mobile!
Click to expand...
Click to collapse
pratik_193 said:
Here it is..
Can you make a modded secphone something we had for note 3 ? link below
http://forum.xda-developers.com/showthread.php?t=2498449
Click to expand...
Click to collapse
Hey @EMSpilot any luck ?
pratik_193 said:
Hey @EMSpilot any luck ?
Click to expand...
Click to collapse
Where did this InCallUI.apk come from? It won't build.
EMSpilot said:
Where did this InCallUI.apk come from? It won't build.
Click to expand...
Click to collapse
i got it from the current ROM i have a N910G snapdragon... you need anything else ?
Hmm, get a whole bunch of errors when trying to decompile SecSettings.apk. I can decompile other apks fine so don't think it's something with my setup.
Code:
W: Skipping "android" package group
W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info
Great post op!!
Did by any chance someone tried this in an international N4?
Awesome thread!
Subscribed!
Thanks contributors!
@EMSpilot
when i try to add the torchlight mod it makes all the checkboxes in the settings menu disappear.
any idea what the problem could be? the mod itself works perfect, but the checkboxes are pretty usefull as well.
thanks in advance :good:
Psycho_666 said:
@EMSpilot
when i try to add the torchlight mod it makes all the checkboxes in the settings menu disappear.
any idea what the problem could be? the mod itself works perfect, but the checkboxes are pretty usefull as well.
thanks in advance :good:
Click to expand...
Click to collapse
What Rom are you running? NJ5? or? The mods are based on NI2. If you are running NJ5 you have to decompile do the mod compile and push back to the phone.
I'm running an ANK5 rom.
but I don't understand how it has anything to do with the checkboxes.
it's pretty frustrating
Sent from my Note 4
Q&A for Moving/Deleting Lidroid Toggles (Via Smalis)
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for Moving/Deleting Lidroid Toggles (Via Smalis). If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
aryan_ar said:
So, Many Of You Have Added Lidroid Grid Toggles, In Your SystemUI, Or Many May Not
Today I 'm Here You To Show How To Move/Delete Any Lidroid Specific Toggle(s)
Guide Is Presented In Two Parts:
1. Moving Toggle(s).
2. Deleting Toggle(s).
PART 1: Moving Toggles
Decompile Your SystemUI.
Goto smali/com/lidroid/systemui/quickpanel.
Open PowerWidget.smali.
Let Us Suppose, We Are Deleting Sync Toggle.
Search "sync" in PowerWidet.smali.
You will Get 2 Result: (Do This In Both)
Code:
# static fields
.field private static final BUTTONS_DEFAULT:Ljava/lang/String; = "toggleWifi|toggleBluetooth|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate|toggleAirplane[COLOR="Red"]|toggleSync[/COLOR]"
Code:
.line 169
const-string v4, "toggleWifi|toggleBluetooth|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate|toggleAirplane[COLOR="Red"]|toggleSync[/COLOR]"
"put the code |togglesync in between any other toggle, where u want to put"
Code:
# static fields
.field private static final BUTTONS_DEFAULT:Ljava/lang/String; = "toggleWifi|toggleBluetooth|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate[COLOR="Red"]|toggleSync[/COLOR]|toggleAirplane"
Code:
.line 169
const-string v4, "toggleWifi|toggleBluetooth|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate[COLOR="Red"]|toggleSync[/COLOR]|toggleAirplane"
save it, close it
Compile SystemUI
Then paste it to System/apps
Reboot The Device
PART 2: Deleting Toggles
If You Want To Delete Toggle, (Let Us Try Deleting "Bluetooth" ), Open PowerWidget.smali
Delete The Red Code
Code:
# static fields
.field private static final BUTTONS_DEFAULT:Ljava/lang/String; = "toggleWifi[COLOR="Red"]|toggleBluetooth[/COLOR]|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleSync|toggleAutoRotate|toggleAirplane"
It Will Look Like This Now:
Code:
# static fields
.field private static final BUTTONS_DEFAULT:Ljava/lang/String; = "toggleWifi|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleSync|toggleAutoRotate|toggleAirplane"
Do The Same Here Too:
Code:
.line 169
const-string v4, "toggleWifi[COLOR="Red"]|toggleBluetooth[/COLOR]|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate|toggleSync|toggleAirplane"
It Will Look Like This:
Code:
.line 169
const-string v4, "toggleWifi|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate|toggleSync|toggleAirplane"
Save and Close It.
Open PowerButton.smali
Search "bluetooth"
Now Delete The Red Code:
Code:
.field public static final BUTTON_AUTOROTATE:Ljava/lang/String; = "toggleAutoRotate"
[COLOR="Red"].field public static final BUTTON_BLUETOOTH:Ljava/lang/String; = "toggleBluetooth"[/COLOR]
.field public static final BUTTON_FLASHLIGHT:Ljava/lang/String; = "toggleFlashlight"
Code:
.line 56
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;
const-string v1, "toggleMobileData"
const-class v2, Lcom/lidroid/systemui/quickpanel/MobileDataButton;
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
[COLOR="Red"] .line 58
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;
const-string v1, "toggleBluetooth"
const-class v2, Lcom/lidroid/systemui/quickpanel/BluetoothButton;
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;[/COLOR]
.line 59
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;
const-string v1, "toggleSound"
const-class v2, Lcom/lidroid/systemui/quickpanel/SoundButton;
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
After Deleting, It Will Look Like This:
Code:
.field public static final BUTTON_AUTOROTATE:Ljava/lang/String; = "toggleAutoRotate"
.field public static final BUTTON_FLASHLIGHT:Ljava/lang/String; = "toggleFlashlight"
Code:
.line 56
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;
const-string v1, "toggleMobileData"
const-class v2, Lcom/lidroid/systemui/quickpanel/MobileDataButton;
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 59
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;
const-string v1, "toggleSound"
const-class v2, Lcom/lidroid/systemui/quickpanel/SoundButton;
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
Save It and Close It.
Also delete Bluetooth smali(s) in quickpanel folder
i.e. delete
Code:
[B]
BluetoothButton.smali
BluetoothButton$BluetoothStateTracker.smali
BluetoothButton$BluetoothStateTracker$1.smali
BluetoothButton$1.smali
[/B]
(So What We Have Done Here?...We Just Delete Its Main And Derived Smalis)
Now Compile App
Paste It To system/app
Reboot Device
......................................................................................................................................................
Press Thanks If This Guide Helped You
.......................................................................................................................................................
Click to expand...
Click to collapse
Nice guide
I will try...