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

Help Using ADB on a MacBook, Any difference from PC?

SunMad30

Well-Known Member
Hi Everyone,
If you are using ADB to unlock a device, but the commands that you are given say ¨on PC¨ are the commands the same for a MacBook? If so, what are they? Thanks in advance. =-)
 
See the notes / references re. "Mac" in this post:


You basically add the "./" character to prefix to the command (utility) you're trying to invoke (i.e., adb). For example:

./adb <rest of your command>​

This assumes, that you're adb executable is indeed named "adb" ;) :).

Cheers!
Oh, I see. So it is possible, you just add the dot and the line and you are good to go. Great. Does the same go for something like sqlite3 settings.db or cd /data/data/com.android.providers.settings/database?
 
Not for the "cd" command since that's a shell function and not a utility.

You use a "./" prefix when you want to execute the utility whose directory you are cd'd into (i.e., where you present working directory focus currently is).

So, assuming your adb (or even the sqlite3) utilities are in the /tmp folder, you might do something like this:

> cd /tmp
> pwd
/tmp
> ./adb devices
123456789abc123 device
>
​

Otherwise, if you're trying to invoke a utility / executable from another place, then you'd have to explicitly reference it or have it's location included in your $PATH environment variable.
 
Not for the "cd" command since that's a shell function and not a utility.

You use a "./" prefix when you want to execute the utility whose directory you are cd'd into (i.e., where you present working directory focus currently is).

So, assuming your adb (or even the sqlite3) utilities are in the /tmp folder, you might do something like this:

> cd /tmp
> pwd
/tmp
> ./adb devices
123456789abc123 device
>
​

Otherwise, if you're trying to invoke a utility / executable from another place, then you'd have to explicitly reference it or have it's location included in your $PATH environment variable.
So, All other commands stay the same except when it is adb and that is when ./ is used, if not just enter the commands as is? :confused:......:)
 
So, All other commands stay the same except when it is adb and that is when ./ is used, if not just enter the commands as is? :confused:......:)

No, it's not just adb, it's any "command" that is also a utility/executable file in and of itself.

The "cd" command is something that's built-in and understood by the shell (the program that you're typing the commands in/on/to) and there's no "cd" file to reference.

This is all related to the concept of relative vs. absolute paths:


but only comes into play if the "command" itself is a file (that's an admittedly confusing point since a file can indeed seem like a command).

You should be able to type the "help" command to see all of the built-in commands for the Linux (or Mac) shell your using (and you'll see the "cd" command is one of them).

Cheers!
 
Back
Top Bottom