Stack Overflow archive
0 scoreaccepted

google play referrer and localy installed app referrer

score
0
question views
402
license
CC BY-SA 3.0

You will not be able to use the pm command with your application UID; you need to be root (0) or shell (2000). This may be why you are getting a permission denied error.

I successfully set the installer package name with the following command:

java
pm install -i com.test.installer -r filename.apk

Tested to make sure Android accepted the installer name:

bash
adb shell su -c "grep com.test.installer /data/system/packages.xml"

<package name="test.app" codePath="/data/app/test.app-1.apk" nativeLibraryPath="/data/app-lib/test.app-2" flags="572998" ft="14a75b0a2f0" it="14a6c2e5459" ut="14a75b0a584" version="1" userId="10215" installer="com.test.installer">

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.