D14b0l1c Posted February 28 Posted February 28 Goal is to build payload that restarts the adb service if phone restarts without having to connect phone back into laptop. Currently I am able to setup the phone, not rooted: adb device connection sustain server connection once device is unplugged from usb without using wifi (requires additional applications) able to establish connection back to laptop over cellular network, not wifi (requires additional applications) Once phone dies or restarts, the original server session is killed, I have use laptop and/or pi to restart the server. I have just opened my bash bunny to build this out as one of my first use cases. From my research I seen I needed to install adb toolkit, so I first ran "apt -y update && apt -y upgrade" and I start getting 404 errors. From that I did research on the 404 errors and was directed to looking into "/etc/apt/sources.list". Keep in mind I am able to ping out "ping 8.8.8.8" from bad bunny. The following was the first issue I had: root@bunny:~# apt update Get:1 http://archive.debian.org jessie-backports InRelease [166 kB] Ign http://archive.debian.org jessie-backports InRelease Ign http://archive.debian.org jessie-backports/main Sources/DiffIndex Ign http://archive.debian.org jessie-backports/main armhf Packages/DiffIndex Get:2 http://archive.debian.org jessie-backports/contrib Translation-en [6946 B] Get:3 http://archive.debian.org jessie-backports/contrib armhf Packages [7980 B] Get:4 http://archive.debian.org jessie-backports/non-free armhf Packages [6692 B] Hit http://archive.debian.org jessie-backports/main Translation-en Hit http://archive.debian.org jessie-backports/main Sources Ign http://archive.debian.org jessie-backports/non-free Translation-en Err http://archive.debian.org jessie-backports/main armhf Packages 404 Not Found [IP: 151.101.66.132 80] Fetched 188 kB in 6min 9s (508 B/s) W: GPG error: http://archive.debian.org jessie-backports InRelease: The following signatures were invalid: KEYEXPIRED 1587841717 KEYEXPIRED 1587841717 KEYEXPIRED 1587841717 KEYEXPIRED 1587841717 KEYEXPIRED 1587841717 KEYEXPIRED 1668891673 W: Failed to fetch http://archive.debian.org/debian/dists/jessie-backports/main/binary-armhf/Packages 404 Not Found [IP: 151.101.66.132 80] E: Some index files failed to download. They have been ignored, or old ones used instead. I ran: apt-key adv --refresh-keys --keyserver hkp://keys.gnupg.net apt-key adv --refresh-keys --keyserver hkp://keyserver.ubuntu.com I made the following changes to the /etc/apt/sources.list: deb http://archive.debian.org/debian jessie-backports main deb-src http://archive.debian.org/debian jessie-backports main deb http://archive.debian.org/debian jessie-backports contrib deb http://archive.debian.org/debian jessie-backports non-free Now I am getting: E: The value 'jessie' is invalid for APT::Default-Release as such a release is not available in the sources I have reverted back to the original sources.list: deb http://archive.debian.org/debian jessie-backports main deb-src http://archive.debian.org/debian jessie-backports main I am still getting the following error: E: The value 'jessie' is invalid for APT::Default-Release as such a release is not available in the sources Please help and thank you in advance, -D14b0l1c Quote
dark_pyrro Posted February 28 Posted February 28 The situation when it comes to apt update or to apt install things on the Bunny will get worse for each day that passes. Jessie is EOL since long, and even if there has been (or perhaps still are) workarounds available, those workarounds will stop working as time goes by. There is a non official ELTS available for Jessie, but that doesn't cover the full scope of what Jessie once was. You could try the Freexian ELTS, but it's at your own risk. It might work to some extent, or it might not... If successful, one thing that you shouldn't do is run apt upgrade (either using official channels or something else). It will risk messing the Bunny up. Just run apt update and then apt install what you need. Quote
dark_pyrro Posted February 28 Posted February 28 Just tried using Freexian ELTS on one of my Bunnies and it works. Sadly, it doesn't contain an install candidate for adb though. Quote
Solution dark_pyrro Posted February 28 Solution Posted February 28 However, it's possible to "force" adb to be installed on the Bunny. Did the operations below and got adb to execute. Not sure if there are more things needed to be installed for specific adb functionality, but that will probably show in one way or the other when using it. wget --no-check-certificate https://archive.debian.org/debian/pool/main/a/android-platform-system-core/android-liblog_7.0.0+r33-1_armhf.deb dpkg -i android-liblog_7.0.0+r33-1_armhf.deb wget --no-check-certificate https://archive.debian.org/debian/pool/main/a/android-platform-system-core/android-libbase_7.0.0+r33-1_armhf.deb dpkg -i android-libbase_7.0.0+r33-1_armhf.deb wget --no-check-certificate https://archive.debian.org/debian/pool/main/a/android-platform-system-core/android-libcutils_7.0.0+r33-1_armhf.deb dpkg -i android-libcutils_7.0.0+r33-1_armhf.deb wget --no-check-certificate https://archive.debian.org/debian/pool/main/a/android-platform-system-core/android-libadb_7.0.0+r33-1_armhf.deb dpkg -i android-libadb_7.0.0+r33-1_armhf.deb wget --no-check-certificate https://archive.debian.org/debian/pool/main/a/android-platform-system-core/adb_7.0.0+r33-1_armhf.deb dpkg -i adb_7.0.0+r33-1_armhf.deb Quote
D14b0l1c Posted February 28 Author Posted February 28 Thank You!!! root@bunny:~# man adb ADB(1) adb Manuals ADB(1) NAME adb - Android Debug Bridge SYNOPSIS adb [-d|-e|-s serialNumber] command DESCRIPTION Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components: o A client, which sends commands. The client runs on your development machine. You can invoke a client from a shell by issuing an adb com- mand. Other Android tools such as DDMS also create adb clients. o A daemon, which runs commands on a device. The daemon runs as a background process on each emulator or device instance. o A server, which manages communication between the client and the dae- mon. The server runs as a background process on your development ma- chine. If there's only one emulator running or only one device connected, the adb command is sent to that device by default. If multiple emulators are running and/or multiple devices are attached, you need to use the -d, -e, or -s option to specify the target device to which the command should be directed. OPTIONS -a Directs adb to listen on all interfaces for a connection. -d Directs command to the only connected USB device. Returns an error if more than one USB device is present. -e Directs command to the only running emulator. Returns an error if more than one emulator is running. -s specific device Directs command to the device or emulator with the given serial number or qualifier. Overrides ANDROID_SERIAL environment vari- able. -p product name or path Simple product name like sooner, or a relative/absolute path to a product out directory like out/target/product/sooner. If -p is not specified, the ANDROID_PRODUCT_OUT environment variable is used, which must be an absolute path. -H Name of adb server host (default: localhost) -P Port of adb server (default: 5037) COMMANDS adb devices [-l] List all connected devices. -l will also list device quali- fiers. adb connect host[:port] Connect to a device via TCP/IP. Port 5555 is used by default if no port number is specified. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.