Open Bug 1585767 Opened 5 years ago Updated 10 months ago

[mozversion] Cannot get version info of any firefox APK

Categories

(Testing :: Mozbase, defect, P3)

Version 3
defect

Tracking

(Not tracked)

People

(Reporter: sparky, Unassigned)

References

Details

I am currently trying to get the version info for all of our android browsers but I can't seem to use a APK file for this. Based on the mozversion tests, it requires a zip file containing other files alongside the APK. Here's what I see when I try using the firefox APKs:

[task 2019-10-02T18:45:16.838Z] 18:44:16     INFO -  mozversion Unable to find application.ini
[task 2019-10-02T18:45:16.838Z] 18:44:16     INFO -  mozversion Unable to find platform.ini

I noticed that the zip requirement is not mentioned anywhere in the docs: https://firefox-source-docs.mozilla.org/mozbase/mozversion.html

And the docs use path/to/firefox.apk which is not a zip file.

Either the docs should be fixed to note this or this functionality should be added.

Well, we have https://taskcluster-artifacts.net/LkjubSL5QFGNfuTZVGDxjg/0/public/build/target.json even though that is still fennec specific I assume it will change some day. Regarding apks, they are actually specially signed zip files.

Looking at geckoview-androidTest.apk

unzipping that gives assets/omni.ja which is a jar (another zip file). Unzipping that gives

./modules/AppConstants.jsm: MOZ_APP_VERSION: "71.0a1",
./modules/AppConstants.jsm: MOZ_APP_VERSION_DISPLAY: "71.0a1",

You can do the same for geckoview_example.apk where the MOZ_APP_VERSION is in modules/AppConstants.jsm again.

snorp: Do you have any other recommendation for replacing the application.ini in the old fennec target.apk?

Flags: needinfo?(snorp)

No, I think what you have here is about the best we can do currently. That should work in GeckoView apps as well.

Flags: needinfo?(snorp)

Ah ok, I didn't know the apks were actually zip files! But mozversion can't extract that "MOZ_APP_VERSION" information from it at this stage, right?

Right. We'll need to update it to handle unzipping the apk then finding and unzipping the omni.ja then getting the information from modules/AppConstants.jsm.

Priority: -- → P3
Severity: normal → S3
Blocks: 1827908

I'm experiencing the same issue. It seems like the version information for Firefox Combo APK is not readily available or accessible. If anyone has a workaround or solution, please share. Thank you!

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