https://github.com/wearefractal/rover/blob/binary-protocol/lib/util.js
I will need to compile test cases for this from the APK. Help would be appreciated.
The decompiled output may not work the same as the bytecode in some of the more complex methods so I will have to rip the class from the JAR and do some tinkering at the bytecode level.