Chapter 8: Projects

When you are working more than once on the same file you will probably be interested in not losing your comments, flags, xrefs analysis and so.

To solve this problem, radare implements 'project' support which can be specified with the '-p' flag. The project files are stored in '~/.radare/rdb' by default which is configured in 'eval dir.project'.

The 'P' command is the one used inside the core to store and load project files. It also can information about the project file.

These files are just radare scripts with some extra metadata as comments ';' or '#'.

If you want to make a full analysis when opening a file try setting 'e file.analyze=true' in your .radarerc. It will run '.af* @@ sym.' and more..

Once the program is analyzed (there is no difference between opening the program as a file or debug it) you can store this information in a project file:

$ radare -e -e file.flag=1 -e file.analyze=1 -d rasc
[0x4A13B8C0]> P?
 Po [file]  open project
 Ps [file]  save project
 Pi [file]  info
[0x4A13B8C0]> Ps rasc
Project saved

[0x4A13B8C0]> Pi rasc
e file.project = rasc
e dir.project = /home/pancake/.radare/rdb/
; file = /usr/bin/rasc

This database is stored in:

$ du -hs ~/.radare/rdb/rasc

Now you can reopen this project in any directory by typing:

$ radare -p rasc

And if you prefer you can debug it.

$ radare -p rasc -d

The path to the filename is stored inside the project file, so you dont have to bother about typing it all the time.

The user will be prompted for re-saving the project before exiting.