implement some missing features ported from android x86 source