Snippets

Zhiwei Li mount cpuinfo

Created by Zhiwei Li
#include <sys/mount.h>
#include <stdio.h>

int main()
{
	
	int stat = mount("/system/lib/arm/cpuinfo", "/proc/cpuinfo",  0, MS_BIND,  0);
	printf("cpu info mount stat=%d\n", stat);	
	
	return 0;
}


/*
    
  /home/tim/Android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc \
     --sysroot=/home/tim/Android/android-ndk-r10e/platforms/android-16/arch-arm -fPIE -pie -O2 cpuinfo.c -o cpuinfo
     
*/

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.