Expose Android getInstallerPackageName within Fennec

RESOLVED FIXED in Firefox 50

Status

()

Firefox for Android
General
P1
normal
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: rnewman, Assigned: sebastian)

Tracking

(Depends on: 1 bug, Blocks: 5 bugs)

Trunk
Firefox 50
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox45 affected, firefox50 fixed)

Details

(Whiteboard: [MobileAS])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
PackageManager.getInstallerPackageName returns the package that installed us. We can use this to determine if we were sideloaded or installed via Play (or Amazon, or F-Droid, or…).

This will allow us to tailor our updater behavior, amongst other things.

Things to check:

* Do we always get a package name on all Android versions?
* What happens when we're preinstalled but expect to be updated via Play?
* Does the package change each time an APK is installed? For example, is it null for the preinstall, then change to com.android.vending after the first Play update?
* Can it change back to null if a user sideloads after installing via Play?

We might consider exposing this value literally to Balrog in update checks.
(Reporter)

Updated

3 years ago
Summary: Expose Android install location within Fennec → Expose Android getInstallerPackageName within Fennec
(Reporter)

Updated

3 years ago
Blocks: 1221646
(Assignee)

Updated

3 years ago
Blocks: 1222538

Updated

3 years ago
Blocks: 1223534

Updated

2 years ago
Blocks: 1226206
(Assignee)

Updated

2 years ago
Blocks: 1241114
(Assignee)

Comment 1

2 years ago
I wonder if we could use Telemetry to get an idea of what getInstallerPackageName() returns for devices in the wild. Is this feasible?

(In reply to Richard Newman [:rnewman] from comment #0)
> We might consider exposing this value literally to Balrog in update checks.

Could we use this to get the same statistics?
(Assignee)

Comment 2

2 years ago
(In reply to Sebastian Kaspari (:sebastian) from comment #1)
> I wonder if we could use Telemetry to get an idea of what
> getInstallerPackageName() returns for devices in the wild. Is this feasible?

Seems like rnewman already filed this: bug 1221646
(Assignee)

Updated

2 years ago
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
(Assignee)

Comment 3

2 years ago
Created attachment 8774689 [details]
Bug 1220773 - Do not run our updater if app was installed from Google Play.

Review commit: https://reviewboard.mozilla.org/r/67134/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/67134/
Attachment #8774689 - Flags: review?(esawin)
Attachment #8774689 - Flags: review?(ahunt)
(Assignee)

Comment 4

2 years ago
I still need to test this extensively (I'll probably have to fake some of the data) but I already share the patch to get your feedback.

Updated

2 years ago
Attachment #8774689 - Flags: review?(esawin) → review+
Comment on attachment 8774689 [details]
Bug 1220773 - Do not run our updater if app was installed from Google Play.

https://reviewboard.mozilla.org/r/67134/#review63964

::: mobile/android/base/java/org/mozilla/gecko/updater/UpdateServiceHelper.java:135
(Diff revision 1)
>              Log.e(LOGTAG, "Failed to create update url: ", e);
>              return null;
>          }
>      }
>  
> -    public static boolean isUpdaterEnabled() {
> +    public static boolean isUpdaterEnabled(Context context) {

Can be final.
(Assignee)

Updated

2 years ago
Depends on: 1289384
(Assignee)

Updated

2 years ago
Depends on: 1289495

Comment 6

2 years ago
Comment on attachment 8774689 [details]
Bug 1220773 - Do not run our updater if app was installed from Google Play.

https://reviewboard.mozilla.org/r/67134/#review64120
Attachment #8774689 - Flags: review?(ahunt) → review+
(Assignee)

Comment 7

2 years ago
Comment on attachment 8774689 [details]
Bug 1220773 - Do not run our updater if app was installed from Google Play.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67134/diff/1-2/

Comment 8

2 years ago
Pushed by s.kaspari@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/64c473c3414f
Do not run our updater if app was installed from Google Play. r=ahunt,esawin

Comment 9

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/64c473c3414f
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
(Assignee)

Updated

2 years ago
Whiteboard: [MobileAS s1.1]

Updated

2 years ago
Priority: -- → P1
Whiteboard: [MobileAS s1.1] → [MobileAS]

Updated

2 years ago
Iteration: --- → 1.1
You need to log in before you can comment on or make changes to this bug.