Update adb.js

Every time you call entries.pop(), the entries.length minus 1.
We should check entries.length>0 as the end of loop.