修改adb shell下$前的提示名称

基于android12

修改文件位置:system/core/adb/daemon/shell_service.cpp

cpp 复制代码
static std::string GetHostName() {
    char buf[HOST_NAME_MAX];
    if (gethostname(buf, sizeof(buf)) != -1 && strcmp(buf, "localhost") != 0) return buf;
	// 在此处return你想return的任何string
    return android::base::GetProperty("ro.product.device", "android");
}

修改后make adbd

编译的产物在:system/apex/com.android.adbd/bin/adbd

替换设备中的文件,重启。

相关推荐
张小姐的猫17 小时前
【MySQL】事务
android·mysql·adb
霂鳯18 小时前
新手勇闯网络安全 | MySQL基础(四)
mysql·web安全·adb
嵌入式-老费18 小时前
esp32开发与应用(题外话之ADB和Android NDK开发)
android·adb
2501_916007471 天前
抓包工具功能对比,TraceEagle、Charles、Fiddler、Wireshark、mitmproxy 差别
前端·网络协议·ios·adb·https·fiddler·wireshark
❀͜͡傀儡师3 天前
MySQL REST Service 认证鉴权体系与 MySQL 26.10.0 内置化演进
数据库·mysql·adb
DevNote_3 天前
1C1G 服务器从零配置实录(附完整命令)
linux·运维·服务器·javascript·adb·ssh·gmssh
瑞克-桑切斯4 天前
mysql二进制日志定时备份
adb
class心平气和4 天前
ADB 工具函数 Python 使用教程
开发语言·python·adb
程序员塔塔喵4 天前
【MySQL篇|第八篇】索引底层实现
数据库·mysql·adb·索引
pigdreams5 天前
Google 官方 Android CLI:让AI直接读布局结构而不是用adb截图验证
android·人工智能·adb