File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Prepare:
4
+ # 1. Smartphone or Android Lab
5
+ # 2. Install adb tools
6
+ # 3. Connect to android lab with adb tools
7
+
8
+ # ## How to view android content ?
9
+
10
+ # $ adb install catch.apk
11
+ # $ adb shell pm path com.threebanana.notes
12
+ # $ adb pull /path/to/catch.apk .
13
+ # $ apktool d catch.apk
14
+ # $ grep -Rih -o "content://[^\"]*" ./ | sort -u
15
+ # $ adb shell content query --uri 'content://xxx/xxx/xxx'
16
+
17
+ apkfile=$1
18
+
19
+ if [ -z " $apkfile " ]; then
20
+ echo -e " [*] Usage: $0 <apkfile>"
21
+ exit 0
22
+ fi
23
+
24
+ echo " [*] apktool decode <$apkfile >"
25
+ apktool d " $1 " -o output/
26
+
27
+ echo " [*] enum all content strings"
28
+ contents=$( grep -Rih -o " content://[^\" ]*" ./output/ | sort -u)
29
+ for content in $contents ; do
30
+ echo -e " \n[*] Enum <$content >"
31
+ adb shell content query --uri " $content "
32
+ done
You can’t perform that action at this time.
0 commit comments