[Nook Color Android Development] HamNCheese:
Just a quick update on the current situation with Market and other oddities....

I'm having a lot of trouble nailing down how the permissions work with Gapps. The short version is, they are designed to be installed together, sharing a unix UID and a bunch of permisisons.

When I manually install a new Vending.apk (regardless of version, signature, etc), I get new entries in /data/system/packages.xml that are incomplete - they do not have the correct permissions attached, which is what causes the random force-closes.

Stock apk permissions from /system/app:

<updated-package name="com.android.vending" codePath="/system/app/Vending.apk" ts="1217592000000" version="1820" userId="10031">
<perms>
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH.sierraqa" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH.android" />
<item name="android.permission.DELETE_PACKAGES" />
<item name="android.permission.WRITE_EXTERNAL_STORAGE" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH.androidsecure" />
<item name="com.google.android.gtalkservice.permission.SEND_HEARTBEAT" />
<item name="android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED" />
<item name="android.permission.GET_ACCOUNTS" />
<item name="android.permission.CLEAR_APP_CACHE" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH" />
<item name="android.permission.READ_PHONE_STATE" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH.sierrasandbox" />
<item name="android.permission.MANAGE_ACCOUNTS" />
<item name="android.permission.ACCESS_DOWNLOAD_MANAGER" />
<item name="android.permission.GET_PACKAGE_SIZE" />
<item name="android.permission.WAKE_LOCK" />
<item name="android.permission.ACCESS_NETWORK_STATE" />
<item name="com.google.android.gtalkservice.permission.GTALK_SERVICE" />
<item name="android.permission.INSTALL_PACKAGES" />
<item name="android.permission.USE_CREDENTIALS" />
<item name="android.permission.ACCESS_CHECKIN_PROPERTIES" />
<item name="com.google.android.c2dm.permission.RECEIVE" />
<item name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<item name="android.permission.INTERNET" />
<item name="android.permission.READ_SYNC_SETTINGS" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH.sierra" />
<item name="android.permission.CHANGE_NETWORK_STATE" />
</perms>
</updated-package>

Invalid permissions from apk's installed from /data/app:

<package name="com.android.vending" codePath="/data/app/com.android.vending-1.apk" flags="1" ts="1304092213000" version="3002211" userId="10027">
<sigs count="1">
<cert index="41" key="308204a830820390a003020102020900b3998086d056cffa300d06092a864886f70d0101040500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3038303431353232343035305a170d3335303930313232343035305a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d003082010802820101009c780592ac0d5d381cdeaa65ecc8a6006e36480c6d7207b12011be50863aabe2b55d009adf7146d6f2202280c7cd4d7bdb26243b8a806c26b34b137523a49268224904dc01493e7c0acf1a05c874f69b037b60309d9074d24280e16bad2a8734361951eaf72a482d09b204b1875e12ac98c1aa773d6800b9eafde56d58bed8e8da16f9a360099c37a834a6dfedb7b6b44a049e07a269fccf2c5496f2cf36d64df90a3b8d8f34a3baab4cf53371ab27719b3ba58754ad0c53fc14e1db45d51e234fbbe93c9ba4edf9ce54261350ec535607bf69a2ff4aa07db5f7ea200d09a6c1b49e21402f89ed1190893aab5a9180f152e82f85a45753cf5fc19071c5eec827020103a381fc3081f9301d0603551d0e041604144fe4a0b3dd9cba29f71d7287c4e7c38f2086c2993081c90603551d230481c13081be80144fe4a0b3dd9cba29f71d7287c4e7c38f2086c299a1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900b3998086d056cffa300c0603551d13040530030101ff300d06092a864886f70d01010405000382010100572551b8d93a1f73de0f6d469f86dad6701400293c88a0cd7cd778b73dafcc197fab76e6212e56c1c761cfc42fd733de52c50ae08814cefc0a3b5a1a4346054d829f1d82b42b2048bf88b5d14929ef85f60edd12d72d55657e22e3e85d04c831d613d19938bb8982247fa321256ba12d1d6a8f92ea1db1c373317ba0c037f0d1aff645aef224979fba6e7a14bc025c71b98138cef3ddfc059617cf24845cf7b40d6382f7275ed738495ab6e5931b9421765c491b72fb68e080dbdb58c2029d347c8b328ce43ef6a8b15533edfbe989bd6a48dd4b202eda94c6ab8dd5b8399203daae2ed446232e4fe9bd961394c6300e5138e3cfd285e6e4e483538cb8b1b357" />
</sigs>
</package>

What is driving me totally insane is when I interrogate the apk, IT HAS THE CORRECT PERMISSIONS.

Can anyone shed some light on this? How the hell does it ignore the Manifest permissions when installing an "updated" market Vending.apk???? There is no clear way to install a separate version of Vending.apk on this hardware the "normal" way. So, we're going the alternate routes - it might take a bit longer, but it is what it is.