Talking [Tutorial] ADB and Deletting/Making 3 ext with any size (Windows & Mac)

First Step : Installing ADB Drivers
For windows : download PdaNet from here http://pdanet.co/a/

Second Step : Downloading ADB
For Mac : Attachment 2566782
For Windows : Attachment 2566785


Third Step : Installing ADB :-

For windows : Just extract it in directly in "C" partition
For Mac : Just extract it in any partition you want

Fourth Step :-
Openingthe ADB on Windows : Open start > Type "cmd" > Open the appeared program > Type in it "cd.." > Type "cd.." again
Opening the ADB on Mac :-
1) Open Start
2) Type "Terminal"
3) Open the appeared program
4) Type in it "nano ~/.bash_profile"
5) Type in it "export PATH=${PATH}:@@@@" (Replace the "@@@@" with the folder where you extract the ADB)
6) Save the files
7) press CTRL+X (To exit)
8) press Y (to confirm the save then press enter)


Final Step :-
Using the ADB on Windows/Mac :-

1) Type : "adb shell reboot recovery" (To reboot your phone into recovery)
2) Type "adb shell" (after rebooting Your phone into ClockworkMod Recovery)
3) Type "parted /dev/block/mmcblk0" (To open parted and mounts your SD-Card)
4) Type "print" (displays SD-Card partitions info)
5) Type "rm" (To delete a partition) then write the number of it

6) Type "mkpartfs primary fat32 0 27992" (This is for the Primary SD-Card-Ext) 28GB
7) Type "mkpartfs primary ext2 27992 28492" (This is for the System) 3GB
8) Type "mkpartfs primary ext2 28492 31492" (This is for the SD-Card-Int) 500MG
9) Type "mkpartfs primary ext2 31492 31692" (This is for the SD-Cache)199 MG
10) Type "mkpartfs primary linux-swap 00000 00000" (This is for the Lynux-swap) (If you do not know what it do, Do not try to make it)

You can change the Blue number according to your SD-Card size the provided numbers in this thread is for 32GB SD-Card
Note : You can Creat 4 SD-Partitions including the Primary SD-Card


Useful ADB commands :-

Note: to run all these commands, make sure USB debugging is enabled on your device

adb devices = list all connected devices
adb push = copy file/dir to device
adb pull [] = copy file/dir from device
adb sync [] = copy host->device only if changed
adb reboot = reboot your phone normally
adb reboot recovery = to reboot into recovery
adb reboot fastboot = to reboot fastboot
adb reboot bootloader = to reboot into bootloader
adb install [-l] [-r] [-s] = push this package file to the device and install it
adb uninstall [-k] = remove this app package from the device (-k means keep the data and cache directories)
adb help = show this help message
adb version = show version num
adb root = restarts the adbd daemon with root permissions
adb shell = run remote shell interactively
adb shell = run remote shell command



Useful Fastboot commands :-

Note: to run all these commands, your android devices must be in fastboot mode.
fastboot devices = to detect devices in fastboot mode
fastboot flash recovery twrp.img = to flash a recovery called twrp.img (put it in your fastboot folder)
fastboot oem unlock = to unlock bootloader of Nexus devices.