Skip to content

Commit

Permalink
first upload
Browse files Browse the repository at this point in the history
  • Loading branch information
narseo committed Sep 9, 2013
1 parent 2fc50fe commit 0121898
Show file tree
Hide file tree
Showing 3,231 changed files with 231,314 additions and 25 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
63 changes: 38 additions & 25 deletions README.md
@@ -1,4 +1,4 @@
#RILAnalyzer.
#RILAnalyzer tool

The rilAnalyzer is a set of android processes that provides cross-layer
monitoring tools for user-app-cell net interactions. It can be used to identify
Expand All @@ -8,47 +8,61 @@ purposes.
Implemente by:

_Narseo Vallina-Rodriguez_

ICSI-Berkeley and University of Cambridge
email: narseo@gmail.com

narseo@gmail.com

_Andrius Aucinas_

University of Cambridge

andrius.aucinas@gmail.com

_Yan Grunenberger_

Telefonica Research

yan@tid.es

Collaborators: Jon Crowcroft (University of Cambridge) and Dina Papagiannaki
(Telefonica Research). We would like to thank as well the help of Armando
Garcia-Mendoza (Telefonica Research) on an earlier attempt.

The current version only supports xgoldmon chipsets. See our IMC'13 paper for more details about its goals, features and limitations. [Paper] (http://www.cl.cam.ac.uk/~nv240/papers/imc117-vallina.pdf)
The current version only supports xgoldmon chipsets. See our IMC'13 paper for more details about its goals, features and limitations. [Paper] (http://www.cl.cam.ac.uk/~nv240/papers/imc117-vallina.pdf). If the tool is used for academic purposes, we would appreciate if you cite it.

Current instalation process is tedious due to OS permissions. See instructions
below. Please refer to the [System Overview](https://github.com/narseo/rilAnalyzer/wiki/System-Overview) for more detailed information on the rilAnalyzer architecture.
below. Please refer to the [wiki](https://github.com/narseo/ril_analyzer/wiki/) for more detailed information on the rilAnalyzer architecture. See logger process and networklog to see the structure of the different logging files (we will update that on the wiki soon).

#RILAnalyzer APK.
#RILAnalyzer APK

Android APK version for monitoring RNC events.
Android APK for monitoring RNC events. It directly polls the radio interface to
collect RNC state. This APK has to run as a system service because of Android permissions.

Runs as a background service launched on boot by the OS. Data output is written on /sdcard/ril_log.txt (can be customized)
Runs as a background service launched on boot by the OS. Data output is written on /sdcard/ril_log.txt by logger process (See below). The logging procedure be customized and quite improved.

It has to run as a system service because of permissions. Current version requires a background service (binary) that runs on the background. Logging features could be improved (see Networklog for details and how to save data asynchronously) and customised depending on your requirements.
#Networklog APK

#Networklog APK.
Traffic monitor app exploiting iptables _nflog_ feature. It collects mobile traffic at IP level. The current version is a customised extention of [PRAGMA Networklog] app (https://github.com/pragma-/networklog)

Traffic monitor app exploiting iptables nflog feature. It collects mobile traffic at IP level. The current version is a customised extention of: __ADD_URL__

It has to be launched by the user for the first time and then modify the app settings to launch it automatically on boot. Data output is written by itself on /sdcard/networklog.txt (can be customized).
This APK has to be launched by the user for the first time and then modify the app settings to launch it automatically on boot. Data output is written by itself on /sdcard/networklog.txt (can be customized).

It also makes sure that required processes (e.g. iptables flags) are set up correctly.

#Logger Binary

Binary (c) that runs in the background and reads UDP packets from RILAnalyzr and saves them on the SD Card.

Build using Android NDK.
Requires Android NDK for building it.

#Transparent proxy

Rudimentary transparent proxy to collect data using a transparent tun
interface. It was the first attempt before using networklog.

Requires Android NDK for building it. Use same process as logger binary to
install it on the phone and follow the steps described in the wiki to [set up
a tun interface on android] (https://github.com/narseo/ril_analyzer/wiki/How-to-create-a-transparent-proxy-with-a-tun-interface)

#Building and Instalation:

Expand All @@ -60,24 +74,23 @@ Create and import projects separately on Eclipse.

Remove Samsung Service Mode:

$adb shell mount -o rw,remount /system/
$adb shell rm /system/...
$adb shell mount -o ro,remount /system/
$adb shell mount -o rw,remount /system
$adb shell rm /system/app/SamsungServiceMode.apk
$adb shell mount -o ro,remount /system


Build logger process using Android NDK (with the right target). It is required for storing RNC events on /sdcard/. To install, move the binary to /system/ so it is automatically launched on boot:

$adb shell mount -o rw,remount /system/
$adb push SOURCE_LOGGER ...
$adb shell mount -o ro,remount /system/

$adb shell mount -o rw,remount /system
$adb push SOURCE_LOGGER /system/bin/
$adb shell mount -o ro,remount /system

Use ADB to put send APKs to mobile handset:

$adb shell mount -o rw,remount /system/
$adb push source_rilanalyzer_apk /system/...
$adb push source_networklog_apk /
$adb shell mount -o ro,remount /system/
$adb shell mount -o rw,remount /system
$adb push source_rilanalyzer_apk /system/app/
$adb push source_networklog_apk /system/app/
$adb shell mount -o ro,remount /system

Reboot handset:

Expand All @@ -91,4 +104,4 @@ $adb shell rm PATH_TO_APK/BINARY

The logging processes are very CPU and memory intense. The battery life of the handset can be negatively affected. The main problem is the lack of firmware and OS support. RIL events have to be polled directly from the OS.

For further details, please, do not hesitate to contact us.
For further details, suggestions and collaborations, do not hesitate to contact us.
8 changes: 8 additions & 0 deletions RILAnalyzer/.classpath
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
33 changes: 33 additions & 0 deletions RILAnalyzer/.project
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>RilLogger</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
4 changes: 4 additions & 0 deletions RILAnalyzer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5
76 changes: 76 additions & 0 deletions RILAnalyzer/AndroidManifest.xml
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cl.narseo.rilLogger"
android:versionCode="1"
android:versionName="1.0"
android:sharedUserId="android.uid.phone">
<uses-sdk android:minSdkVersion="10" />

<protected-broadcast android:name="android.intent.action.SERVICE_STATE" />
<protected-broadcast android:name="android.intent.action.RADIO_TECHNOLOGY" />
<protected-broadcast android:name="android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED" />
<protected-broadcast android:name="android.intent.action.SIG_STR" />
<protected-broadcast android:name="android.intent.action.ANY_DATA_STATE" />
<protected-broadcast android:name="android.intent.action.DATA_CONNECTION_FAILED" />
<protected-broadcast android:name="android.intent.action.SIM_STATE_CHANGED" />
<protected-broadcast android:name="android.intent.action.NETWORK_SET_TIME" />
<protected-broadcast android:name="android.intent.action.NETWORK_SET_TIMEZONE" />
<protected-broadcast android:name="android.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS" />
<protected-broadcast android:name="android.intent.action.ACTION_MDN_STATE_CHANGED" />
<protected-broadcast android:name="android.provider.Telephony.SPN_STRINGS_UPDATED" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.REORDER_TASKS" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.DEVICE_POWER" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />
<uses-permission android:name="android.permission.BROADCAST_SMS"/>
<uses-permission android:name="android.permission.BROADCAST_WAP_PUSH"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.SHUTDOWN" />
<uses-permission android:name="android.permission.BACKUP" />
<uses-permission android:name="android.permission.USE_SIP" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<!-- This tells the activity manager to not delay any of our activity
start requests, even if they happen immediately after the user
presses home. -->
<uses-permission android:name="android.permission.STOP_APP_SWITCHES" />

<application android:label="@string/app_name"
android:process="com.android.phone" >
<service android:name=".RILMonitorService.java"
android:label="RILMonitorService.java"
android:process="com.android.phone"
android:persistent="true"/>

<receiver android:name=".SecretBroadcastReceiver"
android:process="com.android.phone"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<receiver android:name=".ExecuteReceiver"
android:process="com.android.phone"
android:permission="android.permission.WRITE_SECURE_SETTINGS">
<intent-filter>
<action android:name="com.cyanogenmod.SamsungServiceMode.EXECUTE" />
</intent-filter>
</receiver>
</application>
</manifest>

0 comments on commit 0121898

Please sign in to comment.