Or Continue to Thread: [FIX] --- EpicMTD CM7 Rotation…
Find Your Device:
15th November 2011, 02:24 AM   |  #2  
OP Senior Member
Flag Longview, TX
Thanks Meter: 95
 
264 posts
Join Date:Joined: Dec 2010
More
Deprecated (Old, Archaic) Rotation Lag Fix How-to
Introduction

This is the old, deprecated fix for minimizing rotation lag in EpicMTD CM7. It has been superceded by the method described in the OP above. Feel free to play with this hack, but know that I will not be supporting it, nor will I go any deeper into the how-to guide: this is a moderately broad overview, and the details of learning how to hack .jar files will be left to the reader to discover. I learned 95% of this hack by searching and reading what others had done, not by asking people to spoon-feed me instructions. Take that to heart!

DISCLAIMER

I have tested the framework.jar file and the flashable .zip on my own phone, with awesome results. However, I refuse to be held accountable for any issues you may have.

Installation

-- "framework.jar" Replacement Method
  1. Delete or rename /system/framework/framework.jar (I recommend you simply rename it so that if you have issues you can easily switch back to your "stock" file
  2. Copy framework.jar to /system/framework, then reboot.
  3. ???
  4. Profit from the blazing rotation speed!*

-- Flashable .zip Method
  1. Copy EpicMTD_CM7_Rotation_Lag_Eliminator.zip to the root of your SD card
  2. Boot into CWM Recovery (or possibly ACS Recovery?)
  3. Flash the "EpicMTD_CM7_Rotation_Lag_Eliminator.zip" file
  4. Breakdance.
  5. Reboot and enjoy a lag-free* experience!

-- Caveats
  • THIS METHOD IS DEPRECATED! USE THE METHOD IN THE OP TO FIX YOUR ROTATION LAG PERMANENTLY, RATHER THAN HAVING TO HACK framework.jar FOR EACH NEW RELEASE!
  • * At least one person has successfully replaced framework.jar, but was not impressed with the improvement in rotation speed
  • Users of previous versions of this fix reported their phones hanging during boot (I have never experienced this)
  • One person reported that menus were changed, but I suspect he flashed this fix (created specifically for CM7) on top of another ROM
  • For other GB ROMs the fix should be basically the same, though I would recommend using the framework.jar from that specific ROM. See the Resources section below if you're interested in learning the technical end of the fix.

Downloads

-- Standalone File
  • framework.jar - Pulled from CM7 Nightly-10 (4G Toggle in Notification Widgets)

-- Flashable .zip
-- Resources
ISSUES / PROBLEMS / BUGS?

I will no longer support this hack. I have since learned of a much better method for almost eliminating rotation lag, a method that persists across ROM flashes and therefore does not require updating periodically when new versions of framework.jar accompany a new release of CM7. This is here simply because I can't delete the topic, and for historical interest.

Thanks and Acknowledgements

Thanks to Chris41g for the original fix, without stumbling upon that topic I would never have figured this out myself!

How-to Overview

With chris41g's original fix, here's what he had to say about it:
Quote:
Originally Posted by chris41g

...some framework edits will need to be made [to] \system\framework\framework1.jar.out\smali\android \view\WindowOrientationListener.smali

Code:
    .prologue
    .line 54
    const/4 v0, 0x3
needs to be changed to
Code:
    .prologue
    .line 54
    const/4 v0, 0x2

I pulled my "/system/framework/framework.jar", then pulled "classes.dex" from there and smali'd it, then browsed "...\classout\android\view\WindowOrientationListen er.smali" in Eclipse. I found
Code:
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3
    .parameter "context"

    .prologue
    .line 67
    const/4 v0, 0x3

    invoke-direct {p0, p1, v0}, Landroid/view/WindowOrientationListener;-><init>(Landroid/content/Context;I)V

    .line 68
    return-void
.end method
which is the closest to what chris41g posted for the original fix. I changed the "0x3" to read "0x0".

I then baksmali'd it into "classes.dex" and inserted that back into framework.jar, which is then copied into /system/framework, replacing the stock framework.jar. Done!

If anybody has any insight, tips, improvements, etc., send 'em! This is my first real contribution that involved any coding (not that I did much!) and I want to learn anything you Grand Masters have to share.
Last edited by AmericanJedi001; 25th January 2012 at 05:37 AM. Reason: Combined original OP and how-to, rewrote OP to reflect a much better method.
The Following 3 Users Say Thank You to AmericanJedi001 For This Useful Post: [ View ]