To run llama.cpp
on Oneplus Ace2V, you need an extra step:
1 | export LD_LIBRARY_PATH=/vendor/lib64:/vendor/lib64/mt6983:/vendor/lib64/egl/mt6983 |
To run llama.cpp
on Oneplus Ace2V, you need an extra step:
1 | export LD_LIBRARY_PATH=/vendor/lib64:/vendor/lib64/mt6983:/vendor/lib64/egl/mt6983 |
use frida scripts specific to applications
justtrustme xposed
sslunpinning xposed
apk-mitm by repacking apk and resigning
recommend to use: PCAPdroid-API
1 | adb shell am start -e action start -e pcap_dump_mode udp_exporter -e collector_ip_address 127.0.0.1 -e collector_port 5123 -e app_filter com.tencent.mobileqq -n com.emanuelef.remote_capture.debug/com.emanuelef.remote_capture.activities.CaptureCtrl |
setting up http proxy via adb:
1 | # this does not ensure that the target app is captured. |
warning: could be dangerous cause adb remote connections seem without any password. consider protect that with some proxy.
turning on:
1 | setprop service.adb.tcp.port 5555 |
turning off:
1 | setprop service.adb.tcp.port -1 |
set things under /data/adb/services.d/
and make them executable
1 | mount -o remount,rw / |
create this under /system/etc/init.d/
1 | service adb_wifi_enable /system/bin/adb_wifi_enable.sh |
to change the resolution of android device run this command:
1 | # <width>x<height> |
launch scrcpy with HID simulation and screen off:
1 | scrcpy -SK |
run android in docker, run adb in docker
device discovery, termux daemon, remote unlock
unlock requires screenshot and input events.
https://technastic.com/unlock-android-phone-pin-pattern-adb/
click ok after input password:
https://stackoverflow.com/questions/29072501/how-to-unlock-android-phone-through-adb
scrcpy client
https://github.com/leng-yue/py-scrcpy-client
https://leng-yue.github.io/py-scrcpy-client/guide.html#bind-events
you want to use android emulator on macos m1?
https://github.com/google/android-emulator-m1-preview/releases/tag/0.3
check android screen lock/unlock state
https://android.stackexchange.com/questions/191086/adb-commands-to-get-screen-state-and-locked-state
Bonjour/Avahi/Zeroconf
logic: if the kill switch is off, when no physical input events happens, or not focused on scrcpy window with keyboard/mouse input events on pc for some time, allow to interact with the phone.
get physical events:
warning: this command could be offline for a short period of time after using the scrcpy. must automatically reconnect if the device is not offline.
1 | adb -s 192.168.10.3:5555 shell getevent |
to get focused window title:
hint: for headless ssh sessions, must set apropriate xorg environment variables, eg: env XAUTHORITY="/run/user/0/gdm/Xauthority" DISPLAY=:1 python3
general method:
1 | import pywinctl |
for linux:
1 | watch -n 2 xdotool getactivewindow getwindowname |
for macos: (allow permission first, deprecated since it will not get the window title instead of the program name)
https://alvinalexander.com/mac-os-x/applescript-unix-mac-osx-foreground-application-result/
(where is the window name?)
1 | sleep 3 && osascript -e 'tell application "System Events"' -e 'set frontApp to name of first application process whose frontmost is true' -e 'end tell' |
to get input events on macos:
download keylogger here:
https://hackernoon.com/writing-an-keylogger-for-macos-in-python-24adfa22722
https://github.com/beatsbears/pkl?ref=hackernoon.com
1 | python pkl_nowriting.py |
input events on linux:
1 | xinput test-xi2 --root |