If you don’t enable Developer Options and turn on USB Debugging before plugging in the cable, adb devices won’t detect the phone because the Android system doesn’t trust the connection yet.

Here’s what you need to do step-by-step to fix this:


1. Enable Developer Options

  • Go to Settings > About phone.
  • Tap Build number 7 times quickly until you see “You are now a developer”.
  • Go back to Settings, there should now be a new menu called Developer options.

2. Enable USB Debugging

  • Open Settings > Developer options.

  • Scroll down and toggle ON:

    • USB Debugging
    • (Optional but useful) Allow USB debugging in charge only mode (if your Android version supports it).

3. (Optional but smart) Enable Always allow USB Debugging

  • When you first connect to the PC, your phone will show a pop-up:
    “Allow USB debugging?”
    Check Always allow from this computer and tap Allow.

4. (Extra precaution) Set USB mode to File Transfer (MTP)
Sometimes, the default USB mode is “Charging only” which doesn’t activate ADB. After plugging in:

  • Pull down the notification shade.
  • Tap the USB connection notification.
  • Set it to File Transfer (MTP).

💡 Why adb devices shows nothing?

  • Without enabling USB Debugging, Android ignores adb.
  • Some phones need you to manually set USB mode from “Charging” to “MTP”.
  • Bad USB cables (some are power-only, no data) also cause this.

There is a “backdoor” way to enable USB debugging without going through the Android UI, and it’s only possible in some cases (depends on whether your bootloader is unlocked and/or if you have custom recovery like TWRP). Here’s the full breakdown:


🛠️ Force-enable USB debugging via recovery/fastboot

This works by modifying the system settings that control USB debugging.


Step 1: Boot into recovery or fastboot

  • Recovery mode:

    • Power off your phone.
    • Hold Power + Volume Up (or Power + Volume Down, depends on phone) until you see the recovery screen.
    • If you have TWRP, even better.
  • Fastboot mode:

    • Power off the phone.
    • Hold Power + Volume Down to enter fastboot.

Step 2: Check if bootloader is unlocked
Run on your PC:

fastboot devices

If your device shows up, your connection works.

Then check:

fastboot oem device-info

If Bootloader unlocked: true, you’re good to go.
If locked, you can’t write to system partitions, unless the OEM allows unlocking (e.g., Xiaomi requires permission).


Step 3: Mount /system and edit settings (if using TWRP)
If you have TWRP:

  1. Go to Mount, and make sure System is mounted read/write.

  2. Open Advanced > Terminal or use adb shell.

  3. Use this command to enable USB debugging:

    setprop persist.service.adb.enable 1
    setprop persist.service.debuggable 1
    setprop persist.sys.usb.config adb
    
  4. You may also directly edit build.prop:

    nano /system/build.prop
    

    Add these lines at the end:

    persist.service.adb.enable=1
    persist.service.debuggable=1
    persist.sys.usb.config=adb
    
  5. Reboot system.


Step 4: Enable adb over TCP (optional)
If USB is flaky, you can force ADB over Wi-Fi:

adb tcpip 5555

Then connect via:

adb connect <phone_ip>:5555

⚠️ If you only have fastboot

You can try flashing userdata or system partition with a modified image that already has USB debugging enabled. For example:

  1. Download your stock ROM and unpack system.img.

  2. Mount system.img on your PC and edit build.prop like above.

  3. Repack and flash:

    fastboot flash system system.img
    
  4. Reboot to system.


This won’t work if…

  • Bootloader is locked (can’t modify system).
  • No TWRP installed.
  • OEM doesn’t allow fastboot flashing without authorization.

$ adb devices

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    List of devices attached

$ adb devices
List of devices attached
???RTHW device

$ adb shell pm uninstall --user 0 com.android.vending
Success

$ adb push "com.._1.2025.119-2511909_2arch_7dpi_25lang_8cf86cdc1278654ec74918d40043a804_apkmirror.com.apkm" /sdcard/Download/
com.
.**_1.2025.119-2511909_2arch_7dpi_25lang_8c…le pushed, 0 skipped. 14.2 MB/s (38778457 bytes in 2.610s)

This will copy it to
Internal Storage > Download

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/diannao/90546.shtml
繁体地址,请注明出处:http://hk.pswp.cn/diannao/90546.shtml
英文地址,请注明出处:http://en.pswp.cn/diannao/90546.shtml

如若内容造成侵权/违法违规/事实不符,请联系英文站点网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

从互联网电脑迁移Dify到内网部署Dify方法记录

一、在互联网电脑上准备迁移文件1. 保存 Docker 镜像# 获取所有 Dify 相关镜像&#xff08;根据实际容器名调整&#xff09; docker ps --filter "namedify" --format "{{.Image}}" | sort -u > dify-images.list# 保存镜像为 .tar 文件 docker save $(…

【EGSR2025】材质+扩散模型+神经网络相关论文整理随笔(一)

MatSwap: Light-aware material transfers in images介绍任务&#xff1a;输入一张拍摄图像、示例材质纹理图像&#xff08;这里跟BRDF无关&#xff0c;通常我们讲到材质一般指的是SVBRDF&#xff0c;但是这里的材质指的只是纹理&#xff09;、用户为拍摄图像指定的遮罩区域&am…

饿了么el-upload上传组件报错:TypeError: ***.upload.addEventListener is not a function

在本地上传没有报这个错误&#xff0c;部署到服务器后会报这个错误&#xff0c;一开始以为是服务器配置等什么原因&#xff0c;但是一想这个报错应该还是在前端&#xff0c;接口都还没请求&#xff0c;不可能到后台去&#xff0c;后面搜了好几个AI也没有找到想要的答案或解决方…

淘宝直播与开源链动2+1模式AI智能名片S2B2C商城小程序的融合发展研究

摘要&#xff1a;本文聚焦于淘宝直播这一以“网红”内容为主的社交电商平台&#xff0c;深入分析其特点与流量入口优势。同时&#xff0c;引入开源链动21模式AI智能名片S2B2C商城小程序这一新兴概念&#xff0c;探讨二者融合的可能性与潜在价值。通过分析融合过程中的技术、市场…

【macos用镜像站体验】Claude Code入门使用教程和常用命令

一、下载安装nodejs # macOS 用户安装nodejs brew update brew install node二、安装官方Claude Code # 安装 Claude Code npm install -g anthropic-ai/claude-code # 查看版本 claude --version三、正式使用&#xff08;国内镜像站&#xff09; 今天发现的一个镜像站&…

算法学习笔记:11.冒泡排序——从原理到实战,涵盖 LeetCode 与考研 408 例题

在排序算法的大家族中&#xff0c;冒泡排序是最基础也最经典的算法之一。它的核心思想简单易懂&#xff0c;通过重复地走访待排序序列&#xff0c;一次比较两个相邻的元素&#xff0c;若它们的顺序错误就把它们交换过来&#xff0c;直到没有需要交换的元素为止。虽然冒泡排序的…

Linux小白学习基础内容

记录第一天重新学习2025/7/10 15&#xff1a;467/10 17&#xff1a;02这里面一个命令带多个参数举例&#xff08;多个参数之间用空格隔开&#xff09;ls&#xff08;命令&#xff09; ~ / /etc/&#xff08;参数&#xff09; :这里就是同时查看主机的家目录&#xff0c;根目…

从零开始搭建深度学习大厦系列-2.卷积神经网络基础(5-9)

(1)本人挑战手写代码验证理论&#xff0c;获得一些AI工具无法提供的收获和思考&#xff0c;对于一些我无法回答的疑问请大家在评论区指教&#xff1b; (2)本系列文章有很多细节需要弄清楚&#xff0c;但是考虑到读者的吸收情况和文章篇幅限制&#xff0c;选择重点进行分享&…

【iOS设计模式】深入理解MVC架构 - 重构你的第一个App

目录 一、MVC模式概述 二、创建Model层 1. 新建Person模型类 2. 实现Person类 三、重构ViewController 1. 修改ViewController.h 2. 重构ViewController.m 四、MVC组件详解 1. Model&#xff08;Person类&#xff09; 2. View&#xff08;Storyboard中的UI元素&#x…

前端项目集成lint-staged

lint-staged (lint-staged) 这个插件可以只针对进入git暂存区中的代码进行代码格式检查与修复&#xff0c;极大提升效率&#xff0c;避免扫描整个项目文件&#xff0c;代码风格控制 eslint prettier stylelint 看这两篇文章 前端项目vue3项目集成eslint9.x跟prettier 前端项…

李宏毅genai笔记:模型编辑

0 和post training的区别直接用post training的方法是有挑战的&#xff0c;因为通常训练资料只有一笔而且之后不管问什么问题&#xff0c;都有可能只是这个答案了1 模型编辑的评估方案 reliability——同样的问题&#xff0c;需要是目标答案generalization——问题&#xff08;…

Oracle:union all和union区别

UNION ALL和UNION在Oracle中的主要区别体现在处理重复记录、性能及结果排序上&#xff1a;处理重复记录‌UNION‌&#xff1a;自动去除重复记录&#xff0c;确保最终结果唯一。‌UNION ALL‌&#xff1a;保留所有记录&#xff0c;包括完全重复的行。性能表现‌UNION‌&#xff…

[C#/.NET] 内网开发中如何使用 System.Text.Json 实现 JSON 解析(无需 NuGet)

在实际的企业开发环境中&#xff0c;尤其是内网隔离环境&#xff0c;开发人员经常面临无法使用 NuGet 安装外部包的问题。对于基于 .NET Framework 4.8 的应用&#xff0c;JSON 解析是一个常见的需求&#xff0c;但初始项目中往往未包含任何 JSON 处理相关的程序集。这时&#…

JVM(Java 虚拟机)的介绍

JVM原理JVM 核心架构与工作流程1. 类加载机制&#xff08;Class Loading&#xff09;2. 运行时数据区&#xff08;Runtime Data Areas&#xff09;堆&#xff08;Heap&#xff09;方法区&#xff08;Method Area&#xff09;:元空间&#xff08;Metaspace&#xff09;公共区域虚…

Qt 信号槽的扩展知识

Qt 信号槽的扩展知识一、信号与槽的重载Qt信号与槽的重载问题注意事项示例场景二、一个信号连接多个槽1、直接连接多个槽2、使用lambda表达式连接3、连接顺序控制4、断开特定连接5、自动连接方式三、 多个信号连接一个槽基本连接语法使用QSignalMapper区分信号源&#xff08;Qt…

链表算法之【合并两个有序链表】

目录 LeetCode-21题 LeetCode-21题 将两个升序链表合并成一个新的升序链表并返回 class Solution {public ListNode mergeTwoLists(ListNode list1, ListNode list2) {if (list1 null)return list2;if (list2 null)return list1;ListNode dummyHead new ListNode();ListN…

Linux - firewall 防火墙

&#x1f525; 什么是 firewalld&#xff1f;firewalld 是一个动态管理防火墙的守护进程&#xff08;daemon&#xff09;&#xff0c;它提供了一个 D-Bus 接口来管理系统或用户的防火墙规则。与传统的静态 iptables 不同&#xff0c;firewalld 支持&#xff1a;区域&#xff08…

【GESP】C++二级真题 luogu-B4356 [GESP202506 二级] 数三角形

GESP C二级&#xff0c;2025年6月真题&#xff0c;多重循环&#xff0c;难度★✮☆☆☆。 题目题解详见&#xff1a;【GESP】C二级真题 luogu-B4356 [GESP202506 二级] 数三角形 | OneCoder 【GESP】C二级真题 luogu-B4356 [GESP202506 二级] 数三角形 | OneCoderGESP C二级&…

遥感影像岩性分类:基于CNN与CNN-EL集成学习的深度学习方法

遥感影像岩性分类&#xff1a;基于CNN与CNN-EL集成学习的深度学习方法 大家好&#xff0c;我是微学AI&#xff0c;今天给大家介绍一下遥感影像岩性分类&#xff1a;基于CNN与CNN-EL集成学习的深度学习方法。该方法充分利用了多源遥感数据的光谱和空间信息&#xff0c;同时结合…

【STM32 学习笔记】SPI通信协议

SPI通信协议 SPI协议是由摩托罗拉公司提出的通讯协议(Serial Peripheral Interface)&#xff0c;即串行外围设备接口&#xff0c; 是一种高速全双工的通信总线。它被广泛地使用在ADC、LCD等设备与MCU间&#xff0c;要求通讯速率较高的场合。   学习本章时&#xff0c;可与I2C…