Forum Visual Studio

Is it possible to recreate an APK signing certificate manually?

OsoBOsoB Member ✭✭✭
edited December 2020 in Visual Studio

I carried out Android development on a desktop with VS2019, generating successive ad-hoc APK files for installation. Unfortunately I've had to relocate overseas and set up a new development platform, bringing my development files and documentation with me, but not the machine. When I set up my certificate today using the exact alias name, input fields and password, the resulting APK file will not install over the top of the existing mobile app.

App not installed - An existing package by the same name with a conflicting signature is already installed

I realise why this is, but is there no other way to set up the certifcate without getting the originals from %appdata%\local\Xamarin\Mono for Android\Keystore?

Tagged:

Best Answer

  • jezhjezh Member, Xamarin Team Xamurai
    Accepted Answer

    App not installed - An existing package by the same name with a conflicting signature is already installed

    The problem is that the previous APK in your mobile was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.

    So, you can copy and use the previous signature to sign your app which don't need to bring your machine.

    Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

Answers

  • jezhjezh Member, Xamarin Team Xamurai
    Accepted Answer

    App not installed - An existing package by the same name with a conflicting signature is already installed

    The problem is that the previous APK in your mobile was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.

    So, you can copy and use the previous signature to sign your app which don't need to bring your machine.

    Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

  • OsoBOsoB Member ✭✭✭

    @jezh said:
    The problem is that the previous APK in your mobile was signed with a different key other than the one you are currently using

    Thanks for the clarification on this. It was more a question of whether I can do this without needing to recover the original certificate, but I can see that's not possible without access to the old machine. Many thanks.

Sign In or Register to comment.