Direct Build Output to a Logfile

When developing Android ROMs and other system images, sometimes it is useful to look at the output of the compile process. It can help one understand the build process better or track down issues, especially if the build is failing for a reason that isn’t immediately apparent. However, the process can rapidly generate many lines – impossible to keep up with!

To direct the output to a log file while still being able to see the build process, use the following command line wizardry.

 

make otapackage | tee ~/compile.log

 

A bar “|” will direct the output of a command, while tee writes that output to compile.log located in the user’s home directory. Now it can be read at a leisurely pace.

 

Have fun!

Leave a Reply

Your email address will not be published. Required fields are marked *