4

I'm trying to use some of the private API's in iOS private frameworks. But i'm not able to find the function prototype in order to know the number of parameters and datatypes of the parameters to be passed to the API. I'm trying to use some of the open source decompilation framework eg http://www.radare.org/y/ becasue they claim the below feature

//------------------------------

Code analysis at opcode, basicblock, function levels embedded simple virtual machine to emulate code keep track of code and data references function calls and syscall decompilation function description, comments and library signatures

//------------------------------

I tried generating r2 file using there objc.pl script. But i'm not able to proceed beyond that

Any help would be appreciated

Avinash
  • 823
  • 1
  • 7
  • 18
  • 1
    http://stackoverflow.com/a/2336679/834998 – Greg Oct 02 '14 at 15:09
  • @PartiallyFinite Using this tool i'm able to disassemble the framework file but not able to get the function prototype(in order to know the number of parameters and their data type ) – Avinash Oct 02 '14 at 15:24

1 Answers1

1

You can use the class-dump utility to generate complete header files (including private API) for a static library:

class-dump -H LibraryFile
Greg
  • 9,068
  • 6
  • 49
  • 91
  • Tried this method and yes it does extract the header files. But the one API which i have already used in a private framework is missing when i extract the headers using class-dump. And also one more question is. How to decompile the header files since many of the functions in the header files is of the type (void). – Avinash Oct 03 '14 at 09:26
  • @Avinash read the `class-dump` documentation. It has plenty of other options that you can use to get what you want. – Greg Oct 03 '14 at 09:29
  • https://github.com/Cykey/ios-reversed-headers/blob/master/SpringBoardServices/SpringBoardServices.h Do u have any idea how he got these. When i use class-dump i could not get any of these info. i'm new to this. – Avinash Oct 03 '14 at 09:47