[T-Mobile Samsung Galaxy S II SGH-T989] RealPariah:
Battery Calibration and other USEFUL ANDROID INFORMATION as answers to repeated ??s

JB AND ICS ROM Installation Procedure [or any ROM really]

**If You Follow the steps below it should clear any residual files and should leave you with a totally blank slate for the ROM to install on. So, be sure to do Nandroid and/or Titanium Backup as your scenario dictates**

First, to be thorough you should have 100% battery before flashing for best battery life.

Supplies:

(links will be added)

Darkside Cache Wipe [OPTIONAL]

Darkside Super Wipe Script[Optional if using CWM more mandatory if using TWRP but it can be optional]

Kernel Cleanser Script [Very optional and only needed if you change kernels a lot and worry about residual files really]

Fix Permissions V2 by Minotauri Zip [yes v2 and v3 are different get v2]

Fix Permissions V3 Zip [edified again by Minotauri] [OPTIONAL]

*NEW* SEE Section BELOW INSTALL STEPS FOR HOW TO CHECK A ZIP FILES MD5 Signature via an ANDROID PHONE

ROM Installation Guide

Download The ROM of your choice using your WiFi Connection or Transfer it from your computer. Do not use the cell data connection [E, 3g, 4g] as there are more errors in data downloads this way. Also, some users report that they get the best results when they save the things they flash to their External SDCards. Myself, I use either the Internal Storage [EMMC] or the External SDCard interchangeably.

Reboot Phone in to Recovery

Choose Wipe Dalvick Cache [Advanced Menu]

Back at Main Menu, Tap Mounts and Storage

Tap to Wipe /cache /data and /system [Do each twice in a row]

Back at Main Menu Tap Install From SDCard and choose where you saved the kernel cleanser script and tap it to flash it [I suggest 2x again]

Do same thing for Darkside Superwipe Script [2x]

Restart Recovery [Advanced Menu]

Install From SD choosing your ROM zip file (just as above script zips)

Restart Device and allow to boot [skip account setup for now if it prompts we'll come back] wait 3 min from initial lock screen if unsure.

Restart in to Recovery

Clear Cache [Main Menu] and Dalvick Cache [Advanced Menu]

*(NEW) You can use Darkside Cache wipe here you should not need to clear any caches or to run fix perms separately if you flash Darkside cache wipe skip the above line, flash add-ons as stated in line below AND THEN flash darkside cache wipe (you can manually also skip cache wipes until after add-ons are installed the point is you clear both caches [before or after add-ons] and fix perms AFTER installing everything so adjust according to your tastes

Install any add-ons like super user, toggle zip installing custom radio and kernel last in that order [if nothing to add no worries that's cool]

Install From SDCard and find Fix Permissions v2 and flash it

or if you wish substitute Darkside cache wip here again subbing out the line right above this text

Restart Device and allow to boot [we cleared Dalvick Cache so yes it will be another longer boot]

You are done [unless you choose to fix ROM Manager so it doesn't freeze partially through fixing permissions while OS is running, but totally optional] Skip to Notes below and onward if not wanting ROM Manager fix

[OPTIONAL For ROM Manager FIX]

Once phone boots install [if it was not already apart of the ROM] ROM Manager [Premium License install will not affect anything do it now or later either way works]

Restart Device in to recovery

Flash the Fix Permissions V3 [YES VERSION 3 THIS TIME (Won't be needed again after this unless you install a new ROM, or uninstall ROM Manager when you re-install run this again) Just Like you installed the Zips above]

Once Done, Restart Device and let it fully boot and settle [give it 10 min after seeing initial lockscreen if unsure]

Open ROM Manager and Tap the Fix Permissions shortcut and let it do it's magic and it should not freeze on you now [best practice is to keep screen on in ICS it appears ICS sleeps deeper than GB and some apps haven't corrected for this so they stop processing just because device is in deep sleep not because the script is in error!]

DONE, Notes:

This method seems to ensure the best installation of ROM with least chance of cross contamination from the previous resident. I do find rarely even with this method I have to do this whole thing 2x in a row. This can happen when the data is transferred to the phone during install even if you do everything right. Once you run through it once or twice it gets easy and just throw those scripts and current ROM zip on Internal Storage if you find flashes from there work for you, because you should NEVER format EMMC [Internal Storage] as this will brick your phone [recoverable if you send it to Samsung or buy a $150 box and take your phone apart to connect it up [or if lucky know someone you trust that has one]]; and therefore as long as you have that and access to recovery you can flash your phone.

New Addition 2012.07.10

UPGRADING YOUR ROM WITHOUT WIPING USER DATA AND APPS!

This can only be done when upgrading from a previous to a new version of of your current ROM OR if you go from a ROM's base to the ROM [ie Paranoid Android is based on CM10 and you should be able to install Paranoid if you have CM10 without formatting your storage. This does also include how many changes exist between your current version and the one you are installing [ie you have Paranoid 2.2 installed and you try to install 2.52 you are more apt to have issues and/or errors than if you went from 2.51 to 2.52, so I can't account for EVERY scenario, use your best judgement please]. If this is your FIRST FLASH OF CM9 FOLLOW ABOVE INSTRUCTIONS AND USE TITANIUM BACKUP OR LIKE APP TO CARRY OVER USER APPS ONLY!

*BEFORE THE POSTING BEGINS YES I HAVE TESTED THIS USING NIGHTLY BUILDS AND HAVE DONE THIS OH ONLY ABOUT 12 TIMES IN THE LAST 14 DAYS! IT WORKS EVERY TIME!* I have also done this with both Clockwork Recovery 5.0.2.7 AND Clockwork TOUCH RECOVERY 5.8.1.3. I have not tried and will not risk using the Open Source Recovery [you can tell you are using it if the touch buttons are up and down and the enter key on the bottom of LCD screen and Clockwork Touch is the one the menu options themselves are tappable [If not sure install ROM Manager and have it install one or the other]]

Supplies

---------

** = Required

* = Optional

[/I]** You can use ROM Manager to Download the ROM file just don't have it start the flashing process automatically.

You can also visit Cyanogen Download Page

If you Happen to use the T-Mobile Galaxy S2 so do I so here is a direct link: Cyanogen T-Mobile S2 Download Section

** GApps

Click the top-most link labeled for CyanogenMod 9.0.x in the table at top of the page

* Chainfire SuperSU

I recommend Chainfire SuperSU as opposed to Original SuperUser included in CM9. It has some extra features, and its binary has been built better soo far. Well, Original Super User USED to Seg Fault All over ICS, but that has been fixed in the newest release. Chainfire has been built MUCH more recently geared towards ICS moreso [it works in Gingerbread just fine too] so I have stuck with it. If you like it PLEASE donate by buying SuperSU Pro on market. It is not my product, but it is well worth checking out and donating to if you find it useful.

Upgrade Guide

NOTE: It usually takes until AFTER the SDCard checks run through [2 if you installed ext SD] before the cell data even starts to connect, be PATIENT. If you have BEEN PATIENT AND ARE SURE THE RADIO IS ACTING UP FOLLOW ABOVE INSTRUCTIONS TO FLASH A ROM FROM SCRATCH [I recommend Paranoid Android].

Upgrading From a previous CM9 version to a Newer one

Gather the files you downloaded above and throw them on either your internal storage or your SDCard either will do just fine, just make 'em easy to find.

Don't forget to run the MD5 check as explained BELOW to ensure no data corruption during file download if you choose to do so.

FIRST RUN A NANDROID BACKUP [boot in to recovery, and use the backup feature provided in Recovery Menu] Step-by-Step Procedure on that coming soon :) . Of course, if you are an advanced user and do not feel this is needed then skip it, but if not is saving a few minutes skipping it worth rebuilding all your apps and settings if something goes wrong? You decide ...

Boot In To Recovery [Hold middle of Vol buttons so both are in while powering on and release them as soon as you see first Samsung Logo]

Now This is the order I do things, if you are comfortable or as you get comfortable you can change up exact order

Clear Cache [Main Menu]

Clear Dalvick Cache [Advanced Menu]

Now You can either go in to Mounts and Storage and Format the System Partition for a safer flash [I found not doing this on some Nightlys caused the touch screen to stop responding a lot, now that does seem to be fixed, just noting this incase you start wondering why the power, and vol keys work but the screen stops paying attention to you and how I fixed it go back in to recovery Wipe Storage and flash again from start [meaning dont skip re-flashing the following things as mentioned]]

Go to Install Zip from SDCard and Navigate to the CM Nightly you downloaded and flash it [remember to choose internal storage or SDCard as it applies to where you saved the files

WITHOUT RESTARTING

Install Zip and Now choose the Gapps zip [no worries your account info is retained but still flash it or Market and other Gapps will fail to work]

WITHOUT RESTARTING

IF you CHOSE to use Chainfire; Install Zip and Now choose the SuperSU zip

Now Run Fix Permissions [in Advanced Menu] IT WORKS FROM RECOVERY WITHOUT A FLASH PACK WHEN USING CM Based ROMs! [When they are installed to begin with if this is your FIRST CM flash then it still will bomb out and not run right] You can also skip this again if comfortable doing so

Once you are done those cache wipes and installs now Restart...

Be patient as anytime you wipe the Dalvick Cache you are on the hook for a LONG boot [~5 min]

Once the OS loads and you give it the 10 min to settle in and setup stats and all that background stuff [again use your judgement if comfortable skipping this]

Be sure to Open SuperSU from App Drawer and tap the button to update the binary when the pop-up prompts you to do so [if you did decide to use it]

Now you are good to go!

Now, THIS WAY you don't have to restore any USER APPs OR DATA [if you didn't wipe System before flash MOST of those settings should remain as well] and you only have your system settings to worry about!

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

How To Run MD5 Check on Downloaded Zips Before Flashing

Screenshots will be added also (please bear with me as I have time). This will be via phone so it helps the most people it can I will add a Windows version as well soon, but this will work even if you have no computer.

Supplies and the Basics

An Android Phone

An MD5 checking App [I will use Android File Verifier (AFV) which is free and available on market and free]

A Zip to verify and

a known MD5 number for the zip [usually posted as a line of text with zip (something like MD5: MD5-NUMBER-WHICH-IS-MIX-OF-LETTERS-AND-NUMBERS (Hexadecimal) in thread near download zip [or sometimes changelogs] just copy it to a text file or bookmark thread to refer back once we generate the MD5 signature on the file when we complete downloading it.

Checking a Downloaded Zip's MD5 Signature on an Android Device Guide

[ANY ROM doesn't need to be specifically Gingerbread or ICS]

-> Download Zip you wish to check to some form of storage [Internal or External SD or even USB drive if you have USB host support and adapter doesn't matter where as long as you have enough storage to store the downloaded file.

-> Open Market and Install Android File Verifier [AFV]

-> If first install of AFV then click on return button on pop-up to see main window

-> Now, tap Select File and navigate to where you saved your zip

-> LONGPRESS the zip file [or any really] you want to check and choose calculate MD5 signature from the menu

-> Wait while it calculates the MD5 signature [this takes roughly 2 min with a 275MB ROM zip]

-> Once it is done you will see pop-up stating it is done, what the MD5 is and if you hit return the main window will now list the last checked zip's location with its MD5 checksum. The App also auto copies the number to your clipboard meaning if you saved the OPs MD5 in to a text file you can re-open it hit enter for a clean line, longpress screen and choose paste and it will paste the MD signature there for you to verify together with original signature.

-> You can go back and hit select file again and repeat for any files you would like and AFV supports following file signatures [incase OP likes to use more accurate checks [the longer the signature the more thorough the check, but also the longer it takes to process a file and generate that check]

AFV Supports FOLLOWING FILE SIGNATURE FORMATS:

* MD-5

* SHA-1

* Jar signing

* Verify Nandroid [MD-5]

* SHA-224

* SHA-256 [what I normally use to generate signatures when I release zips as it is more thorough than MD-5]

* SHA-512

Device: Samsung Tmobile S2 [SGH-T989]

ROM: Newest Paranoid Android [Currently 2.52]

Tweak Script: Newest Supercharger V6 with modified services.jar+KaK+3G Turbocharger