Thursday, April 7, 2011

Basic Android Terminal and ADB Shell Command List

1. Restart Android Phone
adb shell reboot
2. Restart Android into Recovery Mode
adb shell reboot recovery
3. Convert back to ext2 partition

adb shell === ENTER

tune2fs-O ^ has_journal / dev/block/mmcblk0p2 === carriage return

e2fsck / dev/block/mmcblk0p2 === carriage return (optional, can be a problem area in section 2, when used)

4. Pulling applications from Android phone to computer
adb pull /system/sd/app app

adb pull /system/sd/app-private app-private
5. Pushing applications back to android phone from the computer
adb push app /system/sd/app

adb push app-private /system/sd/app-private
6. Delete existing apps on Android SD
adb shell rm -r /system/sd/app

adb shell rm -r /system/sd/app-private
7. Repair gravity System or switch to screen

Sometimes frequent brushing of phone can cause gravity system or switch to screen failure. Just follow the steps below-
Restart the phone into Recovery mode, press "Alt + X" into the console
Open cmd and enter the following command

mount / data === carriage return

rm / data / misc / akmd * / data / misc / rild *
8. Ext2/ext3/ext4 formatted partition
adb remount

adb shell

rm-r / system / sd / *
9. Remove/ system / app under the application
adb remount

adb rm / system / app / Stocks.apk
10. If the start Time is too Long
adb logcat
11. Through Terminal Partition SD card

It will erase everything on your SD card

$ su

# cd /data

# wget http://64.105.21.209/bin/lib/droid/sdsplit

# chmod 555 sdsplit

# /data/sdsplit -fs *size* (add -nc to the end for JFv1.5ADP)

12. From the Recovery Screen, send an update file to your SD card.
adb shell mount /sdcard

adb shell rm /sdcard/update.zip

adb push *filename* /sdcard/update.zip

13. Restoring a nandroid backup via Fastboot

Start command-prompt/terminal cd to the nandroid folder and enter following commands

fastboot erase boot

fastboot erase recovery

fastboot flash system system.img

fastboot flash boot boot.img

fastboot flash userdata data.img

fastboot flash recovery recovery.img

fastboot reboot