python: Enhance adb() and connect_device() to handle different device scenes