Where do I go to run this code - android

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

Related

"gpg: Can't check signature: No public key" upon initializing a repo from code aurora

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

How to get list of currently working commands in Cygwin?

Currently working with the linphone-android integration. I have installed some packages during installation of Cygwin.
When I try some of the commands like ls, rm, cd, wget, tar and etc.. are working fine. But few commands like shell, clean are not working. It gives error command not found.
So, my question is,
Is there any way to get list of working commands for Cygwin?
Is there any way to install packages for these commands rather than installing them manually?
In my opinion the most elegant solution is to use the compgen command:
compgen -c lists all the available commands
compgen -a lists all the available aliases
You can also try a more brute approach:
Get all the paths from cygwin using echo $PATH and then for each folder execute ls -h <folder_name>
For installing a package the best way is to install first the equavalent of apt-get: apt-cyg from https://github.com/transcode-open/apt-cyg and put it in /usr/local/bin:
wget raw.github.com/transcode-open/apt-cyg/master/apt-cyg<br>
chmod +x apt-cyg<br>
mv apt-cyg /usr/local/bin<br>
You can also try running the setup executable used to install cygwin setup.exe -q -n -N -d -R c:\cygwin -s http://mirror_site_to_use -l c:\local_package_folder for a local package or setup.exe -q -P package_name to let the setup download the package

How do I execute a shell file?

I'm trying to download Whatsapp on my laptop. I am using Ubuntu desktop software. I've installed Android Emulator from http://dl.google.com/android/android-sdk_r16-linux.tgz
I unzipped the file, opened the folder, Android-sdk-linux, opened Tools and now I'm supposed to execute the file Android, and I'm not sure how to do that. Can anyone give me any help?
Ok, so this is what I thought I was supposed to do:
shell#shell:~$ cd Desktop
shell#shell:~/Desktop$ ./android.sh
bash: ./android.sh: No such file or directory
but then that happens...
Make the file executable first with
chmod +x filename.sh
Then start the script with
./filename.sh
or
/full/path/to/filename.sh
sh filename.sh
OR
bash filename.sh
Use the following command to install the WhatsApp on Ubuntu:
wget https://www.thefanclub.co.za/sites/all/modules/pubdlcnt/pubdlcnt.php?file=https://www.thefanclub.co.za/sites/default/files/public/downloads/whatsapp-webapp_1.0_all.deb&nid=200 && sudo dpkg -i whatsapp-webapp_1.0_all.deb
Then enter the password and open WhatsApp using the application key.
by default permission for any shell script is "-rw-rw-r--" first we need to change the permissions using the "chmod command" then we can run the shell script in the same way in which we run the C executable code.
To debug the shell script we need to run the shell script with the "bash -x" option as follow : $ bash -x ./

Download and moving .apk with bash

I made a script to clean a ROM and install specific apps but when I look in the folder Mac is not seeing my .apk as unix exec file how can i fix this
here is part of the script:
getapex='curl -s -o ApexLauncher.apk apex.anddoes.com/Download.aspx'
$getapex
mv ApexLauncher.apk $currentdir/system/app/
hope you guys can help....
If it's not seeing the .apk file as a "unix exec file" as you say, then maybe you need to give it execution permission with:
chmod +x ApexLauncher.apk

Permission Denied: Initializing repo for building Android source

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.

Categories

Resources