Using Android tools (ADB, Fastboot) on Fedora Silverblue - joefidler/joefidler.github.io GitHub Wiki

Using Android tools (ADB, Fastboot) on Silverblue

Create a toolbox and install the Android-tools package

Create a toolbox, which we can call android, and then install the android-tools package into it.

toolbox create --container android

toolbox enter android

sudo dnf install android-tools

exit

  • At this point you may need to stop and start the toolbox

podman container list (to get the id of the toolbox's container)

podman stop toolbox_container_id

podman start toolbox_container_id

Download and install the Google tools into the toolbox

toolbox enter android (if you are not already there)

wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip

unzip platform-tools-latest-linux.zip

sudo cp -v platform-tools/adb platform-tools/fastboot platform-tools/mke2fs* platform-tools/e2fsdroid /usr/local/bin

setup udev rules

On the host (i.e. outside the toolbox) we need to setup the udev rules and service.

git clone https://github.com/M0Rf30/android-udev-rules.git

cd android-udev-rules

sudo cp -v 51-android.rules /etc/udev/rules.d/51-android.rules

sudo chmod a+r /etc/udev/rules.d/51-android.rules

sudo groupadd adbusers

sudo usermod -a -G adbusers $(whoami)

sudo systemctl restart systemd-udevd.service

Finally in the toolbox : adb kill-server (opional - to reset things a bit)

ADB & Fastboot

Plug-in a USB cable.

  • ADB: On the phone, boot system or recovery (if you have one). If connecting to the system, make sure to enable USB debugging in the developer options.

On the computer:

toolbox enter android

adb devices (try things out - make sure that you authorize ADB on your phone when it asks)

  • Fastboot: Boot the phone's bootloader.

On the computer:

toolbox enter android

fastboot devices

More information:

https://discussion.fedoraproject.org/t/how-to-use-adb-android-debugging-bridge-on-silverblue/2475

https://github.com/M0Rf30/android-udev-rules#installation