I compiled CyanogenMod 7 from source code, then tried to install ADWLauncher on my device:
$ adb install -r ./out/target/product/crespo/system/app/ADWLauncher.apk
4147 KB/s (1060312 bytes in 0.249s)
pkg: /data/local/tmp/ADWLauncher.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
Related question's answer says, that this means that package was not properly signed. But when I try to sign it - it fails, because the package is already signed. How can I sign it correctly?
There is line
LOCAL_CERTIFICATE := shared
in Android.mk. How can I override it with my own certificate?