it complicates...and it complicates. and. it. complicates. and it's complicated...so, you to fucking use some asshool card...you need to have this connection to his phone...then you need to install AirDroid...and then finally NFCproxy...
Setup networking
This will let you find your pi locally using it's name, e.g.
ping davepi.local
sudo apt-get update
sudo apt-get install avahi-daemon
Set a static ip
sudo nano /etc/network/interfaces
Then do something clever in here. Aftwards, make sure your ports are forwarded in your router, so the pi can be seen from the outside world.
Compile adb
Because you can't download adb for the pi.
Your development server adb will need to be the same version as the pi adb.
sudo apt-get install git build-essential libncurses5-dev libssl-dev
mkdir aosp
cd aosp
git clone https://android.googlesource.com/platform/system/core.git system/core
git clone https://android.googlesource.com/platform/external/zlib.git external/zlib
You might need to checkout a speific brach, tag, or commit here. See this page for branches / tags https://android.googlesource.com/platform/system/core/
cd system/core/adb
wget -O Makefile https://gist.github.com/jsonfry/62d59c9cc0295cc8de4f/raw/405031a85521364f3b04cfac435768d6bbc39408/Makefile
make adb
sudo cp adb /usr/local/bin/
Set correct permissions on adb
sudo chown root:mylovelyusername /usr/local/bin/adb
sudo chmod 4550 /usr/local/bin/adb
SSH Login
mkdir ~/.ssh
nano ~/.ssh/authorized_keys
Run
cat ~/.ssh/id_rsa.pub
on your development machine / ci server / who ever will be connecting to the pi and copy output into the open file