[MOD][How To][EB13][3/1/11] AOSP Lockscreen! with/out haptic / uninstallers / mods!! - Epic 4G Android Development

I know a bunch of people have been waiting on this so here you go, I bring you the AOSP lockscreen for EB13!
MUST BE ON A DEODEXED EB13 ROM!!! I wouldnt flash any of these over SyndicateROM as they wont be compatible until we can get compatible versions posted.
EB13 AOSP Lockscreen - Download (android.policy.jar)
With Haptic Feedback Removed - Download (android.policy.jar AND framework.jar)
Replace Haptic Feedback - Download (only replaces framework.jar, will still have AOSP lockscreen!)
TW lockscreen - Download (replaces to stock only android.policy.jar)
Remove Haptic Feedback for Bonsai 3.0.1 - Download (does NOT flash AOSP lockscreen, only framework.jar compatible with Bonsai which removes haptic feedback from AOSP lockscreen if you already have it installed. try a theme with AOSP lock.
Replace haptic feedback for Bonsai 3.0.1 - Download
Remove haptic feedback for SRF 1.0.1 - Download (same deal as Bonsai, framework.jar only)
Replace haptic feedback for SRF 1.0.1 - Download
credit to raiderep for getting us the aosp lockscreen for DK28 AND for removing haptic feedback, i basically just winmerged his changes against stock to figure out the mod.
as he did, i should post the files to revert, i'll get those up soon.
How To Create AOSP Lockscreen from stock android.policy.jar:
1.) Pull classes.dex out of android.policy.jar with 7zip
2.) java -jar baksmali.jar -o classout/ classes.dex
3.) Open com\android\internal\policy\impl\LockPatternKeyguardView.smali
4.) Change:
Code:
.line 1344
sget-object v0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;->PuzzleLock:Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
.line 1347
:goto_8
return-object v0
:cond_9
sget-object v0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;->GlassLock:Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
to this:
Code:
.line 1344
sget-object v0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;->TapLock:Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
.line 1347
:goto_8
return-object v0
:cond_9
sget-object v0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;->TapLock:Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
basically, you are just changing "PuzzleLock" and "GlassLock" both to "TapLock"
5.) In the same directory, open LockScreen.smali
6.) Find (not quite half way down):
Code:
.line 172
.local v1, fileOverride:Z
if-eqz v0, :cond_23
if-nez v2, :cond_23
if-eqz v1, :cond_25
:cond_23
const/4 v4, 0x1
:goto_24
return v4
:cond_25
move v4, v6
goto :goto_24
.end method
in the above, change:
Code:
:goto_24
return v4
to:
Code:
:goto_24
return v6
7.) Recompile: java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
8.) Rename new-classes.dex to classes.dex and replace inside android.policy.jar with 7zip
----
To mod framework.jar to remove haptic feedback from AOSP lockscreen:
1.) Pull classes.dex out of framework.jar with 7zip
2.) java -jar baksmali.jar -o classout/ classes.dex
3.) Open com\android\internal\widget\SlidingTab.smali
4.) Change:
Code:
.method private declared-synchronized vibrate(J)V
.registers 5
.parameter "duration"
.prologue
.line 808
monitor-enter p0
:try_start_1
iget-object v0, p0, Lcom/android/internal/widget/SlidingTab;->mVibrator:Landroid/os/Vibrator;
if-nez v0, :cond_14
.line 809
invoke-virtual {p0}, Lcom/android/internal/widget/SlidingTab;->getContext()Landroid/content/Context;
move-result-object v0
const-string/jumbo v1, "vibrator"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/Vibrator;
iput-object v0, p0, Lcom/android/internal/widget/SlidingTab;->mVibrator:Landroid/os/Vibrator;
.line 812
:cond_14
iget-object v0, p0, Lcom/android/internal/widget/SlidingTab;->mVibrator:Landroid/os/Vibrator;
invoke-virtual {v0, p1, p2}, Landroid/os/Vibrator;->vibrate(J)V
:try_end_19
.catchall {:try_start_1 .. :try_end_19} :catchall_1b
.line 813
monitor-exit p0
return-void
.line 808
:catchall_1b
move-exception v0
monitor-exit p0
throw v0
.end method
to this:
Code:
.method private declared-synchronized vibrate(J)V
.registers 5
.parameter "duration"
return-void
.prologue
.line 808
monitor-enter p0
:try_start_2
iget-object v0, p0, Lcom/android/internal/widget/SlidingTab;->mVibrator:Landroid/os/Vibrator;
if-nez v0, :cond_15
.line 809
invoke-virtual {p0}, Lcom/android/internal/widget/SlidingTab;->getContext()Landroid/content/Context;
move-result-object v0
const-string/jumbo v1, "vibrator"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/Vibrator;
iput-object v0, p0, Lcom/android/internal/widget/SlidingTab;->mVibrator:Landroid/os/Vibrator;
.line 812
:cond_15
iget-object v0, p0, Lcom/android/internal/widget/SlidingTab;->mVibrator:Landroid/os/Vibrator;
invoke-virtual {v0, p1, p2}, Landroid/os/Vibrator;->vibrate(J)V
:try_end_1a
.catchall {:try_start_2 .. :try_end_1a} :catchall_1c
.line 813
monitor-exit p0
return-void
.line 808
:catchall_1c
move-exception v0
monitor-exit p0
throw v0
.end method
5.) Recompile: java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
6.) Rename new-classes.dex to classes.dex and replace inside framework.jar with 7zip
----------------------------------------------
From raiderep, dont forget to thank him for this:
raiderep said:
Ok here is another mod for aosp lockscreen, might as well keep all this in one thread. Maybe add it to the OP if you'd like. Credit goes to chibucks over at SDX, I just used a mod he posted for the moment and with a small change it worked on my epic. This will give you a custom image on your lockscreen(aosp only afaik)
First decompile framework-res.apk and nav to res/layout/keyguard_screen_tab_unlock.xml. edit the second line as follows:
change the android:background="#70000000" on this line
Code:
<RelativeLayout android:gravity="center_horizontal" android:id="@id/root" android:background="#70000000" android:layout_width="fill_parent" android:layout_height="fill_parent"
to android:background="@drawable/default_wallpaper" like this
Code:
<RelativeLayout android:gravity="center_horizontal" android:id="@id/root" android:background="@drawable/default_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent"
now this edit seems to make it call on the image called default_wallpaper in the drawable folder but when I first tried it the image on the lockscreen was actually the default_wallpaper image found in drawable-hdpi so...
the next step is to add in your custom image while still decompiled, I don't think you can add it in after recompiling,everytime I tried it bootlooped the phone but I was changing it to a png so if you keep it a jpg it might not YMMV(haven't tried to replace the jpg after a recompile)
this image can be a png for transparency if you'd like just make sure you delete the jpg thats already in there, or replace the jpg if you don't want transparency, png is better either way in my opinion...
So basically you just stick your custom image in the drawable-hdpi folder and make sure its the only one called default_wallpaper whether its a png or jpg.
recompile framework-res.apk and enjoy
Click to expand...
Click to collapse
my assumption is that if you add it in AFTER compiling, you would have to stick with a jpg, since that is what the default is. but if you want a png, change it out before compiling, thanks again raiderep!

anyway to get without heptic feedback ?

cballin22 said:
anyway to get without heptic feedback ?
Click to expand...
Click to collapse
ooh, i can try

Glad you got it because I forgot how I did it...
As for haptic removal, I did it for di18 and dk28 so you can figure it out the same way I'm sure. Check my blue theme or the dk28 thread for the mod. Its a change in framework.jar I believe. I'm looking at getting a nexus s possibly so its good to see someone getting busy with this stuff. Sprint is ticking me off and I've lost my motivation, sorry guys
sent by an Epic4g through the cosmos

raiderep said:
Glad you got it because I forgot how I did it...
As for haptic removal, I did it for di18 and dk28 so you can figure it out the same way I'm sure. Check my blue theme or the dk28 thread for the mod. Its a change in framework.jar I believe. I'm looking at getting a nexus s possibly so its good to see someone getting busy with this stuff. Sprint is ticking me off and I've lost my motivation, sorry guys
sent by an Epic4g through the cosmos
Click to expand...
Click to collapse
Cool, i may consider switching to this lockscreen once the new bonsai is out.
@raiderrep
You going to port your theme on the official froyo?

yea so far im using it with the eb13 ext 4 rom using cm6 and it works fine along with the genocide oc kernal i just dont like the heptic feedback with it ... i wonder since now eb13 is out that the lockscreen that i have seen on the evo is able to be ported with the 4 option asop config

Yay, been waiting 4 this
Sent from my SPH-D700 using XDA App

Did anyone manage to fix the landscape issues? I pointed out a few months ago that we have images missing in order for landscape to work properly. We need some who like XML in order to fix it. Any takers?
Great job getting this ported over.... Also thanks for the other mods as well.

raiderep said:
Glad you got it because I forgot how I did it...
As for haptic removal, I did it for di18 and dk28 so you can figure it out the same way I'm sure. Check my blue theme or the dk28 thread for the mod. Its a change in framework.jar I believe. I'm looking at getting a nexus s possibly so its good to see someone getting busy with this stuff. Sprint is ticking me off and I've lost my motivation, sorry guys
sent by an Epic4g through the cosmos
Click to expand...
Click to collapse
oof, that is sad to hear, you're a good resource and have helped me a lot! so yeah i can check your past mods to see how the haptic was removed, hopefully i dont get stuck, lol. cause i really dont "understand" what i'm doing as much as am replicating what others have done.
ptfdmedic said:
Did anyone manage to fix the landscape issues? I pointed out a few months ago that we have images missing in order for landscape to work properly. We need some who like XML in order to fix it. Any takers?
Great job getting this ported over.... Also thanks for the other mods as well.
Click to expand...
Click to collapse
no it doesnt look like those are fixed. i dont think its missing images, we have those in framework-res.apk/res/drawable-land-hdpi i believe. i think its more of a jar file (android.policy?) maybe not calling them correctly. i'll poke around in the files but again, i wont really know what i'm looking for.

amosher13 said:
oof, that is sad to hear, you're a good resource and have helped me a lot! so yeah i can check your past mods to see how the haptic was removed, hopefully i dont get stuck, lol. cause i really dont "understand" what i'm doing as much as am replicating what others have done.
no it doesnt look like those are fixed. i dont think its missing images, we have those in framework-res.apk/res/drawable-land-hdpi i believe. i think its more of a jar file (android.policy?) maybe not calling them correctly. i'll poke around in the files but again, i wont really know what i'm looking for.
Click to expand...
Click to collapse
We are actually missing files. I posted them in the original thread a few months ago. I noticed them while digging through the Nexus S dump. There are a dozen or so images that are missing. I'll see if I can find the post and link you to it.
EDIT: Here is the link

@amosher13 - I think the only thing I can say I did on my own was get the aosp lockscreen fixed on dk28(it was half done) so I'm like you and simply figure out how to make it work from the previous success of others. Not much in these forums is original work, its a community effort.
If you have trouble with the haptic removal I'll lend a hand.
The landscape issue might be because they only programmed it for phones without a slider but not sure. I am thinking it calls on the same images for either mode so it might take some heavy lifting to get it working right. Maybe making new resource ids and images as well as new xmls/smalis or methods...
sent by an Epic4g through the cosmos

raiderep said:
@amosher13 - I think the only thing I can say I did on my own was get the aosp lockscreen fixed on dk28(it was half done) so I'm like you and simply figure out how to make it work from the previous success of others. Not much in these forums is original work, its a community effort.
If you have trouble with the haptic removal I'll lend a hand.
The landscape issue might be because they only programmed it for phones without a slider but not sure. I am thinking it calls on the same images for either mode so it might take some heavy lifting to get it working right. Maybe making new resource ids and images as well as new xmls/smalis or methods...
sent by an Epic4g through the cosmos
Click to expand...
Click to collapse
Word.
In either case, i think i've got the haptic feedback removed ready to go, posted in the OP, stuck in a meeting and unable to test atm. if someone wants to give it a shot, be my guest and report back, make a backup first!

amosher13 said:
I know a bunch of people have been waiting on this so here you go, I bring you the AOSP lockscreen for EB13!
Click to expand...
Click to collapse
Is there any real difference between this one and the one already available for DK28? I flashed the DK28 version and it works fine for me on EB13 ROM.

anythingbutmine said:
Is there any real difference between this one and the one already available for DK28? I flashed the DK28 version and it works fine for me on EB13 ROM.
Click to expand...
Click to collapse
there is honestly probably not "MUCH" different, but there could be all kinds of minor things changed between versions. For instance, the DK17 one was thought to work on DK28 (builds only 11 days apart) but some of the string references were off. i'd flash this to be safe.
also: OP updated with confirmed working AOSP lockscreen with haptic feedback removed. framework.jar is also included in that zip.

anythingbutmine said:
Is there any real difference between this one and the one already available for DK28? I flashed the DK28 version and it works fine for me on EB13 ROM.
Click to expand...
Click to collapse
It may be that the androidpolicy.jar from dk28 is identical to eb13's but better safe than sorry.
sent by an Epic4g through the cosmos

raiderep said:
@amosher13 - I think the only thing I can say I did on my own was get the aosp lockscreen fixed on dk28(it was half done) so I'm like you and simply figure out how to make it work from the previous success of others. Not much in these forums is original work, its a community effort.
If you have trouble with the haptic removal I'll lend a hand.
The landscape issue might be because they only programmed it for phones without a slider but not sure. I am thinking it calls on the same images for either mode so it might take some heavy lifting to get it working right. Maybe making new resource ids and images as well as new xmls/smalis or methods...
sent by an Epic4g through the cosmos
Click to expand...
Click to collapse
You are correct as I looked into this. The images are there for both landscape and portrait. The problem is that it wants to display the portrait images. We need to figure out what controls the lock screen in landscape and get it to change the images that are being called. As I see it by switching bool to true its just basically rotating the screen when the keyboard slides up
Sent from my SPH-D700 using Tapatalk

Flashed this and no lockscreen? What am i doing wrong.
Just transferred the zip file to my sd card and installed zip in clockwork.

1greek4u said:
Flashed this and no lockscreen? What am i doing wrong.
Just transferred the zip file to my sd card and installed zip in clockwork.
Click to expand...
Click to collapse
nooooo lockscreen?!?!?! no idea, might try reflashing, never seen or even heard of that before. maybe even just reboot and see what happens, its working over here.
----
also, for anyone interested i have a hunch to look through framework.jar, there have to be (at least, lol) 2 places where its calling for the portrait jog dial pngs. so one of them has to be landscape and maybe it would be just changing the resource ids to the landscape pngs. i'll report back obviously but if anyone else wants to take a look be my guest.

I love it. Thank you so much!! I've forever had this quirk of my phone unlocking to lock screen after turning the screen off..... and this fixed that. Thanks!
Sent from my SPH-D700 using XDA App

You the man. I'm going to add this and all previous versions to the wiki, very useful modification.
Sent from my SPH-D700 using XDA App

Related

[HELP] [THEME] Need help with services.jar

Hi,
for cyanogen5Beta4 I have a services.jar with white text at notification bar.
Now I have the new MoDaCo release and there is the text black.
I want white text.
this text is in the services.jar
Could anybody help me and explain, how to configure this services.jar to get white text instead of black text.
Thank you!
You need to run the colorchanger on it. Every rom is different pretty much. You need to do that every time you change the colors of the text.
This is how enomther (so all credit goes to him) explained to me on how to change it.
You can get smali/baksmali here.
I use PSPad to edit the files in windows. I right click and select open with PSPad.
Once you crack open services.jar/classes.dex with baksmali ....there are (2) files of concern, the first is com/android/server/status/StatusBarIcon.smali ... locate this file and open it up and search for ...
Code:
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
Above that line (2 lines up) ... you'll see ...
Code:
const/high16 v6, -0x100
That's black .. change to ...
Code:
const v6, -0x1
That's white ... this is a simply color change and easier since invoke-virtual is going to give us color out right ... we just have to change the color.
Then locate file ... com/android/server/status/com/android/server/status/StatusBarService.smali
There are (3) lines you need to search for here ... now they don't have inherent color change properties anymore ... which is why colorChange.jar is jacked up for you.
The threes lines to search for (and yes they are each in different places of the file) ... are ...
Code:
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mDateView:Lcom/android/server/status/DateView;
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mSpnLabel:Landroid/widget/TextView
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mPlmnLabel:Landroid/widget/TextView;
Again, since these are iput-object calls ... there's no inherent color changing properties ....
You must add the (2) color change lines above each of these lines ... the first lines set a variable for the color value (which in the example) ... the second line forces the text to that color with a call to setTextColor(). So when you're done ... those three lines will be 9 lines (3 lines in 3 seperate places in the file) ... as such ...
Code:
const v8, -0x1
invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mDateView:Lcom/android/server/status/DateView;
Code:
const v8, -0x1
invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mSpnLabel:Landroid/widget/TextView;
Code:
const v8, -0x1
invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mPlmnLabel:Landroid/widget/TextView;
See how we're now setting a color variable and calling invoke-virtual prior to iput-object? ... that's the magic.
Save all that up and then run smali ... reinsert your classes.dex ... and you should be all set.
~enom~
Click to expand...
Click to collapse
Oh holy....
Wow, okay. Thank you both for reply.
Now I've been looking for an english teacher who can help me....
OK, it looks awesome. I wanna look to do what I can!
Thank you again!
Hah, I can't get it.
I've downloaded this three programms, but nothing works really.
Baksmali.jar doesn't start.
I've got an windows machine....
OK, some things I did now.
Thanks for your help.
But the clock on the upper right corner is black anymore.
If somebody could give me a tipp please.
I now have checked it twice, but can't find my failure.
The other things are quite white. They work, only the clock...
david1171 said:
This is how enomther (so all credit goes to him) explained to me on how to change it.
You can get smali/baksmali here.
I use PSPad to edit the files in windows. I right click and select open with PSPad.
Click to expand...
Click to collapse
Isn't that what the colorchanger does automatically? Not arguing or anything, but holy **** that looks complicated! I just use the colorchanger on my morphs...
Colorchanger?
You make me smile... Any Link to this?
Formel-LMS said:
Colorchanger?
You make me smile... Any Link to this?
Click to expand...
Click to collapse
File available here
Rename the file to just colorchangev3.jar (or something shorter if you prefer. I use cc3.jar personally)
You will need the java jdk set up on your computer. I made a pretty in-depth thread on this subject over on AOD
If you have any questions on it, hit me up. Preferably over there since I check it more often than here.
Thank you for your reply. I'm coming over to you. Now, I've take my first look.
im trying to do this on a galaxy s... is there something I am doing wrong... I did the first change... changing anything with the other three lines throws a forceclose loop upon reboot
any thoughts?

[SOLVED] Text notification on BlackBar in black.

Anyone know how to modify it?
I have made this change on my services.jar but I have notification in bakc and I have black bar.
Any chance to have it in white?
Once you crack open services.jar/classes.dex with baksmali ....there are (2) files of concern, the first is com/android/server/status/StatusBarIcon.smali ... locate this file and open it up and search for ...
Code:
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
Above that line (2 lines up) ... you'll see ...
Code:
const/high16 v6, -0x100
That's black .. change to ...
Code:
const v6, -0x1
That's white ... this is a simply color change and easier since invoke-virtual is going to give us color out right ... we just have to change the color.
Then locate file ... com/android/server/status/com/android/server/status/StatusBarService.smali
There are (3) lines you need to search for here ... now they don't have inherent color change properties anymore ... which is why colorChange.jar is jacked up for you.
The threes lines to search for (and yes they are each in different places of the file) ... are ...
Code:
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mDateView:Lcom/android/server/status/DateView;
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mSpnLabel:Landroid/widget/TextView
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mPlmnLabel:Landroid/widget/TextView;
Again, since these are iput-object calls ... there's no inherent color changing properties ....
You must add the (2) color change lines above each of these lines ... the first lines set a variable for the color value (which in the example) ... the second line forces the text to that color with a call to setTextColor(). So when you're done ... those three lines will be 9 lines (3 lines in 3 seperate places in the file) ... as such ...
Code:
const v8, -0x1
invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mDateView:Lcom/android/server/status/DateView;
Code:
const v8, -0x1
invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mSpnLabel:Landroid/widget/TextView;
Code:
const v8, -0x1
invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V
iput-object v7, p0, Lcom/android/server/status/StatusBarService;->mPlmnLabel:Landroid/widget/TextView;
See how we're now setting a color variable and calling invoke-virtual prior to iput-object? ... that's the magic.
Save all that up and then run smali ... reinsert your classes.dex ... and you should be all set.
Click to expand...
Click to collapse
Re: [HELP] Text notification on BlackBar in black.
look back through the posts for one named services.jar it explains it, Ithink it is back pretty far
Sent from my Nexus One using the XDA mobile application powered by Tapatalk
psylink said:
look back through the posts for one named services.jar it explains it, Ithink it is back pretty far
Sent from my Nexus One using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
All are in white but text notification in black.
I have made all modify in previous post.
framework-res.apk/res/layout/status_bar.xml
david1171 said:
framework-res.apk/res/layout/status_bar.xml
Click to expand...
Click to collapse
Thanks
Now It's work
www1 said:
Thanks
Now It's work
Click to expand...
Click to collapse
anyway you can make a zip file to install with the recovery or install with metamorph? i have the black status bar with black text clock and cant see it that well white would be better

[MOD][HOW TO] remove am/pm from statusbar clock by modding services.jar

Since there is somewhat of a lack of how to's in these forums, I decided to post one for this mod. Linked to me by mysteryemotionz, the thread i pulled it from is here:
http://forum.xda-developers.com/showthread.php?t=946647
I winmerged the edited files and replicated it on the Epic. I'm going to assume you have somewhat of an idea of what you are doing, so please read up and search if you have noob questions, the answers are out there. Other than that I'm happy to help.
This was written for DK28 but the same steps work on EB13.
Flashable zip.
Must have java runtime environment installed and have smali.jar and baksmali.jar.
1.) Pull classes.dex out of /system/framework/services.jar with 7zip
2.) Decompile classes.dex (java -jar baksmali.jar -o classout/ classes.dex)
3.) Edit C:\smali\classout\com\android\server\status\StatusBarIcon.smali with Notepad++
4.) Make the following changes and save the file:
At line 48 change:
Code:
.line 51
iget v6, p2, Lcom/android/server/status/IconData;->type:I
packed-switch v6, :pswitch_data_9a
TO:
Code:
.line 51
iget v6, p2, Lcom/android/server/status/IconData;->type:I
packed-switch v6, :pswitch_data_9c
---------------------------------
At line 93 change:
Code:
.line 63
const/4 v6, 0x6
invoke-virtual {v4, v6, v8, v8, v8}, Landroid/widget/TextView;->setPadding(IIII)V
.line 64
invoke-virtual {v4, v2}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
.line 65
iget-object v6, p2, Lcom/android/server/status/IconData;->text:Ljava/lang/CharSequence;
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 66
iput-object v4, p0, Lcom/android/server/status/StatusBarIcon;->view:Landroid/view/View;
goto :goto_10
.line 72
.end local v2 #layoutParams:Landroid/widget/LinearLayout$LayoutParams;
.end local v4 #t:Landroid/widget/TextView;
:pswitch_3f
const-string v6, "layout_inflater"
invoke-virtual {p1, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/view/LayoutInflater;
TO:
Code:
.line 63
const/4 v6, 0x6
const/16 v7, -0x26
invoke-virtual {v4, v6, v8, v7, v8}, Landroid/widget/TextView;->setPadding(IIII)V
.line 64
invoke-virtual {v4, v2}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
.line 65
iget-object v6, p2, Lcom/android/server/status/IconData;->text:Ljava/lang/CharSequence;
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 66
iput-object v4, p0, Lcom/android/server/status/StatusBarIcon;->view:Landroid/view/View;
goto :goto_10
.line 72
.end local v2 #layoutParams:Landroid/widget/LinearLayout$LayoutParams;
.end local v4 #t:Landroid/widget/TextView;
:pswitch_41
const-string v6, "layout_inflater"
invoke-virtual {p1, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/view/LayoutInflater;
-----------------------------------
At line 175 change:
Code:
.line 86
iget v6, p2, Lcom/android/server/status/IconData;->number:I
if-lez v6, :cond_93
TO:
Code:
.line 86
iget v6, p2, Lcom/android/server/status/IconData;->number:I
if-lez v6, :cond_95
------------------------------------
At line 208 change:
Code:
.line 90
:cond_93
const/16 v6, 0x8
invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V
goto/16 :goto_10
.line 51
:pswitch_data_9a
.packed-switch 0x1
:pswitch_11
:pswitch_3f
.end packed-switch
.end method
.method static getIcon(Landroid/content/Context;Lcom/android/server/status/IconData;)Landroid/graphics/drawable/Drawable;
.registers 9
.parameter "context"
.parameter "data"
.prologue
const/4 v5, 0x0
const-string v6, "StatusBar"
TO:
Code:
.line 90
:cond_95
const/16 v6, 0x8
invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V
goto/16 :goto_10
.line 51
:pswitch_data_9c
.packed-switch 0x1
:pswitch_11
:pswitch_41
.end packed-switch
.end method
.method static getIcon(Landroid/content/Context;Lcom/android/server/status/IconData;)Landroid/graphics/drawable/Drawable;
.registers 9
.parameter "context"
.parameter "data"
.prologue
const/4 v5, 0x0
const-string v6, "StatusBar"
5.) Recompile to new-classes.dex. (java -Xmx512M -jar smali.jar classout/ -o new-classes.dex)
6.) With 7zip, replace classes.dex with your new-classes.dex in services.jar, but be sure to rename it back to classes.dex.
7.) Place in a flashable zip and flash away.
Oooooo yeaaaaaaaaaaaaa
yeah i just updated OP mentioning the addon section of the theme in my sig has a flashable zip already posted fyi.
I'm glad it worked
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
Ok so just for clarification, do I just need to flash the zip or do I need to do the instructions?
Thanks for this info also
Just what I was looking for! Time to reflash
Thanks everyone!
Nice!
...is it possible to change just the AM/PM size? I've been trying to figure that one out.. I just like the looks of it being smaller like in CM
Edit:
StatusBarIcon.smali is identical in CM and our Framework.. must be someplace else lol such a battle to change a font size.
mysteryemotionz mentioned in framework-res.apk, i think in res/layout there is timepicker.xml and maybe one other xml related to time. i havent checked but it might be in there where the font size is.
amosher13 said:
mysteryemotionz mentioned in framework-res.apk, i think in res/layout there is timepicker.xml and maybe one other xml related to time. i havent checked but it might be in there where the font size is.
Click to expand...
Click to collapse
Unfortintly I was wrong with the xml. Thedub already pointed it ot to me.
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
so for clarification, is it actually possible to change the font size throughout the system?
yogi2010 said:
so for clarification, is it actually possible to change the font size throughout the system?
Click to expand...
Click to collapse
its got to be at least for some items. a lot of it will be in framework-res.apk in res/values/styles i think. a lot of the text parameters are here. others are in res/layout etc.... depends on what you want to change. and i'm only familiar with a very small number of them tbh. but check out dreams theme guides in the themes and apps section if you wanna read up on how to decompile an apk and get into this stuff.
amosher13, does this move the clock over or does it actually remove am & pm?
birgertime said:
amosher13, does this move the clock over or does it actually remove am & pm?
Click to expand...
Click to collapse
It removes the am pm and pushes the clock over
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
Same question
konaman said:
Ok so just for clarification, do I just need to flash the zip or do I need to do the instructions?
Thanks for this info also
Click to expand...
Click to collapse
Just flash it
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
Hi sorry to bump this old thread but I've been experimenting with the code snippets in OP's post.
Code:
.line 63
const/4 v6, 0x6
const/16 v7, -0x26
invoke-virtual {v4, v6, v8, v7, v8}, Landroid/widget/TextView;->setPadding(IIII)V
is the only part that really matters apparently. The rest of the code is just shuffling around some resource names for some reason. As I dont actually own an epic 4g (I did this on a dell streak with a rom based on 2.2.2/FRG83G) I dont know what's going on with the mass renaming.
the code works as is: register v7 is loaded to c in setpadding( a, b, c, d) (i dont know what the final variable is in the actual smali code)
which is
Code:
setPadding(int left, int top, int right, int bottom)
Sets the padding.
hence loading a negative value will push it farther to the right.
At least on my rom 0x1 != 1 pixel. It's closer to 0x1 = ~1.5-2.5 pixels as -0x20 leaves 1 visible pixel of AM but -0x21 cuts off the last time digit by approx 1-2 pixels. For mine i'd need like -0x20.5 but as this is hex that's nonsensical.
A better way would be to find where the AM and PM strings get loaded and to NOP that or to change it to a blank/null string, but I have no idea where that is.
TheManii said:
Hi sorry to bump this old thread but I've been experimenting with the code snippets in OP's post.
Code:
.line 63
const/4 v6, 0x6
const/16 v7, -0x26
invoke-virtual {v4, v6, v8, v7, v8}, Landroid/widget/TextView;->setPadding(IIII)V
is the only part that really matters apparently. The rest of the code is just shuffling around some resource names for some reason. As I dont actually own an epic 4g (I did this on a dell streak with a rom based on 2.2.2/FRG83G) I dont know what's going on with the mass renaming.
the code works as is: register v7 is loaded to c in setpadding( a, b, c, d) (i dont know what the final variable is in the actual smali code)
Click to expand...
Click to collapse
+1 -- It would seem TheManii is quite correct with the code snippet he posted above.
It does represent the only change which is necessary to move the clock over to hide the AM/PM.
@amosher13
It appears when you used WinMerge to get a diff between the files you received a handful insignifigant deviations in the resource names probably caused by the difference in source device of the files.
Thank you both for your efforts!
TheManii said:
Code:
setPadding(int left, int top, int right, int bottom)
Sets the padding.
hence loading a negative value will push it farther to the right.
At least on my rom 0x1 != 1 pixel. It's closer to 0x1 = ~1.5-2.5 pixels as -0x20 leaves 1 visible pixel of AM but -0x21 cuts off the last time digit by approx 1-2 pixels. For mine i'd need like -0x20.5 but as this is hex that's nonsensical.
A better way would be to find where the AM and PM strings get loaded and to NOP that or to change it to a blank/null string, but I have no idea where that is.
Click to expand...
Click to collapse
@TheManii
Based on the related XML, it certainly looks like the values here are in the dp unit, so, for the screen size of our devices, the values would indeed be multiplied by about 1.5.
Also, I'm fairly certain the time gets loaded with the AM/PM attached, as with the dateformat class, which would require additional formatting to get rid of it.
I have sort of thought about possibly using the simpledateformat class to change the am/pm to a/p, but now I moved my clock next to the date in the pulldown.
Check this out
How funny is this?...I'm looking around XDA for info on date formatting, and I stumble across this post JsChiSurf over in the EVO 4G forums.
http://forum.xda-developers.com/showpost.php?p=11753928&postcount=187
It's so simple...I'm far to new to this smali stuff, so I had no idea this method of manipulating the string would work.
Anyhow, I manually merge the appropriate changes into our StatusBarPolicy.smali, then created a diff for ya'll to see the changes.
Code:
--- StatusBarPolicy.smali.orig 2011-08-14 15:19:35.000000000 -0500
+++ StatusBarPolicy.smali 2011-08-14 15:29:04.000000000 -0500
@@ -4919,7 +4919,7 @@
.end method
.method private final updateClock()V
- .registers 5
+ .locals 6
.prologue
.line 889
@@ -4948,6 +4948,22 @@
invoke-virtual {v1, v2}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
+ move-result-object v1
+
+ const-string v4, " PM"
+
+ const-string v5, ""
+
+ invoke-virtual {v1, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object v1
+
+ const-string v4, " AM"
+
+ const-string v5, ""
+
+ invoke-virtual {v1, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
move-result-object v1
iput-object v1, v0, Lcom/android/server/status/IconData;->text:Ljava/lang/CharSequence;
This is certainly the most direct way to do it by totally removing the am/pm indicator....Thanks, JsChiSurf!!!
Code diff seems to work perfectly, i'll do a code analysis in psuedocode soon and explain what the code does, but basically it does (one of the two ways) what i expected needed to get done;
Basically it:
get formatted date from java/text/dateformat and shove it into string1
shove it into a tempory string2
make temporary string2 with " AM" and temporary string 3 with ""
calls the replacecharsequence(string1, string2, string3)
which does "for every time it sees string2 inside string one, replace it with string3"
and does the entire thing again for PM
it seems to work perfectly with 12/24h clock just like on GB, no messy moving the entire statusbar rightwards

[HOW-TO][4.1.2] Disable Edge Zoom in browser and Gmail.

Hello xda'ers,
after loads of PM, requests, and lot of people I found googlin complainting about this "feature" I give to you the fix.
There are 2 ways to disable edge zoom, but I give you the easiest one.
Requirements:
smali/baksmali (and its use) or apktool (and its use)
Decompile framework.jar
go to:
smali\android\webkit\ZoomManager.smali
look for:
.method setEdgeZoom(Z)V
delete the red line and add the green line
Code:
.method setEdgeZoom(Z)V
.registers 12
.parameter "enabled"
.prologue
[COLOR="Red"]const/4 v5, 0x1[/COLOR]
[COLOR="SeaGreen"]const/4 v5, 0x0[/COLOR]
const/4 v4, 0x0
.line 1602
invoke-virtual {p0}, Landroid/webkit/ZoomManager;->getScaleGestureDetector()Landroid/view/ScaleGestureDetector;
move-result-object v6
if-eqz v6, :cond_41
...
Recompile and enjoy.
If this made your day, consider to hit thank button.
Cheers
How does this Edge Zoom feature work?
Mirko, are you talking about some earlier firmwares, because this feature is not
present on dll5 or dll7?
Actually i'd like to know how to get this feature back! It was really useful but it was removed from the newest firmware.
Sent from my GT-N7100 using Xparent ICS Tapatalk 2
I am trying to enable this as well but .method setEdgeZoom is nowhere to be found in ZoomManager.smali. I am on N7105 DLL4 rom. What was your other way to enable/disable this feature? TIA!

Images too compressed?

I've noticed that when I'm trying to send a picture through text, the phone compresses the picture to the point where it gets pixelated. It looks awful!
Has anyone had this problem? I'm using the stock camera app.
Sent from my SM-G900P using Tapatalk
Yeah ive notice this too. On my s3 there was a mod that sended the pictures uncompressed. Hopefully we get that on this phone.
Sent from my SM-G900P using XDA Free mobile app
8sms! You can chose how big the picture is also allows MMS over wifi!
Sent from a Galaxy 5 light years away
Send via email no compression
Joe0113 said:
8sms! You can chose how big the picture is also allows MMS over wifi!
Sent from a Galaxy 5 light years away
Click to expand...
Click to collapse
Great find! Where do I change to allow MMS over WiFi? Is that the messaging limit?
Found the setting, but it still is compressing the image
Sent from my SM-G900P using Tapatalk
zune70 said:
Yeah ive notice this too. On my s3 there was a mod that sended the pictures uncompressed. Hopefully we get that on this phone.
Sent from my SM-G900P using XDA Free mobile app
Click to expand...
Click to collapse
What was that mod called for the s3? I'd like to follow the thread in case the developer decides to make one for this phone.
Sent from my SM-G900P using Tapatalk
slickdealers said:
What was that mod called for the s3? I'd like to follow the thread in case the developer decides to make one for this phone.
Sent from my SM-G900P using Tapatalk
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2044251
[MOD] True uncompressed MMS. CONFIRMED working!
I dont think it would work with our phone
Sent from my SM-G900P using XDA Free mobile app
slickdealers said:
Great find! Where do I change to allow MMS over WiFi? Is that the messaging limit?
Found the setting, but it still is compressing the image
Sent from my SM-G900P using Tapatalk
Click to expand...
Click to collapse
Settings--> Message limits--> Set max pixels for height/width to 2976 and set maximum message size to 10000 kilobytes.
So after having the same complaint myself and even from people I send messages to I decided to make the switch and try this out.
Works great with only 2 complaints.
1) Lock screen no longer shows a message preview?
2) No theme/alt. color for messages.
I can deal with number 2 but I really am use to having the first option and used it a lot to just quickly turn on screen to read a message without wanting to respond etc.
Is it just me or is it indeed broken on S5 with third-party messengers?
I'm actually happy with the stock one if it had a darn option to set mms sizes.
My old HTC use to have 500KB or 1MB, this thing has neither and it's keeping all my images under 350K it seems like.
All providers support 1024KB, it's stupid they compress them so much. AT&T was 600KB but I just sent myself a 1.2MB message and got it fine even oddly.
I just want 1MB without scaling bahh.
bryanu said:
So after having the same complaint myself and even from people I send messages to I decided to make the switch and try this out.
1) Lock screen no longer shows a message preview?
Click to expand...
Click to collapse
Download NiLS from Play Store. Damn amazing app!
I think I found a fix for this (maybe). If you decompile SecMms_Blue.apk and look @ the mms_config.xml these lines are there (stock)
Code:
<int name="maxMessageSize">307200</int>
<int name="mmsHeaderSize">5120</int>
<int name="maxImageHeight">480</int>
<int name="maxImageWidth">640</int>
Maybe increasing the values would result in less compression?
---------- Post added at 10:31 PM ---------- Previous post was at 10:01 PM ----------
fergie716 said:
I think I found a fix for this (maybe). If you decompile SecMms_Blue.apk and look @ the mms_config.xml these lines are there (stock)
Code:
<int name="maxMessageSize">307200</int>
<int name="mmsHeaderSize">5120</int>
<int name="maxImageHeight">480</int>
<int name="maxImageWidth">640</int>
Maybe increasing the values would result in less compression?
Click to expand...
Click to collapse
I made an apk and tried this, didn't work. Did unlock a few settings I found in that xml though
EDIT AGAIN
- I found this line in the customer.xml in csc/SPR/system/csc
Code:
<MessageSize>1m</MessageSize>
<ImageResizeResolution>uxga</ImageResizeResolution>
Ill see if editing this, along with the mms_config edits add up to anything
fergie716 said:
I think I found a fix for this (maybe). If you decompile SecMms_Blue.apk and look @ the mms_config.xml these lines are there (stock)
Code:
<int name="maxMessageSize">307200</int>
<int name="mmsHeaderSize">5120</int>
<int name="maxImageHeight">480</int>
<int name="maxImageWidth">640</int>
Maybe increasing the values would result in less compression?
---------- Post added at 10:31 PM ---------- Previous post was at 10:01 PM ----------
I made an apk and tried this, didn't work. Did unlock a few settings I found in that xml though
EDIT AGAIN
- I found this line in the customer.xml in csc/SPR/system/csc
Code:
<MessageSize>1m</MessageSize>
<ImageResizeResolution>uxga</ImageResizeResolution>
Ill see if editing this, along with the mms_config edits add up to anything
Click to expand...
Click to collapse
Odd, those first things you found are what I would expect to be the issue.
When you changed them and tested I take it you rebooted and tested it with a different MMS image?
I noticed if I send an MMS and go to send the same one again it seems to re-use the compressed version it made the first time, maybe try testing again with a different image to make sure?
Hopefully someone figures it out. I actually don't mind the stock app beyond this annoyance.
Thanks for looking/trying though.
bryanu said:
Odd, those first things you found are what I would expect to be the issue.
When you changed them and tested I take it you rebooted and tested it with a different MMS image?
I noticed if I send an MMS and go to send the same one again it seems to re-use the compressed version it made the first time, maybe try testing again with a different image to make sure?
Hopefully someone figures it out. I actually don't mind the stock app beyond this annoyance.
Thanks for looking/trying though.
Click to expand...
Click to collapse
I've tried multiple things including some smali edits but I'm on stock odex. If you're on a deodexed system upload your SecMms_Blue.apk from /system/priv-app/ and I'll make the same edits for you to see if they stick
I also decompiled the messaging app and made some changes like upping the max size to 2mb (2097152 bytes) and the height and width the same as 2.4 mp. I sent myself a picture that was ~700 kb and the resolution was 2.4 mp and the app still scaled it way down to something like 1600 X 900 I also made the CSC edits in customer.xml.
in the past the edits that fixed this was in the ImageModel.smali
search for this line
# direct methods
.method static constructor <clinit>()V
in here is where the goods are
vinman12 said:
in the past the edits that fixed this was in the ImageModel.smali
search for this line
# direct methods
.method static constructor <clinit>()V
in here is where the goods are
Click to expand...
Click to collapse
Ok I found this line in ImageModel.smali. I know nothing about editing smali and I'm not sure what I'm looking for This is copied directly from Notepad++
# direct methods
.method static constructor <clinit>()V
.locals 2
const/high16 v0, 0x434b0000
invoke-static {v0}, Lcom/android/mms/util/UIUtils;->dp2Pixels(F)I
move-result v0
sput v0, Lcom/android/mms/model/ImageModel;->THUMBNAIL_BOUNDS_LIMIT:I
invoke-static {}, Lcom/android/mms/ui/MessageUtils;->getScreenHeight()I
move-result v0
invoke-static {}, Lcom/android/mms/ui/MessageUtils;->getScreenWidth()I
move-result v1
if-le v0, v1, :cond_0
invoke-static {}, Lcom/android/mms/ui/MessageUtils;->getScreenWidth()I
move-result v0
mul-int/lit8 v0, v0, 0x2
:goto_0
sput v0, Lcom/android/mms/model/ImageModel;->SLIDESHOW_BOUNDS_LIMIT:I
invoke-static {}, Lcom/android/mms/MmsApp;->getApplication()Lcom/android/mms/MmsApp;
move-result-object v0
invoke-virtual {v0}, Landroid/content/ContextWrapper;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0a004b
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimension(I)F
move-result v0
float-to-int v0, v0
sput v0, Lcom/android/mms/model/ImageModel;->THUMBNAIL_MAX_SHORT:I
invoke-static {}, Lcom/android/mms/MmsApp;->getApplication()Lcom/android/mms/MmsApp;
move-result-object v0
invoke-virtual {v0}, Landroid/content/ContextWrapper;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0a004c
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimension(I)F
move-result v0
float-to-int v0, v0
sput v0, Lcom/android/mms/model/ImageModel;->THUMBNAIL_MAX_LONG:I
return-void
:cond_0
invoke-static {}, Lcom/android/mms/ui/MessageUtils;->getScreenHeight()I
move-result v0
mul-int/lit8 v0, v0, 0x2
goto :goto_0
.end method
Any progress update? 8sms is still compressing the images like the stock messaging app.
Ditto - can someone most a modded SecMMS_Blue.APK for NE5 ?
Would like to get the max MMS size bumped up to 5 or 10 MB
From browsing Sprint forums - sending MMS to Sprint phones has no limit max but most other carriers have a 1-2mb limit for MMS
I tried decompiling and editing, couldn't get it to work
tried decompressing and editing, then re-compressing the apk - apk kept force-closing
I'm probably missing something basic but can't figure out what it is.
Does_It_Matter said:
Ditto - can someone most a modded SecMMS_Blue.APK for NE5 ?
Would like to get the max MMS size bumped up to 5 or 10 MB
From browsing Sprint forums - sending MMS to Sprint phones has no limit max but most other carriers have a 1-2mb limit for MMS
I tried decompiling and editing, couldn't get it to work
tried decompressing and editing, then re-compressing the apk - apk kept force-closing
I'm probably missing something basic but can't figure out what it is.
Click to expand...
Click to collapse
Did you zipalign the apk ? Sac23 posted a modded SecMms_Blue in the MOAR thread.

Categories

Resources