Search code examples
androidapkandroid-install-apk

How to fix Unknown sources error during App install?


Created an App in android studio. While try to install it in real device. I am getting an error "For Security, your phone is set to block installation of apps obtained from Unknown sources."

I removed this error by going to setting and enabled install from Unknown sources. After that app get installed.

Question:
1) How can i make this app as trusted known source for installation without making Unknown sources option enabled.

Even i tried to create a signed APK in android studio. But Still real device is reporting as Unknown sources.

Can someone help me to make App as trusted known source?


Solution

  • All apps outside of Google Play Store will get the Unknown Source Error.

    You must upload your apk file to your google play developer console and user must download your app via Google Play. Otherwise user should enable the Unknown Sources checkbox from the settings in order to install the app.

    When you sign your application, you will prevent from tampering the original source and when the attacker tampered your application and signed it with his key OS will alert the user to uninstall the app and install the fresh version to prevent data hijacking. But this still doesn't make the app as trusted app.

    Hence all the apps, signed or unsigned, outside the Google Play Store are considered as app from unknown source.