Updated the SuperUser mode .. Click here
Firstly thanks to sagitt67 from 4PDA ( he did it )
I grabbed it and tested and working
Hope this should help all others
Requirements :-
* core-libart.jar
* services.jar
* Apktool/tickle my android
and patience
1. Decompile core-libart.jar
2. open core-libart/smali/java/security/Signature.smali
look for this method
Code:
.method public final verify([B)Z
in that method find this line
Code:
invoke-virtual {p0, p1}, Ljava/security/Signature;->engineVerify([B)Z
[COLOR="Red"]move-result v0[/COLOR]
Replace the red code with this
Code:
const/4 v0, 0x1
now find this method
Code:
.method public final verify([BII)Z
in that method find this line
Code:
invoke-virtual {p0, p1, p2, p3}, Ljava/security/Signature;->engineVerify([BII)Z
[COLOR="red"]move-result v0[/COLOR]
replace the red line with this
Code:
const/4 v0, 0x1
save and close
3. Now open this core-libart/smali/java/security/MessageDigest.smali
find this method
Code:
.method public static isEqual([B[B)Z
.registers 7
[COLOR="red"]const/4 v2, 0x0 [/COLOR]
Change the red line to this
Code:
const/4 v2, 0x1
save and close
Compile it and Replace
and Continued in next post
Continued
Now decompile services.jar
1. open services/smali/com/android/server/accounts/AccountManagerService.smali
Find this method
Code:
.method private isAccountPresentForCaller(Ljava/lang/String;Ljava/lang/String;)Z
look for this lines
Code:
iget-object v4, v0, Landroid/accounts/Account;->name:Ljava/lang/String;
invoke-virtual {v4, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
[COLOR="Red"] move-result v4
if-eqz v4, :cond_2c[/COLOR]
cond_2c may vary with your code
in that 2 lines do the changes like this
Code:
[COLOR="red"]move-result v4 [/COLOR] to const/4 v4, 0x0
if-[COLOR="red"]eqz[/COLOR] v4, :cond_2c to if-[COLOR="Red"]nez[/COLOR] v4, :cond_2c
save and Close
3. Now open this services/smali/com/android/server/pm/PackageManagerService$InstallParams.smali
look for this method
Code:
.method private installLocationPolicy(Landroid/content/pm/PackageInfoLite;)I
find these lines
Code:
iget v8, p0, Lcom/android/server/pm/PackageManagerService$InstallParams;->installFlags:I
:try_end_22
.catchall {:try_start_10 .. :try_end_22} :catchall_5f
[COLOR="red"]and[/COLOR]-int/lit16 v8, v8, 0x80
Change the red to this
Code:
[COLOR="red"]or[/COLOR]-int/lit16 v8, v8, 0x80
save and Close
4. Now open this services/smali/com/android/server/pm/PackageManagerService.smali
in that look for this method
Code:
.method private checkUpgradeKeySetLP(Lcom/android/server/pm/PackageSetting;Landroid/content/pm/PackageParser$Package;)Z
in that look for these lines
Code:
iget-object v4, p2, Landroid/content/pm/PackageParser$Package;->mSigningKeys:Landroid/util/ArraySet;
invoke-virtual {v4, v3}, Landroid/util/ArraySet;->containsAll(Ljava/util/Collection;)Z
[COLOR="red"]move-result v4
if-eqz v4, :cond_20[/COLOR]
cond_20 may be different with your code
Change re lines to these
Code:
[COLOR="red"]move-result v4[/COLOR] to this const/4 v4, 0x0
if-[COLOR="red"]eqz[/COLOR] v4, :cond_20 to this if-[COLOR="red"]nez[/COLOR] v4, :cond_20
Now look for this method
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
and replace with this
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
const/4 v7, 0x0
return v7
.end method
and look for this method
Code:
.method private packageIsBrowser(Ljava/lang/String;I)Z
in that find these lines
Code:
iget-object v4, v4, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;
invoke-virtual {p1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
[COLOR="red"]move-result v4
if-eqz v4, :cond_22[/COLOR]
cond_22 may be different with your code
Change re lines to these
Code:
[COLOR="red"]move-result v4[/COLOR] to this const/4 v4, 0x0
if-[COLOR="red"]eqz[/COLOR] v4, :cond_22 to this if-[COLOR="red"]nez[/COLOR] v4, :cond_22
Now save all and compile
replace both and Reboot
Tada
SuperUserMod Done....
#YourWish for this
Additional for Unlocked Bootloaders click here (complete mod)
Have Fun guys
Dont forget to mention me If you use my work
Thanks alot Buddy, really useful, I've been looking for this on some old thread.
Sent from my E6683 using Tapatalk
@venkat kamesh bro thanks for your tut
i do this but get error in service.jar
after edit , i want to recompile it but get this error:
Code:
Recompiling "services.jar" With Original Signature,
in work area "_WorkArea1", using "apktool_2.2.1.jar"
With Tickle My Android 14.2.0.0.
(tinyurl.com\ticklemyandroid)
----------------
I: Using Apktool 2.2.1
I: Smaling smali folder into classes.dex...
..\_WorkArea1\_working\services.jar\smali\com\android\server\pm\PackageManagerService.smali[7670,4] missing EOF at '.locals'
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/android/server/pm/PackageManagerService.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:77)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:61)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:405)
at brut.androlib.Androlib.buildSources(Androlib.java:336)
at brut.androlib.Androlib.build(Androlib.java:292)
at brut.androlib.Androlib.build(Androlib.java:264)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
----------------
Recompile Not Successful!
how can i solve that?
Hamidreza2010 said:
@venkat kamesh bro thanks for your tut
i do this but get error in service.jar
after edit , i want to recompile it but get this error:
Code:
Recompiling "services.jar" With Original Signature,
in work area "_WorkArea1", using "apktool_2.2.1.jar"
With Tickle My Android 14.2.0.0.
(tinyurl.com\ticklemyandroid)
----------------
I: Using Apktool 2.2.1
I: Smaling smali folder into classes.dex...
..\_WorkArea1\_working\services.jar\smali\com\android\server\pm\PackageManagerService.smali[7670,4] missing EOF at '.locals'
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/android/server/pm/PackageManagerService.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:77)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:61)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:405)
at brut.androlib.Androlib.buildSources(Androlib.java:336)
at brut.androlib.Androlib.build(Androlib.java:292)
at brut.androlib.Androlib.build(Androlib.java:264)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
----------------
Recompile Not Successful!
how can i solve that?
Click to expand...
Click to collapse
bro seems you deleted '.locals'
please recheck it
nothing more
Goodluck bro
what´s the diferencce with the davidMKD´s tutorial disable signature verification http://forum.xda-developers.com/showthread.php?t=2458144
I ve been using this method since kit kat and its working fine, and you only modified slightly services.jar nothing else. cheers
juanpirulo said:
what´s the diferencce with the davidMKD´s tutorial disable signature verification http://forum.xda-developers.com/showthread.php?t=2458144
I ve been using this method since kit kat and its working fine, and you only modified slightly services.jar nothing else. cheers
Click to expand...
Click to collapse
haha well said bro
but structure of signature verification is not same since 4.4 to till date
there are lot of modification in structure and security level of api developed in their best
seems you just seen the services.jar changes hmm
had you looked to core-libart.jar ?
and you just see lines bro ?
why don't you look the code back to java ( i meant from smali to java ) so you can know the changes what i did
read the java imports
https://github.com/frohoff/jdk8u-dev-jdk/tree/master/src/share/classes/java/security
read it get it
i had those changes too
the old guide is just allowing to install temporary ( if you already had old install and data is present)
but not a complete SuperUserMod
just for you to prove ( try only with marshmallow and this guide is from marshmallow )
for example add new settings.apk with new signatures replace it
clear data from recovery and check if your settings are there or not
Before commenting of comparison please go through the google, and try to read what changes are done ( analyze them in java )
then come to thread and give a comment
we are not ready to post something which is already persist/Working
Do tests and get back to here bro
Good luck bro
First, this is not superuser mod, this is three android patches from LuckyPatcher.apk
First two makes your phone very vulnerable, because you makes signature verification always true and disable .apk signature verification. (core-libart.jar)
Superusermod is just
Code:
comparesignatures
const/4 v7, 0x0
bla bla
All other just give you access for downgrade your installed apk (services.jar)
I think you must add this info (about core-libart.jar) to first post. Thanks.
Did it.all good!
Thanks bro!
@venkat kamesh bro is this need to do after these steps?
http://forum.xda-developers.com/showpost.php?p=68965462&postcount=1264
i mean we should to do it or steps of this page is enough ? ( i have unlocked bootloader )
venkat kamesh said:
haha well said bro
but structure of signature verification is not same since 4.4 to till date
there are lot of modification in structure and security level of api developed in their best
seems you just seen the services.jar changes hmm
had you looked to core-libart.jar ?
and you just see lines bro ?
why don't you look the code back to java ( i meant from smali to java ) so you can know the changes what i did
read the java imports
https://github.com/frohoff/jdk8u-dev-jdk/tree/master/src/share/classes/java/security
read it get it
i had those changes too
the old guide is just allowing to install temporary ( if you already had old install and data is present)
but not a complete SuperUserMod
just for you to prove ( try only with marshmallow and this guide is from marshmallow )
for example add new settings.apk with new signatures replace it
clear data from recovery and check if your settings are there or not
Before commenting of comparison please go through the google, and try to read what changes are done ( analyze them in java )
then come to thread and give a comment
we are not ready to post something which is already persist/Working
Do tests and get back to here bro
Good luck bro
Click to expand...
Click to collapse
sorry bro when i said "you just modified slightly the services.jar" I didnt meant yourself i meant in the david tutorial no your tutorial. i just wanted your explanation about yours because i didnt know the difference. Now its ok
juanpirulo said:
sorry bro when i said "you just modified slightly the services.jar" I didnt meant yourself i meant in the david tutorial no your tutorial. i just wanted your explanation about yours because i didnt know the difference. Now its ok
Click to expand...
Click to collapse
haha no worries bro
happy to explain
Good luck bro
Hamidreza2010 said:
@venkat kamesh bro is this need to do after these steps?
http://forum.xda-developers.com/showpost.php?p=68965462&postcount=1264
i mean we should to do it or steps of this page is enough ? ( i have unlocked bootloader )
i need to do both of them?
Click to expand...
Click to collapse
@venkat kamesh would you please clear me here?
thanks bro
As always venkat kamesh! Great guide bro!
venkat kamesh said:
haha no worries bro
happy to explain
Good luck bro
Click to expand...
Click to collapse
i dont know why Xperia M4 Services.jar and other file not have Smali Folder
Hello! Does this work on stock marshmallow .291 for sony devices? Also, does this work on locked bootloaders? Great tutorial BTW!
Can I do this if my services.jar is from another systemUI. I have a z3c and I flashed Xperia X sysui and it replaced my stock systemUi and services.jar
thank you bro
but after edit
any app not installed.
russel5 said:
First, this is not superuser mod, this is three android patches from LuckyPatcher.apk
First two makes your phone very vulnerable, because you makes signature verification always true and disable .apk signature verification. (core-libart.jar)
Superusermod is just
Code:
comparesignatures
const/4 v7, 0x0
bla bla
All other just give you access for downgrade your installed apk (services.jar)
I think you must add this info (about core-libart.jar) to first post. Thanks.
Click to expand...
Click to collapse
@russel5,
I am not familiar with how to decompile services.jar, and I am not sure I understand what this is. Do you know of any more basic of a guide on services.jar, deodexing and what it achieves?
Thanks a lot in advance,
MW
I have been served this guide to enable superuser mod in my xperia x
music widget particles requires superuser mod but my xperia x has it
Related
Here is manual, how to make CRT-OFF mod without glitches on JB.
Originally, it has been released in my UNIROM ROM in 4PDA.ru community.
Here is the guide. Instruction is based on I9300XXDLIB, but it's easy to adjust it to other ROMS.
To make CRT-OFF working, you need to decompile services.jar.
in file com\android\server\PowerManagerService$ScreenBrightnessAnimator.smali
find following code and modify it according to red colored part:
Code:
.line 2906
.end local v0 #delta:I
:cond_1
:goto_1
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
[COLOR=Red] if-eqz p2, :cond_2xx
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_2xx
[/COLOR] const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
Black color is original code, you need to find.
Effect will start to work, but u will notice glitch: if you turn on screen by power button and then put it to sleep again by button without unlocking then phone will wake up just after CRT effect finishes.
Here is workaround part.
decompile android.policy.jar.
in file com\android\internal\policy\impl\PhoneWindowManager.smali
Find following parts (black is original code) and modify according to red text:
Code:
.class public Lcom/android/internal/policy/impl/PhoneWindowManager;
.super Ljava/lang/Object;
.source "PhoneWindowManager.java"
# interfaces
.implements Landroid/view/WindowManagerPolicy;
[COLOR=Red].implements Ljava/lang/Runnable;[/COLOR]
# annotations
Code:
.line 5411
.end local v9 #isAllowed:Z
.end local v16 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_1
:goto_2
[COLOR=Red] and-int/lit8 v0, v19, 0x4
if-eqz v0, :cond_2xx
and-int/lit8 v19, v19, -0x5
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sleepDelay()V
:cond_2xx
[/COLOR] return v19
at the end of file add following code:
Code:
[COLOR=Red].method public sleepDelay()V
.locals 10
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
const-wide v2, 0x64
check-cast p0, Ljava/lang/Runnable;
invoke-virtual {v0, p0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method public run()V
.locals 10
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v1, "power"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
const-wide/16 v6, 0x3e8
add-long/2addr v2, v6
invoke-virtual {v0, v2, v3}, Landroid/os/PowerManager;->goToSleep(J)V
return-void
.end method
[/COLOR]
That's all.
My method doesn't require patches for libsurfaceflinger.so library.
P.S.: I didn't put much effort to investigate of possibility for CRT-ON effect. I'm not sure if this effect is even compiled inside stock libsurfaceflinger.so. I'm happy that i could achieve fully working CRT-OFF without patching library. I remember how much time i've spent to patch libsurfaceflinger.so for I9100 ICS ROM against flicker, so it's real deal breaker for me to go through reversing and patching of .so file again.
I've attached mod for XXDLIB version.
Install in CWM recovery to DEODEXED ROM.
This is for stock deodexed I9300XXDLIB ROM. If you use any custom made ROM and there are some additional modifications in android.policy.jar or services.jar then you will loose all those mods.
I have neither time no ability to make flashable zips for other ROMs. I cannot download every ROM, integrate this mod and test. So, ask custom ROMs authors to integrate it into their ROMs by themself.
you may post the whole thing, already ready to be flashed? you'll be very grateful
I can post mod for XXDLIB version, but if you have other mods integrated in these framework files, you will loose them.
sorg said:
I can post mod for XXDLIB version, but if you have other mods integrated in these framework files, you will loose them.
Click to expand...
Click to collapse
would be good for me, I use the WanamLite XXDLIB V3.8.
How did you decompile services.jar? I'd be happy with a link too, but I'd also like to know how to decompile jars
Kryten2k35 said:
How did you decompile services.jar? I'd be happy with a link too, but I'd also like to know how to decompile jars
Click to expand...
Click to collapse
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
Anybody try?? Work without this issue??
Works perfect on Wanam 3.7!
please is possible have this for odex stock rom dlib?? thanks for reply
sorg said:
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
work perfect..always on Wanam 3.7..thank you :good:
Just put this into my rom...works perfect, thanks for the guide
Sorgen, dass could you please provide a zip version in first post with included 4-way-reboot? Just recognized that it's gone with your mod because of the changed files.
Thanks m8!
sent with Samsungs unleashed beast using Tapatalk 2
hi Sorg, sorry for double request, is possible have this for odex rom DILB root? thanks for reply
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
I know what I'm doing, I just haven't found any reliable tools to decompile jar's
Kryten2k35 said:
I know what I'm doing, I just haven't found any reliable tools to decompile jar's
Click to expand...
Click to collapse
a) you can rename jar to apk and use your favorite tool
b) apktool works fine with jars as well
c) use baksmali/smali tools
sorg said:
a) you can rename jar to apk and use your favorite tool
b) apktool works fine with jars as well
c) use baksmali/smali tools
Click to expand...
Click to collapse
Thanks. Last source I read suggested AndroidChef, which didn't work at all. I'll use apktool first and see how that goes.
uberto.costanzo said:
hi Sorg, sorry for double request, is possible have this for odex rom DILB root? thanks for reply
Click to expand...
Click to collapse
i can upload mods for ROMs i'm using. I'm using deodexed ROM. Since i often change something in ROM, deodexed version is the one suitable for me.
If you like to use mods, install stock deodexed ROM and you will have more freedom to install many different mods and hacks.
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Kryten2k35 said:
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Click to expand...
Click to collapse
Man, 10 mins faster than me
Great work as always!
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
=-O Kryten is a matter chef
---------- Post added at 11:28 PM ---------- Previous post was at 11:26 PM ----------
Kryten2k35 said:
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Click to expand...
Click to collapse
Just flash from recovery for Ultima 2.4?
Hi to all! In this guide I explain how to port the kitkat platlogo activity from S5 resource to S2.
Requirements:
- use apktool, backsmali and smali tool;
- notepad++;
- framework-res.apk;
- framework.jar and framework2.jar;
- patience and brain.
1)First decompile framework-res.apk with apktool and download attach file.
Extract the drawable-nodpi folder from the archive and insert and replace the platlogo.png in the res/drawable-nodpi folder of the framework-res.
Recompile and sign the framework-res.
For sign the framework insert in the build/apk folder the original meta-inf folder and AndroidManifest.xml from the original framework-res.apk.
2)Then, decompile framework.jar with backsmali tool (1.bat)
Extract the smali folder from the archive and insert the file in com/android/internal/app.
After insert the file, open the PlatlogoActivity and search this:
Code:
const v0, [COLOR="Red"]0x10805b8[/COLOR]
Open the public.xml from res/values folder of the framework-res and search:
Code:
type="drawable" name="platlogo"
Now replace the red line with the public id of platlogo image.
At the end recompile the framework.jar with smali tool (2.bat)
3)Decompile framework2.jar with backsmali tool (1.bat)
Go to android/widget/ and open FrameLayout$LayoutParams.smali
Insert this method at the end of the file.
Code:
.method public constructor <init>(Landroid/widget/FrameLayout$LayoutParams;)V
.locals 1
.parameter "source"
.prologue
.line 667
invoke-direct {p0, p1}, Landroid/view/ViewGroup$MarginLayoutParams;-><init>(Landroid/view/ViewGroup$MarginLayoutParams;)V
.line 609
const/4 v0, -0x1
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 669
iget v0, p1, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 670
return-void
.end method
Now recompile with smali tool (2.bat).
Insert the framework-res.apk, framework.jar and framework2.jar in the installer that I attached. Insert in system/framework folder.
That is all
Thanks for this guide and for all the other.
Awesome Guide.
THANKS AND RATED 5*
Thanks for this guide
@gerryS2,
Hey mate, thanks to your guide I finally got what I wanted. But could you please tell me how to replace replace the "J" with a "K".. thanks in advance
Sami Kabir said:
@gerryS2,
Hey mate, thanks to your guide I finally got what I wanted. But could you please tell me how to replace replace the "J" with a "K".. thanks in advance
Click to expand...
Click to collapse
maybe this thread can help you
http://forum.xda-developers.com/showthread.php?t=2580249
thanks
Troubadour666 said:
maybe this thread can help you
http://forum.xda-developers.com/showthread.php?t=2580249
thanks
Click to expand...
Click to collapse
Thanks mate, but I am already aware of that thread. I would have continued with that thread but instead I went with this one because it didn't require any additional app to be installed
I will go through the smali codes once more to find this "J" and replace it with a "K"...
Sami Kabir said:
Thanks mate, but I am already aware of that thread. I would have continued with that thread but instead I went with this one because it didn't require any additional app to be installed
I will go through the smali codes once more to find this "J" and replace it with a "K"...
Click to expand...
Click to collapse
post 2 of the thread :
const-string v0, "K"
Troubadour666 said:
post 2 of the thread :
const-string v0, "K"
Click to expand...
Click to collapse
My PlatLogoActivity.smali doesn't contain any const-string v0, "K".. the closest thing I found is const-string v1, "Android "
in AICP rom, all things are in framework2.jar .
gerryS2 said:
Hi to all! In this guide I explain how to port the kitkat platlogo activity from S5 resource to S2.
Requirements:
- use apktool, backsmali and smali tool;
- notepad++;
- framework-res.apk;
- framework.jar and framework2.jar;
- patience and brain.
1)First decompile framework-res.apk with apktool and download attach file.
Extract the drawable-nodpi folder from the archive and insert and replace the platlogo.png in the res/drawable-nodpi folder of the framework-res.
Recompile and sign the framework-res.
For sign the framework insert in the build/apk folder the original meta-inf folder and AndroidManifest.xml from the original framework-res.apk.
2)Then, decompile framework.jar with backsmali tool (1.bat)
Extract the smali folder from the archive and insert the file in com/android/internal/app.
After insert the file, open the PlatlogoActivity and search this:
Code:
const v0, [COLOR="Red"]0x10805b8[/COLOR]
Open the public.xml from res/values folder of the framework-res and search:
Code:
type="drawable" name="platlogo"
Now replace the red line with the public id of platlogo image.
At the end recompile the framework.jar with smali tool (2.bat)
3)Decompile framework2.jar with backsmali tool (1.bat)
Go to android/widget/ and open FrameLayout$LayoutParams.smali
Insert this method at the end of the file.
Code:
.method public constructor <init>(Landroid/widget/FrameLayout$LayoutParams;)V
.locals 1
.parameter "source"
.prologue
.line 667
invoke-direct {p0, p1}, Landroid/view/ViewGroup$MarginLayoutParams;-><init>(Landroid/view/ViewGroup$MarginLayoutParams;)V
.line 609
const/4 v0, -0x1
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 669
iget v0, p1, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 670
return-void
.end method
Now recompile with smali tool (2.bat).
Insert the framework-res.apk, framework.jar and framework2.jar in the installer that I attached. Insert in system/framework folder.
That is all
Click to expand...
Click to collapse
will it work on galaxy s advance with stock 4.1.2
psycho_boy52 said:
will it work on galaxy s advance with stock 4.1.2
Click to expand...
Click to collapse
Yes it will. I did it
gerryS2 said:
Hi to all! In this guide I explain how to port the kitkat platlogo activity from S5 resource to S2.
Requirements:
- use apktool, backsmali and smali tool;
- notepad++;
- framework-res.apk;
- framework.jar and framework2.jar;
- patience and brain.
1)First decompile framework-res.apk with apktool and download attach file.
Extract the drawable-nodpi folder from the archive and insert and replace the platlogo.png in the res/drawable-nodpi folder of the framework-res.
Recompile and sign the framework-res.
For sign the framework insert in the build/apk folder the original meta-inf folder and AndroidManifest.xml from the original framework-res.apk.
2)Then, decompile framework.jar with backsmali tool (1.bat)
Extract the smali folder from the archive and insert the file in com/android/internal/app.
After insert the file, open the PlatlogoActivity and search this:
Code:
const v0, [COLOR="Red"]0x10805b8[/COLOR]
Open the public.xml from res/values folder of the framework-res and search:
Code:
type="drawable" name="platlogo"
Now replace the red line with the public id of platlogo image.
At the end recompile the framework.jar with smali tool (2.bat)
3)Decompile framework2.jar with backsmali tool (1.bat)
Go to android/widget/ and open FrameLayout$LayoutParams.smali
Insert this method at the end of the file.
Code:
.method public constructor <init>(Landroid/widget/FrameLayout$LayoutParams;)V
.locals 1
.parameter "source"
.prologue
.line 667
invoke-direct {p0, p1}, Landroid/view/ViewGroup$MarginLayoutParams;-><init>(Landroid/view/ViewGroup$MarginLayoutParams;)V
.line 609
const/4 v0, -0x1
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 669
iget v0, p1, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
iput v0, p0, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 670
return-void
.end method
Now recompile with smali tool (2.bat).
Insert the framework-res.apk, framework.jar and framework2.jar in the installer that I attached. Insert in system/framework folder.
That is all
Click to expand...
Click to collapse
Sami Kabir said:
Yes it will. I did it
Click to expand...
Click to collapse
bro can u plz upload those framework.jar n freamework2.jar cz those baksmali n smali tool r not workin on my pc....
psycho_boy52 said:
bro can u plz upload those framework.jar n framework2.jar cz those baksmali n smali tool r not workin on my pc....
Click to expand...
Click to collapse
Okay. But it might contain some other mods because they are from my ROM.. The zip is not flashable, extract it and place the files to their respective location.
Link: https://www.mediafire.com/?q5e9jnfvuapu73j
PS: I have a feeling that this might not work for you, if it doesn't then please tell me asap
Sami Kabir said:
Okay. But it might contain some other mods because they are from my ROM.. The zip is not flashable, extract it and place the files to their respective location.
Link: https://www.mediafire.com/?q5e9jnfvuapu73j
PS: I have a feeling that this might not work for you, if it doesn't then please tell me asap
Click to expand...
Click to collapse
thnx bro lets try!!!... btw dont u use stock jb on ur i9070???
psycho_boy52 said:
thnx bro lets try!!!... btw dont u use stock jb on ur i9070???
Click to expand...
Click to collapse
I use my ROM. Which is based on stock firmware
Sami Kabir said:
Okay. But it might contain some other mods because they are from my ROM.. The zip is not flashable, extract it and place the files to their respective location.
Link: https://www.mediafire.com/?q5e9jnfvuapu73j
PS: I have a feeling that this might not work for you, if it doesn't then please tell me asap
Click to expand...
Click to collapse
wow!!!.... its working bt cnt we write jb instade of j
psycho_boy52 said:
wow!!!.... its working bt cnt we write jb instade of j
Click to expand...
Click to collapse
You should ask that to the creator of this thread, not me (because even I don't know how to change this letter to some other letter)
Sami Kabir said:
You should ask that to the creator of this thread, not me (because even I don't know how to change this letter to some other letter)
Click to expand...
Click to collapse
anyways !!! thnx a lot bro for helping me
bt buddy dere is a problm wid dis mod... its not cumming lyk d 2nd scrnsht.... how to fix it
This guide was written based on the Sprint Samsung Galaxy S3 ND8 KitKat stock ROM but with the proper modifications may work for other KitKat ROMs. Please don't ask me to modify this to work with ROM xyz or to compile this for you into a ROM. I won't do it.
Background Info
This guide is based on work orignally written by havocgb here. His code was written for the Sony Xperia Mini and had to be somewhat modified for use on our phones so make sure to drop a thank you over in that thread.
Requirements
apktool 2.0 beta 9 and the knowledge of how to use it. There are various guides on how to use apktool on XDA. Find one and read it. Make sure to read the information on the apktool site as well since some of the options in 2.0 may be different from the guides you find.
A text editor that supports Unix-style text files. I recommend Notepad++.
Files
You'll be working with SystemUI.apk
SystemUI.apk
Decompile SystemUI.apk using apktool.
Open smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali in your preferred text editor.
Find # instance fields and add .field private mTouchRight:Z on a new line somewhere before # direct methods.
Find # virtual methods and add the following methods ABOVE it:
Code:
.method private interceptOneFingerStatusBarRightTap(Landroid/view/MotionEvent;)V
.locals 4
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
if-nez v1, :cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisplay:Landroid/view/Display;
invoke-virtual {v0}, Landroid/view/Display;->getRotation()I
move-result v1
const v0, 0x1
if-eq v0, v1, :cond_2
const v0, 0x3
if-eq v0, v1, :cond_2
const/high16 v1, 0x44070000
:goto_0
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v0
cmpl-float v0, v0, v1
if-ltz v0, :cond_0
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
goto :goto_1
:cond_0
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
:cond_1
:goto_1
return-void
:cond_2
const/high16 v1, 0x44480000
goto :goto_0
.end method
.method private oneFingerStatusBarRightTapFlipToQuickPanel()V
.locals 1
.prologue
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
if-eqz v0, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->flipToSettings()V
:goto_0
return-void
:cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->flipToNotifications()V
goto :goto_0
.end method
Take note that the line const/high16 v1, 0x44070000 is a floating-point hexadecimal value that controls the starting point of the quick pulldown zone in pixels when in portrait orientation (in this case, the start point is set at approximately 540 pixels from the left side of the status bar) while the line const/high16 v1, 0x44480000 controls the start point of the pulldown zone when in landscape orientation (this value is approximately 800 pixels from the left side of the status bar). For larger screens or to change the size of the drag zone, you'll want to re-calculate these using a floating-point to hexadecimal conversion.
Locate the portion of code that looks like the following:
Code:
.method public flipToNotifications()V
.locals 10
.prologue
const/high16 v9, 0x3f800000
const/4 v8, 0x0
const-wide/16 v6, 0xc8
const/4 v5, 0x1
const/4 v4, 0x0
On a new line under const/4 v4, 0x0, add iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
Locate the portion of code that looks like the following:
Code:
.method public flipToSettings()V
.locals 11
.prologue
const-wide/16 v9, 0x15e
const/4 v8, 0x4
const/4 v7, 0x1
const/4 v6, 0x0
const/4 v5, 0x0
On a new line under const/4 v5, 0x0, add iput-boolean v7, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
Locate the section of code that looks like the following:
Code:
.method public interceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 5
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
const/4 v1, 0x0
const/4 v2, 0x1
.line 2973
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindowState:I
if-nez v3, :cond_1
.line 2974
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
On a newline above ABOVE the line invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I, add invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptOneFingerStatusBarRightTap(Landroid/view/MotionEventV
Locate the method .method public updateExpandedViewPos(I)V and locate the line return-void inside of the method. On a new line above return-void, add invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->oneFingerStatusBarRightTapFlipToQuickPanel()V.
Save the file and recompile SystemUI using apktool. Don't forget to re-sign the APK (either use an APK signer if you have a ROM that has 3rd-party system app signatures enabled or copy the AndroidManifest.xml file and META-INF folder from the original to the new APK).
Install to your phone using your preferred method. You should already know this but I'll say it anyway, THIS CANNOT BE INSTALLED LIKE NORMAL SIDE-LOADED APKs. I prefer to reboot to recovery and use ADB to push the file to the system, but you can use whatever method is easiest for you (ie. Aroma file manager, flashable zip, etc.).
Thanks for this. I plan on adding this to Tribute in the near future.
I need help please. I'm having error " [5048,15] no viable alternative at input 'p1' " whenever I compile SystemUI.apk. I'm trying to apply this mod on my N8000. Thanks in advance!
filchi756 said:
I need help please. I'm having error " [5048,15] no viable alternative at input 'p1' " whenever I compile SystemUI.apk. I'm trying to apply this mod on my N8000. Thanks in advance!
Click to expand...
Click to collapse
Try using apktool 2.
Thank you for releasing this guide. Looking forward to adding this to my rom.
talkingmonkeys said:
Try using apktool 2.
Thank you for releasing this guide. Looking forward to adding this to my rom.
Click to expand...
Click to collapse
Ok thanks for the suggestion. I will try that.
Need help please .I manage to solve my problem about compiling but when I install it I'm having systemUI stop(foreclose) message. If you have time if possible please help me check my Phonestatusbar.smali ,in what part did I do wrong I've attach my PhoneStatusBar.smali below. Hope you can help me.Thanks in advance.
filchi756 said:
Need help please .I manage to solve my problem about compiling but when I install it I'm having systemUI stop(foreclose) message. If you have time if possible please help me check my Phonestatusbar.smali ,in what part did I do wrong I've attach my PhoneStatusBar.smali below. Hope you can help me.Thanks in advance.
Click to expand...
Click to collapse
Would need to see a logcat. If you don't know how to pull one and post it here, however, I'd say you're not ready to start implementing mods.
moonknightus said:
Would need to see a logcat. If you don't know how to pull one and post it here, however, I'd say you're not ready to start implementing mods.
Click to expand...
Click to collapse
Ok I will post a logcat when I have access to pc. Yeah I think I'm not ready yet for this kind of mods.But I have some little experience in implementing mods in Jellybean before though(by following others guide too), but having a hardtime with kitkat at the moment. By the way any chance you can share me your phonestatusbar.smali or even the SystemUI.apk with you mod included so I can compare it with mine? I think it not necessary to download the whole rom if I just need one apk and beside I don't have S3. And I have a crappy internet connection. Hope you understand.Thanks!
filchi756 said:
Ok I will post a logcat when I have access to pc. Yeah I think I'm not ready yet for this kind of mods.I have some experience in implementing mods in Jellybean before though(by following others guide too), but having a hardtime with kitkatat the moment. By the way any chance you can share me your phonestatusbar.smali or even the SystemUI.apk with you mod included so I can compare it with mine? I think it not necessary to download the whole rom if I just need one apk and beside I don't have S3. And I have a crappy internet connection. Hope you understand.Thanks!
Click to expand...
Click to collapse
Nope. My ROM has multiple mods so the smali and apk will not help you. Not to mention, my phone is a Galaxy S3.
moonknightus said:
Nope. My ROM has multiple mods so the smali and apk will not help you. Not to mention, my phone is a Galaxy S3.
Click to expand...
Click to collapse
Ok thanks.I'll wait for someone's else help, who implemented this mod of your's and with clear instruction I'm capable of understanding(like the guide of havocgb, it has before and after).Your mod is just new that's means just few people implemented it yet in their rom at the moment.When time come's there will surely be someone out there who will write a clear guide which we amateur's will understand. Thanks again for this guide anyway. Cheers mate!
P.S. I think even we have different gadget as long as they are the same brand(like Samsung) .I think there are a lot of similarities on their content. I successfully made mods for my tablet using guides from Note 2014 and Note pro before by the way .
filchi756 said:
Ok thanks.I'll wait for someone's else help, who implemented this mod of your's and with clear instruction I'm capable of understanding.Your mod is just new that's means just few people implemented it yet in their rom at the moment.When time come's there will surely be someone out there who will write a clear guide which we amateur's will understand. Thanks again for this guide anyway. Cheers mate!
P.S. I think even we have different gadget as long as they are the same brand(like Samsung) .I think there are a lot of similarities on their content. I successfully made mods for my tablet using guides from Note 2014 and Note pro before by the way .
Click to expand...
Click to collapse
There's nothing new about this mod. Was originally written for an Xperia phone by havocgb in March 2013. This is clearly stated in the op. If you are incapable of following instructions, modifying the code to fit your device, and debugging your own code, that is not my fault. FYI, others have already successfully implemented this mod. At least one was on a note device.
moonknightus said:
There's nothing new about this mod. Was originally written for an Xperia phone by havocgb in March 2013. This is clearly stated in the op. If you are incapable of following instructions, modifying the code to fit your device, and debugging your own code, that is not my fault. FYI, others have already successfully implemented this mod. At least one was on a note device.
Click to expand...
Click to collapse
Ok. I'll look for that who implemented it on note(If I get lucky).I'm just looking for a quick solution for this cause I really want to implement this to my gadgets. Thankfully you did not suggest "google is your friend" thing to find solution for your problem.I can't access google, its block in my location(China).Thanks again for the guide.Anyway Cool! peace mate!
filchi756 said:
Ok. I'll look for that who implemented it on note(If I get lucky).I'm just looking for a quick solution for this cause I really want to implement this to my gadgets. Thankfully you did not suggest "google is your friend" thing to find solution for your problem.I can't access google, its block in my location(China).Thanks again for the guide.Anyway Cool! peace mate!
Click to expand...
Click to collapse
There's always Baidu. If I run across the PM, I'll shoot the guy's name over to you. I may have deleted it
moonknightus said:
There's always Baidu. If I run across the PM, I'll shoot the guy's name over to you. I may have deleted it
Click to expand...
Click to collapse
Ok thanks mate .That will be great:good:! If I use baidu in China the results are only from China and in chinese(I don't understand Chinese). I tried it before in Hongkong the results are international and in English.Hope you understand what I meant mate.
P.S. I'm trying your other mod here: http://forum.xda-developers.com/gal...t/mod-enable-heads-notifications-nd8-t2873109 .Lets see if I can implement it successfully:fingers-crossed:.
bro. screenshots show the work of this tutorial..
Sorry for my bad english
please upload the screenshot
Hello guys
Happy new Year for first
This is my first tut in This new year 2016
All you need is Deodexed SystemUI.apk and Settings.apk
1. Decompile SystemUI.apk
2. Open SystemUI.apk/smali/com/android/systemui/qs/QSPanel.smali
3. Find this code
Code:
.field private mBrightnessPaddingTop:I
Below that add this code
Code:
.field private mBrightnessSliderEnabled:Z
4. Search for this Method
Code:
.method private setDetailRecord(Lcom/android/systemui/qs/QSPanel$Record;)V
and above that method add this complete method
Code:
.method private isBrightnessSliderEnabled()I
.locals 4
const/4 v3, 0x0
iget-object v0, p0, Lcom/android/systemui/qs/QSPanel;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "brightness_slider_show"
const/4 v2, 0x1
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_0
const/4 v3, 0x1
:cond_0
iput-boolean v3, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessSliderEnabled:Z
return v3
.end method
5. Search for this method
Code:
.method private showDetail(ZLcom/android/systemui/qs/QSPanel$Record;)V
Above that method, add this method
Code:
.method private showBrightnessSlider()Z
.locals 5
const/16 v3, 0x8
const/4 v2, 0x0
const v1, 0x7f10012e
invoke-direct {p0}, Lcom/android/systemui/qs/QSPanel;->isBrightnessSliderEnabled()I
move-result v4
invoke-virtual {p0, v1}, Lcom/android/systemui/qs/QSPanel;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/settings/ToggleSlider;
if-eqz v4, :cond_0
iget-boolean v1, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessSliderEnabled:Z
if-eqz v1, :cond_0
iget-object v1, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessView:Landroid/view/View;
invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v0, v2}, Lcom/android/systemui/settings/ToggleSlider;->setVisibility(I)V
:goto_0
invoke-virtual {p0}, Lcom/android/systemui/qs/QSPanel;->updateResources()V
iget-boolean v1, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessSliderEnabled:Z
return v1
:cond_0
iget-object v1, p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessView:Landroid/view/View;
invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v0, v3}, Lcom/android/systemui/settings/ToggleSlider;->setVisibility(I)V
goto :goto_0
.end method
6. Now Look for this Code
Code:
if-eqz p1, :[COLOR="red"]cond_3[/COLOR]
.line 216
iget-object [COLOR="Red"]v2[/COLOR], p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessController:Lcom/android/systemui/settings/BrightnessController;
Add the code above the .line 216 ( this .line 216 will not be same with all devices )
Code:
invoke-direct {p0}, Lcom/android/systemui/qs/QSPanel;->showBrightnessSlider()Z
move-result [COLOR="red"]v2[/COLOR]
if-eqz [COLOR="red"]v2[/COLOR], :[COLOR="red"]cond_3[/COLOR]
Finally it looks like
Code:
if-eqz p1, [COLOR="blue"]:cond_3[/COLOR]
[COLOR="Red"] invoke-direct {p0}, Lcom/android/systemui/qs/QSPanel;->showBrightnessSlider()Z
move-result [COLOR="blue"]v2[/COLOR]
if-eqz [COLOR="blue"]v2[/COLOR], [COLOR="blue"]:cond_3[/COLOR][/COLOR]
.line 216
iget-object [COLOR="Blue"]v2[/COLOR], p0, Lcom/android/systemui/qs/QSPanel;->mBrightnessController:Lcom/android/systemui/settings/BrightnessController;
After adding that
replace this Public id
<public type="id" name="brightness_slider" id="0x7f10012e" />
6. Now compile the SystemUI.apk and sign it and replace
Now time to add in the settings look for post #2
adding to Settings
Welcome to easy part on adding the option to hide/show in settings
Method 1
1. Decompile the settings.apk
2. Download this View attachment Slider_Settings.zip and merge to your settings
3. Add the below code to your settings ( i had added to my own settings ) and your wish
Code:
<PreferenceScreen android:title="Statusbar Mod" android:key="statusmod" android:fragment="com.android.settings.rz.Statusmod" />
4. Compile it and Decompile and open
Settings.apk/smali/com/android/settings/rz/Statusmod.smali
5. Compare the Public ID and replace it and recompile
6. God you did man,,, now replace and have fun
Method 2
1. Decompile the Settings.apk
2. Download this View attachment settings.zip and merge to your settings
3. Add the below code to your settings ( i had added to my own settings.xml )
you can add in settings.apk/res/xml/Dispaly_settings.xml
HTML:
<com.android.settings.cyanogenmod.SystemSettingSwitchPreference android:title="Brightness Slider" android:key="brightness_slider_show" android:defaultValue="0" android:summaryOn="Brightness Slider Shown" android:summaryOff="Brightness Slider Hidden" />
and then compile/sign and replace your settings
OR
Try download this ROM Control application (View attachment app-release.apk ) where you can Easily control
All you is just install and have fun
Thanks to @daxgirl for the app source
now have fun guys
Thanks to cyanogenmod
Dont Forget to mention me if you used my work
that feels me happy
hello venkat ,
I 've implemented a tutor in, but why every time I switch Brightness Hide its always off if i back from settings..
Can you help me to fix it ???
aNgga - Fe Hung said:
hello venkat ,
I 've implemented a tutor in, but why every time I switch Brightness Hide its always off if i back from settings..
Can you help me to fix it ???
Click to expand...
Click to collapse
thanks for identifying this ( even it works the switch turns off)
i had forgot to define the return value of switch
now its fixed
just replace the settings.zip
and everything will be ok
venkat kamesh said:
thanks for identifying this ( even it works the switch turns off)
i had forgot to define the return value of switch
now its fixed
just replace the settings.zip
and everything will be ok
Click to expand...
Click to collapse
still the same as before ny : ' (
Can you help me bro ??
aNgga - Fe Hung said:
still the same as before ny : ' (
Can you help me bro ??
Click to expand...
Click to collapse
Impossible bro
Try from first if in case
I had tested and many of my team too got it working
venkat kamesh said:
Impossible bro
Try from first if in case
I had tested and many of my team too got it working
Click to expand...
Click to collapse
I try with ur new settings smali and still don't working the switch when I enable and then return to desactivate the switch is unable and don't hide the brightness bar
Bro i think that I found the problem I compare the two smali that u update on the hide show album art and this and are the same maybe u forgot to upload the new
raziel zarafan said:
I try with ur new settings smali and still don't working the switch when I enable and then return to desactivate the switch is unable and don't hide the brightness bar
Click to expand...
Click to collapse
raziel zarafan said:
Bro i think that I found the problem I compare the two smali that u update on the hide show album art and this and are the same maybe u forgot to upload the new
Click to expand...
Click to collapse
No way bro
I had updated both of same file
Tested Moor than enough
If not go through my setting bro
Bin thanks for your tut ! Can you do some tuto with navbar tuning ? Appreciate it
Envoyé de mon E6653 en utilisant Tapatalk
After adding that
replace this Public id
<public type="id" name="brightness_slider" id="0x7f10012e" />
bro i dont understand very well , the public id that i need to replace where i can find the new id , i know to i must open res/xml/public and replace the line that u publish but what new id i must put or where i can find it
raziel zarafan said:
After adding that
replace this Public id
<public type="id" name="brightness_slider" id="0x7f10012e" />
bro i dont understand very well , the public id that i need to replace where i can find the new id , i know to i must open res/xml/public and replace the line that u publish but what new id i must put or where i can find it
Click to expand...
Click to collapse
In the method you have const v1 0x7f10012e
Go to you public.xml and serch for <public type="id" name="brightness_slider, and the public id you have copy and change 0x7f10012e for you public id you copy
dark90 said:
In the method you have const v1 0x7f10012e
Go to you public.xml and serch for <public type="id" name="brightness_slider, and the public id you have copy and change 0x7f10012e for you public id you copy
Click to expand...
Click to collapse
The public id and the const value are the same bro .-. And when I replace the systemui and enable hide it don't work T-T
raziel zarafan said:
The public id and the const value are the same bro .-. And when I replace the systemui and enable hide it don't work T-T
Click to expand...
Click to collapse
You are right i tried and didnt work too
dark90 said:
You are right i tried and didnt work too
Click to expand...
Click to collapse
Maybe something is wrong bro
Not working for me too.. I think some problems with the smali file .. Waiting for OP's replay
raziel zarafan said:
The public id and the const value are the same bro .-. And when I replace the systemui and enable hide it don't work T-T
Click to expand...
Click to collapse
dark90 said:
You are right i tried and didnt work too
Click to expand...
Click to collapse
raziel zarafan said:
Maybe something is wrong bro
Click to expand...
Click to collapse
Rajeev said:
Not working for me too.. I think some problems with the smali file .. Waiting for OP's replay
Click to expand...
Click to collapse
Brothers every thing is working
I had already provided my settings
May be issue from settings
I will provide rom control app
Sure it helps you
venkat kamesh said:
Brothers every thing is working
I had already provided my settings
May be issue from settings
I will provide rom control app
Sure it helps you
Click to expand...
Click to collapse
Already compared ur settings and all bro. Not working..
Rajeev said:
Already compared ur settings and all bro. Not working..
Click to expand...
Click to collapse
Don't worry brother
I already had alternate for this to work
On all switch properties tuts of mine
Now just a moment back I fixed my pc
Once done I will update threads
dark90 said:
You are right i tried and didnt work too
Click to expand...
Click to collapse
raziel zarafan said:
Maybe something is wrong bro
Click to expand...
Click to collapse
Rajeev said:
Not working for me too.. I think some problems with the smali file .. Waiting for OP's replay
Click to expand...
Click to collapse
Brothers The Tut got updated
with new settings smali
i tough smali will make you confused so not provided
any how there are three ways and now its your wish
1.Smali
2.Smali with no Id
or the app control
Hello guys
i just found a simple way to disable Signature verification on Nougat / Marshmallow
Tested on Sony and LG .. should also work on AOSP, and based roms
Firstly thanks to My best buddy/ brother (moon guy) @kingdj haha
Requirements:-
- Deodexed Rom
- Services.jar
- core-oj.jar
- Latest Apktools ( i suggest Tickle my android tool by @Ticklefish )
Lets start Start
1. Decompile services.jar (Nougat/MM versions)
2. Open services.jar\smali\com\android\server\pm\PackageManagerService.smali
Method 1 :- (not working for few devices)
look for this method
Code:
method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
in that method find these line
Code:
:goto_0
return v3
:cond_0
const/4 v3, -0x1
goto :goto_0
and replace them with this
Code:
:goto_0
const/4 v3, 0x0
:cond_0
const/4 v3, 0x0
return v3
Now look for this code
Code:
invoke-static {v0, v6}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
[COLOR="red"]move-result v6[/COLOR]
if-eqz v6, :cond_7
Add these changes to that code ( Just red code give an edit )
Code:
invoke-static {v0, v6}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
[COLOR="red"]const/4 v6, 0x0[/COLOR]
if-eqz v6, :cond_7
Here its Done...!
save and Close
Method 2 :- (will work on any device / easy)
look for this method
Code:
method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
Replace the complete method with this
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 13
const/4 v0, 0x0
return v0
.end method
and find his method
Code:
.method private compareSignaturesCompat(Lcom/android/server/pm/PackageSignatures;Landroid/content/pm/PackageParser$Package;)I
replace the complete method with this
Code:
.method private compareSignaturesCompat(Lcom/android/server/pm/PackageSignatures;Landroid/content/pm/PackageParser$Package;)I
.locals 13
const/4 v0, 0x0
return v0
.end method
and find his method
Code:
.method private compareSignaturesRecover(Lcom/android/server/pm/PackageSignatures;Landroid/content/pm/PackageParser$Package;)I
replace the complete method with this
Code:
.method private compareSignaturesRecover(Lcom/android/server/pm/PackageSignatures;Landroid/content/pm/PackageParser$Package;)I
.locals 13
const/4 v0, 0x0
return v0
.end method
3. Decompile core-oj.jar ( Red line should be replaced and blue should be matched
open core-oj/smali/java/security/Signature.smali
find this method
Code:
.method public final verify([B)Z
in that method find this lines
Code:
invoke-virtual {p0, p1}, Ljava/security/Signature;->engineVerify([B)Z
[COLOR="Red"]move-result v[COLOR="blue"]0[/COLOR][/COLOR]
Change Red line to this
Code:
[COLOR="red"]const/4 v[COLOR="blue"]0[/COLOR], 0x1[/COLOR]
Code:
.method public final verify([BII)Z
in that method find this lines
Code:
invoke-virtual {p0, p1, p2, p3}, Ljava/security/Signature;->engineVerify([BII)Z
[COLOR="Red"]move-result v[COLOR="blue"]0[/COLOR][/COLOR]
Change Red line to this
Code:
[COLOR="red"]const/4 v[COLOR="blue"]0[/COLOR], 0x1[/COLOR]
save and close
Now open core-oj/smali/java/security/MessageDigest.smali
Find this method and lines
Code:
.method public static isEqual([B[B)Z
.registers 7
.param p0, "digesta" # [B
.param p1, "digestb" # [B
.prologue
[COLOR="red"]const/4 v[COLOR="blue"]2[/COLOR], 0x0[/COLOR]
array-length v3, p0
array-length v4, p1
if-eq v3, v4, :cond_6
In that change red line to this
Code:
const/4 v[COLOR="Blue"]2[/COLOR], 0x1
Now For Sony devices There is other thing to disable signature Verification...! ( if persists else ignore )
open services.jar/smali/com/android/server/AppOpsService.smali
in that look for this lines
Code:
invoke-direct {p0, p4, p3}, Lcom/android/server/AppOpsService;->isSystemOrPrivApp(Ljava/lang/String;I)Z
move-result v2
if-eqz v2, :cond_1
Delete all those 3 lines and save .... tada
So now super user mode is ready .. you can now do more
Dont forget to mention me if you used my tuts and if i helped you ,....
Regards
VK
Does the process work on Pure Vanilla Marshmallow 6.0.1 . The device i m using is Karbonn Sparkle V Sprout4.
What should i do for the rom making Deodexed?????
meprakash_pyc said:
What should i do for the rom making Deodexed?????
Click to expand...
Click to collapse
I deodexed my 6.0 with tickel my android..u can try it also..
hi @venkat kamesh
1. when i decompile services.jar with TMA or BatchApkTool by BurSoft,
i can't find these lines:
Code:
invoke-direct {p0, p4, p3}, Lcom/android/server/AppOpsService;->isSystemOrPrivApp(Ljava/lang/String;I)Z
move-result v2
if-eqz v2, :cond_1
2. when i decompile services.jar with batchapktool,
packagemanagerservice.smali looks different to yours.
is tma important to decompile???
Old method for KK works on Marshmallow too
Source: My Nexus 5 running Sony Apps.
Just use
@rajdeep312, I'm sorry to say that even mentioning that app is in violation of the XDA Rules. This is because it's considered a warez app.
I'd recommend that you delete the name of it or an XDA Admin could penalize you and/or close the thread.
Just advising you to help prevent this from happening my friend.
Peace and Love!
Peace and Love!
~Ringo Starr~
Sent on my Communicator [SCH-I535] from the Bridge of the U.S.S. Enterprise...
********************************************
**IF I WAS HELPFUL IN ANY WAY THEN**
**PLZ THANK ME WITH A THUMBS UP!**
********************************************
Dnt know weda there is new security in 378 fw... I did dis and flashed unlock camera buh front camera fc.... And also i tried to use font selector buh didnt work.
There is 3 AppOpsService.smali in Sony services.jar im using it in .376 nougat firmware
here check this: http://imgur.com/a/VxLbO
I'd like to do this by editing source code rather than editing smali code, I can find and edit PackageManagerService's methods but couldn't find later methods. Can you explain where do they exist in source code?
nicesoni_ash said:
I'd like to do this by editing source code rather than editing smali code, I can find and edit PackageManagerService's methods but couldn't find later methods. Can you explain where do they exist in source code?
Click to expand...
Click to collapse
Use tha first method den continue with core-oj.jar.....
whalesplaho said:
Use tha first method den continue with core-oj.jar.....
Click to expand...
Click to collapse
What!! How's this answer my post asking for those specific methods?
Besides I don't just wish to disable it completely but if possible making a switch for the same.
Sent from my "1+2" powered by Official RR 7.x.x
Compiled by myself
nicesoni_ash said:
What!! How's this answer my post asking for those specific methods?
Besides I don't just wish to disable it completely but if possible making a switch for the same.
Sent from my "1+2" powered by Official RR 7.x.x
Compiled by myself
Click to expand...
Click to collapse
Yhu said yhu couldnt find tha later methods dats why i said use tha first method in OP continue from core-oj.jar which is also present dere. Sorry for answering and i dnt know if its possible to make a switch!
whalesplaho said:
Yhu said yhu couldnt find tha later methods dats why i said use tha first method in OP continue from core-oj.jar which is also present dere. Sorry for answering and i dnt know if its possible to make a switch!
Click to expand...
Click to collapse
It's ok, I guess you didn't understand my question. I am not editing smali files but making changes in source itself thus I need to know exact file names to find these methods. I couldn't find files from core-oj.jar in source and that's what I asked.
nicesoni_ash said:
It's ok, I guess you didn't understand my question. I am not editing smali files but making changes in source itself thus I need to know exact file names to find these methods. I couldn't find files from core-oj.jar in source and that's what I asked.
Click to expand...
Click to collapse
Gotten now... I dnt know bout tha source code, sorry!
But with PackageManagerService alone, it should work. Work for some.!
whalesplaho said:
Gotten now... I dnt know bout tha source code, sorry!
But with PackageManagerService alone, it should work. Work for some.!
Click to expand...
Click to collapse
Yeah, packagemanagerservice should do the work as all main three methods are in there. I just need to make a switch now.
Sent from my "1+2" powered by Official RR 7.x.x
Compiled by myself
nicesoni_ash said:
Yeah, packagemanagerservice should do the work as all main three methods are in there. I just need to make a switch now.
Sent from my "1+2" powered by Official RR 7.x.x
Compiled by myself
Click to expand...
Click to collapse
Okay buddy... Goodluck and how will tha switch work!?
whalesplaho said:
Okay buddy... Goodluck and how will tha switch work!?
Click to expand...
Click to collapse
Theoretically if it's a yes to disable verification, then instead of running any code the method will simply return true for signature matches but if it's a no, I am letting it follow it's normal process. Building now.
nicesoni_ash said:
Theoretically if it's a yes to disable verification, then instead of running any code the method will simply return true for signature matches but if it's a no, I am letting it follow it's normal process. Building now.
Click to expand...
Click to collapse
Okay.....
Nice one buddy!!!
Thanks for the way. Is there any simple way to do this. As coding is not my thing.