Skip to content

opersys/raidl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reverse AIDL tool

This command extends the AOSP and has to be built inside it. To build raidl, copy it or link the repository into the "external" directory of your AOSP source. Then go to that directory (assuming you've run envsetup.sh and lunch):

$ cd external/raidl/
$ mm
$ m snod

You can then reflash and/or restart and you can use "raidl" on the command line.

How it works

raidl mainly uses Java reflection on services' interfaces to obtain the list of methods supported by a given system service's interface. Reflection allows us to obtain the Binder transaction IDs and the methods they correspond to because the format of the code generated by the 'aidl' tool has a consistent pattern. All services using an aidl-generated interface should work just fine with raidl. We also had to include some quirks for a few well known services, most notably 'activity', because the AOSP doesn't necessarily include an AIDL file for each and every system service

Example output

# raidl iface alarm

// Service: alarm, Interface: android.app.IAlarmManager
package android.app;

interface IAlarmManager {
    void set(int n1, long n2, PendingIntent p3);
    void setRepeating(int n1, long n2, long n3, PendingIntent p4);
    void setInexactRepeating(int n1, long n2, long n3, PendingIntent p4);
    void setTime(long n1);
    void setTimeZone(String s1);
    void remove(PendingIntent p1);
}
# raidl iface alarm -l
Class: android.app.IAlarmManager

   1	void set(int n1, long n2, android.app.PendingIntent p3);
   2	void setRepeating(int n1, long n2, long n3, android.app.PendingIntent p4);
   3	void setInexactRepeating(int n1, long n2, long n3, android.app.PendingIntent p4);
   4	void setTime(long n1);
   5	void setTimeZone(java.lang.String s1);
   6	void remove(android.app.PendingIntent p1);

Contributors