[MOD/Source] Display "H" icon in status bar on Vibrant Froyo roms. - Vibrant Android Development

Hey everyone,
I guess this can be considered my "random act of kindness" for the year since I know that it will almost certainly be kanged over and over with out thanks/credit given.
Anyway I just figured out how to display the "H" icon in the status bar properly. And by that I mean, no renaming or duplicating drawable files in framework-res.apk, and the icon will show all data states now:
GSM, GPRS, Edge, 3G, HSDPA
I've only tested it for a few minutes myself, but thankfully the signal in my bedroom can be a bit flaky, so I've seen it bounce between 3G and H already, and I disabled 3g to make sure the "E" for edge still works fine too.
Anyway, decompile services.jar, and open /com/android/server/status/StatusBarPolicy.smali
Then search for ".method private final updateDataNetType(I)V" in and replace the entire method with this:
Code:
.method private final updateDataNetType(I)V
.registers 3
.parameter "net"
.prologue
.line 1381
packed-switch p1, :pswitch_data_30
.line 1409
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_g:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
.line 1412
:goto_7
return-void
.line 1383
:pswitch_8
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_e:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1386
:pswitch_d
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_3g:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1391
:pswitch_12
iget-boolean v0, p0, Lcom/android/server/status/StatusBarPolicy;->mHspaDataDistinguishable:Z
if-eqz v0, :cond_1b
.line 1392
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_h:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1394
:cond_1b
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_3g:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1399
:pswitch_20
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_1x:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1402
:pswitch_25
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_1x:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1406
:pswitch_2a
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_3g:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1381
nop
:pswitch_data_30
.packed-switch 0x2
:pswitch_8
:pswitch_d
:pswitch_20
:pswitch_2a
:pswitch_2a
:pswitch_25
:pswitch_12
:pswitch_12
:pswitch_12
.end packed-switch
.end method
And if you haven't noticed by now, I HATE this samsung bs and would kill for an AOSP or CM rom, lol.
Cheers, =)
P.S., next up (hopefully) a user selectable setting to hide the AM/PM flag from the status bar clock.

Wow nicely done. Thank you so much!
Sent from my SGH-T959 using Tapatalk

Great find, sonique!
And yes, I agree, need aosp or cm already!
Sent from my SGH-T959

I would LOVE you to find that am and pm removal! If this is any help, the 24 hour format doesn't use am/pm (obviously lol) but I wonder if there is any code on there to help you find out how to turn it off for the 12 hour format. No idea if thays right at all, just an idea I would do it myself but I don't know how to
Sent from Bionix powered vibrant! If I helped, hit the thanks button!

It's unfortunate that's how it is S0niqu3, but definitely true.
Thanks for figuring this out and posting it here for everyone.

Is there a tutorial on how to decompile/recompile jar files? I want to learn how to do these edits.

dasunsrule32 said:
Is there a tutorial on how to decompile/recompile jar files? I want to learn how to do these edits.
Click to expand...
Click to collapse
for editing code like this, you need to download smali/baksmali jars. Then you'll need to pull out the classes.dex file out of said jar file (services.jar in this case, you can just open the apk with 7zip). I found this post to be a good reference for decompile/compile commands. Decompile. Do edits. Compile. Replace classes.dex in the jar file with the new one.
I can *try* and help you some more if you like... I'm no pro at this

birgertime said:
for editing code like this, you need to download smali/baksmali jars. Then you'll need to pull out the classes.dex file out of said jar file (services.jar in this case, you can just open the apk with 7zip). I found this post to be a good reference for decompile/compile commands. Decompile. Do edits. Compile. Replace classes.dex in the jar file with the new one.
I can *try* and help you some more if you like... I'm no pro at this
Click to expand...
Click to collapse
I will take a look at this info. Appreciated. Worked perfectly! Thanks dudes!

s0niqu3 said:
Hey everyone,
I guess this can be considered my "random act of kindness" for the year since I know that it will almost certainly be kanged over and over with out thanks/credit given.
Anyway I just figured out how to display the "H" icon in the status bar properly. And by that I mean, no renaming or duplicating drawable files in framework-res.apk, and the icon will show all data states now:
GSM, GPRS, Edge, 3G, HSDPA
I've only tested it for a few minutes myself, but thankfully the signal in my bedroom can be a bit flaky, so I've seen it bounce between 3G and H already, and I disabled 3g to make sure the "E" for edge still works fine too.
Anyway, decompile services.jar, and open /com/android/server/status/StatusBarPolicy.smali
Then search for ".method private final updateDataNetType(I)V" in and replace the entire method with this:
Code:
.method private final updateDataNetType(I)V
.registers 3
.parameter "net"
.prologue
.line 1381
packed-switch p1, :pswitch_data_30
.line 1409
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_g:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
.line 1412
:goto_7
return-void
.line 1383
:pswitch_8
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_e:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1386
:pswitch_d
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_3g:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1391
:pswitch_12
iget-boolean v0, p0, Lcom/android/server/status/StatusBarPolicy;->mHspaDataDistinguishable:Z
if-eqz v0, :cond_1b
.line 1392
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_h:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1394
:cond_1b
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_3g:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1399
:pswitch_20
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_1x:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1402
:pswitch_25
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_1x:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1406
:pswitch_2a
sget-object v0, Lcom/android/server/status/StatusBarPolicy;->sDataNetType_3g:[I
iput-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mDataIconList:[I
goto :goto_7
.line 1381
nop
:pswitch_data_30
.packed-switch 0x2
:pswitch_8
:pswitch_d
:pswitch_20
:pswitch_2a
:pswitch_2a
:pswitch_25
:pswitch_12
:pswitch_12
:pswitch_12
.end packed-switch
.end method
And if you haven't noticed by now, I HATE this samsung bs and would kill for an AOSP or CM rom, lol.
Cheers, =)
P.S., next up (hopefully) a user selectable setting to hide the AM/PM flag from the status bar clock.
Click to expand...
Click to collapse
Awesome work Man... But not sure If I agree with the first part of the sentence.
My Stuff is Kanged all the Time & I don't mind to be honest.

eugene373 said:
Awesome work Man... But not sure If I agree with the first part of the sentence.
My Stuff is Kanged all the Time & I don't mind to be honest.
Click to expand...
Click to collapse
I already have the services.jar edited and working on gingerclone r2, do you want it?

dasunsrule32 said:
I already have the services.jar edited and working on gingerclone r2, do you want it?
Click to expand...
Click to collapse
You can release it if you want, I never felt the need for this...

eugene373 said:
Awesome work Man... But not sure If I agree with the first part of the sentence.
My Stuff is Kanged all the Time & I don't mind to be honest.
Click to expand...
Click to collapse
Hey Eugene,
Thanks for the compliment =)
And yeah, I was a little bitter the night I released this, lol.
But yeah, I don't honestly much care about people "kanging" unless its my theme work, re-drawing graphics from scratch sucks, a lot, so credit is very much appreciated in that area. =)
Thanks for all the hard work you do, any chance you can send me some tips on replacing the touchwiz dialer and contacts? I know you managed that on 2.1 with your Hybrid rom's, and I'd love to have them back on froyo, and I don't mind doing the work myself.
Cheers, =)

eugene373 said:
You can release it if you want, I never felt the need for this...
Click to expand...
Click to collapse
Ok, I will drop on the ginger thread.

Awesome work as always s0niqu3 .. greatly appreciated. I've created a flashable of this MOD for KB1 ... I don't know if the same file work with other release or not. This will hopefully help somebody to get it installed easier.
- KB1 H-icon StatusBar MOD
- KB1 Original StatusBar

I put together two services.jar's, one includes the H hack and one includes the H hack + the AM/PM hack, for a genuinely Ginger feel. Enjoy!
Click Me

s0niqu3 said:
Hey Eugene,
Thanks for the compliment =)
And yeah, I was a little bitter the night I released this, lol.
But yeah, I don't honestly much care about people "kanging" unless its my theme work, re-drawing graphics from scratch sucks, a lot, so credit is very much appreciated in that area. =)
Thanks for all the hard work you do, any chance you can send me some tips on replacing the touchwiz dialer and contacts? I know you managed that on 2.1 with your Hybrid rom's, and I'd love to have them back on froyo, and I don't mind doing the work myself.
Cheers, =)
Click to expand...
Click to collapse
LMAO! Oh trust me, I do understand aa bitter stand point..
But yeah I'll look into the Dailer / Contacts once I get my Dev machine back up and running & send ( DM ) you what I did in 2.1 but I've not tried 2.2 yet so Def. would like to help in anyway that I can..
P.S.
Regarding my Statement, I hope it wasn't taken out of context
as that's truly not how it was suppose to come across.
~Eugene

Will it work on KA6

I posted a fix for this as a patch on top of the Fascinate lockscreen mod last month here: http://forum.xda-developers.com/showpost.php?p=10951625&postcount=44
For those who don't feel like doing all the legwork.

tjsynkral said:
I posted a fix for this as a patch on top of the Fascinate lockscreen mod last month here: http://forum.xda-developers.com/showpost.php?p=10951625&postcount=44
For those who don't feel like doing all the legwork.
Click to expand...
Click to collapse
Hi,
Do you mean you added this to the lockscreen mod, or you found something wrong with the code?
If you simply added it to the mod, would you mind at least linking back to this thread for credit in your post?
And if you found a bug, would you please share the fix so I can update the OP here.
Cheers, =)

s0niqu3 said:
But yeah, I don't honestly much care about people "kanging" unless its my theme work, re-drawing graphics from scratch sucks, a lot, so credit is very much appreciated in that area. =)
Click to expand...
Click to collapse
Absolutely.
I don't give a **** when people use the Home Haptic feedback that I figured out for Captivate, but when people start stealing my theme it pisses me off.

Related

[Guide]Official MIUI Port Guide Translation

Hi guys,i translated the key part of this guide,untill now,this guide is not completed ,if it updated ,i'll update this thread too
and until now,our MIUI PORT TEAM have these guys:
me,gabwerkz,redy2006
N00BY0815 and SquaDrive after read this post and if you want to join in plz let me know anyone else wants to join in are welcomed
===========================================line
1.A Sample For Smali
imagane that there's a Hello worlk application,we install the apk and open it,we can see a blackscreen and at the first line written:Hello world!
ok,this is a simple app.now we decompile it.
===================
we get a folder,then find the HelloActivity.smali,there's its content:
Code:
.class public Lcom/example/android/helloactivity/HelloActivity;
.super Landroid/app/Activity;
.source "HelloActivity.java"
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 27
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 2
.parameter "savedInstanceState"
.prologue
.line 33
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 37
const/high16 v1, 0x7f03
invoke-virtual {p0, v1},
Lcom/example/android/helloactivity/HelloActivity;->setContentView(I)V
.line 38
const/high16 v1, 0x7f05
invoke-virtual {p0, v1},
Lcom/example/android/helloactivity/HelloActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
.line 39
.local v0, txtView:android/widget/TextView;
const/high16 v1, 0x7f04
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
.line 40
return-void
.end method
"#" refers to notes.
begin with a dot named "annotations".
".line" means line number,it mainly used for debug.
.metho and .end method means a method's starting and endding.
more code plz goto http://pallergabor.uw.hu/androidblog/dalvik_opcodes.html
now we want to change the "Hello,world!" into "Happy,Craker!",what should we do?
in this smali
.lne 39 is
Code:
.local v0, txtView:android/widget/TextView;
const/high16 v1, 0x7f04
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
and actually the source code is
Code:
txtView.setText(R.string.hello_activity_text_text)
here we can see it define a textview with R.string.hello_activity_text_text ,and i guess the string "Hello world!" is in it.
now we could not change the string,but we can replace it by change it directly
but how we do it in smali?
here we go
Code:
.line 39
.local v0, txtView:android/widget/TextView;
const-string v1, "Happy, Cracker!"
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
ps.i can't explane it more clearly,but we can see we replace the id with our string.
==========================
2.Porting MIUI Framework
Before starting i should tell us :all porting is based on deodexed files.and there's a stock android rom and miui rom to show you a example to understand how we make the porting work.
the main idea is change the smali code to port it.cause we can't get the souce code of miui,and by this way we can port it to our phone too.
the three files we should touch is :framework.jar ,android.policy.jar andservices.jar.they are the "core" of android system
there's an attach file download and open it we can see:
porting-miui/
|-----------------android
|------------framework.jar
|------------services.jar
|------------android.policy.jar
|------------------miui
|----------framework.jar
|----------services.jar
|----------android.policy.jar
|-----------framework-res/
|-----------framework-miui-res.apk
the android folder is from stock android ,miui folder is miui's files,and we need your phone's files here too.and in this guide we assume your phone is I9100.now we should decompile all of them and compare,to "patch" miui things to your phone.
that means ,we need to compare stock files with our files,compare stock files with miui files
i.porting resources
decompile framework-res.apk,all the resources in miui we need porting to our rom,so copy them to your compiled framework-res folder and then recompile it.
framework-miui-res.apk is a resouces package,all the miui apps need it.in our rom we can find RES_cappuccino.apk,RES_sui.apk and RES_model.apk.
usually miui's resource's id is started with 0x03,and the stock rom has two resouce package,framework-res.apk is started with 0x01 and another is started with 0x02.so if your phone has more than two package,you need contact with us.in the future we'll considering make the resouce's id started with 0x06 in miui.
ii.after we finish the decompile we can use the script rmline.sh to delete all the lines started with .line to make us more easier to compare the difference with two smali code.but backup the original decomplied files first plz.we can debug from it.
then,if you based on linux,you'd try meld to compare,if you are on windows,use beyoun compare
between stock and miui,we can see there's a lot of new classes which started with Miui,and a new miui folder,just copy those new files and folders to our stock folders(with .line)
in the attach file,there's a change-list file,which list what miui did change.maybe it's a little different with what we compared by ourselves,but it's nop (dummy instruction),it caused by apktool,so we don't need to care it,just compare listed files.
there are 3 solutions
1.ex. ActivityThread.smali,miui changed the method "getTopLevelResources",but i9100's and stock is the same,this is the easiest situation and we can replace the miui code into our files happily
2.also in ActivityThread.smali,miui changed the another method "applyConfigurationToResourcesLocked",and after comparation,we can see miui changed this method,so i9100 does.then what should we do?let's see the miui's code first
Code:
.method final applyConfigurationToResourcesLocked(Landroid/content/res/Configuration;)Z
invoke-virtual {v5, p1}, Landroid/content/res/Configuration;->updateFrom(Landroid/content/res/Configuration;)I
move-result v0
.local v0, changes:I
invoke-static {v0}, Landroid/app/MiuiThemeHelper;->handleExtraConfigurationChanges(I)V
invoke-virtual {p0, v7}, Landroid/app/ActivityThread;->getDisplayMetricsLocked(Z)Landroid/util/DisplayMetrics;
move-result-object v1
.local v1, dm:Landroid/util/DisplayMetrics;
at line 5 is what miui changed.before that,we should know some rule about smali
all the local variable is started with "v"
.locals 8 means this method use 8 local variables.
all the parameters are started by "p".and local variable and parameters started from 0.for all the nonstatic method,p0 means itself,i.e "this" pointer.
here we can see miui added a new static method,the code like this we call it linear code.it as one entry and one exit.and in compiler it called basic block.
so we just need to copy this block and paste into 9100's files at the same position,and we done.
3.for example,in Resources.smali,miui changed the "loadDrawable" method.here's the code
Code:
.method loadDrawable(Landroid/util/TypedValue;I)Landroid/graphics/drawable/Drawable;
.end local v8 #e:Ljava/lang/Exception;
.end local v13 #rnf:Landroid/content/res/Resources$NotFoundException;
:cond_6
invoke-virtual/range {p0 .. p2},
Landroid/content/res/Resources;->loadOverlayDrawable(Landroid/util/TypedValue;I)Landroid/graphics/drawable/Drawable;
move-result-object v6
if-nez v6, :cond_1
:try_start_1
move-object/from16 v0, p0
from line 6 to line 9 is what miui added.then we compare 9100 and stock android,we can find it's totally different.then how should we do now?
the key is find the added code's entry and exit.
at line 4 we see a ":cond_6",it says there should be a goto command to this :cond_6.so we got to find where used the :cond_6 and we finally got this:
Code:
const-string v15, ".xml"
invoke-virtual {v9, v15}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
move-result v15
if-eqz v15, :cond_6
read this code block carefully,and seems it is check if the string "v9" is ending with ".xml",if not,goto :cond_6 .ok ,let's go to see 9100's framework.
so we search ".xml" in the loadDrable method.find this:
Code:
const-string v17, ".xml"
move-object v0, v10
move-object/from16 v1, v17
invoke-virtual {v0, v1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
move-result v17
if-eqz v17, :cond_b
the logic is same as which in miui hmm?so goto :cond_b ,what we can see is totally same as miui's :cond_6 right? so we are sure this is where miui changed
look at the exit,miui has two exit point
one is if-nez v6, :cond_1 ,if so,goto :cond_1,if not,go on.so let's see what the :cond_1 did
here's cond_1's code
Code:
:cond_1
:goto_1
if-eqz v6, :cond_2
move-object/from16 v0, p1
iget v0, v0, Landroid/util/TypedValue;->changingConfigurations:I
and in 9100's file we can find this
Code:
:cond_1
:goto_1
if-eqz v7, :cond_2
move-object/from16 v0, p1
iget v0, v0, Landroid/util/TypedValue;->changingConfigurations:I
this time it check the v7's value,so we should add this into 9100
Code:
invoke-virtual/range {p0 .. p2},
Landroid/content/res/Resources;->loadOverlayDrawable(Landroid/util/TypedValue;I)Landroid/graphics/drawable/Drawable;
move-result-object v7
if-nez v7, :cond_1
a little dizzy hmm?take a break time and go back
iii.and the last we'll talk about inner class.
every inner class have a separete smali file.
e. ActivityThread$1.smali
if it is a Anonymous class,the name should be "outer class+$+number",else it should be "outer class+$+inner class"as its name.
if a inner class use outer class's privte method,the compiler will auto fill a static function like this:
Code:
public class Hello {
public class A {
void func() {
setup();
}
}
private void setup() {
}
we use the outer class's setup method in inner class A's "func" method.and we'll get the smali code:
part of Hello$A.smali
Code:
# virtual methods
.method func()V
.locals 1
.prologue
.line 5
iget-object v0, p0, LHello$A;->this$0:LHello;
#calls: LHello;->setup()V
invoke-static {v0}, LHello;->access$000(LHello;)V
.line 6
return-void
.end method
part of Hello.smali
Code:
.method static synthetic access$000(LHello;)V
.locals 0
.parameter
.prologue
.line 1
invoke-direct {p0}, LHello;->setup()V
return-void
.end method
we can see the compiler auto made a access$000 method,if we use a outer class's private method in a more complicate inner class,it'll made a new method,but every class may have various new class name,it changes a lot .compare it carefully,find the private method and find a name that you ever seened.
iiii.Finally there are some advices:
1.careful,find where to add miui's code
2.notice the local variable number
3.step by step,if you done a part of port,recompile it to see if it work
4.find a problem is not neccessary,use adb logcat and find what caused the problem.
5.more practice and you'll handle the smali code
==================================
because of my bad english ,if you can understand what i mean,plz point me out and i'll correct it as i can
if you think this post may help you,press the thanks button
here's the attachment:
http://www.multiupload.com/I33A07PRTF
For God Sake..
ahahahaha...
My head goin crazy...><..
maybe i need a little walk by learn..
after read those stuff i got fired up..
i want to learn Android from this..
can u guys teaching me little by little??
if so, count me on..i'm ready for testing every single build
and ready to burst my brain to learn this stuff..
SquaDrive said:
For God Sake..
ahahahaha...
My head goin crazy...><..
maybe i need a little walk by learn..
after read those stuff i got fired up..
i want to learn Android from this..
can u guys teaching me little by little??
if so, count me on..i'm ready for testing every single build
and ready to burst my brain to learn this stuff..
Click to expand...
Click to collapse
just use search...
after i tranlated this guide,i'd say i've understand a part of the "how to",and i'll gonna have a try based on v20n
dxdiag32 said:
after i tranlated this guide,i'd say i've understand a part of the "how to",and i'll gonna have a try based on v20n
Click to expand...
Click to collapse
Nice... and I'm just waiting here for your progress... LOL
Man, you got moves like jagger.
good luck dxdiag
Is there some progress?
Sent from my LG-P970 using XDA App
I would like to help, but I have too work now...
Good luck!
I think Huexxx should start porting MIUI to ours blacks xd His rom is good at this moment so he can make some break and create MIUI
doooh !
I really would offer my help but the only dev related thing I know is scripting with nsis. I don't know coding even if I'm pretty sure scripting and coding have similar principles. I don't even know what deodexing / zipaligning mean
As I learned everything by myself I know that all guides can't do 100% of the job. Learning is the key.
So I'm not sure if I can contribute but it will be a pleasure to join to your work.
Any news guys ?
Sent from my LG-P970 using xda premium

[MOD][TUTORIAL]Longpress back to kill app[STOCK ROM][JB]

Hello XDA'ers!
I am not new to these forums.. I am a frequent reader, but I am not much of a poster.
I was really missing the "long press back button to kill app" in the stock TW rom, so I just had to get this working for our GNote 10.1.
After alot of trial and error I finally got it working, and as promised in the Q&A forum, here comes my tutorial.
Big thank you to:
Mirko ddd for the $KillConcept script, and helping me understand the code and getting this working for the GNote 10.1. Link to Mirko ddd's original thread here: http://forum.xda-developers.com/showthread.php?t=1969499
tdunham for looking at my andoid.policy.jar and helping me solve my "annoying" toast message problem.
//*Standard disclaimer:
You are doing this at your own risk and understand that you are liable to any side effects that may come from performing this modification.
I am not responsible for anything that happens to your device.*//
**I recommend doing a backup before performing this modification**
What you need:
smali.zip - Attached at the bottom of this post -
flashable.zip - Attached at the bottom of this post -
PhoneWindowManager$KillConcept.smali - Attached at the bottom of this post -
7zip - Download at 7-zip.org -
notepad++ - Download at notepad-plus-plus.org -
*Optional mod* (change text when app is killed) this will give you a toast message that makes more sence like "Application Killed.":
You will need APKTool or Virtuous Ten Studio for this.. -Download Virtuous Ten Studio at virtuous-ten-studio.com -
How to:
First we need to extract android.policy.jar from your device, this is located under system/framework, extract it to your sdcard and push it to your computer.
Now, unzip the supplied smali.zip file. You will now get a folder called "smali". Place your android.policy.jar file in this folder (remember to make a backup of your original android.policy.jar just in case).
Click on the 1.bat file (this will decompile your android.policy.jar), you will now get a folder called "classout", click on this folder and navigate to "classout\com\android\internal\policy\impl", now locate the file called "PhoneWindowManager.smali", and open this file using Notepad++.
Now we will need to locate this code:
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$10;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$10;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
Replace both subclasses $10 with $KillConcept so that the code will look like this:
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$KillConcept;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$KillConcept;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
Now locate this code:
Code:
.line 6293
:cond_905
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsMultiWindowUIEnabled:Z
move/from16 v24, v0
[B][U]if-eqz v24, :cond_68[/U][/B]
move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEnableMultiWindowUISetting:I
move/from16 v24, v0
[B][U]if-eqz v24, :cond_68[/U][/B]
Focus on bolded underlined conds, we need to switch them with cond_93c so we will have:
Code:
.line 6293
:cond_905
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsMultiWindowUIEnabled:Z
move/from16 v24, v0
[B][U]if-eqz v24, :cond_93c[/U][/B]
move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEnableMultiWindowUISetting:I
move/from16 v24, v0
[B][U]if-eqz v24, :cond_93c[/U][/B]
cond_93c may be different depending on your FW version and compiler, but we need to recall the cond that gives this:
Code:
.line 6298
:cond_93c
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
move-object/from16 v24, v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
move-object/from16 v25, v0
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v26
invoke-virtual/range {v24 .. v27}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto/16 :goto_68
Save the file.
Unzip and add the supplied PhoneWindowManager$KillConcept.smali to "classout\com\android\internal\policy\impl"
Now go back to your "smali" folder and click on 2.bat to recompile.
You will now get a file called classes.dex, open your android.policy.jar with 7zip and replace the old classes.dex with the new one.
Open the supplied flashable.zip with 7zip and place your modified android.policy.jar file in "system\framework\" inside the flashable.zip
Create a copy of "flashable.zip" and call it "backup.zip" and place your original unmodified android.policy.jar in this one (Just in case you did something wrong and you end up in a bootloop, you can always flash your backup.zip just remember to move it to your device together with the flashable.zip).
Flash the .zip in CWM.
Profit! You should now have the longpress back to kill app function enabled.
(Optional mod)
...Now if for some reason you get a "toast message" that makes no sence.. like "prevent app switches".
You need to edit the PhoneWindowManager$KillConcept.smali with notepad++
Locate this code (should be around line 234 somewhere):
Code:
const v15, 0x104023d
Now, you have to extract framework-res.apk from your device.. this file is also located under system/framework.
Decompile framework-res.apk using APKTool or Virtuous Ten Studio
To find the correct value. Navigate to res/values/public.xml.
Search for: permlab_forceBack
Sould look something like this (this is what mine looks like):
Code:
<public type="string" name="permlab_forceBack" id="0x0[B]104023d[/B]" />
You just need the last 7 digits (exclude the 0x0) and replace the last 7 of the code above in PhoneWindowManager$KillConcept.smali.
This will give you a "toast message" that makes a little more sence like "force app to close".
If you are fine with this.. just recompile and add the new framework-res.apk to the supplied flashable.zip under system/framework (Remember to make a backup.zip with your old framework-res.apk just in case anything goes wrong, you can always flash your backup.zip just remember to move it to your device together with the flashable.zip).
Flash the .zip in CWM. Profit!
(Second optional mod)
Now, if you are like me and want a more "stock look" to your toast message. You will also need to edit res/values/strings.xml
If you are running a different language rom you will need to find the values folder for your language. Example: If your language is "English - Great Britain" you will need to navigate to the folder res/values-en-rGB/strings.xml
Now search for the string: permlab_forceBack inside strings.xml and change the text from "force app to close" to "Application Killed." or what ever you prefer.
Recompile and add the new framework-res.apk to the supplied flashable.zip under system/framework (Remember to make a backup.zip with your old framework-res.apk just in case anything goes wrong, you can always flash your backup.zip just remember to move it to your device together with the flashable.zip).
Flash the .zip in CWM.
Done!
This should be in development. Nice one
Mirko ddd said:
This should be in development. Nice one
Click to expand...
Click to collapse
Thank you Mirko ddd.
As "New members (those with fewer than 10 posts) are not permitted to post to development-related forums." it ended up in here..
I had no other alternative unless I started spamming the forum to get my "10 posts".
Hoping a moderator will be kind enough to move it.
MichaelGroth said:
Thank you Mirko dd.
As "New members (those with fewer than 10 posts) are not permitted to post to development-related forums." it ended up in here..
I had no other alternative unless I started spamming the forum to get my "10 posts".
Hoping a moderator will be kind enough to move it.
Click to expand...
Click to collapse
I see. Report the op and ask for move, don t send pm to forum moderators.
Cheers
Mirko ddd said:
I see. Report the op and ask for move, don t send pm to forum moderators.
Cheers
Click to expand...
Click to collapse
Thnx.
Thread is moved now :good:
Awesome job man! I was having a heck of a time porting over "menu to kill" and modifying it to the back button. Just didn't have the time to work it through... thanks and definitely giving you credit when I implemente it.
Jamison904 said:
Awesome job man! I was having a heck of a time porting over "menu to kill" and modifying it to the back button. Just didn't have the time to work it through... thanks and definitely giving you credit when I implemente it.
Click to expand...
Click to collapse
Thnx, but Mirko ddd is the one who deserves the credit. I just made a few changes to his script and tutorial to make it work with our devices
Michael
Man this is kicking my butt. I cannot get the android.policy to rebuild after making the changes. I am using linux and rename it to android.policy.apk and decompile and make changes but upon compile, it errors out. Dont have an issue when making the reboot mod this way. I dont really understand where to put this at in the .smali file.
.line 6298
:cond_93c
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
move-object/from16 v24, v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
move-object/from16 v25, v0
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v26
invoke-virtual/range {v24 .. v27}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto/16 :goto_68
I dont really understand java very much at all. Any help would be greatly appreciated. Thanks for the work on getting this working for our device.
pimpmaneaton said:
Man this is kicking my butt. I cannot get the android.policy to rebuild after making the changes. I am using linux and rename it to android.policy.apk and decompile and make changes but upon compile, it errors out. Dont have an issue when making the reboot mod this way. I dont really understand where to put this at in the .smali file.
.line 6298
:cond_93c
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
move-object/from16 v24, v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
move-object/from16 v25, v0
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v26
invoke-virtual/range {v24 .. v27}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto/16 :goto_68
I dont really understand java very much at all. Any help would be greatly appreciated. Thanks for the work on getting this working for our device.
Click to expand...
Click to collapse
Hello pimpmaneaton.
As i said in my original post the cond_93c may be different depending on your FW version and compiler.
I did my mod on the 8010 JB ROM, I am not sure wich device/rom you are on, but the conds look different.
I looked at your android.policy.jar and this is what I found:
I found multiple conds that were close: cond_683, cond_9ae and cond_999, (I am not sure)but I went with the cond most similar to mine wich is cond_999 found at line: 17591
looks like this:
Code:
.line 6430
:cond_999
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
move-object/from16 v25, v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
move-object/from16 v26, v0
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v27
invoke-virtual/range {v25 .. v28}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto/16 :goto_68
Also, just in case... I think this is where you need to change your conds, found at line 17532 (Unless you already found this on your own):
Code:
.line 6425
:cond_962
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsMultiWindowUIEnabled:Z
move/from16 v25, v0
[B][U]if-eqz v25, :cond_68[/U][/B]
move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEnableMultiWindowUISetting:I
move/from16 v25, v0
[B][U]if-eqz v25, :cond_68[/U][/B]
Focus on bolded underlined conds, we need to switch them with the right cond.
The file will not recompile unless your conds match up, so I think that was our problem here.
I have attached your android.policy.jar with the modifications above and the $KillConcept already added, so flash that and see if it works (remember to make a flashable backup just in case!). If everything fails, check out the other conds I found and try those instead.
Sorry to advise you in to "trail and error" but eventually it will work, you just have to get the conds right.
Kind regards
Michael
MichaelGroth said:
Hello pimpmaneaton.
As i said in my original post the cond_93c may be different depending on your FW version and compiler.
I did my mod on the 8010 JB ROM, I am not sure wich device/rom you are on, but the conds look different.
I looked at your android.policy.jar and this is what I found:
I found multiple conds that were close: cond_683, cond_9ae and cond_999, (I am not sure)but I went with the cond most similar to mine wich is cond_999 found at line: 17591
looks like this:
Code:
.line 6430
:cond_999
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
move-object/from16 v25, v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
move-object/from16 v26, v0
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v27
invoke-virtual/range {v25 .. v28}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto/16 :goto_68
Also, just in case... I think this is where you need to change your conds, found at line 17532 (Unless you already found this on your own):
Code:
.line 6425
:cond_962
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsMultiWindowUIEnabled:Z
move/from16 v25, v0
[B][U]if-eqz v25, :cond_68[/U][/B]
move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEnableMultiWindowUISetting:I
move/from16 v25, v0
[B][U]if-eqz v25, :cond_68[/U][/B]
Focus on bolded underlined conds, we need to switch them with the right cond.
The file will not recompile unless your conds match up, so I think that was our problem here.
I have attached your android.policy.jar with the modifications above and the $KillConcept already added, so flash that and see if it works (remember to make a flashable backup just in case!). If everything fails, check out the other conds I found and try those instead.
Sorry to advise you in to "trail and error" but eventually it will work, you just have to get the conds right.
Kind regards
Michael
Click to expand...
Click to collapse
Awesome thank you for that. I will try when i get back in town. I really appreciate that.
Edit: okay i think i understand more now. I have not downloaded and tried and wont be able to till tomorrow. But i now see that the cond 68 should be changed to 999. I completely mid understood before and was actually trying to change to 93c. I don't really understand the code still but at least see the path i need to take to make the mod work. I'M DUMB!!!
Sent from my SCH-I535 using Tapatalk 2
Why I cannot find
CODE“.line 6293”
NO “if-eqz v24, :cond_68”
View attachment 1811786
Could you help me to check my "android.policy.jar" ?
N8000 ROM:
Revolution HD 4.4
android 4.12
bykevin said:
Why I cannot find
CODE“.line 6293”
NO “if-eqz v24, :cond_68”
View attachment 1811786
Could you help me to check my "android.policy.jar" ?
N8000 ROM:
Revolution HD 4.4
android 4.12
Click to expand...
Click to collapse
It looks like v24 has been changed to v25
Look @ .line 6425
Code:
.line 6425
:cond_962
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsMultiWindowUIEnabled:Z
move/from16 v25, v0
[B][U] if-eqz v25, :cond_68[/U][/B]
move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEnableMultiWindowUISetting:I
move/from16 v25, v0
[B][U] if-eqz v25, :cond_68[/U][/B]
Change the bold underlined conds to cond_999.
Cond_999 can be found here:
Code:
.line 6430
:cond_999
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
move-object/from16 [B]v25[/B], v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
move-object/from16 v26, v0
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v27
invoke-virtual/range {v25 .. v28}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto/16 :goto_68
As you can see the v24 has been changed to v25 in cond_999 aswell.
I will attach a modified android.policy.jar for you, but I can not guarantee it will work. (Make a backup!)
Regards
Michael
MichaelGroth said:
It looks like v24 has been changed to v25
Look @ .line 6425
Code:
.line 6425
:cond_962
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsMultiWindowUIEnabled:Z
move/from16 v25, v0
[B][U] if-eqz v25, :cond_68[/U][/B]
move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEnableMultiWindowUISetting:I
move/from16 v25, v0
[B][U] if-eqz v25, :cond_68[/U][/B]
Change the bold underlined conds to cond_999.
Cond_999 can be found here:
Code:
.line 6430
:cond_999
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
move-object/from16 [B]v25[/B], v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
move-object/from16 v26, v0
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v27
invoke-virtual/range {v25 .. v28}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto/16 :goto_68
As you can see the v24 has been changed to v25 in cond_999 aswell.
I will attach a modified android.policy.jar for you, but I can not guarantee it will work. (Make a backup!)
Regards
Michael
Click to expand...
Click to collapse
Got stuck , logo circulation
Backup.zip doesn‘t work .
Have to flash Revolution HD again without WIPE .
Anyway thank you all the same!!!
easy way
MichaelGroth said:
It looks like v24 has been changed to v25
Look @ .line 6425
Code:
.line 6425
:cond_962
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsMultiWindowUIEnabled:Z
move/from16 v25, v0
[B][U] if-eqz v25, :cond_68[/U][/B]
move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEnableMultiWindowUISetting:I
move/from16 v25, v0
[B][U] if-eqz v25, :cond_68[/U][/B]
Change the bold underlined conds to cond_999.
Cond_999 can be found here:
Code:
.line 6430
:cond_999
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
move-object/from16 [B]v25[/B], v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
move-object/from16 v26, v0
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v27
invoke-virtual/range {v25 .. v28}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto/16 :goto_68
As you can see the v24 has been changed to v25 in cond_999 aswell.
I will attach a modified android.policy.jar for you, but I can not guarantee it will work. (Make a backup!)
Regards
Michael
Click to expand...
Click to collapse
could you please make an easyer way to do this mod? i want to have force close app and frightend messing up with my system files. hlp please!e
I have no "mBackLongPress" in my smali files. I am trying to implement this in ICS 4.0.4 TW stock ROM.
Any ideas how to go about it? I will try implementing it for menu button. We'll see...
UPDATE: I wasn't able to make back-button kill to work on my ROM, but menu to kill works just fine. The guide is all good, but I only had to find the action menu long press in my case and replace the smali with the one posted by Mirko ddd in his thread. I have no multi-window function so I had nothing to modify there (mIsMultiWindowUIEnabled and all those conditions).
Cheers,
C.
PhoneWindowManager$KillConcept works nicely having an issue with fixing the incorrect "Toast" message.
This is for the S3 mini. Issue that I am having is mapping the public type="string" name="permlab_forceBack" id="0x01040245" /> to the value in the PhoneWindowManager$KillConcep file as I have found that the value in that file is in use already in the public.xml.
I have tried setting the value to the next possible one found in my public.xml file and then adding that value to the PhoneWindowManager$KillConcept file in place of what is currently there (from const v15, 0x104023d to const v15, 0x1140009)
When I then try to recompile framework-res.apk it bombs out with some errors.
Any ideas on how to work around this issue?
figured it out
rather than making a change to framework-res.apk
modify the PhoneWindowManager$KillConcept to match the value set for permlab_forceBack
can anyone make a flashable .zip for our Note?
I'm using a deodexed rom stock (CMG2) but I couldn't find a working mod or an Xposed module to configure this feature.
And I really, really miss it!
mocassino said:
can anyone make a flashable .zip for our Note?
I'm using a deodexed rom stock (CMG2) but I couldn't find a working mod or an Xposed module to configure this feature.
And I really, really miss it!
Click to expand...
Click to collapse
upload your android.policy.jar and framework-res.apk
efaustino84 said:
upload your android.policy.jar and framework-res.apk
Click to expand...
Click to collapse
Framework-res
Thanks a lot
mocassino said:
Framework-res
Thanks a lot
Click to expand...
Click to collapse
cool give me a few minutes to decompile and make the changes
what language are you using on your phone eg English (UK) etc?
may also need a translation for "application killed" from you if you are not using english

[HOW TO] New Power Menu With Screenshot Option {Legacy & MTK Devices}

Hello Everyone,
Here, being on XDA, is like learning new things in a school and getting project homework on daily basis. And Speaking for this, I really like it.
So here is the project that I cleared today morning at around 4.30 AM IST (Indian Standard Time).
But before beginning for project let me THANK few IDOLS of XDA.
@tdunham - You are the master of Power menu Sir. Compared files with your guide. @Adi Aisiteru Reborn - The GOD of MOD & Guides for CM / AOSP / AOKP @ankurbata- For the files I used for comparing.
@Dzol Cp- You are the One brother who taught me these things.
@bombaybadboy-Awesome Thread by You Sir. Got everything working whenever I take help from your thread.
@Goldieking- For helping me in rectifying error.
@Ticklefish- Awesome and Simplest tool for Themers and noobs like me.
@My Wife - My Life's Companion, Dearest Friend, My Love & Encouragement. I love you Sweet-Heart. @Xda Forum- The School for New born Techie child like me.
Before beginning to this guide, please make sure that you followed this guide by tdunham line by line and you failed doing so.
I tried this on my Stock ROMs and Other ported ROMs of My Device forum and got this working.
PART-1​
1st Step:-
Decompile Your framework-res.apk and go to - res/value/strings.xml
add this line at the end.
Code:
<string name="global_action_screenshot_txt">Screenshot</string>
<string name="global_action_recovery_txt">BOND Recovery</string>
And add the png attached in this thread to - res/value/drawable-hdpi/mdpi/xhdpi (any one folder you can choose to add the images as according to your device resolution).
Step-2
Now recompile the framework-res.apk and then again decompile the newly compiled framework-res.apk
Then go to - res/values/public.xml and leave it open.
PART-2
Step-1
Now Decompile your stock "android.policy.jar" and add the attached "android.policy" files to - "android.policy.jar\smali\com\android\internal\policy\impl"
Now open GlobalActions.smali.
and find this lines.
Code:
.field private mRingerModeReceiverRegistered:Z
Just below this line make space for a line just like as its there (One space above the line & One space below)
Then Add these lines
Code:
.field mScreenshotConnection:Landroid/content/ServiceConnection;
.field final mScreenshotLock:Ljava/lang/Object;
.field final mScreenshotTimeout:Ljava/lang/Runnable;
Now find this line
Code:
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
Add these line below that.
Code:
.line 315
new-instance v4, Ljava/lang/Object;
invoke-direct {v4}, Ljava/lang/Object;-><init>()V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotLock:Ljava/lang/Object;
.line 317
const/4 v4, 0x0
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
.line 318
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$12;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotTimeout:Ljava/lang/Runnable;
Now Find This line -
Code:
.method static synthetic access$1800(Lcom/android/internal/policy/impl/GlobalActions;)V
.locals 0
.parameter "x0"
.prologue
.line 68
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->handleShow()V
return-void
.end method
And Add the line below end method.
Code:
.method static synthetic access$1900(Lcom/android/internal/policy/impl/GlobalActions;)V
.locals 0
.parameter "x0"
.prologue
.line 64
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->takeScreenshot()V
return-void
.end method
Now find this line
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
And add this line below this method and above the line starting with-".line XXX"
Code:
.line 232
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$11;
const v3, 0x1080691 [COLOR=Lime]<-------- This is the ID of "bond_screenshot"[/COLOR]
const v4, 0x1040516 [COLOR=Red] <-------- This is the ID of "global_action_screenshot_txt"[/COLOR]
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$14;
const v3, 0x1080692[COLOR=Lime] <-------- This is the ID of "bond_recovery"[/COLOR]
const v4, 0x1040517 [COLOR=Red]<-------- This is the ID of "global_action_recovery_txt"[/COLOR]
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$14;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Now Find this line--
Code:
# virtual methods
And add this lines just above it with gap of 2(two) Space between "end method" & "Virtual methods"
Code:
.method private takeScreenshot()V
.locals 8
.prologue
.line 330
iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotLock:Ljava/lang/Object;
monitor-enter v4
.line 331
:try_start_0
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
if-eqz v3, :cond_0
.line 332
monitor-exit v4
.line 391
:goto_0
return-void
.line 334
:cond_0
new-instance v0, Landroid/content/ComponentName;
const-string v3, "com.android.systemui"
const-string v5, "com.android.systemui.screenshot.TakeScreenshotService"
invoke-direct {v0, v3, v5}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
.line 336
.local v0, cn:Landroid/content/ComponentName;
new-instance v2, Landroid/content/Intent;
invoke-direct {v2}, Landroid/content/Intent;-><init>()V
.line 337
.local v2, intent:Landroid/content/Intent;
invoke-virtual {v2, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 338
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$BondB;
invoke-direct {v1, p0}, Lcom/android/internal/policy/impl/GlobalActions$BondB;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
.line 386
.local v1, conn:Landroid/content/ServiceConnection;
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
const/4 v5, 0x1
invoke-virtual {v3, v2, v1, v5}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result v3
if-eqz v3, :cond_1
.line 387
iput-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
.line 388
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mHandler:Landroid/os/Handler;
iget-object v5, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotTimeout:Ljava/lang/Runnable;
const-wide/16 v6, 0x2710
invoke-virtual {v3, v5, v6, v7}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
.line 390
:cond_1
monitor-exit v4
goto :goto_0
.end local v0 #cn:Landroid/content/ComponentName;
.end local v1 #conn:Landroid/content/ServiceConnection;
.end local v2 #intent:Landroid/content/Intent;
:catchall_0
move-exception v3
monitor-exit v4
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v3
.end method
Few Things to remeber:-
1) The ID's Need to be Same as in public.xml or else boot loop will shake your hands.
2) The register values like - v0,v1,v2.... need to be managed like what it is in your GlobalActions.smali. For the Comparison I have attached My-GlobalActions.smali for comparison.
Just change the extention from zip to smali.
3) I am also human and will be here after my daily life. So please have patience. I will try to get you out of your problem, if and only if you have a adb logcat.
4) If you find any difficulties then post it in the thread.
The Results after successful completion of this will be same as screenshot.
http://dl.xda-developers.com/attach.../7/6/5/2/2/Screenshot_2013-08-09-02-00-21.jpg
Last But Not Least - Don't get bothered to hit thanks. It will not cost you anything but will surely increase my courage to work and try new things.
Awesome Guide My Brother!!
Happy Eid Mubarak to You and rest of your family
Dzol Cp said:
Awesome Guide My Brother!!
Happy Eid Mubarak to You and rest of your family
Click to expand...
Click to collapse
Thanks a lot brother...
Happy EID to you and The whole XDA family of ours brother...
"""Hitting Thanks Don't Cost You Anything So Why Don't You Try Hitting It......."""
Sent From Mind Blowing Canvas Using SUVI-Heart Rom.....<3<3<3
"Happy EID to you all and the whole XDA Family "
Hey, i want to ask something. What is the meaning of line 315 on this ".line315 new-instance v4, Ljava/lang/Object;"? Sorry, just want to know a bit java programming Thanks for your help
i manage to make it bro..sadly after pressing screenshot my phone reboots..but recovery is working just fine..great tut..
BOND1987 said:
Thanks a lot brother...
Happy EID to you and The whole XDA family of ours brother...
"""Hitting Thanks Don't Cost You Anything So Why Don't You Try Hitting It......."""
Sent From Mind Blowing Canvas Using SUVI-Heart Rom.....<3<3<3
Click to expand...
Click to collapse
I did as your followers. click on the menu button to display the power source immediately my phone reboot
Looking forward to your help
vuong95vjpboy said:
I did as your followers. click on the menu button to display the power source immediately my phone reboot
Looking forward to your help
Click to expand...
Click to collapse
Upload you global actions.smali and public.xml of framework....
"" Hitting Thanks Will Not Cost You Anything, So, Why Don't You Try Hitting It Once.....""
Sent While Checking The "AMOI 4.2.2 Beast".....
BOND1987 said:
Upload you global actions.smali and public.xml of framework....
"" Hitting Thanks Will Not Cost You Anything, So, Why Don't You Try Hitting It Once.....""
Sent While Checking The "AMOI 4.2.2 Beast".....
Click to expand...
Click to collapse
Hi sir, my GlobalActions.smali has different with your file, so i dont know put the code in what line
Can you help me? I attach my original GlobalActions.smali, can you mod the code help me? Thanks!
The id in my framework is:
Code:
<public type="drawable" name="bond_recovery" id="0x010805ef" />
<public type="drawable" name="bond_screenshot" id="0x010805f0" />
<public type="string" name="global_action_screenshot_txt" id="0x010404d5" />
<public type="string" name="global_action_recovery_txt" id="0x010404d6" />
My phone was use MTK chipset, ICS 4.0.4. Here is my power menu screenshot
Thanks!
^
^
 @BOND1987 Can you help me sir? Thanks!
sieuan said:
^
^
@BOND1987 Can you help me sir? Thanks!
Click to expand...
Click to collapse
Yes brother,
Of course I'll help you. Yesterday night I corrupted my windows so brother you have to wait for today and tomorrow I'll do this for you.
BOND1987 said:
Yes brother,
Of course I'll help you. Yesterday night I corrupted my windows so brother you have to wait for today and tomorrow I'll do this for you.
Click to expand...
Click to collapse
Thanks sir!
After follow the guide in this thread: http://forum.xda-developers.com/showthread.php?t=2225970, I succes add 3-Way boot to Power Menu, and it work good
Before:
After:
Now, can you help me add screenshot option into Power Menu, sir? Here is my GlobalActions.smali. Thanks!
sieuan said:
Thanks sir!
After follow the guide in this thread: http://forum.xda-developers.com/showthread.php?t=2225970, I succes add 3-Way boot to Power Menu, and it work good
Before:
After:
Now, can you help me add screenshot option into Power Menu, sir? Here is my GlobalActions.smali. Thanks!
Click to expand...
Click to collapse
I absolutely love your set up. What ROM / Theme is that?
babalonius508 said:
I absolutely love your set up. What ROM / Theme is that?
Click to expand...
Click to collapse
A Vietnamese ROM, for a Chinese phone, modify by me with light holo theme, apex launcher and miui v5 icon pack.
That's a very cool setup! Thanks!
I can't seem to open the GlobalActions.smali in the OP for comparison because it says its corrupt? Any one else have this problem?
babalonius508 said:
That's a very cool setup! Thanks!
I can't seem to open the GlobalActions.smali in the OP for comparison because it says its corrupt? Any one else have this problem?
Click to expand...
Click to collapse
Brother,
Change the extension of zip to .Smali.
Or try opening with notepad++ and you will be able to coordinate with the guide as well.
If you get any problems further to this, just let me know by post it in this thread.
BOND1987 said:
Brother,
Change the extension of zip to .Smali.
Or try opening with notepad++ and you will be able to coordinate with the guide as well.
If you get any problems further to this, just let me know by post it in this thread.
Click to expand...
Click to collapse
Thanks a lot man! I missed that part of the instructions. Does this modification work for all devices?
babalonius508 said:
Thanks a lot man! I missed that part of the instructions. Does this modification work for all devices?
Click to expand...
Click to collapse
I think brother,
Other than TouchWiz, it will work on all AOSP based devices. Though I'm not sure for this but you can try. If you are in trouble, just let me know.
BOND1987 said:
I think brother,
Other than TouchWiz, it will work on all AOSP based devices. Though I'm not sure for this but you can try. If you are in trouble, just let me know.
Click to expand...
Click to collapse
Thank you for all your help!
For some reason, after I finish the modification, I hold the power button and my phone just reboots. I'm not sure what I'm doing wrong.
Here is my framework-res.apk: https://db.tt/xy0QGFiH
And my androidpolicy.jar: https://db.tt/IOe6JAkn
And a logcat: https://db.tt/EiN6Qcot
Thank you again!
babalonius508 said:
Thank you for all your help!
For some reason, after I finish the modification, I hold the post menu and my phone just reboots. I'm not sure what I'm doing wrong.
Here is my framework-res.apk: https://db.tt/xy0QGFiH
And my androidpolicy.jar: https://db.tt/IOe6JAkn
And a logcat: https://db.tt/EiN6Qcot
Thank you again!
Click to expand...
Click to collapse
Brother,
Give me 24 hours only to take look on your files. And I will revert you back as soon as possible. Thanks for posting it here. I appreciate your support brothers.
That sounds great! Thank you! I really hope I can get it working.
Sent from my Nexus 4

[Req] Sense GPS Crosshair Removal

Hey guys! I'm on stock rooted 4.3 sense 5.0 using Xposed framework + Sense 5 toolbox for all the tweaks/mods (awesome btw for anyone unaware) and I've been looking for a way to get rid of the GPS crosshair in the status bar.
I've only had this phone for about a week but I did some searching for something but was unable to come up with anything. The closest I could find was OMJ's mod pack but to enable that feature, it looks like you have enable a couple other things... plus I believe I'm still odexed.
I'd like to stay stock like I am. Is there an easy way to do this, or have I missed something?
Thanks in advance!
Hixman said:
Hey guys! I'm on stock rooted 4.3 sense 5.0 using Xposed framework + Sense 5 toolbox for all the tweaks/mods (awesome btw for anyone unaware) and I've been looking for a way to get rid of the GPS crosshair in the status bar.
I've only had this phone for about a week but I did some searching for something but was unable to come up with anything. The closest I could find was OMJ's mod pack but to enable that feature, it looks like you have enable a couple other things... plus I believe I'm still odexed.
I'd like to stay stock like I am. Is there an easy way to do this, or have I missed something?
Thanks in advance!
Click to expand...
Click to collapse
If you like stock so much then flash the stock deodexed Rom , problem solved
sent from my Sprint HTC ONE using Tapatalk 4
olorolo said:
If you like stock so much then flash the stock deodexed Rom , problem solved
sent from my Sprint HTC ONE using Tapatalk 4
Click to expand...
Click to collapse
Not necessarily. I'd thought of that but, as I said in my previous post, the only mod I'd found that would take care of it is OMJ's mod pack which comes with eqs and something else that I didn't really want.
Thanks for the reply though :laugh: I now feel like I'm being too picky haha! I like my setup but it's the only thing that bothers me having that icon just sitting there for no reason.
Gps removal is a smali mod to SystemUi.apk(not really that hard)
Sent from my HTCONE using Tapatalk
dased14 said:
Gps removal is a smali mod to SystemUi.apk(not really that hard)
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
Please share how to modify it bro because I actually hate it too
Sent from my unknown using Tapatalk
you have to decompile SystemUI.apk and the you have go to smali/com/android/systemui/statusbar/policy/LocationBasedController.small and find this
Code:
method private updateIcon()V
.locals 4
const/4 v1, 0x1
const/4 v2, 0x0
const/4 v0, 0x1
invoke-static {}, Lcom/android/systemui/statusbar/policy/HtcGenericNetworkController;->isVerizon()Z
move-result v3
if-eqz v3, :cond_2
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isGpsEnabled:Z
if-nez v3, :cond_0
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isVerizonLbsEnabled:Z
if-eqz v3, :cond_1
:cond_0
move v0, v2
:goto_0
invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->setIconType(I)V
return-void
:cond_1
move v0, v1
goto :goto_0
:cond_2
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isGpsEnabled:Z
if-eqz v3, :cond_3
move v0, v2
:goto_1
goto :goto_0
:cond_3
move v0, v1
goto :goto_1
.end method
and make it like this
Code:
.method private updateIcon()V
.locals 4
const/4 v0, 0x0
return-void
.end method
then recompile SystemUI.apk(make sure you sign it) and flash or adb push
(i would do it this way.
Code:
adb remount(hit enter)
adb shell stop(hit enter)
adb push<drag newly signed and compiled SystemUI here> /system/app/(hit enter)
adb reboot(hit enter)
then go set permissions(with whatever file explorer you use) to rw-r-r
dased14 said:
you have to decompile SystemUI.apk and the you have go to smali/com/android/systemui/statusbar/policy/LocationBasedController.small and find this
Code:
method private updateIcon()V
.locals 4
const/4 v1, 0x1
const/4 v2, 0x0
const/4 v0, 0x1
invoke-static {}, Lcom/android/systemui/statusbar/policy/HtcGenericNetworkController;->isVerizon()Z
move-result v3
if-eqz v3, :cond_2
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isGpsEnabled:Z
if-nez v3, :cond_0
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isVerizonLbsEnabled:Z
if-eqz v3, :cond_1
:cond_0
move v0, v2
:goto_0
invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->setIconType(I)V
return-void
:cond_1
move v0, v1
goto :goto_0
:cond_2
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isGpsEnabled:Z
if-eqz v3, :cond_3
move v0, v2
:goto_1
goto :goto_0
:cond_3
move v0, v1
goto :goto_1
.end method
and make it like this
Code:
.method private updateIcon()V
.locals 4
const/4 v0, 0x0
return-void
.end method
then recompile SystemUI.apk(make sure you sign it) and flash or adb push
(i would do it this way.
Code:
adb remount(hit enter)
adb shell stop(hit enter)
adb push<drag newly signed and compiled SystemUI here> /system/app/(hit enter)
adb reboot(hit enter)
then go set permissions(with whatever file explorer you use) to rw-r-r
Click to expand...
Click to collapse
thanks bro it worked! :laugh:
dased14 said:
you have to decompile SystemUI.apk and the you have go to smali/com/android/systemui/statusbar/policy/LocationBasedController.small and find this
Click to expand...
Click to collapse
nice...this is how I did it...
Code:
find:
.method public static isSupported()Z
.locals 1
invoke-static {}, Lcom/android/systemui/statusbar/policy/HtcGenericNetworkController;->isSprint()Z
move-result v0
return v0
.end method
change to:
.method public static isSupported()Z
.locals 1
invoke-static {}, Lcom/android/systemui/statusbar/policy/HtcGenericNetworkController;->isSprint()Z
move-result v0
if-eqz v0, :cond_e
:cond_e
const/4 v0, 0x0
return v0
.end method
this xposed module might get rid of it: http://forum.xda-developers.com/showthread.php?t=2353965
its purpose is to fix the data icons, but it also gets rid of the persistent gps icon (on 4.1.2 at least, the 4.3 rom I'm using already has it removed so I haven't checked that on 4.3).
hotaru2k3 said:
this xposed module might get rid of it: http://forum.xda-developers.com/showthread.php?t=2353965
its purpose is to fix the data icons, but it also gets rid of the persistent gps icon (on 4.1.2 at least, the 4.3 rom I'm using already has it removed so I haven't checked that on 4.3).
Click to expand...
Click to collapse
Nice! Confirmed working on 4.3.
Sent from my HTCONE using Tapatalk

[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]

[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]
How to permenantly remove SysScope from your Samsung Touchwiz ROM​
Tired of the constant custom padlock on startup? Want permenant device status "Official"?​
Team Blackout and KoolKit ROMs are not responsible if you blow up your house, your dog eats your homework,
the zombie apacolypse, your wife/husband divorcing you or if your device turns into an unrecognizable
smoldering pile of plastic. by reading this you agree to take all responsibility for any damage you do to the
universe, your device, your marriage or your failing grades in school or college.
Click to expand...
Click to collapse
This guide and mod originated in the Galaxy S4 threads and was created by @Aou who has since left the AT&T world so development
stopped at that point, I have taken the code and modded it slightly to work for our S5 devices (All variants even the Active)
Click to expand...
Click to collapse
All devs are free to use this MOD with proper recognition in your OP make sure you provide a mention to "Aou" for the
original code found here Removing SysScope - Permanent "Official" Device Status
and myself for the re-write of the instructions and changes to make this work for our devices.
Click to expand...
Click to collapse
NOTICE:
This MOD is not for the squeamish or novice modder it requires patience and a good amount of time to complete.
Click to expand...
Click to collapse
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Main Instructions:
1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)
2. Pull a copy of the SecSettings.apk
adb pull /system/priv-app/SecSettings.apk
3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)
4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.
REMOVE:
Code:
.field private isSysScopeStatus:I
REMOVE:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
REMOVE:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
REMOVE:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
REMOVE:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.
Code:
.line 952
const v1, 0x7f0901a7
TO:
Code:
.line 952
const v1, [B]0x7f0901a5[/B]
CHANGE:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
TO:
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
[B]const v1, 0x7f0901a6[/B]
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
Delete: /smali/com/android/settings/deviceinfo/status$2.smali
re-compile SecSettings.apk
INSTALL:
Install! Use "adb shell" to begin, and use the following commands, one at a time:
rm /system/app/SysScope.apk
rm -r /data/dalvik-cache/*
push SecSettings.apk /system/priv-app/SecSettings.apk
chmod 0644 /system/priv-app/SecSettings.apk
reboot
Click to expand...
Click to collapse
reserved
reserved
Nice. People with o.c.d. are gonna love this. Nice work.
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
GDofWR420 said:
Nice. People with o.c.d. are gonna love this. Nice work.
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Click to expand...
Click to collapse
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
cstayton said:
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
Click to expand...
Click to collapse
Lol. Yea no coffee this morning but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.
Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Here is not working
The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?
or change this
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
for this
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f0901a6
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
?
eric-filth said:
Here is not working
The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?
or change this
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
for this
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f0901a6
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
?
Click to expand...
Click to collapse
you need to change the whole method out the lines with the ID are what you need to look up in your build to match to the appropriate status response.
GDofWR420 said:
Lol. Yea no coffee this morning but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.
Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Click to expand...
Click to collapse
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
cstayton said:
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
Click to expand...
Click to collapse
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.
Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
GDofWR420 said:
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.
Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
Click to expand...
Click to collapse
hmmmm, i wonder if it has an entry in csc that it couldnt handle because its locked down? I might have to re-think the whole "xPosed-Proof" feature mod.
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
deduction said:
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
Click to expand...
Click to collapse
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
cstayton said:
How to permenantly remove SysScope from your Samsung Touchwiz ROM​
Tired of the constant custom padlock on startup? Want permenant device status "Official"?​
NOTICE:
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Main Instructions:
1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)
2. Pull a copy of the SecSettings.apk
adb pull /system/app/SecSettings.apk
3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)
4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.
REMOVE:
Code:
.field private isSysScopeStatus:I
REMOVE:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
REMOVE:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
REMOVE:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
REMOVE:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.
Code:
.line 952
const v1, 0x7f0901a7
TO:
Code:
.line 952
const v1, [B]0x7f0901a5[/B]
CHANGE:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
TO:
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
[B]const v1, 0x7f0901a6[/B]
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
INSTALL:
Click to expand...
Click to collapse
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
elliwigy said:
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
from the error looks as if you are trying to decompile with the wrong frameworks youll need to make sure the framework-res.apk and twframework-res.apk are the ones unmodded stock ones from your rom base
elliwigy said:
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
once you have the mod completed yes, remove sysscope.apk and place modded secsettings in rom base and flash
ok...can you take a look at these? I get about half way through your guide and then it gets lost. I don't know if the info just isnt there or what?
Thanks!
deduction said:
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
Click to expand...
Click to collapse
your not looking sysscope your actually looking for " <public type="string" name="sysscope_normal" you have to be specific in the search
am having trouble getting dropbox or anywhere to work. Here is the untouched status.smali.
Thanks very much...I keep getting stumped because the edits I need to make just don't seem to be there when I decompile the apk. Not sure why.
small change in OP
small change in OP
Delete: /smali/com/android/settings/deviceinfo/status$2.smali
re-compile SecSettings.apk
Hello.thanks man. Working great on my 5.1.1 Samsung note edge ROM..
regards
@cstayton
"<public type="string" name="sysscope_tampered" id="0x7f0a01be" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0a01bd" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0a01bc" />"
Those are my public values.
Im having trouble with the last Change. I have changed and removed everything else, could you help me with the last step? Im not sure what needs to be changed. My smali.status should be attached. any help is appreciated. thank you

Categories

Resources