[Fix] Decrease home button lag - Galaxy S II Themes and Apps

Hi all, hope this is the right forum.
This thread is meant for ROM cooks only!
Let's start: I found a way to decrease the home button lag and would like to share this fix with you.
Some theory first:
The way from home button click to the home screen can be separated in two parts:
System will wait about 0.5s for another tap. This is due to the double click to voice-search feature, Samsung implemented. You won't find this lag on any other phone.
The good news is, that we can avoid it with some changes in framework.
The second part is the time the launcher needs to load. It's about 0.3 - 0.5 sec, depending on which app is currently running.
Now to the fix:
You have to decompile android.policy.jar (framework folder) using baksmali.
Open com\android\internal\policy\impl\PhoneWindowManager.smali and search for lines 3896 to 3922. They should look like this:
Code:
const/4 v4, 0x3
move/from16 v0, p4
move v1, v4
if-ne v0, v1, :cond_1
.line 1279
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomeKeyDoubleClickConcept:Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;
move-object v4, v0
move-object v0, v4
move/from16 v1, p2
move/from16 v2, p7
move v3, v13
invoke-virtual {v0, v1, v2, v3}, Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->addAction(IIZ)V
.line 1288
:cond_1
Delete all of these lines.
Now go a few lines deeper to lines 3920 - 3922. They should be
Code:
invoke-virtual {v4, v5}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
.line 1294
Replace these two lines with:
Code:
invoke-virtual {v4, v5}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
[COLOR="SeaGreen"] move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
move v4, v0
[COLOR="Red"] if-eqz v4, :cond_2[/COLOR]
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchHomeFromHotKey()V[/COLOR]
.line 1294
(Note that the first and last line are the original ones.)
Warning: take a look at line 3933. If it is not ":cond_2", you have to replace the cond_2 in "if-eqz v4, :cond_2" with the cond from line 3933.
It looks like the naming sceme depends on the baksmali version you're using.
Now recompile with smali and you're done
Some notes:
The device will no longer wait for double clicks of home key. This means, that the voice-search obviously can no longer be started with a double-tap on home key.
You will still notice some lag on home key. That's the time the home launcher needs to load. Try it from within the launcher (for example in the app chooser) and it will react instant. It should now be comparable to any other phone.
The given line-numbers are from a KH3 ROM. The numbers may change in future roms.
I would call this fix "experimental". I tested it for a few days without any issues, but I can't guarantee that it is bug free.
The problem is, that Samsung made the single click listener depend on the double click listener, so removing the double-click listener might cause some problems.
That's it. I hope, I could help you

Very nicely done! This will be in the next Cognition release!

Great news... Thanks for the idea

Anyone wanna compile this into an update.zip for the lazy? :-D

designgears said:
Very nicely done! This will be in the next Cognition release!
Click to expand...
Click to collapse
woooo hoooo
cheers
DG

Working great!
Many thanks mate!

Thanks so much for this fix !

Excellent tweak OP, thank you!

I had a problem with this line:
Code:
if-eqz v4, :cond_2
smali complained about it during recompilation of Batista framework.
Just change it to next cond_[something] you find just after the part you inserted.

The Devs/Cooks are going to LOVE you! The flac they've copped recently from thus 'bug'/feature has been enoumous!
Sent from my GT-I9100 using XDA Premium App

Will this produce the same effect as removing voice command or will it make it faster than that?
Thanks!

Thank you very much!! Marvelous!
I'll include it in my next rom thx!
Inviato dal mio GT-I9100 usando Tapatalk

xan said:
I had a problem with this line:
Code:
if-eqz v4, :cond_2
smali complained about it during recompilation of Batista framework.
Just change it to next cond_[something] you find just after the part you inserted.
Click to expand...
Click to collapse
I was having the same issue. Thanks for that. I also didn't realize that the .smali had to be closed when recompiling LOL
Just pushed it to the frameworks folder. Rebooting and trying!
Yay, stuck at boot screen lol. I'll be honest, I don't know much about this stuff so I probably screwed something up...
This was my procedure:
1) Copied /framework to my computer
2) Downloaded baksmali/smali from the Google code page
3) In command prompt, did the following:
java -jar baksmali-1.2.7.jar -c core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -x android.policy.odex
Click to expand...
Click to collapse
4) Opened the file using word, deleted the lines (even though my :cond_1 was :cond_42 I think)
5) Replaced the other section and used :cond_57 as you suggested
6) Did the following in command prompt:
java -jar smali-1.2.7.jar out -o android.policy.odex
Click to expand...
Click to collapse
7) Copied the new android.policy.odex to my framework folder and changed the permissions to all read/owner write
8) Rebooted
Where did I go wrong? I did this while running the Frakenstein'd KH3 ROM. Is this only for DEODEXED ROMs?

Awesome. Just mod mine, works great.

As mentioned earlier is there any possibility to a CWM zip

you are a hero! will send youna beer in a few hours, you don't know how happy I am right now
Sent from my GT-I9100 using XDA Premium App

Will be in my next rom release thanks man

Kudos to you man, this is amazing.. Will make a lot happy.

advance users must help newbies, please provide cwm zip file
Sent from my GT-I9100 using XDA Premium App

Can someone figure out where I went wrong in my above procedure?
Thanks!

Related

[DEV] [MOD] [HOW-TO] Remove Fully Charge Notification on LG8 Based Sprint ROMS [MOD]

Hello again! Here is a quick tutorial on how to remove the annoying fully battery notification! This also disables the screen from turning on by itself when its fully charged!
First you're going to need to decompile the Smali in SystemUI.apk
TIP: When decompiling classes.dex, run the -b tag as well so you can remove all the .line's ect and keep it just code
Navigate to the following smali file: com\android\systemui\power\PowerUI.smali
Remove the the following lines (Or comment them out, whichever you prefer):
Code:
invoke-virtual {v7, v8, v6, v5, v3}, Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V
iget-object v7, p0, Lcom/android/systemui/power/PowerUI;->mFullBatteryNotification:Landroid/app/Notification;
iget v7, v7, Landroid/app/Notification;->icon:I
iget-object v8, p0, Lcom/android/systemui/power/PowerUI;->mFullBatteryNotification:Landroid/app/Notification;
[COLOR="Red"] [B]--[/B] invoke-virtual {v2, v7, v8}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V[/COLOR]
iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
const-string v8, "power"
invoke-virtual {v7, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Landroid/os/PowerManager;
The next line is here:
Code:
const-string v8, "PowerUI"
invoke-virtual {v4, v7, v8}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;
move-result-object v0
const-wide/16 v7, 0x4e20
[COLOR="red"][B]--[/B] invoke-virtual {v0, v7, v8}, Landroid/os/PowerManager$WakeLock;->acquire(J)V[/COLOR]
goto :goto_14
.end method
.method playSound(Landroid/net/Uri;)V
.registers 10
const-string v4, "PowerUI"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
Thats it! Now compile and push your new SystemUI.apk and enjoy not being bugged by that annoying notification
Have fun!
thanks for this! I had this mod on my Samsung Moment and Samsung Transform, but they made it a flashable zip. Any chance of that happening?
So umm how about that mms mod lol sorry couldn't resist
Apple just give up the IPHONE sucks deal with it.
blackdragon79 said:
So umm how about that mms mod lol sorry couldn't resist
Apple just give up the IPHONE sucks deal with it.
Click to expand...
Click to collapse
Haha its STILL a WIP. Its a tough MOD trust me.
Thank you again sir. Its nice to see you sharing helpful information the way that you do.
Sent from my SGS3 while experiencing some Wicked Sensations™.
clark44 said:
Haha its STILL a WIP. Its a tough MOD trust me.
Click to expand...
Click to collapse
Apple just give up the IPHONE sucks deal with it.
Trust me I know it is. Wish Samsung wouldn't put a limit on that.
Hmm I did this as my first adventure in DE-compile/rebuild all seem to work fine.. I also wiped dalvik/cache after reinstal of modded SUI.
Since Iv'e noticed two things. That the phone no longer wakes up on an incoming call. and it seems to take a really long time to boot. Maybe I did something wrong (I did pull/install framework-res.apk b4 decompile of SUI could that have messed up something?)
LP
That's great. thanks for share.
Is there a ZIP for this? I am a little slow with the changing of codes.
Sent from my SPH-L710 using xda premium
Great Work OP!
I too would appreciate a flashable zip file for this Mod since I have not taken the time to learn to alter the code strings myself.
I am on Blazer ROM 1.8 and for some reason Mod's like this are not present even on the most recent version.

[DEV] [MOD] [HOW-TO] Display 1X/3G correctly on LG8 Based Sprint ROMS [MOD]

Here's another one guys This time were going to make the status bar properly display 1X/3G.
First you're going to need to decompile SystemUI.apk
Navigate to the following smali file: com\android\systemui\statusbar\policy\NetworkController.smali
All we have to do is remove one line (Or comment it out, whichever you prefer):
Edit the following code:
Code:
goto/16 :goto_2a
:cond_126
:pswitch_126
iget-boolean v0, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mShowAtLeastThreeGees:Z
[COLOR="Red"][B]--[/B] if-nez v0, :cond_141[/COLOR]
sget-object v0, Lcom/android/systemui/statusbar/policy/TelephonyIcons;->DATA_1X:[[I
iget v1, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mInetCondition:I
aget-object v0, v0, v1
Thats all Recompile and test your new MOD
Have fun!
I don't understand why Sprint/Samsung doesn't do this in the first place. Maybe they don't want you to know you're NOT in a 3G area? Thanks though, will definitely be looking into this mod.
wwjoshdew said:
I don't understand why Sprint/Samsung doesn't do this in the first place. Maybe they don't want you to know you're NOT in a 3G area? Thanks though, will definitely be looking into this mod.
Click to expand...
Click to collapse
Haha thats exactly what I was thinking. I guess they like providing false data. A LOT of false data.
Can we get a zip of this?
Sent from my SPH-L710 using xda premium
Haha "show at least three geez"
Sent from my SPH-L710 using xda app-developers app
Hey Clark, something seems off here. I have searched through this smali and the code does not seem to bematching up..
/smali/com/android/systemui/statusbar/policy/networkcontroller.smali
I cannot find any of the following that would allow me to pin point what to remove. Can you recheck and see if these are the corect lines? Maybe this is the code for a different carrier?
Code:
goto/16 :goto_2a
:cond_126
:pswitch_126
-- if-nez v0, :cond_141
Thanks,
I looked back through the smali and it seems likethis is the code that shoud be altered:
Code:
:cond_7
:pswitch_7
iget-boolean v0, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mShowAtLeastThreeGees:Z
[COLOR="Red"] -- if-nez v0, :cond_8[/COLOR] <----remove this line
sget-object v0, Lcom/android/systemui/statusbar/policy/TelephonyIcons;->DATA_1X:[[I
iget v1, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mInetCondition:I
aget-object v0, v0, v1
You can double check me but I think thats the one.
It would be awesome if we could get this as a stock odexed zip and deodexed zip for the average user and those like me that live off their phone...
Sent from my SPH-L710 using Tapatalk 2
Didact74 said:
Hey Clark, something seems off here. I have searched through this smali and the code does not seem to bematching up..
/smali/com/android/systemui/statusbar/policy/networkcontroller.smali
I cannot find any of the following that would allow me to pin point what to remove. Can you recheck and see if these are the corect lines? Maybe this is the code for a different carrier?
Code:
goto/16 :goto_2a
:cond_126
:pswitch_126
-- if-nez v0, :cond_141
Thanks,
Click to expand...
Click to collapse
Try searching for .line 1265. The rest of the code should be right below that line. What Clark means by -- if-nez v0, :cond_141 is that you have to delete the line if-nez v0, :cond_141. Or you can simply place # in front of it, making the system ignore it: #if-nez v0, :cond_141.
6uPMAH said:
Try searching for .line 1265. The rest of the code should be right below that line. What Clark means by -- if-nez v0, :cond_141 is that you have to delete the line if-nez v0, :cond_141. Or you can simply place # in front of it, making the system ignore it: #if-nez v0, :cond_141.
Click to expand...
Click to collapse
I understand what he is saying, the problem is there is no line of code in the smali that reads if-nez v0, :cond_141
I could be misunderstanding what you are saying though. See if you can find that line in your smali.
Didact74 said:
I understand what he is saying, the problem is there is no line of code in the smali that reads if-nez v0, :cond_141
I could be misunderstanding what you are saying though. See if you can find that line in your smali.
Click to expand...
Click to collapse
I checked my file. The line if-nez v0, :cond_141 is absent, but that's because I've deleted it. But it definitely should be located under .line 1265. Search for that. If it's not there, then your ROM is already modded to correctly display 1X/3G.
You are running deodexed ROM, correct?
6uPMAH said:
I checked my file. The line if-nez v0, :cond_141 is absent, but that's because I've deleted it. But it definitely should be located under .line 1265. Search for that. If it's not there, then your ROM is already modded to correctly display 1X/3G.
You are running deodexed ROM, correct?
Click to expand...
Click to collapse
No, I am running a stock odexed rom with select mods I have installed.
Try looking for one of the preceeding lines he references, like
Code:
goto/16 :goto_2a
:cond_126
:pswitch_126
See if you have those. Like I said, I could not find any of them in my smali. The only line to remove or commentout would be the if-nez line, so the others should be there.
Let me know what you find.
I've got all that, except the if-nez. And, like I said, the closesed easy reference point is .line 1265. I am running a fairly stock LG8 deodex ROM.
This MOD is based on this thread:
http://forum.xda-developers.com/showthread.php?t=1682112
Check it out. It has more detailed instructions.
If your SMALI is missing these lines described in the OP, then you might have to find the correct if-nez line yourself.
What you can do, and that's what I have done when I got my hands on SGS-3, is to go through the SMALI file and search for:
Code:
iget-boolean v0, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mShowAtLeastThreeGees:Z
There should be multiple instances (over 10 for sure) of this line, followed by a if-nez. Disable each if-nez one at a time, recompile your SystemUI.apk and check if it results in 1X showing up when you enable CDMA only mode.
It's a tedious process, but if you're willing to put the time in, you'll find it. I am not sure whether the line numbers are different on the ODEX ROM vs deodex. On deodex, it's .line 1265.
I posted this almost 2 months ago:
http://forum.xda-developers.com/showthread.php?t=1758418
Good luck.
6uPMAH said:
I've got all that, except the if-nez. And, like I said, the closesed easy reference point is .line 1265. I am running a fairly stock LG8 deodex ROM.
This MOD is based on this thread:
http://forum.xda-developers.com/showthread.php?t=1682112
Check it out. It has more detailed instructions.
If your SMALI is missing these lines described in the OP, then you might have to find the correct if-nez line yourself.
What you can do, and that's what I have done when I got my hands on SGS-3, is to go through the SMALI file and search for:
Code:
iget-boolean v0, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mShowAtLeastThreeGees:Z
There should be multiple instances (over 10 for sure) of this line, followed by a if-nez. Disable each if-nez one at a time, recompile your SystemUI.apk and check if it results in 1X showing up when you enable CDMA only mode.
It's a tedious process, but if you're willing to put the time in, you'll find it. I am not sure whether the line numbers are different on the ODEX ROM vs deodex. On deodex, it's .line 1265.
I posted this almost 2 months ago:
http://forum.xda-developers.com/showthread.php?t=1758418
Good luck.
Click to expand...
Click to collapse
Thanks Man, will do.
Do you know if it's possible to have dual signal bars, one voice and one data like on miui or is that a miui only feature.
clark44 is the man
Thanks for sharing
dyehya said:
It would be awesome if we could get this as a stock odexed zip and deodexed zip for the average user and those like me that live off their phone...
Sent from my SPH-L710 using Tapatalk 2
Click to expand...
Click to collapse
This would be nice as a flashable zip.
Sent from my SPH-L710 using xda premium
how can i use this for a the jellybean leak, lj7?
clark44 said:
Here's another one guys This time were going to make the status bar properly display 1X/3G.
First you're going to need to decompile SystemUI.apk
Navigate to the following smali file: com\android\systemui\statusbar\policy\NetworkController.smali
All we have to do is remove one line (Or comment it out, whichever you prefer):
Edit the following code:
Code:
goto/16 :goto_2a
:cond_126
:pswitch_126
iget-boolean v0, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mShowAtLeastThreeGees:Z
[COLOR="Red"][B]--[/B] if-nez v0, :cond_141[/COLOR]
sget-object v0, Lcom/android/systemui/statusbar/policy/TelephonyIcons;->DATA_1X:[[I
iget v1, p0, Lcom/android/systemui/statusbar/policy/NetworkController;->mInetCondition:I
aget-object v0, v0, v1
Thats all Recompile and test your new MOD
Have fun!
Click to expand...
Click to collapse
Any way you could make this an exposed module?
Sent from my SPH-L710 using Tapatalk 2

[MOD] Add auto-correct to Samsung Keyboard and shorten long-press delay

Hey all, this is my first mod, but it was driving me crazy that the stock samsung keyboard didn't support auto-correct - and the timeout delay was way too long.
I'm working on an auto-patcher in the next couple of days.
EDIT:
I attached the APK: /system/app/
Make sure to set the proper permissions, then reboot.
The code changed is below
Here's a first stab at fixing both, would love some feedback.
1. To change the long press delay
In PointerTracker:
Code:
###################################################
# Change the long press delay to 200ms from 500ms #
###################################################
.line 498
const/16 v0, 0xc8
.line 499
.local v0, delay:I
packed-switch p1, :pswitch_data_0
.line 504
const/16 v0, 0xc8
.line 507
:goto_0
int-to-long v1, v0
return-wide v1
.line 501
:pswitch_0
const/16 v0, 0xc8
2. To add auto-correct
In SwiftkeyQwertyLatinInputModule
Code:
.line 312
:cond_3
##################################################
# Add support for auto-correct on word separator #
##################################################
#check if the user has entered text
iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
invoke-virtual {v7}, Ljava/lang/StringBuilder;->length()I
move-result v7
if-lez v7, :cond_10
iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mEngineManager:Lcom/diotek/ime/framework/engine/InputEngineManager;
iget-object v8, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
invoke-interface {v7, v8, v9}, Lcom/diotek/ime/framework/engine/InputEngineManager;->getCharSequence(Ljava/lang/StringBuilder;I)I
invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->updateSuggestion()V
invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->setComposingText()V
##################################################
# End support for auto-correct on word separator #
##################################################
#move clearCandidateList from beginning of processWordSeparator to after we do correct
:cond_10
invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->clearCandidateList()V
#code below is not changed - just for reference
iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mEngineManager:Lcom/diotek/ime/framework/engine/InputEngineManager;
iget-object v8, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mCandidates:Ljava/util/ArrayList;
invoke-interface {v7, v8}, Lcom/diotek/ime/framework/engine/InputEngineManager;->getSuggestion(Ljava/util/ArrayList;)I
.line 313
Looks very promising! As I don´t know where to add the code, I´m patiently waiting for your patcher!
Looking forward for patcher or flashable zip... Thank you for sharing
Or even an APK that can be installed as a keyboard itself for the people that aren't Rooted :$
Would love to see a flashable mod here, thanks
Sent from a potato.
This would be awesome as an "Xposed" framework apk. No need to bake into other roms.
Not sure if you have seen the below link.
http://forum.xda-developers.com/showthread.php?t=1574401
Here are some other examples of "patches". I'm using this on stock rooted.
Multiwindow apk:
http://forum.xda-developers.com/showthread.php?t=2048668
Per App DPI apk:
http://forum.xda-developers.com/showthread.php?t=2067303
Yeah! I actually originally started by trying Xposed - in fact, I'll send you the Xposed module I built for changing the timeout delay - it didn't work though! I might have followed an outdated tutorial, but I kept banging my head against the wall trying to get Xposed to work, when it was just a simple smali change.
For the auto-correct, I'm not entirely sure how I would do it in exposed. I don't want to necessarily replace a method, I need to hook in at a precise execution point. How would I do that?
ultra74 said:
This would be awesome as an "Xposed" framework apk. No need to bake into other roms.
Not sure if you have seen the below link.
http://forum.xda-developers.com/showthread.php?t=1574401
Here are some other examples of "patches". I'm using this on stock rooted.
Multiwindow apk:
http://forum.xda-developers.com/showthread.php?t=2048668
Per App DPI apk:
http://forum.xda-developers.com/showthread.php?t=2067303
Click to expand...
Click to collapse
I cant wait to try this out. Samsung innovated so much with this phone its a shame they couldnt add this in too.
eclipxe said:
Yeah! I actually originally started by trying Xposed - in fact, I'll send you the Xposed module I built for changing the timeout delay - it didn't work though! I might have followed an outdated tutorial, but I kept banging my head against the wall trying to get Xposed to work, when it was just a simple smali change.
For the auto-correct, I'm not entirely sure how I would do it in exposed. I don't want to necessarily replace a method, I need to hook in at a precise execution point. How would I do that?
Click to expand...
Click to collapse
That would be cool. I'm just a noob programmer, but I would like to take a look at what you have and see what I can do.
Thanks!
zkyevolved said:
Or even an APK that can be installed as a keyboard itself for the people that aren't Rooted :$
Click to expand...
Click to collapse
I uploaded the APK - give it a try and let me know how it works for you guys. Open to suggestions. Also working on the patcher in case you wanted to customize it.
eclipxe said:
I uploaded the APK - give it a try and let me know how it works for you guys. Open to suggestions. Also working on the patcher in case you wanted to customize it.
Click to expand...
Click to collapse
Awesome job. Seems to work well I guess. . Never understood the whole auto Correction. . But if it type rscue it will change it to rescue auto magically. .
Sent from my SPH-L900 using Xparent Purple Tapatalk 2
failed to install for me... I guess it might be due to the fact that mine is ATT version. I wanna try this mod so bad though....
Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
lehoi79 said:
failed to install for me... I guess it might be due to the fact that mine is ATT version. I wanna try this mod so bad though....
Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
Click to expand...
Click to collapse
Did you drop into /system/app then set permissions on it? Shouldn't need to actually install, just reboot.
eclipxe said:
Hey all, this is my first mod, but it was driving me crazy that the stock samsung keyboard didn't support auto-correct - and the timeout delay was way too long.
I'm working on an auto-patcher in the next couple of days.
EDIT:
I attached the APK: /system/app/
Make sure to set the proper permissions, then reboot.
The code changed is below
Here's a first stab at fixing both, would love some feedback.
1. To change the long press delay
In PointerTracker:
Code:
###################################################
# Change the long press delay to 200ms from 500ms #
###################################################
.line 498
const/16 v0, 0xc8
.line 499
.local v0, delay:I
packed-switch p1, :pswitch_data_0
.line 504
const/16 v0, 0xc8
.line 507
:goto_0
int-to-long v1, v0
return-wide v1
.line 501
:pswitch_0
const/16 v0, 0xc8
2. To add auto-correct
In SwiftkeyQwertyLatinInputModule
Code:
.line 312
:cond_3
##################################################
# Add support for auto-correct on word separator #
##################################################
#check if the user has entered text
iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
invoke-virtual {v7}, Ljava/lang/StringBuilder;->length()I
move-result v7
if-lez v7, :cond_10
iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mEngineManager:Lcom/diotek/ime/framework/engine/InputEngineManager;
iget-object v8, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
invoke-interface {v7, v8, v9}, Lcom/diotek/ime/framework/engine/InputEngineManager;->getCharSequence(Ljava/lang/StringBuilder;I)I
invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->updateSuggestion()V
invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->setComposingText()V
##################################################
# End support for auto-correct on word separator #
##################################################
#move clearCandidateList from beginning of processWordSeparator to after we do correct
:cond_10
invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->clearCandidateList()V
#code below is not changed - just for reference
iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mEngineManager:Lcom/diotek/ime/framework/engine/InputEngineManager;
iget-object v8, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mCandidates:Ljava/util/ArrayList;
invoke-interface {v7, v8}, Lcom/diotek/ime/framework/engine/InputEngineManager;->getSuggestion(Ljava/util/ArrayList;)I
.line 313
Click to expand...
Click to collapse
Can u make the long press a lil shorter like 140ms ? And turn off the auto correct lol I can't type half the stuff I'm trying to. Is there a user dictionary?
Sent from my SPH-L900 using Tapatalk 2
eclipxe said:
Did you drop into /system/app then set permissions on it? Shouldn't need to actually install, just reboot.
Click to expand...
Click to collapse
I guess I have to be rooted in order to do thissince this is a system app. I will try it tonight when I get home.
Thanks for the help.
Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
Yes, the only problem is that under about 200ms, Swyping no longer works!
eclipxe said:
Yes, the only problem is that under about 200ms, Swyping no longer works!
Click to expand...
Click to collapse
Damn nvm then lol thanks tho
Sent from my SPH-L900 using Tapatalk 2
eclipxe said:
Did you drop into /system/app then set permissions on it? Shouldn't need to actually install, just reboot.
Click to expand...
Click to collapse
Write,read,read...is that correct? It doesnt work for me yet (crashes)...
can we possibly get a dpi 240 version? pllllzzzzz? lol
dropped the apk in the system/app, rebooted (wiped cache, delvik cache)... crashed at opening the keyboard.
Im on ATT 4.1.2 stock rooted.
do I need to be on deodex ROM?
Sent from my SAMSUNG-SGH-I317 using Tapatalk 2

[MOD][GUIDE] Removing SysScope - Permanent "Official" Device Status [update 8-12-13]

[MOD][GUIDE] Removing SysScope - Permanent "Official" Device Status [update 8-12-13]
Notice (4/16/14): I'm no longer here. I've said "goodbye" to AT&T and their locked bootloader schemes. I'm voting with my wallet - I've sold my I337 and switched to T-Mobile. My apologies to the community, but you're now on your own here.
First and foremost, most of the credit goes to [email protected] and dwitherell for their hard work in this thread, and all the help they provided me to get this to work on the S4. Also some thanks to sicopat, with his instructions in this thread for deodexing APKs.
This guide will show you how to delete SysScope, and permanently alter your "Device Status" (Settings -> More -> About device -> Status -> Device Status) to be "Official". Futher, it will keep your boot logo to be the original "Galaxy S4" logo, and not the "Custom"/padlock logo. Before you begin, you will need to be sure that your device does not already show "Custom" - otherwise your boot logo will permanently be stuck showing the "Custom"/padlock. [Update 6-26-13: I've posted a method below that will allow you to restore your custom status temporarily before removing SysScope.] A couple more details about SysScope and how it works and what it is scanning for are in my old thread here.
Important Notes:
This mod will make changes to your SecSettings.apk, so there is risk of borking your device. I am not responsible if you mess anything up on your device!
This mod was performed on the AT&T Galaxy S4 (SGH-I337) with the latest OTA Update available at this time (I337UCUAMDL).
This mod was performed on the STOCK UCUAMDL ROM. You might be able to make these same changes to other TW-based roms. Good luck.
You must be rooted.
It is highly advised to make a nandroid backup of your entire system/data before continuing. Seriously - go do it now.
Your device must be in debugging mode (of course) and your ADB should be readily available (set in path, or dumped into your working folder). If you don't know what I'm talking about, you should probably stop now.
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.
Click to expand...
Click to collapse
Added 6-26-13 - How to get "Official" status back before making it permanent:
If for some reason you already have a "custom" status, you can perform this lengthy, yet sure-fire method to get it back...
Install your favorite recovery by whatever means.
Personally, I like TWRP, and I install it using an ADB Shell:
http://www.teamw.in/project/twrp2/174 said:
$ su
# dd if=/sdcard/recoveryfilename.img of=/dev/block/mmcblk0p21
Click to expand...
Click to collapse
Make a nandroid backup of your device as it is now, just as a precaution.
Perform all the steps below to remove SysScope from your device (including the reboot at the end!). Note that this will not fix your "Custom"/padlock boot logo at this time.
Check to be sure SysScope gone by looking at Settings -> More -> About device -> Status -> Device status. It should say "Official".
Make another nandroid backup - this time you're making a backup of your system without SysScope inside of it.
Odin back to MDL stock. Personally, I recommend that you also backup your internal SD card to your computer before using the Odin-to-Stock. You might need to wipe your data to get the odin-to-stock to work correctly, which if done improperly, will wipe your SD card also.
After device boots fully, manually restart the phone again.
Watch to be sure boot logo is not the "custom"/padlock. If you'd like to be extra-sure your status is "Official", you can boot into Download/Odin mode again, and check the status there.
Run Motochopper, but DO NOT allow motochopper to restart the device!
Make sure motochopper reads "Success!". If it fails, just CLOSE the program and start it again. Do not press any key to reboot!
When motochopper says, "Exploit complete. Press enter to reboot and exit" - just close motochopper without pressing any keys!
Motochopper available here.
Install your favorite recovery again. Do not restart your phone at this time!
In the instructions to remove SysScope, repeat step #10 (the final step with all the shell commands) again to remove SysScope again.
Technically this step is optional, but it is needed if your facorite recovery doesn't format/restore the System partition when it restores nandroid backups. Better safe than sorry.
Regardless, we don't ever want to allow the phone to reboot into the normal System while SysScope still exists.
Restore the second nandroid backup you took, and reboot into System.
Click to expand...
Click to collapse
Main Instructions:
Pull a copy of entire contents of /system/framework folder "framework" in your current working folder.
Code:
adb pull /system/framework/ ./framework/
Pull a copy of the SecSettings.apk and its .odex file
Code:
adb pull /system/app/SecSettings.apk
adb pull /system/app/SecSettings.odex
Deodex SecSettings.apk
Code:
java -jar baksmali-1.4.2.jar -a 17 -x SecSettings.odex -d framework
java -jar smali-1.4.2.jar ./out -o classes.dex
Decompile classes.dex
Code:
java -jar baksmali-1.4.2.jar -a 17 -o .\classes_out classes.dex
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.
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:
Code:
.line 952
const v1, 0x7f09013f
to
Code:
.line 952
const v1, 0x7f09013d
Change:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f09013e
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
const v1, 0x7f09013d
.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
Recompile classes.dex
Code:
java -jar smali-1.4.2.jar -a 17 .\classes_out -o classes.dex
Put classes.dex into SecSettings.apk. To do this, open SecSettings.apk in 7Zip, and drag/drop your new classes.dex into the root of SecSettings.apk. Save and close.
ZipAlign SecSettings.apk (optional, but advised)
Code:
zipalign -v 4 SecSettings.apk zip_SecSettings.apk
Push it to the sdcard
Code:
adb push zip_SecSettings.apk /sdcard/
Install! Use "adb shell" to begin, and use the following commands, one at a time:
Code:
su
mount -o rw,remount /system
stop
mv /system/app/SecSettings.apk /system/app/SecSettings.bak
mv /system/app/SecSettings.odex /system/app/SecSettings.odexbak
mv /system/app/SysScope.apk /system/app/SysScope.bak
mv /system/app/EdmSysScopeService.apk /system/app/EdmSysScopeService.bak
mv /system/app/EdmSysScopeService.odex /system/app/EdmSysScopeService.odexbak
cp /sdcard/zip_SecSettings.apk /system/app/SecSettings.apk
rm -r /data/dalvik-cache/*
reboot
Click to expand...
Click to collapse
Added 8-12-13 - Flashable zips!
I've uploaded CWM/TWRP flashable zips for the SysScope mod for both MDL and MF3 firmware for the I337. Here are the download links:
mdl-remove-SysScope.zip (mirror)
mf3-remove-SysScope.zip (mirror)
The zip will do the following:
Mount /system and /data
Remove the following files (note that it doesn't make any backups):
/system/app/SecSettings.apk
/system/app/SecSettings.odex
/system/app/SysScope.apk
/system/app/EdmSysScopeService.apk
/system/app/EdmSysScopeService.odex
Extracts the new SecSettings.apk into place
Updates permissions on /system/app/SecSettings.apk to 0644
Wipes dalvik cache
Unmounts /system and /data
Click to expand...
Click to collapse
I'm not a Dev. Just a fellow XDA member, sharing some hard work with the rest of you. If this helped you out in any way, just hit the Thanks button.
To Devs: If you use this mod in your stock-based ROMs (if needed), it would be appreciated if you at least mention my name and/or [email protected] and dwitherell somewhere. Thanks. ^_^
Attached, you'll find a text copy of my I337UCUAMDL's Status.smali (rename to Status.smali if you want to use it directly). Good to compare against, or you can just skip to step 7 and place the attached classes.dex into your SecSettings.apk. Remember, these are for STOCK I337UCUAMDL only.
Update 8-13-13: I've also attached the Status.smali for MGA. Thanks to @Dean1650 for providing the original and testing it on his device.
OP i hope you dont mind i added your method to my thread that talks about this issue http://forum.xda-developers.com/showthread.php?t=2296014
Keep me posted if you have a problem with that and i'll take it down
P.S. i hotlinked to this thread, i didnt include instructions in mine
Nice write up! One small note - and the below quote is just an example snippet of the OP:
Aou said:
...
Deodex SecSettings.apk
Code:
java -jar baksmali-1.4.2.jar -a [b][i][u][color="red"]15[/b][/u][/i][/color] -x SecSettings.odex -d framework
java -jar smali-1.4.2.jar ./out -o classes.dex
Decompile classes.dex
Code:
java -jar baksmali-1.4.2.jar -a [b][i][u][color="red"]16[/b][/u][/i][/color] -o .\classes_out classes.dex
...
Click to expand...
Click to collapse
The values highlighted above are used to indicate the sdk version of whatever it is you are de/recompiling. Seeing as the stock S4 rom is android version 4.2.2 (at least I think it is, right?), this flag should actually be 17. Not sure it matters all that much in this case, but I just thought I'd point that out
Aou said:
Attached, you'll find a text copy of my Status.smali (rename to Status.smali if you want to use it directly). Good to compare against, or you can just skip to step 7 and place the attached classes.dex into your SecSettings.apk. Remember, these are only for STOCK I337UCUAMDL only.
Click to expand...
Click to collapse
Great! How long until you get it into a flashable zip ? :laugh:
edit..
woops .. thanks for the guide and hard work guys!!
polish_pat said:
OP i hope you dont mind i added your method to my thread that talks about this issue http://forum.xda-developers.com/showthread.php?t=2296014
Keep me posted if you have a problem with that and i'll take it down
P.S. i hotlinked to this thread, i didnt include instructions in mine
Click to expand...
Click to collapse
Not a problem at all! I'm not 100% sure that this will remove an existing custom boot screen. I'll look into this a bit more and get back to you.
dwitherell said:
Nice write up! One small note - and the below quote is just an example snippet of the OP:
The values highlighted above are used to indicate the sdk version of whatever it is you are de/recompiling. Seeing as the stock S4 rom is android version 4.2.2 (at least I think it is, right?), this flag should actually be 17. Not sure it matters all that much in this case, but I just thought I'd point that out
Click to expand...
Click to collapse
I will certainly look into this! It didn't seem to matter while compiling/decompiling in this case, but just in case there are side-effects, it's probably worth looking at.
scott14719 said:
Great! How long until you get it into a flashable zip ? :laugh:
Click to expand...
Click to collapse
Once I hear of enough positive reports, I'll look into this.
iB4STiD said:
tried this on mdob.. didn't work.. thanks for the guide tho!!
Click to expand...
Click to collapse
It would be greatly helpful to me if you elaborated on what part didn't work? Also, it's possible that SecSettings.apk is different in MDOB.
Aou said:
Not a problem at all! I'm not 100% sure that this will remove an existing custom boot screen. I'll look into this a bit more and get back to you.
Click to expand...
Click to collapse
awesome, i've specified this in my thread, hopefully my thread will give you enough visibility people will try it out and report back to you
Aou said:
Not a problem at all! I'm not 100% sure that this will remove an existing custom boot screen. I'll look into this a bit more and get back to you.
I will certainly look into this! It didn't seem to matter while compiling/decompiling in this case, but just in case there are side-effects, it's probably worth looking at.
Once I hear of enough positive reports, I'll look into this.
It would be greatly helpful to me if you elaborated on what part didn't work? Also, it's possible that SecSettings.apk is different in MDOB.
Click to expand...
Click to collapse
edit
my error.. nm!!
iB4STiD said:
Padlock on boot up was still there after r reboots, I edited secsettings from my ROM which is stock based off amdl
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
Didn't you read the op? It clearly states that if you already have the custom splash screen it won't work. This mod is to circumvent getting the custom screen. So you would have to go back to stock then use this.
This is my understanding of the op.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
shoman94 said:
Didn't you read the op? It clearly states that if you already have the custom splash screen it won't work. This mod is to circumvent getting the custom screen. So you would have to go back to stock then use this.
This is my understanding of the op.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
Click to expand...
Click to collapse
did read it, but read it wrong i see.. :cyclops:
Nice job.
I've added a method to restore your "Official" status temporarily while you remove SysScope. Check it out in the OP.
Also, I did check on MDOB. Status.smali seems to be identical to stock, so this method in its entirety should work on MDOB.
dwitherell said:
Nice write up! One small note - and the below quote is just an example snippet of the OP:
The values highlighted above are used to indicate the sdk version of whatever it is you are de/recompiling. Seeing as the stock S4 rom is android version 4.2.2 (at least I think it is, right?), this flag should actually be 17. Not sure it matters all that much in this case, but I just thought I'd point that out
Click to expand...
Click to collapse
I've updated the OP to include API Level 17. It appears it doesn't really matter either way, but I've made the changes just to be safe. Thanks again for pointing these out. ^_^
has anybody just tried freezing sysscope with titanium backup?
polish_pat said:
has anybody just tried freezing sysscope with titanium backup?
Click to expand...
Click to collapse
Yup. If SysScope is missing or frozen, then SecSettings will automatically report that the system is Custom.
Maybe it's just me...but The point of all this is to have the phone show Official, and not have a open padlock pop up upon reboot right?
Well, if you have a custom, rooted ROM, with lets say a custom boot animation, then it doesn't matter if the lock shows up or if your phone says custom..........but if this is for people that just want a straight stock rom with nothing added then I can see the point. On my stock rooted rom nandroid i had official, on my SHOstock ROM my phone now says custom. But i guess if I had a warranty issue I'd just odin it.
igotroot said:
Maybe it's just me...but The point of all this is to have the phone show Official, and not have a open padlock pop up upon reboot right?
Well, if you have a custom, rooted ROM, with lets say a custom boot animation, then it doesn't matter if the lock shows up or if your phone says custom..........but if this is for people that just want a straight stock rom with nothing added then I can see the point. On my stock rooted rom nandroid i had official, on my SHOstock ROM my phone now says custom. But i guess if I had a warranty issue I'd just odin it.
Click to expand...
Click to collapse
Everyone has their own reason, some just for looks, some for functionality (updates, warranty, and what-not), and others for other reasons. I just think it's none of Samsung's business what I decide to put on my phone or not.
scott14719 said:
Everyone has their own reason, some just for looks, some for functionality (updates, warranty, and what-not), and others for other reasons. I just think it's none of Samsung's business what I decide to put on my phone or not.
Click to expand...
Click to collapse
Agreed.
Samsung must have read this thread. I didn't look at MF3, but the newer international releases they made major changes to status.smali.
sent using xda Premium

[Mod][Guide]I9500 4.4.2 4way Reboot

4Way Reboot Guide I9500 4.4.2​
Hey guys im back because there are to many ready made mods and not enough upto date how to guides for 4.4.2 I9500. First of all this is not my work its from @majdinj guides from his amazing thread Here All i have done it make the necessary edits to make his guide work on our 4.4.2 i9500 devices. So if you want to thank someone for this guide then go to majdinj's thread and thank him.
First of all i have not come here to teach you how to decompile .apks and .jar, if your reading this guide then i would hope you already have this knowledge and please dont let the first post say "can you make a flashable zip" as im trying to get you guys to dive in and have a go as its not very hard to build mod
As i have said all credit goes to @majdinj
For this mod we will be dealing with android.policy.jar so go get if from your /system/framework/ and decompile it
android.policy.jar
Open classout folder and go to \com\android\internal\policy\impl\ and place these files from this edited resource zip
Now Find and Open GlobalActions.smali and look for
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$8;
const v1, 0x10809bb
const v2, 0x10401d6
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
And replace what is in Red
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];
const v1, 0x10809bb
const v2, 0x10401d6
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="red"]99[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
Save that and move onto GlobalActions$SinglePressAction.smali
Add Code in Red
Code:
[COLOR="Red"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
# instance fields
Now still in GlobalActions$SinglePressAction.smali look for the code "# direct methods" and add code in Red
Code:
# direct methods
[COLOR="Red"].method static constructor <clinit>()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Reboot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method[/COLOR]
.method protected constructor <init>(II)V
If you want to replace header Reboot Method Then open GlobalActions$99.smali and search for
Code:
const-string v2, "Reboot Method"
And replace for Header you want
Recompile and your done
As i said this is majdinj guide and he deserves full credit and thanks
just incase
Thanks Buddy
I'll try it later today
I tried many time before and it didn't work
Sent from my GT-I9500
AL_IRAQI said:
Thanks Buddy
I'll try it later today
I tried many time before and it didn't work
Sent from my GT-I9500
Click to expand...
Click to collapse
thanks m8, i put this together because the S4 can use all the help it can get when it comes to guides
Big thanks my friend! :good:
Youre great!
Regards
» Arrow « said:
Big thanks my friend! :good:
Youre great!
Regards
Click to expand...
Click to collapse
Any time m8 hope it helps
Sent from my GT-I9500 using Tapatalk 2
Good work mate.
Sent from my Nexus 5 using XDA Free mobile app
Vivek_Neel said:
Good work mate.
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
Thanks m8
Sent from my GT-I9500
thanks man thanx :good:
ahmed elhusseny said:
thanks man thanx
Click to expand...
Click to collapse
I see what you did there.
Sent from my Nexus 5 using Tapatalk 2
Vivek_Neel said:
I see what you did there.
Sent from my Nexus 5 using Tapatalk 2
Click to expand...
Click to collapse
what did you mean ?
ahmed elhusseny said:
what did you mean ?
Click to expand...
Click to collapse
Hmm.
I was just telling you to make some useful 10 posts.
Sent from my Nexus 5 using Tapatalk 2
Vivek_Neel said:
Hmm.
I was just telling you to make some useful 10 posts.
Sent from my Nexus 5 using Tapatalk 2
Click to expand...
Click to collapse
hahahahahaha you got me man i'm here from 2012 but i was just downloading , without email or replying but one day i just need to ask a question so i just read the rules and tried to ask in the Discussion
Thats good guide..but is there anything wrong if we achieve the same thing via..xposed?
tollboy said:
Thats good guide..but is there anything wrong if we achieve the same thing via..xposed?
Click to expand...
Click to collapse
Its the difference between forcing your newly updated apks on newest update to give you 4way reboot and adding code so it will naturally give you 4way reboot. Wanam has stopped updating xposed a while ago but if your happy with xposed and any wakelocks it may give then i wont try to change your opinion about xposed
Sent from my GT-I9500

Categories

Resources