Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.12 KB

File metadata and controls

42 lines (28 loc) · 1.12 KB

Languages: English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Français | Deutsch | Español | Italiano | Русский | العربية

← NeverC Examples

Android Kernel Netlink

Bidirectional netlink IPC channel. Creates a netlink socket for user↔kernel communication. Supports PING (returns PONG), VERSION (kernel version string), and ECHO (payload echo). Demonstrates nvk_nl_open, nvk_nl_reply, and dispatch-callback pattern.

Build

cd examples/android-kernel-netlink
neverc make

Change KERNEL to 515, 601, 606, 612, or 618 for other kernel versions.

Deploy & Run

neverc make run

Or manually:

adb push nvk_netlink.ko /data/local/tests/
adb shell su -c 'insmod /data/local/tests/nvk_netlink.ko'
adb shell su -c 'dmesg | grep nvk_netlink'

Unload

neverc make rmmod

Or manually:

adb shell su -c 'rmmod nvk_netlink'