adopted to ndk-r9