Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Android Data Persistence Using SQLite for Structured Data Using sqlite3 to View Databases

how do i open the adb shell? from where?

Hi, I can' t figure out how or where to open the "adb shell" that we been working with a couple of times.

Lucian Thomaz da Silva
Lucian Thomaz da Silva
9,631 Points

If you are using windows and genymotion, all you need to do is search for "cmd" on windows start and it'll bring up the Command Prompt. It is the prompt that you need to use. Once you are there, just type "adb shell".

2 Answers

If you are on mac, try using ./adb shell instead of adb shell, also make sure you are in the platform-tools directory.

Here's what I did on my Mac:

  1. I went to where my platform-tools were located (in /Users/myUserName/Library/Android/sdk/platform-tools).
  2. When I put "adb shell", I still got "-bash: adb: command not found", so I did "export PATH=/Users/myUserName/Library/Android/sdk/tools/$PATH" and then hit Enter, followed by "export PATH=/Users/myUserName/Library/Android/sdk/platform-tools/$PATH" and then hit Enter again.
  3. Finally, I put "adb shell", but this time it worked!

Source: http://stackoverflow.com/questions/10303639/adb-command-not-found