Open Bug 1759727 Opened 3 years ago Updated 9 months ago

Add documentation for how to produce Android GeckoView universal (fat) AAR s locally

Categories

(GeckoView :: General, enhancement, P2)

Unspecified
Android
enhancement

Tracking

(Not tracked)

People

(Reporter: nalexander, Unassigned)

References

Details

Attachments

(1 file)

This isn't rocket science, but it's fiddly. I'm not going to polish this and get it into the tree, but I did write it down so I want a place to put it that's publicly accessible.

Attached file fat-aar.md

How to produce Android fat AARs locally

I'm going to do this with artifact builds, since there's nothing here
that requires a full build: this is all just packaging and some sanity
checking. But in automation we use a full compiled build, so that
should work just fine too.

A basic mozconfig

$ cat mozconfig-android-artifact
mk_add_options AUTOCLOBBER=1

# Build Firefox for Android:
ac_add_options --enable-application=mobile/android
ac_add_options --target=x86_64
ac_add_options --enable-artifact-builds
mk_add_options MOZ_OBJDIR="../objdirs/objdir-android-artifact"

$ export MOZCONFIG=mozconfig-android-artifact

Tell the build system we want to produce a fat AAR

$ export MOZ_FETCHES_DIR="$HOME/Mozilla/gecko/fetches"
$ export MOZ_ANDROID_FAT_AAR_ARCHITECTURES="armeabi-v7a,arm64-v8a,x86,x86_64"

Fetch AARs to repackage

Here I'm finding the AARs produced upstream to repackage. You can
copy your AARs into whatever you set MOZ_FETCHES_DIR to be and avoid
this entirely: just configure the MOZ_ANDROID_FAT_AAR_* variables
and then build.

$ ./mach configure
$ ./mach artifact install -v
...
 0:01.76 Installing from https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/RF8JOJw4QaSuoFooQ0P5NA/artifacts/public/build/en-US/target.common.tests.tar.gz
...

Go to corresponding task description at
https://firefox-ci-tc.services.mozilla.com/tasks/RF8JOJw4QaSuoFooQ0P5NA.

Look in Treeherder for "Bgv", the "build Android fat-aar
job"
.

Look in the log for relevant variables:

[task 2022-03-10T01:08:56.797Z] 01:08:56     INFO -  'MOZ_ANDROID_FAT_AAR_ARCHITECTURES': 'armeabi-v7a,arm64-v8a,x86,x86_64',
[task 2022-03-10T01:08:56.797Z] 01:08:56     INFO -  'MOZ_ANDROID_FAT_AAR_ARM64_V8A': 'geckoview-nightly-omni-arm64-v8a-100.0.20220309213717.aar',
[task 2022-03-10T01:08:56.797Z] 01:08:56     INFO -  'MOZ_ANDROID_FAT_AAR_ARMEABI_V7A': 'geckoview-nightly-omni-armeabi-v7a-100.0.20220309213717.aar',
[task 2022-03-10T01:08:56.797Z] 01:08:56     INFO -  'MOZ_ANDROID_FAT_AAR_X86': 'geckoview-nightly-omni-x86-100.0.20220309213717.aar',
[task 2022-03-10T01:08:56.797Z] 01:08:56     INFO -  'MOZ_ANDROID_FAT_AAR_X86_64': 'geckoview-nightly-omni-x86_64-100.0.20220309213717.aar',

Configure consumed AAR file names. These don't have to have
architectures and versions, etc, in them.

$ export MOZ_ANDROID_FAT_AAR_ARM64_V8A=geckoview-nightly-omni-arm64-v8a-100.0.20220309213717.aar
$ export MOZ_ANDROID_FAT_AAR_ARMEABI_V7A=geckoview-nightly-omni-armeabi-v7a-100.0.20220309213717.aar
$ export MOZ_ANDROID_FAT_AAR_X86=geckoview-nightly-omni-x86-100.0.20220309213717.aar
$ export MOZ_ANDROID_FAT_AAR_X86_64=geckoview-nightly-omni-x86_64-100.0.20220309213717.aar

Find corresponding URLs in the log:

[fetches 2022-03-10T00:42:14.776Z] https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/GP21-8GaSnWWji7jAry0Zw/artifacts/public/build/maven/org/mozilla/geckoview/geckoview-nightly-omni-armeabi-v7a/100.0.20220309213717/geckoview-nightly-omni-armeabi-v7a-100.0.20220309213717.aar resolved to 57443217 bytes with sha256 5a17e02e3c7305e89e194a45b5c31d85ede6b922fc3b32b087cf8c345f4512b4 in 1.230s
[fetches 2022-03-10T00:42:14.955Z] https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/KBzOJs8aQ9G6oUMSQ7v6PA/artifacts/public/build/maven/org/mozilla/geckoview/geckoview-nightly-omni-x86/100.0.20220309213717/geckoview-nightly-omni-x86-100.0.20220309213717.aar resolved to 65327896 bytes with sha256 68b3341732ee99cd8e8e21aacd754b4cd20cb5f04845cebe34b129300e466cf7 in 1.407s
[fetches 2022-03-10T00:42:15.111Z] https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Nm0XBzS7R8-L1gBhMLuGOA/artifacts/public/build/maven/org/mozilla/geckoview/geckoview-nightly-omni-arm64-v8a/100.0.20220309213717/geckoview-nightly-omni-arm64-v8a-100.0.20220309213717.aar resolved to 60624426 bytes with sha256 498fa548f41b0c1ff24b41cfde9269446e0971592e002e93ddac82f021e1e0e5 in 1.564s
[fetches 2022-03-10T00:42:15.388Z] https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/RF8JOJw4QaSuoFooQ0P5NA/artifacts/public/build/maven/org/mozilla/geckoview/geckoview-nightly-omni-x86_64/100.0.20220309213717/geckoview-nightly-omni-x86_64-100.0.20220309213717.aar resolved to 64279407 bytes with sha256 c3b52bbfbef6f4c91f03c63454e3f1347cafc73ab107d883f6cae9d4f080f9a4 in 1.838s

Grab AARs:

$ cd $MOZ_FETCHES_DIR
$ wget https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/GP21-8GaSnWWji7jAry0Zw/artifacts/public/build/maven/org/mozilla/geckoview/geckoview-nightly-omni-armeabi-v7a/100.0.20220309213717/geckoview-nightly-omni-armeabi-v7a-100.0.20220309213717.aar
$ wget https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/KBzOJs8aQ9G6oUMSQ7v6PA/artifacts/public/build/maven/org/mozilla/geckoview/geckoview-nightly-omni-x86/100.0.20220309213717/geckoview-nightly-omni-x86-100.0.20220309213717.aar
$ wget https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Nm0XBzS7R8-L1gBhMLuGOA/artifacts/public/build/maven/org/mozilla/geckoview/geckoview-nightly-omni-arm64-v8a/100.0.20220309213717/geckoview-nightly-omni-arm64-v8a-100.0.20220309213717.aar
$ wget https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/RF8JOJw4QaSuoFooQ0P5NA/artifacts/public/build/maven/org/mozilla/geckoview/geckoview-nightly-omni-x86_64/100.0.20220309213717/geckoview-nightly-omni-x86_64-100.0.20220309213717.aar

Build

Now, build:

$ ./mach build

(Optionally, build verbosely with -v -- you'll see more of the
details.) With all these variables set, when you build you should
have an extra tier, namely android-fat-aar-artifact. The build
should grind away and eventually you should have an AAR:

$ find ../objdirs/objdir-android-artifact -iname '*aar'
...
../objdirs/objdir-android-artifact/gradle/maven/org/mozilla/geckoview/geckoview-default-omni/100.0.20220304152631/geckoview-default-omni-100.0.20220304152631.aar
...

Cracking that open, you should have all the expected .so libraries
for your architectures:

$ unzip -l ../objdirs/objdir-android-artifact/gradle/maven/org/mozilla/geckoview/geckoview-default-omni/100.0.20220304152631/geckoview-default-omni-100.0.20220304152631.aar
Archive:  ../objdirs/objdir-android-artifact/gradle/maven/org/mozilla/geckoview/geckoview-default-omni/100.0.20220304152631/geckoview-default-omni-100.0.20220304152631.aar
  Length      Date    Time    Name
---------  ---------- -----   ----
     5675  02-01-1980 00:00   proguard.txt
    13737  02-01-1980 00:00   R.txt
    14459  02-01-1980 00:00   AndroidManifest.xml
     8781  02-01-1980 00:00   annotations.zip
  1492720  02-01-1980 00:00   classes.jar
    66876  02-01-1980 00:00   metrics.yaml
        0  02-01-1980 00:00   aidl/
        0  02-01-1980 00:00   aidl/org/
        0  02-01-1980 00:00   aidl/org/mozilla/
        0  02-01-1980 00:00   aidl/org/mozilla/gecko/
        0  02-01-1980 00:00   aidl/org/mozilla/gecko/gfx/
      262  02-01-1980 00:00   aidl/org/mozilla/gecko/gfx/GeckoSurface.aidl
      261  02-01-1980 00:00   aidl/org/mozilla/gecko/gfx/SyncConfig.aidl
        0  02-01-1980 00:00   aidl/org/mozilla/gecko/media/
      263  02-01-1980 00:00   aidl/org/mozilla/gecko/media/FormatParam.aidl
      258  02-01-1980 00:00   aidl/org/mozilla/gecko/media/Sample.aidl
      265  02-01-1980 00:00   aidl/org/mozilla/gecko/media/SampleBuffer.aidl
      266  02-01-1980 00:00   aidl/org/mozilla/gecko/media/SessionKeyInfo.aidl
        0  02-01-1980 00:00   aidl/org/mozilla/gecko/util/
      263  02-01-1980 00:00   aidl/org/mozilla/gecko/util/GeckoBundle.aidl
        0  02-01-1980 00:00   res/
        0  02-01-1980 00:00   res/drawable/
      839  02-01-1980 00:00   res/drawable/ic_generic_file.xml
        0  02-01-1980 00:00   jni/
        0  02-01-1980 00:00   jni/arm64-v8a/
   464752  02-01-1980 00:00   jni/arm64-v8a/libfreebl3.so
   293416  02-01-1980 00:00   jni/arm64-v8a/libipcclientcerts.so
    30152  02-01-1980 00:00   jni/arm64-v8a/liblgpllibs.so
   219752  02-01-1980 00:00   jni/arm64-v8a/libmozavcodec.so
   182160  02-01-1980 00:00   jni/arm64-v8a/libmozavutil.so
  1263816  02-01-1980 00:00   jni/arm64-v8a/libmozglue.so
  1988696  02-01-1980 00:00   jni/arm64-v8a/libnss3.so
   408208  02-01-1980 00:00   jni/arm64-v8a/libnssckbi.so
   170112  02-01-1980 00:00   jni/arm64-v8a/libplugin-container.so
   259064  02-01-1980 00:00   jni/arm64-v8a/libsoftokn3.so
126378040  02-01-1980 00:00   jni/arm64-v8a/libxul.so
        0  02-01-1980 00:00   jni/armeabi-v7a/
   394476  02-01-1980 00:00   jni/armeabi-v7a/libfreebl3.so
   304672  02-01-1980 00:00   jni/armeabi-v7a/libipcclientcerts.so
    29832  02-01-1980 00:00   jni/armeabi-v7a/liblgpllibs.so
   186136  02-01-1980 00:00   jni/armeabi-v7a/libmozavcodec.so
   152976  02-01-1980 00:00   jni/armeabi-v7a/libmozavutil.so
   833052  02-01-1980 00:00   jni/armeabi-v7a/libmozglue.so
  1391232  02-01-1980 00:00   jni/armeabi-v7a/libnss3.so
   319248  02-01-1980 00:00   jni/armeabi-v7a/libnssckbi.so
    75236  02-01-1980 00:00   jni/armeabi-v7a/libplugin-container.so
   179052  02-01-1980 00:00   jni/armeabi-v7a/libsoftokn3.so
101391379  02-01-1980 00:00   jni/armeabi-v7a/libxul.so
        0  02-01-1980 00:00   jni/x86/
   529536  02-01-1980 00:00   jni/x86/libfreebl3.so
   361976  02-01-1980 00:00   jni/x86/libipcclientcerts.so
    33764  02-01-1980 00:00   jni/x86/liblgpllibs.so
   210604  02-01-1980 00:00   jni/x86/libmozavcodec.so
   177296  02-01-1980 00:00   jni/x86/libmozavutil.so
  1324536  02-01-1980 00:00   jni/x86/libmozglue.so
  2001420  02-01-1980 00:00   jni/x86/libnss3.so
   335520  02-01-1980 00:00   jni/x86/libnssckbi.so
   177640  02-01-1980 00:00   jni/x86/libplugin-container.so
   248572  02-01-1980 00:00   jni/x86/libsoftokn3.so
133809792  02-01-1980 00:00   jni/x86/libxul.so
        0  02-01-1980 00:00   jni/x86_64/
   632688  02-01-1980 00:00   jni/x86_64/libfreebl3.so
   330296  02-01-1980 00:00   jni/x86_64/libipcclientcerts.so
    34248  02-01-1980 00:00   jni/x86_64/liblgpllibs.so
  1866952  02-01-1980 00:00   jni/x86_64/libmozavcodec.so
   190360  02-01-1980 00:00   jni/x86_64/libmozavutil.so
  1329344  02-01-1980 00:00   jni/x86_64/libmozglue.so
  2033816  02-01-1980 00:00   jni/x86_64/libnss3.so
   408216  02-01-1980 00:00   jni/x86_64/libnssckbi.so
   182408  02-01-1980 00:00   jni/x86_64/libplugin-container.so
   267272  02-01-1980 00:00   jni/x86_64/libsoftokn3.so
132944056  02-01-1980 00:00   jni/x86_64/libxul.so
        0  02-01-1980 00:00   assets/
  3822010  02-01-1980 00:00   assets/omni.ja
       60  02-01-1980 00:00   META-INF/com/android/build/gradle/aar-metadata.properties
        0  02-01-1980 00:00   org/
        0  02-01-1980 00:00   org/mozilla/
        0  02-01-1980 00:00   drawable/
        0  02-01-1980 00:00   org/mozilla/gecko/
        0  02-01-1980 00:00   org/mozilla/gecko/gfx/
        0  02-01-1980 00:00   org/mozilla/gecko/media/
        0  02-01-1980 00:00   org/mozilla/gecko/util/
        0  02-01-1980 00:00   x86_64/
        0  02-01-1980 00:00   x86/
        0  02-01-1980 00:00   arm64-v8a/
        0  02-01-1980 00:00   armeabi-v7a/
---------                     -------
521772766                     86 files

I try to manage the build without artifacts (with self-translated AAR archives).
My mozconfig file contains just the following active lines:
ac_add_options --enable-application=mobile/android
ac_add_options --target=x86_64

I have not set the $MOZCONFIG environment variable.
I have set (and exported) the environment variables:
MOZ_FETCHES_DIR=$HOME/Mozilla/gecko/fetches
MOZ_ANDROID_FAT_AAR_ARCHITECTURES=armeabi-v7a,arm64-v8a,x86,x86_64
MOZ_ANDROID_FAT_AAR_X86_64=geckoview-withGeckoBinaries-x86_64-debug.aar
MOZ_ANDROID_FAT_AAR_ARCHITECTURES=armeabi-v7a,arm64-v8a,x86,x86_64
MOZ_ANDROID_FAT_AAR_ARM64_V8A=geckoview-withGeckoBinaries-arm64-v8a-debug.aar
MOZ_ANDROID_FAT_AAR_X86=geckoview-withGeckoBinaries-x86-debug.aar
MOZ_ANDROID_FAT_AAR_ARMEABI_V7A=geckoview-withGeckoBinaries-armeabi-v7a-debug.aar

I copied the aar files which I generated earlier to the $MOZ_FETCHES_DIR
(I used the files I found in the <object dirs>/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar and I have checked the architecture with unzip -l $MOZ_FETCHES_DIR/$MOZ_ANDROID_FAT_AAR_<...> which all show the expected jni directories).

Then I run ./mach configure
And after that ./mach -v build
But this command runs into an error.

These are the latest output lines:
0:21.43 Allowed: Path "chrome/toolkit/content/global/buildconfig.html" has architecture-specific versions:
0:21.44 arm64-v8a -> e02690407aaf76ad532857c7925eedcb38a30593
0:21.44 armeabi-v7a -> 2d5e1be95710d99b80b34bec564c757a98ad1e29
0:21.44 x86 -> 3124533e06e93bf60c3f00a0d7a48a570cddf455
0:21.45 x86_64 -> 700452aa146c73deea31ea1c30623705c01b97e3
0:21.45 Allowed: Path "classes.jar!/org/mozilla/geckoview/BuildConfig.class" has architecture-specific versions:
0:21.45 arm64-v8a -> d61eb638b7463ad4caf98c5eaff5598db9142f38
0:21.45 armeabi-v7a -> f8b42e09de37efdf4b89a6b404675027ea6a8f02
0:21.46 x86 -> 201162799ce8b6b014d2b1c1dac8fee5b23bbc31
0:21.46 x86_64 -> 7e614014b3dec979d33b988ec5f1c837aae0cc80
0:21.46 Disallowed: Path "classes.jar!/org/mozilla/gecko/CrashHandler$1.class" has architecture-specific versions:
0:21.46 arm64-v8a -> f05d852f3f72e092bbba5e2503a735b981dbca40
0:21.46 armeabi-v7a -> 469f42e3d650004ae248fd3a392c1f655fec381f
0:21.47 x86 -> 61541050a70057d8b2f5e07f26f26270e1836878
0:21.47 x86_64 -> 122ffe102763f769aece5b63db86ee7ecf62c87a
0:21.47 Disallowed: Path "modules/AppConstants.jsm" has architecture-specific versions:
0:21.48 arm64-v8a -> 2401ea4691ca0ab309038f4e5b76fc6cf2054a89
0:21.48 armeabi-v7a -> f1aeed7900513b7cddba9e861706ec96842a3805
0:21.48 x86 -> 21961f09c5e25ba9481e81ffd2dc1e6504e0507b
0:21.49 x86_64 -> 9c656d36dc113f553db9d363346cce41ff596a39
0:21.61 make[3]: *** [Makefile:133: recurse_android-fat-aar-artifact] Error 1
0:21.61 make[2]: *** [$HOME/mozilla-unified/config/recurse.mk:34: android-fat-aar-artifact] Error 2
0:21.62 make[1]: *** [$HOME/mozilla-unified/config/rules.mk:352: default] Error 2
0:21.62 make: *** [client.mk:63: build] Error 2

I have already tried to execute this with the line following line added to mozconfig, but with the same result
mk_add_options MOZ_OBJDIR="../objdirs/objdir-android-artifact"

Any idea what I am missing?

Flags: needinfo?(nalexander)

(In reply to Markus Strack from comment #3)

I try to manage the build without artifacts (with self-translated AAR archives).
My mozconfig file contains just the following active lines:
ac_add_options --enable-application=mobile/android
ac_add_options --target=x86_64

I have not set the $MOZCONFIG environment variable.
I have set (and exported) the environment variables:
MOZ_FETCHES_DIR=$HOME/Mozilla/gecko/fetches
MOZ_ANDROID_FAT_AAR_ARCHITECTURES=armeabi-v7a,arm64-v8a,x86,x86_64
MOZ_ANDROID_FAT_AAR_X86_64=geckoview-withGeckoBinaries-x86_64-debug.aar
MOZ_ANDROID_FAT_AAR_ARCHITECTURES=armeabi-v7a,arm64-v8a,x86,x86_64
MOZ_ANDROID_FAT_AAR_ARM64_V8A=geckoview-withGeckoBinaries-arm64-v8a-debug.aar
MOZ_ANDROID_FAT_AAR_X86=geckoview-withGeckoBinaries-x86-debug.aar
MOZ_ANDROID_FAT_AAR_ARMEABI_V7A=geckoview-withGeckoBinaries-armeabi-v7a-debug.aar

I copied the aar files which I generated earlier to the $MOZ_FETCHES_DIR
(I used the files I found in the <object dirs>/gradle/build/mobile/android/geckoview/outputs/aar/geckoview-withGeckoBinaries-debug.aar and I have checked the architecture with unzip -l $MOZ_FETCHES_DIR/$MOZ_ANDROID_FAT_AAR_<...> which all show the expected jni directories).

Then I run ./mach configure
And after that ./mach -v build
But this command runs into an error.

These are the latest output lines:
0:21.43 Allowed: Path "chrome/toolkit/content/global/buildconfig.html" has architecture-specific versions:
0:21.44 arm64-v8a -> e02690407aaf76ad532857c7925eedcb38a30593
0:21.44 armeabi-v7a -> 2d5e1be95710d99b80b34bec564c757a98ad1e29
0:21.44 x86 -> 3124533e06e93bf60c3f00a0d7a48a570cddf455
0:21.45 x86_64 -> 700452aa146c73deea31ea1c30623705c01b97e3
0:21.45 Allowed: Path "classes.jar!/org/mozilla/geckoview/BuildConfig.class" has architecture-specific versions:
0:21.45 arm64-v8a -> d61eb638b7463ad4caf98c5eaff5598db9142f38
0:21.45 armeabi-v7a -> f8b42e09de37efdf4b89a6b404675027ea6a8f02
0:21.46 x86 -> 201162799ce8b6b014d2b1c1dac8fee5b23bbc31
0:21.46 x86_64 -> 7e614014b3dec979d33b988ec5f1c837aae0cc80
0:21.46 Disallowed: Path "classes.jar!/org/mozilla/gecko/CrashHandler$1.class" has architecture-specific versions:
0:21.46 arm64-v8a -> f05d852f3f72e092bbba5e2503a735b981dbca40
0:21.46 armeabi-v7a -> 469f42e3d650004ae248fd3a392c1f655fec381f
0:21.47 x86 -> 61541050a70057d8b2f5e07f26f26270e1836878
0:21.47 x86_64 -> 122ffe102763f769aece5b63db86ee7ecf62c87a
0:21.47 Disallowed: Path "modules/AppConstants.jsm" has architecture-specific versions:
0:21.48 arm64-v8a -> 2401ea4691ca0ab309038f4e5b76fc6cf2054a89
0:21.48 armeabi-v7a -> f1aeed7900513b7cddba9e861706ec96842a3805
0:21.48 x86 -> 21961f09c5e25ba9481e81ffd2dc1e6504e0507b
0:21.49 x86_64 -> 9c656d36dc113f553db9d363346cce41ff596a39
0:21.61 make[3]: *** [Makefile:133: recurse_android-fat-aar-artifact] Error 1
0:21.61 make[2]: *** [$HOME/mozilla-unified/config/recurse.mk:34: android-fat-aar-artifact] Error 2
0:21.62 make[1]: *** [$HOME/mozilla-unified/config/rules.mk:352: default] Error 2
0:21.62 make: *** [client.mk:63: build] Error 2

You need to dig into these -- unzip the AARs, then unzip the omni.ja, and diff the various files. Start with AppConstants.jsm, since it's text. (You can also just look in various object directories for the files directly.)

My guess is that you have different build dates, at least, but you'll need to figure out what is not constant across your input AARs, fix it, and get your builds to actually align. You may have divergent build flags, or subtly different crash reporter settings, etc, but I can't say without seeing diffs.

I have already tried to execute this with the line following line added to mozconfig, but with the same result
mk_add_options MOZ_OBJDIR="../objdirs/objdir-android-artifact"

This won't change anything -- it'll just move some file locations around. Good luck!

Flags: needinfo?(nalexander) → needinfo?(markus.strack)
Severity: -- → N/A
Priority: -- → P3

Hi there!

I ran into the almost the same exact issue as Markus Strack when trying to build non-artifact fat AARs of geckoview using locally built AARs for each architecture. Here's the error I got,.

0:13.85 /usr/bin/make -f client.mk -j8 -s
 0:15.08 Allowed: Path "chrome/toolkit/content/global/buildconfig.html" has architecture-specific versions:
 0:15.08   arm64-v8a -> c529515c0aa1bff0cfaa0f79596eff7a1bdc0bc8
 0:15.08   armeabi-v7a -> 1a773283da09ff014085071302de16560c47c258
 0:15.08 Allowed: Path "classes.jar!/org/mozilla/geckoview/BuildConfig.class" has architecture-specific versions:
 0:15.08   arm64-v8a -> d5816baf0c0ac1848deafdf07193f4cfcfc3ccaf
 0:15.08   armeabi-v7a -> 02dcf3f20d84144717f54f3702bd95935ee2c813
 0:15.08 Disallowed: Path "classes.jar!/org/mozilla/gecko/CrashHandler$1.class" has architecture-specific versions:
 0:15.08   arm64-v8a -> 2492739841ba445040d5cf845d259c2ede544ea8
 0:15.08   armeabi-v7a -> 19848e707cd38d407bb0094d96f736b3bb12db12
 0:15.08 Disallowed: Path "modules/AppConstants.jsm" has architecture-specific versions:
 0:15.08   arm64-v8a -> 821462be939c934a9b7118089dec51a01664aa4d
 0:15.08   armeabi-v7a -> 4f33d66290f8ee61576442c58d3df5ae59305ac0
 0:15.10 make[3]: *** [Makefile:133: recurse_android-fat-aar-artifact] Error 1

Inspecting both "classes.jar!/org/mozilla/gecko/CrashHandler$1.class" and "modules/AppConstants.jsm", it was obvious that the only difference was the MOZ_BUILDID. So to fix this, just set the build date prior to building all of the AARs you want to include in the fat ARR using something like, export MOZ_BUILD_DATE=20220901155715

If anyone is interested, I have a script for my app the builds the fat AAR for arm64-v8a and armeabi-v7a, see here, this is called from my wrapper script here. It should be fairly reusable (and x86, x86_64 could be added).

Redirect a needinfo that is pending on an inactive user to the triage owner.
:cpeterson, since the bug has recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(markus.strack) → needinfo?(cpeterson)

Thanks for sharing your experience, Grant. I'll share this bug with the GeckoView engineers so we can discuss what changes we might want to make to our build scripts or documentation.

Severity: N/A → --
Flags: needinfo?(cpeterson)
OS: All → Android
Priority: P3 → --

(In reply to Nick Alexander :nalexander [he/him] from comment #0)

This isn't rocket science, but it's fiddly. I'm not going to polish this and get it into the tree, but I did write it down so I want a place to put it that's publicly accessible.

Nick, can we close this bug? Is having your fat-aar.md document attached to this bug "publicly accessible" enough? Or do we need to land it somewhere?

Severity: -- → N/A
Flags: needinfo?(nalexander)

(In reply to Chris Peterson [:cpeterson] from comment #8)

(In reply to Nick Alexander :nalexander [he/him] from comment #0)

This isn't rocket science, but it's fiddly. I'm not going to polish this and get it into the tree, but I did write it down so I want a place to put it that's publicly accessible.

Nick, can we close this bug? Is having your fat-aar.md document attached to this bug "publicly accessible" enough? Or do we need to land it somewhere?

It should end up in Firefox source docs, I think.

Flags: needinfo?(nalexander)
Rank: 299
Priority: -- → P2
Summary: [geckoview] Add documentation for how to produce Android GeckoView universal (fat) AAR s locally → Add documentation for how to produce Android GeckoView universal (fat) AAR s locally
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: