修改系统源码下,system\core\adb\shell_service.cpp
static std::string GetHostName() {
char buf[HOST_NAME_MAX];
if (gethostname(buf, sizeof(buf)) != -1 && strcmp(buf, "localhost") != 0) return buf;
return android::base::GetProperty("ro.product.model", "你想修改的adb名称"); //改动这一行就行了
}
本文介绍了如何修改Android系统源码中adb shell服务的默认主机名,重点在于讲解`systemcoreadbshell_service.cpp`文件内的代码变更,特别是如何将产品模型设置为你想要的adb名称。
1万+

被折叠的 条评论
为什么被折叠?



