Wait for adb port to be available before starting

Can you abstract these steps so in the future we can add steps in to manipulate the device (stuff like the profile) while the process is not running?