[Captivate General] Penphoe:
Thanks to the wonderful information here on this site, I was able to root and unlock my Canadian Samsung Captivate S a.k.a. Rogers Captivate SGH-I896.

Us Canadian phone owners know that our phones are slightly different than what you guys in the states got. Those differences were significant enough to cause me trouble in unlocking my phone (my main priority) and which eventually got me to the realization that I would need to end up rooting my phone.

So here is what I did to root and unlock my phone. Yes, most of this information is found in the SGH-I896 wiki but I'm going to put more detailed instructions here to share my knowledge/experience. Also, note the stock Rogers ROM is Android 2.1 software version I896UXJI2.

Do go to http://www.communityhosting.net/sgsunlock/ and click on the Unlock Instructions for the Captivate. My instructions below follow the general gist of these original instructions but I simplified a few steps to reflect the differences I experienced when unlocking my SGH-i896.

Of course, the caveat always is in play - any attempts on your part to follow my instructions to root/unlock your phone is at your own risk and peril. I take no responsibility for any damages you cause to your own personal device.

With that out of the way, here's what I did!

Chapter 1 - FAIL!

First thing I tried was the SGS unlock tool along with the Windows script that extracts the unlock code. Don't even bother trying - it doesn't work because our phone is different! Then I started tinkering with adb, getting into the shell and poking around. First thing I noticed that in the adb shell, you do not have read access in the /efs directory! Hmm, looks like I need root access to get to the files in here!

I also installed Terminal Emulator on my phone to see if I could get into the /efs directory - same result. The shell user didn't have the elevated privileges to get into that directory.

So poking around, there's talk of the z4root app. Unfortunately, by the time I find this app it's no longer listed in the Android Marketplace. I try downloading it straight off of the thread above, but it wouldn't install! It said that my device was not supported.

This stumped me for a while since I couldn't side load z4root off of the site. Then doing some more reading, I learned how I could run the z4root.apk file off of a file manager.

Chapter 2 - Root!

I mounted my phone in mass storage mode and saved z4root.apk onto it. Then using a file manger, I navigated to the location where I saved it and installed it with no problems! :D Once installed, I launched the app and it what it needed to do to root my phone.

Chapter 3 - Extracting nv_data.bin!

Now that I have root access, I can now get nv_data.bin out of the /efs directory and place it onto the SD card for easy extraction onto my PC.

You can either do the following steps either using Terminal Emulator on the phone itself (which is just like opening up a command-line shell) or connecting your phone in debug mode and using "adb shell" on your computer. I did use both methods to type in commands to my phone. Using "adb shell" was easier to type on a real keyboard but I had no problems in either environment.

So without further ado, here are the commands I typed in. Please note that when you see "$" this is the regular user shell prompt and "#" is the super user shell prompt. Also, my comments and explanations are italicized.

Start either shell and you'll get this prompt:

$ su type the command su at the dollar sign prompt and press enter. This will turn on "super user" mode.

# This is the new prompt identifying su mode. To exit this mode, you can type the command exit and you'll get back to the $. Type exit again, and you'll quit/close the shell. Don't do it now as we just got started.

# cd /efs This will "change directory" into the efs directory where all the goodies reside![/efs]

# ls -l -a This will list out all of the details of what is in this directory. You'll see something similar below

drwxrwxrwx root root 2005-01-01 16:33 .android

-rwx------ radio radio 32 2010-12-12 07:06 nv_data.bin.md5

-rw-rw-rw- radio radio 1743 2010-10-25 15:08 nv.log

-rwx------ radio radio 1048576 2010-10-25 15:08 .nv2.bak

-rw-rw-rw- radio radio 1 2010-10-25 15:08 .nv_state

-rwx------ radio radio 2097152 2010-12-12 07:06 nv_data.bin

-rwx------ radio radio 32 2010-10-25 15:08 .nv2.bak.md5

drwxrwxrwx radio radio 2010-10-25 14:37 imei

-rwx------ radio radio 2097152 2010-10-25 15:08 .nv_data.bak

-rwx------ radio radio 32 2010-10-25 15:08 .nv_data.bak.md5

If you see something like the above, you're good to go! If you get permission denied or something like that, you didn't root your phone. :( Assuming all is good, we need to make a place to copy the nv_data.bin file

# cd /sdcard This will change directory to the sdcard directory. When you mount your Android's internal storage, you have access to this as a removable drive.

# mkdir efs_backup This will make a directory on your internal sd card called efs_backup

# busybox cp -d -r /efs /sdcard/efs_backup This calls the copy command and will copy all of the files and directory structure in the /efs directory and put it in the /sdcard/efs_backup directory.

Chapter 4 - Generating the new nv_data.bin

Now you can exit super user and the shell.

Mount your phone as a drive on your computer. Go to http://www.communityhosting.net/sgsunlock/ and submit your nv_data.bin file to this site. You can choose an unlock and unfreeze code, but according to the SGH-I896 wiki, the unlock/unfreeze codes will not work however your phone will be unlocked and you can use any SIM in it.

You'll be prompted to download and save it on your computer. Make a new directory on your phone's SD internal card called "efs_unlocked" and save your downloaded nv_data.bin file in this directory. Safely remove and unmount your phone and get back into a shell.

Chapter 5 - Putting it back together

$ ls /sdcard/efs_unlocked You should see the file nv_data.bin listed in this directory. If you don't see the output similar to the one below, STOP! Find the new nv_data.bin file before moving on!

nv_data.bin If you see this file listed, you're good to go!

$ su

# rm /efs/nv* remove all files in the efs directory that start with "nv"

# rm /efs/.nv* remove all hidden files starting with ".nv"

# busybox cp /sdcard/efs_unlocked/nv_data.bin /efs This will copy the modified nv_data.bin file into the /efs directory

# chmod 700 /efs/nv_data.bin Set the read-write-execute permissions on nv_data.bin.

# chown radio.radio /efs/nv_data.bin Change ownership and group membership both to radio

# reboot

If all goes well, you've wiped out all the nv_data files and copied over the new nv_data.bin file. As the phone boots up, it will rebuild the necessary data files. My phone booted up normally. Hopefully yours will too.

Get back into the shell - time to check a few more things.

$ su

# ls -l -a /efs

drwxrwxrwx root root 2005-01-01 16:33 .android

-rwx------ radio radio 32 2010-12-12 07:06 nv_data.bin.md5

-rw-rw-rw- radio radio 1743 2010-12-12 15:08 nv.log

-rwx------ radio radio 1048576 2010-12-12 15:08 .nv2.bak

-rw-rw-rw- radio radio 1 2010-12-12 15:08 .nv_state

-rwx------ radio radio 2097152 2010-12-12 07:06 nv_data.bin

-rwx------ radio radio 32 2010-12-12 15:08 .nv2.bak.md5

drwxrwxrwx radio radio 2010-10-25 14:37 imei

-rwx------ radio radio 2097152 2010-12-12 15:08 .nv_data.bak

-rwx------ radio radio 32 2010-12-12 15:08 .nv_data.bak.md5

If you see an nv_data.bin.md5 file like in the example above, then things are in good shape! If there is no nv_data.bin.md5 file, then the original instructions say that you need to reflash your ROM with another version that does rebuild the file. Mine worked so I didn't have to worry about using a different ROM. Also, according to the official instructions at Step 9 it says to make .bak backup copies of the nv_data.bin and nv_data.bin.md5 files. I did not as these files were re-built during the reboot process.

# busybox cp -d -r /efs /sdcard/efs_unlocked Makes a copy of your new files back onto your internal sd card.

# reboot recovery Your phone should now reboot into recovery mode. Follow the instructions on the recovery mode menu and choose the "delete cache data" and then reboot your phone.

Finale

Congratulations! You've now rooted and unlocked your phone! I did test my phone with a Telus SIM card in it. I didn't do a full test - just checked to see if it got any bars of cell reception and of course it did. My phone did not ask for an unlock code either.

I recommend you copy your efs_original and efs_unlocked directories and store them somewhere safe as an off-phone backup.

I'd also like to thank the Android developers who spent their hard earned time, money and effort to make these tools for us to use! All I want to accomplish with this post is a record of what to do for those of us with the current issue Rogers Captivate S.

Without these tools, we'd be stuck with just "regular phones"

Good luck unlocking and rooting your phones

LaterZ!

Darren!!