[Samsung Infuse 4G] dman3285:
I have seen this question a hundred times, and for some reason everyone who did the Official ATT update to gingerbread thought they were getting this fancy CRT, or as one user said, Old tv like animation. That is not the case. This does not come factory with any stock infuse rom that i am aware of.

But it is one of the most simple mods to do on your own.Here is the guide.

Tools you will need.

Java JRE(if you dont already)

Android SDK

adb installed

Apktool, apkmanager(either is good)

7zip or winrar archiver

A text editor(I recommend notepad++)

Step 1 : First we have to decompile the framework-res.apk located in system/framework of the rom of your choice. Pull framework-res.apk and place in folder with apktool(if using apkmanager place in "place apk here for modding folder").

Open command prompt and type cd path/to/apktool, or type cd and drag apktool folder into command window and hit enter, this will put you in the path.

Next type

apktool if framework-res.apk

This will install the proper framework files for the resources to decompile or recompile.

Once finished type

apktool d framework-res.apk ./out

this will decompile the framework, should look like this

I: Loading resouirce tables...
I: Loaded.
I: Decoding file-resources...
I: Done.
I: Copying assests and libs...

If using apkmanager choose option 9 to decompile.

Step 2: Now we make our simple edit to enable the CRT off animation.

In your newly created out folder in apktool(or projects folder in apkmanager), open res/values and scroll to the "bools.xml" and open with text editor.

look for

<bool name="config_animateScreenLights">true</bool>

and change to

<bool name="config_animateScreenLights">false</bool>

save and close.

Step 3: Recompile framework. In command promt for apktool type

apktool b -f -d out

or

apktool b out

either works.

With apkmanager choose option 11.

Once recompiled, you should have two new folders in your out folder called "build" and "dist". since we made no image edits we will not mess with the dist folder.

Open your build folder and copy the resources.arsc into your ORIGINAL framework-res.apk. Just open framework-res with 7zip or winrar and drop it in.

In apkmanger you will have a keep folder, go into that folder when prompted and delete the resources.arsc folder and continue.

Done!

Push framework with adb by navigating to android sdk platform tools folder, plug in your phone with USB debugging checked and type

adb remount rw
adb push framework-res.apk /system/framework/framework-res.apk
adb reboot

Once booted up make sure in settings/display/animations that all animations are shown.

Now you have CRT off animation! Enjoy!

EXTENDED POWER MENUJ​

OK, HERE'S THE MOD YOU'VE BEEN WAITING FOR! HOPE YOU HAVE YOUR GAME FACE ON! :)

TOOLS NEEDED:

THE SAME AS MOD ABOVE

1: First we have to decompile the framework-res.apk to add the resources to the framework, using the apktool of your choice.

Once decompiled go to res/values/strings.xml and scroll all the way to the bottom and add these strings before "resources"

<string name="reboot">Reboot"</string>
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download<string>

Save and close

Now would be the time to add your png images to res/drawable-hdpi, make sure they are named "ic_lock_reboot, and so on..

Next open the public.xml also in res/values and add the resource id's for our new menu options. scroll to the last line of "<public type="string" name" and add these resource id's.

<public type="string" name="reboot" id="0x010404ac" />
<public type="string" name="reboot_recovery" id="0x010404ad" />
<public type="string" name="reboot_download" id="0x010404ae" />

then scroll to the last line of "<public type="drawable" name" and add these resource id's

<public type="drawable" name="ic_lock_reboot" id="0x010803dc" />
<public type="drawable" name="ic_lock_recovery" id="0x010803dd" />
<puiblic type="drawable" name="ic_lock_download" id="0x010803db" />

Recompile framework.

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

Here"s the fun part.

Using apktool or baksmali, decompile framework.jar and go to smali/com/android/internal/app/shutdownthread.smali and open with notepad++

Add this to line 29 right above ".field private static mReboot:Z

.field public static mReboot:I

then, search for ".line 660" and change this

if-eqz p0, :cond_0

to

if-eqz p0, :cond_3

Now scroll to line 820 and add this code

sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I

const/4 v2, 0x1

if-eq v1, v2, :cond_0

const/4 v2, 0x2

if-eq v1, v2, :cond_1

const/4 v2, 0x3

if-eq v1, v2, :cond_2

.line 686
invoke-static {}, Landroid/os/Power;->shutdown()V

.line 687
return-void

:cond_0
const-string/jumbo v4, "now"

invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V

return-void

:cond_1
const-string/jumbo v4, "recovery"

invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V

return-void

:cond_2
const-string v4, "download"

invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V

return-void

the last line of this code "return void" should end at line 859.

then on line 877 change this

:cond_0

to

:cond_3

save and close

Recompile framework.jar

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

Now, decompile android.policy.jar and go to smali/com/android/internal/policy/impl/GlobalActions.smali and open with text editor. Scroll to line 412 and change this

const/4 v10, 0x4

to

const/4 v10, 0x7

Then on line 458 change this

const/4 v0, 0x3

to

const/4 v0, 0x6

Then on line 482 add this code

aput-object v2, v0, v1

const/4 v1, 0x3

new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$7;

const v3, 0x10803db

const v4, 0x10404ac

invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

aput-object v2, v0, v1

const/4 v1, 0x4

new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;

const v3, 0x10803dc

const v4, 0x10404ad

invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

aput-object v2, v0, v1

const/4 v1, 0x5

new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;

const v3, 0x10803dd

const v4, 0x10404ae

invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

Now, copy GlobalActions$3.smali and rename it to GlobalActions$7.smali and change GlobalActions$3" to GlobalActions$7"(should be three changes) then delete lines 50 to 54 and add this code to line 50

const/4 v1, 0x0

const/4 p0, 0x1

sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I

save and close.

Then copy GlobalActions$3.smali and rename it to GlobalActions$8.smali and change GlobalActions$3" to $8 three times also. Then delete lines 50 to 54 and add this to line 50

const/4 v1, 0x0

const/4 p0, 0x2

sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I

save and close.

Now copy GlobalActions$3.smali and rename to GlobalActions$9.smali and change the three GlobalActions$3" to $9. Then delete lines 50 to 54 and add this code to line 50

const/4 v1, 0x0

const/4 p0, 0x3

sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I

save and close.

Done!! Recompile android.policy.jar and test framework-res.apk, framework.jar and android.policy jar on phone.

This should work on all GB roms for the Infuse. For those following the guide on the vibrant forum, it will not work on our device. It is different, this is the updated epm coding for our Infuse

WHILE EDITING SMALI, MAKE SURE ALL MARGINS ARE ALIGNED PERFECTLY!

Enjoy!

Attatched extended pngs

CONVERSION OF STOCK TAR.MD5 LEAK TO CWM FLASHABLE FOR NEW AND UPCOMING DEVELOPERS​

Now, i have been wanting to do this for quite sometime, and this can also be accomplished by researching and googling, but here you will have everything you need to build your OWN rom from scratch from a stock samsung tar.md5 leak. Also, I do not mind new developers using my stock rooted bases to build a rom, we all have to start somewhere, but wouldn't you like to say "Hey, i made this, and its all mine"? Well in this how to, i will provide you with the knowlege to do so, and the links to the tools you will need. Some of the tools you will need have already been outlinrd in the other How To's above, if you have followed or read them, but i will outline them again here to be clear.

Tools:

7zip or winrar archiver

notepad++ or text editor of your choice

dsixda kitchen(i dont use this anymore, but i did when i started and its simple to use for building and deodexing your rom)From Here

MagicISO which can be downloaded for free From Here

First:

Download one of the stock leaks, either from here or from samsung. It will come in a .rar file format.

Next go to a place on your pc where you want to create a folder for your new rom and create a folder for your new rom and name it(eg....Zeus Rom).

Then, open the new rom folder and create two new folders called "system" and "updates". Then close. We will come back here later.

Then in the same area of you new rom folder create a new folder called UCLB3 or whatever firmware you are working with. This is where we will extract the factoryfs, ect...

Second:

Now, go to where you downloaded the stock .rar file and open it with 7zip or winrar. Inside you should now see another .rar file. Double click to decompress and show the contents. You should now see a folder with the rom name(ie...SGH-I997_I997UCLB3_UC_ATT) open folder and you should see two files now, (I997UCLB3-Homebinary.tar.md5, and SS_DL.dll) you will not need the second file for what we are doing.

Now, double click the Homebinary.md5.tar file to decompress and show contents. You should now see(cache.rfs, zimage, modem.bin, factoryfs.rfs, boot.bin, Sbl.bin) For what we are doing we will only need the factoryfs.rfs, cache.rfs, modem.bin. Now click Extract and extract to the folder you made next to your new rom. It will probably ask for a password, and the password is "sampro.pl".

Third:

Open magicISO and in the top left-hand corner click file, then open, then navigate to the file where we just extracted the contents of the md5.tar. at the bottom where it says "files of type", click on it and choose all files so it will show everything you extracted to the folder.

Now double click on factoryfs.rfs and you should now see the contents of the file show up in the left hand box of magicISO. At the top of the files right click on "NO NAME" and click extract. Navigate to the new rom/system folder you created and extract. Once finished, you will now see your system as you normally see it when you open a rom.zip. You should now see, "app, bin, cameradata, etc, firmware, fonts, framework, lib, media, modules, tts, usr, xbin, build.prop, and default.prop".

Fourth:

Repeat the same process for cache.rfs and extract to the same folder, except we will delete this folder when we get what we need. Now you should see a new folder in the system folder called recovery. Move it outside the system folder anywhere, or during extraction you can extract outside the system folder, whatever is easiest.

Inside this folder you should see two files, "command, and sec_csc.zip". Open the sec_csc.zip to show its contents.You should now see the META-INF folder and system folder. Take the META-INF folder and move it to the rom folder with the "system and updates folder".

Next open the system folder of the sec_csc.zip you have open to show its contents. You should see, "csc, etc, media, CSCFiles.txt, CSCVersion.txt, SW_Configuration.txt". Move the "csc" folder and the three CSC.txt files to your system folder. From the sec_csc.zip file, open the etc folder and move that one file to your new rom/system/etc folder.

Next from the sec_csc.zip file, open media/audio, and move the "effects" folder to your new rom/system/media/audio folder. Then open the ringtones folder and move the ringtones.ogg's to your new rom/system/media/audio/ringtones folder.

Take the bootsamsungloop.qmg file and move to rour new rom/system/media folder.

Now if you extracted the cache.rfs into the new rom/system folder, you can delete it now, as we have what we need from it in our new rom.

Fifth:

Now go to where you extracted the md5.tar file and move the modem.bin to your new rom/updates folder. If you want to use the stock zimage you can put it in the updates folder but probably wont keep root. I suggest finding a rooted kernel for your device and placing the zimage and redbend_ua in the updates folder.

Now in the META-INF folder the updater script will not work due to the signature verification will fail. You will have to either write a new one, or grab one from a stock cwm flashable from your device and use it, or write your own using a guide.

Sixth:

Now with 7zip or winrar, compress your new rom folder into a zip file.

Download dsixda android kitchen and follow the instructions to set up and turn your rom zip into a cwm flashable zip!

Enjoy!