Help with Ruby. - Android Q&A, Help & Troubleshooting

Hello friends! I post this on the off to pic because I can't really find a fitting sub-forum. If you know a better place I can post this thread, please let me know.
I want ruby and Ruby gems to run on my android device (galaxy S4 GT-I9515, not that it matters). I know android is Linux based so there shouldn't be a problem doing this.
Basically, I don't want to use Ruby for development, I just need to use some of it's applications (gems).
I tried ruboto core and ruboto IRB, but couldn't install a gem.
In general, my android won't read "apt-get" command in terminal. I don't know why.
If anyone could help me to run some Ruby gems on my device, I would really appreciate it. Thanks for people who answer!

Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
Code:
$ apt list | grep ruby
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
ruby/stable 2.3.3 arm
ruby-dev/stable 2.3.3 arm
ruby-ri/stable 2.3.3 all
weechat-ruby-plugin/stable 1.6-1 arm

TheKindleMCPEGuy said:
Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
Code:
$ apt list | grep ruby
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
ruby/stable 2.3.3 arm
ruby-dev/stable 2.3.3 arm
ruby-ri/stable 2.3.3 all
weechat-ruby-plugin/stable 1.6-1 arm
Click to expand...
Click to collapse
First of all thanks for the reply!
So, in order to use ruby on android all I have to do is use a more linux-like terminal, and use the command "$ apt list | grep ruby", am I right?
Will I have access to apt-get and commands like that with the new terminal?

FurySh0ck said:
Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
First of all thanks for the reply!
So, in order to use ruby on android all I have to do is use a more linux-like terminal, and use the command "$ apt list | grep ruby", am I right?
Will I have access to apt-get and commands like that with the new terminal?
Click to expand...
Click to collapse
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
Code:
apt install ruby
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
Code:
$ apt install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ruby
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3587 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Get:1 [url]http://termux.net[/url] stable/main arm ruby arm 2.3.3 [3587 kB]
Fetched 3587 kB in 1s (2878 kB/s)
Selecting previously unselected package ruby.
(Reading database ... 2137 files and directories currently installed.)
Preparing to unpack .../archives/ruby_2.3.3_arm.deb ...
Unpacking ruby (2.3.3) ...
Processing triggers for man (1.13.4-3) ...
Setting up ruby (2.3.3) ...
When I ran the
Code:
gem
command I got this:
Code:
$ gem
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help gem_dependencies gem dependencies file guide
gem help platforms gem platforms guide
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
[url]http://localhost:8808/[/url]
with info about installed gems
Further information:
[url]http://guides.rubygems.org[/url]
Enjoy!

TheKindleMCPEGuy said:
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
Code:
apt install ruby
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
Code:
$ apt install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ruby
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3587 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Get:1 [url]http://termux.net[/url] stable/main arm ruby arm 2.3.3 [3587 kB]
Fetched 3587 kB in 1s (2878 kB/s)
Selecting previously unselected package ruby.
(Reading database ... 2137 files and directories currently installed.)
Preparing to unpack .../archives/ruby_2.3.3_arm.deb ...
Unpacking ruby (2.3.3) ...
Processing triggers for man (1.13.4-3) ...
Setting up ruby (2.3.3) ...
When I ran the
Code:
gem
command I got this:
Code:
$ gem
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help gem_dependencies gem dependencies file guide
gem help platforms gem platforms guide
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
[url]http://localhost:8808/[/url]
with info about installed gems
Further information:
[url]http://guides.rubygems.org[/url]
Enjoy!
Click to expand...
Click to collapse
Awesome! It worked well and neat. +1 For your Thanks-o'-meter.
Now I have some questions about termux, if you could answer:
1) Where does it save all the files? I used
Code:
apt update
and I am going to download packages from now on. I think I should know where it goes / how can I change that save directory.
2) When I tried using root permissions (you know, my device is rooted so I used
Code:
su
in order to gain access) I couldn't use apt commands anymore. I think some of my ruby gems will require root permissions, so I would like further explanation about it (only if you could of course )

FurySh0ck said:
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
When I ran the command I got this:
Awesome! It worked well and neat. +1 For your Thanks-o'-meter.
Now I have some questions about termux, if you could answer:
1) Where does it save all the files? I used and I am going to download packages from now on. I think I should know where it goes / how can I change that save directory.
2) When I tried using root permissions (you know, my device is rooted so I used in order to gain access) I couldn't use apt commands anymore. I think some of my ruby gems will require root permissions, so I would like further explanation about it (only if you could of course )
Click to expand...
Click to collapse
1. It saves inside app data, specific folder is /data/data/com.termux/files/usr/var/cache/apt
2. I don't think su works in Termux really, however my root doesn't work right now so I can't really say a definite answer.

TheKindleMCPEGuy said:
1. It saves inside app data, specific folder is /data/data/com.termux/files/usr/var/cache/apt
2. I don't think su works in Termux really, however my root doesn't work right now so I can't really say a definite answer.
Click to expand...
Click to collapse
That's all I had to ask in this thread.
Thanks!

Related

Optware for Android released by Novaports

Optware was originally developed as a distribution mechanism for software for the Open Source Linux project for the Linksys NSLU2 (a small low cost network storage device). That consumer storage device ran on Linux, and the community opened it up, but they needed a lightweight distribution mechanism for their lightweight devices.
Since 2004 Optware has been adopted by a variety of Linux communities and device developers including the webOS community working on the Palm Pre and Pixi, and developers for devices as diverse as Asus WL-500g,WL-HDD, WL-500gx, WL-500gP routers, the Synology DS-101 and DS-101g+ NAS devices.
At its core, Optware is a package manager to allow you to easly install and uninstall cross-compiled linux applications on your device over the internet. At this time, optware supports the automatic download and installation of over 1500 programs. (See the list at the end of the wiki article.)
Why should I use Optware?
Like the original slug, android devices lack a distribution mechanism to install Linux/command line tools programs and utilities. Many in the Android community who want or need to do command line processing on their device use a chroot of some sort (Debian seems popular) to get their distribution and package management tools. With Optware, it becomes possible to simply run whatever utility or program you want on the native underlying Linux.
Additionally, Optware For Android installs openSSH making it possible to access your Nook from any PC with SSH capability, and sets up an unprivileged username/password login system for the device at the command line. All in all then, since it can be installed with a single script, since it's lightweight, and since it's designed for small and embedded devices, Optware is a perfect fit for the Android community.
Optware for Nook is the first Optware for Android release by the Novaports team and is their gift to the Android community members who have helped them so much with information on Android devices.
What does it do?
The Optware bootstrap installed the IPKG package manager. It installs the optware Busybox. It installs openSSH and makes the ssh demon persistent. It creates an unprivileged user with a username and password you choose.
See Installation instructions and details at the Optware for Android page at Nookdevs.com
For completeness of licensing compliance, the source code for all optware package can be found at the following locations:
1) build scripts at svn.nslu2-linux.org in the /svnroot/optware/ area
2) tarballs at sources.nslu2-linux.org in the /sources area (this is a *large* directory)
To contribute code to Optware, see www . nslu2-linux . org in the /wiki/Optware/AddAPackageToOptware area
-- Rod Whitby
-- Original NSLU2-Linux Project Lead and Optware Architect
This works beautifully! Thank you!
Gonna try this and see if i can get samba to work.. a SMB mount over wifi would be awsome...
Many thanks!
I don't suppose there's a quick and easy way to completely remove optware?... not looking forward to culling through scripts and manually un-doing it all.....
adduser: not found
When it gets to the part in the install script to add the username of the unprivileged user, I enter a name, then it says: adduser: not found.
If it helps, I am using Rooted Stock 1.1.
Anyone get Optware to install on CM7 (newer nightly)
I am running CM7 #103 and would love to have optware installed.
But I get Fail if I try to use the method from Nookdevs
Tonight when I have more time I will look at the errors and see if I can tell what is up.
It looked like partially due to missing dir's for one (/tmp)
madrascafe said:
Gonna try this and see if i can get samba to work.. a SMB mount over wifi would be awsome...
Click to expand...
Click to collapse
The market has your answer and it's free:
https://market.android.com/details?id=com.funkyfresh.samba&feature=search_result
Am I the only one that wants Optware on CM7?
It goes fine on a manualnootered 1.2.0 NC But I prefer CM7 (And use the nightlies)
I would love to get this going on my NC as well. Running CM7 N121 w/ 6/30/2011 OC kernel. Was able to manually work past the tmp directory problem you mentioned, but I can't seem to execute the ipkg binary or installed. I've verified it indeed exists in the path I'm trying to execute it from, it has +x perms for user/ group/ other, but it always gives the error below:
/data/opt/bin/ipkg: not found
I've tried messing with bin directory and ipkg binary ownership, but no dice. If anything it should at least find it even if permissions aren't correct.
Looks like the contents of the binary reference ELF libraries which sounds like an issue attempting to execute in an Android environment. Going to see if I can chroot an environment that will work for it.
Sent from my NookColor using Tapatalk
This is happening because it's looking for /lib/ld-linux.so.3, and not finding it. I worked around by
ln -s /data/opt/lib/ld-linux.so.3 /lib/ld-linux.so.3
I also had to make these links:
ln -s /data/opt /opt
ln -s /data/tmp /tmp
And then set this:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lib
export PATH=$PATH:/opt/bin/:/opt/sbin
in my bash profile to get things to start working.
One problem is my symlinks seem to get erased every reboot. I worked around by re-creating them in my bash profile, but I wish I knew how to make them permanent. This may be a ROM specific thing - this was written for a rooted stock nook, and I'm on an Epic running SFR.
I do not have a ld-linux.so.3 file on my NC w/ CM7 125
I have many other errors that show up:
Downloading the latest ipkg-opt package from the Optware package feed:
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
wget: can't open 'ipkg-opt_0.99.163-10_arm.ipk': File exists
(NOTE the above file 'ipkg-opt_0.99.163-10_arm.ipk' does not exist
(on my NC - from a find / -name ipkg-opt_0.99.163-10_arm.ipk)
Updating the Optware package database:
ERROR: Failed to update the local Optware package database
Updating the Optware package database:
/data/optware-bootstrap-0.0.1.shar: ipkg-opt: not found
ERROR: Failed to update the local Optware package database
Any ideas?
The actual file it needs is /data/opt/lib/ld-linux.so.3 - you need to create a symlink in /lib in order to see it. But I think that file comes from the optware installer - if the installer is failing, you won't have it there either. It sounds like you may have bits of a previous install that failed, and it's preventing the install from running properly. Try looking at the log in /data/tmp for more info. After that, try rm -rf /data/tmp/* to clean up the old install and trying again.
Thank You for any pointers.
I deleted everything in /data/tmp first last attempt - like you suggested.
Same result
I have it down to only this error now when I run it (optware-bootstrap-0.0.1.shar):
Updating the Optware package database:
optware-bootstrap-0.0.1.shar: ipkg-opt: not found
ERROR: Failed to update the local Optware package database
ipkg-opt should be in /data/opt/bin. Check to see if it's there... if not, something went wrong in one of the previous steps - probably somewhere around "Downloading the latest ipkg-opt package from the Optware package feed". See if wget is actually downloading anything, where it's putting it, and what it's doing with it afterwards.
If it is there, try running it manually. If you see /data/opt/bin/ipkg or /data/opt/bin/ipkg-opt but it claims it's not there when you run it, it may be a library linking error. Mine was looking for /lib/ld-linux.so.3 but it was actually installed at /data/opt/lib/ld-linux.so.3. mount -o remount,rw followed by ln -s /data/opt/lib/ld-linux.so.3 /lib/ld-linux.so.3 fixed that. I also had to run
ln -s /data/opt /opt
ln -s /data/tmp /tmp
before things started working.
By the way:
ntfsprogs - NTFS filesystem libraries and utilities
Could that be of any use? At the moment, it's not possible to mount NTFS storage on the NC
i would love to know how you guys get to this point even. When i try to install the very fist line of the script is an error and then nothing at all happens .... something about not finding busybox or something of that nature.
So you guys are getting WAY farther than I've been able to.
Tkx Tonygoes.
It is there in /data/opt/bin but it reports /data/opt/bin/ipkg: not found
I cannot find a ld-linux.so.3 on my NC at all.
I did the other links et al fro your comments also
obsid:
Try post 12 above:
and I had some other suggestions from someone:
might try thses FIRST the script seems to do it but may not actually get it done.
mount -o remount,rw / /
mount -o remount,rw /dev/block/mmcblk0p5 /system
you should also if tried before do this: rm -rf /data/tmp/
then do the items in post #12 above
NOTE for me the ln -s to ld-linux.so.3 does not work as I do not have that file on my system

[Q] having alot of trouble getting sdk up and going on linux

I have spent the last to days trying to solve my error setting up sdk on linux mint12. I keep getting this error.
[Qoute]
scott-Presario-CQ62-Notebook-PC scott # apt-get -f installReading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc-bin libc6
Suggested packages:
glibc-doc
The following NEW packages will be installed:
libc-bin
The following packages will be upgraded:
libc6
1 upgraded, 1 newly installed, 0 to remove and 376 not upgraded.
3 not fully installed or removed.
Need to get 0 B/5,143 kB of archives.
After this operation, 3,432 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Preconfiguring packages ...
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: error: 1 expected program not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
[Qoute]
I have tried every fix I have found online and all return this exact error. I tried changing the permisons on etc/sudoers to make sure they were right. I also added a these paths.
export PATH={PATH}:/usr/local/sbin:/usr/sbin:/sbin
export PATH={PATH}:/usr/local/bin:/usr/bin:/bin
I have even placed a permission file inside sudoers.d to try to add the path but I just ended up ruining my root access and have to do a complicated fix through my bootloader.but just cant seem to get it to work I am newer to linux and know basic commands but have no idea why I keep getting the same error or how to fix it any help would be deeply appreciated.
Are you running 64 bit? You need to dl the 32 bit lib's
Now it may be cheating, but try Tommytommatoe's android utility it sets up SDK for you and adds everything to your path... It's my go to for stubborn SDK
Sent from my PC36100 using xda premium
Yea it 64bit and I added the 32 bit libs for java but it gives the error when I try that to. I guess I will try that tanks man
Sent from my ADR6425LVW using XDA
Are you using an installer script or something like that?
RoberGalarga said:
Are you using an installer script or something like that?
Click to expand...
Click to collapse
No just piece by piece did java then unpacked SDK in my root dir and update it installed the API and all that then when I try to use adb it says their is no command and all the fixes make the error I described at first.
Sent from my ADR6425LVW using XDA
Ok... you don't need any fixes... you can simply move to platform-tools directory (using command cd /path/to/platform-tools) to can run ./adb command (note: ./adb, not adb).
RoberGalarga said:
Ok... you don't need any fixes... you can simply move to platform-tools directory (using command cd /path/to/platform-tools) to can run ./adb command (note: ./adb, not adb).
Click to expand...
Click to collapse
Really now I feel dumb lol. Guess I'm to used to windows been developing on it for a while. Thanks a lot.
Sent from my ADR6425LVW using XDA
Well thanks for all your help guys I guess I had a bad download of linux so I did a new clean install and setup SDK and apktool and dsixdas kitchen. Now everything works fine. No sudo errors or nothing the good news is with all the trying to fix what was wrong I got used to root being / instead of c:/ so that's a bonus
Sent from my ADR6425LVW using XDA

[Q] Causes for "Segmentation fault" or "Stopped" signal

Hello everyone I'm new to android and have been trying to run Emscripten on it: I've ported over the necessary dependencies: Node, Python, Fastcomp/Clang via the NDK Toolchain and tested with the Android Emulator (from Android SDK) inside the the Android Terminal Emulator (from jackpal's github) but when I finally attempted to run Emscripten itself as so:
Code:
cd /data/data/jackpal.androidterm/shared_prefs
bin/python2 emscripten-1.22.1/emcc -v
I ran into some rather vague error messages:
Code:
[2] + Stopped (signal) bin/python emscripten-1.22.1/emcc -v
[1] - Segmentation fault bin/python emscripten-1.22.1/emcc -v
Does anyone have any ideas on this? I there a way I can get better debugging info to help find the problem?
I think I figured out the problem. Those error seem to come from python. Particularly python seems to be crashing. Trying the python console doing a simple:
Code:
import shutil
will crash the interpreter. Since discovering this I've found many other things that will crash python in my setup. So I guess it wasn't such a good port after all.
I ran some test in the python interpreter as this is what I go so far:
These modules are fine:
Code:
os, platform, re, pprint, atexit, subprocess, sys, time, string, struct
These modules will crash python:
Code:
optparse, logging, urlparse, SocketServer, cgi shutil, tempfile, shlex
These modules will spit out error messages but not crash python:
Code:
BaseHTTPServer, SimpleHTTPServer, socket,
Don't really, no what is cause this yet.
After trying to build python several different ways and not getting those modules to work I broke down and decided to try out Python4Android. And it works. After following their guide on getting it to work in the shell, I test the modules and they were fine. After that I pushed my builds of fastcomp(llvm/clang) and node.js and the Emscripten python scripts ot Py4A's files location and then tried to run emcc (emscripten's compiler).
The scripts needed a little (very little) tweeking to get them to work but they worked. And now I'm going to try and copy Py4A's files to Android Terminal Emulators' location. If that works to my satisfaction I'll try to get these to work with VimTouch.

[TOOL] OSConnect ~ Run Arch and Ubuntu alongside eachother

Hey XDA!
For those of us that use Arch linux, compiling Android projects can be a little more challenging than on Ubuntu due to the fact the Arch is a rolling release distro. To solve this, I made a tool that allows YOU to choose whether you want to run Arch or Ubuntu in the command line without dual booting. This isn't anything new, just a simplified implementation of an existing method.
What it does:
When you open a terminal, you will be prompted with "Would you like to connect to Arch linux or Ubuntu?". You can enter A for Arch or U for Ubuntu. If you choose Arch, you will be put into your stock environment, but your bash prompt will look like
Code:
[[COLOR="red"]user[/COLOR]@[COLOR="cyan"]Arch[/COLOR] ~]:
If you choose Ubuntu, you will be entered into your Ubuntu chroot, and your bash prompt will look like
Code:
[[COLOR="red"]user[/COLOR]@[COLOR="magenta"]Ubuntu[/COLOR] ~]:
DISCLAIMER
Because Arch linux is aimed at enthusiast and experienced linux users, replies about simple or lack-of-experience issues will not be given priority. Use the following with caution.
How to setup an Ubuntu chroot:
1. Install schroot and debootstrap
2. Follow the steps given here https://bbs.archlinux.org/viewtopic.php?id=100039, or run create-chroot.sh in the OSConnect git repo.
How to install OSConnect:
1. Clone https://github.com/frap129/OSConnect
2. Run the given install.sh
3. If you use terminal mostly locally, respond "Local" to the prompt. If you mostly connect via ssh, respond "SSH" to the prompt.
4. If you connect via SSH, connect as root from now on, not your user. OSConnect will switch to your user for you.
Done! Restart to use.
XDA:DevDB Information
OSConnect, Tool/Utility for the Chef Central
Contributors
frap129
Source Code: https://github.com/frap129/OSConnect
Version Information
Status: Stable
Created 2016-05-15
Last Updated 2016-05-15
How it works:
Ubuntu chroot:
This work by downloading the Ubuntu system files to /var/chroot/ubuntu. The schroot tool then executes bash from ubuntu, and tricks the system into believing that /var/chroot/ubuntu is actually the system root directory.
OSConnect:
OSConnect is contained in its own file, .osconnectrc. This file is executed when shell is reached via your .bashrc. The .osconnectrc is a bash script that asks what operating system you would like to use, then either dumps you into normal shell, or starts the Ubuntu chroot. It also modifies the PS1 (bash prompt) to look cleaner and better distinguish between Arch and Ubuntu.
What is the difference between local and ssh?
The only difference between the local and ssh versions is whether or not youre prompted for your password (when chroot is started) because schroot must be run as root. On the local version, you are simply prompted for your password when necessary. On the ssh version, you are expected to connect as root, and therefore will not be prompted for your password.
HALP I CANT LOG IN AS ROOT
If you are having trouble connecting via SSH as root, follow https://askubuntu.com/questions/511833/cant-ssh-in-as-root
Resource wise is this lighter than running ubuntu as a docker image?
HaoZeke said:
Resource wise is this lighter than running ubuntu as a docker image?
Click to expand...
Click to collapse
I'm way to late for this to matter, but yes, its much lighter than running at as a docker image
frap129 said:
I'm way to late for this to matter, but yes, its much lighter than running at as a docker image
Click to expand...
Click to collapse
Better late than never! ? neat stuff ?

Install rsync in android termux

I am a newbie in android. My phone is rooted android pie and I want to install rsync on it.
In termux, I entered
pkg install rsync
I got the following output:
$ pkg install rsync
Ign:1 https://dl.bintray.com/termux/termux-packages-24 stable InRelease
Ign:2 https://dl.bintray.com/grimler/game-packages-24 games InRelease
Ign:3 https://dl.bintray.com/grimler/science-packages-24 science InRelease
Err:4 https://dl.bintray.com/termux/termux-packages-24 stable Release
403 Forbidden
Err:5 https://dl.bintray.com/grimler/game-packages-24 games Release
403 Forbidden
Err:6 https://dl.bintray.com/grimler/science-packages-24 science Release
403 Forbidden
Reading package lists... Done
E: The repository 'https://dl.bintray.com/termux/termux-packages-24 stable Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://dl.bintray.com/grimler/game-packages-24 games Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://dl.bintray.com/grimler/science-packages-24 science Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
$
What am I doing wrong?
How can I install rsync in android?
Thank you.
I think you've to run
Code:
apt-get install rsync
jwoegerbauer said:
I think you've to run
Code:
apt-get install rsync
Click to expand...
Click to collapse
Thank you for taking the time to reply. I really appreciate it.
I just tried and got this in reply.
$ apt-get install rsync
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package rsync
$
So, I'm stuck........
From where can I download (and then install) a version of rsync that can run on android?
Can rsync run in android?
RSYNC isn't part of TOYBOX nor BUSYBOX, and probably never will become part of these.
I only know of rsync4Android app.
jwoegerbauer said:
RSYNC isn't part of TOYBOX nor BUSYBOX, and probably never will become part of these.
I only know of rsync4Android app.
Click to expand...
Click to collapse
Aha! That explains it. Thank you.
For anyone who lands on this thread from a google search.... the problem is that Termux needs to be installed from the F-Droid app and not from the Google Play store.
You might also consider then installing termux-api from F-Droid then start up the Termux app and also run the command # pkg install termux-api. Both steps are needed if you want termux-api.
After this you can install rsync from within Termux with this command:
# pkg install rsync
FlexMcMurphy said:
For anyone who lands on this thread from a google search.... the problem is that Termux needs to be installed from the F-Droid app and not from the Google Play store.
You might also consider then installing termux-api from F-Droid then start up the Termux app and also run the command # pkg install termux-api. Both steps are needed if you want termux-api.
After this you can install rsync from within Termux with this command:
# pkg install rsync
Click to expand...
Click to collapse
Thank you.
How is the F-Droid version of Termux different from the G-store one? What does it have that is different?
If I understand you correctly (I'm a newbie) I need to download 2 different files from F-Droid:
—https://f-droid.org/packages/com.termux
and
—https://f-droid.org/packages/com.termux.api
Where do I download the correct rsync from or is it included in the api?
Thank you.
maybeme2 said:
Thank you.
How is the F-Droid version of Termux different from the G-store one? What does it have that is different?
If I understand you correctly (I'm a newbie) I need to download 2 different files from F-Droid:
—https://f-droid.org/packages/com.termux
and
—https://f-droid.org/packages/com.termux.api
Where do I download the correct rsync from or is it included in the api?
Thank you.
Click to expand...
Click to collapse
I think Termux is not properly officially supported from Google Play store anymore... as you found out when you try to install rsync in Termux that was downloaded from the Play Store it can't see any repositories that have it so you have to install it from F-Droid which is a bit like the Play Store but it is all open source software.
I spent a while googling and everything is out there although I think Termux should be remove from Play store if its not a full featured version or at least make it clearer that it is not.
I followed these instructions to set up F-Droid on my Android phone.
• I searched for Termux in F-Droid and installed “Termux Emulator with packages”.
• I then searched for and installed “Termux:API” from F-Droid
• Then open Termux and run this command which is ALSO necessary:
• # pkg install termux-api
I'm not even sure if I needed termux-api I installed it anyway because I am trying to get a backup script working as explained in this GitHub.
Then you install rsync from within Termux:
• # pkg install rsync
Enjoy,
Flex
Thank you very much.
Thanks, this worked.
Also, to fully back up your (rooted) phone to an external drive, you will need to install the tsu package:
pkg install tsu
Then, add a soft-link to the rsync binary:
sudo su
cd /
ln -s /data/data/com.termux/files/bin/rsync /bin/rsync

Categories

Resources