Last Comment Bug 611648 - Can't install sutAgentAndroid.apk from tests package alongside Fennec build
: Can't install sutAgentAndroid.apk from tests package alongside Fennec build
Status: RESOLVED FIXED
:
Product: Testing
Classification: Components
Component: General (show other bugs)
: unspecified
: ARM Android
: -- normal (vote)
: mozilla12
Assigned To: Aki Sasaki [:aki]
:
:
Mentors:
Depends on:
Blocks: 698425
  Show dependency treegraph
 
Reported: 2010-11-12 06:17 PST by Ted Mielczarek [:ted.mielczarek]
Modified: 2012-03-08 23:34 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments
fix sut signing (999 bytes, patch)
2011-12-12 19:22 PST, Aki Sasaki [:aki]
no flags Details | Diff | Splinter Review
replacing with a mq patch for easier checkin-needed (1.12 KB, patch)
2011-12-12 19:53 PST, Aki Sasaki [:aki]
ted: review+
akeybl: approval‑mozilla‑aurora+
akeybl: approval‑mozilla‑beta+
akeybl: approval‑mozilla‑release+
Details | Diff | Splinter Review

Description Ted Mielczarek [:ted.mielczarek] 2010-11-12 06:17:44 PST
I grabbed a Fennec build from:
http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-central-android-r7/
and the associated tests package. However, I can't install both the Fennec build and the sutAgentAndroid.apk on the same device. No matter which I install first, when I go to install the second I get:
Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]
Comment 1 cmtalbert 2010-11-12 09:05:26 PST
That ain't right.  Those are supposed to both be signed with the same key.  You are sure that you uninstalled both apk's on the device before you started installing?
Comment 2 Ted Mielczarek [:ted.mielczarek] 2010-11-12 10:36:46 PST
Yeah, I uninstalled both. I can install one at a time, but not both.
Comment 3 Aki Sasaki [:aki] 2010-11-12 15:50:31 PST
I ran into this a while back.

Setting JARSIGNER during make build breaks building SUT.
Setting JARSIGNER during make package is what tells us how to sign the build with the nightly key.

SUT packages during make build and not during make package.

So I think what needs to be done is for us to be able to build SUT with JARSIGNER set (like in make package) or for the packaging of SUT to happen in make package (or make package-sut) with JARSIGNER set.
Comment 4 Alex Pakhotin (:alexp) 2011-01-03 12:47:30 PST
I had the same INSTALL_FAILED_SHARED_USER_INCOMPATIBLE error when I tried to install Fennec recently. I believe it happened after I had Firefox installed from Android Market.

I uninstalled all the copies of Firefox and Fennec I had, but still got this error and could not install Fennec anymore.
After some investigation I found a trace of our shared user ID in the file /data/system/packages.xml:
<shared-user name="org.mozilla.sharedID" userId="10075"> ... </shared-user>

I edited the file manually - deleted this "<shared-user />" XML element, and it looks like this fixed the problem.

A couple notes:
1. You need root access to be able to open and edit this file.
2. After you've changed the file, and the changes are written to the storage memory (use "sync" command to flush the disk buffer), you may need to remove the battery to reboot the device, because normal shutdown seems to overwrite your changes, adding that wrong "shared-user" back to the XML.
Comment 5 Bob Moss :bmoss 2011-10-18 11:35:20 PDT
The problems are probably the FenCP and/or FfxCP packages. They still have the shared ID's in them for testing nightlies. If you remove them via adb it should clear up the mismatch. Note: without the FenCP and/or FfxCP content providers installed, you cannot access files, etc ... in the fennec/firefox mobile directories.
Comment 6 Aki Sasaki [:aki] 2011-12-12 19:22:31 PST
Created attachment 581145 [details] [diff] [review]
fix sut signing

We'd still need to set JARSIGNER for the build step, but this would fix SUT signing =P
Comment 7 Aki Sasaki [:aki] 2011-12-12 19:26:55 PST
This doesn't strictly block bug 698425, but:

* we have to do a bit of hackery to get JARSIGNER set for the build's |make package| but not for the |make build| (it fails out because of this bug), and
* I'll have to do even more hackery to set JARSIGNER for the android single locale repacks without also setting it for the build.

I'd rather have this land and just set JARSIGNER by default for all android builds/repacks.
Comment 8 Aki Sasaki [:aki] 2011-12-12 19:53:27 PST
Created attachment 581158 [details] [diff] [review]
replacing with a mq patch for easier checkin-needed
Comment 9 Aki Sasaki [:aki] 2011-12-16 13:41:14 PST
Clint: ping? This is basically replacing two spaces with a tab in a Makefile.
Comment 10 cmtalbert 2011-12-19 08:01:11 PST
(In reply to Aki Sasaki [:aki] from comment #9)
> Clint: ping? This is basically replacing two spaces with a tab in a Makefile.

Sorry, not sure how this fell through the cracks again :(

It looks fine.  Do you need me to check this in for you?
Comment 11 Aki Sasaki [:aki] 2011-12-19 09:11:43 PST
(In reply to Clint Talbert ( :ctalbert ) from comment #10)
> (In reply to Aki Sasaki [:aki] from comment #9)
> > Clint: ping? This is basically replacing two spaces with a tab in a Makefile.
> 
> Sorry, not sure how this fell through the cracks again :(
> 
> It looks fine.  Do you need me to check this in for you?

Yes, please.  This bug will take a buildbot patch to fix (to set JARSIGNER for the |make build| step), but I can't land that before the makefile patch lands, or the tree will burn.
Comment 12 cmtalbert 2011-12-20 09:37:05 PST
Landed on m-c, unforunately missed the aurora merge so we will have to push to aurora specifically if we need it there.

Landed as: https://hg.mozilla.org/mozilla-central/rev/a0d32d0353e1

Please help watch the tree.
Comment 13 John O'Duinn [:joduinn] (please use "needinfo?" flag) 2012-02-02 19:02:42 PST
Comment on attachment 581158 [details] [diff] [review]
replacing with a mq patch for easier checkin-needed

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):
String changes made by this patch:

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):
String changes made by this patch:

This fixes a signing bug which blocks robocop testing for mobile. 

Its NPOTB, low risk (replace-two-spaces-with-a-tab-in-Makefile) and its already in m-c since 20dec2011. We need it on aurora, beta, and in case of a future chemspill, also on release.
Comment 14 Alex Keybl [:akeybl] 2012-02-05 13:53:41 PST
Comment on attachment 581158 [details] [diff] [review]
replacing with a mq patch for easier checkin-needed

[Triage Comment]
Approved for all branches since this is NPOTB.
Comment 15 cmtalbert 2012-02-15 10:12:28 PST
Landed on beta: https://hg.mozilla.org/releases/mozilla-beta/rev/4bbb33c561c3

Alex are there any additional flags I need to set?
Comment 16 Justin Wood (:Callek) 2012-02-27 15:37:51 PST
(In reply to Clint Talbert ( :ctalbert ) from comment #15)
> Landed on beta: https://hg.mozilla.org/releases/mozilla-beta/rev/4bbb33c561c3
> 
> Alex are there any additional flags I need to set?

Yes: Status-firefoxN:fixed
Comment 17 Justin Wood (:Callek) 2012-03-08 23:34:53 PST
http://hg.mozilla.org/mozilla-central/rev/a0d32d0353e1

Note You need to log in before you can comment on or make changes to this bug.