展会信息港展会大全

adb 通过 wifi连接 Android设备
来源:互联网   发布日期:2016-01-14 12:47:14   浏览:2510次  

导读:1. 需要 root 权限代码修改点:/system/extras/su/su.c60 /* Until we have something better, only root and the shell can use su. */61 myuid = getuid();62 ......

1. 需要 root 权限

代码修改点:

/system/extras/su/su.c

60/* Until we have something better, only root and the shell can use su. */

61myuid = getuid();

62if (myuid != AID_ROOT && myuid != AID_SHELL) {

63fprintf(stderr,"su: uid %d not allowed to su\n", myuid);

64return 1;

65}

67if(setgid(gid) || setuid(uid)) {

68fprintf(stderr,"su: permission denied\n");

69return 1;

70}

把63,64,68,69 行注释掉,编译生成su,然后push到设备。

adb push su /system/xbin/

adb shell chmod 6755 /system/xbin/su

2. 安装 adbwireless 软件,一键搞定

在电子市场上搜 adb,前面两个随便选一个都行。

如果电子市场上不了,在 Terminal Emulator 直接输入:

setprop service.adb.tcp.port 8000

stop adbd

start adbd

通过adb 连上设备,下面是我机器上的操作结果:

deli@deli-laptop:~$ adb connect 192.168.1.103:8000

already connected to 192.168.1.103:8000

deli@deli-laptop:~$ adb shell

# busybox sh

/ #

赞助本站

人工智能实验室

相关热词: wifi连接 Android设备 adb

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港