Closed ghost closed 5 years ago
Please see the android guide here: https://source.android.com/devices/tech/ota/sign_builds It gives step by step instructions.
Also, why is there eng in aosp_f5121-target_files-eng.host when I chose the build to be a user BUILDTYPE, does this mean it's an eng BUILDTYPE?
If you do a build without setting the variable BUILD_NUMBER
, then the string "eng" is used to indicate that this an engineering build (it has nothing to do with the "eng" build type):
https://android.googlesource.com/platform/build/+/master/core/version_defaults.mk#307
In the Sony tree, the variable PRODUCT_DEFAULT_DEV_CERTIFICATE
is set so that the keys under vendor/oss/release-keys
get used (this is why you see "dev-keys" in the build fingerprint):
https://github.com/sonyxperiadev/device-sony-common/commit/89d7e032c61daedc9c8936f816ec667be1fafec9
There really isn't much point to setting PRODUCT_DEFAULT_DEV_CERTIFICATE
, however. I would like to see it dropped from the tree (it previously broke some re-signing operations).
The standard way to re-sign builds is given in the link provided by @chris42 .
I suspect you are either out of disk or memory.
Try re-running the "fec" command:
fec -e -p 0 out/target/product/suzu/obj/PACKAGING/target_files_intermediates/aosp_f5121-target_files-eng.host/IMAGES/system.img /tmp/tmpkYvC7K_verity_images/verity.img /tmp/tmpkYvC7K_verity_images/verity_fec.img
I think it is normal for userdata.img to be absent from the re-signed target-files zip (I recall reading something about that in the re-signing scripts). In any case, you don't usually need to flash the userdata partition. Note that you can wipe userdata using fastboot -w
.
re BUILD_NUMBER
: yes, you can set it using "export". It is usually assigned a number, e.g. export BUILD_NUMBER=42
.
@gerg5c42g542g2c54g52c you say you need 7 hours? I am very sorry to hear that. Look into ccache, it will at least speed up the C/C++ parts of the build.
And maybe think about getting an SSD and a new processor. A full build with no caches whatsoever takes ~3 hours for me, a partial rebuild is done in about 5 minutes, including signing and compression.
@ix5 the hardware makes the difference. At my site 3 hours are normal too. The code is on a SSD. The output is on an external USB 3 HDD. And my CPU is an i7-6700HQ (8 Threads) (ThinkPad) with 32GB DDR4 RAM.
If the hardware is slower, it's normal that it can take 7 hours.
A partial rebuild with warm caches shouldn't take 7 hours, that's what I meant.
@ix5 yes 5 minutes with 'make installclean' And 20-30 minutes if you remove the target folder.
@gerg5c42g542g2c54g52c You can try to change your ccache size again. Man, this breaks my heart to see you suffer ;)
prebuilds/misc/linux-x86/ccache/ccache -M 50G
Then check with prebuilds/misc/linux-x86/ccache/ccache -s
that it really got applied before you waste another bunch of hours.
Google didn't remove support for it, we are using it successfully.
EDIT: Regarding userdata, that file should only be full of zeroes, nothing to sign there.
Only -w will wipe the partition, leaving you with no filesystem. You will want to re-format it. fastboot format userdata
will do the trick for you.
How much RAM do you have?
@gerg5c42g542g2c54g52c try to disable HT or add another 8GB to reduce swap usage
From my experience you need 1.5-2GB RAM/ thread
I never tried to build with less than 16 on a 8 core (bare metal)
Not sure if a good idea. Possibly when the underlying release changes you will need make clean. I always ended up in a mess when just trying to rebuild after the android source release changed. Which is normally be monthly... right? cough @jerpelea ;-)
You should really consider upgrading to 16GB for your build. I never could make an Oreo build work properly with 8GB. Even with 16GB it sometimes fails if something else tries to get lot of memory. The thing when getting errors on low memory or a broken build is, that not always the corresponding error will be: out of memory. You will get errors that no one else can reproduce.
Only -w will wipe the partition, leaving you with no filesystem. You will want to re-format it.
fastboot -w
will format userdata and cache as well. See fastboot --help
.
@gerg5c42g542g2c54g52c: can this be closed?
redacted