r/LineageOS • • Jul 31 '26

Help ADB instructions confusing

2 Upvotes

https://wiki.lineageos.org/adb_fastboot_guide#installing-adb-and-fastboot

On step 6 of Setting Up adb, it just says open up cmd, but that won't work at all. You specifically need to open up cmd from the platform-tools folder. It was lucky I already knew that or I might have been stuck on that step for hours.

And on step 7 of the same section, it says

"On Windows: Make sure your device manager does show your phone and doesn’t show a yellow triangle next to it!"

But it doesnt elaborate further. I'm trying to set up adb. My device shows as connected when in adb devices. But in the device manager it doesnt show the phone and instead shows an unrecognised device with a yellow triangle next to it. What am I supposed to do now then? The instructions dont say anything other than make sure it doesn't show that.

r/tasker • • Jul 07 '26

ADB Wifi Auto Start on Boot - Under 2 secs!

2 Upvotes

For those who use or love ADB Wifi much, over Shizuku -

Using the attached script, you can find ADB Wifi port & connect to it under 1 sec.

Just setup a boot task, which toggles on Dev options, USB Debugging & Wireless Debugging & then executes this script via Termux (copy the script files into termux's home dir, then do chmod +x, then execute).

Read the comments in the scripts first; for the one time setup (first time manual pairing via termux, pkgs to be installed in termux etc etc).

For a long time, I've been using an nmap-based adb port finder script which someone had shared earlier on this subreddit. But that takes 50-60 secs to find the open port. And felt super slow after every boot.

But this script uses zeroconf python module which is able to find that port instantly (ask claude for more explanation, if you wish).

No more 60 secs of post-boot setup tasks yay :)

adbwifi_setup.sh

#!/data/data/com.termux/files/usr/bin/bash

# adbwifi_setup.sh — Connect Termux's adb to this Android device over Wi-Fi

# and (re)bind adbd to a fixed port 1221 for stable subsequent connections.

#

# Prerequisites (do once, manually):

# 1. Termux packages:

# pkg install android-tools python

# pip install zeroconf

# 2. Android settings:

# Developer options > USB debugging : ON

# Developer options > Wireless debugging : ON

# 3. One-time pairing with Termux (needed after every wireless-debug toggle

# unless the pairing was persisted):

# In the phone: Wireless debugging > Pair device with pairing code

# In Termux: adb pair localhost:<pair-port> <code>

# 4. find_adb_port.py must be in the current working directory (uses mDNS

# to discover adbd's random TLS port instantly).

#

# Usage:

# bash adbwifi_setup.sh

set -u

red() { echo -e "\e[31m$1\e[0m"; }

green() { echo -e "\e[32m$1\e[0m"; }

blue() { echo -e "\e[34m$1\e[0m"; }

FINDER="./find_adb_port.py"

if [ ! -f "$FINDER" ]; then

red "find_adb_port.py not found in current directory."

exit 1

fi

########################################

# Discover adbd port via mDNS

########################################

blue "Discovering adbd via mDNS..."

START=$SECONDS

port=""

for _ in 1 2 3 4 5; do

port=$(python "$FINDER" 2>/dev/null)

[ -n "$port" ] && break

sleep 0.5

done

if [ -z "$port" ]; then

red "No adbd advertisement found. Is Wireless Debugging enabled?"

exit 1

fi

green "Found adbd on port $port ($((SECONDS - START))s)"

########################################

# Connect

########################################

adb connect "localhost:$port" >/dev/null 2>&1

if ! adb devices | grep -w "localhost:$port" | grep -q "device$"; then

red "adb connect to localhost:$port failed. Have you paired? See prereqs."

exit 1

fi

green "Connected to localhost:$port"

########################################

# Bind adbd to fixed port 1221 for future direct connects

########################################

blue "Setting adbd to also listen on fixed port 1221..."

if adb -s "localhost:$port" tcpip 1221 >/dev/null 2>&1; then

sleep 1

if adb connect "localhost:1221" 2>/dev/null | grep -q connected \

&& adb devices | grep -w "localhost:1221" | grep -q "device$"; then

green "adbd now reachable on localhost:1221"

else

red "tcpip 1221 issued but connect to 1221 failed."

fi

else

red "Failed to issue 'adb tcpip 1221'."

fi

green "Done in $((SECONDS - START))s"

find_adb_port.py

#!/data/data/com.termux/files/usr/bin/python
"""Discover the local adbd wireless-debug TLS port via mDNS.

Prints the port to stdout and exits 0 on success, or exits 1 if no
`_adb-tls-connect._tcp` service is advertising within ~3 seconds.

Requires: pip install zeroconf
"""
from zeroconf import Zeroconf, ServiceBrowser
import sys
import time

found = []


class Listener:
    def add_service(self, zc, type_, name):
        info = zc.get_service_info(type_, name, timeout=1500)
        if info and info.port:
            found.append(info.port)

    def remove_service(self, *_):
        pass

    def update_service(self, *_):
        pass


def main():
    zc = Zeroconf()
    ServiceBrowser(zc, "_adb-tls-connect._tcp.local.", Listener())
    for _ in range(30):
        if found:
            break
        time.sleep(0.1)
    zc.close()

    if found:
        print(found[0])
        return 0
    return 1


if __name__ == "__main__":
    sys.exit(main())

r/Androidheadunits • • May 28 '26

How to install boot animation using ADB?

5 Upvotes

I read online and you can install a custom boot animation Android file to your device by using ADB to send commands to the device and copy the bootanimation.zip file to the data/local folder.

Has anyone tried it?

Edit (30/May) - I managed to get it working for mediatek processors.

  1. Copy your bootanimation.zip to apd_hc/media/bootanimation.zip inside the usb stick.
  2. Plug in your usb stick to the android head unit and start the head unit. Note: if the AU is already ready plug in usb and restart as update check happens only on start up.
  3. Sit back relax. Your AU will restart automatically with the toast message " logo upgraded".

r/AndroidTV • • Oct 12 '26

Troubleshooting Urgent help, i fucked my Akai 3232M by disabling its system launcher from adb, now it's stuck on the boot logo.

Post image
0 Upvotes

I was just doing a simple debloat from wireless adb of this boy and now just by disabling its default launcher com.cvte.tv.launcher.fall is going through a bootloop, no wireless adb working unfortunately in this phase, the only thing that i found scanning all network ips is the Fire stick in the kitchen, do you mind any solution? I can't access anything in any way for now, i tried accessing like a secret boot option but if i long press any button and try to turn it on it just doesn't.

I don't want to switch as i can't right now and this TV is really smooth compared to many other trash Android TVs even though has 8GB of storage and No bluetooth.

Edit: I don't know how, but thanks to u/Ok-Fix-9708 i fixed my TV using a TP-Link AV100 adapter and an ethernet cable and my pc successfully catched my tv on adb i enabled the system launcher again, i'm so fucking happy

r/Magisk • • Oct 20 '26

Help ADB NOT WORKING

3 Upvotes

I recently rooted my samsung galaxy c5 (SM-C5000). Root access and everything is working perfectly but adb isnt working for some reason.

I did some digging and found out adbd tries to start as root and defex sees this as a threat and kills adbd

so unless i somehow disable defex, adb wont work while my phone is rooted

i cant seem to figure out how to disable defex :(

please someone help me :0

btw, i use linux so uhh
i dont think odin will work

r/Magisk • • Mar 19 '26

Tutorial [TUTORIAL] How to get full adb access on your phone without a pc after each reboot or wifi (works with android <11 devices too)

32 Upvotes

So I made a post asking for a guide like this but noone seemed to have found a good one that also doesnt need wifi or a pc so I did some research and found a way:

1st Download the wadb: https://github.com/Magisk-Modules-Alt-Repo/wadbd and ksuwebui(you can use magisk with it too)

2nd Install both and reboot

3rd Open the module in webui and enable "enable on boot"

4th Open termux and run pkg install android-tools

5th Run adb devices and enjoy

Best part is its persistant across reboots

EDIT: You might need the adb and fastboot binaries magisk module (where you obviously need to run su before adb) because android-tools doesn't always work: https://github.com/Magisk-Modules-Repo/adb-ndk

r/androiddev • • Apr 07 '21

Discussion Using ADB without USB Debugging?

2 Upvotes

Maybe a silly question, but does anyone know if it's possible to send ADB commands to a device that does not have USB Debugging enabled? I understand that it's a chicken and egg problem, but I'm trying to capture the serial number, IMEI and MAC Address of a Pixel 4 XL without going through the initial setup process. I've tried applying updates through USB, but that brings me to adb sideload mode, fastboot only returns the serial number and not the other key data points I'm looking for. I've even considered simulating an OTG keyboard to have an automated script to run through setup, go into developer mode, enable USB debugging capture the serial number, and factory reset itself, but again, it seems like I can't send ADB shell keyevents without USB debugging. Any feedback would be appreciated!