[oreo] WifiDisplay fix - Sony Xperia XZ ROMs, Kernels, Recoveries, & Other

[oreo] WifiDisplay fix
WfdService.apk
smali\com\sonymobile\wifidisplay\WFDSessionHelper.smali
Remove red
.method public monitorForegroundApp()V
.locals 3
.prologue
.line 107
const-string/jumbo v0, "user"
sget-object v1, Landroid/os/Build;->TYPE:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-nez v0, :cond_0
.line 108
const-string/jumbo v0, "1"
const-string/jumbo v1, "persist.debug.wfd.appmonitoring"
const-string/jumbo v2, "0"
invoke-static {v1, v2}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
.line 107
if-eqz v0, :cond_0
.line 109
const-string/jumbo v0, "WFDSessionHelper"
const-string/jumbo v1, "Disable foreground application monitoring"
invoke-static {v0, v1}, Lcom/qualcomm/wfd/Log;->d(Ljava/lang/String;Ljava/lang/StringV
.line 110
return-void
.line 113
:cond_0
new-instance v0, Ljava/lang/Thread;
new-instance v1, Lcom/sonymobile/wifidisplay/WFDSessionHelper$1;
invoke-direct {v1, p0}, Lcom/sonymobile/wifidisplay/WFDSessionHelper$1;-><init>(Lcom/sonymobile/wifidisplay/WFDSessionHelperV
invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/RunnableV
invoke-virtual {v0}, Ljava/lang/Thread;->start()V
.line 140
return-void
.end method
Click to expand...
Click to collapse
system\etc\wfdconfig.xml
Modify 1 to 0
<!-- enable HDCP by default -->
<ContentProtection>
<Valid>1</Valid>
<!--
Valid values WFD_HDCP_2_0,
WFD_HDCP_2_1 and WFD_HDCP_2_2
-->
<Version>WFD_HDCP_2_2</Version>
<CPPort>6789</CPPort>
<!--
turn on/off audio encryption
-->
<EncryptAudio>1</EncryptAudio>
</ContentProtection>
Click to expand...
Click to collapse
system\build.prop
Delete persist.debug.wfd.enable=1
Add persist.debug.wfd.appmonitoring=1

Hi, thanks for the method, but could you explain how to remove red in
"WfdService.apk
smali\com\sonymobile\wifidisplay\WFDSessionHelper. smali
Remove red"?

M-Rom said:
[oreo] WifiDisplay fix
WfdService.apk
smali\com\sonymobile\wifidisplay\WFDSessionHelper.smali
Remove red
system\etc\wfdconfig.xml
Modify 1 to 0
system\build.prop
Delete persist.debug.wfd.enable=1
Add persist.debug.wfd.appmonitoring=1
Click to expand...
Click to collapse
Please share modded apk? My apktool not work.

Can you provide me moded file that you made?

What is exactly do and more info please ??!
Verstuurd vanaf mijn G8231 met Tapatalk

sensei_sai said:
Hi, thanks for the method, but could you explain how to remove red in
"WfdService.apk
smali\com\sonymobile\wifidisplay\WFDSessionHelper. smali
Remove red"?
Click to expand...
Click to collapse
Find the method, then delete the lines who are in red.
Envoyé de mon F8331 en utilisant Tapatalk

Pandemic said:
What is exactly do and more info please ??!
Verstuurd vanaf mijn G8231 met Tapatalk
Click to expand...
Click to collapse
It fix wifi display
Envoyé de mon F8331 en utilisant Tapatalk

Nimadroid said:
Can you provide me moded file that you made?
Click to expand...
Click to collapse
Here's mine. Confirm it is working !
drive.google.com/file/d/1f9F9mGxpre104AuYsx-S7JpZzvR34AyZ/view?usp=drivesdk
Bye !:good:

Guys please help!
I am trying to edit my WfdService.apk file but can't find "smali" files in there?
I am using Apk Editor on Android and I have also tried with Apk Studio on Windows but just can't find where "smali\com\sonymobile\wifidisplay\WFDSessionHelper. smali" is.
For all other steps I completely understand what I have to do but this step is a bit confusing for me so please give some hints
Thanks!
Here is a link for my stock WfdService.apk file in case someone wants to take a look:
https://drive.google.com/open?id=14zVKweaA6LaGQTgKg2euEKSXwePtEX6B
(Xperia X F5122 with rooted Oreo 34.4.A.0.364)

I solved screen mirroring issue by restoring my DRM keys with unofficial "rootkernel" and "ta poc"!
https://forum.xda-developers.com/showpost.php?p=74724162&postcount=2793
Now have rooted stock Oreo with all DRM functions working...

linpe said:
Guys please help!
I am trying to edit my WfdService.apk file but can't find "smali" files in there?
I am using Apk Editor on Android and I have also tried with Apk Studio on Windows but just can't find where "smali\com\sonymobile\wifidisplay\WFDSessionHelper. smali" is.
For all other steps I completely understand what I have to do but this step is a bit confusing for me so please give some hints
Thanks!
Here is a link for my stock WfdService.apk file in case someone wants to take a look:
https://drive.google.com/open?id=14zVKweaA6LaGQTgKg2euEKSXwePtEX6B
(Xperia X F5122 with rooted Oreo 34.4.A.0.364)
Click to expand...
Click to collapse
VTLO said:
Here's mine. Confirm it is working !
drive.google.com/file/d/1f9F9mGxpre104AuYsx-S7JpZzvR34AyZ/view?usp=drivesdk
Bye !:good:
Click to expand...
Click to collapse
PLease reupload!

echo124 said:
PLease reupload!
Click to expand...
Click to collapse
Hello !
Now you should be able to get it !
Please report !
https://drive.google.com/file/d/1dQ5smDIGgk3cvJWsAqkIMu1hYZU4BQX0/view?usp=drivesdk

here is my modified WfdService.apk from stock 41.3.A.2.157 ftf and of course i deodex that before modifying
but after i replace the original one i cannot connect to my tv,however it was only not support HDCP before
anyone can test it?

slsamg7112 said:
here is my modified WfdService.apk from stock 41.3.A.2.157 ftf and of course i deodex that before modifying
but after i replace the original one i cannot connect to my tv,however it was only not support HDCP before
anyone can test it?
Click to expand...
Click to collapse
Use the one posted previously.

VTLO said:
Use the one posted previously.
Click to expand...
Click to collapse
didn't notice that.thanks a lot!:good:

Confirmed working fine edited apk in attachment just replace and edit permissions then complete the steps :good: :good:

Hi, Can anyone tell why I am not able to find smali\com\sonymobile\wifidisplay\WFDSessionHelper. smali
XZ .192

Related

(GUIDE) How to make IS backlights fix

IF YOU LIKE MY GUIDE PLEASE CLICK "THANKS" BUTTON
Principle:
First,there are two system files which are controling our vivo's backlights.They are
/sys/class/leds/button-backlight-portrait/brightness
sys/class/leds/button-backlight-landscape/brightness(when the phone is rotating)
If the backlights are not lighting up that means the value of these two system files are 0.
So that we can setup a system file which included the correct value and put it into systemui.apk , your vivo will get the light after you reboot it.
How to do that:
I have made the buttonlight.smali file for you guys.
What you should do is using VTS(Virtuous Ten Studio) to decompile systemui.apk and put this file in /smali/com/android/systemui/statusbar.
Then go to smali/com/android/systemui
use Notepad++ open SystemUIService.smali
search onCreate
add these code below after .line71
Code:
new-instance v0, Lcom/android/systemui/statusbar/ButtonLight;
invoke-direct {v0}, Lcom/android/systemui/statusbar/ButtonLight;-><init>()V
.local v0, bl:Lcom/android/systemui/statusbar/ButtonLight;
new-instance v1, Landroid/content/IntentFilter;
invoke-direct {v1}, Landroid/content/IntentFilter;-><init>()V
.local v1, intentfilter:Landroid/content/IntentFilter;
const-string v2, "android.intent.action.SCREEN_OFF"
invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
const-string v2, "android.intent.action.SCREEN_ON"
invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
const-string v2, "android.intent.action.CONFIGURATION_CHANGED"
invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
invoke-virtual {p0, v0, v1}, Lcom/android/systemui/SystemUIService;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
After that save it ,compile it,put it in to your system folder,set permission,DONE!
It should work on every rom in Incredible S in theory
Thanks for Deepak Srivastav providing the temp backlight fix,I inspired from there.
VTS download link is here(Thanks Virtuous Rom team): http://www.virtuousrom.com/p/ten-studio.html
Notepad++ download link is here:http://notepad-plus-plus.org/download/v6.1.3.html
Sorry for my poor English,hope you know what I mean
cycber said:
IF YOU LIKE MY GUIDE PLEASE CLICK "THANKS" BUTTON
Principle:
First,there are two system files which are controling our vivo's backlights.They are
/sys/class/leds/button-backlight-portrait/brightness
sys/class/leds/button-backlight-landscape/brightness(when the phone is rotating)
If the backlights are not lighting up that means the value of these two system files are 0.
So that we can setup a system file which included the correct value and put it into systemui.apk , your vivo will get the light after you reboot it.
How to do that:
I have made the buttonlight.smali file for you guys.
What you should do is using VTS(Virtuous Ten Studio) to decompile systemui.apk and put this file in /smali/com/android/systemui/statusbar.
Then go to smali/com/android/systemui
use Notepad++ open SystemUIService.smali
search onCreate
add these code below after .line71
Code:
new-instance v0, Lcom/android/systemui/statusbar/ButtonLight;
invoke-direct {v0}, Lcom/android/systemui/statusbar/ButtonLight;-><init>()V
.local v0, bl:Lcom/android/systemui/statusbar/ButtonLight;
new-instance v1, Landroid/content/IntentFilter;
invoke-direct {v1}, Landroid/content/IntentFilter;-><init>()V
.local v1, intentfilter:Landroid/content/IntentFilter;
const-string v2, "android.intent.action.SCREEN_OFF"
invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
const-string v2, "android.intent.action.SCREEN_ON"
invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
const-string v2, "android.intent.action.CONFIGURATION_CHANGED"
invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
invoke-virtual {p0, v0, v1}, Lcom/android/systemui/SystemUIService;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
After that save it ,compile it,put it in to your system folder,set permission,DONE!
It should work on every rom in Incredible S in theory
VTS download link is here(Thanks Virtuous Rom team): http://www.virtuousrom.com/p/ten-studio.html
Notepad++ download link is here:http://notepad-plus-plus.org/download/v6.1.3.html
Sorry for my poor English,hope you know what I mean
Click to expand...
Click to collapse
Thanks for the guide please mention thanks to Deepak Srivastav who made this mod in an apk form
nikhil007mmus said:
Thanks for the guide please mention thanks to Deepak Srivastav who made this mod in an apk form
Click to expand...
Click to collapse
Added it,thanks for the remind
Thanks for sharing it.
Thanks sooo much but can you remove Smileys from the code
Sent from my Incredible S using Tapatalk 2
sharawy1 said:
Thanks sooo much but can you remove Smileys from the code
Sent from my Incredible S using Tapatalk 2
Click to expand...
Click to collapse
Use computer see it should be fine !
Sent from my HTC Incredible S using xda premium
Nope im using PC and wont work as smileys are enabled in the code
htc-phones said:
Nope im using PC and wont work as smileys are enabled in the code
Click to expand...
Click to collapse
+1
Sent from my HTC Incredible S using Tapatalk 2
sharawy1 said:
+1
Sent from my HTC Incredible S using Tapatalk 2
Click to expand...
Click to collapse
Ok,I will post a txt download link for you
Attached Files updated!
感谢分享
thank you for translating my guide into English and posting it here!
recently,i have modded it better, let the keylight adjust the screen brightness. and do you know when the keylight rotate as landscape,you lock the screen ,the keylight will turn on?
Sent from my HTC Incredible S using xda premium
"After that save it ,compile it,put it in to your system folder,set permission,DONE"
Can I ask what permissions you are supposed to give the script, and how/what I'm supposed to use to set them?
thank you.
CyanideJack said:
"After that save it ,compile it,put it in to your system folder,set permission,DONE"
Can I ask what permissions you are supposed to give the script, and how/what I'm supposed to use to set them?
Click to expand...
Click to collapse
644
I have the lights working only in Landscape mode. Any solution? Do i have to try this?

[MOD] Updated Clock.smali

Hi all I have re-written the .method final updateclock()V in clock.smali so it can be adjusted to suit everyones needs.It has been taken from XXELLA.
To use just decompile SystemUI.apk and replace clock.smali with the one attached.​
How to configure:​
In the new method you will see this code at the top change the code to the code in red to suit your needs:​
Code:
[CENTER] .line 45
.local v3,
hr:Z
const/4 v8, 0x1
[COLOR=red]Change to 0x0 for no clock[/COLOR][/CENTER]
[CENTER] .line 46
.local v8,
show_clock:Z
const/4 v9, 0x1
[COLOR=red]Change to 0x0 for no day in statusbar[/COLOR][/CENTER]
[CENTER] .line 47
.local v9,
show_date:Z
const/4 v7, 0x1
[COLOR=red]Change to 0x0 for no am/pm[/COLOR][/CENTER]
[CENTER] .line 48
.local v7,
show_ampm:Z
const/high16 v1, 0x3f00
[COLOR=#ff0000]This one chages size of am/pm[/COLOR][/CENTER]
[CENTER][COLOR=red]1.0 = Same as clock size change to 0x3F80[/COLOR]
[COLOR=#ff0000]0.75 = 3/4 of clock size change to 0x3F40[/COLOR]
[COLOR=#ff0000]0.50 Half clock size (default) change to 0x[/COLOR][COLOR=red]3F00 [/COLOR][/CENTER]
[CENTER][COLOR=#ff0000]Go [URL="http://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html"]here[/URL] for other sizes.[/COLOR][/CENTER]
Download​
To make it so it says Mon instead of MON decompile and look for:
Code:
invoke-virtual {v6, v11}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v0
.line 57
.local v0,
am:Ljava/lang/String;
invoke-virtual {v0}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
move-result-object v11
invoke-virtual {v5, v11}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;
in clock.smali and change the line:
Code:
invoke-virtual {v5, v11}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;
To:
Code:
invoke-virtual {v5, v0}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;
Then recompile and your done.
super stuff mate but some how ZSEMA1 SystemUI gives fc when applied ,
will be waiting for a fix ... thanks again mate
vegeta1 said:
super stuff mate but some how ZSEMA1 SystemUI gives fc when applied ,
will be waiting for a fix ... thanks again mate
Click to expand...
Click to collapse
I am running on ZSEMA1 now mate. What does logcat say?
Sent from my GT-I9300 using xda premium
gharrington said:
I am running on ZSEMA1 now mate. What does logcat say?
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
i have never used log cat , but if you can look here's my logcat
vegeta1 said:
i have never used log cat , but if you can look here's my logcat
Click to expand...
Click to collapse
hey mate found the error in my clock smali find line 964 it says:
invoke-virtual {p0, v5}, Lcom/android/systemui/statusbar/policy/SimpleDateView;->setText(Ljava/lang/CharSequenceV
change it to:
invoke-virtual {p0, v5}, Lcom/android/systemui/statusbar/policy/Clock;->setText(Ljava/lang/CharSequenceV
now it will work
I have also updated the clock.smali to show changes on post #1 just in case you want to re-download
gharrington said:
hey mate found the error in my clock smali find line 964 it says:
invoke-virtual {p0, v5}, Lcom/android/systemui/statusbar/policy/SimpleDateView;->setText(Ljava/lang/CharSequenceV
change it to:
invoke-virtual {p0, v5}, Lcom/android/systemui/statusbar/policy/Clock;->setText(Ljava/lang/CharSequenceV
now it will work
Click to expand...
Click to collapse
absolutely ravishing , thanks alot my friend
i never thought logcat can be that handy i never tried it and know nothing related
vegeta1 said:
absolutely ravishing , thanks alot my friend
i never thought logcat can be that handy i never tried it and know nothing related
Click to expand...
Click to collapse
Logcat is a developers best friend lol. Any time mate.
Sent from my GT-I9300 using xda premium
Hi,
I'm using ROM FoxHound v1.8 (ZSMA1) and I want to have the day on my statusbar. I checked the clock.smali and I found this:
.line 45
.local v3, hr:Z
const/4 v8, 0x1
.line 46
.local v8, show_clock:Z
const/4 v9, 0x1
.line 47
.local v9, show_date:Z
const/4 v7, 0x1
.line 48
.local v7, show_ampm:Z
const/high16 v1, 0x3f00
My problem is that even I see that "const/4 v9, 0x1" I still don't have the date on my statusbar.
Can you please tell me what is wrong?
Thank you.
starbucks2010 said:
Hi,
I'm using ROM FoxHound v1.8 (ZSMA1) and I want to have the day on my statusbar. I checked the clock.smali and I found this:
.line 45
.local v3, hr:Z
const/4 v8, 0x1
.line 46
.local v8, show_clock:Z
const/4 v9, 0x1
.line 47
.local v9, show_date:Z
const/4 v7, 0x1
.line 48
.local v7, show_ampm:Z
const/high16 v1, 0x3f00
My problem is that even I see that "const/4 v9, 0x1" I still don't have the date on my statusbar.
Can you please tell me what is wrong?
Thank you.
Click to expand...
Click to collapse
Does SystemUI fc?
Sent from my GT-I9300 using xda premium
and how do we change clock colour?
Sent from my GT-I9300 using xda premium
gharrington said:
Does SystemUI fc?
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
I just decompiled SystemUI.apk and checked the clock.smali file on my PC. I didn't modify anything on the file or on the phone. No FC.
starbucks2010 said:
I just decompiled SystemUI.apk and checked the clock.smali file on my PC. I didn't modify anything on the file or on the phone. No FC.
Click to expand...
Click to collapse
You have to decompile your SystemUI then delete clock smali. Then replace with downloaded one. Then recompile and flash.
Sent from my GT-I9300 using xda premium
Sorry for mistake: I was looking in your clock.smali not mine. Actualy mine it looks very different than yours. Can you check it please and tell me if it will work if I replace it with your clock.smali.
Thank you for your time and patience.
starbucks2010 said:
Sorry for mistake: I was looking in your clock.smali not mine. Actualy mine it looks very different than yours. Can you check it please and tell me if it will work if I replace it with your clock.smali.
Thank you for your time and patience.
Click to expand...
Click to collapse
This is compatable with firmware MA1 so yes just swap them and Recompile.
Sent from my GT-I9300 using xda premium
I tried and is not working: no more statusbar and no more wallpaper. If is not too much asking, could you please modify my clock.smali to include the short day in the statusbar?
Thank you again and sorry for bother.
starbucks2010 said:
I tried and is not working: no more statusbar and no more wallpaper. If is not too much asking, could you please modify my clock.smali to include the short day in the statusbar?
Thank you again and sorry for bother.
Click to expand...
Click to collapse
Mate don't mean to be rude but this is a very simple thing to do you just have to swap the smali file. Maybe you should read how to decompile and recompile a apk properly then re attempt. If I was to modify for you it would look the same as the downloaded one!
Sent from my GT-I9300 using xda premium
I decompiled the file with 3 different sw. All are giving me the same file which is very different than yours. I don't understand why. I can send you my SystemUI to try to decompile it and the results. From which firmware you took this clock.smali?
Thank you.
starbucks2010 said:
I decompiled the file with 3 different sw. All are giving me the same file which is very different than yours. I don't understand why. I can send you my SystemUI to try to decompile it and the results. From which firmware you took this clock.smali?
Thank you.
Click to expand...
Click to collapse
The files will be different from mine. Mine as been modified! Yours are stock. You need to use my clock.smali instead of the one that's already there. Delete original and replace with mine and recompile that's it.
Sent from my GT-I9300 using xda premium

[REQUEST]Enable auto rotate for JB Home.apk

Hi excuse, I'm requesting to enable auto rotation for Home.apk that I uploaded as attachment below,
Please someone as request, please download this and enable auto rotation of launcher
Thanks
danisariandi said:
Hi excuse, I'm requesting to enable auto rotation for Home.apk that I uploaded as attachment below,
Please someone as request, please download this and enable auto rotation of launcher
Thanks
Click to expand...
Click to collapse
I'm not sure what your asking as enabling auto rotate through settings allows the Home.apk to rotate
can not decompile your home.apk
jjwrongjj said:
can not decompile your home.apk
Click to expand...
Click to collapse
Install framework first
Sent by brand new mindmap
danisariandi said:
Install framework first
Sent by brand new mindmap
Click to expand...
Click to collapse
Of course
here is guide, i think you can make it
- Decompile Home.apk
- Go: smali\com\sonyericsson\home and open file HomeActivity.smali
- Search:
Code:
invoke-virtual {v12}, Landroid/app/UiModeManager;->getCurrentModeType()I
move-result v0
const/4 v2, 0x1
if-ne v0, v2, :cond_6
.line 567
const/4 v0, 0x5
iput v0, p0, Lcom/sonyericsson/home/HomeActivity;->mDefaultOrientation:I
and change this to:
Code:
invoke-virtual {v12}, Landroid/app/UiModeManager;->getCurrentModeType()I
move-result v0
const/4 v2, 0x1
if-ne v0, v2, :cond_6
.line 567
const/4 v0, [B]-0x1[/B]
iput v0, p0, Lcom/sonyericsson/home/HomeActivity;->mDefaultOrientation:I
-Recompile Home.apk
jjwrongjj said:
Of course
here is guide, i think you can make it
Click to expand...
Click to collapse
when i turn to the last two desktops the navigationbar becomes black(ive made it transparent)
anyone knows how to fix it ?
thanks
Leo said:
when i turn to the last two desktops the navigationbar becomes black(ive made it transparent)
anyone knows how to fix it ?
thanks
Click to expand...
Click to collapse
For me, that's fine
Sent from my LT25i using xda premium
danisariandi said:
Install framework first
Sent by brand new mindmap
Click to expand...
Click to collapse
what you mean? i can't decompile and recompile home.apk or getting error do it, all of them said about framework-res.apk or SemcGenericUxpRes.apk too
can you give me some tutorial to decompile or recompile home.apk??? please because i want make it auto rotate too on my xperia e single...

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

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

[Req] Sense GPS Crosshair Removal

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

Categories

Resources