Related
Hey everyone! In response to sudden events i am deciding to make tutorials for all my MODS for interested DEVS. I'm going to start off with the Call recording MOD
First you're going to need to decompile the Smali in SecPhone.apk
Navigate to the following smali file: \com\android\phone\PhoneFeature.smali
Edit the following code:
Code:
:cond_4e
[COLOR="Green"]++:goto_4e[/COLOR]
const/4 v1, 0x1
[COLOR="Red"]--:goto_4e[/COLOR]
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v8
.line 575
const-string v1, "SKT"
Now compile and push apk too /system/app/ and you are done
**ATTENTION** Your goto id's may be something different just add the line listed above and change the goto ID to the one listed in your smali.
Have fun
Did this add a third button to the normal phone app? Can you post the recompiled app or is that against the policy
Sent from my SPH-L710...if some one helps you press the thanks button
xtrezpasor said:
Did this add a third button to the normal phone app? Can you post the recompiled app or is that against the policy
Sent from my SPH-L710...if some one helps you press the thanks button
Click to expand...
Click to collapse
This adds a button to the stock app
Sent from my SPH-L710 using Tapatalk 2
clark44 said:
This adds a button to the stock app
Sent from my SPH-L710 using Tapatalk 2
Click to expand...
Click to collapse
Do you lose the swap button?
Sent from my SPH-L710...if some one helps you press the thanks button
xtrezpasor said:
Do you lose the swap button?
Sent from my SPH-L710...if some one helps you press the thanks button
Click to expand...
Click to collapse
I haven't really checked that out. I dident get any reports of that issue.
Sent from my SPH-L710 using Tapatalk 2
clark44 said:
I haven't really checked that out. I dident get any reports of that issue.
Sent from my SPH-L710 using Tapatalk 2
Click to expand...
Click to collapse
I'll try to do this my self but if you can post a copy of yours working that be awesome
Sent from my SPH-L710...if some one helps you press the thanks button
I've done this mod, slightly different, but it worked nonetheless.
Either method will make "additional settings" under call settings force close.
My method was this
LOOK FOR:
Code:
const-string v2, "restore_spk_unplugged_dock"
invoke-virtual {v1, v2, v8}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForKor()V
invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForUsa()V
return-void
:cond_8ca
const/4 v1, 0x0
goto/16 :goto_28
:cond_8cd
const/4 v1, 0x0
goto/16 :goto_4f
LOOK AROUND:
Code:
:cond_8cd
const/4 v1, 0x0
goto/16 :goto_4f
CHANGE:
Code:
const/4 v1, 0x0
INTO:
Code:
const/4 v1, 0x1
freeza said:
I've done this mod, slightly different, but it worked nonetheless.
Either method will make "additional settings" under call settings force close.
My method was this
LOOK FOR:
Code:
const-string v2, "restore_spk_unplugged_dock"
invoke-virtual {v1, v2, v8}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForKor()V
invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForUsa()V
return-void
:cond_8ca
const/4 v1, 0x0
goto/16 :goto_28
:cond_8cd
const/4 v1, 0x0
goto/16 :goto_4f
LOOK AROUND:
Code:
:cond_8cd
const/4 v1, 0x0
goto/16 :goto_4f
CHANGE:
Code:
const/4 v1, 0x0
INTO:
Code:
const/4 v1, 0x1
Click to expand...
Click to collapse
I see you're just enabling the feature. Same thing. Yours is slightly simpler. Good information for people who can't get mine to work
Sent from my SPH-L710 using Tapatalk 2
Sorry so by doing all of this it will basically enable call recording without having to use a third party app over speaker phone. And I've never done this before so I'm I too user terminal for all off this ? Thanks again for the help.
Sent from my SPH-L710 using xda premium
Yelp, anyone please help. Does this work for lg8
Sent from my SPH-L710 using xda premium
Does not seem to work on LG8.
Didact74 said:
Does not seem to work on LG8.
Click to expand...
Click to collapse
I'm running Blazer v1.8 with LG8 and have it working just fine. Are you on a stock rom?
I installed the zip from this post:
http://forum.xda-developers.com/showpost.php?p=28164335&postcount=2
---------- Post added at 02:06 PM ---------- Previous post was at 02:03 PM ----------
Does any one know how to mod this so it automatically records all calls?
Would this work with CM10?
joelstitch said:
Would this work with CM10?
Click to expand...
Click to collapse
Only works with ics Roms unfortunately, not working with Jelly yet.
i apologize but how do i get to the point to add the mod?
freeza said:
I've done this mod, slightly different, but it worked nonetheless.
Either method will make "additional settings" under call settings force close.
My method was this
LOOK FOR:
Code:
const-string v2, "restore_spk_unplugged_dock"
invoke-virtual {v1, v2, v8}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForKor()V
invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForUsa()V
return-void
:cond_8ca
const/4 v1, 0x0
goto/16 :goto_28
:cond_8cd
const/4 v1, 0x0
goto/16 :goto_4f
LOOK AROUND:
Code:
:cond_8cd
const/4 v1, 0x0
goto/16 :goto_4f
CHANGE:
Code:
const/4 v1, 0x0
INTO:
Code:
const/4 v1, 0x1
Click to expand...
Click to collapse
Freeza have you managed to get this working on JB and if so can you make an Xposed framework module for it?
dyehya said:
Freeza have you managed to get this working on JB and if so can you make an Xposed framework module for it?
Click to expand...
Click to collapse
yes have you gotten it to work?
Sent from my SPH-L710 using xda premium
[MOD][GUIDE] Device Status Info "Normal" Instead Of "Modified" Mod!
Hello to all Developers and XDA members! I have come here to give you a guide on how you can change the device status info from "Modified" to "Normal" and here is how you can do it!
What Is Required...
★ First you need to have experience and know how to decompile/recompile apks with Apktools, apkmanager, smali, and baksmali
★ Have 7-zip installed onto your computer/laptop
★ Make sure you have Notepad++ also installed!
★HOW TO CHANGE THE DEVICE STATUS INFO FROM "MODIFIED" TO "NORMAL"★
WHAT DOES THIS MOD DO: Instead Of The Device Status Showing As "Modified" It Now Shows As "Normal". So Now The Custom Rom Can Look More Like It's Stock.
STEP 1
★ Go into your system/app folder and take out your "SecSettings.apk"
★ Then use one of the applications such as apktools or apkmanager and then use the commands to decompile the SecSettings.apk
★ Once you have decompiled the SecSettings.apk, navigate and go to:
smali/com/android/settings/deviceinfo/Status.smali
Click to expand...
Click to collapse
Now open up "Status.smali" with Notepad++ for editing:
Now for this part of this guide what I have highlighted in GREEN text is what you have to find using Notepad++, What you see in RED is the line you have to remove/delete, And also what you see in BLUE is the line you have to make the modified changes to:
SEARCH FOR METHOD:
Code:
[COLOR="Green"].method private changeSysScopeStatus()V[/COLOR]
NOW REMOVE THIS WHOLE ENTIRE LINE THAT YOU SEE IN RED ALL THE WAY DOWN TO THE .END METHOD:
Code:
[COLOR="Green"].method private changeSysScopeStatus()V[/COLOR]
[COLOR="Red"].locals 7
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f090129
const/4 v5, -0x1
.line 827
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 829
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 830
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 832
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_0
.line 833
const-wide/16 v0, 0x1
.line 836
:cond_0
iget-object v3, p0, Lcom/android/settings/deviceinfo/Status;->mSysScope:Lcom/sec/android/app/sysscope/service/SysScope;
invoke-virtual {v3}, Lcom/sec/android/app/sysscope/service/SysScope;->isConnected()Z
move-result v3
if-nez v3, :cond_1
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_1
.line 837
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 854
:goto_0
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 855
return-void
.line 840
:cond_1
:try_start_0
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScope:Lcom/sec/android/app/sysscope/service/SysScope;
invoke-virtual {v0}, Lcom/sec/android/app/sysscope/service/SysScope;->getLastScanResult()Lcom/sec/android/app/sysscope/service/SysScopeResultInfo;
move-result-object v0
invoke-virtual {v0}, Lcom/sec/android/app/sysscope/service/SysScopeResultInfo;->getResult()I
move-result v0
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 845
:goto_1
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_2
.line 846
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_0
.line 841
:catch_0
move-exception v0
.line 842
iput v5, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
goto :goto_1
.line 847
:cond_2
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_3
.line 848
const v0, 0x7f09012a
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_0
.line 850
:cond_3
const v0, 0x7f09012a
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_0
.end method[/COLOR]
AND THEN ADD THIS ENTIRE NEW METHOD RIGHT UNDER TO THE METHOD YOU HAVE SEARCHED FOR IN GREEN:
Code:
[COLOR="Green"].method private changeSysScopeStatus()V[/COLOR]
[COLOR="Blue"].locals 2
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v0
const v1, 0x7f090128 #sysscope_normal
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
return-void
.end method
[/COLOR]
STEP 2
I have added a hashtag which is #sysscope_normal from the new method you have to add from above that I have highlighted in BLUE. For your next step on how you can find your public id which mines in this guide is 0x7f090128 for sysscope_normal since for other carriers your public id might be different. To find yours here is how...
Once your "SecSettings.apk" is decompiled head to:
res/values/public.xml
Click to expand...
Click to collapse
Now open up "public.xml" with Notepad++:
Now for this part what I have highlighted in GREEN text is what you have to find using Notepad++, What you see in BLUE is the line you have to look at to get your sysscope_normal public string id:
SEARCH FOR PUBLIC STRING:
Code:
[COLOR="Green"]<public type="string" name="sysscope_normal"[/COLOR]
My syscope_normal public string id for T-Mobile is what you see in BLUE:
Code:
[COLOR="Green"]<public type="string" name="sysscope_normal" id="[/COLOR][COLOR="Blue"]0x7f090128[/COLOR][COLOR="Green"]" />[/COLOR]
If your sysscope_normal public string id is different than mines, what your going to need to do is copy your public string id that's different, and then paste it over the the public id right next to #sysscope_normal from the entire new method that you have added that is highlighted in BLUE from STEP 1.
Now once your done with modifying the "Status.smali" and checking that you have the right public id, Save your Notepad changes, Recompile your SecSettings.apk using apktool or smali commands and your DONE! You should now head to "Settings - About device - Status" and where it says "Device Status" It should now say "Normal" Instead Of "Modified"!... ENJOY!
REMINDER...
Remember this works for all S3 Devices on all carriers T-Mobile, ATT, Verizon, Sprint, And Etc!
Oh man.... this.... this is freaking awesome! You rock Jovy! Amazing job as always man. So adding to my next update. Thanks bro.
nice find! :good:
I have think there is a typo in step one, you said to decompile SecMms.apk, I believe you meant SecSettings
Sent from my Galaxy Note 10.1!
Jamison904 said:
Oh man.... this.... this is freaking awesome! You rock Jovy! Amazing job as always man. So adding to my next update. Thanks bro.
Click to expand...
Click to collapse
Thanks bro! Enjoy the mod its great implementing this mod on any modified rom, the modified rom now acts as if its a real stock rom since it is now "Normal"! :good:
Sent from my SGH-T999 using Tapatalk 2
semorebutts123 said:
nice find! :good:
Click to expand...
Click to collapse
Thanks! :good:
Sent from my SGH-T999 using Tapatalk 2
Great job bro!!! I have been waiting for something like this for a while.... Your instructions are on point and easy to follow. Thanks for your dedication man.
LoopDoGG79 said:
I have think there is a typo in step one, you said to decompile SecMms.apk, I believe you meant SecSettings
Sent from my Galaxy Note 10.1!
Click to expand...
Click to collapse
Oops thanks for the heads up I have just fixed it and also to let everyone know I have updated the OP with a Reminder for the people who have a S3 device on another carrier...
prototype.77 said:
Great job bro!!! I have been waiting for something like this for a while.... Your instructions are on point and easy to follow. Thanks for your dedication man.
Click to expand...
Click to collapse
Your welcome bro. :good:
Sent from my SGH-T999 using Tapatalk 2
Damn Jovy you always find the best tweaks! Great job man. Will try it and install Isis wallet
One question though, Will this let your phone search for updates or OTA when their out? And not say your device is modded anymore
gypsy214 said:
Damn Jovy you always find the best tweaks! Great job man. Will try it and install Isis wallet
One question though, Will this let your phone search for updates or OTA when their out? And not say your device is modded anymore
Click to expand...
Click to collapse
Im not sure since i always remove/hide the firmware update setting from my roms so i cant test that part out hopefully someone could post and let me know, but imo it shouldnt ask for firmware OTA updates if the developer has already removed the specific apk files that has to do with anything about checking/searching for OTA updates.
Sent from my SGH-T999 using Tapatalk 2
jovy23 said:
Im not sure since i always remove/hide the firmware update setting from my roms so i cant test that part out hopefully someone could post and let me know, but imo it shouldnt ask for firmware OTA updates if the developer has already removed the specific apk files that has to do with anything about checking/searching for OTA updates.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Well every now and then I like to go completely stock. Was just wondering if with this method it will actually notify when there is an update. Will go flash the stock ROM with a previous firmware and this and see if it happens.
Was just wondering
Nice work and find bro!
sbreen94 said:
Nice work and find bro!
Click to expand...
Click to collapse
Thanks man! Enjoy... :good:
Shows normal but apps that check for root like media hub still won't work.
Sent from my SGH-T999 using xda premium
Great job! I'll be sure and add the credit to the how-to here. Oh wait..how did the date on this thread? Definitely something weird....
http://forum.xda-developers.com/showthread.php?t=2192199
digiblur said:
Great job! I'll be sure and add the credit to the how-to here. Oh wait..how did the date on this thread? Definitely something weird....
http://forum.xda-developers.com/showthread.php?t=2192199
Click to expand...
Click to collapse
lol nice work digiblur! I added your mod to my rom and it worked great! I will be giving you credit in my op for making the mod
Thanx for sharing
Hey Jovy. I love the ROM. X2 is definitely a beast. After I flashed the mod for normal status, it shows normal but I still can't play content from media hub or connect via all share cast. Any help would be greatly appreciated being that I would like to use this awesome ROM and view on big screen via all share cast.
Sent from my SGH-T999 using xda premium
seshaz said:
Shows normal but apps that check for root like media hub still won't work.
Sent from my SGH-T999 using xda premium
Click to expand...
Click to collapse
Media Hub does work with root. I'm rooted stock right now and I have a working media hub. as long as device status is "normal" media hub should work fine.
christucker97 said:
Hey Jovy. I love the ROM. X2 is definitely a beast. After I flashed the mod for normal status, it shows normal but I still can't play content from media hub or connect via all share cast. Any help would be greatly appreciated being that I would like to use this awesome ROM and view on big screen via all share cast.
Sent from my SGH-T999 using xda premium
Click to expand...
Click to collapse
It's because it is a cosmetic change only.
Sent from my little Note2
This is just a quick how to. Spend a few hours writing this yesterday (see - post and post.) The GlobalActions$SinglePressAction.smali part is from Cristiano Matos Thanks bro! The rest I put together from trail and error. Feel free to use it, a thanks and some credit would be cool. Enjoy. Also huge shout out to my team mate @Mr Impossible for fixing my error. Thanks Bro!!
Flashable zip - http://d-h.st/Hnt
For developers, if you would like to see the diff you can see them on my github:
https://github.com/Infamous-Project...mmit/aaaf80b286686828dce83a3ad5e636edcaeb6fd3 and https://github.com/Infamous-Project...mmit/dc6612b16319a704e1f858097dcc934c8c647f2f
First you need to decompile the framework-res.apk and navigate and open res/values/layouts.xml and add this to the bottom.
Code:
<item type="layout" name="keyguard_transport_control">false</item>
This will fix the compile error that you get from the stock framework-res.
Now you need to add the strings and the icon for reboot since stock there are none. Navigate to res/values/strings.xml and add
Code:
<string name="reboot">Reboot menu</string>
Now you need to add the icon to res/drawable-xhdpi/ic_lock_reboot.png (I will attach it later). Now compile the framework-res.apk then decompile it again. We do this so the apktool will add these to the public.xml and assign ID's to them that we will need later. You can put the new compiled framework aside to add to your ROM later.
Now we will move to the android.policy.jar. You will need decompile the classout. Now go to classout/com/android/internal/policy/impl/GlobalActions.smali and find
Code:
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Code:
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[COLOR="Blue"]+
+ new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;
+
+ const v2, 0x1080c11 (This is the ID for the Ic_lock_reboot we added to framework-res. add yours)
+
+ const v3, 0x10408eb (this is the String ID for reboot)
+
+ invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
+
+ invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
+[/COLOR]
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Also pro tip: ID's for apps will be in this format 0x01080c11 and in the android.policy.jar is 0x1080c11. Notice that in the android.policy.jar the 0 after the x is removed. 0x01080c11. So when you are comparing remove the 0 if pulling from the public.xml or if you if you are taking from the android.policy.jar you will need to add it to match up.
This part is from Cristiano Matos Thanks bro!
classout/com/android/internal/policy/impl/GlobalActions$SinglePressAction.smali
Find this
Code:
.end annotation
# instance fields
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
And between .end annotation and # instance fields, add this
Code:
[COLOR="Blue"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
Find this
Code:
# direct methods
.method protected constructor <init>(II)V
.registers 4
.parameter "iconResId"
.parameter "messageResId"
And between # direct methods and .method protected constructor <init>(II)V, add this
Code:
[COLOR="Blue"].method static constructor <clinit>()V
.registers 3
const/4 v0, 0x3
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, "Download"
aput-object v2, v0, v1
const/4 v1, 0x2
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]
Last you need to add the files GlobalActions$99.smali, GlobalActions$99$1.smali, and GlobalActions$99$2.smali to Classout/com/android/internal/policy/impl then recomplie the Classout.
mine
Nice
Sent from my SGH-M919 using xda premium
Thanks bro!
Sent from my dark hole called an office.
Screenshots
Sent from my dark hole called an office.
It works by the way if anyone is wondering
Could someone please make a flashabls zip for the GPe ROM of Jamal? Would be really awesome!
Me Gusta!
Here is a flashable zip
http://d-h.st/Hnt
Sent from my dark hole called an office.
Jamison904 said:
Here is a flashable zip
http://d-h.st/Hnt
Sent from my dark hole called an office.
Click to expand...
Click to collapse
Sweet thx man. ..
Sent from my SGH-M919 using Tapatalk 4 Beta
I flashed the zip and the power menu has not changed. Can anyone confirm that the zip works?
TheAvatar said:
I flashed the zip and the power menu has not changed. Can anyone confirm that the zip works?
Click to expand...
Click to collapse
Works perfectly for me. Are you using deodexed or odexed?
Sent from my GT-I9505 using xda premium
Odexed, might flash a deodexed ROM later today
works perfectly on my De-Oxdexed GE Rom !!!
Since you've already figured this one out.... do you also know where/how to change hardware key configuration to stock TW?
Thanks for the guide & the flashable zip.
Would love to see a write up for center clock, %batterymod.. would be great to have guides in a centralized location.
Thanks... It works perfect
Sent from my GT-I9505G using Tapatalk 2
Thanks
Sent from my GT-I9505 using Tapatalk 4 Beta
Thanks, i think modifying the toggles in notification should be closer now. Or is someone already started on that.
I think someone is already working on that. One of the threads in the app section has a lot of mods running already. Would be nice to have the function toggle like the TW ROMs. That gives me an idea.
Thanks
Sent from my dark hole called an office.
@Jamison904 forgot to hit thanks on OP
you know i've actually seen people using your framework and not give credit for using this mod? rofl the ways of xda baffle me
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
Hai XDA. I just want share little guide and very simple
How to full lockscreen/ hide statusbar on lockscreen,
Lets go to guide
Requirement
Apktool
Notepad
android.policy.jar
Decompile your android.policy.jar
Go to : smali\com\android\internal\policy\impl\KeyguardViewManager.smali
find .method public declared-synchronized show()V
and scrool down, find line similiar like this
Code:
const/4 v5, 0x0
invoke-direct {v1, v2, v3, v5}, Lcom/android/internal/policy/impl/KeyguardViewManager$KeyguardViewHost;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardViewCallback;Lcom/android/internal/policy/impl/KeyguardViewManager$1;)V
iput-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mKeyguardHost:Landroid/widget/FrameLayout;
.line 119
const/4 v9, -0x1
.line 120
.local v9, stretch:I
const v4, [COLOR="Red"]0x100800[/COLOR]
.line 125
.local v4, flags:I
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mNeedsInput:Z
if-nez v1, :cond_2
.line 126
const/high16 v1, 0x2
or-int/2addr v4, v1
see the code I marked in red : 0x100800 and change it to 0x10000504
Save, recompile your android.policy.jar and DONE!!
Happy Modding :highfive:
full lockscreen
you can be edited to me full lockscreen which is not hide statebar
Thanks for the guide its work for me.
kulphat said:
you can be edited to me full lockscreen which is not hide statebar
Click to expand...
Click to collapse
what do you mean full lockscreen which is not hide statebar?
amadeuszxd said:
Thanks for the guide its work for me.
Click to expand...
Click to collapse
You'r welcome
I lock the screen while listening to music with headphones , the music I was lag
I often listen to music and it makes me feel very uncomfortable ... you can not fix it
nice guide mastah
syaeful said:
Hai XDA. I just want share little guide and very simple
How to full lockscreen/ hide statusbar on lockscreen,
Lets go to guide
Requirement
Apktool
Notepad
android.policy.jar
Decompile your android.policy.jar
Go to : smali\com\android\internal\policy\impl\KeyguardViewManager.smali
find .method public declared-synchronized show()V
and scrool down, find line similiar like this
Code:
const/4 v5, 0x0
invoke-direct {v1, v2, v3, v5}, Lcom/android/internal/policy/impl/KeyguardViewManager$KeyguardViewHost;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardViewCallback;Lcom/android/internal/policy/impl/KeyguardViewManager$1;)V
iput-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mKeyguardHost:Landroid/widget/FrameLayout;
.line 119
const/4 v9, -0x1
.line 120
.local v9, stretch:I
const v4, [COLOR="Red"]0x100800[/COLOR]
.line 125
.local v4, flags:I
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mNeedsInput:Z
if-nez v1, :cond_2
.line 126
const/high16 v1, 0x2
or-int/2addr v4, v1
see the code I marked in red : 0x100800 and change it to 0x10000504
Save, recompile your android.policy.jar and DONE!!
Happy Modding :highfive:
Click to expand...
Click to collapse
nice guide can you make a guide for4.0+ How to create lollipop lockscreen.??:good:
veneetsingh said:
nice guide can you make a guide for4.0+ How to create lollipop lockscreen.??:good:
Click to expand...
Click to collapse
Thanks sir. Maybe not diferent too much with this tut. Just find similiar line.
syaeful said:
Thanks sir. Maybe not diferent too much with this tut. Just find similiar line.
Click to expand...
Click to collapse
i know it is Easy but I am creating lollipop rom for my device and i need help All is done but need only lollipop lockscreen..?
can you help me.?:victory:
thanx sir, nice guide and work great to me :good:
Doctor Be said:
thanx sir, nice guide and work great to me :good:
Click to expand...
Click to collapse
You're welcome
veneetsingh said:
i know it is Easy but I am creating lollipop rom for my device and i need help All is done but need only lollipop lockscreen..?
can you help me.?:victory:
Click to expand...
Click to collapse
Sorry sir... i can't port it
maybe you can use this application,, or port
https://play.google.com/store/apps/details?id=com.hi.locker&hl=en
Nice Guide Dude!
Keep it up :thumbup:
SuperMan(Alex) said:
Nice Guide Dude!
Keep it up :thumbup:
Click to expand...
Click to collapse
Thanks :highfive:
inquiry
syaeful said:
Hai XDA. I just want share little guide and very simple
How to full lockscreen/ hide statusbar on lockscreen,
Lets go to guide
Requirement
Apktool
Notepad
android.policy.jar
Decompile your android.policy.jar
Go to : smali\com\android\internal\policy\impl\KeyguardViewManager.smali
find .method public declared-synchronized show()V
and scrool down, find line similiar like this
Code:
const/4 v5, 0x0
invoke-direct {v1, v2, v3, v5}, Lcom/android/internal/policy/impl/KeyguardViewManager$KeyguardViewHost;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardViewCallback;Lcom/android/internal/policy/impl/KeyguardViewManager$1;)V
iput-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mKeyguardHost:Landroid/widget/FrameLayout;
.line 119
const/4 v9, -0x1
.line 120
.local v9, stretch:I
const v4, [COLOR="Red"]0x100800[/COLOR]
.line 125
.local v4, flags:I
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mNeedsInput:Z
if-nez v1, :cond_2
.line 126
const/high16 v1, 0x2
or-int/2addr v4, v1
see the code I marked in red : 0x100800 and change it to 0x10000504
Save, recompile your android.policy.jar and DONE!!
Happy Modding :highfive:
Click to expand...
Click to collapse
will this work on kitkat firmware?
boszjhiee22 said:
will this work on kitkat firmware?
Click to expand...
Click to collapse
not tested sir... maybe different
apktool
I would like to do it but i dont know how to install apktool i did step by step, but i dont kn0ow how to write the code in cmd
Is this guide for JB?
It works!
Thank you so much. Cheers
how to hide status bar in lollipop 5.1.1 lockscreen
Dear friend,
can u help me to edit android policy.jar to remove the status bar in lock screen?
thanks in advance