【转载请保存链接,谢谢合作】------http://blog.csdn.net/qq_21972057/article/details/44038313
说在前面的话,可能会说的比较啰嗦,啰嗦是因为走得路太啰嗦..勿喷....
最近遇到一个不大不小的坑,我这边是做android机顶盒,有一个功能是做在识别U盘的内容,包括apk,音视频,图片等。不怎么暴力的测试小伙伴在拔出U盘的物理动作是,会概率性报错,(由于需求里面有获取apk的icon并且显示出来的功能),具体log如下:
<span style="font-family:Microsoft YaHei;">02-12 16:37:26.686 D/Vold ( 126): Volume sda1 state changing 4 (Mounted) -> 5 (Unmounting)
02-12 16:37:26.686 D/MountService( 476): sendStorageIntent Intent { act=android.intent.action.MEDIA_EJECT dat=file:///storage/external_storage/sda1 (has extras) } to UserHandle{-1}
02-12 16:37:27.686 D/Vold ( 126): Volume::unmountVol partitions=0x80000000 type=3
02-12 16:37:27.686 W/Vold ( 126): Failed to unmount /storage/external_storage/sda1 (Device or resource busy, retries 2, action 1)
02-12 16:37:27.836 E/ProcessKiller( 126): Process com.xx.xxx.xxxxx (771) has open file /storage/external_storage/sda1/antutu-benchmark-v560.apk
02-12 16:37:27.836 W/ProcessKiller( 126): Sending SIGHUP to process 771
02-12 16:37:27.956 I/ActivityManager( 476): Process com.xx.xxx.xxxxx (pid 771) has died.</span>
分析核心点,是因为Fail to unmount...
<