add finish() when device detached
re commit for apk
Revert "re commit for apk"

This reverts commit 7d5493a4212250ecd323423dbd5d8ecd184a0617.
test