The default bug view has changed. See this FAQ.

[meta] Support for multiple simultaneous Fennec versions

NEW
Unassigned

Status

Android Background Services
Android Sync
5 years ago
4 years ago

People

(Reporter: rnewman, Unassigned, NeedInfo)

Tracking

(Depends on: 4 bugs, {meta})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sync:scale])

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
Linking bugs together.

https://wiki.mozilla.org/User:Anaaktgeboren/NativeSync#Android_Sync_behavior_with_multiple_Firefox_versions_installed
(Reporter)

Updated

5 years ago
Depends on: 757148
Depends on: 761682
(Reporter)

Updated

5 years ago
Depends on: 753002
(Reporter)

Updated

5 years ago
Depends on: 755181
(Reporter)

Updated

5 years ago
Depends on: 756716
(Reporter)

Updated

5 years ago
Depends on: 755638
Depends on: 764867
Created attachment 633324 [details] [diff] [review]
patch against m-i to support Android Sync with multiple Fennecs
Created attachment 633325 [details]
Build you an org.mozilla.firefox_beta!
Created attachment 633326 [details]
Build you an org.mozilla.firefox!
Might as well put this here.  See

https://github.com/mozilla-services/android-sync/tree/nalexander/multiple-Fennecs/

for a tree that uses android:sharedUserID and android:accountType, and apply the patch before building two branded Fennecs with the attached .mozconfig files.  Device testing works well for me.
from rnewman: Please verify when you get a chance that a differently signed app cannot access your credentials. 

Built and signed my own official:

~/Mozilla/mozilla-inbound/objdir-official/dist $ apkbuilder testuu.apk -v -z gecko.ap_ -f fennec/classes.dex -u

~/Mozilla/mozilla-inbound/objdir-official/dist $ cp testuu.apk testu.apk && jarsigner -keystore ~/Mozilla/nalexander-keystore testu.apk nalexander-keystore

~/Mozilla/mozilla-inbound/objdir-official/dist $ zipalign 4 testu.apk test.apk

Installed onto device:

$ adb install test.apk
899 KB/s (16630742 bytes in 18.056s)
	pkg: /data/local/tmp/test.apk
Success

You can't even install an APK that wants to share user ID but is not signed with the same key.  This is a debug signed beta:

$ adb install ~/Mozilla/mozilla-inbound/objdir-beta/dist/fennec*apk
976 KB/s (16618265 bytes in 16.616s)
	pkg: /data/local/tmp/fennec-16.0a1.en-US.android-arm.apk
Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

tl;dr: a differently signed app can't even be installed to access the Authenticator.
(Reporter)

Updated

5 years ago
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
(Reporter)

Updated

5 years ago
Depends on: 768467
Depends on: 769506
(Reporter)

Comment 6

5 years ago
Of note: we need to test very carefully the interaction between existing versions in each channel and versions after this feature lands.

We have to detect the difference between an upgrade (migrate prefs) and a new install which can see prefs (migrate but generate new values for client ID and timestamps...). Amongst other things.

Nick and I already discussed this, but leaving a note here for thoroughness.
(Reporter)

Comment 7

5 years ago
Note requirement from Bug 721760 Comment 39.
(Reporter)

Comment 8

5 years ago
Let's flip depends to blocks for reports…
For clarity: 

10:23 rnewman: I'd term these tiers "concurrent fennecs", "overlapping fennecs"
...
10:23 rnewman: overlapping fennecs with more than one possible account

Concurrent means multiple Fennecs (org.mozilla.fennec_whoami, org.mozilla.firefox) accessing different Android Account types.

Overlapping means multiple Fennecs (org.mozilla.firefox, org.mozilla.firefox_beta) accessing the same Android Account type and possibly the same Account object.
Depends on: 772645
Just a note: we may be to prevent multiple SendTabActivity's registering as Share intents by using the hack in

http://stackoverflow.com/questions/11370177/handle-nfc-intents-only-when-preference-is-set

We could, for instance, have the active AccountAuthenticator turn on the Send Tab intent for its SendTabActivity only when an Account is created; that might also prevent Send Tab showing up before Sync is set up.
(Reporter)

Updated

5 years ago
Blocks: 775880
Depends on: 777800
Depends on: 777973
Depends on: 722607
Depends on: 786390
Depends on: 786393
Truth in advertising: I am not actively working on these tickets.
Assignee: nalexander → nobody
(Reporter)

Updated

5 years ago
No longer blocks: 757121
(Reporter)

Comment 12

4 years ago
Nick, when you get a chance could you update the state of this bug?
Flags: needinfo?(nalexander)
Whiteboard: [sync:scale]
(In reply to Richard Newman [:rnewman] from comment #12)
> Nick, when you get a chance could you update the state of this bug?

I think is still a valid ticket, even though we don't intend to address this any time in the foreseeable future.  Therefore I've set this back to NEW.

To summarize where this cluster of bugs stands: Android Sync works well with multiple Fennec versions.  Release and Beta share a single Android account type; Nightly and Aurora share a different Android account type; and developer builds share another account type.  This all works well, but each Android account type is only allowed to have a single account.

The pieces of this bug address edge cases (Bugs 786390 and 786393) in this set up, and feature work to allow an Android account type to have multiple accounts of each account type (Bugs 722607 and 777800).  There are deep ties between profiles in Fennec and the latter feature work, and since multiple profiles in Fennec are not expected to be implemented at all, we have de-prioritized this work.

And that's how I spent my summer.
Status: ASSIGNED → NEW
Flags: needinfo?(nalexander)
(Assignee)

Updated

4 years ago
Component: Android Sync → Android Sync
Product: Mozilla Services → Android Background Services

Comment 14

4 years ago
I think this bug needs a priority bump since the multiuser feature of Firefox Mobile on tablets was introduced with Android 4.2.  

Sync stops working if one account on the tablet has a beta version and another has the production version.
(In reply to Kelley Cook from comment #14)
> I think this bug needs a priority bump since the multiuser feature of
> Firefox Mobile on tablets was introduced with Android 4.2.  
> 
> Sync stops working if one account on the tablet has a beta version and
> another has the production version.

Hi Kelley,

Can you tell me more about what exactly you did?

The way it works is: you should be able to create one single account from each of the following sets of versions: {release, beta} {aurora, nightly} {custom build}.  So you should not have been able to create two Sync accounts, one for beta and one for release.  A list of your accounts and their details, or a screenshot of the relevant Account settings screens, would be helpful.
Flags: needinfo?(R.Kelley.Cook)
You need to log in before you can comment on or make changes to this bug.