Fixes import and adds test for PR 361

This commit is contained in:
tek 2023-07-10 22:55:22 +02:00
parent 1968a0fca2
commit e7270d6a07
4 changed files with 22 additions and 3 deletions

View File

@ -6,8 +6,8 @@
import json
import logging
import os
from typing import Any, Dict, Iterator, List, Optional, Union
from functools import lru_cache
from typing import Any, Dict, Iterator, List, Optional, Union
import ahocorasick
from appdirs import user_data_dir

View File

@ -3,12 +3,12 @@
# Use of this software is governed by the MVT License 1.1 that can be found at
# https://license.mvt.re/1.1/
import cProfile
import datetime
import hashlib
import logging
import os
import re
import cProfile
from typing import Any, Iterator, Union
from rich.logging import RichHandler

View File

@ -20,7 +20,7 @@ class TestDumpsysParsing:
res = parse_dumpsys_appops(data)
assert len(res) == 12
assert len(res) == 13
assert res[0]["package_name"] == "com.android.phone"
assert res[0]["uid"] == "0"
assert len(res[0]["permissions"]) == 1

View File

@ -98,3 +98,22 @@ Current AppOps Service state:
TOAST_WINDOW (allow):
READ_EXTERNAL_STORAGE (allow):
WRITE_EXTERNAL_STORAGE (allow):
Uid u0a110:
state=cch
COARSE_LOCATION: mode=ignore
LEGACY_STORAGE: mode=allow
Package org.fdroid.fdroid:
SYSTEM_ALERT_WINDOW (default):
Reject: [top-s]2021-10-25 23:46:46.738 (-100d15h17m19s123ms) proxy[uid=0, pkg=null]
TOAST_WINDOW (allow):
Access: [bg-s] 2022-01-24 05:16:25.882 (-10d8h47m39s979ms) duration=+1s942ms proxy[uid=0, pkg=null]
Access: [cch-s] 2021-11-19 05:10:10.740 (-76d8h53m55s121ms) proxy[uid=0, pkg=null]
READ_EXTERNAL_STORAGE (allow):
WRITE_EXTERNAL_STORAGE (allow):
RUN_IN_BACKGROUND (allow):
Access: [top-s] 2022-02-02 23:20:35.135 (-14h43m30s726ms) proxy[uid=0, pkg=null]
Access: [bg-s] 2022-02-03 11:24:26.636 (-2h39m39s225ms) proxy[uid=0, pkg=null]
Access: [cch-s] 2022-02-03 11:24:25.771 (-2h39m40s90ms) proxy[uid=0, pkg=null]
REQUEST_INSTALL_PACKAGES (allow):
Access: [top-s] 2022-02-02 23:20:13.096 (-14h43m52s765ms) proxy[uid=0, pkg=null]
REQUEST_DELETE_PACKAGES (allow):