[Captivate Android Development] di11igaf:
cleaner fix by sasovics HERE

fixes attached to post

so, its fairly easy to fix the 'buttons not lighting up when the screen is touched' thats present in i9000 firmwares ran on the captivate. the problem is in services.jar,-/com/android/server/PowerManagerService.smali.

Theres 2 ways to fix it-the hard way-what i did first, and how it fixed it on JPO(i started with jpo, just cause it was 2.2 and the files were relatively close to the captivates powermanagerservice.smali. Theres almost 11,000 lines of code in this smali file, and a bunch of them had to be swapped and modified. it was a pain in the ass, but it did work.

On the 2.2.1 JPU/X/Y powermanager, a bunch of stuff had changed, and i tried to import the captivate code into this to get it to work, but it kept bootlooping. so i checked out the 2.2 powermanagerservice.smali from jl1, and it was almost identical, all the extra stuff added to the 2.2.1 file was also added here, slight changes and the difference in the buttons, but just swapping that still wouldnt work-it boot looped, so i changed out every powermanagerservice.smali file, and it worked. after id been messing around with the other **** for 24 hours.

To be more clear here, with a 2.2.1 decompiled services.jar, and a JL1 services.jar- copy all PowerManagerService.smali files (there are 24 of these in /com/android/server) from JL1 into (and replacing) the same location of the 2.2.1 services.jar.

So all 24 smali files starting with PowerManager in 2.2.1 services.jar have been replaced with ones from JL1

to get the back lights to stay on for extended time, you need to replace the values in these following lines:

55- .field private static final LIGHT_SENSOR_DELAY:I = 0x7d0

65- .field private static final LONG_KEYLIGHT_DELAY:I = 0xbb8

67- .field private static final MEDIUM_KEYLIGHT_DELAY:I = 0xbb8

95- .field private static final MEDIUM_KEYLIGHT_DELAY:I = 0xbb8

327- const/16 v2, 0xbb8

4543- const/16 v3, 0xbb8

5500- const/16 v2, 0xbb8

change value to 0x2710 for buttons to stay on for 10 seconds

change value to 0x3a98 for buttons to stay on for 15 seconds

to decompile w/ smali/baksmali- do:
*decompile-* java -jar baksmali.jar -x services.jar -o services
*recompile-* java -jar smali.jar services -o classes.dex

(do not copy decompile and recompile-im sure most of you know this, but some might not)

So when you decompile services.jar, youll end up with a file called services in whatever folder you put the jar file in and opened a cmd window on.

Now make all your edits (i use pspad-works very well) and save them in the 'services' folder.

Recompile and youll end up with a classes.dex file.

just open up your original services.jar file with 7zip, and drop your newly created classes.dex into the archive, exit it and your done.

For all those that dont want to bother doing this yourselves, heres 3 already compiled. default is button lights on for 3 seconds after you touch the screen. 10 is 10sec and 15 is 15 sec obviously.

These will wipe you dalvik-cache, so the boot up will take a little bit. You may on first reboot have to cycle airplane mode or data network mode(in extended power menu) to get data to come up, but after that it will be fine.

this will work on 2.2.1 JPU/X/Y

If your on JS3 you /may/ have to replace your 3 libaudio files and phone.apk and phone.util with ones from jpu/x/y. basically you might have to get rid of the record option until i can come up with a fix. i had the record option on my phone, and when you end a call, the phone will soft reboot. THIS ONLY HAPPENS WITH THE PHONE.APK WITH THE RECORD OPTIONS ON IT.

this should be a relatively easy fix, i just replaced those files i mentioned, it works, and i havent looked into why the js3 ones cause the reboot on end call.?

And now that this is fixed, Mikey got sounds linked, bluetooth works- not much downside to i9000 roms anymore

the end/