Packaging Android host utilities

From MozillaWiki
Jump to: navigation, search

Packaging Android host utilities

The host utilities are executable files that run on a *host* machine. The utilities provide services to an Android *target* device, including a web server and certificate authority. For historical reason, the host utilities include an essentially complete version of Firefox. Here's how to package new versions of the host utilities.

First, identify the target build. Generally, prefer Beta channel builds to Nightly channel builds.

For the version 60 update, host-utils was based on builds from See bug 1433279.


Generating new archive

Follow these steps to locate and download the necessary files.

  1. From the selected treeherder build, identify "Linux opt" and "Linux x64 opt".
  2. Click on the B icon, which will bring up a pane below.
  3. Identify and click on the hash on the left hand pane called "Task".
  4. In the newly opened TaskCluster tab, click on tab named "Run Artifacts".
  5. Download target.common.tests.tar.gz & target.tar.bz2.
  6. Follow the contents of the script below:
tar xvf target.tar.bz2
tar xvf target.common.tests.tar.gz "bin/*"
rm firefox/firefox*
rm -r firefox/browser
mv bin/* firefox
mv firefox host-utils-60.0a1.en-US.linux-x86_64

Uploading to ToolTool

1. Prepare new archive for upload:

tar cvf host-utils-60.0a1.en-US.linux-x86_64.tar host-utils-60.0a1.en-US.linux-x86_64
gzip host-utils-60.0a1.en-US.linux-x86_64.tar

replace the version numbers as appropriate.

2. Compare contents of current archive to the new archive. For instructions on existing archive, see the section below.

3. Ensure uploading user has a valid token at Mozilla Releng.

4. Upload the archive:

python upload [name_of_archive] --authentication-file=[token_location] --message [commit_message]

5. Update the manifest in testing/config/tooltool-manifests/linux64/hostutils.manifest.

6. Repeat, using "Linux opt" archives, for 32 bit.

Mac OS X

Preparing for Mac OS X is not quite so simple. Due to changes in the way that Mac OS X codesigns binaries, it's best to do this on a Mac OS X machine so that you can codesign the host utility binaries. If you don't codesign them, you will be prompted every invocation to "allow network connections". See for a discussion of the issue and the codesigning invocation used below. You will be prompted for your password (by sudo), but it's possible super user permissions are not needed.

unzip "bin/*"
open firefox-37.0a2.en-US.mac.dmg
cp -R /Volumes/FirefoxDeveloperEdition/* bin
cp -R /Volumes/FirefoxDeveloperEdition/* bin
find bin -type f -perm +111 -print | grep -v \\. | xargs sudo codesign --force --deep --sign -
mv bin host-utils-37.0a2.en-US.mac

Download existing archive

It is possible to download existing host utilities.

1. locate the existing manifest file using SearchFox for both 32bit and 64bit.

2. using ToolTool, download the host utilities:

python fetch -m