mknod in Android
mknod
- Android provides mknod() api (unistd.h) , but not provides mknod execution file.
- download the mknod.c from mknod.c
- There are two way to let the mknod work
- Build with toolbox (system/core/toolbox)
- change the mknod.c main function name to mknod_main
- Modify the Android.mk
TOOLS :=\
.... \
mknod
- build android, then redownload the system.img and userdata.img
- Create a new appliation
- You can crate a new application in externel folder - mknod
- Copy the mknod to new folder
- Create a Android.mk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= mknod.c
LOCAL_MODULE := mknod
include $(BUILD_EXECUTABLE)
- Build through NDK by using, ndk-build -C
No comments:
Post a Comment