Rabbit-R1/build.sh
Fiotux 7fb40e6c4b
uber apk signer fix
The original sh file contained a file path, that wasn't relative and wouldn't work like this an any system
2024-07-12 21:14:35 +02:00

42 lines
No EOL
1 KiB
Bash
Executable file

#!/bin/bash
# Prompt user for build type
Clear
echo "Select the build type:"
echo "1. Original"
echo "2. Android (No-Root)"
echo "3. Switch Port"
read -p "Enter your choice (1/2/3): " choice
# Set build type and smali folder based on user input
case $choice in
1)
build_type="original"
;;
2)
build_type="android (non root)"
;;
3)
build_type="switch port"
;;
*)
echo "Invalid choice. Exiting."
exit 1
;;
esac
# Build APK using apktool
apktool b "${build_type}/smali" -o "${build_type}/apk/Rabbit R1 ${build_type}.apk"
# Sign the APK
java -jar "./uber-apk-signer.jar" --apks "${build_type}/apk/Rabbit R1 ${build_type}.apk"
# Rename the signed APK
mv "${build_type}/apk/Rabbit R1 ${build_type}-aligned-debugSigned.apk" "${build_type}/apk/Rabbit R1 ${build_type}.apk"
# Decompile the APK using jadx
jadx -d "${build_type}/java" "${build_type}/apk/Rabbit R1 ${build_type}.apk"
rm "${build_type}/apk/Rabbit R1 ${build_type}-aligned-debugSigned.apk.idsig"
echo "Build and decompile process completed for ${build_type} build."