Installation error: INSTALL_FAILED_INVALID_INSTALL_LOCATION

Install APK in the background

Git Hub: source code

google-certificate.keystore present in the certificate folder [See above git link]

Step 1: I run the code in the emulator, it works fine [but I need to place this google-certificate.keystore location in custom debug caching [which is present in Eclipse → Windows → Preference → Android → bulit]

Step 2: if I did not specify the location that he gave java.lang.reflect.InvocationTargetException

if I plug in the developer cable and run it on my Android device

if I follow step 1, it gives Installation error: INSTALL_FAILED_INVALID_INSTALL_LOCATION in the console window

if I follow step 2, it installs on the device but gives the same Exception

Edit:

Signed Guide APK

here is the step to create the apk file, but I do not want me to enter this command

Edit: added Manifest.xml

  <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yal" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <uses-permission android:name="android.permission.INSTALL_PACKAGES"/> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".InstallInBackgroundSample" android:label="@string/title_activity_main" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> 
+4
source share
1 answer

The blog blog itself posts this in the comments:

Hi guys, I found a problem, and unfortunately my news is not very good. I found that this method only works for me, because I use the simulator security certificate (the same certificate that my device uses in my case). I researched and saw that there are two ways to use the API: - Pre-install the application in the system folder on the ROM - Compile your application using the manufacturer's security certificate So it will be useful for you if you make the application on a specific device, and you have his certificate, like me. I apologize for not reporting this before, but I did not know this. I update my post and warn about it first. Thank you for your feedback.

What you want is no longer possible without a phone manufacturer or root device certificate.

+1
source

Source: https://habr.com/ru/post/1447480/


All Articles