2022-11-04
Android Packet Capture

disable ssl pinning

use frida scripts specific to applications

justtrustme xposed

sslunpinning xposed

apk-mitm by repacking apk and resigning

capture, packet routing

recommend to use: PCAPdroid-API

PCAPdroid API reference

1
2
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
2
3
# this does not ensure that the target app is captured.
adb shell settings put global http_proxy <address>:<port>

Read More

2022-11-04
Adb Wifi Always On

adb over wifi always on

warning: could be dangerous cause adb remote connections seem without any password. consider protect that with some proxy.

turning on:

1
2
3
4
setprop service.adb.tcp.port 5555
stop adbd
start adbd

turning off:

1
2
3
4
setprop service.adb.tcp.port -1
stop adbd
start adbd

set things under /data/adb/services.d/ and make them executable

1
2
3
mount -o remount,rw /
# then you can modify /sytem/etc/init.d, but not /system/bin cause it is a copy of /data/system/bin. you should create script there.

create this under /system/etc/init.d/

1
2
3
4
5
6
7
service adb_wifi_enable /system/bin/adb_wifi_enable.sh
disabled
oneshot
seclabel u:r:magisk:s0
on property:sys.boot_completed=1
start adb_wifi_enable

Read More