I have solved this problem by using adb status-window
to continuously check for device status, and when a new device is connected, the required files are transferred to the computer using adb pull
command.
In order to achieve a portable solution (i.e. to run independently of Android platform), I just copied the files 'adb.exe' and 'AdbWinApi.dll' into my application and used the adb from there.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…