Howto: Enable Autorotate for your G1 Browser!
Posted on Thursday, December 11, 2008
Filed under
Apps
I'm not sure why the Android Browser doesn't auto rotate by default. Instead they have a "Flip Orientation" menu item that lets you toggle your default orientation. Pretty useless overall. Anyhow, a quick hack in the Browser source code let me enable auto rotation via the G-Sensor.
The change is really trivial. In the BrowserActivity.onCreate, I hard coded the orientation to ActivityInfo.SCREEN_ORIENTATION_SENSOR instead of pulling it from a preferences setting.
The downside is that the flip orientation menu item no longer works. Not that I care: I (and probably most people) never used it. So it is a hack, but oh well. If I'm motivated I'll put in a proper fix.
Installation Instructions (you must have root access):
- Download the updated Browser.apk
- Run the following from the command prompt to back up your current Browser file to your sdcard and install the new one:
- adb remount
- adb pull /system/app/Browser.apk BrowserBackup.apk
- adb push BrowserBackup.apk /sdcard
- adb shell rm /system/app/Browser.odex
- adb push Browser.apk /system/app
Comments
Categories
- Apps
- Howto
- News
- Tips and Tricks
- G1 ROMS
- Hacking The Android G1
- HTC Hero ROM
- Cupcake
- Custom Firmware for G1
- Hacking
- Root Android G1
- Tethering
- Dudes Cupcake
- G1 Hacks
- Hack the G1
- Manual OTA Update Instructions
- Misc
- Shortcuts
- Tether your android G1 phone
- Themes
- Android G1 Service Manual
- Bugs
- Change Boot Logo
- Convert video to Android G1
- Docs
- Download mp3's from your gmail account
- Factory Settings G1
- Free Calls From Android G1
- Friendfeed on your Android G1
- G1 Firmware
- Google Voice Android App
- HTC Magic
- HTC Sapphire
- Latest HTC Radio For G1
- Meebo IM on Android
- Modified Hero Rom
- QA
- RC29
- RC30
- Radio Update
- Root RC30
- Sip
- SuperHero ROM
- Tips Tricks
- Tweaks
- Unbrick
- Unroot G1
- Update Recovery Partition/IMG
- Upgrade G1 Radio
- Upgrade SPL
- Video Encoding
- Wallpapers For the G1 Phone
- Widgets
- android app search
- android apps
- android widgets
- androird irc client
- best g1 apps
- command line
- g1 pdf reader
- g1 root
- g1 widgets
- irc on android
- jailbreak g1
- mp3 player android g1
- pdf reader
- pdf viewer
- root access
- root g1











how do i use this? how do i get root access? im not really tech-savvy (at least cellphone pda devices) but would like to perform this feature. also will tampering with a root feature change future apps which try to use it. thanks!
Seems like using the flip orientation button actually causes the autorotate to stop working until a restart? anyone else experience this?
I Say Just Download Steel app in the market. its simple and comes with an on screen keyboard
once you get root access to your phone using the "telnet" app you cant use it again it wont connect and you cant do the prompts
WTF. It won't let me copy the new Browser.apk over.
failed to copy 'c:/temp/Browser.apk' to '/system/app/Browser.apk': No space left on device
somehow it deleted the Browser.apk and then filled the space or resized the partition in system so that I can't put back the new Browser.apk....
e-mail me at odslabs@gmail.com if you can help, thanks.