Update adb.js - Fix issue when iterating the entries.

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