0

I am a Linux enthusiast and probable expert, and using it since 1993 on the command line (today with zsh) (and Unix since 1987, SunOS3.2).

I personally have a Huawei tablet, details here. With an SD card.

I also have a Logitech Bluetooth keyboard case for that tablet.

I need to be able to read some PDF documents on the tablet without a working internet connection. (at my work at CEA/LIST - a quite bureaucratic organization since indirectly related to French nuclear warheads, I have a powerful Dell workstation with root access & Ethernet connection to the Internet under Debian/Unstable - so sometimes Xorg does not work properly -, but no access to the corporate Wifi; for the clips-rule-gcc project I prefer to read the CLIPS documentation on my BYOD tablet).

If my tablet was good genuine Linux Debian system, I would just wget http://clipsrules.sourceforge.net/documentation/v640/bpg.pdf when Internet is available, and later evince bpg.pdf when it is not, taking advantage of zsh auto completion facilities.

What are the equivalent on Android 8 ?

My AppStore is google, and I was not yet able to root my tablet. Dreaming of that every day.

  • 1
    Depending on your device/ROM, it ships with either toolbox, toybox or busybox. At least the latter usually ships with wget, which you then could use either directly (wget ..) or indirectly (busybox wget ..); you can try the same with toolbox if available, but that and toybox usually don't have wget. Last resort would be installing a busybox app from your favorite store. As for PDF readers, there are plenty. – Izzy Feb 25 at 7:23
  • I am veryu unfamiliar with Android. busybox don't work without root access. rootchecker costs me 3.5€. Can I avoid that? – Basile Starynkevitch Feb 25 at 7:33
  • 2
    @BasileStarynkevitch busybox or any static built binaries work perfectly on non-rooted Android. Use with adb shell or any terminal emulator app. Termux is a good one. – Irfan Latif Feb 25 at 7:46
  • adb push busybox /data/local/tmp – alecxs Feb 25 at 9:17
  • i don't fully understand the question is about cmd line or app recommendation, why don't you just install any pdf viewer (like OfficeSuite) you can even open pdf from cmd line if this is requirement – alecxs Feb 25 at 10:53
2

Did you tried Termux? The terminal emulator for android, this does not require any root access either.

enter image description here

Edit: to install wget type pkg install wget and press enter.

For pdf viewer use native android one such as Mu Pdf or, Google pdf viewer

Once installed you can try xdg-open filename.pdf It will give you a list of the compatible app to open the file or else you can open the pdf viewer app to browse files of your choice.

|improve this answer|||||
  • Thanks. apt install evince fails after installing package x11-repo – Basile Starynkevitch Feb 25 at 7:43
  • @BasileStarynkevitch use a commandline PDF reader or GUI Android app. X-server is not native to Android, so is always troublesome. You need to install additional XServer or VNC app and configure x-11 to work with them. – Irfan Latif Feb 25 at 7:49
  • But which one? I never used Android before this year – Basile Starynkevitch Feb 25 at 7:53
  • 1
    @BasileStarynkevitch See my link above (comment on your question). I use MuPDF and am quite happy with it. // digiwizkid: could you please edit your answer and include the details on wget etc? Just installing Termux doesn't solve the problem. I guess it either comes with wget (in that case say so), or one must apt install it (then that should be pointed out). While on it, maybe integrate the details from your comment as well? – Izzy Feb 25 at 8:28
  • @BasileStarynkevitch I have edited my answer, please check. If this answers your question please accept it. Thanks – digiwizkid Feb 25 at 9:56
1

the android cmd line language is MirBSD Korn Shell mksh and default core utilities are FreeBSD or toybox (and few android specific toolbox) applets

there is no dpkg or apt equivalent the closest is android package manager (commands am or pm)

default console is android debug bridge (like ssh) you need to enable usb-debugging in developer settings, connect to pc and install package android-tools-adb then you can start adb shell and authorize the ~/. android RSA-key by simply accept confirmation dialog on tablet

|improve this answer|||||
  • 1
    am start -a android.intent.action.VIEW -d file://bpg.pdf – alecxs Feb 25 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.