Skip to content

Commit 6da3736

Browse files
committed
get all mounts, not just /system
1 parent 6cf3f2c commit 6da3736

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

modules/mounts.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
package modules
77

88
import (
9-
"slices"
109
"path/filepath"
10+
"slices"
1111
"strings"
1212

1313
"github.com/mvt-project/androidqf/acquisition"
@@ -37,9 +37,9 @@ func (m *Mounts) Run(acq *acquisition.Acquisition, fast bool) error {
3737

3838
var mountsData []string
3939

40-
// Run "mount | grep '/system'"
41-
log.Debug("Running: mount | grep '/system'")
42-
out1, err1 := adb.Client.Shell("mount | grep '/system'")
40+
// Run "mount"
41+
log.Debug("Running: mount")
42+
out1, err1 := adb.Client.Shell("mount")
4343
if err1 == nil && out1 != "" {
4444
lines := strings.Split(strings.TrimSpace(out1), "\n")
4545
for _, line := range lines {
@@ -48,12 +48,12 @@ func (m *Mounts) Run(acq *acquisition.Acquisition, fast bool) error {
4848
}
4949
}
5050
} else {
51-
log.Debug("mount | grep '/system' command failed or returned empty result")
51+
log.Debug("mount command failed or returned empty result")
5252
}
5353

54-
// Run "cat /proc/mounts | grep '/system'"
55-
log.Debug("Running: cat /proc/mounts | grep '/system'")
56-
out2, err2 := adb.Client.Shell("cat /proc/mounts | grep '/system'")
54+
// Run "cat /proc/mounts"
55+
log.Debug("Running: cat /proc/mounts")
56+
out2, err2 := adb.Client.Shell("cat /proc/mounts")
5757
if err2 == nil && out2 != "" {
5858
lines := strings.Split(strings.TrimSpace(out2), "\n")
5959
for _, line := range lines {
@@ -67,7 +67,7 @@ func (m *Mounts) Run(acq *acquisition.Acquisition, fast bool) error {
6767
}
6868
}
6969
} else {
70-
log.Debug("cat /proc/mounts | grep '/system' command failed or returned empty result")
70+
log.Debug("cat /proc/mounts command failed or returned empty result")
7171
}
7272

7373
log.Debugf("Found %d mount entries", len(mountsData))

0 commit comments

Comments
 (0)