Skip to content

Commit

Permalink
mod rvba script
Browse files Browse the repository at this point in the history
  • Loading branch information
shrihankp committed Sep 3, 2022
1 parent 27b8a53 commit a975449
Showing 1 changed file with 65 additions and 65 deletions.
130 changes: 65 additions & 65 deletions rvba/build-rvba-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,40 @@ if [[ -z $1 ]] || [[ $1 == aarch64 ]]; then
cp ~/bootstrap-aarch64.zip app/src/main/cpp
end_group

log "Patching termux-bootstrap-zip.S" y
cat <<EOF >app/src/main/cpp/termux-bootstrap-zip.S
asm
.global blob
.global blob_size
.section .rodata
blob:
#if defined __i686__
#elif defined __x86_64__
#elif defined __aarch64__
.incbin "bootstrap-aarch64.zip"
#elif defined __arm__
#else
# error Unsupported arch
#endif
1:
blob_size:
.int 1b - blob
EOF
end_group

log "Patching app/build.gradle" y
sed -i "s#include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'#include 'arm64-v8a'#g" app/build.gradle
end_group

log "Patching terminal-emulator/build.gradle" y
sed -i "s#abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'#abiFilters 'arm64-v8a'#g" terminal-emulator/build.gradle
end_group
# log "Patching termux-bootstrap-zip.S" y
# cat <<EOF >app/src/main/cpp/termux-bootstrap-zip.S
#asm
# .global blob
# .global blob_size
# .section .rodata
# blob:
# #if defined __i686__
#
# #elif defined __x86_64__
#
# #elif defined __aarch64__
# .incbin "bootstrap-aarch64.zip"
# #elif defined __arm__
#
# #else
# # error Unsupported arch
# #endif
# 1:
# blob_size:
# .int 1b - blob
#EOF
# end_group
#
# log "Patching app/build.gradle" y
# sed -i "s#include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'#include 'arm64-v8a'#g" app/build.gradle
# end_group
#
# log "Patching terminal-emulator/build.gradle" y
# sed -i "s#abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'#abiFilters 'arm64-v8a'#g" terminal-emulator/build.gradle
# end_group

log "Building app for aarch64" y
./gradlew -a --daemon --parallel --build-cache --configuration-cache assembleDebug
./gradlew assembleDebug
end_group

elif [[ $1 == arm ]]; then
Expand All @@ -107,41 +107,41 @@ elif [[ $1 == arm ]]; then
cp ~/bootstrap-arm.zip app/src/main/cpp
end_group

log "Patching termux-bootstrap-zip.S" y
cat <<EOF >app/src/main/cpp/termux-bootstrap-zip.S
asm
.global blob
.global blob_size
.section .rodata
blob:
#if defined __i686__
#elif defined __x86_64__
#elif defined __aarch64__
#elif defined __arm__
.incbin "bootstrap-arm.zip"
#else
# error Unsupported arch
#endif
1:
blob_size:
.int 1b - blob
EOF
end_group

log "Patching app/build.gradle" y
sed -i "s#include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'#include 'armeabi-v7a'#g" app/build.gradle
end_group

log "Patching terminal-emulator/build.gradle" y
sed -i "s#abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'#abiFilters 'armeabi-v7a'#g" terminal-emulator/build.gradle
end_group
# log "Patching termux-bootstrap-zip.S" y
# cat <<EOF >app/src/main/cpp/termux-bootstrap-zip.S
#asm
# .global blob
# .global blob_size
# .section .rodata
# blob:
# #if defined __i686__
#
# #elif defined __x86_64__
#
# #elif defined __aarch64__
#
# #elif defined __arm__
# .incbin "bootstrap-arm.zip"
#
# #else
# # error Unsupported arch
# #endif
# 1:
# blob_size:
# .int 1b - blob
#EOF
# end_group
#
# log "Patching app/build.gradle" y
# sed -i "s#include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'#include 'armeabi-v7a'#g" app/build.gradle
# end_group
#
# log "Patching terminal-emulator/build.gradle" y
# sed -i "s#abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'#abiFilters 'armeabi-v7a'#g" terminal-emulator/build.gradle
# end_group

log "Building app for arm" y
./gradlew -a --daemon --parallel --build-cache --configuration-cache assembleDebug
./gradlew assembleDebug
end_group

else
Expand Down

0 comments on commit a975449

Please sign in to comment.