update myApp in '/system/app' failed with error code -7

25 views
Skip to first unread message

jack zhang

unread,
Nov 27, 2018, 2:10:20 PM11/27/18
to Android-x86
I have 'myAPP' in '/system/app' as part of the iso image.

After hard disk is created with iso image, 'myAPP' is installed and shows up in Home screen.

Now, I have a newer version 'myAPP', 'versioCode' and 'versionName' are changed in 'build.gradle' before generating the newer version APK.

When I try to install the newer version 'myAPP.apk' from FileManager, installer says fails. Logcat shows "D/InstallAppProgress( 2208): Installation error code: -7"

Few questions:

1) the APKs were generated from Android Studio Project's './build/outputs/apk/debug', so these are debug versions. Does it matter if it is debug or release?  Do they need to be signed ?

2) I think the installer is trying to install it to '/data/app' directory, is the update failed because there is a same app in '/system/app' ?


Michael Goffioul

unread,
Nov 27, 2018, 2:18:15 PM11/27/18
to andro...@googlegroups.com
1) the APK built by Android Studio must be signed with the same key as the one installed in the firmware; the key used by the app in the firmware depends on how you have injected it in the build process (typically the value for LOCAL_CERTIFICATE in the Android.mk that injects your app); but it's very likely that the update uses a different signature; you might want to install the app using "adb install -r /path/to/my/update/apk" to get a more meaningful error code

2) no, this is the way app update works: all app install, whether it's a new app or an update for an app on the firmware, ends up in /data/app


--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages