[MOD][HOW-TO]To disable signature checks - Sprint HTC EVO 4G LTE

This is how to disable signature checks using seo's code that has been around forever, now for the EVO LTE on ICS.
Gonna loosely quote SteelH's [How To] post opener:
This reference guide is to tell you what to edit to disable Signature Checks for the EVO 4G LTE in Services.jar. It is not an all-inclusive how-to on adb, decompiling/recompiling apks, etc. There are already several very good sources right here on XDA for that information.
Decompile Services.jar and look for \com\android\server\pm\PackageManagerService.smali
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
if-nez p0, :cond_8
if-nez p1, :cond_6
const/4 v6, 0x1
:goto_5
return v6
:cond_6
const/4 v6, -0x1
goto :goto_5
:cond_8
if-nez p1, :cond_c
const/4 v6, -0x2
goto :goto_5
:cond_c
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
move-object v0, p0
array-length v2, v0
const/4 v1, 0x0
:goto_14
if-ge v1, v2, :cond_1e
aget-object v5, v0, v1
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
add-int/lit8 v1, v1, 0x1
goto :goto_14
:cond_1e
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_26
if-ge v1, v2, :cond_30
aget-object v5, v0, v1
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
add-int/lit8 v1, v1, 0x1
goto :goto_26
:cond_30
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_38
const/4 v6, 0x0
goto :goto_5
:cond_38
const/4 v6, -0x3
goto :goto_5
.end method
Do a whole-sale .method change and replace the entire .method with this one:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const/4 v0, 0x0
return v0
.end method
p.s. you will notice that there is no .line numbers and the .registers are now .locals, that is because I use a different baksmali cmd than what is the norm. I use:
Code:
java -Xmx1024M -jar baksmali.jar -l -b -o smali/ classes.dex
notice the extra -l -b
the -l(thats a lower case L not and upper case i) changes the .registers to .locals and the -b removes the smali debugging stuff that is not needed. Most custom rom builders know about this edits but this is for the average user that would like to make edits on their own and want to make edits to system/apps.
One_Love

In what situation would this fix be applicable?

gpz1100 said:
In what situation would this fix be applicable?
Click to expand...
Click to collapse
This is for anyone that wants to edit a /system/app and not want to re-sign their rom so that the framework and system apps have the same signatures. As i stated in the OP this is already done by many rom devs but this is for anyone that wants to make their own rom/edits. If this edit isn't done and signatures dont match on /system/apps then there will be problems, like not working/showing up, that sorta thing.

one_love_420 said:
This is for anyone that wants to edit a /system/app and not want to re-sign their rom so that the framework and system apps have the same signatures. As i stated in the OP this is already done by many rom devs but this is for anyone that wants to make their own rom/edits. If this edit isn't done and signatures dont match on /system/apps then there will be problems, like not working/showing up, that sorta thing.
Click to expand...
Click to collapse
So sorry to seem dumb here but I have a oxed version so I can't decompile (which I dont know how to do anyway but I am sure there are tons of tutorials out there) But does anyone have this done for the stock services.jar?

When to do your baksmali lines?
There wrote class.dex so after editing?
If before there's no class.dex yet, only jar.

zhuhang said:
When to do your baksmali lines?
There wrote class.dex so after editing?
If before there's no class.dex yet, only jar.
Click to expand...
Click to collapse
You answered your own question... Decompile the .jar, make your smali edits, recompile .jar and voila its done.
Sent from my EVO using Xparent Blue Tapatalk 2

zhuhang said:
When to do your baksmali lines?
There wrote class.dex so after editing?
If before there's no class.dex yet, only jar.
Click to expand...
Click to collapse
I'm not quite sure what this says? But "I think" what you're asking is you have no classes.dex in the .jar.That would mean you are not deodexed. The .odex is the classes.dex. I hope this answered your question if not please re-word your post.
Sent from my EVO using Tapatalk 2

Dont think ive posted in this thread. but thank you one_love for this edit. has saved me many hours of my time trying to figure it out for this edit. Thank you!!

thx! worked on my device on jellybean 4.1.2, really helped me out. im making minor edits on settings.apk and signing the whole rom each time was extremly frustating.
also, this one
java -Xmx1024M -jar baksmali.jar -l -b -o smali/ classes.dex
Click to expand...
Click to collapse
is very helpfull, too

thx for great how to

one_love_420 said:
This is how to disable signature checks using seo's code that has been around forever, now for the EVO LTE on ICS.
Gonna loosely quote SteelH's [How To] post opener:
This reference guide is to tell you what to edit to disable Signature Checks for the EVO 4G LTE in Services.jar. It is not an all-inclusive how-to on adb, decompiling/recompiling apks, etc. There are already several very good sources right here on XDA for that information.
Decompile Services.jar and look for \com\android\server\pm\PackageManagerService.smali
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
if-nez p0, :cond_8
if-nez p1, :cond_6
const/4 v6, 0x1
:goto_5
return v6
:cond_6
const/4 v6, -0x1
goto :goto_5
:cond_8
if-nez p1, :cond_c
const/4 v6, -0x2
goto :goto_5
:cond_c
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
move-object v0, p0
array-length v2, v0
const/4 v1, 0x0
:goto_14
if-ge v1, v2, :cond_1e
aget-object v5, v0, v1
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
add-int/lit8 v1, v1, 0x1
goto :goto_14
:cond_1e
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_26
if-ge v1, v2, :cond_30
aget-object v5, v0, v1
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
add-int/lit8 v1, v1, 0x1
goto :goto_26
:cond_30
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_38
const/4 v6, 0x0
goto :goto_5
:cond_38
const/4 v6, -0x3
goto :goto_5
.end method
Do a whole-sale .method change and replace the entire .method with this one:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const/4 v0, 0x0
return v0
.end method
p.s. you will notice that there is no .line numbers and the .registers are now .locals, that is because I use a different baksmali cmd than what is the norm. I use:
Code:
java -Xmx1024M -jar baksmali.jar -l -b -o smali/ classes.dex
notice the extra -l -b
the -l(thats a lower case L not and upper case i) changes the .registers to .locals and the -b removes the smali debugging stuff that is not needed. Most custom rom builders know about this edits but this is for the average user that would like to make edits on their own and want to make edits to system/apps.
One_Love
Click to expand...
Click to collapse
Hi
I do this with my servicer.jar from CM9 .It s work good editet apk work , but i can t install app in data/app ant app ther don t work .
Thanks

Hey. Is it necessary to follow the last step to compile services.jar? I use Virtuous Ten Studio.

Dom3616 said:
Hey. Is it necessary to follow the last step to compile services.jar? I use Virtuous Ten Studio.
Click to expand...
Click to collapse
Nah, using vts to decompile change that one file and then build the project. Grab the new jar from binary. Push to your phone and enjoy.
Sent from my EVO using xda app-developers app

one_love_420 said:
This is how to disable signature checks using seo's code that has been around forever, now for the EVO LTE on ICS.
Gonna loosely quote SteelH's [How To] post opener:
This reference guide is to tell you what to edit to disable Signature Checks for the EVO 4G LTE in Services.jar. It is not an all-inclusive how-to on adb, decompiling/recompiling apks, etc. There are already several very good sources right here on XDA for that information.
Decompile Services.jar and look for \com\android\server\pm\PackageManagerService.smali
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
if-nez p0, :cond_8
if-nez p1, :cond_6
const/4 v6, 0x1
:goto_5
return v6
:cond_6
const/4 v6, -0x1
goto :goto_5
:cond_8
if-nez p1, :cond_c
const/4 v6, -0x2
goto :goto_5
:cond_c
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
move-object v0, p0
array-length v2, v0
const/4 v1, 0x0
:goto_14
if-ge v1, v2, :cond_1e
aget-object v5, v0, v1
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
add-int/lit8 v1, v1, 0x1
goto :goto_14
:cond_1e
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_26
if-ge v1, v2, :cond_30
aget-object v5, v0, v1
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
add-int/lit8 v1, v1, 0x1
goto :goto_26
:cond_30
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_38
const/4 v6, 0x0
goto :goto_5
:cond_38
const/4 v6, -0x3
goto :goto_5
.end method
Do a whole-sale .method change and replace the entire .method with this one:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const/4 v0, 0x0
return v0
.end method
p.s. you will notice that there is no .line numbers and the .registers are now .locals, that is because I use a different baksmali cmd than what is the norm. I use:
Code:
java -Xmx1024M -jar baksmali.jar -l -b -o smali/ classes.dex
notice the extra -l -b
the -l(thats a lower case L not and upper case i) changes the .registers to .locals and the -b removes the smali debugging stuff that is not needed. Most custom rom builders know about this edits but this is for the average user that would like to make edits on their own and want to make edits to system/apps.
One_Love
Click to expand...
Click to collapse
Done. But how to know it is working properly? I have copied to the phone and do not know, it works exactly as requested. Can not fault or whatever happened.
How to check it?

dedichthui said:
Done. But how to know it is working properly? I have copied to the phone and do not know, it works exactly as requested. Can not fault or whatever happened.
How to check it?
Click to expand...
Click to collapse
This mod work. I recompile and sign systemui.apk before but it blank when flash it. After made this disable signature check and flash again it work like a charmed.
Sent from my lolipop phone

hi
when i decompile Services.jar (g920p) 6.0.1 ican't find this path (\com\android\server\pm\PackageManagerService.smali)
how to disable signature verification on android marshmalow ?

Related

[MOD/Source] [KB5] Text-based battery percent in Status bar

This was more or less the same method I used before, but this time for battery percentage.
Same procedure as before:
decompile services.jar
open com/android/server/status/StatusBarPolicy.smali
do the edits below
compile
push in recovery/flash
first, make the system think we're dealing with text
find
Code:
.line 524
const-string v3, "battery"
const v4, 0x10802ae
invoke-static {v3, v7, v4, v6, v6}, Lcom/android/server/status/IconData;->makeIcon(Ljava/lang/String;Ljava/lang/String;III)Lcom/android/server/status/IconData;
move-result-object v3
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryData:Lcom/android/server/status/IconData;
.line 526
iget-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryData:Lcom/android/server/status/IconData;
invoke-virtual {p2, v3, v7}, Lcom/android/server/status/StatusBarService;->addIcon(Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationData;)Landroid/os/IBinder;
move-result-object v3
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryIcon:Landroid/os/IBinder;
and replace it with this
Code:
const-string v3, "battery"
const-string v4, "?% "
invoke-static {v3, v4}, Lcom/android/server/status/IconData;->makeText(Ljava/lang/String;Ljava/lang/CharSequence;)Lcom/android/server/status/IconData;
move-result-object v3
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryData:Lcom/android/server/status/IconData;
.line 9991
iget-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryData:Lcom/android/server/status/IconData;
invoke-virtual {p2, v3, v7}, Lcom/android/server/status/StatusBarService;->addIcon(Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationData;)Landroid/os/IBinder;
move-result-object v3
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryIcon:Landroid/os/IBinder;
next replace the updateBattery() method with this one
Code:
.method private final updateBatteryNum()V
.registers 10
.prologue
const-string v5, ""
:cond_1
iget v1, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryLevel:I
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v5
const-string v1, "%"
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
goto :goto_1
if-nez v4, :cond_1
:goto_1
.line 106
iget-object v2, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryTextData:Lcom/android/server/status/IconData;
.line 107
iput-object v5, v2, Lcom/android/server/status/IconData;->text:Ljava/lang/CharSequence;
.line 762
iget-object v5, p0, Lcom/android/server/status/StatusBarPolicy;->mService:Lcom/android/server/status/StatusBarService;
iget-object v6, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryTextIcon:Landroid/os/IBinder;
iget-object v7, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryTextData:Lcom/android/server/status/IconData;
const/4 v8, 0x0
invoke-virtual {v5, v6, v7, v8}, Lcom/android/server/status/StatusBarService;->updateIcon(Landroid/os/IBinder;Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationData;)V
return-void
.end method
ok, now my method is a little different and it doesn't take any inputs, so we're gonna have to modify the call to it
find this:
Code:
.method static synthetic access$300(Lcom/android/server/status/StatusBarPolicy;Landroid/content/Intent;)V
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 111
invoke-direct {p0, p1}, Lcom/android/server/status/StatusBarPolicy;->updateBattery(Landroid/content/Intent;)V
return-void
.end method
towards the bottom you'll see the call to the method, change that block of code to
Code:
.method static synthetic access$300(Lcom/android/server/status/StatusBarPolicy;Landroid/content/Intent;)V
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 111
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateBattery()V
return-void
.end method
done!
Wow great work man. This is awesome.
Sent from my SGH-T959
jneal9 said:
Wow great work man. This is awesome.
Sent from my SGH-T959
Click to expand...
Click to collapse
Thats the only kind he does
Whitehawkx said:
Thats the only kind he does
Click to expand...
Click to collapse
Agreed! Same with you.
jellette said:
Agreed! Same with you.
Click to expand...
Click to collapse
Touché.
All of you guys do...
Hmm...interesting. Great work man.
so is there anyway easier?
i was wondering if there is anyway this can be done through a flash or not? that would just replace the entire services.jar right? i guess im gonna try it. lol. ever since i flashed whitehawks new lockscreens no battery percent mod will work properly. it will just show the percent as if it was an inaccurate battery. ex. if i was on 47 percent it would show 40 percent until i got into the 30's.
Good work man as always ..
COuld You provide the same tutorial for ICS?
There is no StatusbarPolicy.smali after baksmali services.jar
data enabled after USB disconected
If I disable data connection and connect to USB data is automatically activated.
If I disable data with connected to USB after disconect data is automatically activated again.
This issue is for all ICS ROMs
Why?
I need tutorial for ICS too.
I'd like to try this and I decompiled services.jar.
But there are no StatusBarPolicy.smali.
My phone isXperia acro HD(ICS 4.0.4).
* Xperia acro HD is localized Xperia S for Japan.

[Team XPOSED][HOW-TO/MOD] LongPress Volume to Skip tracks

First of all, a big thanks to one_love_420 for doing this modification for our EVO LTEs. Now, of course I had to pick apart the mod and figure out how to do it for myself for future reference and low and behold, it worked.
I have attached a flashable zip to make this easier. It also includes the advanced power menu and long press home for recent apps. If you use Titanium Backup to odex the system apps, you must remove odex files before flashing OR before rebooting after flashing or you will get FCs.
Another Team XPOSED exclusive!
Step 1: grab android.policy.jar and decompile it OR extract classes.dex from it and use baksmali to decompile.
Step 2: navigate to com\android\internal\policy\impl\PhoneWindowManager.smali and open that.
Before we begin, let me add a legend so that you know what commands mean what.
Command Legend
FIND: This means search for
AFTER-ADD: This means after the line you've searched for, add the following below it. You can press enter to make a few lines. I would do 3 so that you can add whatever you need to in the middle, keeping the code looking the same.
FIND-AROUND: This means that you search around the previous FIND. Somewhere in the vicinity that's not really searchable for the first time because of multiple instances. Most of the time you can search with your eyes instead of with the actual search command.
REPLACE: You completely replace whatever you are told to replace with what comes after the REPLACE command.
REPLACE-WITH: This is roughly the same as REPLACE, but is used when there is nothing to FIND-AROUND.
REMOVE: You completely remove what is said below the REMOVE command.
ADD-BEFORE: This means after the line you've searched for, add the following above it. You can press enter to make a few lines. I would do 3 so that you can add whatever you need to in the middle, keeping the code looking the same.
Let us begin with actual smali code modifications.
Step 3: FIND
Code:
.field mIsHtcDockScreenAsHome:Z
AFTER-ADD
Code:
.field mIsLongPress:Z
FIND
Code:
.field private mVolumeDownKeyTriggered:Z
AFTER-ADD
Code:
.field mVolumeDownLongPress:Ljava/lang/Runnable;
FIND
Code:
.field private mVolumeUpKeyTriggered:Z
AFTER-ADD
Code:
.field mVolumeUpLongPress:Ljava/lang/Runnable;
.field mWakeAcquired:Z
FIND
Code:
iput-boolean v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsGuestMode:Z
AFTER-ADD
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressF;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressF;-><init>
(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeUpLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressR;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressR;-><init>
(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeDownLongPress:Ljava/lang/Runnable;
iput-boolean v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
FIND
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
FIND-AROUND
Code:
throw v2
.end method
ADD-AFTER
Code:
.method handleVolumeLongPress(I)V
.locals 4
const/16 v1, 0x18
if-ne p1, v1, :cond_11
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_6
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mHandler:Landroid/os/Handler;
invoke-static {}, Landroid/view/ViewConfiguration;->getLongPressTimeout()I
move-result v2
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
:cond_11
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_6
.end method
.method handleVolumeLongPressAbort()V
.locals 2
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method
FIND
Code:
:cond_215
const/16 v20, 0x0
goto :goto_201
:sswitch_218
const/16 v20, 0x19
FIND-AROUND
Code:
:sswitch_218
ADD-AFTER
Code:
if-nez v7, :cond_245
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>handleVolumeLongPressAbort()V
move-object/from16 v0, p0
iget-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
if-eqz v1, :cond_232
const-string v1, "lyapota"
const-string v2, "media_key WakeLock release"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v1}, Landroid/os/PowerManager$WakeLock;->release()V
const/4 v2, 0x0
iput-boolean v2, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
:cond_232
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
if-nez v0, :cond_245
and-int/lit8 v20, v18, 0x1
if-nez v20, :cond_245
const/16 v20, 0x3
move-object/from16 v0, p0
move/from16 v1, v20
invoke-virtual {v0, v1, v14}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
:cond_245
FIND
Code:
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
FIND-AROUND
Code:
if-eqz v20, :cond_2c
ADD-AFTER
Code:
move-object/from16 v0, p0
iget-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
if-nez v1, :cond_320
const-string v1, "lyapota"
const-string v2, "media_key WakeLock acquire"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v1}, Landroid/os/PowerManager$WakeLock;->acquire()V
const/4 v2, 0x1
iput-boolean v2, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
:cond_320
FIND
Code:
and-int/lit8 v20, v18, 0x1
if-nez v20, :cond_2c
FIND-AROUND
Code:
const/16 v20, 0x3
REPLACE
Code:
const/16 v20, 0x3
WITH
Code:
const/4 v1, 0x0
FIND
Code:
move-object/from16 v0, p0
move/from16 v1, v20
REMOVE
Code:
move/from16 v1, v20
FIND
Code:
invoke-virtual {v0, v1, v14}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
REPLACE-WITH
Code:
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
invoke-virtual {v0, v14}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress
(I)V
FIND
Code:
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy
$WindowState;IILandroid/view/WindowManagerPolicy
$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
ADD-BEFORE
Code:
.method protected sendMediaButtonEvent(I)V
.locals 13
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)
Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast
(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)
Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast
(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method
Step 4: Save file and compile android.policy.jar or use smali to compile classes.dex and replace inside of android.policy.jar
Step 5: Reboot into recovery and push to phone, clear Dalvik and if you use Titanium Backup to odex, you will have to remove the odex files from /system/app/ in adb by doing "adb shell rm /system/app/*.odex"
Step 6: Reboot and prosper!
freeza said:
First of all, a big thanks to one_love_420 for doing this modification for our EVO LTEs. Now, of course I had to pick apart the mod and figure out how to do it for myself for future reference and low and behold, it worked.
Another Team XPOSED exclusive!
Step 1: grab android.policy.jar and decompile it OR extract classes.dex from it and use baksmali to decompile.
Step 2: navigate to com\android\internal\policy\impl\PhoneWindowManager.smali and open that.
Before we begin, let me add a legend so that you know what commands mean what.
Command Legend
FIND: This means search for
AFTER-ADD: This means after the line you've searched for, add the following below it. You can press enter to make a few lines. I would do 3 so that you can add whatever you need to in the middle, keeping the code looking the same.
FIND-AROUND: This means that you search around the previous FIND. Somewhere in the vicinity that's not really searchable for the first time because of multiple instances. Most of the time you can search with your eyes instead of with the actual search command.
REPLACE: You completely replace whatever you are told to replace with what comes after the REPLACE command.
REPLACE-WITH: This is roughly the same as REPLACE, but is used when there is nothing to FIND-AROUND.
REMOVE: You completely remove what is said below the REMOVE command.
ADD-BEFORE: This means after the line you've searched for, add the following above it. You can press enter to make a few lines. I would do 3 so that you can add whatever you need to in the middle, keeping the code looking the same.
Let us begin with actual smali code modifications.
Step 3: FIND
Code:
.field mIsHtcDockScreenAsHome:Z
AFTER-ADD
Code:
.field mIsLongPress:Z
FIND
Code:
.field private mVolumeDownKeyTriggered:Z
AFTER-ADD
Code:
.field mVolumeDownLongPress:Ljava/lang/Runnable;
FIND
Code:
.field private mVolumeUpKeyTriggered:Z
AFTER-ADD
Code:
.field mVolumeUpLongPress:Ljava/lang/Runnable;
.field mWakeAcquired:Z
FIND
Code:
iput-boolean v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsGuestMode:Z
AFTER-ADD
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressF;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressF;-><init>
(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeUpLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressR;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressR;-><init>
(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeDownLongPress:Ljava/lang/Runnable;
iput-boolean v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
FIND
Code:
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
FIND-AROUND
Code:
throw v2
.end method
ADD-AFTER
Code:
.method handleVolumeLongPress(I)V
.locals 4
const/16 v1, 0x18
if-ne p1, v1, :cond_11
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_6
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mHandler:Landroid/os/Handler;
invoke-static {}, Landroid/view/ViewConfiguration;->getLongPressTimeout()I
move-result v2
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
:cond_11
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_6
.end method
.method handleVolumeLongPressAbort()V
.locals 2
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method
FIND
Code:
:cond_215
const/16 v20, 0x0
goto :goto_201
:sswitch_218
const/16 v20, 0x19
FIND-AROUND
Code:
:sswitch_218
ADD-AFTER
Code:
if-nez v7, :cond_245
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>handleVolumeLongPressAbort()V
move-object/from16 v0, p0
iget-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
if-eqz v1, :cond_232
const-string v1, "lyapota"
const-string v2, "media_key WakeLock release"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v1}, Landroid/os/PowerManager$WakeLock;->release()V
const/4 v2, 0x0
iput-boolean v2, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
:cond_232
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
if-nez v0, :cond_245
and-int/lit8 v20, v18, 0x1
if-nez v20, :cond_245
const/16 v20, 0x3
move-object/from16 v0, p0
move/from16 v1, v20
invoke-virtual {v0, v1, v14}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
:cond_245
FIND
Code:
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
FIND-AROUND
Code:
if-eqz v20, :cond_2c
ADD-AFTER
Code:
move-object/from16 v0, p0
iget-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
if-nez v1, :cond_320
const-string v1, "lyapota"
const-string v2, "media_key WakeLock acquire"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v1}, Landroid/os/PowerManager$WakeLock;->acquire()V
const/4 v2, 0x1
iput-boolean v2, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWakeAcquired:Z
:cond_320
FIND
Code:
and-int/lit8 v20, v18, 0x1
if-nez v20, :cond_2c
FIND-AROUND
Code:
const/16 v20, 0x3
REPLACE
Code:
const/16 v20, 0x3
WITH
Code:
const/4 v1, 0x0
FIND
Code:
move-object/from16 v0, p0
move/from16 v1, v20
REMOVE
Code:
move/from16 v1, v20
FIND
Code:
invoke-virtual {v0, v1, v14}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
REPLACE-WITH
Code:
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
invoke-virtual {v0, v14}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress
(I)V
FIND
Code:
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy
$WindowState;IILandroid/view/WindowManagerPolicy
$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
ADD-BEFORE
Code:
.method protected sendMediaButtonEvent(I)V
.locals 13
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)
Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast
(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)
Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;-
>mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast
(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method
Step 4: Save file and compile android.policy.jar or use smali to compile classes.dex and replace inside of android.policy.jar
Step 5: Reboot into recovery and push to phone, clear Dalvik and if you use Titanium Backup to odex, you will have to remove the odex files from /system/app/ in adb by doing "adb shell rm /system/app/*.odex"
Step 6: Reboot and prosper!
I have attached a flashable zip to make this easier. It also includes the advanced power menu and long press home for recent apps.
Click to expand...
Click to collapse
You guys are at it again! Good work!
Sent from my EVO using Tapatalk 2
Nice Job freeza!
Yay freeza!
Way to Go!
People appreciate when mods are broken down, and can see what's happening underneath it all.
-Zanzibar
(Happy 4:20!)
Freeza yur the best man. Love this MOD. Gonna play with it now
Sent from my EVO using Tapatalk 2
Nice write up!
Sent from my EVO using Tapatalk 2
According to a few posts in flex360's rom thread it appears this mod causes the volume control in 3rd party apps such as pandora to act strangely. Some of the details are here http://forum.xda-developers.com/showpost.php?p=27789582&postcount=952 Is there any way to resolve this issue?
njfoses said:
According to a few posts in flex360's rom thread it appears this mod causes the volume control in 3rd party apps such as pandora to act strangely. Some of the details are here http://forum.xda-developers.com/showpost.php?p=27789582&postcount=952 Is there any way to resolve this issue?
Click to expand...
Click to collapse
Does it happen in Pandora? Because I just read that thread, and tried the volume keys in Pandora with screen on and off and they functioned as expected.
freeza said:
Does it happen in Pandora? Because I just read that thread, and tried the volume keys in pandora with screen on and off and they functioned as expected.
Click to expand...
Click to collapse
To be honest im not using the mod or that rom personally (only rooted not unlocked yet) i was just passing along information. Here is another post in that thread that says the issue happens in google play music http://forum.xda-developers.com/showpost.php?p=27776939&postcount=931
Thanks Freeza, I love this mod!
njfoses said:
To be honest im not using the mod or that rom personally (only rooted not unlocked yet) i was just passing along information. Here is another post in that thread that says the issue happens in google play music http://forum.xda-developers.com/showpost.php?p=27776939&postcount=931
Click to expand...
Click to collapse
Thanks for the heads-up! It appears as though my Google Play Music and Pandora are functioning as expected in regards to the volume keys. If anyone else can chime in and give their feedback, that would be awesome.
If you are going to post feedback, please do so with the following criteria:
-Do the volume keys work as expected in various music apps?
-What ROM are you using?
-Are you using the prepackaged flashable from this thread?
-If not, did you mod it yourself?
-If you did mod it, does yours also include longpress home for recent apps and advanced power menu?
-Any other information you think would be relevant
ZanzDroid said:
Yay freeza!
Way to Go!
People appreciate when mods are broken down, and can see what's happening underneath it all.
-Zanzibar
(Happy 4:20!)
Click to expand...
Click to collapse
lol it's always 420 some where zanzibar
Definitely appreciated just one thing what does, line then some # mean
Sent from my PC36100 using Tapatalk 2
Hi
Could U please help me do the same in htc wildfire s? I tried but this keywords cant be found in wfs PhoneWindowManager.smali.
Please help a little. I dont understand codes.
rename to remove .c
It gives me this after modification
Code:
C:\A>apktool b out
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(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.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:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Hey freeza , thanks for all your stuff .
zozor said:
Hey freeza , thanks for all your stuff .
Click to expand...
Click to collapse
did it work for you? or are you just saying thanks

Modifying NfcNci.apk so that it doesn't care about Deodex.

Just for the sake of transparency Here is a quick rundown of the process for everyone to see.
High level overview:
1. ) baksmali classes.dex from NfcNci.apk
2. ) Mod the resulting smali.
3. ) smali, and inject back into NfcNci.apk
Since this is the dev section I will focus on step 2 you can read about steps 1 and 3 elsewhere. For the sake of this example I will be working with the system dump from the original release of the gt-i9505g (S4 Google Edition) System Software.
What you are looking for is this function contained in the NfcIntegrityChecker class:
Code:
.method public checkIntegrity(Ljava/lang/String;)Z
If we track back the exception error message that comes up in the debug log ("Client module is tampered"), you will see that the text is contained in the NfcService class within the function ".method public enforceNfcIntegrity()V"
Code:
.method public enforceNfcIntegrity()V
.locals 3
.prologue
.line 470
iget-object v1, p0, Lcom/android/nfc/NfcService;->mIntegrityChecker:Lcom/android/nfc/NfcIntegrityChecker;
monitor-enter v1
.line 471
:try_start_0
iget-object v0, p0, Lcom/android/nfc/NfcService;->mIntegrityChecker:Lcom/android/nfc/NfcIntegrityChecker;
invoke-virtual {v0}, Lcom/android/nfc/NfcIntegrityChecker;->getStatus()I
move-result v0
const/4 v2, 0x3
if-ne v0, v2, :cond_0
.line 472
new-instance v0, Ljava/lang/SecurityException;
const-string v2, "NfcIntegrityChecker is not on the proper status"
invoke-direct {v0, v2}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
throw v0
.line 480
:catchall_0
move-exception v0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.line 475
:cond_0
:try_start_1
iget-object v0, p0, Lcom/android/nfc/NfcService;->mIntegrityChecker:Lcom/android/nfc/NfcIntegrityChecker;
invoke-virtual {v0}, Lcom/android/nfc/NfcIntegrityChecker;->getStatus()I
move-result v0
const/4 v2, 0x2
if-eq v0, v2, :cond_1
iget-object v0, p0, Lcom/android/nfc/NfcService;->mIntegrityChecker:Lcom/android/nfc/NfcIntegrityChecker;
const-string v2, "client"
invoke-virtual {v0, v2}, Lcom/android/nfc/NfcIntegrityChecker;->checkIntegrity(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/android/nfc/NfcService;->mIntegrityChecker:Lcom/android/nfc/NfcIntegrityChecker;
const-string v2, "clientlib"
invoke-virtual {v0, v2}, Lcom/android/nfc/NfcIntegrityChecker;->checkIntegrity(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_2
.line 478
:cond_1
new-instance v0, Ljava/lang/SecurityException;
const-string v2, "Client module is tampered"
invoke-direct {v0, v2}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
throw v0
.line 480
:cond_2
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 481
return-void
.end method
If we follow the flow of the application we see that the code for this failure is only reached if the function call to
Code:
checkIntegrity(Ljava/lang/String;)Z
returns false, or the status is not properly set. (the 'Z' at the end means it returns a boolean).
There are two ways to handle this. We can either patch out the call to checkIntegrity entirely (jump over it, or literally remove the calls), or we can modify the checkIntegrity function so that it always returns true.
So, let's look at the checkIntegrity function:
Code:
.method public checkIntegrity(Ljava/lang/String;)Z
.locals 11
.parameter "type"
.prologue
const/4 v10, 0x2
const/4 v9, 0x1
const/4 v8, 0x0
.line 293
iget-object v5, p0, Lcom/android/nfc/NfcIntegrityChecker;->mModuleMap:Ljava/util/HashMap;
invoke-virtual {v5, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/ArrayList;
.line 294
.local v2, modules:Ljava/util/ArrayList;,"Ljava/util/ArrayList<[Ljava/lang/String;>;"
const/4 v1, 0x0
.line 295
.local v1, module:[Ljava/lang/String;
const/4 v3, 0x1
.line 296
.local v3, ret:Z
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v4
.line 298
.local v4, size:I
const/4 v0, 0x0
.local v0, i:I
:goto_0
if-ge v0, v4, :cond_2
.line 299
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
.end local v1 #module:[Ljava/lang/String;
check-cast v1, [Ljava/lang/String;
.line 301
.restart local v1 #module:[Ljava/lang/String;
if-eqz v1, :cond_0
array-length v5, v1
if-eq v5, v10, :cond_4
.line 302
:cond_0
sget-boolean v5, Lcom/android/nfc/NfcIntegrityChecker;->DBG:Z
if-eqz v5, :cond_1
const-string v5, "NfcIntegrityChecker"
const-string v6, "checkIntegrity module format error"
invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 303
:cond_1
const/4 v3, 0x0
.line 314
:cond_2
:goto_1
if-nez v3, :cond_3
iput v10, p0, Lcom/android/nfc/NfcIntegrityChecker;->mStatus:I
.line 316
:cond_3
return v3
.line 307
:cond_4
aget-object v5, v1, v8
aget-object v6, v1, v9
invoke-direct {p0, v5, v6}, Lcom/android/nfc/NfcIntegrityChecker;->checkModuleIntegrity(Ljava/lang/String;Ljava/lang/String;)Z
move-result v5
if-nez v5, :cond_6
.line 308
sget-boolean v5, Lcom/android/nfc/NfcIntegrityChecker;->DBG:Z
if-eqz v5, :cond_5
const-string v5, "NfcIntegrityChecker"
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "checkModuleIntegrity "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
aget-object v7, v1, v8
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
const-string v7, " tampered : "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
aget-object v7, v1, v9
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 309
:cond_5
const/4 v3, 0x0
.line 310
goto :goto_1
.line 298
:cond_6
add-int/lit8 v0, v0, 0x1
goto :goto_0
.end method
There is only one return statement, so this should be a simple matter of setting our value, and calling return. In some cases there is code that your application needs to run in order to function, so usually a light touch is a good idea, but in this case all of the code is there to run various checks so we can skip most of it.
The easiest way would be to replace the whole function with this:
Code:
.method public checkIntegrity(Ljava/lang/String;)Z
.locals 2
.parameter "type"
.prologue
const/4 v0, 0x1
return v0
.end method
But that method never sat right with me (old school c++ cracking I guess), so I prefer something like this:
add a goto, and modify the constant here:
.line 303
:cond_1
:goto_666
const/4 v3, 0x1
then add the following line to the beginning of the function (after the .prologue)
goto :goto_666
We end up with something like this:
Code:
.method public checkIntegrity(Ljava/lang/String;)Z
.locals 11
.parameter "type"
.prologue
const/4 v10, 0x2
const/4 v9, 0x1
const/4 v8, 0x0
goto :goto_666
.line 293
iget-object v5, p0, Lcom/android/nfc/NfcIntegrityChecker;->mModuleMap:Ljava/util/HashMap;
invoke-virtual {v5, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/ArrayList;
.line 294
.local v2, modules:Ljava/util/ArrayList;,"Ljava/util/ArrayList<[Ljava/lang/String;>;"
const/4 v1, 0x0
.line 295
.local v1, module:[Ljava/lang/String;
const/4 v3, 0x1
.line 296
.local v3, ret:Z
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v4
.line 298
.local v4, size:I
const/4 v0, 0x0
.local v0, i:I
:goto_0
if-ge v0, v4, :cond_2
.line 299
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
.end local v1 #module:[Ljava/lang/String;
check-cast v1, [Ljava/lang/String;
.line 301
.restart local v1 #module:[Ljava/lang/String;
if-eqz v1, :cond_0
array-length v5, v1
if-eq v5, v10, :cond_4
.line 302
:cond_0
sget-boolean v5, Lcom/android/nfc/NfcIntegrityChecker;->DBG:Z
if-eqz v5, :cond_1
const-string v5, "NfcIntegrityChecker"
const-string v6, "checkIntegrity module format error"
invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 303
:cond_1
:goto_666
const/4 v3, 0x1
.line 314
:cond_2
:goto_1
if-nez v3, :cond_3
iput v10, p0, Lcom/android/nfc/NfcIntegrityChecker;->mStatus:I
.line 316
:cond_3
return v3
.line 307
:cond_4
aget-object v5, v1, v8
aget-object v6, v1, v9
invoke-direct {p0, v5, v6}, Lcom/android/nfc/NfcIntegrityChecker;->checkModuleIntegrity(Ljava/lang/String;Ljava/lang/String;)Z
move-result v5
if-nez v5, :cond_6
.line 308
sget-boolean v5, Lcom/android/nfc/NfcIntegrityChecker;->DBG:Z
if-eqz v5, :cond_5
const-string v5, "NfcIntegrityChecker"
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "checkModuleIntegrity "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
aget-object v7, v1, v8
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
const-string v7, " tampered : "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
aget-object v7, v1, v9
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 309
:cond_5
const/4 v3, 0x0
.line 310
goto :goto_1
.line 298
:cond_6
add-int/lit8 v0, v0, 0x1
goto :goto_0
.end method
confirmed working
thanks again!
This is great, thanks for your contribution!
So does the integrity check call only have to do with access to the secure element? Or does it also eliminate the need to spoof device model for compatibility purposes?
CPA Poke said:
This is great, thanks for your contribution!
So does the integrity check call only have to do with access to the secure element? Or does it also eliminate the need to spoof device model for compatibility purposes?
Click to expand...
Click to collapse
It is just for the secure element. You can modify the wallet apk to bypass things like root checking, model versions, and carrier checks as well. It looks like the xposed framework patch that has been floating around does some of this, but it doesn't seem to patch the calls to read the device properties for device ID and such.
In my testing, I was able to replace all of those calls in the wallet app with constant strings containing "valid" values. This would kind of suck to have to do for each update... Though It would be a simple enough matter to write a script to do this automagically for each update. (Baksmali, sed/awk to find and replace in the smali, and smali to classes.dex) or write an xposed module to watch for calls to read prop values originating from wallet.
Sent from my GT-I9505G
Fenny said:
It is just for the secure element. You can modify the wallet apk to bypass things like root checking, model versions, and carrier checks as well. It looks like the xposed framework patch that has been floating around does some of this, but it doesn't seem to patch the calls to read the device properties for device ID and such.
In my testing, I was able to replace all of those calls in the wallet app with constant strings containing "valid" values. This would kind of suck to have to do for each update... Though It would be a simple enough matter to write a script to do this automagically for each update. (Baksmali, sed/awk to find and replace in the smali, and smali to classes.dex) or write an xposed module to watch for calls to read prop values originating from wallet.
Sent from my GT-I9505G
Click to expand...
Click to collapse
I think that's what the existing Xposed Wallet hack modules do (watch for the read prop values originating from Wallet). But for whatever reason it won't intercept the calls on initial setup, which is why you have to actually change the build.prop prior to initially setting up Wallet.
Fenny said:
It is just for the secure element. You can modify the wallet apk to bypass things like root checking, model versions, and carrier checks as well. It looks like the xposed framework patch that has been floating around does some of this, but it doesn't seem to patch the calls to read the device properties for device ID and such.
In my testing, I was able to replace all of those calls in the wallet app with constant strings containing "valid" values. This would kind of suck to have to do for each update... Though It would be a simple enough matter to write a script to do this automagically for each update. (Baksmali, sed/awk to find and replace in the smali, and smali to classes.dex) or write an xposed module to watch for calls to read prop values originating from wallet.
Sent from my GT-I9505G
Click to expand...
Click to collapse
if you had time to add a how-to to bypass root checking, model version and carrier check, I'd update it every time. wouldn't be a problem and I'd be happy to help out.
mrvirginia said:
if you had time to add a how-to to bypass root checking, model version and carrier check, I'd update it every time. wouldn't be a problem and I'd be happy to help out.
Click to expand...
Click to collapse
Bypassing Root:
Look at the com.google.android.apps.wallet.security.EnvironmentProperty class in the constructor method.
We're looking for this segment containing SU_COMMAND_LOCATIONS:
Code:
.line 70
new-array v0, v4, [Ljava/lang/String;
const-string v1, "/system/bin/su"
aput-object v1, v0, v3
const-string v1, "/system/xbin/su"
aput-object v1, v0, v2
sput-object v0, Lcom/google/android/apps/wallet/security/EnvironmentProperty;->SU_COMMAND_LOCATIONS:[Ljava/lang/String;
Note: These variable names change (v3, v4, etc...), usually they will be the const/4 numbers defined at the beginning of the method. Just make sure you use the one that contains 0.
Change this line from v4 (which contains the number 2)
Code:
new-array v0, v4, [Ljava/lang/String;
to v3 (which contains the number 0)
Code:
new-array v0, v3, [Ljava/lang/String;
Then simply delete the following lines:
Code:
const-string v1, "/system/bin/su"
aput-object v1, v0, v3
const-string v1, "/system/xbin/su"
aput-object v1, v0, v2
This will Set the environment property SU_COMMAND_LOCATIONS as an empty string array which will cause the checkDevice function in Lcom/google/android/apps/wallet/security/EnvironmentProperty$1 to simply break out of it's for loop and return 0 (which is what we want).
Bypassing device/carrier restrictions:
Here is a quick script I whipped up to replace the build prop calls automagically.
Usage would be something like:
Baksmali the classes.dex in your apk:
java -jar baksmali.jar your.apk -o outdir
Run the script (below):
/path/to/pwnprop.sh outdir
Do whatever other changes to the outdir directory.
Then smali:
java -jar smali.jar outdir -o classes.dex
Finally, winzip, lol. (If you actually use winzip imma kill you.)
The script:
Save this as pwnprop.sh (or whatever you feel like) and chmod +x
Code:
#!/bin/bash
do_replace ()
{
case $3 in
# Replace these with whatever device you want to clone.
MODEL)
ours="Galaxy Nexus";;
BRAND)
ours="Google" ;;
BOARD)
ours=""tuna"
ID)
ours="JDQ39E" ;;
PRODUCT)
ours="yakju" ;;
DEVICE)
ours="yakju" ;;
FINGERPRINT)
ours="google/yakju/maguro:4.2.2/JDQ39/573038:user/release-keys" ;;
*)
echo "Replacement property not defined: "$3" in "$1
return ;;
esac
sed -i 's{sget-object '$2', Landroid/os/Build;->'$3':Ljava/lang/String;{const-string '$2', "'$ours'"{g' $1
echo sed -i 's{sget-object '$2', Landroid/os/Build;->'$3':Ljava/lang/String;{const-string '$2', "'$ours'"{g' $1
}
OIFS=$IFS; IFS=$'\n'
for line in `grep -ro "[v0-9]*, Landroid/os/Build;->[A-Z]*" $ | sed 's{, Landroid/os/Build;->{:{'`
do
IFS=':'
temparray=($line)
if [ ${#temparray[@]} -eq 3 ]
then
do_replace $line
fi
IFS=$OIFS
done
CPA Poke said:
I think that's what the existing Xposed Wallet hack modules do (watch for the read prop values originating from Wallet). But for whatever reason it won't intercept the calls on initial setup, which is why you have to actually change the build.prop prior to initially setting up Wallet.
Click to expand...
Click to collapse
I think it actually just replaces the function that checks, "Is this device id allowed?" But for the initial setup the strings in build prop are sent to google where they can reject them server-side.
when trying to run the script, i keep getting a syntax error
pwnprop.sh: line 2: $'\r': command not found
pwnprop.sh: line 3: syntax error near unexpected token `$'\r''
'wnprop.sh: line 3: `do_replace ()
i'm doing:
bash pwnprop.sh classes
classes is my "outdir"
edit: alright, i've converted dos2unix. now i'm just getting errors that the file doesn't exist. argh, oh linux.
edit: zip has been updated to no longer check for su binary. still needs a device/carrier bypass restriction removed...
Fenny said:
I think it actually just replaces the function that checks, "Is this device id allowed?" But for the initial setup the strings in build prop are sent to google where they can reject them server-side.
Click to expand...
Click to collapse
Gotcha, that makes perfect sense.
mrvirginia said:
when trying to run the script, i keep getting a syntax error
pwnprop.sh: line 2: $'\r': command not found
pwnprop.sh: line 3: syntax error near unexpected token `$'\r''
'wnprop.sh: line 3: `do_replace ()
i'm doing:
bash pwnprop.sh classes
classes is my "outdir"
edit: alright, i've converted dos2unix. now i'm just getting errors that the file doesn't exist. argh, oh linux.
edit: zip has been updated to no longer check for su binary. still needs a device/carrier bypass restriction removed...
Click to expand...
Click to collapse
Make sure you have the sed, echo, and grep utilities installed and in your path.
Sent from my GT-I9505G
Fenny said:
Make sure you have the sed, echo, and grep utilities installed and in your path.
Sent from my GT-I9505G
Click to expand...
Click to collapse
i finally figured out what the problem was. iirc, i was running it as root or something. had the same problem when i tried using the Kitchen again a week or two ago and got it sorted so i'll attempt to run this again [hopefully] over the weekend and give everyone a working Wallet regardless of device so they won't have to do silly tweaks anymore with build.prop etc. thank you again, sir.
oh, did you ever figure out the SIM unlock issue?
Causes NFC to FC on official 4.3 with full wipe. Oddly, it works with dirty flash. Ideas?
[Edit]
Never mind. It was just a bad signature.
@ OP: this NfcNci mod works on TW firmware MF8.
maanz said:
@ OP: this NfcNci mod works on TW firmware MF8.
Click to expand...
Click to collapse
Good to hear. Sounds like this is a new feature in Samsung firmware. Still makes me wonder if non-samsung devices suffer the same fate. The function call is the same no matter which implementation of NfcNci you are using, but I suppose that each vendor's implementation of the integrity checks by necessesity will differ.
Sent from my GT-I9505G
@Fenny looks like Superuser (unsecure) check was removed from newest Wallet release on the Google Play Store
mrvirginia said:
@Fenny looks like Superuser (unsecure) check was removed from newest Wallet release on the Google Play Store
Click to expand...
Click to collapse
That is great news. Much less work to be done on it then.
Keep up the good work! You guys are close, I can feel it! I would offer to help this weekend, but I think I would just slow you down.
Sent from my Galaxy Nexus using XDA Premium 4 mobile app

[GUIDE] How To Add -Apps Edge/Contacts/Task Panel - For Galaxy S5 - UX Port Roms [MM]

Hello Xda Users,
This Guide is for Adding Edge Panels To Latest Samsung UX Based Roms
What's Required:
*Apktool for Decompiling/Recompiling jars
*Notepad++ For Editing Smalis
Steps:
1. Open your " system/etc/floating_feature.xml " with Notepad++
And
Find The Following Code:
Code:
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE></SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE></SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>
REPLACE IT WITH:
Code:
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>[COLOR="DarkGreen"]people,task,circle,panel[/COLOR]</SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>[COLOR="darkgreen"]-1[/COLOR]</SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>
Now you must use ApkTool to decompile/Make Changes to smalis/Recompile
*Use Tickle My Android Apktool or Any other Apktool
2. Now Decompile your " Services.jar "
Find Red Text and Add Green Lines:
LOCATE TO:
smali/com/android/server/SystemServer.smali
Click to expand...
Click to collapse
Open up "SystemServer.smali" with Notepad++
SEARCH FOR:
Code:
[COLOR="Red"]const-string/jumbo v6, "spengestureservice"[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
const-string/jumbo v6, "spengestureservice"
new-instance v7, Lcom/android/server/smartclip/SpenGestureManagerService;
move-object/from16 v0, v218
invoke-direct {v7, v5, v0}, Lcom/android/server/smartclip/SpenGestureManagerService;-><init>(Landroid/content/Context;Lcom/android/server/wm/WindowManagerService;)V
invoke-static {v6, v7}, Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
:try_end_85
.catch Ljava/lang/Throwable; {:try_start_85 .. :try_end_85} :catch_53
:goto_57
const-string v6, "2"
invoke-static {v6}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v192
const/4 v6, 0x2
move/from16 v0, v192
if-lt v0, v6, :cond_32
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.aod.AODManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;
:cond_32
:try_start_86
const-string v6, "SystemServer"
Now add the Green lines:
Code:
const-string/jumbo v6, "spengestureservice"
new-instance v7, Lcom/android/server/smartclip/SpenGestureManagerService;
move-object/from16 v0, v218
invoke-direct {v7, v5, v0}, Lcom/android/server/smartclip/SpenGestureManagerService;-><init>(Landroid/content/Context;Lcom/android/server/wm/WindowManagerService;)V
invoke-static {v6, v7}, Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
:try_end_85
.catch Ljava/lang/Throwable; {:try_start_85 .. :try_end_85} :catch_53
:goto_57
[COLOR="DarkGreen"]move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.cocktailbar.CocktailBarManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;[/COLOR]
const-string v6, "2"
invoke-static {v6}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v192
const/4 v6, 0x2
move/from16 v0, v192
if-lt v0, v6, :cond_32
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.aod.AODManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;
:cond_32
:try_start_86
const-string v6, "SystemServer"
LOCATE TO:
smali/com/android/server/power/PowerManagerService.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"]const-string v8, "SEC_PRODUCT_FEATURE_COMMON_SUPPORT_COCKTAIL_FW: false"[/COLOR]
REPLACE IT WITH:
Code:
[COLOR="darkgreen"]const-string v8, "SEC_PRODUCT_FEATURE_COMMON_SUPPORT_COCKTAIL_FW: true"[/COLOR]
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService$6.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
return-void
.end method
Now Replace the Whole method with this one:
Code:
[COLOR="darkgreen"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->access$3700(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v3
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v4
move-object v1, p1
move-object v2, p2
move v5, p3
move-object v6, p4
move v7, p5
invoke-virtual/range {v0 .. v7}, Lcom/android/server/notification/NotificationManagerService;->enqueueEdgeNotificationInternal(Ljava/lang/String;Ljava/lang/String;IIILandroid/os/Bundle;I)V
return-void
.end method[/COLOR]
In Same Smali
SEARCH FOR:
Code:
[COLOR="Red"].method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 7
return-void
.end method
Now Replace the Whole method with this one:
Code:
[COLOR="darkgreen"].method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 7
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->access$3700(Ljava/lang/String;)V
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v0
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v1
const/4 v3, 0x1
const/4 v4, 0x0
const-string v5, "cancelNotificationWithTag"
move v2, p4
move-object v6, p1
invoke-static/range {v0 .. v6}, Landroid/app/ActivityManager;->handleIncomingUser(IIIZZLjava/lang/String;Ljava/lang/String;)I
move-result p4
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v1
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v2
move-object v3, p1
move v4, p2
move-object v5, p3
move v6, p4
invoke-virtual/range {v0 .. v6}, Lcom/android/server/notification/NotificationManagerService;->removeEdgeNotificationInternal(IILjava/lang/String;ILandroid/os/Bundle;I)V
return-void
.end method[/COLOR]
Done
3. Now Recompile your " services.jar "
4. *Now Decompile your " Framework.jar "
LOCATE TO:
smali/android/app/NotificationManager.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
.locals 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroid/app/NotificationManager;->mContext:Landroid/content/Context;
return-void
.end method
Now add the Green lines:
Code:
.method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
[COLOR="DarkGreen"].locals 4[/COLOR]
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroid/app/NotificationManager;->mContext:Landroid/content/Context;
[COLOR="darkgreen"]new-instance v0, Landroid/app/NotificationManager$EdgeNotificationManager;
invoke-direct {v0, p1}, Landroid/app/NotificationManager$EdgeNotificationManager;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Landroid/app/NotificationManager;->mEdgeNotificationManager:Landroid/app/NotificationManager$EdgeNotificationManager;[/COLOR]
return-void
.end method
LOCATE TO:
smali/android/app/SystemServiceRegistry.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"]const-string/jumbo v1, "multiwindow_facade"[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
const-string/jumbo v1, "multiwindow_facade"
const-class v2, Lcom/samsung/android/multiwindow/MultiWindowFacade;
new-instance v3, Landroid/app/SystemServiceRegistry$83;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$83;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
const-string v1, "2"
invoke-static {v1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v0
const/4 v1, 0x2
if-lt v0, v1, :cond_1
const-string v1, "AODManagerService"
const-class v2, Lcom/samsung/android/aod/AODManager;
new-instance v3, Landroid/app/SystemServiceRegistry$87;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$87;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
:cond_1
const-string/jumbo v1, "spengestureservice"
Now add the Green lines:
Code:
const-string/jumbo v1, "multiwindow_facade"
const-class v2, Lcom/samsung/android/multiwindow/MultiWindowFacade;
new-instance v3, Landroid/app/SystemServiceRegistry$83;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$83;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
[COLOR="darkgreen"]const-string v1, "CocktailBarService"
const-class v2, Lcom/samsung/android/cocktailbar/CocktailBarManager;
new-instance v3, Landroid/app/SystemServiceRegistry$85;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$85;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V[/COLOR]
const-string v1, "2"
invoke-static {v1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v0
const/4 v1, 0x2
if-lt v0, v1, :cond_1
const-string v1, "AODManagerService"
const-class v2, Lcom/samsung/android/aod/AODManager;
new-instance v3, Landroid/app/SystemServiceRegistry$87;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$87;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
:cond_1
const-string/jumbo v1, "spengestureservice"
5. Now Download
The " SystemServiceRegistry$85.smali " and
Add it to " framework.jar\smali\android\app "
Download From Here ->> View attachment SystemServiceRegistry$85.rar
Done
6. Now Recompile your " framework.jar "
7. Download the Attached
System Folder For " Edge Apks, Permissions Xmls "
Add them to correct location into your System Folder
Download From Here ->> https://www.androidfilehost.com/?fid=457095661767134120
Thank you
If Anyone has Access code Error, then only follow this post #2
Then Match the Access Code in the two smalis as below
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService$6.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
See the Red Code, the access code should be same in NotificationManagerService.smali Also
Code:
.method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->[COLOR="Red"][B]access$3700[/B][/COLOR](Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method static synthetic access$3700(Ljava/lang/String;)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
See the Red Code, the access code is same as in NotificationManagerService$6.smali
Code:
.method static synthetic [COLOR="Red"][B]access$3700[/COLOR][/B](Ljava/lang/String;)V
.locals 0
invoke-static {p0}, Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
return-void
.end method
Also make sure that access$3700 access right on NotificationManagerService
Hi mate @yash92duster, do you know how to make the background to blur? really needed... thank's before
Axl_Rush said:
Hi mate @yash92duster, do you know how to make the background to blur? really needed... thank's before
Click to expand...
Click to collapse
What background?
Explain more
Where you needed blur?
yash92duster said:
What background?
Explain more
Where you needed blur?
Click to expand...
Click to collapse
I mean, i want to make this blur. I have change in system/lib/libsurface.so but my phone dont even boot.
Axl_Rush said:
I mean, i want to make this blur. I have change in system/lib/libsurface.so but my phone dont even boot.
Click to expand...
Click to collapse
if you have S5 then that blur lib will work
it works fine on S5 G900F and G900H - no issues
if you tried this mod and blur lib on different device
specify the device model, stock rom or port rom
if you had tried on A Series device then native blur wont work
if J series also in some variants it wont work
so give more info so that i can see if i can help
yash92duster said:
if you have S5 then that blur lib will work
it works fine on S5 G900F and G900H - no issues
if you tried this mod and blur lib on different device
specify the device model, stock rom or port rom
if you had tried on A Series device then native blur wont work
if J series also in some variants it wont work
so give more info so that i can see if i can help
Click to expand...
Click to collapse
Oh I see.. Well ok my friend...
My device is J700F running on stock MM Indonesia firmware
I appreciate for your work and for your help my friend.. thank U
and sorry for my bad english
Axl_Rush said:
Oh I see.. Well ok my friend...
My device is J700F running on stock MM Indonesia firmware
I appreciate for your work and for your help my friend.. thank U
and sorry for my bad english
Click to expand...
Click to collapse
you can try to enable the EDGE PANELS in your J Series Device
but
Blur lib wont work on J series ( Many tried and failed )
only way for you is to use ACER BLUR to edge panels
Check for acer blur in
https://forum.xda-developers.com/showthread.php?t=2799050
https://forum.xda-developers.com/ga...ified-development/devs-helpingd-devs-t3321679
yash92duster said:
you can try to enable the EDGE PANELS in your J Series Device
but
Blur lib wont work on J series ( Many tried and failed )
only way for you is to use ACER BLUR to edge panels
Check for acer blur in
https://forum.xda-developers.com/showthread.php?t=2799050
https://forum.xda-developers.com/ga...ified-development/devs-helpingd-devs-t3321679
Click to expand...
Click to collapse
Ok i will try it.... thank's mate :good::good:
@yash92duster : this method really working on pure stock S5 MM? I tried many times but always FC when swipe... from another guide also..and tried your framework ans services.jar that you share on that guide, but still FC.
maybe something missing on pure stock. If anyone have success on pure stock, please share the framework & service.jar, me and others will greatly appreciate it.
thanks working fine in AJ A8 Rom
@yash92duster
nice guide, very well done. I was wondering if this would work on Nougat 7.X.X too...
I am trying to port that Galaxy Tab A, but when I decompile framework.jar, nothing really...in fact, its framework.jar is only 14kb size..so probably Samsung move that stuff somewhere in Galaxy Tab A...no idea..
jazzespresso said:
@yash92duster
nice guide, very well done. I was wondering if this would work on Nougat 7.X.X too...
I am trying to port that Galaxy Tab A, but when I decompile framework.jar, nothing really...in fact, its framework.jar is only 14kb size..so probably Samsung move that stuff somewhere in Galaxy Tab A...no idea..
Click to expand...
Click to collapse
Bad deodex
Lol
yash92duster said:
Bad deodex
Lol
Click to expand...
Click to collapse
oh crap...yeah saw -- Framework\arm folder is still there...funny though, it deodexed some, but not all...
what deodex utility you use usually?
jazzespresso said:
oh crap...yeah saw -- Framework\arm folder is still there...funny though, it deodexed some, but not all...
what deodex utility you use usually?
Click to expand...
Click to collapse
Use
Assayyed
It works perfectly till 7.0
7.1.1 also works in assayyed but for framework folder alone use flumics tool
yash92duster said:
Use
Assayyed
It works perfectly till 7.0
7.1.1 also works in assayyed but for framework folder alone use flumics tool
Click to expand...
Click to collapse
yeah I used Assayyed cook my ROM, so assumed it deodexed fine, then found out today, it is not...
it seems like, build ROM with Assayyed Kitchen, and switch over to flumics tool to deodex and copy back to Assayyed and finish the build
I got all figured out now..
following your guide up until framework.jar, smali/android/app/SystemServiceRegistry.smali, and search for "multiwindow_facade", which does not find in the file (found all other though) but i added Green lines change in the file anyway...
have not tested yet, we will see if it works:good:
jazzespresso said:
yeah I used Assayyed cook my ROM, so assumed it deodexed fine, then found out today, it is not...
it seems like, build ROM with Assayyed Kitchen, and switch over to flumics tool to deodex and copy back to Assayyed and finish the build
I got all figured out now..
following your guide up until framework.jar, smali/android/app/SystemServiceRegistry.smali, and search for "multiwindow_facade", which does not find in the file (found all other though) but i added Green lines change in the file anyway...
have not tested yet, we will see if it works:good:
Click to expand...
Click to collapse
Better ask in right place
This is not kitchen thread:silly:
yash92duster said:
Better ask in right place
This is not kitchen thread:silly:
Click to expand...
Click to collapse
wasn't really kitchen question, read my post again
Screenshots?

[Devs][Guide] Add Reboot Safestrap Recovery to power menu with toggle

Credits goes to @sagitt67 and @daxgirl .
Credits for toggle goes to @tdunham main guide is here and @asc1977 for the guide here big thanks to them.
In this Guide we'll modify framework-res.apk and services.jar
framework-res.apk:
Download framework-res.zip that is attached below, extract and copy it in your decompiled framework-res.apk folder
now open res/values/arrays.xml
find <string-array name="config_globalActionsList"> and add blue
Code:
<string-array name="config_globalActionsList">
<item>power</item>
<item>datamode</item>
<item>airplane</item>
<item>restart</item>
<item>lockdown</item>
<item>bugreport</item>
<item>users</item>
[COLOR="blue"]<item>rebootsafestrap</item>[/COLOR]
<item>emergencymode</item>
<item>subscreen</item>
</string-array>
now go to res/values/strings.xml at very end and add blue
Code:
<string name="wifi_extender_notification_title">Wi-Fi extender on</string>
<string name="wifi_extender_notification_message">Tap here to set up.</string>
<string name="config_tspstate_threshold" />
[COLOR="blue"]<string name="tw_ic_do_restart_safestrap">Reboot Safestrap</string>[/COLOR]
</resources>
done with framework-res.apk recompile
Services.jar:
download services.zip that is attached below, extract and copy it in your decompiled services.jar folder
open smali/com/android/server/policy/GlobalActions.smali
add blue line in # instance fields
Code:
.field private mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[COLOR="blue"].field private mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[/COLOR]
.field mRestartIconResId:I
find .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog;
add blue
Code:
if-eqz v4, :cond_27b
const v4, 0x1080a58
.line 1642
:goto_11c
const v6, 0x104070e
.line 1639
move-object/from16 v0, p0
invoke-direct {v5, v0, v4, v6}, Lcom/android/server/policy/GlobalActions$21;-><init>(Lcom/android/server/policy/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[COLOR="Blue"]new-instance v4, Lcom/android/server/policy/GlobalActions$99;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "tw_ic_do_restart_safestrap"
const-string v2, "drawable"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v5
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "tw_ic_do_restart_safestrap"
const-string v2, "string"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v6
move-object/from16 v0, p0
invoke-direct {v4, v0, v5, v6}, Lcom/android/server/policy/GlobalActions$99;-><init>(Lcom/android/server/policy/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;[/COLOR]
.line 1688
invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
move-result-object v4
const-string/jumbo v5, "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v4, v5}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
Now next part is tricky, add lines in blue and changes in green
Code:
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
.line 1767
new-instance v4, Lcom/android/server/policy/GlobalActions$BugReportAction;
move-object/from16 v0, p0
invoke-direct {v4, v0}, Lcom/android/server/policy/GlobalActions$BugReportAction;-><init>(Lcom/android/server/policy/GlobalActions;)V
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
[COLOR="blue"]const/16 v6, 0x100
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;[/COLOR]
const/16 v6, [COLOR="Green"]0x200[/COLOR] [COLOR="Red"]#before was 0x100[/COLOR]
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
now search for const-string/jumbo v4, "silent" and add blue line above it and green parts must match orange part
Code:
const-string/jumbo v4, "emergencymode"
invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_381
.line 1835
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mEmergency:Lcom/android/server/policy/GlobalActions$ToggleAction;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :[COLOR="orange"]goto_2d9[/COLOR] #look that green part match this
.line 1836
:cond_381
[COLOR="Blue"]const-string/jumbo v4, "rebootsafestrap"
invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_3da
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :[COLOR="Green"]goto_2d9 [/COLOR]
:cond_3da[/COLOR]
const-string/jumbo v4, "silent"
next part is missing in Android 7 services.jar so we need to readd it for mod
find .method private addCustomDialogItems(Landroid/graphics/drawable/BitmapDrawable;Ljava/lang/String;Landroid/content/Intent;ILjava/util/ArrayListZ
add this above method
Code:
[COLOR="Blue"].method static synthetic access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;
.locals 1
iget-object v0, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
return-object v0
.end method[/COLOR]
thats it, recompile and push to phone
Note: For me one time i get after reboot a loop of phone restarts, only one time happens. If it happen i solved it with wipe dalvik-cache and cache
Credits goes to @TheDriller for this part in this guide
Note: no need to change the code in GlobalActions$99.smali already done
GlobalActions$99.smali:
find .method public onPress()V and replace blue lines with red one
Code:
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
[COLOR="Red"]const-string v1, "recovery"
invoke-virtual {v0, v1}, Landroid/os/PowerManager;->reboot(Ljava/lang/String;)V[/COLOR]
to
Code:
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
[COLOR="Blue"]const-string v1, "su -c echo 1 > /data/.recovery_mode && su -c reboot now"
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;[/COLOR]
Wow thia makes things so much easier
Sent from my SM-G950U using Tapatalk
This is different on the Note 8 isn't it? I got as far as the services jar .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; I input the blue text that was mentioned but I'm curious why in your sample does it not have .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; before the blue text?
The Second batch of code with the green changes I had no idea where to input that and I couldn't find const/16 v6, 0x100 to change to 200 either
The step after that I was genuinely lost nothing matched what you had in your sample I felt like I was so close to getting it.
Thanks
SM-N950W
dillweedinc said:
This is different on the Note 8 isn't it? I got as far as the services jar .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; I input the blue text that was mentioned but I'm curious why in your sample does it not have .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; before the blue text?
The Second batch of code with the green changes I had no idea where to input that and I couldn't find const/16 v6, 0x100 to change to 200 either
The step after that I was genuinely lost nothing matched what you had in your sample I felt like I was so close to getting it.
Thanks
Click to expand...
Click to collapse
I will check them soon.
Maybe @JavixKGD can help you as he asked for the mod and he got it working on Note 8.
It is important to specify that this mod only applies to Nougat, it needs to be updated for Oreo.
I am using Nougat 7.1.1 on a note 8 sm-n950w with me's samfail firmware bl1 - I sent him a message thanks! I see it built into another firmware that is available but id rather build it into me's samfail firmy since there is some issues to be wrinkled out in the other custom firmwares.
This thread is more currently active than the Safestrap one. I'm just here looking for more information on how to flash ROMS while keeping your others. Like do I activate that slot then start flashing and do you know if it's possible to use Slick ROM as one of the slots? I'm rooted with Partcyborg on bootloader v2
xSl33p said:
This thread is more currently active than the Safestrap one. I'm just here looking for more information on how to flash ROMS while keeping your others. Like do I activate that slot then start flashing and do you know if it's possible to use Slick ROM as one of the slots? I'm rooted with Partcyborg on bootloader v2
Click to expand...
Click to collapse
Dont quote me on this but im pretty sure the slots arent 100% functional yet you can do backups and restore your system flash zips ect. , I know this thread is more active but you should really stick with the topic of the thread, your question would get answered there.
I got an answer from the guy you recommended afaneh92 thanks, it looks like I need to place the smalis in a different folder as they go over the limit, I dont have time right now but he also sent me his services .jar so I can see what the difference is I got some learning to do.
Thanks
Canadian Dilly.
dillweedinc said:
Dont quote me on this but im pretty sure the slots arent 100% functional yet you can do backups and restore your system flash zips ect. , I know this thread is more active but you should really stick with the topic of the thread, your question would get answered there.
I got an answer from the guy you recommended afaneh92 thanks, it looks like I need to place the smalis in a different folder as they go over the limit, I dont have time right now but he also sent me his services .jar so I can see what the difference is I got some learning to do.
Thanks
Canadian Dilly.
Click to expand...
Click to collapse
Im working on update and some fixes for the mod, then will rewrite this guide in the Note 8 section.

Categories

Resources