mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-02 03:05:30 +00:00
Separate receivers parsing in DumpsysReceivers
This commit is contained in:
parent
1c912f68fe
commit
4c3306c272
|
@ -43,15 +43,12 @@ class DumpsysReceivers(AndroidExtraction):
|
||||||
self.log.info("Found a receiver monitoring outgoing calls: \"%s\"",
|
self.log.info("Found a receiver monitoring outgoing calls: \"%s\"",
|
||||||
result["receiver"])
|
result["receiver"])
|
||||||
|
|
||||||
def run(self):
|
def parse_dumpsys_package(self, data):
|
||||||
self._adb_connect()
|
"""
|
||||||
|
Parse content of dumpsys package
|
||||||
output = self._adb_command("dumpsys package")
|
"""
|
||||||
if not output:
|
|
||||||
return
|
|
||||||
|
|
||||||
activity = None
|
activity = None
|
||||||
for line in output.split("\n"):
|
for line in data:
|
||||||
# Find activity block markers.
|
# Find activity block markers.
|
||||||
if line.strip().startswith(INTENT_NEW_OUTGOING_SMS):
|
if line.strip().startswith(INTENT_NEW_OUTGOING_SMS):
|
||||||
activity = INTENT_NEW_OUTGOING_SMS
|
activity = INTENT_NEW_OUTGOING_SMS
|
||||||
|
@ -93,4 +90,11 @@ class DumpsysReceivers(AndroidExtraction):
|
||||||
"receiver": receiver,
|
"receiver": receiver,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
self._adb_connect()
|
||||||
|
|
||||||
|
output = self._adb_command("dumpsys package")
|
||||||
|
if not output:
|
||||||
|
return
|
||||||
|
self.parse_dumpsys_package(output.split("\n"))
|
||||||
self._adb_disconnect()
|
self._adb_disconnect()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user