How to build factory images: Do a normal build prep, then in the ANDROID_TOP_DIR run: $ make -j24 dist $ cd out/dist/ $ . ../../device/linaro/hikey/factory-images/generate-factory-images-package.sh # Package with an existing image # First download the image to the android build top directory $ device/linaro/hikey/factory-images/generate-factory-images-package.sh