Tips for building Replicant

Build errors

On a less powerful build host, the following build error can happen:

target Java: org.cyanogenmod.platform.sdk (/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes)
javac: file not found: /home/replicantbuilder/replicant-6.0/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/
Usage: javac <options> <source files>
use -help for a list of possible options
build/core/ recipe for target '/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes-full-debug.jar' failed
make: *** [/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes-full-debug.jar] Error 41

This can be fixed by building the specific target that fails:

mka org.cyanogenmod.platform-res

Cleaning up

Sometimes, you may want to start over again from the point where either nothing is built yet or only parts are already built. A reason could be that you are facing errors that didn't happen before.

make targets

To remove everything, including the toolchain build, run

make clobber

If you want to keep the toolchain, but all binaries for the target device and all compiled host tools should be deleted, run

make clean

If only the built toolchain should go away, run

make tcclean

Signing keys

Keys for signing the images can be deleted with

rm -r vendor/replicant-security

This can be helpful when there are issues with the sign-build script. The keys will be regenerated the next time the sign-build script runs. Please note that a factory reset on the device is needed when the images are signed with new keys.