在插入Android之前存储设备列表
ls /dev/ > dev_list_1.txt
然后在插入后运行它
ls /dev/ | diff --suppress-common-lines -y - dev_list_1.txt
结果应该是这样的:
libmtp-2-1.2 <
sdb <
serial <
sg2 <
ttyACM0 <
甚至监控变化
while sleep 1 ; do clear ; ls /dev/ | diff --suppress-common-lines -y - dev_list_1.txt ; done