[How-To][Advanced]Remove Location icon in 2.3 ROMs - Droid Incredible Themes and Apps

You know the one, the reticle with the crosshairs...
I could not figure it out, so after many hours of Googling to see if this existed and coming up short, I just started tweaking smali. I do NOT do this for a living, but more as a fun thing to try to see if I can get it. So today was able to find the edit needed to make this icon go away!
Thanks to Jermaine151 and NilsP, who I messaged about it and had them check it for me. They've used it before and I'm sure others have in their ROMs as well, so by no means am I pioneering something here, just posting a How-To for it.
This is for an advanced user who has edited smali code before. Not knowing what you are doing could render your phone unusable, so this is considered an advanced thread showing the code necessary to edit. I am NOT responsible if you attempt to edit any code and kill/damage/render your phone inoperable.
This thread assumes you know how to:
Use baksmali/smali, 7zip, Notepad++, java (just the commands when using baksmali/smali), adb push/pull commands, and a Command Prompt window to run the commands. If you know how to do this, this will all make sense.
Extract SystemUI.apk, decompile using baksmali, then browse to com/android/systemui/statusbar/policy to HtcCdmaStatusBar.smali.
Search for: .method private updateMtGpsIcon()V
You'll see:​.method private updateMtGpsIcon()V
.registers 8
.prologue
const/4 v5, 0x3
const/4 v4, 0x1
const/4 v3, 0x0
const-string v6, "gpsone"​
Edit it to the following:​
.method private updateMtGpsIcon()V
.registers 8
.prologue
const/4 v5, 0x3
const/4 v4, 0x0
const/4 v3, 0x0
const-string v6, "gpsone"​
EDIT: Jermaine151 added patched SystemUI from Inc OTA here, page 4: http://forum.xda-developers.com/showthread.php?t=780324
SteelH also has a good thread listed on that page as well.

Maybe I am blind but you neglected to say what apk file you are modifying? I am assuming SystemUI.apk?

Hatman41 said:
Maybe I am blind but you neglected to say what apk file you are modifying? I am assuming SystemUI.apk?
Click to expand...
Click to collapse
Thanks, I did forget, thanks for pointing it out Hatman41! Fixed now!
Sent from my ADR6300 using XDA Premium App

Related

changing color of the time in the taskbar

Does anyone know which files to edit or can help me change the color of the time in the taskbar? i'm wanting it to be a grey color.
I know its in the classes.dex in services.jar. I just don't know what lines to change. I'm very interested to know
Leukay said:
I know its in the classes.dex in services.jar. I just don't know what lines to change. I'm very interested to know
Click to expand...
Click to collapse
Do you have Hex Printer2?
You that to turn the xml into readable format then in the classes.dex it will say something along the lines of time and date:FFFFFFF
or just time.. you will know when you see it.
sdotcarlisle said:
Does anyone know which files to edit or can help me change the color of the time in the taskbar? i'm wanting it to be a grey color.
Click to expand...
Click to collapse
Hey I've got a guide on my bookmarks at home for it. I found it by going onto main page of this site and doing a search for classes.dex editing or something along those lines. The guide tells u step by step how to do it.
You need to deodex the services.jar with baksmali so you have access to the .smali files inside the classes.dex. Inside the .dex you'll find folders...you need to access to com/android/server/status. Inside this folder is StatusBarIcon.smali. You'll need to open it with a text editor. Inside you'll look for this line...
.line 47
invoke-virtual {v4, v7}, Landroid/widget/TextView;->setTextColor(I)V (This line tells you what prologue to look for. The prologue is at the beginning.) For instance, im looking for
.prologue
const v7, -0x0 (The bold is going to be your ARGB Hex color.)
You'll need to know how to convert it to hex. See http://board.flashkit.com/board/archive/index.php/t-657269.html.
Once you're finished editing the .smali code you need to save it and redex the folders back into a new classes.dex by using smali. Once you create a new classes.dex you can drag it into your services.jar overwriting the old one.
Lmfao...surprisingly enough I actually understand every word of this and will be using it as well. Thanks vince
VinceOB said:
You need to deodex the services.jar with baksmali so you have access to the .smali files inside the classes.dex. Inside the .dex you'll find folders...you need to access to com/android/server/status. Inside this folder is StatusBarIcon.smali. You'll need to open it with a text editor. Inside you'll look for this line...
.line 47
invoke-virtual {v4, v7}, Landroid/widget/TextView;->setTextColor(I)V (This line tells you what prologue to look for. The prologue is at the beginning.) For instance, im looking for
.prologue
const v7, -0x0 (The bold is going to be your ARGB Hex color.)
You'll need to know how to convert it to hex. See http://board.flashkit.com/board/archive/index.php/t-657269.html.
Once you're finished editing the .smali code you need to save it and redex the folders back into a new classes.dex by using smali. Once you create a new classes.dex you can drag it into your services.jar overwriting the old one.
Click to expand...
Click to collapse
cbarlan said:
Lmfao...surprisingly enough I actually understand every word of this and will be using it as well. Thanks vince
Click to expand...
Click to collapse
Its easy to understand...
cbarlan said:
Hey I've got a guide on my bookmarks at home for it. I found it by going onto main page of this site and doing a search for classes.dex editing or something along those lines. The guide tells u step by step how to do it.
Click to expand...
Click to collapse
VinceOB said:
You need to deodex the services.jar with baksmali so you have access to the .smali files inside the classes.dex. Inside the .dex you'll find folders...you need to access to com/android/server/status. Inside this folder is StatusBarIcon.smali. You'll need to open it with a text editor. Inside you'll look for this line...
.line 47
invoke-virtual {v4, v7}, Landroid/widget/TextView;->setTextColor(I)V (This line tells you what prologue to look for. The prologue is at the beginning.) For instance, im looking for
.prologue
const v7, -0x0 (The bold is going to be your ARGB Hex color.)
You'll need to know how to convert it to hex. See http://board.flashkit.com/board/archive/index.php/t-657269.html.
Once you're finished editing the .smali code you need to save it and redex the folders back into a new classes.dex by using smali. Once you create a new classes.dex you can drag it into your services.jar overwriting the old one.
Click to expand...
Click to collapse
WOW! That just flew over my head for the time being.
@cbarlan -- please post your bookmark
@Vince -- I'm gonna try to make sense of what you just said, I'm sure I'll understand soon enough...
cbarlan said:
Lmfao...surprisingly enough I actually understand every word of this and will be using it as well. Thanks vince
Click to expand...
Click to collapse
From someone that has done it one or two dozen times himself.... it all makes sense.
In more basic terms, you're decompiling the dex file into smali code to edit the file and then re-compiling it back.
-Daryel
Will post bookmark when I get home but won't be till tonight or goggle it.
pseudoremora said:
WOW! That just flew over my head for the time being.
@cbarlan -- please post your bookmark
@Vince -- I'm gonna try to make sense of what you just said, I'm sure I'll understand soon enough...
Click to expand...
Click to collapse
VinceOB said:
You need to deodex the services.jar with baksmali so you have access to the .smali files inside the classes.dex. Inside the .dex you'll find folders...you need to access to com/android/server/status. Inside this folder is StatusBarIcon.smali. You'll need to open it with a text editor. Inside you'll look for this line...
.line 47
invoke-virtual {v4, v7}, Landroid/widget/TextView;->setTextColor(I)V (This line tells you what prologue to look for. The prologue is at the beginning.) For instance, im looking for
.prologue
const v7, -0x0 (The bold is going to be your ARGB Hex color.)
You'll need to know how to convert it to hex. See http://board.flashkit.com/board/archive/index.php/t-657269.html.
Once you're finished editing the .smali code you need to save it and redex the folders back into a new classes.dex by using smali. Once you create a new classes.dex you can drag it into your services.jar overwriting the old one.
Click to expand...
Click to collapse
thanks ya'll. i'm gonna go smoke then try to understand what you said
pseudoremora said:
WOW! That just flew over my head for the time being.
@cbarlan -- please post your bookmark
@Vince -- I'm gonna try to make sense of what you just said, I'm sure I'll understand soon enough...
Click to expand...
Click to collapse
Sorry I didnt respond to you before. I was travelling all last week and didnt get a chance to write something up. I'll send you some info on this...
sdotcarlisle said:
thanks ya'll. i'm gonna go smoke then try to understand what you said
Click to expand...
Click to collapse
Let me know if you need more info. Its really easy to understand...
daryelv said:
From someone that has done it one or two dozen times himself.... it all makes sense.
In more basic terms, you're decompiling the dex file into smali code to edit the file and then re-compiling it back.
-Daryel
Click to expand...
Click to collapse
Oh I wasn't being a smartaas. A week ago I would have said ummm huh. But now I actually understand it
VinceOB said:
Let me know if you need more info. Its really easy to understand...
Click to expand...
Click to collapse
yea i think once i know how to deodex and baksmali i'll be fine.
VinceOB said:
Sorry I didnt respond to you before. I was travelling all last week and didnt get a chance to write something up. I'll send you some info on this...
Click to expand...
Click to collapse
Hey can u forward to me as well. I understand but want to learn as much as I can. Thanks in advance
I would like to know more my self thanks. Please post it.
VinceOB said:
You need to deodex the services.jar with baksmali so you have access to the .smali files inside the classes.dex. Inside the .dex you'll find folders...you need to access to com/android/server/status. Inside this folder is StatusBarIcon.smali. You'll need to open it with a text editor. Inside you'll look for this line...
.line 47
invoke-virtual {v4, v7}, Landroid/widget/TextView;->setTextColor(I)V (This line tells you what prologue to look for. The prologue is at the beginning.) For instance, im looking for
.prologue
const v7, -0x0 (The bold is going to be your ARGB Hex color.)
You'll need to know how to convert it to hex. See http://board.flashkit.com/board/archive/index.php/t-657269.html.
Once you're finished editing the .smali code you need to save it and redex the folders back into a new classes.dex by using smali. Once you create a new classes.dex you can drag it into your services.jar overwriting the old one.
Click to expand...
Click to collapse
ok after further instruction this makes perfect since. i just can't find the statsbaricon.smali nm found it
sdotcarlisle said:
ok after further instruction this makes perfect since. i just can't find the statsbaricon.smali nm found it
Click to expand...
Click to collapse
haha yea, its hard to find...

[Q] might have find a way to unlock huawei u8120

guys i just downloaded pro_celestial_v2 and extracted it. in the /sys/app folder there is an apk called (network location). i extracted it with baksmali ===>just google for baksmali 1.2.6.jar <=== there seems to be some files for network verification but im not good in maths.there are functions like (const/4 v1, -0x1). can the unlock code or unlock pattern be in one of these files.please help.my JAVA is a bit rusty(system.out.println( "anyone out there"). is there a way to calulate it with the IMEI of the phone to get unlock key

[Resolved] Help needed! public.xml drawable symbol declared but not defined...

Hello dear devs
I'm trying for 2 weeks now, without luck, to find a way to decompile, add resources and recompile Erikmm's MIUI v4 :
settings.apk
framework-miui-res.apk
as part of my HebMIUI project.
I downloaded an ICS aimed APKtool and used the original as well.
the original fails to even decompile, the other one fails to recompile, giving public.xml drawable symbol declared but not defined error:
For example for settings.apk I get this
I managed to recompile all the system and framework apps besides settings and framework-miui-res so it's really frustrating to not being able to finish this work.
If someone here has a working environment or some issue pointing I missed, I'd greatly appreciate it if you share it with me.
Thanks.
I fixed the 9.png error at the start of the pastebin, it's not related to this issue. Still getting all those declared but not defined errors.
I get them even if I decompile recompile without changing anything...
I'll try to decompile with dependencies. If that won't work I'll try to remove the declared objects from xml.
sent from me
WARNING: The pastebin link totally had a virus waiting. Sorry itskit2sh.
Not much help at the moment, but apktool is going to receive updates (supposedly)
https://www.xda-developers.com/android/apktool-to-receive-updates-once-again/
For settings try and use the apktool from developer.android. As for how you are recompiling miui uses framework-res and framework-miui-res as dependencies. Lastly the miui_logo thing might be because I added my Darth Vader one for when booting shutting down lol. Ill upload my update today to dropbox and have u try with the newest one
----------------------------------------------
If helped don't be afraid to hit the thanks button it doesn't bite lol
Thanks for your replies guys, unfortunately no luck yet.
I copied aapt ver 1.4.3 to both old apktool and ics apktool.
still I get "bad magic value" on old apktool decompilation
and like gazilion rows "declared but not defined" for public.xml objects on ics apktool compilation.
Also decompilation with dependencies did not quite work as it did not get my depended apk suggestions (framework-miui-res/framework-res/settings).
are there any alternatives to this method ? thanks.
Resolved (!) using these files of the newest WIP apktool files (ver. 1.4.9)
once again thanks for all your help guys !!!

Decompiling MMS apk?

Hey guys, running into some trouble on this one. I'm running the 4.2.2 illusion ROM on my GS3 and was attempting to decompile the mms app to make some changes.
I'm using apktool, I've loaded the framework-res.apk, but when attempting to recompile, I get a bunch of errors like this:
"Public entry identifier enter index is larger than available symbols. Public symbol declared here is not defined." etc...
I've tried just doing a straight decompile/recompile without making any changes and I still get this result. decompiling seems to complete ok from what I can tell.
Any suggestions? thanks!
also, if this thread doesn't belong here please forgive me and move it. I wasn't sure where to ask.

[Q] Searching stand-alone tool to sign apk using APK Signature Scheme v2

I'm searching stand-alone tool to sign apk using APK Signature Scheme v2, that can be used from command-line and that can run on Windows and Linux.
Something like zipsigner by topjohnwu but for standard APK Signature Scheme v2.

Categories

Resources