Skip to content

Commit 203d5df

Browse files
Fix visibility of background service apps (#89)
* Fix filename sanitization to allow parentheses (fixes #86) * Fix #84: Add QUERY_ALL_PACKAGES permission to display background service apps
1 parent dfd5980 commit 203d5df

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,8 @@
5050
android:name="android.permission.ENFORCE_UPDATE_OWNERSHIP"
5151
tools:node="remove" />
5252

53-
<!-- Query all installed packages on Android 11+ without QUERY_ALL_PACKAGES -->
54-
<queries>
55-
<intent>
56-
<action android:name="android.intent.action.MAIN" />
57-
<category android:name="android.intent.category.LAUNCHER" />
58-
</intent>
59-
</queries>
53+
<!-- Require QUERY_ALL_PACKAGES to see background services without launcher intents -->
54+
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
6055

6156
<application
6257
android:name=".App"

core/src/main/java/app/pwhs/core/install/ApkExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ object ApkExtractor {
323323
val cleaned = name.map { c ->
324324
when {
325325
c.isLetterOrDigit() -> c
326-
c == ' ' || c == '-' || c == '_' || c == '.' -> c
326+
c == ' ' || c == '-' || c == '_' || c == '.' || c == '(' || c == ')' -> c
327327
else -> '_'
328328
}
329329
}.joinToString("").trim().ifBlank { "app" }

0 commit comments

Comments
 (0)