I am building AOSP and I want to sign the build with my own key. There is some official doc about this process here.
But I wonder if I can simply turn around all of that
One suggestion:
If you don't want to keep your private keys in source control together with the aosp code, you can define a path to them in your device mk:
PRODUCT_DEFAULT_DEV_CERTIFICATE := /home/my_user/release_keys_folder/releasekey
PRODUCT_VERITY_SIGNING_KEY := /home/my_user/release_keys_folder/verity