Skip to content

Commit

Permalink
fix/aldroid_greedy_application_regex
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianbuck committed Dec 1, 2023
1 parent 5852c29 commit d7b73a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Formula/aldroid.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Aldroid < Formula
version "0.3.8"
version "0.3.9"

desc "This tool transforms Android APKs to make them debuggable and MITMable/Charlesable"
homepage "https://github.com/AppLovin/homebrew-Mobile-Tools"
Expand Down
6 changes: 3 additions & 3 deletions aldroid
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Example Usage: ./aldroid.sh d com.applovin.enterprise.apps.demoapp
#

VERSION=0.3.8
VERSION=0.3.9

usage() {
cat <<EOF
Expand Down Expand Up @@ -250,7 +250,7 @@ make_decompiled_debuggable() {
local NSC_NAME="network_security_config"
# Since networkSecurityConfig is not defined, set our default in the Android Manifest if it is not in the application tag
if [[ -z $NSC_GREP ]]; then
sed -E "s/(<application.*)(>)/\1 android\:networkSecurityConfig=\"@xml\/$NSC_NAME\" \2 /" "$INPUT_DIRECTORY/AndroidManifest.xml" > "$INPUT_DIRECTORY/AndroidManifest.xml.tmp"
sed -E "s/(<application)/\1 android\:networkSecurityConfig=\"@xml\/$NSC_NAME\" /" "$INPUT_DIRECTORY/AndroidManifest.xml" > "$INPUT_DIRECTORY/AndroidManifest.xml.tmp"
mv "$INPUT_DIRECTORY/AndroidManifest.xml.tmp" "$INPUT_DIRECTORY/AndroidManifest.xml"
else
# networkSecurityConfig is defined, find the name via regex
Expand Down Expand Up @@ -325,7 +325,7 @@ EOM
if grep -i "android:debuggable=\"false\"" "$INPUT_DIRECTORY/AndroidManifest.xml"; then
sed -i "" "s|android:debuggable=\"false\"|android:debuggable=\"true\"|g" "$INPUT_DIRECTORY/AndroidManifest.xml"
elif ! grep -i "android:debuggable" "$INPUT_DIRECTORY/AndroidManifest.xml"; then
sed -E "s/(<application.*)(>)/\1 android\:debuggable=\"true\" \2 /" "$INPUT_DIRECTORY/AndroidManifest.xml" > "$INPUT_DIRECTORY/AndroidManifest.xml.tmp"
sed -E "s/(<application)/\1 android\:debuggable=\"true\" /" "$INPUT_DIRECTORY/AndroidManifest.xml" > "$INPUT_DIRECTORY/AndroidManifest.xml.tmp"
mv "$INPUT_DIRECTORY/AndroidManifest.xml.tmp" "$INPUT_DIRECTORY/AndroidManifest.xml"
fi

Expand Down

0 comments on commit d7b73a0

Please sign in to comment.