Code Monkey home page Code Monkey logo

rilproxy's Introduction

Program to proxy packets transmitted between Android's native radio interfaces layer daemon (RILd) and the com.android.phone service. Traffic is intersected at the /dev/socket/rild UNIX domain socket and forwarded via UDP. Socket path and UDP port are configurable.

Additional control messages ensure that the RILd socket on the device providing the radio functionality is opened after the socket has been opened on the other device. This is required to ensure that the initial unsolicited startup message from RILd is received by the phone process.

A rudimentary Wirkeshark dissector for the protocol run on /dev/socket/rild is available in scripts/rilsocket.lua. To install it run the follwing steps:

  • Get the the Android RIL source by git clone https://android.googlesource.com/platform/hardware/ril
  • Generate ril_h.lua with ./scripts/convert_ril_h.py --output ril_h.lua /path/to/ril/source/.../include/telephony/ril.h
  • Copy ril_h.lua and rilsocket.lua to the Wireshark plugins directory (which can be found in Wireshark under Help->About Wireshark->Directories->Personal Plugins)

Shortcomings/future work:

  • Implement fragmentation for messages greater MTU (minus overhead)
  • Signal direction through a flag
  • Implement raw Ethernet transport in addition to UDP
  • Dissect multiple RIL packets in one UDP message
  • Dissect more protocol messages

(C) 2017, Alexander Senier [email protected]

rilproxy's People

Contributors

jklmnn avatar senier avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jklmnn jorsr

rilproxy's Issues

Handle connection reset properly

If rild gets no answer it closes its socket. Rilproxy ends up in a more or less endless loop trying to read from the closed socket. It should die instead and be restarted.

Wireshark: RIL socket statistics crash when empty

When no RILD traffic has been recorded, opening Telephony > RIL socket statistics results in a lua error:

Lua: Error During execution of Menu Callback:
[string "~/.wireshark/plugins/rilsocket.lua"]:1628: bad argument #1 to 'sort' (table expected, got nil)

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.