Pier Angelo Vendrame pushed to branch tor-browser-102.2.1-12.0-1 at The Tor Project / Applications / fenix

Commits:

2 changed files:

Changes:

  • .gitignore
    ... ... @@ -108,3 +108,9 @@ manifest.json
    108 108
     # Other files modified at build time
    
    109 109
     .experimenter.json
    
    110 110
     
    
    111
    +# Tor libraries for local builds
    
    112
    +app/android-release.aar
    
    113
    +app/jsocksAndroid-release.aar
    
    114
    +app/service-release.aar
    
    115
    +app/universal-0.0.3.jar
    
    116
    +

  • tools/tba-sign-devbuilds.sh
    1
    +#!/bin/bash
    
    2
    +
    
    3
    +cd "$(dirname $(realpath "$0"))/.."
    
    4
    +
    
    5
    +if [ -z "$TOR_BROWSER_BUILD" ]; then
    
    6
    +	TOR_BROWSER_BUILD=../tor-browser-build
    
    7
    +fi
    
    8
    +key="$TOR_BROWSER_BUILD/projects/browser/android-qa.keystore"
    
    9
    +if [ ! -f "$key" ]; then
    
    10
    +	echo "Please define TOR_BROWSER_BUILD with the path to tor-browser-build"
    
    11
    +	exit 2
    
    12
    +fi
    
    13
    +
    
    14
    +tools="$ANDROID_HOME/build-tools/31.0.0"
    
    15
    +apksigner="$tools/apksigner"
    
    16
    +zipalign="$tools/zipalign"
    
    17
    +if [ ! -x "$apksigner" ]; then
    
    18
    +	echo "apksigner not found at $apksigner. Please make sure ANDROID_HOME is defined"
    
    19
    +	exit 3
    
    20
    +fi
    
    21
    +
    
    22
    +noscript="$(find "$TOR_BROWSER_BUILD/out/browser" -name 'noscript*.xpi' -print | sort | tail -1)"
    
    23
    +tmpdir="$(mktemp -d)"
    
    24
    +mkdir -p "$tmpdir/assets/extensions"
    
    25
    +if [ -f "$noscript" ]; then
    
    26
    +	cp "$noscript" "$tmpdir/assets/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
    
    27
    +fi
    
    28
    +
    
    29
    +sign () {
    
    30
    +	apk="$(realpath $1)"
    
    31
    +	out="$apk"
    
    32
    +	out="${out/unsigned/signed}"
    
    33
    +	aligned="$apk"
    
    34
    +	aligned="${aligned/unsigned/aligned}"
    
    35
    +	pushd "$tmpdir" > /dev/null
    
    36
    +	zip -Xr "$apk" assets > /dev/null
    
    37
    +	popd > /dev/null
    
    38
    +	rm -f "$aligned"
    
    39
    +	"$zipalign" -p 4 "$apk" "$aligned"
    
    40
    +	"$apksigner" sign --ks "$key" --in "$aligned" --out "$out" --ks-key-alias androidqakey --key-pass pass:android --ks-pass pass:android
    
    41
    +}
    
    42
    +
    
    43
    +for apk in app/build/outputs/apk/release/*-unsigned.apk; do
    
    44
    +	sign "$apk"
    
    45
    +done
    
    46
    +
    
    47
    +rm -rf "$tmpdir"