[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
Related
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!
[Mod/THEME][4.0.4][XWLPM] Lidroid 15 toggles, CallRecorder, BigPic & NoIncreasingRing
For the lidroid 15 Status bar toggles for XWLPM, please refer to below thread,
http://forum.xda-developers.com/showthread.php?p=29207022#post29207022
About CallRecorder, BigPic & NoIncreasingRing, please install the attached package with CWM,
View attachment GT-I9100_XWLPM.CallRec.Phone_.BigPic_NoIncreasingRing.zip
And as there is some difference to implement Call Recorder Mod for 4.0.4 than 4.0.3, I'd like to share with you the details on how to implement it in 4.0.4 as below,
a) Decompile Phone.apk (apktool or whatever wrapper you prefer)
b) Edit the \smali\com\android\phone\PhoneFeature.smali file and search for ""voice_call_recording", you should find the single occurrence:
Code:
const-string v6, "voice_call_recording"
Change the line after that, such that instead of
Code:
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
it becomes
Code:
invoke-static {[COLOR="Red"]v5[/COLOR]}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
c) Edit the \smali\com\android\phone\PhoneVoiceRecorder$RecorderThread.smali file and search for "Landroid/media/MediaRecorder;->prepare()V", you should find the single occurrence, inserted below code after that
Code:
.line 272
const-wide/16 v3, 0x96
invoke-static {v3, v4}, Ljava/lang/Thread;->sleep(J)V
after that, the code should like
Code:
invoke-virtual {v3}, Landroid/media/MediaRecorder;->prepare()V
[COLOR="Blue"] .line 272
const-wide/16 v3, 0x96
invoke-static {v3, v4}, Ljava/lang/Thread;->sleep(J)V[/COLOR]
.line 276
iget-object v3, p0, Lcom/android/phone/PhoneVoiceRecorder$RecorderThread;->this$0:Lcom/android/phone/PhoneVoiceRecorder;
const-wide/16 v4, 0x0
d) Follow the existing method to rebuild the apk.
e) We still have to replace those two audio.primary.exynos4.so & audio_policy.exynos4.so from the Chinese built to make the call rec work, you can extract them from the package I attached above.
woohoooo.. thanks.
Great i'm gone try it, thanks.
I post this info in russian 4pda forum: 05.07.2012, 19:44
And not need edit
\smali\com\android\phone\PhoneVoiceRecorder$RecorderThread.smali
simply activate the entries in the file
smali\com\android\phone\PhoneFeature.smali
>GT-I9100_XWLPM.CallRec.Phone_.BigPic_NoIncreasingRing.zip
Cannot open zip file, seems to be corrupted somehow !!
mythtrandyr said:
I post this info in russian 4pda forum: 05.07.2012, 19:44
And not need edit
\smali\com\android\phone\PhoneVoiceRecorder$RecorderThread.smali
simply activate the entries in the file
smali\com\android\phone\PhoneFeature.smali
Click to expand...
Click to collapse
Try ti explain what you talking about and maybe a little show and tell. The OP"s method works... but what is your method?
Would it be possible to make a "noise suppression off" mod?
method from first post work on XXLQB Deodexed
thx
Any LPT version ?
djdeeles said:
Any LPT version ?
Click to expand...
Click to collapse
is working fine in LPT
Great Info
Thanks a lot @OP
I modded Phone.apk of 4.0.4-XWLP8 with the help of your guide; and it worked like a charm. :victory:
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
Here is manual, how to make CRT-OFF mod without glitches on JB.
Originally, it has been released in my UNIROM ROM in 4PDA.ru community.
Here is the guide. Instruction is based on I9300XXDLIB, but it's easy to adjust it to other ROMS.
To make CRT-OFF working, you need to decompile services.jar.
in file com\android\server\PowerManagerService$ScreenBrightnessAnimator.smali
find following code and modify it according to red colored part:
Code:
.line 2906
.end local v0 #delta:I
:cond_1
:goto_1
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
[COLOR=Red] if-eqz p2, :cond_2xx
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_2xx
[/COLOR] const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
Black color is original code, you need to find.
Effect will start to work, but u will notice glitch: if you turn on screen by power button and then put it to sleep again by button without unlocking then phone will wake up just after CRT effect finishes.
Here is workaround part.
decompile android.policy.jar.
in file com\android\internal\policy\impl\PhoneWindowManager.smali
Find following parts (black is original code) and modify according to red text:
Code:
.class public Lcom/android/internal/policy/impl/PhoneWindowManager;
.super Ljava/lang/Object;
.source "PhoneWindowManager.java"
# interfaces
.implements Landroid/view/WindowManagerPolicy;
[COLOR=Red].implements Ljava/lang/Runnable;[/COLOR]
# annotations
Code:
.line 5411
.end local v9 #isAllowed:Z
.end local v16 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_1
:goto_2
[COLOR=Red] and-int/lit8 v0, v19, 0x4
if-eqz v0, :cond_2xx
and-int/lit8 v19, v19, -0x5
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sleepDelay()V
:cond_2xx
[/COLOR] return v19
at the end of file add following code:
Code:
[COLOR=Red].method public sleepDelay()V
.locals 10
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
const-wide v2, 0x64
check-cast p0, Ljava/lang/Runnable;
invoke-virtual {v0, p0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method public run()V
.locals 10
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v1, "power"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
const-wide/16 v6, 0x3e8
add-long/2addr v2, v6
invoke-virtual {v0, v2, v3}, Landroid/os/PowerManager;->goToSleep(J)V
return-void
.end method
[/COLOR]
That's all.
My method doesn't require patches for libsurfaceflinger.so library.
P.S.: I didn't put much effort to investigate of possibility for CRT-ON effect. I'm not sure if this effect is even compiled inside stock libsurfaceflinger.so. I'm happy that i could achieve fully working CRT-OFF without patching library. I remember how much time i've spent to patch libsurfaceflinger.so for I9100 ICS ROM against flicker, so it's real deal breaker for me to go through reversing and patching of .so file again.
I've attached mod for XXDLIB version.
Install in CWM recovery to DEODEXED ROM.
This is for stock deodexed I9300XXDLIB ROM. If you use any custom made ROM and there are some additional modifications in android.policy.jar or services.jar then you will loose all those mods.
I have neither time no ability to make flashable zips for other ROMs. I cannot download every ROM, integrate this mod and test. So, ask custom ROMs authors to integrate it into their ROMs by themself.
you may post the whole thing, already ready to be flashed? you'll be very grateful
I can post mod for XXDLIB version, but if you have other mods integrated in these framework files, you will loose them.
sorg said:
I can post mod for XXDLIB version, but if you have other mods integrated in these framework files, you will loose them.
Click to expand...
Click to collapse
would be good for me, I use the WanamLite XXDLIB V3.8.
How did you decompile services.jar? I'd be happy with a link too, but I'd also like to know how to decompile jars
Kryten2k35 said:
How did you decompile services.jar? I'd be happy with a link too, but I'd also like to know how to decompile jars
Click to expand...
Click to collapse
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
Anybody try?? Work without this issue??
Works perfect on Wanam 3.7!
please is possible have this for odex stock rom dlib?? thanks for reply
sorg said:
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
work perfect..always on Wanam 3.7..thank you :good:
Just put this into my rom...works perfect, thanks for the guide
Sorgen, dass could you please provide a zip version in first post with included 4-way-reboot? Just recognized that it's gone with your mod because of the changed files.
Thanks m8!
sent with Samsungs unleashed beast using Tapatalk 2
hi Sorg, sorry for double request, is possible have this for odex rom DILB root? thanks for reply
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
I know what I'm doing, I just haven't found any reliable tools to decompile jar's
Kryten2k35 said:
I know what I'm doing, I just haven't found any reliable tools to decompile jar's
Click to expand...
Click to collapse
a) you can rename jar to apk and use your favorite tool
b) apktool works fine with jars as well
c) use baksmali/smali tools
sorg said:
a) you can rename jar to apk and use your favorite tool
b) apktool works fine with jars as well
c) use baksmali/smali tools
Click to expand...
Click to collapse
Thanks. Last source I read suggested AndroidChef, which didn't work at all. I'll use apktool first and see how that goes.
uberto.costanzo said:
hi Sorg, sorry for double request, is possible have this for odex rom DILB root? thanks for reply
Click to expand...
Click to collapse
i can upload mods for ROMs i'm using. I'm using deodexed ROM. Since i often change something in ROM, deodexed version is the one suitable for me.
If you like to use mods, install stock deodexed ROM and you will have more freedom to install many different mods and hacks.
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Kryten2k35 said:
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Click to expand...
Click to collapse
Man, 10 mins faster than me
Great work as always!
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
=-O Kryten is a matter chef
---------- Post added at 11:28 PM ---------- Previous post was at 11:26 PM ----------
Kryten2k35 said:
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Click to expand...
Click to collapse
Just flash from recovery for Ultima 2.4?
This guide was written based on the Sprint Samsung Galaxy S3 ND8 KitKat stock ROM but with the proper modifications may work for other KitKat ROMs. Please don't ask me to modify this to work with ROM xyz or to compile this for you into a ROM. I won't do it.
Background Info
This guide is based on work orignally written by havocgb here. His code was written for the Sony Xperia Mini and had to be somewhat modified for use on our phones so make sure to drop a thank you over in that thread.
Requirements
apktool 2.0 beta 9 and the knowledge of how to use it. There are various guides on how to use apktool on XDA. Find one and read it. Make sure to read the information on the apktool site as well since some of the options in 2.0 may be different from the guides you find.
A text editor that supports Unix-style text files. I recommend Notepad++.
Files
You'll be working with SystemUI.apk
SystemUI.apk
Decompile SystemUI.apk using apktool.
Open smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali in your preferred text editor.
Find # instance fields and add .field private mTouchRight:Z on a new line somewhere before # direct methods.
Find # virtual methods and add the following methods ABOVE it:
Code:
.method private interceptOneFingerStatusBarRightTap(Landroid/view/MotionEvent;)V
.locals 4
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
if-nez v1, :cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisplay:Landroid/view/Display;
invoke-virtual {v0}, Landroid/view/Display;->getRotation()I
move-result v1
const v0, 0x1
if-eq v0, v1, :cond_2
const v0, 0x3
if-eq v0, v1, :cond_2
const/high16 v1, 0x44070000
:goto_0
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v0
cmpl-float v0, v0, v1
if-ltz v0, :cond_0
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
goto :goto_1
:cond_0
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
:cond_1
:goto_1
return-void
:cond_2
const/high16 v1, 0x44480000
goto :goto_0
.end method
.method private oneFingerStatusBarRightTapFlipToQuickPanel()V
.locals 1
.prologue
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
if-eqz v0, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->flipToSettings()V
:goto_0
return-void
:cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->flipToNotifications()V
goto :goto_0
.end method
Take note that the line const/high16 v1, 0x44070000 is a floating-point hexadecimal value that controls the starting point of the quick pulldown zone in pixels when in portrait orientation (in this case, the start point is set at approximately 540 pixels from the left side of the status bar) while the line const/high16 v1, 0x44480000 controls the start point of the pulldown zone when in landscape orientation (this value is approximately 800 pixels from the left side of the status bar). For larger screens or to change the size of the drag zone, you'll want to re-calculate these using a floating-point to hexadecimal conversion.
Locate the portion of code that looks like the following:
Code:
.method public flipToNotifications()V
.locals 10
.prologue
const/high16 v9, 0x3f800000
const/4 v8, 0x0
const-wide/16 v6, 0xc8
const/4 v5, 0x1
const/4 v4, 0x0
On a new line under const/4 v4, 0x0, add iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
Locate the portion of code that looks like the following:
Code:
.method public flipToSettings()V
.locals 11
.prologue
const-wide/16 v9, 0x15e
const/4 v8, 0x4
const/4 v7, 0x1
const/4 v6, 0x0
const/4 v5, 0x0
On a new line under const/4 v5, 0x0, add iput-boolean v7, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
Locate the section of code that looks like the following:
Code:
.method public interceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 5
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
const/4 v1, 0x0
const/4 v2, 0x1
.line 2973
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindowState:I
if-nez v3, :cond_1
.line 2974
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
On a newline above ABOVE the line invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I, add invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptOneFingerStatusBarRightTap(Landroid/view/MotionEventV
Locate the method .method public updateExpandedViewPos(I)V and locate the line return-void inside of the method. On a new line above return-void, add invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->oneFingerStatusBarRightTapFlipToQuickPanel()V.
Save the file and recompile SystemUI using apktool. Don't forget to re-sign the APK (either use an APK signer if you have a ROM that has 3rd-party system app signatures enabled or copy the AndroidManifest.xml file and META-INF folder from the original to the new APK).
Install to your phone using your preferred method. You should already know this but I'll say it anyway, THIS CANNOT BE INSTALLED LIKE NORMAL SIDE-LOADED APKs. I prefer to reboot to recovery and use ADB to push the file to the system, but you can use whatever method is easiest for you (ie. Aroma file manager, flashable zip, etc.).
Thanks for this. I plan on adding this to Tribute in the near future.
I need help please. I'm having error " [5048,15] no viable alternative at input 'p1' " whenever I compile SystemUI.apk. I'm trying to apply this mod on my N8000. Thanks in advance!
filchi756 said:
I need help please. I'm having error " [5048,15] no viable alternative at input 'p1' " whenever I compile SystemUI.apk. I'm trying to apply this mod on my N8000. Thanks in advance!
Click to expand...
Click to collapse
Try using apktool 2.
Thank you for releasing this guide. Looking forward to adding this to my rom.
talkingmonkeys said:
Try using apktool 2.
Thank you for releasing this guide. Looking forward to adding this to my rom.
Click to expand...
Click to collapse
Ok thanks for the suggestion. I will try that.
Need help please .I manage to solve my problem about compiling but when I install it I'm having systemUI stop(foreclose) message. If you have time if possible please help me check my Phonestatusbar.smali ,in what part did I do wrong I've attach my PhoneStatusBar.smali below. Hope you can help me.Thanks in advance.
filchi756 said:
Need help please .I manage to solve my problem about compiling but when I install it I'm having systemUI stop(foreclose) message. If you have time if possible please help me check my Phonestatusbar.smali ,in what part did I do wrong I've attach my PhoneStatusBar.smali below. Hope you can help me.Thanks in advance.
Click to expand...
Click to collapse
Would need to see a logcat. If you don't know how to pull one and post it here, however, I'd say you're not ready to start implementing mods.
moonknightus said:
Would need to see a logcat. If you don't know how to pull one and post it here, however, I'd say you're not ready to start implementing mods.
Click to expand...
Click to collapse
Ok I will post a logcat when I have access to pc. Yeah I think I'm not ready yet for this kind of mods.But I have some little experience in implementing mods in Jellybean before though(by following others guide too), but having a hardtime with kitkat at the moment. By the way any chance you can share me your phonestatusbar.smali or even the SystemUI.apk with you mod included so I can compare it with mine? I think it not necessary to download the whole rom if I just need one apk and beside I don't have S3. And I have a crappy internet connection. Hope you understand.Thanks!
filchi756 said:
Ok I will post a logcat when I have access to pc. Yeah I think I'm not ready yet for this kind of mods.I have some experience in implementing mods in Jellybean before though(by following others guide too), but having a hardtime with kitkatat the moment. By the way any chance you can share me your phonestatusbar.smali or even the SystemUI.apk with you mod included so I can compare it with mine? I think it not necessary to download the whole rom if I just need one apk and beside I don't have S3. And I have a crappy internet connection. Hope you understand.Thanks!
Click to expand...
Click to collapse
Nope. My ROM has multiple mods so the smali and apk will not help you. Not to mention, my phone is a Galaxy S3.
moonknightus said:
Nope. My ROM has multiple mods so the smali and apk will not help you. Not to mention, my phone is a Galaxy S3.
Click to expand...
Click to collapse
Ok thanks.I'll wait for someone's else help, who implemented this mod of your's and with clear instruction I'm capable of understanding(like the guide of havocgb, it has before and after).Your mod is just new that's means just few people implemented it yet in their rom at the moment.When time come's there will surely be someone out there who will write a clear guide which we amateur's will understand. Thanks again for this guide anyway. Cheers mate!
P.S. I think even we have different gadget as long as they are the same brand(like Samsung) .I think there are a lot of similarities on their content. I successfully made mods for my tablet using guides from Note 2014 and Note pro before by the way .
filchi756 said:
Ok thanks.I'll wait for someone's else help, who implemented this mod of your's and with clear instruction I'm capable of understanding.Your mod is just new that's means just few people implemented it yet in their rom at the moment.When time come's there will surely be someone out there who will write a clear guide which we amateur's will understand. Thanks again for this guide anyway. Cheers mate!
P.S. I think even we have different gadget as long as they are the same brand(like Samsung) .I think there are a lot of similarities on their content. I successfully made mods for my tablet using guides from Note 2014 and Note pro before by the way .
Click to expand...
Click to collapse
There's nothing new about this mod. Was originally written for an Xperia phone by havocgb in March 2013. This is clearly stated in the op. If you are incapable of following instructions, modifying the code to fit your device, and debugging your own code, that is not my fault. FYI, others have already successfully implemented this mod. At least one was on a note device.
moonknightus said:
There's nothing new about this mod. Was originally written for an Xperia phone by havocgb in March 2013. This is clearly stated in the op. If you are incapable of following instructions, modifying the code to fit your device, and debugging your own code, that is not my fault. FYI, others have already successfully implemented this mod. At least one was on a note device.
Click to expand...
Click to collapse
Ok. I'll look for that who implemented it on note(If I get lucky).I'm just looking for a quick solution for this cause I really want to implement this to my gadgets. Thankfully you did not suggest "google is your friend" thing to find solution for your problem.I can't access google, its block in my location(China).Thanks again for the guide.Anyway Cool! peace mate!
filchi756 said:
Ok. I'll look for that who implemented it on note(If I get lucky).I'm just looking for a quick solution for this cause I really want to implement this to my gadgets. Thankfully you did not suggest "google is your friend" thing to find solution for your problem.I can't access google, its block in my location(China).Thanks again for the guide.Anyway Cool! peace mate!
Click to expand...
Click to collapse
There's always Baidu. If I run across the PM, I'll shoot the guy's name over to you. I may have deleted it
moonknightus said:
There's always Baidu. If I run across the PM, I'll shoot the guy's name over to you. I may have deleted it
Click to expand...
Click to collapse
Ok thanks mate .That will be great:good:! If I use baidu in China the results are only from China and in chinese(I don't understand Chinese). I tried it before in Hongkong the results are international and in English.Hope you understand what I meant mate.
P.S. I'm trying your other mod here: http://forum.xda-developers.com/gal...t/mod-enable-heads-notifications-nd8-t2873109 .Lets see if I can implement it successfully:fingers-crossed:.
bro. screenshots show the work of this tutorial..
Sorry for my bad english
please upload the screenshot