Migrate from self-built (
dev-key) or Official Release from https://download.lineageos.org/, to our self-signed builds, RETAINING DATA!!! and avoid the annoying error:
Can't install this package on top of incompatible data. Please try another package or run a factory reset
repo start nokey frameworks/base vendor/cm cd frameworks/base git apply ../../android-framework-base.patch git commit -a -m "nokey" cd vendor/cm git apply ../../android-vendor-cm.patch git commit -a -m "nokey" cd ../..
Then start a build. And sign as Lineage tutorial.
mka target-files-package dist
Afterwards, look at the
keys_migration.sh below, taken unchanged from LineageOS.
uncert.py to get your certificates' hexdump. (Assuming your certificates in
export KEYPATH=~/.android-certs uncert.py $KEYPATH/*.pem
and fill the output into
release_cert variables of
Invoke command below to get certs' public keys.
ls $KEYPATH/*.pem | xargs -I% sh -c 'echo -n % && openssl x509 -pubkey -noout -in %'
and fill them into
release_key. (and remove every
\n bcoz I'm too lazy to strip them...)
Then, IN RECOVERY, after decrypted and mounted /data partition, push your file to somewhere in your phone, then do it.
adb push keys_migration.sh /tmp/ adb shell /tmp/keys_migration.sh