5

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?

oholimoli
  • 73
  • 1
  • 9

1 Answers1

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"
fuzzyTew
  • 3,511
  • 29
  • 24
  • 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. – fuzzyTew Mar 18 '23 at 17:45
  • 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? – fuzzyTew Mar 20 '23 at 19:04
  • the screenshot is overtly listing only shell built-in commands. there's no reason to assume there are not more binaries available to call. – fuzzyTew Mar 28 '23 at 17:25
  • @MorrisonChang if you read the description of the proprietary domain-specific platform at https://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? – fuzzyTew Mar 28 '23 at 17:30