forked from 247321453/lamda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
281 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
#!/usr/bin/env python3 | ||
#encoding=utf-8 | ||
import os | ||
import sys | ||
import shutil | ||
from lamda.client import * | ||
import argparse | ||
|
||
cmd, host = sys.argv[1:] | ||
from os.path import isfile | ||
from lamda.client import * | ||
|
||
certfile = os.environ.get("CERTIFICATE", None) | ||
port = int(os.environ.get("LAMDAPORT", 65000)) | ||
|
||
d = Device(host, port=port, certificate=certfile) | ||
android_path = os.path.join("~", ".android") | ||
abs_android_path = os.path.expanduser(android_path) | ||
f = "adbkey.pub" | ||
|
||
argp = argparse.ArgumentParser() | ||
|
||
shutil.which("adb") or exit("no adb") | ||
argp.add_argument("action", nargs=1) | ||
argp.add_argument("device", nargs=1) | ||
|
||
os.popen("adb start-server").read() | ||
args = argp.parse_args() | ||
|
||
android_path = os.path.join("~", ".android") | ||
abs_android_path = os.path.expanduser(android_path) | ||
d = Device(args.device[0], port=port, | ||
certificate=certfile) | ||
cmd = args.action[0] | ||
|
||
os.chdir(abs_android_path) | ||
|
||
# try generate pubkey | ||
pubkey = os.popen("adb pubkey adbkey").read() | ||
open("adbkey.pub", "w").write(pubkey) | ||
open("adbkey.lamda", "w").write(pubkey) | ||
|
||
f = ("adbkey.lamda", f)[isfile(f)] | ||
|
||
func = getattr(d, "%s_adb_pubkey" % cmd) | ||
r = func("adbkey.pub") | ||
print ("OK: %s" % r) | ||
call = getattr(d, "%s_adb_pubkey" % cmd) | ||
exit(not call(f)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIEogIBAAKCAQEA4QHmY32OT+F+maERMn1cvBRuIOIXH9yOALG+GMCngtjRJzSR | ||
n09dInmXE+PjiAqNRWvknVEjFywv0v1v/H2qSRJKR/togPgySjiABhigqDHdirNd | ||
Dh63oN2e+d0yythoLzsQrH5BSVtw05Atpkr7bW4KdfMveWuddvDACnQ3mvCXq50X | ||
IK3cOlmHXwcJrX55BhEXxgHIqw0upf0A7DC3Afz5xjOA6+K/O2EzZIIJ+sWw7/Ko | ||
5+3m98Et0zwcxe20uNxzYf7JSMu3490YNckLiQcDrZVRUXNS70HO9HWCXKdjFJPi | ||
GgPtKUQNHjChwzSCQQGzqitXdwa60i9Sy1U09wIBIwKCAQAzbiYIHLLQbg5PAD5x | ||
8MS9Rn+SfNIV6UUHeRWCACZJyyh9/WMdGXRfpsNyQreqEQpZArfpcaGe5YdGK0zL | ||
/3dhKMCFe0sWKhofl+K/kJnAC2XWj2W6FaZQp69PDfz7KiZxMhJwkeMJc/yIIPR9 | ||
x/70cOxyuz4NH+l6Rag8510qujhxn6lGc1+ZNHGeAYmUD7wFz9/QYDZU9C0YcylA | ||
2+Q5woU3L4b3y3JKqB6/dnsP9uF7R5KBR+qiqOwVm0nhvVU5uwbpQwTXeklopXyN | ||
rI/NeYcsDoEyb8NquVXX/GkOgY0FhqblGUR9kSdTLHq6VamelHc+dczZgMxcsq1c | ||
mnnLAoGBAP2FPssFpHJRhSr38Fq5A7mEjQeiPq2WgYV7kCpJT5F5OymcCCETIjEH | ||
4pTk5zCWUuIBx5LlzSa0XnQSYb0100ZzvDgfm1NPmqdkpPwkkbh2xyoHYTTPJ3WG | ||
TDur8Qyi83NteveszO1TCAGBTe3zN+2ov9qzl5Y7QHF94GVFDo4NAoGBAOM1Q8eG | ||
0KeqjutTz/UMtejoFpz0Hi1g32PfdQInHx8MDslYu3Fcpnos3xf59H7+mrRy0fUM | ||
hh27v7DiUvxUfhlojf0F3kDKeg9VZBslZF3vTCpFdKdFouZ2Cru3lCoaPSau69BC | ||
6HQw4P+RABrgxc6CeE9FUGEEMss+wTcRItITAoGBAO8ImkpkZ9mAD9gOV6X+5kEz | ||
1W2Y+USVOEqns9AZPGSW4AKpDvqdAvsHbzvtxAk9RtUXnumW118B1WYf9cEG3SUr | ||
SxBYUJ8B6ZaDdvxc/mwYOCBQGdK0sCz692t2OwvqGL1J95kQo/W0r8bnoT9wSqzg | ||
72fN5rI33azVxPHExJSPAoGAGfd1deOFj4E057HOn6muY8LAwXr8InF4nbMjULQD | ||
joUJARF0gfv1xNHtnFcUoMyj912UVoUWpE/4poBD/5SgsnJZXr7XkmBIdsfuLvz1 | ||
hxQItF+1j3WsN5h2QVbPGsErj2RyuLcwgk66oN1fGQO+1cXEm1hg9SUNHorUQM7C | ||
JqMCgYEAofxXJ8dOWUaFIHmKLE7Y+0+i3D1yXVIyu/puuaQGbNFHxjcJ9ZdubhLN | ||
IyzJvngtM7mC90FtUETxvErMGdTzFeKtSKBZsJ8BiLCszRCEuJf5RX6uNrFUQ2pT | ||
PEmns088Gs4KUDwjTG0zQtj3pNc5zDynDMpFKp96spefqLJqw3s= | ||
-----END RSA PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/sbin/sh | ||
source /data/adb/magisk/util_functions.sh | ||
|
||
if [ ${MAGISK_VER_CODE} -lt 20400 ]; then | ||
abort "Please install Magisk v20.4 +" | ||
exit 1 | ||
fi | ||
|
||
if [ "${BOOTMODE}" != "true" ]; then | ||
abort "Must install from Magisk app" | ||
fi | ||
|
||
OUTFD=$2 | ||
ZIPFILE=$3 | ||
install_module | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#MAGISK |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/system/bin/sh | ||
base=${0%/*} | ||
ABI=$(getprop ro.product.cpu.abi) | ||
launch="sh ${base}/${ABI}/bin/launch.sh" | ||
cert=${base}/config/lamda.pem | ||
port=65000 | ||
|
||
sleep 30 | ||
# where to locate properties.local | ||
export CFGDIR=${base}/etc | ||
if [ -f "${cert}" ]; then | ||
$launch --port=${port} --certificate=${cert} | ||
else | ||
$launch --port=${port} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/system/bin/sh | ||
ABI=$(getprop ro.product.cpu.abi) | ||
SERVER=$TMPDIR/$ABI.tar.gz | ||
BB="/data/adb/magisk/busybox" | ||
CONFDIR="$MODPATH/config" | ||
|
||
export LATESTARTSERVICE=true | ||
|
||
ui_print ".____ ________ _____ " | ||
ui_print "| | _____ _____ \______ \ / _ \ " | ||
ui_print "| | \__ \ / \ | | \ / /_\ \ " | ||
ui_print "| |___ / __ \_| Y Y \ | | \/ | \ " | ||
ui_print "|_______ \(____ /|__|_| / /_______ /\____|__ / " | ||
ui_print " \/ \/ \/ \/ \/ " | ||
ui_print " installer " | ||
|
||
pushd $(pwd) | ||
cd $MODPATH | ||
if [ ! -f $SERVER ]; then | ||
abort "${ABI}.tar.gz not found in archive" | ||
fi | ||
|
||
ui_print "- Extracting server files" | ||
$BB tar -xzf $SERVER | ||
|
||
mkdir -p $CONFDIR | ||
|
||
cp -af $TMPDIR/properties.local $CONFDIR | ||
cp -af $TMPDIR/lamda.pem $CONFDIR | ||
|
||
ui_print "- Please reboot your device" | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
id=lamda | ||
name=LAMDA | ||
version=3.0 | ||
versionCode=3000 | ||
author=rev1si0n | ||
description=Android reverse engineering & automation framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/system/bin/sh | ||
MODPATH=${0%/*} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters