I'm trying to download the Android sources as described here: http://source.android.com/source/downloading.html#getting-the-files
wutze#wutze-pc ~
$ cd bin
wutze#wutze-pc ~/bin
$ ls
wutze#wutze-pc ~/bin
$ cd ..
wutze#wutze-pc ~
$ PATH=~/bin:$PATH
wutze#wutze-pc ~
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 26223 100 26223 0 0 107k 0 --:--:-- --:--:-- --:--:-- 110k
wutze#wutze-pc ~
$ chmod a+x ~/bin/repo
wutze#wutze-pc ~
$ mkdir WORKING_DIRECTORY
wutze#wutze-pc ~
$ cd WORKING_DIRECTORY
wutze#wutze-pc ~/WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest
Get https://gerrit.googlesource.com/git-repo/clone.bundle
wutze#wutze-pc ~/WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
Get https://gerrit.googlesource.com/git-repo/clone.bundle
wutze#wutze-pc ~/WORKING_DIRECTORY
$
but I'm not getting asked for credentials, and repo sync won't work either:
wutze#wutze-pc ~/WORKING_DIRECTORY
$ repo sync
error: command 'sync' requires repo to be installed first.
Use "repo init" to install it here.
wutze#wutze-pc ~/WORKING_DIRECTORY
and I don't get any error message
Try installing Git for Cygwin. Its under the 'devel' category within Cygwin setup.
The only way you can add these is by re-running the setup again.
Related
I've read related question
However, I'm using the 'androidx.test:orchestrator:1.4.0', which should not has the bug below 1.2.0.
My case is, I will get error: com.android.build.gradle.internal.testing.ConnectedDevice > No tests found.[GM1910 - 11] FAILED if I enable :
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
I've done the prefix operations:
$ curl -O https://dl.google.com/android/maven2/androidx/test/orchestrator/1.4.0/orchestrator-1.4.0.apk
$ curl -O https://dl.google.com/android/maven2/androidx/test/services/test-services/1.4.0/test-services-1.4.0.apk
$ adb install -r orchestrator-1.4.0.apk
$ adb install -r test-services-1.4.0.apk
$ adb shell 'CLASSPATH=$(pm path androidx.test.services) app_process / \
androidx.test.services.shellexecutor.ShellMain am instrument -w -e \
targetInstrumentation com.example.notroid/androidx.test.runner.AndroidJUnitRunner \
androidx.test.orchestrator/.AndroidTestOrchestrator'
Time: 0
OK (0 tests)
I'm trying to build a prototype Android app for connecting my Android device to an iOS device wirelessly. While researching for options, I came across libimobiledevice library which seems like the right fit. I'm currently stuck in what seems like iOS device is receiving the request but rejecting it and that's what I wanted to understand from this forum.
What I have done so far:
I have packaged libimobiledevice library as an .so file in my Android application and I able to make JNI calls from my Android app to call in methods of the library.
I'm also packaging in the libusbmuxd library and libplist as mentioned in the dependencies.
For protoyping, I'm creating a wifi hotspot from my Android device and connecting the iOS device. I also know the IP addresses of the two devices. I also know that the lockdownd deamon on iOS runs on port 62078. Given the IP address and port, when I make the call to the socket I do see that the idevice_new_with_options -> usbmuxd_get_device -> connect_usbmuxd_socket -> socket_connect is able to reach out to iOS device on the socket. Confirmed by looking at iOS logs
lockdownd[70] <Notice>: _receive_message: <private>
symptomsd(SymptomEvaluator)[120] <Notice>: Data Usage for lockdownd - WiFi in/out: 181637370/198768065, WiFi delta_in/delta_out: 458/0, Cell in/out: 0/0, Cell delta_in/delta_out: 0/0, RNF: 0, subscriber tag: 0
But immediately after this I see that the connection is dropped probably because lockdownd is rejecting it. I see the this getting triggered with error 104 which means "Connection reset by peer"
Questions:
As I understand it, the libimobiledevice is trying to make a TCP/IP connection to iPhone. And once the connection succeeds, I'll be able to use the rest of the capabilities of the library like invoking the mentioned services.
Is my setup correct or am I missing something? The code compiles and doesn't crash so it feels like I have all the needed dependencies.
How can I debug this further on iOS side to understant why lockdownd is reseting the connection?
Thanks!
libimobiledevice depends on usbmux, and for Linux this is not currently working wirelessly. You can overcome this by using the usbmuxd2 re-implementation.
This is my script for getting that full linux implementation up and running on a raspberry Pi. I also have a more user friendly walk through of the same thing right here: nMirrior
#!/bin/bash
echo "installing dependencies"
read -p "Do you want to update/install build tools (you need to if this is a new image) (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo apt-get -q update
sudo apt-get -q install \
build-essential \
checkinstall \
git \
autoconf \
automake \
libtool-bin
fi
echo "installing libatomic"
sudo apt-get -q install libatomic-ops-dev libatomic1
echo "installing libimobiledevice dependencies"
sudo apt-get -q install \
libplist-dev \
libusbmuxd-dev \
libimobiledevice-dev \
libusb-1.0-0-dev \
libplist++-dev \
libssl-dev \
usbmuxd \
udev \
libavahi-client-dev \
avahi-utils
echo "Starting nMirror setup"
# Configure source directories
nMirrorDir=~/nMirror
echo "The applications needed for nMirror will be installed in $nMirror"
libplistDir=$nMirrorDir/libplist
libusbmuxdDir=$nMirrorDir/libusbmuxd
libimobiledeviceDir=$nMirrorDir/libimobiledevice
libgeneralDir=$nMirrorDir/libgeneral
usbmuxd2Dir=$nMirrorDir/usbmuxd2
#Standard libimobiledevice repos
libplistGit=https://github.com/libimobiledevice/libplist.git
libusbmuxdGit=https://github.com/libimobiledevice/libusbmuxd.git
libimobiledeviceGit=https://github.com/libimobiledevice/libimobiledevice.git
#tihmstar repo for usbmuxd2 to support network connection to iDevice
usbmuxd2Git=https://github.com/tihmstar/usbmuxd2.git
libgeneralGit=https://github.com/tihmstar/libgeneral.git
# Create the project directory if it does not exist
mkdir -p $nMirrorDir
cd $nMirrorDir
# Fetch the repos
fetchnext=false
if test -d $libplistDir; then
read -p "libplist directory exists. Remove and re-fetch new? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
rm -rf $libplistDir
fetchnext=true
fi
else
fetchnext=true
fi
if [ "$fetchnext" == true ]; then
echo "Cloning from git. 1 - libplist"
cd $nMirrorDir
git clone --quiet $libplistGit
cd $libplistDir
# git checkout 2.2.0 # Cannot go back to the last tag (2.2.0) because usbmuxd2 want 2.2.1 - just get the head for now
fi
if test -d $libusbmuxdDir; then
read -p "libusbmuxd directory exists. Remove and re-fetch new? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
rm -rf $libusbmuxdDir
fetchnext=true
fi
else
fetchnext=true
fi
if [ "$fetchnext" == true ]; then
echo "Cloning from git. 2 - libusbmuxd (Normal)"
cd $nMirrorDir
git clone --quiet $libusbmuxdGit
cd $libusbmuxdDir
git checkout 2.0.2
fi
if test -d $libimobiledeviceDir; then
read -p "libimobiledevice directory exists. Remove and re-fetch new? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
rm -rf $libimobiledeviceDir
fetchnext=true
fi
else
fetchnext=true
fi
if [ "$fetchnext" == true ]; then
echo "Cloning from git. 3 - libimobiledevice"
cd $nMirrorDir
git clone --quiet $libimobiledeviceGit
cd $libimobiledeviceDir
git checkout 1.3.0
fi
#tihmstar repo for usbmuxd2 to support network connection to iDevice
if test -d $libgeneralDir; then
read -p "libgeneral directory exists. Remove and re-fetch new? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
rm -rf $libgeneralDir
fetchnext=true
fi
else
fetchnext=true
fi
if [ "$fetchnext" == true ]; then
echo "Cloning from git. 4 - libgeneral (tihmstar Experimental repo tag 55)"
cd $nMirrorDir
git clone --quiet $libgeneralGit
cd $libgeneralDir
git checkout 55
fi
if test -d $usbmuxd2Dir; then
read -p "usbmuxd2 directory exists. Remove and re-fetch new? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
rm -rf $usbmuxd2Dir
fetchnext=true
fi
else
fetchnext=true
fi
if [ "$fetchnext" == true ]; then
echo "Cloning from git. 5 - usbmuxd2 (tihmstar Eperimental repo)"
cd $nMirrorDir
git clone --quiet $usbmuxd2Git
cd $usbmuxd2Dir
git submodule init
git submodule update
fi
#build stage
cd $libplistDir
./autogen.sh
make
sudo make install
cd $libusbmuxdDir
./autogen.sh
make
sudo make install
cd $libimobiledeviceDir
./autogen.sh
make
sudo make install
sudo ldconfig
#configure Avahi for zeroconf as per https://www.raspberrypi.org/forums/viewtopic.php?t=267113
#Note: Zeroconf may not be desirable - use with caution
cd $nMirrorDir
#create avahi patch
tee avahi.patch <<EOF
--- /etc/avahi/avahi-daemon.conf 2021-08-16 23:59:16.917672251 +0100
+++ /etc/avahi/avahi-daemon_usbmuxd.conf 2021-08-17 09:45:02.096575347 +0100
## -20,7 +20,7 ##
[server]
#host-name=foo
-#domain-name=local
+domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
## -46,8 +46,8 ##
#disable-user-service-publishing=no
#add-service-cookie=no
#publish-addresses=yes
-publish-hinfo=no
-publish-workstation=no
+publish-hinfo=yes
+publish-workstation=yes
#publish-domain=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
EOF
cd /etc
sudo patch -p2 < $nMirrorDir/avahi.patch
#enable the avahi-daemon
systemctl list-unit-files avahi-daemon.service
#activate/enable the avahi-daemon.service
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service
sudo systemctl restart avahi-daemon.service
#enable ssh service
sudo systemctl enable ssh.service
sudo systemctl start ssh.service
#avahi-browse -a
# if using gcc: the patch below works to include -latomic
# if using clang: make CXX=clang++
cd $libgeneralDir
./autogen.sh
make CFLAGS="-g -O2 -std=c11 -latomic" LDFLAGS=-latomic
sudo make install
sudo ldconfig
cd $usbmuxd2Dir
#create log patch
#cassure only needed for versions after 55 - probably remove this as checkout is fixed to 55
tee log.patch <<EOF
--- a/configure.ac
+++ b/configure.ac
## -29,7 +29,7 ## case $host_os in
have_mdns="yes"
;;
*)
- LDFLAGS+=" -lstdc++fs"
+ LDFLAGS+="-latomic -lstdc++fs"
;;
esac
EOF
git apply log.patch
./autogen.sh
make
sudo make install
sudo ldconfig
# get the BT PAN up and running
sudo apt-get install bluez-tools
sudo tee /etc/systemd/network/pan0.netdev <<EOF
[NetDev]
Name=pan0
Kind=bridge
EOF
sudo tee /etc/systemd/network/pan0.network <<EOF
[Match]
Name=pan0
[Network]
Address=172.20.1.1/24
DHCPServer=yes
EOF
sudo tee /etc/systemd/system/bt-agent.service <<EOF
[Unit]
Description=Bluetooth Auth Agent
[Service]
#ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
ExecStart=/bin/sh -c '/usr/bin/yes | /usr/bin/bt-agent --capability=NoInputNoOutput' #autoaccept
Type=simple
[Install]
WantedBy=multi-user.target
EOF
sudo tee /etc/systemd/system/bt-network.service <<EOF
[Unit]
Description=Bluetooth NEP PAN
After=pan0.network
[Service]
ExecStart=/usr/bin/bt-network -s nap pan0
Type=simple
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable systemd-networkd
sudo systemctl enable bt-agent
sudo systemctl enable bt-network
sudo systemctl start systemd-networkd
sudo systemctl start bt-agent
sudo systemctl start bt-network
sudo bt-adapter --set Discoverable 1
# list devices. Need to ask the user to connect via USB the first time using idevicesyslog. Then make the BT PAN connection and connect via idevicesyslog -n
/usr/local/bin/idevice_id
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 am following the below steps to download repo for building an android marshmellow image .
cd ~
$ mkdir myandroid
$ mkdir bin
$ cd myandroid
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ ~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r22
$ ~/bin/repo sync
after last step it has already download 18 GB and still going on
is there anyway to find the size of this repo before downloading it.
I have searched the following link
See the size of a github repo before cloning it?
but above method gives output of message : unknown file
how to find it ?
I downloaded Android 2.2 source code a long time ago but it didn't have the kernel source code. I looked online and it seems like there is a separate Android kernel source I should download.
Someone gave me this address
git clone https://android.googlesource.com/kernel/common
but I think I should specify the version and branch.
So what is the full command to download Android 2.2 froyo kernel source code?
For other kernels you could use any of these:
git clone https://android.googlesource.com/kernel/common.git
git clone https://android.googlesource.com/kernel/goldfish.git
git clone https://android.googlesource.com/kernel/msm.git
git clone https://android.googlesource.com/kernel/omap.git
git clone https://android.googlesource.com/kernel/samsung.git
git clone https://android.googlesource.com/kernel/tegra.git
git clone https://android.googlesource.com/kernel/common.git is not enough !
cd common
List all the branches:
git branch -a
Checkout one of them:
git checkout android-2.6.39
Get tools:
$ sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
Get repo tool:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Get source code:
$ repo init -u https://android.googlesource.com/platform/manifest
OR
$ repo init -u https://android.googlesource.com/platform/manifest -b release-1.0
OR
$ repo init -u https://android.googlesource.com/platform/manifest -b android-sdk-1.5_r2
$ repo sync`
Sync single project:
$ repo sync {project_name}
Get common kernel:
$ git clone https://android.googlesource.com/kernel/common
To add to #Aloongs answer ->
Get the source using Git:
git checkout -b android-2.6.35 origin/android-2.6.35
where -b = branch name and start point is android-2.6.35
To list the remote branches use the following command:
git branch -r