[Samsung Galaxy S (4G Model)] bhundven:
READ EVERYTHING.

COME BACK AND RE-READ THE WHOLE OP ON EVERY UPDATE.

IF YOU ARE OUT OF DATE, RE-READ THE WHOLE OP.

I hope the instructions get easier over time... ;)

Credits:

TeamAcid - For helping with early bml stuff!

m4xm4n - For rild many other helpful fixes! (now a part of TeamAcid)

hamsterblade - For incoming ringtone fix

EpicCM - The boards on our phones are both different then aries, so it was helpful to understand your device repo layout.

windxixi - For some of the fixes in his device tree for sk4g. Our phones are somewhat similar and somewhat different.

Krylon360 - For the original device repo and help along the way.

drhonk - Tiny Preempt RCU.

noobnl and Kaik541 on #cmsgs for helping me out, even if they couldn't answer my questions. Helpful to bounce problems off others. :)

People in #teamnerd for the support

Those that donated so I can have coffee and beer!

CyanogenMod is a free, community built, aftermarket firmware distribution of Android 2.3 (Gingerbread), which is designed to increase performance and reliability over stock Android for your device.

#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
* This mod is only for the Samsung Galaxy S 4G (SGH-T959V) or VibrantPlus.
* This mod will not work on Vibrant or any other phone that is not the SGS4G.
*/

CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.

The OTA package is now posted in the Third Post. The Rom/Kernel seems pretty stable and could use some user testing. I'm able to use this as my phone. There are some problems... so...

**Things that work and features (not in any particular order)**

MTD and YAFFS2.

reset-v0.4.1-mtd kernel. (newly reverted to stock and updated manually... see here)

Tiny Preempt RCU in the kernel for lower memory allocation overhead.

CWM 5.0.2.8 (stock).

2d and 3d Graphics. Seems smooth.

Brightness control - thanks m4xm4n!

USB Storage in recovery works... in android it is broken.

Modem/RIL works. Get GSM/3g/4g! - I have some issues with rild. Mine seems to stay in "GSM" more then "HSPA"...

SMS works (when rild works)

Wifi now works! - Seems pretty stable for me.

BLN! (Use the pro app!)

Ringtones work!

**Known Issues**

Bluetooth does not work.

GPS does not work.

Rebooting to recovery or download mode is broken. If you know how to fix it, pm me!

hampsterblade has noticed some issues with call volume handling.

Again... USB storage in android is broken. Someone told me that it was upstream, but I can't find a bug on it in gerrit. So it must be a local problem.

If you find more issues, please check with CM7 gerrit before you think it's a problem with something I've done. ;)

Get the build from the thrid post. Make sure you read all the instructions before trying anything!

INSTRUCTIONS:

- First time flashing CM 7 to your Galaxy S 4G (or coming from another ROM)?

INSTALL THE LATEST VERSION OF HEIMDALL

Reboot to download mode.

Heimdall my sms-kj6-v0.1.x with CWM 5.0.2.7.

bryan@bh-t410:~$ heimdall flash --kernel zImage

Reboot to recovery.

Do a full Nandroid backup!

Go to 'mounts and storage'

format /cache, /data, and /system

Backup the /efs partition to the sdcard using 'adb shell' (you may or may not have to 'mkdir /efs' and 'mkdir /sdcard')

bryan@bh-t410:~$ adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
# mount -t vfat /dev/block/stl3 /efs
# mount -t vfat /dev/block/mmcblk0p1 /sdcard
# cd /efs
# tar cf /sdcard/efs-backup.tar *
# md5sum /sdcard/efs-backup.tar > /sdcard/efs-backup.tar.md5

Copy the efs-backup.tar.gz and efs-backup.tar.gz.md5 to your computer!

Advanced -> reboot to download mode

Heimdall the boot.img from the out directory to the kernel partition.

bryan@bh-t410:~$ heimdall flash --kernel boot.img

Boot to recovery (hold vol+ and vol-. Hold power until you see the Galaxy S screen. Then let go of power but keep holding vol+&vol- till you see recovery.)

Use 'adb shell' to restore the /efs partition (again, you may or may not have to 'mkdir /efs' and/or 'mkdir /sdcard')

bryan@bh-t410:~$ adb shell
erase_image efs
mount /efs
mount /sdcard
cd /efs
md5sum -c /sdcard/efs-backup.tar.md5 && tar xf /sdcard/efs-backup.tar

Note: This does not erase the old bml efs partition. So when you go back to bml, you will be using the efs partition that you backed up from. The mtd partition you restored to will then be gone.

Go to 'mounts and storage'

'mount USB storage', mount the device on your computer, copy over update.zip in the out directory, type 'sync' if you're on linux or mac (sync the filesystem buffers to disk) and unmount the storage on the computer. Then unmount the sdcard on the phone.

format /boot, /cache, /data, and /system

Go to the main menu: 'wipe data/factory reset'

'install zip from sdcard' install update.zip

Optionally install the Google Apps (located at the bottom of the page).

Reboot

- If you already have cm7 mtd installed, Just do the following:

boot to recovery

copy the zip to your sdcard

install the new zip from sdcard

advanced -> fix permissions

Reboot

- To go back to Stock/BML, you must get into download mode and heimdall one-click back to kj6 with sms-cwm. Flash bootloaders!. I usually then cwm install the sms-kj6-v0.1.1-rc2, before I install a new rom or nandroid restore.

To make an

Unoffical

galaxys4gmtd build of CM7, go to the fourth post.