android system opens adb debugging

android system users in general adb is in jail, and then there will be open security risk, but for developers, or necessary, to facilitate debugging program to identify and solve the problem, which is writing this background of articles.

Open adb adb sure you want to open this service process, adb service is written in init.rc inside, default disable ,, init.rc there will be certain conditions to determine whether the decision to start, in fact, by the value of a property control, we will open this attribute on the line.

Even if you find that after a system reboot, your adb process has also been started, but you can not find your device via adb connection is successful, it is because a pre-need additional attributes for the job, as follows:

setprop service.adb.tcp.port 5555

Then restart the adb:

stop adbd
start adbd

Then there is the service.adb.tcp.port this attribute is not sustainable, it disappeared after a reboot, so you want to boot turned on by default, you can use this property init.rc written inside, written can compile time build.prop, or default.prop file, so after the restart adb debugging is turned on by default.

All of the above for the android development and debugging, and not for publishing user version!

Published 73 original articles · won praise 26 · views 10000 +

Guess you like

Origin blog.csdn.net/angelsmiling/article/details/104955625