• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD] Tuned auto-rotation for JS3/5

Search This thread

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
Is your device changing its orientation to landscape way too quick?
If the answer is yes, read up, here is the solution.


I hate Froyo autorotation on Galaxy S.
It turns into landscape way too quick, even when I'm picking the device from the table.

Since there was no reaction from Samsung, I decided to fix this for them.

This involves decompiling framework.jar file, editing file:
Code:
android\view\WindowOrientationListener$SensorEventListenerImpl.smali
I attached a modified file. I dont exactly know what changes there are, I modified some values at random :D

For devs:

To be more serious, I decompiled SGS JS3 framework.jar and replaced WindowOrientationListener$SensorEventListenerImpl.smali from DesireHD's eViL-NXSense-HD-v.1.1_BETA (random pick). Having the right implementation of sensor listener i started to tweak it, changing some values.

If you want to tweak it further to your needs, focus on MAX_TRANSITION_TILT, MAX_TILT, PARTIAL_TILT constants.
(forgot to add) For a full reference: http://hi-android.info/src/android/view/WindowOrientationListener.java.html

Three files are attached to this post:
[rotation-fix]modified_JSX-CWM.zip - clockworkmod packages with fixed framework.jar, this is what an user needs :)
First boot after the update may take up to 5 minutes!
I do seem to have random errors due to firmware fragmentation. If you are a regular user and want this fix, you should rather ask your ROM developer for implementing it in his ROM, because at current state I cant guarantee if its compatible with ANY custom configuration.

auto_rotation_devs.7z original and recompiled framework.jar files form JS3/5 as well as original and patched smali.

//edit: lol accidently voted for front page :p Just a blind click sorry :)
On a second thought this might be interesting for more than SGS people, so maybe accident was not so bad.
 

Attachments

  • original_JS3-CWM.zip
    3 MB · Views: 37
  • original_JS5-CWM.zip
    3 MB · Views: 70
Last edited:

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
You mean? Bootloop/no changes?
I need some feedback;
Is this working for you?
Do you like it?
It might be slipstreamed into all current ROMS, you just need to encourage ROM developers to do so :)
 
Last edited:

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
Sec gotta check update.zip :p
Was ina hurry yesterday.
Ok the update.zip was borked, replacing.
 
Last edited:

sathiere

Senior Member
Jan 26, 2009
73
8
Hi xan. Good stuff, definitely an improvement over the factory settings.
Thanks for this. Flashing via CWM went flawless.
 

hpowered

New member
Mar 14, 2009
4
0
Same fix but on JS5

Hello.

Is there any chance to do same but on the JS5 framework?.


Thanks.
 

fuzijacz

Senior Member
Dec 26, 2010
212
25
Brno
noobsonline.com
How about a revert back zip if something goes wrong?

I am on JS3, so I should use auto_rotation-FIX-CWM.zip or auto_rotation-FIX-JS5-CWM.zip

Thanks, Froyo's autorotation is pain in the ass.

Look forward to your answer.

Thanks.
 

xan

Retired Recognized Developer
May 21, 2006
1,407
455
Crack-ow
Both should work, according to my tests. auto_rotation-FIX-CWM.zip or auto_rotation-FIX-JS5-CWM.zip

If you are familiar with adb, just adb pull /system/framework/framework.jar

I doubt it wont work.. Anyway will look into it.
 

htcgr

Senior Member
Mar 14, 2009
168
3
does it work ok for js5....??? can i restore the previous WITH the original...???
 

fuzijacz

Senior Member
Dec 26, 2010
212
25
Brno
noobsonline.com
ok, I tried your fix, works fine, but one thing, and that is that mine volulme controls are absolutely messed up :-D

for example, when I click on a side to increase/decrease ringer volume, it says Playing via Bluetooth instead of Ringer Volume, or instead of Media Volume it says Silent Ringtone, etc...

It's quite messed up, I saved my framework.jar before flashing so I am back on my original.

I have JS3 ROM Darky's 9.2.

Any idea what could be the problem?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Is your device changing its orientation to landscape way too quick?
    If the answer is yes, read up, here is the solution.


    I hate Froyo autorotation on Galaxy S.
    It turns into landscape way too quick, even when I'm picking the device from the table.

    Since there was no reaction from Samsung, I decided to fix this for them.

    This involves decompiling framework.jar file, editing file:
    Code:
    android\view\WindowOrientationListener$SensorEventListenerImpl.smali
    I attached a modified file. I dont exactly know what changes there are, I modified some values at random :D

    For devs:

    To be more serious, I decompiled SGS JS3 framework.jar and replaced WindowOrientationListener$SensorEventListenerImpl.smali from DesireHD's eViL-NXSense-HD-v.1.1_BETA (random pick). Having the right implementation of sensor listener i started to tweak it, changing some values.

    If you want to tweak it further to your needs, focus on MAX_TRANSITION_TILT, MAX_TILT, PARTIAL_TILT constants.
    (forgot to add) For a full reference: http://hi-android.info/src/android/view/WindowOrientationListener.java.html

    Three files are attached to this post:
    [rotation-fix]modified_JSX-CWM.zip - clockworkmod packages with fixed framework.jar, this is what an user needs :)
    First boot after the update may take up to 5 minutes!
    I do seem to have random errors due to firmware fragmentation. If you are a regular user and want this fix, you should rather ask your ROM developer for implementing it in his ROM, because at current state I cant guarantee if its compatible with ANY custom configuration.

    auto_rotation_devs.7z original and recompiled framework.jar files form JS3/5 as well as original and patched smali.

    //edit: lol accidently voted for front page :p Just a blind click sorry :)
    On a second thought this might be interesting for more than SGS people, so maybe accident was not so bad.
    2
    Sure, will upload patched JS5 framework in few hours.