Skip to content

Commit 165aaeb

Browse files
committed
Change from custom RC permission to INJECT_EVENTS for easier ADB
INJECT_EVENTS is a permission that allows a process to inject key/touch events into other apps. Not for 3rd party use, and signature protected with the system signature. If you have this you have complete power to automate usage of the HTTP Toolkit app anyway, so it seems sufficient, and it means that the adb shell user can automate the app with no user id or permission games at all.
1 parent 52b5ee6 commit 165aaeb

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

app/src/main/AndroidManifest.xml

+5-9
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
1717
tools:node="remove" />
1818

19-
<permission
20-
android:name="tech.httptoolkit.android.REMOTE_CONTROL_INTERCEPTION"
21-
android:protectionLevel="signature"
22-
/>
23-
2419
<application
2520
android:name=".HttpToolkitApplication"
2621
android:allowBackup="true"
@@ -64,14 +59,15 @@
6459

6560
<!--
6661
Alias that allows remote intents of ACTIVATE/DEACTIVATE from other apps, but only
67-
if they have RC permissions (same signature only). In practice, this is only used
68-
by debugging calls using ADB. Important to lock down or other apps could activate
69-
the VPN and pass a cert, to intercept all traffic from the phone without prompts.
62+
if they have INJECT_EVENTS (restricted system only permission, equivalent to complete
63+
control of the app anyway). In practice this is used to limit remote control to the
64+
shell user via ADB. It's important to lock this down or other apps could activate
65+
the VPN and pass a cert to send all traffic from the phone anywhere without prompts.
7066
-->
7167
<activity-alias
7268
android:name=".RemoteControlMainActivity"
7369
android:targetActivity=".MainActivity"
74-
android:permission="tech.httptoolkit.android.REMOTE_CONTROL_INTERCEPTION">
70+
android:permission="android.permission.INJECT_EVENTS">
7571
<intent-filter>
7672
<action android:name="tech.httptoolkit.android.ACTIVATE" />
7773
<category android:name="android.intent.category.DEFAULT" />

0 commit comments

Comments
 (0)