On my nougat device, I have downloaded an app from the playstore, which is running great. I then extract the apk from the installed app, and uninstall it and again successfully, with package installer. But the second time on app launch, it crashes. I have analyse both installation with apk analyzer. First one showing com.android.vending as installer and application source as "Google Play". Sideload installation showing com.google.android.packageinstaller and source Unkown.
My first thought is that developer doesn't want users to install the app from unknown sources to avoid MOD app or pirate release, etc., and is checking programatically for these parameter. I have decompiled to java but didn't find any clue where such a condition is begin checked and exception generated.
There is a permission BIND_GET_INSTALL_REFERRER_SERVICE, may be its causing crash. I know how to decompile and some smali editing and already change verifyinstallation method to true in smali but app still crashing.