This guide shows how to solve the screen wake lag on Samsung devices which can be almost 2 seconds from button press to actual screen-on depending on configuration and whether or not an external SD card is used. You're probably here because you've figured out that all the tricks listed in other threads (like turning off s-voice, ripple effect, and even freezing certain apps) does little to fix the problem. There are things other than wake-from-deep-sleep that can cause some lag, but the majority of the lag is caused by processor and sensor power-up cycles that cannot be improved using any method of modifying settings.
This fix should work on all incarnations of the Note II and potentially other Samsung devices as well. I'll dispense with the usual disclaimers about apktool, decompiling, and recompiling. Obviously this guide assumes some knowledge of those.
The Note II goes into deep sleep within about 1 second of screen off, so to eliminate wake lag, we need to prevent deep sleep. We do this by creating a wake lock. Yes, this means your phone will not go into deep sleep but before jumping to conclusions that this will nail your battery, see this post in my ROM thread for the gory details of what I found. Long story short, many people get better battery life by preventing deep sleep because the phone isn't constantly powering up different parts of the circuitry all the time. And from what I found, your phone is forced to wake out of deep sleep a lot, potentially hundreds of times an hour, to perform regular operations.
Devs, modders, and tweakers: feel free to use this mod in anything you develop and all I ask is that you credit me and link to this thread.
So let's get to it. We'll be making all our changes in android.policy.jar in the KeyguardViewMediator.smali file.
So open KeyguardViewMediator.smali and at the top, add the line in blue to create a ZeroWakeLag wakelock so that end users will be able to see and identify the wakelock that is keeping their phone awake:
Code:
.field private mWakeLock:Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"].field private mZeroWakeLag:Landroid/os/PowerManager$WakeLock;[/COLOR]
.field private mWakelockSequence:I
Next, add these lines in blue in the constructor method to initialize the new wakelock:
Code:
const-string v2, "keyguardWakeAndHandOff"
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;
move-result-object v0
iput-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mWakeAndHandOff:Landroid/os/PowerManager$WakeLock;
.line 314
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mWakeAndHandOff:Landroid/os/PowerManager$WakeLock;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/os/PowerManager$WakeLock;->setReferenceCounted(Z)V
[COLOR="Blue"]iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mPM:Landroid/os/PowerManager;
const/4 v1, 0x1
const-string v2, "ZeroWakeLag"
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;
move-result-object v0
iput-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mZeroWakeLag:Landroid/os/PowerManager$WakeLock;
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mZeroWakeLag:Landroid/os/PowerManager$WakeLock;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/os/PowerManager$WakeLock;->setReferenceCounted(Z)V[/COLOR]
.line 316
new-instance v7, Landroid/content/IntentFilter;
Now our wakelock is initialized so let's add a wakelock.acquire when the screen turns OFF so there is a permanent wakelock while the screen is off. Just add the lines in blue at the top of the onScreenTurnedOff method:
Code:
.method public onScreenTurnedOff(I)V
.locals 30
.parameter "why"
.prologue
.line 400
[COLOR="Blue"]move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mZeroWakeLag:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v1}, Landroid/os/PowerManager$WakeLock;->acquire()V[/COLOR]
monitor-enter p0
.line 401
const/16 v26, 0x0
:try_start_0
move/from16 v0, v26
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mScreenOn:Z
Now the wakelock is acquired on screen off, so let's add the lines in blue below to release the wakelock when the screen comes on in the OnScreenTurnedOn event. Technically you could skip the release altogether and it'd do the same thing but it's just good coding practice to release a wakelock when you are done with it rather than driving the reference count up:
Code:
.method public onScreenTurnedOn(Lcom/android/internal/policy/impl/KeyguardViewManager$ShowListener;)V
.locals 3
.parameter "showListener"
.prologue
.line 545
monitor-enter p0
.line 546
[COLOR="Blue"]iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mZeroWakeLag:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v1}, Landroid/os/PowerManager$WakeLock;->release()V[/COLOR]
const/4 v0, 0x1
:try_start_0
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mScreenOn:Z
That's it! Recompile and enjoy the zero wake lag.
Note to devs, tweakers, and modders. This mod works best when combined with some sort of screen-off underclocking and limiting screen-off processing to a single CPU. There are plenty of scripts to do that out there and it can even be done with CPU tuners, so I'll leave that part to you. As I said though, even that is not really necessary because you'd be surprised how much has to be woken up (see the post linked above) when in deep sleep so in many cases, it's better to just let the CPU's idle at-the-ready to avoid all the waking that happens from Google services, push mails, alarms, widget updating, etc. You (or your ROM dev) can also make this mod selectable by using system properties to turn the feature on/off by just jumping around the "acquire" and "release" statements in the OnScreenTurnedOff and OnScreenTurnedOn events.
Sharing
As mentioned above, use this mod in whatever mod, tweak, or ROM you like but please just credit me and link to this thread. Thanks!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to Donate
Donations are greatly appreciated. If I've saved you some time and aggravation with this mod, donating a few bucks is the best way to say thanks!
Guess I'll do some Q&A here...
pepe2909 said:
I read, so if do not go into deep sleep will consume more battery ?
Click to expand...
Click to collapse
I did a lot of research on that and it's not so easy to answer. Generally, I believe battery will be no worse and possibly better. Google location services, alarms, widgets, push mail, and many other processes end up waking up 99% of phones at least once every 3 minutes anyway and the deep-sleep-->awake-->deep sleep cycles actually consume more power than letting the processor(s) stay awake. On my phone for example, Google location services alone woke the phone 20 times/hr (every 3 minutes) and that's with GPS turned off and no navigation or map activities running! Add a weather widget here, a push mail app there, and I found that my phone was bouncing in and out of deep sleep more than a hundred times an hour! Better (on both battery and circuitry) to just idle at that point. With only one CPU awake with screen off, the radio will draw more power than the CPU idling. Most people don't realize that the screen and radio eat orders of magnitude more power than (especially an idling) CPU, so idling one CPU will have little effect on battery. That said, I suppose if you put your phone in airplane mode and maybe froze a bunch of other apps that wake the phone, maybe battery would be worse with the ZeroWakeLag wakelock and the phone would do better in deep sleep. Reality is: we don't use our phones that way.
jvillatoro said:
Edit: now we should discuss which cpu profile suits best when the screen is off using this Mod. I saw someone suggested to set Max CPU to 600 and Min to 200 Mhz
Click to expand...
Click to collapse
From my testing, the Note 2 already appears to limit processing to a single CPU when the screen is off. For extra battery savings, you can set up a screen-off max frequency limit of say 800Mhz to 1.0Ghz. I personally use 1.0Ghz because you only have one processor running and it won't ramp up unless it's needed anyway. Going below about 800Mhz can cause issues like bluetooth music skipping, media share server stuttering, etc. I definitely would not recommend setting the max to 200Mhz with the screen off to force the CPU to the lowest frequency all the time. But hey, this is Android... never hurts to try I guess if you really want to.
Mike
let me give a try now..thanks for the guide though...
Thx for sharing mike. Valuble guide. Really. Much appreciated.
R: [GUIDE] Eliminate Screen Wake Lag
Thanks mate... will try soon
Inviato dal mio GT-N7100 con Tapatalk 2
Mike you are awesome thank you
Sent from a galaxy note 2 far far away...
Can someone upload the files so we all won't have to do it?
Thx
I got lost at So open KeyguardViewMediator.smali...
Lol
Thanks for the guide mikey. MeanBean was my daily rom on my evo 4g lte, wondering if you will ever bring that awesome ROM here.
Me too, but it is great someone figured out how to implement this feature in upcoming roms.
Sent from my GT-N7100 using Tapatalk 2
Nicheuji said:
I got lost at So open KeyguardViewMediator.smali...
Lol
Click to expand...
Click to collapse
You need apktool to decompile the android.policy.jar
BTW, I just applied the changes to my phone, will report how it behaves. I am currently using latest Omega Rom V15.
I have the modified android.policy.jar in case anyone wants it
Edit #2: apparently the mod is working, do not notice any lag when turning the screen on. The process shows on better battery stat.
So that means that the cpu will idle at 200 mhz? Ill make a battery test tomorrow under my normal usage.
Ill post results later
jvillatoro said:
You need apktool to decompile the android.policy.jar
BTW, I just applied the changes to my phone, will report how it behaves. I am currently using latest Omega Rom V15.
I have the modified android.policy.jar in case anyone wants it
Edit #2: apparently the mod is working, do not notice any lag when turning the screen on. The process shows on better battery stat.
So that means that the cpu will idle at 200 mhz? Ill make a battery test tomorrow under my normal usage.
Ill post results later
Click to expand...
Click to collapse
Can I have the android.policy.jar, please?
So, I just replace it with the one in root/system/framework? (Yes, I'll make a backup first )
jvillatoro said:
You need apktool to decompile the android.policy.jar
BTW, I just applied the changes to my phone, will report how it behaves. I am currently using latest Omega Rom V15.
I have the modified android.policy.jar in case anyone wants it
Edit #2: apparently the mod is working, do not notice any lag when turning the screen on. The process shows on better battery stat.
So that means that the cpu will idle at 200 mhz? Ill make a battery test tomorrow under my normal usage.
Ill post results later
Click to expand...
Click to collapse
I don't have access To a computer for the next few days, all I have is my note 2 to keep me entertained. If I upload my android.policy.jar would there be any chance you could edit it for me? Would like to try this mod out. If not that's no biggie.
Cheers.
Nicheuji which Rom are you using?
Bungknees, sure, upload it and Ill work on it. Which Rom are you using?
Here, I am uploading my android.policy.jar for OMEGA ROM V15
You just have to replace the one under system/framework. I used Rootz Explorer to do this
R: [GUIDE] Eliminate Screen Wake Lag
Many many thanks! It works fine
Inviato dal mio GT-N7100 con Tapatalk 2
Will this mod work on a cm Rom ?, thanks.
Sent from my GT-N7100 using xda premium
jvillatoro said:
Nicheuji which Rom are you using?
Bungknees, sure, upload it and Ill work on it. Which Rom are you using?
Here, I am uploading my android.policy.jar for OMEGA ROM V15
You just have to replace the one under system/framework. I used Rootz Explorer to do this
Click to expand...
Click to collapse
I'm using a rom from another forum, and it's odexed, so that may cause a problem. But here it is anyway and I'll try it. Thanks.
bungknees said:
I'm using a rom from another forum, and it's odexed, so that may cause a problem. But here it is anyway and I'll try it. Thanks.
Click to expand...
Click to collapse
That's going to be a problem because I have no experience at all with odexed files. If it was deodexed, I could've help you.
I tried your file with the tools I have and I got a bunch of errors.
Sorry
jvillatoro said:
That's going to be a problem because I have no experience at all with odexed files. If it was deodexed, I could've help you.
I tried your file with the tools I have and I got a bunch of errors.
Sorry
Click to expand...
Click to collapse
No problem, thanks for trying.
Could you do mine mate
Sent from my GT-N7100 using Tapatalk 2
Related
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
Go to the end of the post for the flashable zips.
===================================
By default the user can set as minimum brightness level 30 (over 255) from the settings, 20 sliding the finger on the status bar.
Files changed:
/system/framework/services.jar
/system/app/Settings.apk
/system/app/SystemUI.apk (UPDATE 5. I completely forgot to add this in the guide)
(I used KPU as reference)
How to mod services.jar:
You need java installed and smali.jar/baksmali.jar. There are probably tools that can help you or you can look for a better explanation on how to do it. (this tutorial is not about smali/baksmali).
Here what I usually do:
1) Extract classes.dex from it (jar files are simply zip files, use any file archiver to do that)
2) Decompile classes.dex with this command (from cmd/shell etc):
Code:
java -jar baksmali.jar classes.dex -o classout
This will create a directory (classout) with all the .smali files in it. Make all the changes you need to do.
3) Recompile classes.dex with this command:
Code:
java -Xmx512M -jar smali.jar classout -o new-classes.dex
This command will recreate the .dex file (named new-classes.dex).
4) Rename new-classes.dex to classes.dex and put it back inside services.jar (overwrite the existing one).
services.jar
1) Decompile services.jar and open com/android/server/PowerManagerService.smali
2) Look for:
Code:
const/16 v4, 0x14
(line 10727). 0x14 is the hexadecimal of 20. This is the minimum brightness level achievable. You should use something greater than or equal to 1.
Code:
const/16 v4, [B]0x1[/B]
If you want, you can test some values. You simply need to run:
Code:
echo 1 > /sys/class/backlight/omap_bl/brightness
where 1 is the backlight value (1/255):
3) Look for:
Code:
const/16 v2, 0x14
(line 2189).
If you don't change this value you'll be able to decrease your backlight below 20, but if you turn the screen off and then on, it is automatically set to this value. Use the same value above.
Code:
const/16 v2, [B]0x1[/B]
UPDATE 1:
When the phone is inactive, before the screen is switched off, the backlight value is automatically set to 20. The problem is that if you can go lower to that value, when inactive, instead of decreasing, the brightness increase. To avoid this
4) Look for:
UPDATE 4: (if current brightness is higher than 20/255, use the default dim value):
Code:
.restart local [COLOR="Red"]v10[/COLOR] #nominalCurrentValue:I
(aound line 5859) and remember the "red" part (aka the register. It could be something different). Now look for:
Code:
const/16 v5, 0x14
and change it with
Code:
const/16 v5, 0x14
if-lt [COLOR="Red"]v10[/COLOR],v5,:low_dim
goto/16 :goto_a0
:low_dim
const/16 v5, 0x1
(line 5964). Make sure the red part is like the one above.
Pseudocode:
Code:
if your current brightness < 0x14 (20/255) => dim = 0x1 (1/255)
if your current brightness > 0x14 (20/255) => dim = 0x14 (20/255)
This value should be less than or equal to the values used above.
UPDATE 3:
When the battery is below 10, the brightness goes to the minimum value achievable. That could be a problem if you set a very low value, because everytime you turn off and then on the screen, you'll always need to increase the brightness, because the minimum value is good only in very dark places. To disable this feature:
5) Look for (line 1494):
Code:
.method private batteryIsLow()Z
Replace this: (UPDATE 3b)
Code:
.method private batteryIsLow()Z
.registers 3
.prologue
.line 1812
iget-boolean v0, p0, Lcom/android/server/PowerManagerService;->mIsPowered:Z
with this:
Code:
.method private batteryIsLow()Z
.registers 3
.prologue
.line 1812
const/4 v0, 0x0
return v0
iget-boolean v0, p0, Lcom/android/server/PowerManagerService;->mIsPowered:Z
Settings.apk
1) Decompile Settings.apk and open smali/com/android/settings/BrightnessPreference.smali
2) Look for 0x1e (3 occurences, lines: 318, 603 and 664) and change with 0x4 (the value used above)
Code:
line 318: const/16 v3, 0x1e
line 664: add-int/lit8 v0, p2, 0x1e
line 603: add-int/lit8 v3, v3, 0x1e
Code:
line 318: const/16 v3, [B]0x1[/B]
line 664: add-int/lit8 v0, p2, [B]0x1[/B]
line 603: add-int/lit8 v3, v3, [B]0x1[/B]
3) open smali/com/android/settings/BrightnessPreference$BrightnessObserver.smali
Look for 0x1e (line 98) and change it with 0x4
Code:
const/16 v3, 0x1e
Code:
const/16 v3, [B]0x1[/B]
UPDATE 5:
SystemUI.apk
1) Decompile SystemUI.apk and open smali/com/android/systemui/statusbar/StatusBarService.smali
2) Look for
Code:
.local v0, checkBrightNess:I
const/16 v1, 0x1e
(around line 404) and change it with
Code:
.local v0, checkBrightNess:I
const/16 v1, 0x1
This will let you achieve the minimum brightness level through the status bar.
AUTO BRIGHTNESS
If you want to change the auto brightness levels there's already a tutorial: Link
Probably you'll find this helpful.
Note that if you set a level below 20, if you don't mod services.jar when your phone is inactive, the brightness will go to 20.
Are you looking for a "night pack"? Read here
===================================
Flashable zips for DEODEXED only.
Do a nandroid backup!
SystemUI.apk is not included in these zips, sorry. You can't go below "30" from the status bar.
UPDATE 4:
If the current brightness is higher than 20/255, when inactive, the screen brighntess is set to 20 instead of 1.
XXKPU
If you don't like this mod, you can always restore the original files using these flashable zip:
DDKP3 stock
XXKPQ stock
XXKPU stock
or restore a nandroid backup of course.
UPDATE 3:
Brigthness won't change when battery goes below 10.
DDKP3
XXKPQ
XXKPU
UPDATE 2:
This time I used as minimum level 1 instead of 4, as shown in the guide. Even if they are close, the difference is significant. In order to avoid brightness increases, the brighntess is set to 1 when inactive.
DDKP3
XXKPQ
XXKPU
UPDATE 1:
This is for who downloaded the first version. It simply contains the stock framework.jar, because the change I made is not needed. This will not remove the mod. See the files below for that.
XXKPU framework.jar
nice work bro
loSconosciuto said:
By default the user can set as minimum brightness level 30 from the settings, 20 sliding the finger on the status bar.
Files changed:
/system/framework/services.jar
/system/framework/framework.jar
/system/app/Settings.apk
(I used KPU as reference)
services.jar
1) Decompile services.jar and open com/android/server/PowerManagerService.smali
2) Look for:
Code:
const/16 v4, 0x14
(line 10727). 0x14 is the hexadecimal of 20. This is the minimum brightness level achievable. I use this:
Code:
const/16 v4, [B]0x4[/B]
3) Look for const/16 v2, 0x14 (line 2189).
If you don't change this value you'll be able to decrease your backlight below 20, but if you turn the screen off and then on, it is automatically set to this value. Use the same value above.
Code:
const/16 v2, [B]0x4[/B]
framework.jar
1) Decompile framework.jar and open android/os/Power.smali
2) Look for:
Code:
.field public static final BRIGHTNESS_DIM:I = 0x14
This is the brighntess level used when the phone is inactive. I suggest you to set a value lower or equal to the values used above, otherwise the backlight will increase instead of decreasing (I'm not sure of that, I didn't try an higher value).
Code:
.field public static final BRIGHTNESS_DIM:I = [B]0x4[/B]
Settings.apk
1) Decompile Settings.apk and open smali/com/android/settings/BrightnessPreference.smali
2) Look for 0x1e (3 occurences, lines: 318, 603 and 664) and change with 0x4 (the value used above)
Code:
line 318: const/16 v3, 0x1e
line 664: add-int/lit8 v0, p2, 0x1e
line 603: add-int/lit8 v3, v3, 0x1e
Code:
line 318: const/16 v3, [B]0x4[/B]
line 664: add-int/lit8 v0, p2, [B]0x4[/B]
line 603: add-int/lit8 v3, v3, [B]0x4[/B]
3) open smali/com/android/settings/BrightnessPreference$BrightnessObserver.smali
Look for 0x1e (line 98) and change it with 0x4
Code:
const/16 v3, 0x1e
Code:
const/16 v3, [B]0x4[/B]
Here attached there's a CWM flashable zip. It's made for stock KPU.
ATTENTION: I didn't test it, do a nandroid backup!.
If you want to change the auto-brightness levels there's already a tutorial: http://forum.xda-developers.com/showthread.php?t=1235212
Click to expand...
Click to collapse
Trying it now.
God, u don't need to QUOTE the whole post :banghead:
Sent from my GT-I9003 using Tapatalk 2 Beta-5
thanks a lot! I'll try this for shure. Is it going to work only on KPU? I have stock gingerbread. DDKP3.
Good work...
Thanks for working upon this.
But i would suggest one can use Screenfliter app from Market. Its more elegant solution
.Har**** said:
Thanks for working upon this.
But i would suggest one can use Screenfliter app from Market. Its more elegant solution
Click to expand...
Click to collapse
ur screen filter app works only in SUPERAMOLED and AMOLED displays ! i had used it in the past and the screen just looks faded brown with the same brightness level ! with this tweak u can actually lower the real brightness leel ! i myself use this app called ROOTDIM its amazing lets u put shortcuts on the desktop with the brightness levels i kept night as 1 ! and its awesome !
.Har**** said:
Thanks for working upon this.
But i would suggest one can use Screenfliter app from Market. Its more elegant solution
Click to expand...
Click to collapse
Screenfilter does not reduce the brightness of the screen, it actually creates another darker layer (or something like that) so the screen is running at the same brightness but u see another darker layer on top...
The Dev in this thread is directly reducing the screen brightness itself obviously resulting in better battery life...
Thanks loSconosciuto for working on this..
Can some kind Soul make a CWM for KPQ & DK3 & post it? :thumbup: :beer:
☞★sent from drajax's Galaxy SL!!! *♂ツ Hit thanz if I helped!
ilcorsaronero said:
thanks a lot! I'll try this for shure. Is it going to work only on KPU? I have stock gingerbread. DDKP3.
Click to expand...
Click to collapse
It's better to mod Settings.apk and services.jar again.
drajax said:
Can some kind Soul make a CWM for KPQ & DK3 & post it? :thumbup: :beer:
☞★sent from drajax's Galaxy SL!!! *♂ツ Hit thanz if I helped!
Click to expand...
Click to collapse
I can do it when I have some spare time.
I made the flashable zips for XXKPQ and DDKP3. See the OP.
This time I used as minimum level 1 instead of 4, as shown in the guide. Even if they are close, the difference is significant and to avoid brightness increases, the brightness is set to 1 when inactive.
If you think it's too low, I could use again 4 as value or ignore the minimum value achievable and use a higher value for inactive status.
Clarification
loSconosciuto said:
UPDATE:
Backlight value when inactive:
4) Look for:
Code:
const/16 v2, 0x14
and change it with
Code:
const/16 v2, [B]0x4[/B]
(line 5964).
This value should be less than or equal to the values used above.
Click to expand...
Click to collapse
I think line 5964 reads const/16 v5, 0x14 and not const/16 v2, 0x14 as stated.
Oh thanks, I forgot to change this.
OP updated.
Confirmed to work on DDKP3. RootDim can achieve lower light level than this, this has got a good balance. Great.
Just wondering... is it possible to merge this fix and that one about phone not vibrating when fully charged? Like they did here for SGS2 http://forum.xda-developers.com/showthread.php?t=1070506 and http://forum.xda-developers.com/showpost.php?p=18900464&postcount=150? It would be the perfect "night pack" for i9003!!!
Another update. See the OP for the changes (in the guide there's a better explanation).
ilcorsaronero said:
Confirmed to work on DDKP3. RootDim can achieve lower light level than this, this has got a good balance. Great.
Just wondering... is it possible to merge this fix and that one about phone not vibrating when fully charged? Like they did here for SGS2 http://forum.xda-developers.com/showthread.php?t=1070506 and http://forum.xda-developers.com/showpost.php?p=18900464&postcount=150? It would be the perfect "night pack" for i9003!!!
Click to expand...
Click to collapse
Are you sure? I can set as minimum level 1 from the settings and sliding the finger on the statusbar (in this case is harder to set the brightness at 1). If you used the first version (the one made for KPU, not avaible anymore), you are allowed to set as minimum brightness 4 (I decided to do so).
Otherwise I think I did something wrong, I can't test all the flashable zips.
Regarding the notification:
I disabled it in a dirty way renaming
Code:
/system/media/audio/ui/TW_Battery_caution.ogg
to
Code:
/system/media/audio/ui/TW_Battery_caution.ogg.bak
You can do the same for Charger_Connection.ogg and TW_Low_Battery.ogg (the names are self explanatory).
Anyway I'll see the guide, thanks.
loSconosciuto said:
UPDATE 3:
When the battery is below 10, the brightness goes to the minimum value achievable. That could be a problem if you set a very low value, because everytime you turn off and then on the screen, you'll always need to increase the brightness, because the minimum value is good only in very dark places. To disable this feature:
5) Look for:
Code:
.method private batteryIsLow()Z
(line 1494) few lines below this you have:
Code:
if-nez v0, :cond_10
(line 1501). Add before this line this:
Code:
goto :cond_10
Click to expand...
Click to collapse
You mean add this line:
goto :goto_1
And will you please add a date in the title of the post whenever you update the OP...
Thanks man
pancit said:
You mean add this line:
goto :goto_1
And will you please add a date in the title of the post whenever you update the OP...
Thanks man
Click to expand...
Click to collapse
I think I should read multiple times the post before hitting "Submit Reply" . Anyway you mean goto :goto_11.
Thanks a lot!
I'm sorry if u consider this off topic..
There are 2 apps in the market ROOTDIM & SCREENDIM... Are these apps safe to use IN THE LONG RUN and which one's better .. The one using root or the one without...
They are pretty safe, & the best of those is Rootdim mate! IMHO! :thumbup:
☞★sent from drajax's Galaxy SL!!! *♂ツ Hit thanz if I helped!
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!
By default the Noise suppression is enabled and when we move the phone at certain angles, the other party wont hear anything what we talk. This mod disables the Noise suppression.
In Phone.apk \Phone\smali\com\android\phone\PhoneUtils.smali
Change
sput-object v2, Lcom/android/phone/PhoneUtils;->sConnectionMuteTable:Ljava/util/Hashtable;
.line 240
sput-boolean v3, Lcom/android/phone/PhoneUtils;->sIsNoiseSuppressionEnabled:Z
.line 244
const/4 v2, 0x0
to
sput-object v2, Lcom/android/phone/PhoneUtils;->sConnectionMuteTable:Ljava/util/Hashtable;
.line 240
sput-boolean v4, Lcom/android/phone/PhoneUtils;->sIsNoiseSuppressionEnabled:Z
.line 244
const/4 v2, 0x0
You are very good with smali code.
Sent from my C525c using Tapatalk
How to edit?
mlesic said:
How to edit?
Click to expand...
Click to collapse
Decompile the apk using apktool.
Sent from my C525c using Tapatalk
Hello
How do you managed to decompile the Phone.apk to modify smali, because i wasted a day with apktool and it gives me all kind of errors. I have an htc one sv(without lte, k2_u ) and the noise reduction is kiling me. Could you pls help me in decompiling this damn Phone.apk?? I atached the Phone.apk file, who knows, maybe you'll help me. Or if the my Phone.apk is exactly the same like yours if u are kind to send me your .apk file...note that i am on android 4.2.2 (maybe this could be the problem, cause i've had some problems even in rooting it but i managed to succed). Thanks in advance!!!
rollon76 said:
By default the Noise suppression is enabled and when we move the phone at certain angles, the other party wont hear anything what we talk. This mod disables the Noise suppression.
In Phone.apk \Phone\smali\com\android\phone\PhoneUtils.smali
Change
sput-object v2, Lcom/android/phone/PhoneUtils;->sConnectionMuteTable:Ljava/util/Hashtable;
.line 240
sput-boolean v3, Lcom/android/phone/PhoneUtils;->sIsNoiseSuppressionEnabled:Z
.line 244
const/4 v2, 0x0
to
sput-object v2, Lcom/android/phone/PhoneUtils;->sConnectionMuteTable:Ljava/util/Hashtable;
.line 240
sput-boolean v4, Lcom/android/phone/PhoneUtils;->sIsNoiseSuppressionEnabled:Z
.line 244
const/4 v2, 0x0
Click to expand...
Click to collapse
Here is my framework-res apk, and com.htc.resources.apk (i atached the framework-htc-res.apk cause maybe, who knows, you'll need it. Many many thanks!!!
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.