[Android General] Ricky Divjakovski:
this is just a quice guide about some main features of adb and fastboot and ways you can use them

heres some simple information i can give you about a device, a device has 6 main partitions, system, data, cache, dalvik cache, recovery and externel(sdcard)

for a device to boot it must have a boot.img, system.img and a data.img, when you backup your phone it backs up system.img, boot.img(included in system.img), data.img, cache.img, dalvik cache(thats included in the cache.img), and optionally your recovery.img(no point)

THIS WILL TAKE 10 MINUTES OF YOUR TIME AND WILL BENEFIT YOU FOR LIFE​

ADB INTRODUCTION

HOW TO PULL A FILE

an example of how to pull a file called bootanimation.zip from system of the phone(need to type adb root to get files from here)

and but it on my desktop, the idea is to type adb pull (location of what you wanna pull then \name of item) (name of location you would like it on your computer)

HOW TO PUSH A FILE

to push the file from my desktop you simply have to basically do the same command except replace 'pull' with 'push' and you type your computer location \file you wanna push then phone location, ill push the same file back

HOW TO INSTALL AN APP FROM YOUR PC

to install an app, for example on my desktop named facebook.apk i would write

HOW TO BACKUP APPS WITH ADB

First make a folder in your adb folder called backup without capitals, then inside that a two folders, one called systemapps and one called installedapps also without capitals

-To backup apps all system apps

-To backup apps all installed apps

HOW TO RUN SHELL VIA ADB(BACKGROUND TERMINAL)

to run shell type

to exit shell press CTRL+C or type

to run shell silently type

HOW TO REBOOT INTO FASTBOOT, RECOVERY AND NORMAL REBOOT

to reboot your phone normally type

to reboot recovery

to reboot fastboot

HOW TO START AND STOP ADB SERVER

to start the server type

to stop the server type

FASTBOOT INTRODUCTION

FLASH A .ZIP FILE

to flash a .zip file called flashme.zip put the zip file in your fastboot folder and type

FLASH A RECOVERY IMAGE (.IMG)

to flash a recovery called twrp.img, put it in your fastboot folder and type

UNLOCK BOOTLOADER

to unlock bootloader from htc you get your identifier token then download the unlock_code.bin they email you and flash it

FLASHING SPECIFIC IMAGE FILES(SYSTEM, DATA ,CACHE, ECT)

orite now to flash .img files, if your gonna flash a system, data or cache .img file i recommend wiping the partition before flash, and to manually restore your phone you must flash system, data, cache

note, to flash a recovery, all your doing is flashing a recovery .img

note, if your gonna flash a boot.img dont try to wipe your boot partition just flash it

to flash system image file

to flash data image file

to flash cache image file

FLASH A BOOT IMAGE OR KERNEL(BOOT.IMG)

to flash boot image file

HOW TO GET CID NUMBER

this is how you get your cid

HOW TO WRITE SUPERCID

this is how to write super cid

HOW TO RESTORE DEVICE BACKUP FROM COMPUTER

if you wanna restore your phone on your from your computer, simply backup your phone in recovery and transfer the backup to your computer and extract all the .img files and put your phone into fastboot mode, then go on your computer, put all your .img files in a folder with adb, fastboot, AdbWinApi and AdnWinUsbApi(the files everyone tells you to get from the android sdk package)

then navigate to the folder on command prompt on terminal then wipe a partition then flash one

for example i do it like this, i wipe system, data and cache first, so this is what i would type,

then flash the .img files(need to flash system first)

then you can flash boot.img, when you want to install a new kernel, all it is, is a a stock boot.img modified

Thanks MrDannyD for requesting this!​