Linux and programming noob here...
I'm following the instructions # http://source.android.com/source/downloading.html
I run into trouble when I run the following line:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
I get:
bash: /home/dev/bin/repo: Permission denied
And yes I've tried to sudo it.
Thank you! :)
==================================================================================
EDIT:
I downloaded the script manually in a browser, popped-it into the home/dev/bin/ directory, and I am still unable to progress. Here is what my terminal window is giving me:
dev#Android-Dev:~$ sudo chmod a+x ~/bin/repo
[sudo] password for dev:
dev#Android-Dev:~$ cd /home/dev/bin/
dev#Android-Dev:~/bin$ sudo mkdir wip
dev#Android-Dev:~/bin$ cd wip
dev#Android-Dev:~/bin/wip$ repo init -u **<This is where the URL goes>**
fatal: cannot make .repo directory: Permission denied
dev#Android-Dev:~/bin/wip$ sudo repo init -u **<This is where the URL goes>**
sudo: repo: command not found
dev#Android-Dev:~/bin/wip$ cd bin
bash: cd: bin: No such file or directory
dev#Android-Dev:~/bin/wip$ cd ..
dev#Android-Dev:~/bin$ sudo repo init -u **<This is where the URL goes>**
sudo: repo: command not found
I ran into the same problem. changing the ownership helped me. When I try to curl https..://myrepo...u...r...l../repo > ./repo into my /opt/android dir it gives me this error.
I do sudo chown -R shraddha /opt/android that works
In CYGWIN you can do below.
edit .bash_profile and uncomment these fields. (any text editor will do)
# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH="${HOME}/bin:${PATH}"
# fi
Restart CYGWIN.
Under BASH, enter:
$ export PATH=$PATH:~/bin
Or add as follows to your .bashrc file:
$ echo 'export PATH=$PATH:~/bin' >> ~/.bashrc
If you are using CSH / TCSH, enter:
$ echo 'set PATH = ($PATH ~/bin /scripts/admin)' >> ~/.cshrc
To display path settings, enter:
$ echo $PATH
Maybe you're behind a proxy? Try to download repo tool manually (just put this link into your browser). (I guess that maybe this resource can be prohibited for you). And then put it into this folder and assign permissions to it. I do not see any wrong steps in what you've described so far.
you can try this:
wget http://git-repo.googlecode.com/files/repo-1.14
After that,
you can see the repo-1.14, and you can mv it to anywhere or change the name,such as :
sudo mv repo-1.14 ~/bin/repo
The repo file is not executable. Run chmod a+x ~/bin/repo to turn it into an executable file and this should fix your problem.
Related
I'm trying to run the following git repo command
repo init -u git://codeaurora.org/quic/le/le/manifest.git -b release -m [manifest xml] --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
but I keep seeing the following gpg error:
gpg: Can't check signature: No public key
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
I tried to follow the steps as stated here to no avail
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
I ran into this and found out you need to have the right gpg key in the ~/.repoconfig folder
Similar to https://stackoverflow.com/a/63125058
But put the key in right place.
mkdir -p ~/.repoconfig/gnupg/
GNUPGHOME=~/.repoconfig/gnupg/ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 692B382C
If you dont want to locate the CAF key and download it; the following should work.
Install repo from -> https://source.android.com/setup/develop#installing-repo
Drop the --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable from your repo init command.
This below solution worked for me.
First delete the repo u installed with the bin directory.
rm -rf ~/bin
Then delete config file with the below commands.
rm -rf .repoconfig/ rm -rf .gnupg/ (if available)
Then install the repo with the below commands.
sudo apt-get install repo
Then to install the signature run the below commands.
repo init
This will download the required signatures.
That's it, Run the repo init -u <manifest url> -b <release> -m <manifest file>...
repo sync it will start the sync.
Experimented on Ubuntu version: 18.04
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'm getting a "Could not find an Android SDK please make sure it is installed" error when trying to run calabash-android commands. I've installed the Android SDK via brew. Here are the contents of my .bash_profile:
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.2
PATH=$PATH:$ANDROID_HOME/tools
PATH=$PATH:$ANDROID_HOME/platform-tools
PATH=$PATH:$ANDROID_HOME/build-tools
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
PATH=$PATH:/usr/local/apache-ant-1.9.4/bin
PATH=$PATH:/usr/local/share/npm/bin
JAVA_HOME=/usr/libexec/java_home
export PATH
Here's my $PATH:
echo $PATH
/Users/mchumak/.rvm/gems/ruby-2.1.1/bin:/Users/mchumak/.rvm/gems/ruby-2.1.1#global/bin:/Users/mchumak/.rvm/rubies/ruby-2.1.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Cellar/android-sdk/24.2/tools:/usr/local/Cellar/android-sdk/24.2/platform-tools:/usr/local/Cellar/android-sdk/24.2/build-tools:/Users/mchumak/.rvm/bin:/Users/mchumak/.rvm/bin:/opt/local/bin:/opt/local/sbin:/Users/mchumak/.rvm/bin:/usr/local/apache-ant-1.9.4/bin:/usr/local/share/npm/bin
"which android" produces:
/usr/local/bin/android
The contents of that particular file are:
#!/bin/bash
TOOL="/usr/local/Cellar/android-sdk/24.2/tools/android"
exec "$TOOL" "$#"
I can run the Android SDK Manager from the command line just fine, and it shows the correct SDK path (/usr/local/Cellar/android-sdk/24.2).
I'm stumped. Any ideas why calabash-android can't find the SDK?
This will fix your issue,
echo "export PATH=$PATH:/Users/#username/Library/Android/sdk/platform-tools/sdk/platform-tools/" >> ~/.bash_profile
install android-platform-tools -> brew install android-platform-tools
- Also ensure yourself have admin rights
Looking at your $PATH output seems like android sdk path isnt loaded into PATH. Add below to your .bash_profile
PATH=$PATH:$ANDROID_HOME
calabash-android run /Users/marcg/Downloads/app-news.apk
I received that following error
Could not find any platform directory in '/Users/marcg/Library/Android/sdk/platforms'
I corrected this with the symlink below:
/Users/marcg/Library/Android/sdk/platforms
platforms$ ln -s ../platform-tools/ platform
I ran again and get an error that the android jar was missing from a standard directory of /Users/marcg/Library/Android/sdk/platforms
I then copied that android.jar to this platforms dir
Dir now looks like:
/Users/marcg/Library/Android/sdk/platforms
us164912:platforms marcg$ ls -l
total 49640
-rwxr-xr-x 1 marcg Users 25409822 Oct 5 09:26 android.jar
lrwxr-xr-x 1 marcg Users 18 Oct 5 09:14 platform -> ../platform-tools/
Still getting
Did not find 'android.jar' in any standard directory of '/Users/marcg/Library/Android/sdk/platforms'. Calabash will therefore take longer to load
I copied the android.jar to the platform-tools directory and remaining error went away.
Steps to correct:
Make a symlink in platforms that points to platform-tools
ln -s ../platform-tools/ platform
Copy the android.jar to the platform-tools dir
Would be better if the framework allowed you configure via file or additional env vars where to find each of these. My earlier attempt to set ANDROID_HOME to the platform-tools dir didn't work and why I did a symlink.
I'm trying to integrate Mopub(Ad Network) to android studio and i'm told to run this code.
$MY_PROJECT_DIR $ mkdir mopub-sdk
$MY_PROJECT_DIR $ cp -R $MOPUB_DIR/mopub-android-sdk/mopub-sdk mopub-sdk
I have no idea where i'm suppose to put this. Can someone tell me?
Signing up for Fabric isn't a requirement. It sounds like you're following instructions from https://dev.twitter.com/mopub/android/getting-started. Open Terminal, and execute the commands in your project directory:
mkdir mopub-sdk
cp -R $MOPUB_DIR/mopub-android-sdk/mopub-sdk mopub-sdk
i have follow the instructions.phonegab docs and How to add android to cordova platform? PATH error?
my .bash_profile:
export PATH=/usr/local/bin:$PATH
export PATH=$PATH:~/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools
export PATH=${PATH}:~/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:~/Development/adt-bundle-mac-x86_64-20140321/sdk/tools
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
eval "$(rbenv init -)"
but still Error while i executing cordova platform add android or ionic platform android:
Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.
Any Solutions? thank you
Try to run android in command line. if the command is not found, it's mean that the path of android sdk that registered is still wrong
AndroidDev PATH
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
You have to manually reload your setting like for Ubuntu I am using this command "$ source ~/.bashrc"
Thank you All for your clue of solutions. I try add $HOME because /Development directory in /Home directory and i followed code RVM in my .bash_profile:
`[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
eval "$(rbenv init -)"`
The solutions in How to add android to cordova platform? PATH error? i followed symbol ~ for initialize /Development directory in /Home directory, but it's not working. and I try follow code RVM in my .bash_profile use $HOME.
this is my .bash_profile:
export PATH=${PATH}:$HOME/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:$HOME/Development/adt-bundle-mac-x86_64-20140321/sdk/tools
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
eval "$(rbenv init -)"
and then run command source ~/.bash_profile. Solved