docs: prepare FridaBox for public release

This commit is contained in:
Mahdi Karzari
2026-07-20 04:25:09 +03:30
parent bf5f73e07a
commit 89e476c145
19 changed files with 1173 additions and 246 deletions
+87
View File
@@ -0,0 +1,87 @@
name: Android CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: android-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
name: Build, test, and verify
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Check out source
uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
cache: gradle
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: pip
cache-dependency-path: tools/requirements.txt
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: npm
- name: Install Android SDK components
run: |
yes | sdkmanager --licenses >/dev/null || true
sdkmanager \
'platforms;android-35' \
'build-tools;35.0.0' \
'ndk;29.0.14206865'
- name: Install controller and agent dependencies
run: |
python -m pip install --requirement tools/requirements.txt
npm ci
- name: Verify reproducible Frida agents
run: |
python tools/build_frida_agents.py
git diff --exit-code -- scripts/dist
- name: Build and test
run: |
chmod +x gradlew
./gradlew \
:app:assembleDebug \
:app:assembleRelease \
:Bcore:testDebugUnitTest \
:app:testDebugUnitTest \
:app:check \
--stacktrace \
--console=plain
- name: Upload APKs and reports
if: always()
uses: actions/upload-artifact@v6
with:
name: fridabox-${{ github.sha }}
if-no-files-found: warn
retention-days: 14
path: |
app/build/outputs/apk/**/*.apk
app/build/reports/lint-results-*.html
app/build/test-results/**/*.xml
Bcore/build/test-results/**/*.xml
-167
View File
@@ -1,167 +0,0 @@
name: Build and Send APK to Telegram
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-send:
runs-on: ubuntu-latest
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Accept Android SDK licenses
run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses || yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses || true
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build APKs and AARs
run: ./gradlew assembleDebug assembleRelease :Bcore:assembleDebug :Bcore:assembleRelease :black-reflection:assemble :compiler:assemble
- name: Find Bcore AAR paths
id: aar_paths
run: |
DEBUG_AAR=$(find ./Bcore/build/outputs/aar -name "*debug.aar" | head -n 1)
RELEASE_AAR=$(find ./Bcore/build/outputs/aar -name "*release.aar" | head -n 1)
echo "debug_aar_path=$DEBUG_AAR" >> $GITHUB_OUTPUT
echo "release_aar_path=$RELEASE_AAR" >> $GITHUB_OUTPUT
- name: Find black-reflection and compiler artifact paths
id: additional_artifacts
run: |
BLACK_REFLECTION_ART=$(find ./black-reflection/build/libs ./black-reflection/build/outputs -name "*.jar" -o -name "*.aar" 2>/dev/null | head -n 1)
COMPILER_ART=$(find ./compiler/build/libs ./compiler/build/outputs -name "*.jar" -o -name "*.aar" 2>/dev/null | head -n 1)
echo "black_reflection_path=$BLACK_REFLECTION_ART" >> $GITHUB_OUTPUT
echo "compiler_path=$COMPILER_ART" >> $GITHUB_OUTPUT
- name: Send Bcore Debug AAR to Telegram and Pin
run: |
COMMIT_MSG=$(git log -1 --pretty=%s)
AAR_PATH="${{ steps.aar_paths.outputs.debug_aar_path }}"
if [ -n "$AAR_PATH" ] && [ -f "$AAR_PATH" ]; then
RESPONSE=$(curl -s -F document=@"$AAR_PATH" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[Bcore DEBUG AAR] $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
if [ "$MESSAGE_ID" != "null" ] && [ -n "$MESSAGE_ID" ]; then
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
fi
else
echo "Debug AAR not found at $AAR_PATH"
fi
- name: Send Bcore Release AAR to Telegram and Pin
run: |
COMMIT_MSG=$(git log -1 --pretty=%s)
AAR_PATH="${{ steps.aar_paths.outputs.release_aar_path }}"
if [ -n "$AAR_PATH" ] && [ -f "$AAR_PATH" ]; then
RESPONSE=$(curl -s -F document=@"$AAR_PATH" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[Bcore RELEASE AAR] $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
if [ "$MESSAGE_ID" != "null" ] && [ -n "$MESSAGE_ID" ]; then
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
fi
else
echo "Release AAR not found at $AAR_PATH"
fi
- name: Send black-reflection Artifact to Telegram and Pin
run: |
COMMIT_MSG=$(git log -1 --pretty=%s)
ART_PATH="${{ steps.additional_artifacts.outputs.black_reflection_path }}"
if [ -n "$ART_PATH" ] && [ -f "$ART_PATH" ]; then
FILENAME=$(basename "$ART_PATH")
RESPONSE=$(curl -s -F document=@"$ART_PATH" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[black-reflection] $FILENAME - $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
if [ "$MESSAGE_ID" != "null" ] && [ -n "$MESSAGE_ID" ]; then
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
fi
else
echo "black-reflection artifact not found at $ART_PATH"
fi
- name: Send compiler Artifact to Telegram and Pin
run: |
COMMIT_MSG=$(git log -1 --pretty=%s)
ART_PATH="${{ steps.additional_artifacts.outputs.compiler_path }}"
if [ -n "$ART_PATH" ] && [ -f "$ART_PATH" ]; then
FILENAME=$(basename "$ART_PATH")
RESPONSE=$(curl -s -F document=@"$ART_PATH" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[compiler] $FILENAME - $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
if [ "$MESSAGE_ID" != "null" ] && [ -n "$MESSAGE_ID" ]; then
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
fi
else
echo "compiler artifact not found at $ART_PATH"
fi
- name: Send ALL Debug APKs to Telegram and Pin
run: |
COMMIT_MSG=$(git log -1 --pretty=%s)
for APK in ./app/build/outputs/apk/debug/*.apk; do
if [ -f "$APK" ]; then
RESPONSE=$(curl -s -F document=@"$APK" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[DEBUG] $(basename $APK) $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
if [ "$MESSAGE_ID" != "null" ] && [ -n "$MESSAGE_ID" ]; then
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
fi
fi
done
- name: Send ALL Release APKs to Telegram and Pin
run: |
COMMIT_MSG=$(git log -1 --pretty=%s)
for APK in ./app/build/outputs/apk/release/*.apk; do
if [ -f "$APK" ]; then
RESPONSE=$(curl -s -F document=@"$APK" \
-F chat_id="$TELEGRAM_CHAT_ID" \
-F caption="[RELEASE] $(basename $APK) $COMMIT_MSG" \
https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendDocument)
MESSAGE_ID=$(echo $RESPONSE | jq '.result.message_id')
if [ "$MESSAGE_ID" != "null" ] && [ -n "$MESSAGE_ID" ]; then
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/pinChatMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d message_id="$MESSAGE_ID"
fi
fi
done