سحرارآمیز

- find large files
$ df -h
# du -xh / | sort -h | tail -n 20
# ncdu /
- free some space on arch
https://wiki.archlinux.org/title/Pacman#Cleaning_the_package_cache ]
$ paccache -r
# pacman -Sc
# pacman -Rns $(pacman -Qtdq)
# pacman -Scc
# journalctl --vacuum-time=7d
# journalctl --vacuum-size=100M
$ docker system prune -af
- add auth key for adb when can not authorize automatically
[mohsen@desktop]$ ssh-keygen -t rsa -b 2048 -f ~/.android/adbkey
[mohsen@desktop]$ adb push ~/.android/adbkey.pub /data/misc/adb/
adb shell
[mohsen@android]$ su
[mohsen@android]# chmod 600 /data/misc/adb/adbkey.pub
[mohsen@desktop]$ adb kill-server
[mohsen@desktop]$ adb start-server
- adb over network
[mohsen@desktop]$ adb shell
[mohsen@android]$ su
[mohsen@android]# setprop service.adb.tcp.port 5555
[mohsen@android]# stop adbd
[mohsen@android]# start adbd
- proxy only one app on android
[mohsen@android]$ pm list packages
[mohsen@android]# dumpsys package ir.mservices.market | grep userId= | cut -d "=" -f2
[mohsen@android]# iptables -t nat -A OUTPUT -m owner --uid-owner 10186 -p tcp -j DNAT --to-destination 192.168.1.100:8080
- setup frida
[mohsen@desktop]$ adb push frida-server /data/local/tmp/
[mohsen@desktop]$ adb shell "chmod 755 /data/local/tmp/frida-server"
[mohsen@desktop]$ adb shell "/data/local/tmp/frida-server &"
[mohsen@desktop]$ adb shell "su -c chmod 755 /data/local/tmp/frida-server"
[mohsen@android]# netstat -anp | grep frida
- pm list packages
[mohsen@desktop]$ uv tool install frida
[mohsen@desktop]$ adb shell getprop ro.product.cpu.abilist # check your device cpu type
[mohsen@desktop]$ frida-ps -U
[mohsen@desktop]$ frida -U -n package_name -l sslbypass.js
- install system CA:
[mohsen@desktop]$ adb shell
[mohsen@android]$ su
[mohsen@android]$ mount -o rw,remount /system
[mohsen@android]$ cp /sdcard/mycert.crt /system/etc/security/cacerts/xxxxxx.0
[mohsen@android]$ chmod 644 /system/etc/security/cacerts/xxxxxx.0
- how to get the xxxxxx ?
[mohsen@desktop]$ openssl x509 -inform PEM -subject_hash_old -in yourcert.crt | head -1