Wajeb
Wajeb

Reputation: 83

Android Device Driver make node

I have a course project that involves setting up a device driver on Android. I have previously worked with device drivers in the Linux kernel and we used two commands to initialize the device and make a node: insmod and mknod

Now when I launched the emulator shell using adb shell, I was able to use insmod but mknod did not work. I have tried to find alternatives but was not lucky.

From what I know, mknod in the Linux kernel lists the device under the /dev directory and allows user programs to read/write to it by using its file ops.

So what is its alternative for Android?

Upvotes: 2

Views: 1806

Answers (1)

rakib_
rakib_

Reputation: 142625

Perhaps, the android device you're using don't have mknod command. It need to be supported from rootfs, usually Android rootfs are built using busybox. Most probably, mknod was dropped from busybox config. Possible option could be, use custom Android image where you've mknod installed.

Upvotes: 1

Related Questions