Closed navarroaxel closed 3 years ago
Makes sense to me. There are many Android-savvy people out there who would be mad about it.
Makes sense to me. There are many Android-savvy people out there who would be mad about it.
@Yutyo Which option do you like?
I'm inclinded towards option 2, because the way most people call these commands is via adb shell <command>
โcorrect?
Also, can any Linux commands like cat
, tar
, ps
, etc. be called from the same shell where these commands can be called like normal commands? Or is the shell special, so that only these commands e.g. logcat
can be called within?
@Yutyo Which option do you like?
create an android
folder.
The reason I'm not keen on making a pages/android
folder is: how many commands will we put in? Only a few, like 10, probably. Also, are these actually available in the Android OS without the debugging (i.e. can any normal user run them from a terminal app, if such a thing exists on Android?). In that case, they're not really Android commands, they're more like Android Studio commands (if that's what's providing them.)
@bl-ue you can install Termux https://play.google.com/store/apps/details?id=com.termux and run android commands using just the phone.
Ah okay, I didn't know that (I'm not a Droid guy ๐). Can any user run logcat
that way, regardless of whether or not they're a developer?
Android is a Linux-based OS and it can run most Linux CLI tools.
So I would put the Android-specific commands in linux/
(same as we have some Debian-specific commands in there).
Also, are these actually available in the Android OS without the debugging (i.e. can any normal user run them from a terminal app, if such a thing exists on Android?)
You can totally run a terminal on Android. Termux is the most popular app for doing that. (It also comes with apt
so you can install additional tools.)
Also, can any Linux commands like cat, tar, ps, etc. be called from the same shell where these commands can be called like normal commands?
The Android is shell is a classic Linux shell. You can also run zsh, fish, etc.
Okay, I didn't know this. Thanks for the explanation @Rudloff.
@Rudloff: Can any user run logcat that way, regardless of whether or not they're a developer?
Any user can open a terminal app and then call logcat
.
(Some other Android commands require the user to have root privileges.)
Not everyone agrees, but the Linux Foundation considers Android a Linux distribution.
Okay, then I strongly vote for option 3. If they're normal commands on Android, then definitely we should treat them as such.
cool @bl-ue, but @Rudloff propone to leave this command under the linux/
platform.
Yeah, sorry, I concur. I mean "option 3 but under pages/linux
" ๐๐ป
Android is a Linux-based OS and it can run most Linux CLI tools. So I would put the Android-specific commands in
linux/
(same as we have some Debian-specific commands in there).Also, are these actually available in the Android OS without the debugging (i.e. can any normal user run them from a terminal app, if such a thing exists on Android?)
You can totally run a terminal on Android. Termux is the most popular app for doing that. (It also comes with
apt
so you can install additional tools.)Also, can any Linux commands like cat, tar, ps, etc. be called from the same shell where these commands can be called like normal commands?
The Android is shell is a classic Linux shell. You can also run zsh, fish, etc.
Android doesn't have GNU utils tho. Its also not a Linux OS but only uses Linux as a kernel, and uses a modified one.
Great discussion here. So we've established that commands like logcat
are normal commands that you can run in a shell on an Android device. In this case, we do not want to file then as asb-shell-{{command_name}}
as I initially thought.
In terms On the one hand, Android uses a (modified) Linux kernel, suggesting we should put pages in linux
, and you cna use a Bash shell as with any other Linux distribution.
On the other hand, Android devices generally have sufficiently different layout of commands that we might want to consider giving Android it's own platform. Supporting this idea is the lack of Gnu coreutils.
Personally, I would perhaps suggest that a new platformandroid
might be the better option here. Given my (extremely limited) experience with the layout of commands in an Android terminal shell, I'm seeing Android as different to a "regular" linux machine as macOS is - in that macOS runs Bash, but it has a number of platform-specific differences that mean it needss it's own set of pages for stuff like mv
, cp
, etc.
I don't mind having a new android
platform. (It's just that it will not have a lot of pages.)
Is there even a tldr client for android? Because otherwise you'd have to specify --os android
every time. But we also can't put it to linux
since the adb shell
works under windows and macos as well.
I don't know how it works, but I use the python client in Arch Linux with the default installation options and I can request macOS pages without extra params just:
tldr bless
If a user change it to use a specific platform I think the expect result for Android platform pages (not found) it's correct.
Huh, good point. Yes, we have an Android client: https://github.com/Techno-Disaster/tldr-flutter. You can see all of our known clients here.
As for the adb shell
problem, I just though of an idea: we could create common/adb-shell-<command>.md
as a link to linux/<command>.md
.
Thoughts?
Technically, it is also possible to run the Node or Python CLI clients in an Android shell.
As for the adb shell problem, I just though of an idea: we could create common/adb-shell-
.md as a link to linux/ .md.
On one hand, most users will run Android commands through adb shell
, so I guess it makes sense to document it.
On the other hand, any command can be called through adb shell
, so were do we draw the line? Should we create adb-shell-ls.md
?
(It is a bit like saying that you can call Linux commands through SSH, so we should create ssh-<command>.md
.)
Maybe if we have an android
platform, adb-shell.md
could mention that Android-specific commands are documented in the android folder?
Yeah, let's do something like. I didn't realize that adb shell
could execute any command. Ignore my above idea, then.
Yeah, let's do something like. I didn't realize that
adb shell
could execute any command. Ignore my above idea, then.
@bl-ue maybe we should let that clear in the adb-shell
page.
So, could we unblock the android command pages and close this ticket?
I'd suggest we create a new platform for android
here. This will in some clients necessitate a minor client update - specifically our Android clients (which will have to update their page resolution algorithms to pull from the android
platform first), so we'll probably want to @mention their authors here.
Despite this, it shouldn't break anything if we just start merging PRs that add the new platform. We did the same for windows
. The client spec mandates that clients at least do not get upset if new platforms are added - and recommends that support for new platforms is automatic.
Any client issues are issues of correctness as opposed to breakages, so I think it's safe to just start merging PRs today.
cc @Techno-Disaster @hidroh
The flutter client should not be affected. I don't check the OS there and show those commands first. Have a small script updating this txt file every 6 hours. New commands get added in a key(command) and value(platform) pair, and I show this in the search page.
@Techno-Disaster all Android clients should be updated to check the android
folder (if it exists) first, before any others.
@Techno-Disaster all Android clients should be updated to check the
android
folder (if it exists) first, before any others.
I'll look into this soon.
This issue was closed as the issue at hand has been resolved: the new android
platform has been created.
(@marchersimon, next time perhaps you could leave a comment when closing issues to explain why for the record? It helps keep everyone on the same page :slightly_smiling_face:)
Where should we store the pages dedicated to native Android commands that run only inside an shell session running in an Android device or emulator open via
adb shell
?Alternatives:
android
platform folder.common/
under theadb-shell-{{command}}.md
structure.common/
as a regular command like https://github.com/tldr-pages/tldr/blob/master/pages/linux/logcat.md