[Nexus One Android Development] Docmjldds:
Below is an extremely long post. Sorry, but if one is going to do this, they need to have some background. Make sure you have a good nandroid backup, in case you mess this up. It will go extremely fast after you learn the ropes, initially.

I have posted my method a few times here, but I will do it again. A bit of background. You need a nadroid backup or pull it from and older copy of (android.policy.jar)from one of Rods older Roms PRIOR to FRF91. With FRF91, it quit working and I had to do a modification of System\Framework folder where your android.policy.jar resides. I also used Leonids Spareparts from those ROMS which I still have to help set this all up correctly. The spareparts had MyLock available on it which I reference in my *fix*. I use an excellent app called root explorer, which gives you and easy method to change permissions of folders from read only, to read write. It also allows you to set up individual file permissions by long pressing a file and choosing permissions, and then checking the boxes to look the same as all the other files in that folder. Finally, the last piece of the puzzle is to use a widget from the market called No Lock, also free. (There are versions of MyLock on the market for free. I didn't need to download since it was on the spare parts the Leonid used in those earlier ROMs. If you need, I can upload a copy of the apk.

Leonid has a thread on XDA and he in the past had a link to all of his spare parts versions, so you may be able to just grab it that way. Root explorer is a paid app, btw. There are other methods of file permissions changes with other apps, more manual linux commands, but I can't help you there.

Below was a copy of the post. I just offered more background for all here. Sorry if this was a bit long.

***************************************************

<<Try this for now. My lock and another freebie widget called No Lock. When using advanced mode of My Lock And the No Lock widget set for locked, power button only will wake to the lock screen. Trackball is disabled. I use this when listening to music with phone in pocket when walking/working out. This way trackball doesn't wake the phone display. With No Lock widget set for unlocked, locking is disabled, so pushing any physical key/trackball wakes to home screen.

***************************************************

I basically have a copy of the older android.policy.jar on root of sd card. Using Root Explorer, I copy the file and paste it to system\framework. You have to change folder persions first when copying to a folder, using the little bubble at the top that's labeled rw, so it now reads ro. Now you are in read write mode. After pasting the file, look at the file permissions of another .jar file and use those same permissions, to modify the file you just pasted. When finished, change back the permissions to read only. Boot to recovery, wipe cache and dalvik, and reboot. The reboot may take a few minutes. You will possibly lose widgets at first, with a screen saying problem loading widget. Just delete the references. Do this on all home screen pages. Reboot again, now everything should be OK. Create a No Lock widget on desktop and use the settings as I described in the beginning reference to my original post. This may sound complicated, but it's a piece of cake on every update. Simply copy paste that .jar file on the sd card. Make sure that you reboot and wipe both caches. On Rods last updates, I didn't even have a widget loading problem. It only happened on first try. Reboot after cleaning up and deleting those problem widgets. You may also get generic icons saying application not installed. A reboot will correct this also.