For downloading the Android Source code :
I am issuing
repo init -u https://android.googlesource.com/platform/manifest
But I am getting the below error :
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [SSL_CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c :726)
fatal: cloning the git-repo repository,will remove '.repo/repo'
What I have tried ?
-I have tried visiting https://android.googlesource.com/platform/manifest and https://gerrit.googlesource.com/git-repo/clone.bundle from the google chrome and internet explorer and there is no issue
-Tried changing the https to http in the repo init command
-modified the repo script and changed https to http
-modified the gitconfig as below :
[user]
name = myName
email = myemail.id
[http]
proxy = http://user:passwd#gateway.com:8080
sslVerify = false
[https]
proxy = https://user:passwd#gateway.com:8080
sslVerify = false
How can I import the certificates for these sites ?
I am using Ubuntu 18.04 .
Is there a way to force ignore this?
PS : I am behind the proxy and have already setup the proxy settings and it is working fine.(tried sudo apt-get update)
i am a MAC user (Mojave). I have the same error.
When i launch:
repo init <repository url>
I get this error:
Downloading Repo source from https://gerrit.googlesource.com/git-repo
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
The problem seems due to Python 3.6 on MacOS that comes with its own private copy of OpenSSL. That means the trust certificates in the system are no longer used as defaults by the Python ssl module. To fix that, you need to install a certifi package in your system.
Solved with:
open /Applications/Python\ 3.6/Install\ Certificates.command
OK , I fixed this by setting the environment variable PYTHONHTTPSVERIFY to 0
export PYTHONHTTPSVERIFY=0
Python, since v2.7.9, will by default now check the SSL certificates. To revert to the correct behavior for the repo script, set up an environment variable PYTHONHTTPSVERIFY=0.
This will shut off all certificate verification.
The repo script should now run as advertised.
I spent 3 hours on this topic and finally found these command works for me.
My python3 is Python 3.6.9 and python is Python 2.7.17 running on Ubuntu 18.04.
sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig
sudo apt-get install openjdk-8-jdk android-tools-adb bc bison build-essential curl flex g++-multilib gcc-multilib gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-gtk3-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc yasm zip zlib1g-dev git-core python3.8 libncurses5
sudo apt-get install ca-certificates
sudo update-ca-certificates --fresh
sudo update-alternatives --install /bin/python python /usr/bin/python3 1
sudo update-alternatives --install /bin/python python /usr/bin/python3.8 2
sudo update-alternatives --config python //choose 2
mkdir ~/bin
PATH=~/bin:$PATH
curl -k https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo
chmod a+x repo
git config http.sslVerify false
export PYTHONHTTPSVERIFY=0
git config --global user.name "xxx"
git config --global user.name "xxx#xxx.com"
mkdir ./workspace
cd workspace
which repo
repo init -u https://android.googlesource.com/platform/manifest -b master
repo sync -j2
Hope my sharing could help you :)
Related
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"
I want to install Heroku on Termux on my Android Tecno droipad but I get this message after each trial:
$ apt install heroku
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package heroku
That's what I get when I run the command: $apt install heroku.
What should I do to have heroku installed?
From this Github repo :
termux-chroot
cd /
wget
https://cli-assets.heroku.com/branches/stable/heroku-linux-arm.tar.gz
mkdir -p /usr/local/lib /usr/local/bin
tar -xvzf heroku-OS-ARCH.tar.gz -C /usr/local/lib
ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
/usr/local/lib/heroku/install
cd /home/.local/share/heroku/cli/lib
mv node node_broken
ln -s /usr/bin/node ./node
I've installed kivy (on debian jessie / python 2.7), and the examples work fine,
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y build-essential ccache git zlib1g-dev python2.7 python2.7-dev
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
sudo pip install colorama appdirs sh jinja2 six
sudo pip install --upgrade colorama
sudo apt-get install pkg-config autoconf automake libtool
sudo apt-get install software-properties-common
sudo apt-get install cython #installs 0.21.1
sudo add-apt-repository ppa:kivy-team/kivy
sudo apt-get update
sudo apt-get install python-kivy python-kivy-examples #installs 1.8.0
sudo chmod -R 777 /usr/share/kivi-examples/ #install made it Read-Only Root
sudo pip install --upgrade buildozer #installs 0.32
sudo easy_install buildozer #just in case?
sudo pip install python-for-android #0.4?
java -version #reports 1.8.0_121
but when I try to buildoze any of the kivy-examples it has an error. I've set the log_level = 2 in the .spec file, but I don't see anything in the console output that suggests what could be the problem
/usr/share/kivy-examples/demo/touchtracer$ buildozer init
...
/usr/share/kivy-examples/demo/touchtracer$ buildozer -v android debug
/usr/share/kivy-examples/demo/touchtracer$ buildozer -v android_new debug
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/utils/ILogger
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
# Command failed: /home/guest/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -e
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
Also, at some point while I was trying to build, it was downloading the android sdk every time I ran buildozer, but now that stopped.. or at least it's not not getting to that point anymore.
Is it possible that upgrading to python 3 then installing python3-kivy will solve this? I noticed my current install did not grab the latest (kivy 1.9.1 / android sdk 21)
[Update #1] I installed newer versions of buildozer (.33dev), cython (25.2), and kivy (1.9.2.dev0)
cd ~
git clone https://github.com/kivy/buildozer.git
cd buildozer
sudo python setup.py install
cd ..
sudo pip install Cython==0.25.2 #kivy 1.9.2.dev0 required Cython >= 0.23
git clone https://github.com/kivy/kivy
cd kivy
sudo python setup.py install
and updated the .spec file :
requirements = python2,kivy==master
android.sdk = 24
but still no luck. The only other thing I could find to try is to downgrade java8 to java7. Does buildoze not work with 8?
Buildozer command failed
[Update #2] I uninstalled Java8 ( https://askubuntu.com/questions/84483/how-to-completely-uninstall-java ) and installed Java 1.7.0_80 but I get the same exact error
sudo apt-get install oracle-java7-installer
java -version
sudo apt-get install oracle-java7-set-default
sudo update-alternatives --config java
BuilDozer is obsolete as of now. Forget it. I am stuck with it as asked here: Buildozer gives error upon building Pong app of Kivy framework for android publishing
Try Python for Android or QPython
I want to do UI automation for opening an url in a real android device. For that I want to install and run appium on my linux system, please guide me how to do? Also suggest me Is there anyway to open an url in chrome browser using eclipse??
Install appium on Linux 18.04
If you have node.js installed you can try :
sudo npm install -g appium --unsafe-perm=true --allow-root
it worked for me.
I guess all the information you need to run Appium in Linux is in this here:
http://appium.io/docs/en/about-appium/getting-started/
how to run your test
http://appium.io/slate/en/master/?ruby#running-tests
and a bunch of sample code here
https://github.com/appium/sample-code
and if you want to run your test in Chrome Browser you will need Chromedriver, it's already integrated in the appium project. More info here:
https://sites.google.com/a/chromium.org/chromedriver/getting-started
Install Appium on Linux(Fedora 22)
$ sudo dnf update -y
$ sudo dnf groupinstall -y "Development Tools"
$ sudo dnf install -y autoconf automake libtool gettext git scons cmake flex bison libcurl-devel curl ncurses-devel ruby bzip2-devel expat-devel
$ git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew
Until LinuxBrew is fixed, the following is required.
Add to .bashrc:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH
## Setup linux brew
export LINUXBREWHOME=$HOME/.linuxbrew
export PATH=$LINUXBREWHOME/bin:$PATH
export MANPATH=$LINUXBREWHOME/man:$MANPATH
export PKG_CONFIG_PATH=$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH
$ ln -s $(which gcc) ~/.linuxbrew/bin/gcc-4.4
$ ln -s $(which g++) ~/.linuxbrew/bin/g++-4.4
$ brew update
$ brew install node # get node.js
$ npm install -g appium # get appium
$ npm install wd # get appium client
$ appium & # start appium
Hello appium installation is very simple , please check below steps
1)Install Latest Node.js
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
More information please check official website : https://nodejs.org/en/download/package-manager/
2) Install latest Appium
npm install -g appium
or
sudo npm install -g appium
More information please check official documentation :
https://www.npmjs.com/package/appium
install on nvm
sudo apt install build-essential checkinstall
sudo apt install libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
node -v
npm -v
npm install -g appium
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