[Streak 5 General] :
After days (literally days...) of staring at this code trying to make sense of it (I am not a coder, but am the IT guy at a software company so that helped a litte), it finally started making sense and I found the one tiny change necissary to make the default orientation portrait. Since I cannot make the new .odex file for a specific build without installing it (which I dont want to do), I'll just post the instructions to do this yourself.

Disclaimer: The usual, I don't accept responsibility for any harm to your phone, any changes you make should be reversible if you mess up. These steps will only work for stock Dell roms. If you are on StreakDroid it can still be accomplished but is slightly different. You should only proceed if you have a decent knowledge of adb/shell/command line. This guide is intended for Windows PCs. Make a nandroid backup and/or backup your android.policy.odex

What you need

Android SDK (if you're a member of xda and you dont have this already then it's a must)

Java JDK

7-zip

Smali/Baksmali (download both jar files and rename them to remove the version number. For example rename 'baksmali-1.2.6.jar' to just 'baksmali.jar')

dexopt-wrapper (attached)

busybox (easiest way to install is to install titanium backup and select problems as many of you know from the superuser.zip root method)

your BOOTCLASSPATH (can be found in /init.rc on your phone)

Install the Android SDK, Java JDK, and 7-zip if you havent already. If you are installing the SDK for the first time you should probably familiarize yourself with the SDK first (lots of guides out there) then make sure to run SDK Manager and download the platform tools. Place the smali.jar and baksmali.jar files in the same folder as adb.exe (whether it be in the tools or platform tools folder or wherever you have moved adb). Place dexopt-wrapper on your Streak's sdcard.

Steps

> means a command (dont type the >)

1. Open a command window to the same folder as adb.exe (in Win7 ctrl + shift + right-click in the folder and select "open command window here")

2. Plug in your phone then pull the entire framework folder

> adb pull /system/framework/ framework

3. Decompile the android.policy.odex file

> cd framework

> java -jar ..\baksmali.jar -x android.policy.odex -o ..\androidpolicy

4. Navigate to the androidpolicy\com\android\internal\policy\impl folder and replace the PhoneWindowManager.smali with the one attached to this post.

5. Compile the code

> cd ..\

> java -jar smali.jar -o classes.dex androidpolicy

6. Add the resulting "classes.dex" file to the android.policy.jar file. To do this open the framework folder, right click on android.policy.jar and 7-zip -> open archive, drag the classes.dex into the 7-zip window so that you now see a META-INF folder and the classes.dex file. The resulting android.policy.jar should be around 96 KB in size.

7. Put the resulting android.policy.jar onto your phone sdcard. Fastest way is to put the jar file into the same folder as adb.exe and

> adb push android.policy.jar /sdcard/

8. Open shell

> adb shell

9. Become super user (if you havent done this before, make sure your phone is on so you can grant it superuser permissions)

> su

----------------------------------------------------------------------------

This section only needs to be done once

----------------------------------------------------------------------------

10. Put dexopt-wrapper into the correct folder with the correct permissions

> cd /system/bin/

> busybox cp /sdcard/dexopt-wrapper . (yes after dexopt-wrapper is a space and a period)

> busybox chmod 755 dexopt-wrapper

> cd /sdcard/

----------------------------------------------------------------------------

11. Create a new .odex file from the .jar file

> dexopt-wrapper android.policy.jar new.odex BOOTCLASSPATH

BOOTCLASSPATH should be the value of your bootclasspath from init.rc. For example my command looked like this (all one command):

dexopt-wrapper android.policy.jar new.odex /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/kafdex.jar:/system/framework/OmaDrmClient.jar

12. Copy the "signature" from the original .odex file to the newly created one

> busybox dd if=/system/framework/android.policy.odex of=new.odex bs=1 count=20 skip=52 seek=52 conv=notrunc

13. Replace the original android.policy.odex with the new one (you will need to mount your /system/framework/ with r/w permissions, can be done with root explorer or this app

> cd /system/framework/

> busybox cp /sdcard/new.odex android.policy.odex

> busybox chmod 644 android.policy.odex

14. Done

> sync

> reboot

Your phone will now reboot, be patient as it may take slightly longer to boot up the first time. On initial bootup the lockscreen will still be in landscape with the sliders also in landscape. Just unlock, let the phone boot up some more, turn off the screen and turn it back on...

Troubleshooting

If for some reason you run into problems and your phone hangs at the dell logo...

1. Boot into recovery

2. Put the original android.policy.odex (the one in the framework folder) into the same folder as adb.exe

3. Open a command window to same folder as adb.exe (should still be open from the install steps)

4. Type the following commands

> adb shell mount /dev/block/mtdblock6 /system

> adb push android.policy.odex /system/framework/

5. Select the reboot option in the recovery menu and you should be back to stock.

For GingerStreak 2.4 look here - Thanks TheManii