Safaa is a privacy-focused, Muslim Android web browser built on Chromium and Brave Core, featuring built-in real-time background music removal (NoMusic), full built-in ad & tracker blocking (Shields), and always-on pornography & adult content blocking.
翻译准备中
正在加载完整 README。
查看完整 README ↗Safaa (com.safaa.browser) is a privacy-focused, Muslim Android web browser built on Chromium and Brave Core, featuring built-in real-time background music removal (NoMusic), full built-in ad & tracker blocking (Shields), and always-on pornography & adult content blocking.
arm64)Building Chromium + Safaa for Android requires a Linux environment (Ubuntu 22.04 / 24.04 LTS, or WSL2 on Windows):
JOBS=6)pnpmzstd), Ninja, and standard Chromium Linux/Android build dependenciesIn your Linux / WSL2 terminal, create the workspace directory and clone this repository into src/brave (Chromium's build files reference //brave/... paths relative to src/):
mkdir -p ~/Safaa/src
cd ~/Safaa/src
git clone https://github.com/mohamedsadiqaguenaou/Safaa.git brave
cd ~/Safaa/src/brave
~/Safaa/env.sh)If building inside WSL2, ensure Windows PATH entries (/mnt/...) are excluded so Windows node.exe or python.exe do not interfere with the Linux build:
cat << 'EOF' > ~/Safaa/env.sh
# Keep Windows programs out of the Linux build in WSL2
PATH="$(printf '%s' "$PATH" | tr ':' '\n' | grep -v '^/mnt/' | paste -sd: -)"
PATH="$HOME/.local/node/bin:$PATH"
export PATH
EOF
source ~/Safaa/env.sh
Install Node dependencies and run init to fetch the matching Chromium tree, Android SDK/NDK, and apply all patches in patches/:
source ~/Safaa/env.sh
cd ~/Safaa/src/brave
pnpm install
pnpm run init --target_os=android --target_arch=arm64 --no-history
Note:
pnpm run initis safe to re-run if interrupted;gclientwill resume downloading where it left off. After pulling new changes topatches/, re-apply them with:pnpm run apply_patches
Safaa-arm64.apk)Builds the full official Release configuration (is_official_build = true, ThinLTO, R8/ProGuard optimization, release channel):
source ~/Safaa/env.sh
cd ~/Safaa/src/brave
JOBS="$(nproc)"
export SISO_LIMITS="local=$JOBS"
export JAVA_OPTS="-Xmx16G -Xms4G"
export NODE_OPTIONS="--max-old-space-size=16384"
pnpm run build Release \
--channel=release \
--target_os=android \
--target_arch=arm64 \
--target_android_output_format=apk \
--gn=symbol_level:0 \
--ninja=j:"$JOBS"
Output APK:
~/Safaa/src/out/android_Release_arm64/apks/Safaa-arm64.apk
Static Build (12–16 GB RAM)Builds an optimized APK without ThinLTO so linking fits comfortably in 12–16 GB RAM:
source ~/Safaa/env.sh
cd ~/Safaa/src/brave
JOBS="${JOBS:-6}"
export SISO_LIMITS="local=$JOBS"
export JAVA_OPTS="-Xmx4G -Xms1G"
export NODE_OPTIONS="--max-old-space-size=8192"
pnpm run build Static \
--target_os=android \
--target_arch=arm64 \
--target_android_output_format=apk \
--gn=symbol_level:0 \
--gn=dcheck_always_on:false \
--ninja=j:"$JOBS"
Output APK:
~/Safaa/src/out/android_Static_arm64/apks/Safaa-arm64.apk
source ~/Safaa/env.sh
cd ~/Safaa/src/brave
pnpm run gn gen -C gncheck --target_os=android --target_arch=arm64
pnpm run gn check -C gncheck '//brave/*'
rewrite/**/*.yaml):
PATH=~/Safaa/src/brave/vendor/depot_tools:$PATH vpython3 tools/cr/plaster.py apply <path-to-yaml>
This project is licensed under the Mozilla Public License 2.0.