Port from JStock Android