Android Question [Solved] Auto Update Apk signed with rom Key

Lello1964

Well-Known Member
Licensed User
Longtime User
I have a signed rom apk developed with B4A.

After compiling i must sign apk with rom signature to use internal RS-232 and GPio, and work well.
This apk is installed via ADB, cannot be installed using B4A bridge.
I have a problem to auto-update Apk, i have tryed AppUpdating 2.0 LIB

It work well only if apk isn't signed.
After Sign when it try to install generate an install error.


I have found this :
https://developer.android.com/guide/playcore/in-app-updates#java

someone have tryed it ?

or have more information about auto update signed rom ?

Thanks
 

Lello1964

Well-Known Member
Licensed User
Longtime User
Which error?

Are you able to install the signed APK with ADB?

this is my device:
http://wiki.friendlyarm.com/wiki/index.php/NanoPC-T2

this is Android develop information :
http://wiki.friendlyarm.com/wiki/index.php/FriendlyThings

to able to accss /dev/ttyAMA3 and GPio device i have to sign apk with platform signature using signak.jar :
java -jar ./signapk.jar platform.x509.pem platform.pk8 ./SerialPortDemo.apk SerialPortDemo-Signed.apk

i have this in manifest :
SetManifestAttribute(android:sharedUserId,"android.uid.system")

after compiled and externally signed Apk if i try to install using :
ADB install -r myapk-signed.apk

it start and work well

I have to remote update apk without using playstore.

If i put updated version of apk in download folder and try to install using FileManager have this error :


App not installed.
The package conflicts with an existing package by the same name.


but is the same apk with same name and sign

installing using ADB :
ADB install -r myapk-signed.apk
installation Ok

who can help me?
 
Upvote 0

Lello1964

Well-Known Member
Licensed User
Longtime User
I think that problem is this line in manifest :
SetManifestAttribute(android:sharedUserId,"android.uid.system")

if i try compile ad install apk use B4A have this error :

adb: failed to install PagAmico_RAPID_DEBUG.apk: Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE: Package couldn't be installed in /data/app/pagamico.app.apk-1: Package pagamico.app.apk has no signatures that match those in shared user android.uid.system; ignoring!]

if i remove it from manifest app will be installed and run, but i can't access to /dev/ttyAMA3 and GPio device

 
Upvote 0

Lello1964

Well-Known Member
Licensed User
Longtime User
I have to access to /dev/ttyAMA3 and GPio device, to have rights i compile Apk, but doesn't install it, then sign apk with Rom signature :
java -jar ./signapk.jar platform.x509.pem platform.pk8 ./SerialPortDemo.apk SerialPortDemo-Signed.apk

then install apk use adb and it work well

My problem is update apk using auto-update or Play store.
i can't install it

if i install new version using :
ADB install -r myapk-signed.apk

installation havn't problem.
 
Upvote 0

Lello1964

Well-Known Member
Licensed User
Longtime User
I've solved, some service are still working during installation.

using StopService before installation it work.
 
Upvote 0
Top