Skip to content

Commit

Permalink
V1.7: Add Lamda
Browse files Browse the repository at this point in the history
  • Loading branch information
NasdaqGodzilla committed Nov 24, 2022
1 parent 45fe02e commit 98643d6
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ USER 1000
WORKDIR $HOME
RUN pip3 install objection

# lamda
USER 0
RUN apt install -y wget
USER 1000
WORKDIR $HOME
ENV FILENAME_LAMDA_SETUP="lamda_setup.sh"
ENV FILENAME_LAMDA="arm64-v8a.tar.gz-install.sh"
ENV FILENAME_LAMDA_URL="https://github.com/rev1si0n/lamda/releases/download/3.0.47/arm64-v8a.tar.gz-install.sh"
RUN wget $FILENAME_LAMDA_URL
COPY "$FILENAME_LAMDA_SETUP" $HOME

# clean
USER 0
RUN apt autoremove --purge -y && apt clean && apt autoclean && rm -rf /var/lib/apt/lists/*
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Docker image for Android reverse engineering tools. Android逆向工程工具Doc
5. V1.4: Add frida-dexdump
6. V1.5: Add frida-server, Bash script to setup frida-server
7. V1.6: Add Objection
8. V1.7: Add Lamda

# Usage

Expand Down
44 changes: 44 additions & 0 deletions lamda_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

function lamda_server_start() {
echo Lamda starting
# adb shell "nohup 2>&1 1&>/dev/null sh /data/local/tmp/arm64-v8a/bin/launch.sh" &
adb shell << EOF
sh /data/local/tmp/arm64-v8a/bin/launch.sh
exit
EOF
}

function lamda_server_setup_then_start() {
echo Lamda setup
adb push $HOME/$FILENAME_LAMDA /data/local/tmp
# adb shell "nohup 2>&1 1&>/dev/null sh /data/local/tmp/$FILENAME_LAMDA" &
adb shell << EOF
sh /data/local/tmp/$FILENAME_LAMDA
exit
EOF
}

function lamda_server_setup() {
local exists=`adb shell "[ -f /data/local/tmp/arm64-v8a/bin/launch.sh ] || echo 1"`
if [ -z "$exists" ]; then
echo "Lamda exists";
lamda_server_start
else
echo "Lamda doesn't exist";
lamda_server_setup_then_start
fi
}

function lamda_server_clean() {
rm -rf /data/local/tmp/arm64-v8a
rm -rf /data/usr
}

adb root

lamda_server_setup &
pip3 install -U lamda -q 1>/dev/null
echo Waiting lamda server up...
wait

0 comments on commit 98643d6

Please sign in to comment.