• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Sign 2 APK's with the same certificate

Reason is i have an apk which works as an installer. When the user installs and opens it, it prompts the user to install another apk (drm free) which was inside the installer apk. However, after signing and zipaligning both with APK Signer tool and Private keys i get this error when installing: an existing package by the same name with a conflicting signature is already installed

basically, both the apk (installer) and apk (theme) have the same package name. When the apk (theme) is installed, it should overwrite the apk (installer).

Any help on this would be greatly appreciated. I think both the installer apk and theme apk should have the same certificates in order to overwrite each other, but i don't know how.
 
dxgqv5.jpg


while that does work it doesn't get rid of the installer apk, it is suppose to overwrite it. I tried the higher and it only installed the theme, and left the installer installed as well.

The reason i am doing this is because, when put my paid theme on google play, which is a playerpro theme, when the user installs it after buying it, it crashes playerpro. I found out the problem is that when installed it installs it in the mnt/asec/ folder, and not the system/app/ directory where free apps go.

So someone made a installer, which when bought and the user opens it, asks to install the actual theme. That way, it puts it as a free app in the system/app directory. Basically both the installer apk is overwritten when the theme is installed because they have the same package name. So i am now trying to see if i can sign both the actualtheme.apk and Skin_Name_installer.apk with the same certificate so it overwrites it with no problem.

So the directory is like this right now:

Skin_Name_Installer.apk
\ assets
\ actualtheme.apk

\ build
\ res
\ smali

I use the APK Signer to sign and zip align both the theme and installer.
 
downloaded stuff shouldnt go to /system/app, that is usually the prepackaged stuff that comes with the ROM.

if i download something, it doesnt go there, i have to package it in my rom, or have root to move it.

either way, you can specify where it installs to, but i doubt you could get it into system by default without having the signature, which would be a nightmare.

just so i know, did you write the installer, or just the theme?

what does your directory tree (in eclipse or whatever IDE) look like.

like /src, not /smali.

And, if you were to use it as an update, it would have to have the same certificate, thats how android identifies it as the same app, just an upgraded version.

Try having a look at how other people are handling themes for player pro. I've never done themes, just trying to help.
 
downloaded stuff shouldnt go to /system/app, that is usually the prepackaged stuff that comes with the ROM.

if i download something, it doesnt go there, i have to package it in my rom, or have root to move it.

either way, you can specify where it installs to, but i doubt you could get it into system by default without having the signature, which would be a nightmare.

just so i know, did you write the installer, or just the theme?

what does your directory tree (in eclipse or whatever IDE) look like.

like /src, not /smali.

And, if you were to use it as an update, it would have to have the same certificate, thats how android identifies it as the same app, just an upgraded version.

Try having a look at how other people are handling themes for player pro. I've never done themes, just trying to help.

The themes i put out for free go to /data/app/

You are correct, only system files go to /system/app/

What i am trying to do will work if i can only sign both apks with the same certificate so when it installs the theme it would overwrite the installer apk.
 
Back
Top Bottom