• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root ADB and "Basic" shell commands and references.

starkraving

Android Expert
Hey guys and gals,

Just thought I'd do a quick right up about and adb shell and some basic commands along with some reference links.
I know everyone is a "noob" at some point and with all the one click root methods, apk root methods automated install scripts and scripts and apps for this and that and everything... Well I think its a disservice to the community to a degree. People need to understand some basics to better understand what it is to be rooted.

Here's a great reference link for adb shell from the gurus of Google.
http://developer.android.com/tools/help/adb.html

Here's a little guide basic adb commands.
Firstly make sure you have USB debugging enabled on your device, have SDK and associate tools installed and if necessary have a environmental path set for adb. This if you have to fix the dreaded **ADB is not recognized in the CMD**
Navigate to & Left_Click on Start >
Right_Click on Computer >
Left_Click on Advance System Settings >
Left_Click on Environment Variables >
Left_Click on New ( User Variables ) >
Variables Name: ADB ( Or anything you want )
Variables Value: ;C:\SDK\tools ( Just like this, This is the Path of my adb.exe )
You must put a ; in front of ;C:\ ( adb Path goes here / Variables Value: )

SDK link here...
http://developer.android.com/sdk/index.html?hl=sk

Basic adb commands...

adb push (sends files to your phone) -- adb push c:\example.apk /sdcard/example.apk

adb pull (Receives files from your phone) -- adb pull /system/app/example.apk c:\example.apk

adb install (installs application) -- adb install c:\example.apk

adb shell (Begins shell connection with phone)

adb reboot (reboots phone)

adb reboot recovery (reboots phone into recovery)

adb reboot bootloader (reboots the phone into bootloader/the white screen)

adb remount (remounts the system)

Shell Commands to run while in ADB Shell

cd (changes directories) -- cd /system/app

ls (lists all files in the directory) -- cd /system/app

rm (removes files) -- rm /system/app/example.apk

cp (copies files) similar to cat -- cp /system/app/example.apk /sdcard/example.apk

cat (copies files) -- cat /system/app/example.apk > /sdcard/example.apk

exit (exits shell) -- exit

Nice chmod tutorial here...

http://modmymobile.com/forums/402-general-motorola-android/561136-guide-what-chmod.html

Nice Terminal Emulator tutorial here...

http://forum.xda-developers.com/showthread.php?t=1884616

Hope you guys find this useful.
 
Back
Top Bottom