integrate libadb.js changes from upstream repo