ziyann / uevent-view Goto Github PK
View Code? Open in Web Editor NEWUevent monitor based on https://github.com/yangh/code-slices/tree/master/tools/uevent-view.
Uevent monitor based on https://github.com/yangh/code-slices/tree/master/tools/uevent-view.
Introduction ============ uevent-view is a debugging utility used to dump uevent messages from kernel space via netlink. Run === If required, push the executable to the device: adb push $OUT/system/bin/uevent-view /data/local/tmp adb shell chmod +x /data/local/tmp/uevent-view adb shell /data/local/tmp/uevent-view [proto] proto default: NETLINK_KOBJECT_UEVENT Run with given protocol type: adb shell /data/local/tmp/uevent-view 11 Referrence ========== kernel/lib/kobject.c kernel/lib/kobject_uevent.c kernel/include/linux/netlink.h kernel/include/uapi/linux/netlink.h Example ======= $ adb shell uevent-view remove @ /devices/system/cpu/cpu1/cpufreq ACTION = remove DEVPATH = /devices/system/cpu/cpu1/cpufreq SUBSYSTEM = cpu SEQNUM = 6153 offline @ /devices/system/cpu/cpu1 ACTION = offline DEVPATH = /devices/system/cpu/cpu1 SUBSYSTEM = cpu SEQNUM = 6154 change @ /devices/platform/msm_ssbi.0/pm8921-core/pm8921-charger/power_supply/usb ACTION = change DEVPATH = /devices/platform/msm_ssbi.0/pm8921-core/pm8921-charger/power_supply/usb SUBSYSTEM = power_supply POWER_SUPPLY_NAME = usb POWER_SUPPLY_PRESENT = 1 POWER_SUPPLY_ONLINE = 1 POWER_SUPPLY_CURRENT_MAX = 500 SEQNUM = 6155 Event notifications are logged to logcat as well. Avaliable NETLINK protocols ========================== #define NETLINK_ROUTE 0 /* Routing/device hook */ #define NETLINK_UNUSED 1 /* Unused number */ #define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ #define NETLINK_FIREWALL 3 /* Firewalling hook */ #define NETLINK_INET_DIAG 4 /* INET socket monitoring */ #define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ #define NETLINK_XFRM 6 /* ipsec */ #define NETLINK_SELINUX 7 /* SELinux event notifications */ #define NETLINK_ISCSI 8 /* Open-iSCSI */ #define NETLINK_AUDIT 9 /* auditing */ #define NETLINK_FIB_LOOKUP 10 #define NETLINK_CONNECTOR 11 #define NETLINK_NETFILTER 12 /* netfilter subsystem */ #define NETLINK_IP6_FW 13 #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ #define NETLINK_GENERIC 16 /* leave room for NETLINK_DM (DM Events) */ #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ #define NETLINK_ECRYPTFS 19 #define NETLINK_RDMA 20 #define NETLINK_CRYPTO 21 /* Crypto layer */ #define NETLINK_SOCKEV 22 /* Socket Administrative Events */
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.