-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhijack.log_dump
executable file
·46 lines (31 loc) · 1.5 KB
/
hijack.log_dump
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/system/xbin/bash
# we put xbin first, so we get busybox instead of toolbox
export PATH="/system/bin:/system/xbin:${PATH}"
num=0
while busybox [ -d "$1.$num" ] ; do
num=$(busybox expr $num + 1)
done
busybox echo " running $0 and outputting to $1.$num/" >> "$1"
busybox echo " - making dump directory $1.$num/ ..." >> "$1"
busybox mkdir -p "$1.$num"
busybox echo " - dumping dmesg output to $1.$num/dmesg" >> "$1"
busybox dmesg > "$1.$num/dmesg"
busybox echo " - dumping /proc/mounts to $1.$num/mounts" >> "$1"
busybox cat /proc/mounts > "$1.$num/mounts"
busybox echo " - dumping /proc/cmdline to $1.$num/cmdline" >> "$1"
busybox cat /proc/cmdline > "$1.$num/cmdline"
busybox echo " - dumping /proc/partitions to $1.$num/partitions" >> "$1"
busybox cat /proc/partitions > "$1.$num/partitions"
busybox echo " - dumping toolbox ps output to $1.$num/ps_toolbox" >> "$1"
toolbox ps > "$1.$num/ps_toolbox"
busybox echo " - dumping busybox ps output to $1.$num/ps_busybox" >> "$1"
busybox ps w > "$1.$num/ps_busybox"
busybox echo " - dumping rootdir data to $1.$num/ls_root" >> "$1"
busybox ls -la / > "$1.$num/ls_root"
busybox echo " - dumping devdir data to $1.$num/ls_dev" >> "$1"
busybox ls -la /dev/* > "$1.$num/ls_dev"
busybox echo " - dumping diskfree data to $1.$num/df" >> "$1"
busybox df -h > "$1.$num/df"
busybox echo " - dumping getprop data to $1.$num/getprop" >> "$1"
getprop > "$1.$num/getprop"
busybox echo " system inventory complete" >> "$1"