Can't install sutAgentAndroid.apk from tests package alongside Fennec build

RESOLVED FIXED in Firefox 11

Status

Testing
General
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: ted, Assigned: aki)

Tracking

unspecified
mozilla12
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, firefox12 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
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

7 years ago
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?
(Reporter)

Comment 2

7 years ago
Yeah, I uninstalled both. I can install one at a time, but not both.
(Assignee)

Comment 3

7 years ago
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.
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

6 years ago
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.
(Assignee)

Comment 6

6 years ago
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
Attachment #581145 - Flags: review?(ctalbert)
(Assignee)

Comment 7

6 years ago
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.
Blocks: 698425
(Assignee)

Comment 8

6 years ago
Created attachment 581158 [details] [diff] [review]
replacing with a mq patch for easier checkin-needed
Attachment #581145 - Attachment is obsolete: true
Attachment #581158 - Flags: review?(ctalbert)
Attachment #581145 - Flags: review?(ctalbert)
(Assignee)

Comment 9

6 years ago
Clint: ping? This is basically replacing two spaces with a tab in a Makefile.
(Reporter)

Updated

6 years ago
Attachment #581158 - Flags: review?(ctalbert) → review+

Comment 10

6 years ago
(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?
(Assignee)

Comment 11

6 years ago
(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

6 years ago
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.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Assignee: nobody → aki
Target Milestone: --- → mozilla12
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.
Attachment #581158 - Flags: approval-mozilla-release?
Attachment #581158 - Flags: approval-mozilla-beta?
Attachment #581158 - Flags: approval-mozilla-aurora?
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.
Attachment #581158 - Flags: approval-mozilla-release?
Attachment #581158 - Flags: approval-mozilla-release+
Attachment #581158 - Flags: approval-mozilla-beta?
Attachment #581158 - Flags: approval-mozilla-beta+
Attachment #581158 - Flags: approval-mozilla-aurora?
Attachment #581158 - Flags: approval-mozilla-aurora+

Comment 15

5 years ago
Landed on beta: https://hg.mozilla.org/releases/mozilla-beta/rev/4bbb33c561c3

Alex are there any additional flags I need to set?
(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
status-firefox11: --- → fixed
http://hg.mozilla.org/mozilla-central/rev/a0d32d0353e1
status-firefox12: --- → fixed
You need to log in before you can comment on or make changes to this bug.