Run a system app in android emulator - android

I've successfully created a keystore to sign system apps to be tested on android emulators. I can install the apk on a 6.0 image but got no luck on a 8.0 image. It fails with the message:INSTALL_FAILED_SHARED_USER_INCOMPATIBLE Package xxx.yyy.zzz has no signatures that match those in shared user android.uid.system. The keys that i used were the ones available on aosp-mirror github. Is there a way to sign an apk as a system app to be used on a 8.0 android emulator?

You should try to use an Emulator without Google API's or Google Play Services.

Related

Run Android wear app

I want to create an Android wearable app on Android studio. I have installed the apk file on mobile to test run it. I would like to know how I can run the same apk on wearable device.Also, apk file created on Studio is different for wearable and mobile devices. How can we run it? Thanks in advance!
As it mentioned at official website you need to create special package signed by release key. See more info about packaging here.
When developing, you install apps directly to the wearable like with handheld apps. Use either adb install or the Play button on Android Studio.
Note: The automatic installation of wearable apps does not work when you are signing apps with a debug key and only works with release keys.
During the development period, do not use release key for signing. Instead, you should build your app which would result in two apks, one for the phone and one for the wear device. Then install each of them separately on the corresponding device using adb or Android Studio. Make sure you are using the same package names for both apks.
When you are done with your development, then build the app with your release key; then the wear apk will be embedded inside your phone apk and installation of your phone apk on a phone will result in the installation of the embedded wear apk on the wear device (make sure you remove the dev apks from both devices prior to this step otherwise installation will fail due to different keys).
Trying to debug through Android Studio as suggested by Julia and Ali, but it is always showing me Parse error while installing or running the code.
I have created a project for both mobile and wear. While running for mobile it works fine in the mobile device but while running the code in the wear it always shows Parse error.
I am using Moto 360 for running and debugging.

Delphi XE6 App Crash when installed from Google Play Store

Yesterday I created an Android app using Delphi XE6, built it with Release configuration and targeted App Store, and ran deployment without installing to any device.
I then uploaded the resulted APK to Google Play Store with success, but when the app downloaded and installed on my device (ZTE N986D), it crashed.
THE SAME APK downloaded to the device via http server running on my laptop was fine and working without any error/crash.
I did triple checks everything (debug/release mode, provisioning, deployment files, etc.) with no luck. I also did try on 3 differend Android devices with exactly same result.
For now I believe that this is not a bug on Delphi XE6.
Is an APK getting changed when uploaded to Google Play Store?
Here is link to the app:
https://play.google.com/store/apps/details?id=org.cenadep.pnup.qrkasir
Any help and thought would be appreciated.
1) You need to generate a keystore for sign your APK.
Please follow this link to create a keystore: http://docwiki.embarcadero.com/RADStudio/XE6/en/Creating_a_Keystore_File
2) After, follow this: http://docwiki.embarcadero.com/RADStudio/XE6/en/Deploying_Your_Signed_Android_Application

Re-installation failed (YES) Package already exists

So, I have an app which I am running on real device. When running the app the following dialog is shown.
Clicking Yes is followed by error in Console
- google-play-services_lib] Installation error! The package already exists.
- Launch failed on device:
I have tried uninstalling app from my phone but didn't work.
Any idea how to fix it?
You dont need to reinstall google-play-services. It's updating automatically by Play Market.
I had problems like yours and let me guess:
when you debuging app from eclipse - google play services doesnt sign in, but when u release it and download from play market - it works fine.
If its true, so mark your google-services as a library and delete from "java build path" in your app.
right click on project-> Properties -> Java Build Path -> Projects
Delete google-play-services from there
Now, you have to obtain debug certificate SHA1
in Eclipse go to Window->Preferences
Andoid->Build
(there you can find debug certificate SHA1 for debuging)
Go to Android Developper Console https://play.google.com/apps/publish
Select your game in Play service
Go to "linked applications"
Create a NEW linked application android and put it your debug certificate SHA1
Wait a few to changes be deployed
You will get two similar links, but with different SHA1 ( one for debugging, second for releasing)
Now, you need to clear the Android Application cache before trying to connect
Clear cache of your application
Launch your app
I solved my problem like this
That's caused by attempting to install an apk maybe from the ide with debug keystore on a device that has the production apk with the production keystore. Just go into the phones app settings and uninstall the app. I get a few of these after I test the upgrade path from the beta store and then go back to developing with the ide.
try doing it through command prompt use:
adb uninstall PACKAGE_NAME
and see if it works
also try renaming the package name just to be sure.
I feel you are trying to install google-play-services.You don't need to update google play services.From the docs:
The Google Play services APK
The Google Play services APK contains the individual Google services
and runs as a background service in the Android OS. You interact with
the background service through the client library and the service
carries out the actions on your behalf. An easy-to-use authorization
flow is also provided to gain access to the each Google service, which
provides consistency for both you and your users.
The Google Play services APK is delivered through the Google Play
Store, so updates to the services are not dependent on carrier or OEM
system image updates. In general, devices running Android 2.3
(Gingerbread) or later and have the Google Play Store app installed
receive updates within a few days. This allows you to use the newest
APIs in Google Play services and reach most of the devices in the
Android ecosystem (devices older than Android 2.3 or devices without
the Google Play Store app are not supporte

Android APK with google maps is not installing in device

I have created android application with google maps API and working fine when I run from IntelliJ IDE (running in connected device). But when I try to install APK file on device I am getting "Unfortunately, Package installer has stopped" error.
Note: I've generated APK with default debug self signed certificate and this application used install before adding google maps.
Any one faced similar issue?
Your device is having the same app with different fingerprints. So it is not installing. Remove the old app and install new one.

How to install newer test version of my installed android app without uninstalling it?

I have my application in Google Play, I've downloaded and installed it on my phone.
I'm also currently working on update of this application, and whenever I want to install my .apk file on my phone it shows me, that I can't do it, because the app is already here.
Where in Eclipse can I set some settings, which will allow me to install my updated app without installing original one?
EDIT
I want to have two versions on my device at the same time.
One simple solution is to change the package name, since that's how the OS identifies the .apk. Indeed, the package is unique to the Market: how does an android phone(or market) recognize an app
You can not install and run the app from eclipse because the app installed on the device (the one from play store) is signed with a different key.
When you export your app you sign the apk with a specific key and when u run it from eclipse you sign it with a different key - the debugkey.
If you HAVE to install another version on the device without uninstalling the old one from the device (the one you got from the play store) you should:
1.export your app and sign it with the same key you signed the app you uploaded to the play store.
2.upload the exported apk to the device.
3.install it.
EDIT:
If you want to versions on the same device you should change the app package name.

Categories

Resources