Install Git in Pydroid 3 terminal - android

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?

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"

Related

How to convert .py to APK file using Python for Android on Windows?

I am working on Kivy framework. I have some sample of Kivy which has .py extension which I want to convert to .apk files. I want to check whether these working on Android or not.
I have some information about this. We have two ways to build an .apk file:
Using Python for Android,
Using Buildozer.
But Buildozer is only supported on Linux. I thought it has some problems on Windows.
Hence, I want to use Python for Android. But I have no idea how to approach this one.
Have anyone tried this one.
You can use VirtualBox Get it here and any Linux Distribution such as Ubuntu Ubuntu.
After installing Ubuntu to your Virtualbox you can use below commands:
Run these commands on Terminal
sudo apt install git
sudo apt install python3-pip
git clone https://github.com/kivy/buildozer.git
cd buildozer
sudo python3 setup.py install
Now, navigate to your project directory using cd (or) goto your Project directory, RightClick -->select 'Open in terminal' and in Terminal type:
buildozer init
Above Command creates a buildozer.spec file controlling your build configuration. You should edit it appropriately with your app name, file extensions used in the project, external dependencies etc. After configuring your buildozer.spec fille run below commands:
sudo apt update
sudo apt install -y git zip unzip openjdk-8-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake libffi-dev libssl-dev
pip3 install --user --upgrade Cython==0.29.19 virtualenv # the --user should be removed if you do this in a venv
sudo pip3 install cython #(optional) If you got any Error as Cython not Found, use this
which buildozer
Above command is to check buildozer was added to your PATH), If no results found, add the following line at the end of your ~/.bashrc file--> export PATH=$PATH:~/.local/bin/
buildozer appclean
buildozer android debug
If you are asked for any licence agreement type y and click Enter
Once this process completes you will get a .apk file in your project directory bin/yourapp.apk
Kivy themselves used to have a virtual machine prepared with everything installed ready to go!
For some reason they stopped, now you have to install the Virtual Machine yourself.
You can see how to do this here
here is a link you can find everything that is related to getting .Apk files
https://python-for-android.readthedocs.io/en/latest/quickstart/#usage

Oneplus5 Lineage OS 15.1 kernel compilation

I am trying to compile kernel for Oneplus5 with Lineage OS 15.1 custom ROM installed. I am using google ndk toolchains for compiling kernel. I extracted the kernel source code from Lineage OS source code, also tried compiling stock ROM kernel.
After few heat and trials and fixing some files in the source code of kernel finally I managed to compile it successfully! After compilation is completed I got Image,Image.gz files in arch/arm64/boot directory.
But when I tried to flash the kernel image from TWRP recovery, device always boot into fastboot mode and got stuck there. What is the issue and what can I do to make it work.
Try running mka bootimage, then flashing the resulting boot.img with fastboot flash boot boot.img.
The slightly longer version, based on the instructions at https://wiki.lineageos.org/devices/cheeseburger/build:
apt install adb fastboot bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-8-jdk python unzip
mkdir -p ~/bin
mkdir -p ~/android/lineage
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
echo 'PATH="$HOME/bin:$PATH"' >> .profile
echo 'export LC_ALL=C' >> .profile
git config --global user.email "you#example.com"
git config --global user.name "Your Name"
cd ~/android/lineage
repo init -u https://github.com/LineageOS/android.git -b lineage-15.1
repo sync
source build/envsetup.sh
# use extract-files.sh or follow https://gist.github.com/fourkbomb/261ced58cd029c5f7742350aafdd9825
breakfast cheeseburger
mka bootimage
If the mka bootimage step runs without errors but doesn't generate a boot.img, try running mka bacon for a few minutes, then abort it and re-run mka bootimage.
The above commands will use LineageOS' default kernel for the device, in ./android/lineage/kernel/oneplus/msm8998. You can simply make your changes there, or place a whole new kernel source in that directory. In the latter case, make sure to place a lineage_oneplus5_defconfig file in arch/arm64/configs.

AOSP 6.0 Build for hammerhead - proprietary binaries

I just built AOSP 6.0 for hammerhead and attempted to flash it. My phone froze at the Google logo and refused to boot. I'm assuming I need to use the proprietary binaries found here https://developers.google.com/android/nexus/drivers
How would I extract these and put them in to my build? Thanks.
Be certain to download the Nexus 5 binaries that match the version of AOSP that you're building. For example, if you're building the most recent version of AOSP, when you initialized your repo you entered this command:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r72
Take that last branch code (everything after '-b') android-6.0.1_r72 and search for it over here:
https://source.android.com/source/build-numbers.html#source-code-tags-and-builds
It matches build M4B30X
Now, take that build code M4B30X and search for it over here:
https://developers.google.com/android/nexus/drivers
Download the corresponding binaries:
$ cd ~/Downloads
$ wget https://dl.google.com/dl/android/aosp/broadcom-hammerhead-m4b30x-7c7b231f.tgz
$ wget https://dl.google.com/dl/android/aosp/lge-hammerhead-m4b30x-74fa3aa5.tgz $ wget https://dl.google.com/dl/android/aosp/qcom-hammerhead-m4b30x-158606cf.tgz
Verify the integrity of each download:
$ echo "01a03cf36b20ee2460d108c1d199f4b012b084368cddfbff1e40ff8270b54d6f broadcom-hammerhead-m4b30x-7c7b231f.tgz" | sha256sum -c
$ echo "a533f4c82d430181b97ab2321acf10ab1e2b126de7bb15437c969331541af7cb lge-hammerhead-m4b30x-74fa3aa5.tgz" | sha256sum -c
$ echo "9a2760bda79e3be7bbe7203c05273c80b0d043d9aaf15be20361e35b16ef8905 qcom-hammerhead-m4b30x-158606cf.tgz" | sha256sum -c
Extract each gzip file:
$ tar xzvf broadcom-hammerhead-m4b30x-7c7b231f.tgz
$ tar xzvf lge-hammerhead-m4b30x-74fa3aa5.tgz
$ tar xzvf qcom-hammerhead-m4b30x-158606cf.tgz
Execute the resulting self-extracting files from the source tree's root folder(~/AOSP)
$ cd ~/AOSP
$ ~/Downloads/extract-broadcom-hammerhead.sh
$ ~/Downloads/extract-lge-hammerhead.sh
$ ~/Downloads/extract-qcom-hammerhead.sh
After executing each file hit the Enter key once and then hit
the Space bar until you reach the end of each document.
At the end of each document type:
I ACCEPT
and hit the Enter key.
To accommodate the new binaries you must initiate a full rebuild, so set the
environment:
$ ./ build/envsetup.sh
$ lunch aosp_hammerhead-userdebug
And make the synthetic target 'clobber' in order to clean:
$ make clobber
Now rebuild:
(If you're running a Core2Duo)
$ make -j4
(Or, if you're running something bigger)
$ make -j16
Uncompress the downloaded files, you will get bash files. Put all these files in the root directory of your AOSP project and execute them. You will have to accept the licenses and the binaries will be extracted in the right directory.
After this step. In the AOSP root directory, execute :
make clobber
It will clean the current build (out/**). It is needed for the make to notice the changes regarding the AOSP build official procedure.
Then you can compile again the sources.
make -j4
(or j8/j16 regarding your CPU threads number)

Couldn't find libtoolize, even though I have installed libtool in OSX Yosimite

I want to use Make install command and I have installed all requirements like yasm, nasm, curl, ant, rsync and the autotools: autoconf, automake, aclocal, pkgconfig, libtool. (Exactly, I want to compile Linphone Android NDK from Here : https://github.com/BelledonneCommunications/linphone-android. I have follow all steps from there)
I have try to install libtoolize using this command:
brew install libtoolize
But terminal always show :
Error: No available formula for libtoolize
If i try to make install, terminal will show :
Could not find libtoolize. Please install libtool.
Anybody can help ?
You should install the package libtool via
brew install libtool
This package contains the tool libtoolize as you can check via
brew list libtool
Note the warning
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
You may try again installing the tools you want to. If the come with a ./configure script, re-execute it to let it find glibtoolize. If this does not work, you may need to set the environment variable LIBTOOL to the version Homebrew installed:
export LIBTOOL=`which glibtool`
export LIBTOOLIZE=`which glibtoolize`
As a last resort, you may need to set a symbolic link from glibtoolize to libtoolize. You can do so via
ln -s `which glibtoolize` libtoolize
Then, add the directory with the link to the path by
export PATH=$(pwd):$PATH
Then, libtoolize should be found.
Maybe you should refer to this Linphone for android is not working/missing libraries. Autotools installation for mac as suggested a part of the step.
# Assume we want to install them below $HOME/local.
myprefix=$HOME/local
# Ensure the tools are accessible from PATH.
# It is advisable to set this also in ~/.profile, for development.
PATH=$myprefix/bin:$PATH
export PATH
# Do the following in a scratch directory.
wget http://ftp.gnu.org/gnu/m4/m4-1.4.14.tar.gz
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.64.tar.gz
wget http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.gz
wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz
gzip -dc m4-1.4.14.tar.gz | tar xvf -
gzip -dc autoconf-2.64.tar.gz | tar xvf -
gzip -dc automake-1.11.1.tar.gz | tar xvf -
gzip -dc libtool-2.4.tar.gz | tar xvf -
cd m4-1.4.14
./configure -C --prefix=$myprefix && make && make install
cd ../autoconf-2.64
./configure -C --prefix=$myprefix && make && make install
cd ../automake-1.11.1
./configure -C --prefix=$myprefix && make && make install
cd ../libtool-2.4
./configure -C --prefix=$myprefix && make && make install

Failed to build gem native extension when installing Calabash Android on Ubuntu

I want to install Calabash Android on Ubuntu(13.10). I have gem (1.8.23) and ruby (1.9.3p194) installed and tried to run "sudo gem install calabash-android" but keep getting messages saying "Failed to build gem native extension", below is the full messages:
Building native extensions. This could take a while...
ERROR: Error installing calabash-android:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from extconf.rb:1:in `'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/gherkin-2.12.2 for inspection.
I tried "sudo apt-get update" but it didn't fix the issue. And I also checked gcc so it shouldn't be build issue. Does anyone have any suggestions? Thanks in advance!
While installing ruby, select development version or full version, so on my system with ubuntu 12.04, i would use
sudo apt-get install ruby1.9.1-full
also please make sure android home path and ant path is proper
Thanks
You can use rbenv that manage perfectly ruby gems versions like nvm does for node.js:
$ sudo apt-get update
$ sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
$ sudo apt-get install rbenv
$ exec $SHELL
$ rbenv install 2.2.2
$ rbenv global 2.2.2
$ ruby -v
$ echo "gem: --no-ri --no-rdoc" > ~/.gemrc
$ gem install bundler

Categories

Resources