Files
IronFox/scripts/setup-android-sdk.sh
celenity d6c4c71cb1 IronFox v143.0
ironfox-oss/IronFox!80
____

## Changes

- [Fixed an issue that caused the browser to always attempt to install uBlock Origin, even if deselected on the onboarding](https://gitlab.com/ironfox-oss/IronFox/-/issues/180).
- [Fixed and added back the `Debug Drawer` secret setting](c6e1c4cd68).
- [Glean](https://github.com/mozilla/glean) is now built with [Tor Browser's no-op UniFFI binding generator](766e179979).
- Prevented the browser from initializing the [Nimbus *(Experimentation)* library](https://experimenter.info/getting-started/engineers/getting-started-for-android-engineers/).
- Rebased onto Application Services [`v143.0`](https://github.com/mozilla/application-services/releases/tag/v143.0).
- Rebased onto Firefox [`143.0`](https://firefox.com/firefox/android/143.0/releasenotes/).
- Rebased onto Glean [`v64.5.5`](https://github.com/mozilla/glean/releases/tag/v64.5.5).
- Removed additional unwanted/unnecessary components used for data collection and marketing.
- Removed [Glean](https://github.com/mozilla/glean) from Mozilla's [Android Components](https://searchfox.org/firefox-main/source/mobile/android/android-components/README.md).
- Removed [Glean](https://github.com/mozilla/glean) from [Application Services](https://github.com/mozilla/application-services).
- Removed the `Enable disk cache for secure webpages` UI setting toggle. Note that the `Enable disk cache` toggle is a master-switch, it disables disk cache for *both* insecure *and* secure websites, and it remains off by default.
- Removed the `Hard-fail OCSP revocation checks` UI setting toggle, as we no longer enable or use OCSP by default, in favor of CRLite *([See details](e599bd459e))*.
- Removed [Nimbus](https://experimenter.info/getting-started/engineers/getting-started-for-android-engineers/) from the [`engine-gecko` Android component](https://searchfox.org/firefox-main/source/mobile/android/android-components/components/browser/engine-gecko/README.md).
- [Stubbed `PlayStoreReviewPromptController`, and removed the now-unnecessary microG `Tasks` library](52791d3500).
- Updated the default Rust version [for **Gecko** and **Glean**](ec6ee31f83) to [`1.89.0`](https://doc.rust-lang.org/stable/releases.html#version-1890-2025-08-07).
- Updated Phoenix to [`2025.09.07.1`](https://codeberg.org/celenity/Phoenix/releases/tag/2025.09.07.1).
- [Other tweaks, refinements, and minor enhancements](https://gitlab.com/ironfox-oss/IronFox/-/merge_requests/80/diffs).

MR-author: celenity <celenity@celenity.dev>
Co-authored-by: Weblate <hosted@weblate.org>
Co-authored-by: LucasMZ <git@lucasmz.dev>
Co-authored-by: Akash Yadav <itsaky01@gmail.com>
Approved-by: Akash Yadav <itsaky01@gmail.com>
Merged-by: celenity <celenity@celenity.dev>
2025-09-17 13:46:08 +00:00

68 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
PLATFORM_VERSION="36"
BUILDTOOLS_VERSION="36.0.0"
NDK_REVISION="28.2.13676358"
SDK_REVISION="13114758"
if [[ "${ANDROID_HOME+x}" == "" ]]; then
export ANDROID_HOME=$HOME/android-sdk
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
PLATFORM=mac
else
PLATFORM=linux
fi
ANDROID_SDK_FILE=commandlinetools-${PLATFORM}-${SDK_REVISION}_latest.zip
export ANDROID_SDK_ROOT="$ANDROID_HOME"
if [ ! -d "$ANDROID_HOME" ]; then
mkdir -vp "$ANDROID_HOME"
cd "$ANDROID_HOME/.." || exit 1
rm -Rf "$(basename "$ANDROID_HOME")"
# https://developer.android.com/studio/index.html#command-tools
echo "Downloading Android SDK..."
wget --https-only --no-cache --secure-protocol=TLSv1_3 --show-progress --verbose https://dl.google.com/android/repository/${ANDROID_SDK_FILE} -O tools-$SDK_REVISION.zip
rm -Rf "$ANDROID_HOME"
mkdir -vp "$ANDROID_HOME/cmdline-tools"
unzip -q tools-$SDK_REVISION.zip -d "$ANDROID_HOME/cmdline-tools"
mv -v "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest"
rm -vf tools-$SDK_REVISION.zip
fi
if [ -x "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" ]; then
SDK_MANAGER="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
elif [ -x "$ANDROID_HOME/cmdline-tools/bin/sdkmanager" ]; then
SDK_MANAGER="$ANDROID_HOME/cmdline-tools/bin/sdkmanager"
else
echo "ERROR: no usable sdkmanager found in $ANDROID_HOME" >&2
echo "Checking other possible paths: (empty if not found)" >&2
find "$ANDROID_HOME" -type f -name sdkmanager >&2
return
fi
PATH=$PATH:$(dirname "$SDK_MANAGER")
export PATH
# Accept licenses
{ yes || true; } | sdkmanager --sdk_root="$ANDROID_HOME" --licenses
$SDK_MANAGER "build-tools;$BUILDTOOLS_VERSION" # for GeckoView
$SDK_MANAGER "platforms;android-$PLATFORM_VERSION" # for GeckoView
$SDK_MANAGER "ndk;$NDK_REVISION" # for mozbuild; application-services
$SDK_MANAGER "ndk;28.1.13356709" # for Glean
export ANDROID_NDK="$ANDROID_HOME/ndk/$NDK_REVISION"
export ANDROID_NDK="$ANDROID_HOME/ndk/$NDK_REVISION"
[ -d "$ANDROID_NDK" ] || {
echo "$ANDROID_NDK does not exist."
return
}
echo "INFO: Using sdkmanager ... $SDK_MANAGER"
echo "INFO: Using NDK ... $ANDROID_NDK"