[MOD][TUTORIAL]Longpress back to kill app[STOCK ROM][JB] - Galaxy Note 10.1 Android Development

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

Related

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

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.

(Development) swipe to remove notifications for galaxy y duos

This thread is just for development purpose and will be used to discuss on the development of the feature "swipe to remove notifications". Currently i am Trying it on the ics fusion rom created by hell_lock. So if anyone who can contribute is welcomed.
Here is the tutorial that i am using to implement the function- http://forum.xda-developers.com/showthread.php?t=1658720
If anyone wants to start the development then i have attached the stock deodexed 'SystemUI.apk' and 'framework.jar' in the attachments.
reserved for testing
Can you post a log of compiling? that guide is good enough.Are you geting a multiple definition error?
b16h22 said:
Can you post a log of compiling? that guide is good enough.Are you geting a multiple definition error?
Click to expand...
Click to collapse
now i am not facing any error in compiling, i guess i made a mistake before,
So now i am working on this from the begining.
Anshul Rajput said:
now i am not facing any error in compiling, i guess i made a mistake before,
So now i am working on this from the begining.
Click to expand...
Click to collapse
There is a small change in the last edit of IStatusBarService$Stub$Proxy.smali
The red part in the code below must be same as
.method public onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
.registers 9
.parameter "pkg"
.parameter "tag"
.parameter "id"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.prologue
.line 359
invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;
move-result-object v0
.line 360
.local v0, _data:Landroid/os/Parcel;
invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;
move-result-object v1
.line 362
.local v1, _reply:Landroid/os/Parcel;
:try_start_8
const-string v2, "com.android.internal.statusbar.IStatusBarService"
invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/StringV
.line 363
invoke-virtual {v0, p1}, Landroid/os/Parcel;->writeString(Ljava/lang/StringV
.line 364
invoke-virtual {v0, p2}, Landroid/os/Parcel;->writeString(Ljava/lang/StringV
.line 365
invoke-virtual {v0, p3}, Landroid/os/Parcel;->writeInt(I)V
.line 366
iget-object v2, p0, Lcom/android/internal/statusbar/IStatusBarService$Stub$Proxy;->mRemote:Landroid/os/IBinder;
const/16 v3, 0xa
const/4 v4, 0x0
invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
.line 367
invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
:try_end_21
.catchall {:try_start_8 .. :try_end_21} :catchall_28
.line 370
invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V
.line 371
invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V
.line 373
return-void
.line 370
:catchall_28
move-exception v2
invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V
.line 371
invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V
throw v2
.end method
Click to expand...
Click to collapse
the red part in this code in IStatusBarService$Stub.smali
.field static final TRANSACTION_onNotificationError:I = 0xc
Click to expand...
Click to collapse
so change the code to
const/16 v3, 0xc
Click to expand...
Click to collapse
I wl try today ..for 3rd time
Sent from my GT-S6102 using Tapatalk 2
b16h22 said:
Can you post a log of compiling? that guide is good enough.Are you geting a multiple definition error?
Click to expand...
Click to collapse
now i am getting this error while compiling the SystemUI
HTML:
C:\Users\Anshul Rajput\Desktop\New folder (2)\SystemUI\dist>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Anshul Rajput said:
now i am getting this error while compiling the SystemUI
HTML:
C:\Users\Anshul Rajput\Desktop\New folder (2)\SystemUI\dist>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Click to expand...
Click to collapse
Use smali/baksmali or baksmali manager.That'll give you more clear idea of the error.
b16h22 said:
Use smali/baksmali or baksmali manager.That'll give you more clear idea of the error.
Click to expand...
Click to collapse
can you tell me, what i am doing wrong and correct me.
manoranjan2050 said:
I wl try today ..for 3rd time
Sent from my GT-S6102 using Tapatalk 2
Click to expand...
Click to collapse
bro, can you tell me what problem you faced last time when you tried to get this work.
Anshul Rajput said:
can you tell me, what i am doing wrong and correct me.
Click to expand...
Click to collapse
what i was saying that You cant figure out the error from that log.Using smali/baksmali tool can give you can find out the error.
extract this zip View attachment 1294021.Put the contents in a folder.Drag and drop classes.dex from systemui.apk into the same folder.Open command prompt in that folder.Type this
java -jar baksmali.jar -o dexout/ classes.dex
Click to expand...
Click to collapse
that will give you a folder "dexout".It's the same folder as "smali" in apktool.Edit the smali files.To recompile, type
java -jar smali.jar dexout/ -o new-classes.dex
Click to expand...
Click to collapse
Delete the old classes.dex.Rename "new-classes.dex" to "classes.dex".Drag this classes.dex into systemui.apk using winrar or 7zip.
First of all, thanks to OP to open such a thread for my rom development. I am going to try compiling using baksmali, will giv u log as fast as possible.
---------- Post added at 07:22 PM ---------- Previous post was at 07:15 PM ----------
no viable at input '<'
problem in StatusBarService.smali[3871,85]
hell_lock said:
First of all, thanks to OP to open such a thread for my rom development. I am going to try compiling using baksmali, will giv u log as fast as possible.
---------- Post added at 07:22 PM ---------- Previous post was at 07:15 PM ----------
no viable at input '<'
problem in StatusBarService.smali[3871,85]
Click to expand...
Click to collapse
can you correct me, where i am wrong
HTML:
invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v7, p1
invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v9
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
.line 581
:cond_1
.line 658
const v1, 0x7f09002f
invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v1
move-object v0, v1
Anshul Rajput said:
can you correct me, where i am wrong
HTML:
invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v7, p1
invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v9
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
.line 581
:cond_1
.line 658
const v1, 0x7f09002f
invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v1
move-object v0, v1
Click to expand...
Click to collapse
this is my code
Code:
invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v7, p1
invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v9
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
.line 581
:cond_1
const v1, 0x7f09002f
invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v1
move-object v0, v1
b16h22 said:
this is my code
Code:
invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v7, p1
invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v9
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
.line 581
:cond_1
const v1, 0x7f09002f
invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v1
move-object v0, v1
Click to expand...
Click to collapse
not able to compile even using your code
are you able to compile SystemUI ?
Anshul Rajput said:
not able to compile even using your code
are you able to compile SystemUI ?
Click to expand...
Click to collapse
cond_1 has multiple definitions-error
---------- Post added at 08:02 PM ---------- Previous post was at 07:55 PM ----------
I finally compiled it without errors!! To fix that errors change "cond_1" to "cond_5"
hell_lock said:
cond_1 has multiple definitions-error
---------- Post added at 08:02 PM ---------- Previous post was at 07:55 PM ----------
I finally compiled it without errors!! To fix that errors change "cond_1" to "cond_5"
Click to expand...
Click to collapse
thanks very much, was able to compile at last.
can anyone, help me while compiling framework.jar i am getting this error
HTML:
Smali selected
Smali working...
framework\com\android\internal\statusbar\IStatusBarService$Stub$Proxy.smali[1024,
0] missing END_METHOD_DIRECTIVE at '.method'
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[607,4] Labe
l sswitch_132 has multiple defintions.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[148,23] Lab
el "sswitch_data_15a" is not defined.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[0,0] mismat
ched tree node: I_STATEMENTS expecting <UP>
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[134,0] A no
n-abstract/non-native method must have at least 1 instruction
Finished
Press any key to continue . . .
Anshul Rajput said:
can anyone, help me while compiling framework.jar i am getting this error
HTML:
Smali selected
Smali working...
framework\com\android\internal\statusbar\IStatusBarService$Stub$Proxy.smali[1024,
0] missing END_METHOD_DIRECTIVE at '.method'
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[607,4] Labe
l sswitch_132 has multiple defintions.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[148,23] Lab
el "sswitch_data_15a" is not defined.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[0,0] mismat
ched tree node: I_STATEMENTS expecting
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[134,0] A no
n-abstract/non-native method must have at least 1 instruction
Finished
Press any key to continue . . .
Click to expand...
Click to collapse
There is duplicate of same coding in the file.Search for sswitch_132.Check the codes above and below to identify the duplicate.
wait,i'll upload my file.
EDIT: here it is View attachment IStatusBarService$Stub.zip
sent while doin' some burnouts
Anshul Rajput said:
thanks very much, was able to compile at last.
Click to expand...
Click to collapse
Anshul Rajput said:
can anyone, help me while compiling framework.jar i am getting this error
HTML:
Smali selected
Smali working...
framework\com\android\internal\statusbar\IStatusBarService$Stub$Proxy.smali[1024,
0] missing END_METHOD_DIRECTIVE at '.method'
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[607,4] Labe
l sswitch_132 has multiple defintions.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[148,23] Lab
el "sswitch_data_15a" is not defined.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[0,0] mismat
ched tree node: I_STATEMENTS expecting <UP>
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[134,0] A no
n-abstract/non-native method must have at least 1 instruction
Finished
Press any key to continue . . .
Click to expand...
Click to collapse
Wait.. I am starting to mod framework.jar right now.. will report soon. a tip for u.. if you get multiple definitions error then you need to locate the wrong line and modify it like we did it last time for "cond_1". I hope the rest of the code is not dependant on the line we modified or we would get into trouble...

[How-To]CRT-OFF Animation Toggle (made using XXEMB5 [4.1.2])

I'm posting this here as I helped Kryten2k35 make this for his base XXEMB5 (4.1.2) but they are all likely very similar.
The code is very similar to the SGS2 and I have edited it for this base. My original thread is here: http://forum.xda-developers.com/showthread.php?t=2194003
I've been having many PM's on how to create this toggle and honestly I have been meaning to post this for a while.
Firstly thanks to Mirko-ddd for enabling Crt-Off Animation which allowed me to do this. Thank him HERE
No need to enable from the link above as I have included it with this toggle How-To.
Also Thanks to my teammate Jeboo for teaching me some smali and helping me with this function!
So I'm not a posting master and I do have 2 kids buzzing around me while I type this!.. LOL :highfive:
Here we start with SecSettings.apk
1)
/res/values/Strings.xml
Code:
<string name="crtanimation_title">CRT Animation</string>
<string name="crtanimation_summary">Enables animation when powering off screen</string>
2)
/res/xml/Display_Settings.xml (Input this line where you want it to show.)
Code:
<CheckBoxPreference android:title="@string/crtanimation_title" android:summary="@string/crtanimation_summary" android:key="crtanimation_toggle" />
3)
\SecSettings\smali\com\android\settings\DisplaySettings.smali
Add the RED
Code:
.field mSupportFolderType:Z
.field private mTouchKeyLight:Landroid/preference/ListPreference;
[COLOR="red"].field private mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
4)
Code:
const-string v13, "key_multi_window"
move-object/from16 v0, p0
invoke-virtual {v0, v13}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v13
check-cast v13, Landroid/preference/CheckBoxPreference;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[COLOR="red"] const-string v13, "crtanimation_toggle"
move-object/from16 v0, p0
invoke-virtual {v0, v13}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v13
check-cast v13, Landroid/preference/CheckBoxPreference;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual/range {p0 .. p0}, Lcom/android/settings/DisplaySettings;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v13
const-string v14, "com.sec.feature.multiwindow.phone"
invoke-virtual {v13, v14}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z
5)
Code:
:cond_15
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
[COLOR="Red"]if-eqz v0, :cond_new[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :cond_16
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v2, "multi_window_enabled"
invoke-static {v0, v2, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
:cond_16
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
[COLOR="red"] :cond_new
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 987
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 988
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "crtanimation_toggle"
if-nez v0, :cond_newA
const/4 v0, 0x0
goto :cond_newB
:cond_newA
const/4 v0, 0x1
:cond_newB
invoke-static {v3, v4, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
[/COLOR]
.end method
6)
Code:
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_5
:goto_2
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
:cond_2
[COLOR="red"] iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "crtanimation_toggle"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :goto_2b
const/4 v1, 0x1
goto :goto_2c
:goto_2b
const/4 v1, 0x0
:goto_2c
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
return-void
:cond_3
move v0, v2
goto :goto_0
:cond_4
iget v0, p0, Lcom/android/settings/DisplaySettings;->mDirect:I
That's it for SecSettings.
Recompile and test it functions before continuing.
Once that works lets enable the function.
I'm including the function to enable as previously linked to mirko_ddd's thread.
Next we mod services.jar
7)
\services\smali\com\android\server\PowerManagerService$ScreenBrightnessAnimator.smali
Code:
#setter for: Lcom/android/server/PowerManagerService;->mHighestLightSensorValue:I
invoke-static {v7, v9}, Lcom/android/server/PowerManagerService;->access$8202(Lcom/android/server/PowerManagerService;I)I
:cond_1
:goto_1
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
[COLOR="Red"] move-object v0, p0
iget-object v2, v0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/server/PowerManagerService;->access$2300(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v9, "crtanimation_toggle"
const/4 v10, 0x0
invoke-static {v2, v9, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_new2
if-eqz p2, :cond_new2
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_new2
[/COLOR]
const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
const/16 v9, 0xa
invoke-virtual {v7, v9, p1, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v2
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
And that's it!
Recompile and enjoy.
All I ask is for credit in your Mod or Rom.
Re: [How-To]CRT-OFF Animation Toggle (made using XXEMR2 [4.1.2])
thanx, I will try to add it to my frmaework
Chaos ^_^ said:
thanx, I will try to add it to my frmaework
Click to expand...
Click to collapse
when i tried to recompile SecSettings.apk i got this message
C:\apktoolv3>apktool b working/SecSettings built/SecSettings-unsigned.apk
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:243)
at brut.androlib.Androlib.buildSources(Androlib.java: 200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
any idea ?
Chaos ^_^ said:
when i tried to recompile SecSettings.apk i got this message
C:\apktoolv3>apktool b working/SecSettings built/SecSettings-unsigned.apk
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:243)
at brut.androlib.Androlib.buildSources(Androlib.java: 200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
any idea ?
Click to expand...
Click to collapse
Please attach/post the decompiled XML's and Smali that were modded so I can look at what was done.
ok
shoman94 said:
Please attach/post the decompiled XML's and Smali that were modded so I can look at what was done.
Click to expand...
Click to collapse
here is the files
Chaos ^_^ said:
here is the files
Click to expand...
Click to collapse
So I can see a typo (extra space) in string.xml which is likely not a problem but should be fixed.
You didn't attach display_settings.xml so I can't see that one.
But the main Issue I see is Edit#5.
You changed the line to cond_new but you didn't add the :cond_new code at the end of that method. Scroll down edit#5 in the OP and you will see.
I hope that helps.
shoman94 said:
So I can see a typo (extra space) in string.xml which is likely not a problem but should be fixed.
You didn't attach display_settings.xml so I can't see that one.
But the main Issue I see is Edit#5.
You changed the line to cond_new but you didn't add the :cond_new code at the end of that method. Scroll down edit#5 in the OP and you will see.
I hope that helps.
Click to expand...
Click to collapse
unfortunately its still not working, thanks anyway
Chaos ^_^ said:
unfortunately its still not working, thanks anyway
Click to expand...
Click to collapse
Sorry you are having trouble. Before adding the changes make sure you can compile it to begin with. I know it works as Kryten2k35 compiled it without issue and it all works fine.
Good luck.
shoman94 said:
Sorry you are having trouble. Before adding the changes make sure you can compile it to begin with. I know it works as Kryten2k35 compiled it without issue and it all works fine.
Good luck.
Click to expand...
Click to collapse
its working without adding your mod, anyway I will try again tonight
Works fine for me. CRT-OFF is correct enabled/disabled with this mod
I have only one problem with display correct name of the toggle added.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
slim80 said:
Works fine for me. CRT-OFF is correct enabled/disabled with this mod
I have only one problem with display correct name of the toggle added.
Click to expand...
Click to collapse
What language is that?
I'm taking a guess here, but you need to add translations to other strings for different languages.
Like for example you want to add the mod to the russian language, you have to mod strings-ru.
Try that...
---------- Post added at 06:22 PM ---------- Previous post was at 06:18 PM ----------
Thanks for this mod.
Works perfect for me.
I cannot find :cond_0 from step #5 in the OP.
I even looking in Wanam's MB5 smali and could not find a match for it in there either. Was this a typo or can someone give me some surrounding code to port this over please? Tnx
Edit: Should it be :cond_new maybe?
tdunham said:
I cannot find cond_0 from step #5 in the OP.
I even looking in Wanam's MB5 smali and could not find it in there either. Was this a typo or can someone give me some surrounding code to port this over please? Tnx
Click to expand...
Click to collapse
What the condition was that you changed to cond_new will go in place of cond_0 in step 5. Understand?
Edit: that cond can depend on the decompiler.
Edit2: don't forget to scroll down in step 5 for more code to put in.
Sent from my Transformer Prime TF201 using Tapatalk 2
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
You cannot, you need a custom kernel to do that and there are'nt for leaked roms. Maybe you can have it working to some degree but it always be defective. That mod requires support by the kernel, smali modifications apart.
Ive done this mod on stock 4.1.2 also and there wasnt any problem.
And it works with stock kernel as long as your connected to wifi.
My question is since i cant find that specific smali, do i edit another smali or search in another folder?
I can do the rest x)
Sent from my GT-N7100 using Tapatalk 4 Beta
AskinSavascisi said:
Ive done this mod on stock 4.1.2 also and there wasnt any problem.
And it works with stock kernel as long as your connected to wifi.
My question is since i cant find that specific smali, do i edit another smali or search in another folder?
I can do the rest x)
Sent from my GT-N7100 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Sorry buddy, I think I misunderstood the thread for another one.
Sorry I can't help, though.
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
Maybe you can ask @criscan to help you out
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
It's totally different on 4.2.2.... look in the sgs4 section under themes and apps.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
@shoman94
Thanks to your awesome tutorial, I've added CRT Off animation to my ROM.. But there is something I'd like to mention... The CRT off effect works great.. no lag, no nothing.. but if I turn CRT animation off from Settings then there is always a "slight delay" when I lock my phone (i.e power off the display with the power button).. like the screen will be "almost dark" for a second then it will shut off completely..
Its kind of hard for me to explain this in words but I hope that you understood what I meant.. PS: In addition to your tutorial, I also followed this to prevent a "glitch turning off effect"

[TUTORIAL][JB/KK] how to add reboot , recovery and bootloader options in Power menu

So lets Start
Required
1-apktool
2-notepad++
3-some brains
REBOOT OPTIONS KK 4.4.2
USE THE RESOURCES ATTACHED BELOW (IF U HAVE ANY PROBLEMS DE/RECOMPILING ANDROID.POLICY.JAR USE THE smali.jar and backsmali.jar attached in the below resources)
framework-res.apk
-----------------
1 - Add to strings.xml:
Code:
<string name="reboot">@string/factorytest_reboot</string>
<string name="reboot_normal">@string/factorytest_reboot</string>
<string name="reboot_recovery">Recovery</string>
<string name="reboot_bootloader">Bootloader</string>
2 - Add to arrays.xml:
Code:
<string-array name="reboot_options">
<item>@string/reboot_normal</item>
<item>@string/reboot_recovery</item>
<item>@string/reboot_bootloader</item>
</string-array>
<string-array name="reboot_actions">
<item>now</item>
<item>recovery</item>
<item>bootloader</item>
</string-array>
3 - Add under \res\drawable-xxhdpi\ folder:
ic_lock_reboot.png
4 - Compile framework-res.apk
android.policy.jar
------------------
1 - Edit:
\com\android\internal\policy\impl\GlobalActions.smali
...LOOK FOR...
Code:
.line 252
.local v9, "quickbootEnabled":Z
:goto_3d
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x10400cb
invoke-direct {v1, p0, v2, v3, v9}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIZ)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[COLOR="Red"]
.line 282
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$12;
const v2, 0x108094c ----- HEX ID OF ic_lock_reboot.png ( make sure to change the hex id comparing ur Public xml )
const v3, 0x10407e8 ----- HEX ID OF reboot STRING ( make sure to change the hex id comparing ur Public xml )
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/COLOR]
.line 283
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
2 - Add these three new files:
GlobalActions$12$1.smali
GlobalActions$12$2.smali
GlobalActions$12.smali
3 - Done !!
FOR JB 4.3​
Before u decompile anything see this Guide by @erorcun for how to compile a JB framework without bootloop..
http://forum.xda-developers.com/showthread.php?t=2321207
STEP-1
Decompile Framework-res.apk
goto to res/vlaues/arrays.xml
and add these lines at the end
Code:
<string-array name="reboot_options">
<item>@string/reboot_normal</item>
<item>@string/reboot_recovery</item>
<item>@string/reboot_bootloader</item>
</string-array>
<string-array name="reboot_actions">
<item>now</item>
<item>recovery</item>
<item>bootloader</item>
</string-array>
now goto res/values/strings
and add these lines at the end
Code:
<string name="reboot">Reboot</string>
<string name="reboot_normal">Reboot</string>
<string name="reboot_recovery">Recovery</string>
<string name="reboot_bootloader">Bootloader</string>
goto add the ic_lock_reboot.png which i have i provided in the resources attached below this post to drawablw-hdpi folder
so before compiling the framework-res.apk follow erorcun's guide to properly recompile framework-res.apk
once recompile is done ....decompile again to get the HEX ID's
STEP-2
decompile android.policy.jar
goto classout\com\android\internal\policy\impl
and add the 3 smali's files which i provided in the resources attached below
Now option classout\com\android\internal\policy\impl\GlobalActions.smali
and find these lines and add the red marked lines between them
Code:
.line 235
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x10400fa
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[COLOR="Red"] .line 213
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, 0x1080827
const v4, 0x104060b
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[/COLOR]
.line 260
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
now we need to assign the Hex id's as per ur Public.xml
NOTE: the hex id's might be different from mine and yours so be careful while comparing
new as per the above changes in GlobalActions.xml
assign the id's as below
<public type="drawable" name="ic_lock_reboot" id="0x01080827" />
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$11;
const v3, 0x[COLOR="red"]1080827[/COLOR]
<public type="string" name="reboot" id="0x0104060b" />
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$11;
const v3, 0x1080827
const v4, 0x[COLOR="red"]104060b[/COLOR]
Now option up classout\com\android\internal\policy\impl\GlobalActions$11.smali
find and replace the following
@line 70
<public type="string" name="reboot" id="0x0104060b" />
Code:
const v3, 0x[COLOR="red"]104060b[/COLOR]
@line 90
<public type="array" name="reboot_options" id="0x0107003b" />
Code:
const v3, 0x[COLOR="red"]107003b[/COLOR]
@line 105
<public type="string" name="ok" id="0x0104000a" />
Code:
const v2, 0x[COLOR="red"]104000a[/COLOR]
@line 147
<public type="bool" name="config_sf_slowBlur" id="0x0111000b" />
Code:
const v3, 0x[COLOR="red"]111000b[/COLOR]
now open up classout\com\android\internal\policy\impl\GlobalActions$11$2.smali
@line 59
<public type="array" name="reboot_actions" id="0x0107003c" />
Code:
const v2, 0x[COLOR="red"]107003c[/COLOR]
save it and recompile android.policy.jar
now push all the files into ut phone...will have the new Advanced reboot options
CREDITS
@serajr --- my smali teacher
@auras76 -- for testing this method will work or not​
reserved
need this to
Congrats...
Anytime bro...
Inquiry...
I've tried and followed this instructions to a reboot to recovery.
I was able to recompile it after i've added the strings in strings.xml and the hdpi and xhdpi, However, when I decompiled it again to get the hex id it is giving me an error would you mind telling me what i've missed out?
Here is the log.
Decompiling "framework-res.apk"
With Tickle My Android
(tinyurl.com\ticklemyandroid)
----------------
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Francis\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=sharedUserId, value=0x00000020
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttrib uteValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute (MXSerializer.java:673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelega te.attribute(XmlSerializerDelegate.java:106)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializer Wrapper.writeStartTag(StaticXmlSerializerWrapper.j ava:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializer Wrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.e vent(XmlPullStreamDecoder.java:80)
at brut.androlib.res.decoder.XmlPullStreamDecoder.dec ode(XmlPullStreamDecoder.java:130)
at brut.androlib.res.decoder.XmlPullStreamDecoder.dec odeManifest(XmlPullStreamDecoder.java:144)
at brut.androlib.res.decoder.ResFileDecoder.decodeMan ifest(ResFileDecoder.java:131)
at brut.androlib.res.AndrolibResources.decode(Androli bResources.java:218)
at brut.androlib.Androlib.decodeResourcesFull(Androli b.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:11 4)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
----------------
Decompile Not Successful!
Thank you for your time. =)
Pangkoy08 said:
I've tried and followed this instructions to a reboot to recovery.
I was able to recompile it after i've added the strings in strings.xml and the hdpi and xhdpi, However, when I decompiled it again to get the hex id it is giving me an error would you mind telling me what i've missed out?
Here is the log.
Decompiling "framework-res.apk"
With Tickle My Android
(tinyurl.com\ticklemyandroid)
----------------
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Francis\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=sharedUserId, value=0x00000020
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttrib uteValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute (MXSerializer.java:673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelega te.attribute(XmlSerializerDelegate.java:106)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializer Wrapper.writeStartTag(StaticXmlSerializerWrapper.j ava:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializer Wrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.e vent(XmlPullStreamDecoder.java:80)
at brut.androlib.res.decoder.XmlPullStreamDecoder.dec ode(XmlPullStreamDecoder.java:130)
at brut.androlib.res.decoder.XmlPullStreamDecoder.dec odeManifest(XmlPullStreamDecoder.java:144)
at brut.androlib.res.decoder.ResFileDecoder.decodeMan ifest(ResFileDecoder.java:131)
at brut.androlib.res.AndrolibResources.decode(Androli bResources.java:218)
at brut.androlib.Androlib.decodeResourcesFull(Androli b.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:11 4)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
----------------
Decompile Not Successful!
Thank you for your time. =)
Click to expand...
Click to collapse
as i mentioned u need to recompile ur framework using erorcun's guide...the link is in OP.....that y u getting this error
Code:
.line 235
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x10400fa
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
cant find dat brov..... please help!!!
whalesplaho said:
Code:
.line 235
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x10400fa
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
cant find dat brov..... please help!!!
Click to expand...
Click to collapse
u need to add this line to GlobalActions.smali
EDIT: follow the tut properly....below this line u need to add the RED lines showed in OP
Nice guide.. Thanks.
Would the 'bootloader' option reboot into fastboot then?
Pangkoy08 said:
I've tried and followed this instructions to a reboot to recovery.
I was able to recompile it after i've added the strings in strings.xml and the hdpi and xhdpi, However, when I decompiled it again to get the hex id it is giving me an error would you mind telling me what i've missed out?
Here is the log.
Decompiling "framework-res.apk"
With Tickle My Android
(tinyurl.com\ticklemyandroid)
----------------
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Francis\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=sharedUserId, value=0x00000020
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttrib uteValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute (MXSerializer.java:673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelega te.attribute(XmlSerializerDelegate.java:106)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializer Wrapper.writeStartTag(StaticXmlSerializerWrapper.j ava:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializer Wrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.e vent(XmlPullStreamDecoder.java:80)
at brut.androlib.res.decoder.XmlPullStreamDecoder.dec ode(XmlPullStreamDecoder.java:130)
at brut.androlib.res.decoder.XmlPullStreamDecoder.dec odeManifest(XmlPullStreamDecoder.java:144)
at brut.androlib.res.decoder.ResFileDecoder.decodeMan ifest(ResFileDecoder.java:131)
at brut.androlib.res.AndrolibResources.decode(Androli bResources.java:218)
at brut.androlib.Androlib.decodeResourcesFull(Androli b.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:11 4)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
----------------
Decompile Not Successful!
Thank you for your time. =)
Click to expand...
Click to collapse
Wrong frameworks installed i guess..
sandy7 said:
u need to add this line to GlobalActions.smali
EDIT: follow the tut properly....below this line u need to add the RED lines showed in OP
Click to expand...
Click to collapse
i dnt know where to place it since i cant tha above line...... should i add it anywhere?
what about here?
Code:
.line 211
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$2;
const v3, 0x1080030
const v4, 0x104018e
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$2;-><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$11;
const v3, 0x7f020000
const v4, 0x7f030000
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
.line 236
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 239
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$3;
const v3, 0x10805e8
const v4, 0x10400c1
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 263
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
whalesplaho said:
i dnt know where to place it since i cant tha above line...... should i add it anywhere?
what about here?
Click to expand...
Click to collapse
as per ur codes the changes will be in RED (note if u ahve my old reboot mod plz start from a fresh android.policy.jar)
Code:
.line 211
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$2;
const v3, 0x1080030
const v4, 0x104018e
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[COLOR="Red"].line 213
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, 0x1080827
const v4, 0x104060b
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[/COLOR]
.line 239
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$3;
const v3, 0x10805e8
const v4, 0x10400c1
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 263
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
NuriJ said:
Nice guide.. Thanks.
Would the 'bootloader' option reboot into fastboot then?
Click to expand...
Click to collapse
yes i does i think...i never tested it my self....lol
sandy7 said:
as per ur codes the changes will be in RED (note if u ahve my old reboot mod plz start from a fresh android.policy.jar)
Code:
.line 211
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$2;
const v3, 0x1080030
const v4, 0x104018e
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[COLOR="Red"].line 213
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, 0x1080827
const v4, 0x104060b
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[/COLOR]
.line 239
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$3;
const v3, 0x10805e8
const v4, 0x10400c1
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 263
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Click to expand...
Click to collapse
starting afresh brov.... thanks!!!
ll give it a shot & drop feedback.:good::good:
sandy7 said:
yes i does i think...i never tested it my self....lol
Click to expand...
Click to collapse
reboot tha phone when reboot to bootloader select.....
Sandy i think in tha tut, we only edit for reboot now & recovery.... none for bootloader!
but i notice i dnt have airplane mode in power options anymore!
---------- Post added at 11:51 AM ---------- Previous post was at 11:26 AM ----------
thanks for tut brov..... works fine!
{
"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"
}
whalesplaho said:
reboot tha phone when reboot to bootloader select.....
Sandy i think in tha tut, we only edit for reboot now & recovery.... none for bootloader!
but i notice i dnt have airplane mode in power options anymore!
---------- Post added at 11:51 AM ---------- Previous post was at 11:26 AM ----------
thanks for tut brov..... works fine!
Click to expand...
Click to collapse
u did something wrong...if any old codes are there it happens...try with a fresh framework-res.apk and android.policy.jar
sandy7 said:
u did something wrong...if any old codes are there it happens...try with a fresh framework-res.apk and android.policy.jar
Click to expand...
Click to collapse
i did it with a fresh android_policy.jar but will retry again.
whalesplaho said:
i did it with a fresh android_policy.jar but will retry again.
Click to expand...
Click to collapse
take a fresh framework-res.apk also
sandy7 said:
take a fresh framework-res.apk also
Click to expand...
Click to collapse
okies brov.... will give it a shot now!
thanks
Whoa!!!! got it working buddy... yhu removed .line 236 from tha code i sent yhu dats why, dat line is for Airplane mode.
Code:
[color=red]
.line 236
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/color]
hi sandy
Recovey mode didn't work on my TX 4.3. please check

[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