Install Git in Pydroid 3 terminal
Asked Answered
C

2

6

I'm using Pydroid3 and would like to use Git in the Pydroid Terminal.

In my Termux terminal I was able to install Git as described here: Python and Git on Android

The git command is now only recognized in the Termux Terminal but not in Pydroid :(. Installation of Git with apt-get in the Pydroid Terminal is not possible.

Has anybody managed to install Git for Pydroid?

Cockchafer answered 2/11, 2019 at 14:47 Comment(0)
P
0

This is working for me; you might need to tweak the curl or configure commands if things fail. I haven't looked into ssh for now, only https.

# enter dev folder
cd $HOME

# set a prefix variable for convenience
export PREFIX="$(readlink -f "$PKG_CONFIG_PATH"/../..)"

# if you want git-remote-https, first build and install curl
curl -LO https://curl.se/download/curl-7.77.0.tar.bz2
tar -jxvf curl-7.77.0.tar.bz2
cd curl-7.77.0
./configure --prefix="$PREFIX" --disable-static --with-openssl --with-ca-path=/system/etc/security/cacerts --with-ca-bundle="$SSL_CERT_FILE"
make -j8 install
cd ..

# download and enter git sources
curl -LO https://www.kernel.org/pub/software/scm/git/git-2.32.0.tar.gz
tar -zxvf git-2.32.0.tar.gz
cd git-2.32.0

# reconfigure git for platform
./configure --prefix="$PREFIX" --without-tcltk --disable-pthreads LDFLAGS="-lssl -lcrypto -lz"

# if you didn't install curl, download autoconf's install script since there is no coreutils on android
# curl "http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;f=build-aux/install-sh;hb=HEAD" -o install
# otherwise copy curl's install script in
cp ../curl-*/install-sh install

# build and install git
make -j8 install INSTALL="sh $(pwd)/install"
Paregoric answered 21/6, 2021 at 9:50 Comment(4)
I’m no longer using pydroid, but I was likely using pydroid when I posted this (rather than a normal linux/unix system). I may have not finished resolving some later problem, looking at how I left it.Paregoric
well i'm not on pydroid anymore, but it reads like curl was working at the time. the question you linked appears to be about apt to me, not make or curl, maybe a different lInk than you meant?Paregoric
the screenshot is overtly listing only shell built-in commands. there's no reason to assume there are not more binaries available to call.Paregoric
@MorrisonChang if you read the description of the proprietary domain-specific platform at play.google.com/store/apps/details?id=ru.iiec.pydroid3 you can find the text "You can also build & install dependencies from a command line." Doing this requires being able to use make. What brought you to comment on my old answer here?Paregoric
U
0

If you already have both Termux with git and Pydroid installed on your system, you can just make them use shared storage.

For example, you can set up Termux shared storage usage via termux-setup-storage command. It asks you to give the Termux app access to shared part of Android filesystem where folders like Downloads and DCIM reside and creates a link from within Termux $HOME folder to it. You can create a dedicated folder e.g. named "termux_workdir" there and clone or initialize repos into it using git via Termux terminal session.

Then you can save and edit files there via Pydroid "Save as" or "Open" options, for example, picking "termux_workdir" using Android Files app.

For more convenience, you can create a link to this folder from Termux $HOME (for example, cd without arguments and type ln -s ~/storage/shared/termux_workdir termux_workdir) and set Pydroid Terminal $HOME also to this folder (it will be /storage/emulated/0/termux_workdir in my example from Pydroid perspective), that can be made via "Terminal settings" menu.

Unitarianism answered 21/4 at 19:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.