adb: split the adb file into 3 sections, core functions and tests. Also add in support for adb logcat, and allow for custom buffer sizes while reading