TThe -e directive initiates a connection to the Emulator, if there is only one emulator instance, otherwise it will throw an error

adb -d

adb -d shell

The -d directive initiates a connection to a Physical Android Device connected, if there is only one device connected, otherwise it will throw an error.

adb -s <device_serial_identifier>

adb -s <device_serial_identifier> shell

If there are multiple emulators, or multiple devices, or multiple of both connected, then the -s directive needs to be used to specify the specific “device/emulator” to connect to.

Installing and Uninstalling APKs

adb -e install <APK_file_path>

adb -e uninstall <package_name>

Errors when installing APKs:

INSTALL_FAILED_NO_MATCHING_ABIS

When the APK has native librariues that were built for a different architecture than what you are trying to run it on e.g. x86 and trying to run it on an ARM device, or built for ARM64 and trying to run it on ARM or x64; or ARM and trying to run it on x86 [1]