G
g60madman
Guest
All,
This will be a living work in progress document. The goal of this document is to cover as much as possible. However it may not reach every single question, please google for answers or ask fellow developers for help. This document is written using a 100% stock NIB Virgin Mobile Samsung Galaxy Victory and using a workstation running Ubuntu 12.04 x64.
About my workstation
The workstation I am using is a Dell T5400, I picked the system up for $275 with 4GB of RAM and a single 2.0Ghz Quad Core Proc from eBay. I am currently into the system about $500.00 in total which now has 8GB of RAM, and (2) 3.16Ghz Quad Core procs running at a combined 25.28Ghz. Some simple notes about hardware is I have found in my 2 years of developing from Gingerbread to Jellybean is you never use more than 2GB of RAM during a build so you don't need to get crazy with RAM. Also don't waste money on SSD drivers as they do not speed up build times at all when compiling Android.
If you have not already please make sure your enviornment is setup
environment | vmobi.us
Once your environment is setup you will also need to install the following
Download Android SDK
Android SDK | Android Developers
Instructions
https://help.ubuntu.com/community/AndroidSDK
Downlaod dsixda's Kitchen
https://github.com/dsixda/Android-Kitchen/tags
Instructions
http://forum.xda-developers.com/showthread.php?p=5626300#post5626300
I. RIPPING THE ROM
II. CREATING A CM RECOVERY
This will be a living work in progress document. The goal of this document is to cover as much as possible. However it may not reach every single question, please google for answers or ask fellow developers for help. This document is written using a 100% stock NIB Virgin Mobile Samsung Galaxy Victory and using a workstation running Ubuntu 12.04 x64.
About my workstation
The workstation I am using is a Dell T5400, I picked the system up for $275 with 4GB of RAM and a single 2.0Ghz Quad Core Proc from eBay. I am currently into the system about $500.00 in total which now has 8GB of RAM, and (2) 3.16Ghz Quad Core procs running at a combined 25.28Ghz. Some simple notes about hardware is I have found in my 2 years of developing from Gingerbread to Jellybean is you never use more than 2GB of RAM during a build so you don't need to get crazy with RAM. Also don't waste money on SSD drivers as they do not speed up build times at all when compiling Android.
If you have not already please make sure your enviornment is setup
environment | vmobi.us
Once your environment is setup you will also need to install the following
Download Android SDK
Android SDK | Android Developers
Instructions
https://help.ubuntu.com/community/AndroidSDK
Downlaod dsixda's Kitchen
https://github.com/dsixda/Android-Kitchen/tags
Instructions
http://forum.xda-developers.com/showthread.php?p=5626300#post5626300
I. RIPPING THE ROM
About the Phone
This tutorial will be written around using a phone that is 100% stock and it's not activated from Virgin Mobile. The very first boot will be booting the device into recovery to rip the phone apart. NOTE: Each phone is different and this may or may not work, you may have to be booted into Android and have Android Debugging enabled to look at this info through adb shell.
Before we start
We will need to at least a 4GB or larger SD card this will be dependent on the size of the partitions. You will need the the USB Cable that was sold with the phone. You will need to know how to boot into recovery on the phone. In the example to boot into recovery we simply hold down the volume down + power.
2. Lets find the partition table
Now that you are booted into recovery lets attache the device
$ adb shell
$ ls -l /dev/block/platform/msm_sdcc.1/by-name
If all works you should have some partition information on the phone
NOTE: The ls -l command may or may not work, again it depends on your phone. For my HTC Evo V 4G I had to run
$ cat /proc/emmc
For other phones like the Motorola Triumph
$ cat/proc/mtd
Again it's all dependent on the phone and what the manufacturer offered with the Android Operating System.
3. Pull Files
At this point we are going to pull some files from the phone so we can use it to build a recovery for the phone, and also get some basic info on the phone
a. Create a new folder on your ubuntu box, in my case I created the following
$ mkdir victory_stock
$ cd victory_stock
Pull default.prop
$ adb pull default.prop
Pull fstab
$ adb pull etc
Pull kernel config
$ adb pull /proc/config
4. Root Phone
At this point we need to root the phone enough to pull off boot.img and recovery.img as the command '$dd' does not work.
Now based on the command we used there is (3) partitions we care about
-boot -> /dev/block/mmcblk0p7
-recovery -> /dev/block/mmcblk0p18
-system -> /dev/block/mmcblk0p14
3. Pull Stock Partitions
Now that we have figured out the partitions for this phone we can pull the stock files from the phones
Pull Stock boot
$
Pull Stock recovery
$
Pull Stock system
$
At this point we should have all the stock partitions from the phone that matter for booting.
This tutorial will be written around using a phone that is 100% stock and it's not activated from Virgin Mobile. The very first boot will be booting the device into recovery to rip the phone apart. NOTE: Each phone is different and this may or may not work, you may have to be booted into Android and have Android Debugging enabled to look at this info through adb shell.
Before we start
We will need to at least a 4GB or larger SD card this will be dependent on the size of the partitions. You will need the the USB Cable that was sold with the phone. You will need to know how to boot into recovery on the phone. In the example to boot into recovery we simply hold down the volume down + power.
2. Lets find the partition table
Now that you are booted into recovery lets attache the device
$ adb shell
$ ls -l /dev/block/platform/msm_sdcc.1/by-name
If all works you should have some partition information on the phone
Code:
lrwxrwxrwx root root 1970-01-01 03:23 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 1970-01-01 03:23 backup -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 1970-01-01 03:23 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 1970-01-01 03:23 cache -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 1970-01-01 03:23 carrier -> /dev/block/mmcblk0p20
lrwxrwxrwx root root 1970-01-01 03:23 efs -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 1970-01-01 03:23 fota -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 1970-01-01 03:23 fsg -> /dev/block/mmcblk0p22
lrwxrwxrwx root root 1970-01-01 03:23 grow -> /dev/block/mmcblk0p24
lrwxrwxrwx root root 1970-01-01 03:23 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 1970-01-01 03:23 modemst1 -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 1970-01-01 03:23 modemst2 -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 1970-01-01 03:23 pad -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 1970-01-01 03:23 param -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 1970-01-01 03:23 persist -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 1970-01-01 03:23 recovery -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 1970-01-01 03:23 rpm -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 1970-01-01 03:23 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 1970-01-01 03:23 sbl2 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 1970-01-01 03:23 sbl3 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 1970-01-01 03:23 ssd -> /dev/block/mmcblk0p23
lrwxrwxrwx root root 1970-01-01 03:23 system -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 1970-01-01 03:23 tz -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 1970-01-01 03:23 userdata -> /dev/block/mmcblk0p15
NOTE: The ls -l command may or may not work, again it depends on your phone. For my HTC Evo V 4G I had to run
$ cat /proc/emmc
For other phones like the Motorola Triumph
$ cat/proc/mtd
Again it's all dependent on the phone and what the manufacturer offered with the Android Operating System.
3. Pull Files
At this point we are going to pull some files from the phone so we can use it to build a recovery for the phone, and also get some basic info on the phone
a. Create a new folder on your ubuntu box, in my case I created the following
$ mkdir victory_stock
$ cd victory_stock
Pull default.prop
$ adb pull default.prop
Pull fstab
$ adb pull etc
Pull kernel config
$ adb pull /proc/config
4. Root Phone
At this point we need to root the phone enough to pull off boot.img and recovery.img as the command '$dd' does not work.
Now based on the command we used there is (3) partitions we care about
-boot -> /dev/block/mmcblk0p7
-recovery -> /dev/block/mmcblk0p18
-system -> /dev/block/mmcblk0p14
3. Pull Stock Partitions
Now that we have figured out the partitions for this phone we can pull the stock files from the phones
Pull Stock boot
$
Pull Stock recovery
$
Pull Stock system
$
At this point we should have all the stock partitions from the phone that matter for booting.
II. CREATING A CM RECOVERY
Since CM has grown so much and has been updated for months and months. Koush one of the top CM developers has created a simple recovery site to create recovery's on the fly. This will be my first time in using this as I have always built recoveries from source
Recovery Builder
Recovery Builder