Git Product home page Git Product logo

uevent-view's Introduction

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 */

uevent-view's People

Contributors

penguinyang avatar ziyann avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.