-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ADB shell showing weird chars #22752
Comments
@docds are you on windows? or which terminal is this that doesnt support ansi? can you try appluing this patch and see if at least the 2K disappears? diff --git a/libr/cons/dietline.c b/libr/cons/dietline.c
index 229aaf451d..25a1e6d65d 100644
--- a/libr/cons/dietline.c
+++ b/libr/cons/dietline.c
@@ -1760,7 +1752,7 @@ R_API const char *r_line_readline_cb(RLineReadCallback cb, void *user) {
bool o_do_setup_match = I.history.do_setup_match;
I.history.do_setup_match = true;
if (I.echo && cons->context->color_mode) {
- r_cons_clear_line (0);
+ // r_cons_clear_line (0);
}
(void) r_cons_get_size (&rows);
switch (*buf) { |
I make build on Debian 12.5 with default terminal (VirtualBox), but testing from Windows 10 (cmd) After start r2 in cmd through "adb shell" terminal looks like that:
Wen I pres first key "d":
"dc" pressed
"Enter" pressed
|
Ah that makes sense, those escape codes are ANSI and windows terminal doesnt support them, so i would suggest you to do the following thing:
this will use fgets instead of the dietline input method, which will not have autocompletion or ansi escape codes. but i would suggest you to try another terminal that supports this or just use ssh into the device. are the colors working? or you need to do -e scr.color=0 too? |
Thanks. Cmd indeed was culprit. I found brand new replacement for CMD from Microsoft. Leave it here for feather generations. :-). I will going to get some Raspberry Pi (4/5) device and put there Android and do some experiment. |
But still. its weird because the colors work in cmd->adb, the issue seems to be only in the repl prompt 🤔 |
maybe it is unrelated.
I tried use my build on emulator and xiaomi android 14 device through adb shell
On both appear artifacts around cursor:
by @docds
reported #22750 (comment)
The text was updated successfully, but these errors were encountered: