-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Termux debuggable to allow ADB 'run-as' #1969
Conversation
This resolves termux#924 and makes it possible to access Termux directrly from `adb shell` via `run-as`. Not totally elegant, but it works: ``` % adb shell dreamlte:/ $ run-as com.termux dreamlte:/data/data/com.termux $ PATH=/data/data/com.termux/files/usr/bin LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so /data/data/com.termux/files/usr/bin/bash -l ~ $ python Python 3.9.2 (default, Feb 22 2021, 12:26:04) [Clang 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489 on linux Type "help", "copyright", "credits" or "license" for more information. >>> ```
It would be useful to include a helper command that sets |
Now, I'm extremely new to Android development. Should research whether the |
Dude, you don't release app APKs in |
@agnostic-apollo What's the downside of enabling debuggable? Seems like a Digital Restrictions Management feature to "protect" the user from themselves. It's not like Termux has some trade secrets locked up in the app. The website https://termux.com/ lists Tinkerable in bold letters. Why disallow debugging by the device's owner? It enables a convenient feature requested in #924. |
@intgr Get a development build for yourself from Github Actions, what's the problem? https://github.com/termux/termux-app/suites/2272001163/artifacts/47404244 |
The downside will be that we will likely never be able to upload APKs to google play store again (even after solving targetsdk 29 issues). Check https://developer.android.com/studio/publish/preparing#turn-off-logging-and-debugging Uploading debuggable APKs will throw errors like You uploaded a debuggable APK or Android App Bundle. For security reasons you need to disable debugging before it can be published in Google Play. On top of that, debuggable APKs are not allowed by F-Droid builds either as mentioned here. Those are pretty small downsides, I think, well, not that small actually. But if this would allow you to Tinker, then, hell with those millions of users, you just say the word! |
Right, fair enough, then clearly this won't work. But there's no need to be such dicks about it.
You can see many people in #924 having this problem. This solution that you imply is so blindingly obvious was not mentioned, otherwise I wouldn't have went through this trouble. |
Adding "/s" or smileys would have decreased the impact of the said sarcasm. Wasn't being a dick. The solution would work but it isn't ideal for average users, since it would require manual update checking and apk signing keys issues would be there, i.e, all termux plugin apps will also need to be installed from github action builds. Installation would fail unless all APKs from other sources are uninstalled. |
This resolves #924 and makes it possible to access Termux directrly from
adb shell
viarun-as
.Not totally elegant, but it works: