Step 0: Have a current working build environment for building Firefox for Android for a recent checkout of mozilla-central.
Step 1: Figure out when the revision you are interested in was checked in.
hg log -r <revision> will give you a date of the checkin.
Step 2: Check the revision history of the Simple Firefox for Android build guide you want to find a revision slightly before the date from step 1. At the bottom of the page “Required Android SDK and NDK versions” use this section as a reference for the next several steps.
Step 3. Install the version of the Android SDK Platform listed on the DevMo page. Via Android Studio’s SDK manager. Tools -> SDK Manager -> SDK Platforms -> mark the API version you need -> click apply
Step 4. Install the SDK build tools using Android Studio’s SDK manager. Tools -> SDK Manager -> SDK Tools -> mark the SDK build tools version you need -> click apply
Step 5. Get the correct NDK from Google’s archives. Then extract it to where you store your NDKs. $HOME/.mozbuild is the default.
Step 6. Get the Android SDK tools. This can be a real pain as Google does not have links to download this. You will need to craft your own version of the URL. The URL format is
https://dl.google.com/android/repository/tools_r<version>-<operating-system>.zip Where version matches the “Android SDK Tools” line from DevMo and operating system is macosx or linux. Example
Step 7. Create a copy of the SDK, delete the tools directory and place the folder from the Android SDK Tools download step 6 above in that folder. Example $HOME/.mozbuild/android-sdk-linux-23.0.1/
Step 8. Update your .mozconfig to point to the older NDK and SDK versions
# Build Firefox for Android:
# With the following Android SDK and NDK: