linux安卓抓log

app

batterysecret cpp名字?

adb shell logcat|findstr batterysecret

adb shell getprop ro.product.name

int xm_is_eu_model(void)

{

int rc = 0, fd;

int is_eu_model = 0, bytes = 0;

char buffer[32] = {0,};

if (property_get("ro.product.name", product_name, NULL) > 0) {
KLOG_ERROR(LOG_TAG,"test product_name: '%s'", product_name);
if (!strncmp(product_name, "dada_global", strlen("dada_global"))) {
KLOG_ERROR(LOG_TAG,"xm_is_eu_model: dada_global.\n");
is_eu_model = 3;

} else if (!strncmp(product_name, "dada", strlen("dada"))) {

KLOG_ERROR(LOG_TAG,"xm_is_eu_model: dada_cn.\n");

is_eu_model = 6;

} else if (!strncmp(product_name, "dada_eea", strlen("dada_eea"))) {

KLOG_ERROR(LOG_TAG,"xm_is_eu_model: dada_eea.\n");

is_eu_model = 9;

}

}

if (is_eu_model) {

fd = open(IS_EU_MODEL_PATH, O_RDWR);

if (fd < 0) {

KLOG_ERROR(LOG_TAG,"Unable to open: '%s'", IS_EU_MODEL_PATH);

return fd;

}

bytes = snprintf(buffer, sizeof(buffer), "%d\n", 1);

rc = write(fd, &buffer, bytes);

if (fd < 0) {

KLOG_ERROR(LOG_TAG,"Unable to write: '%s'", IS_EU_MODEL_PATH);

close(fd);

return rc;

}

KLOG_ERROR(LOG_TAG,"xm_is_eu_model: set is_eu_model true.\n");

close(fd);

}

return is_eu_model;

}

相关推荐
用户5087532168441 分钟前
Android 资源类型全解析:深入理解四种常用布局
android
秦渝兴4 分钟前
用 Docker Compose 一键部署高可用集群(MySQL + Tomcat + Nginx)
运维·mysql·nginx·docker·容器·tomcat
XiaoLeisj15 分钟前
Android 文件存储实战:从应用私有目录读写到网络文件落盘与公共存储接入
android·java·网络·文件操作
吾诺18 分钟前
如何在Linux中找到MySQL的安装目录
linux·运维·mysql
恋猫de小郭21 分钟前
Android Studio Panda 2 ,支持 AI 用 Vibe Coding 创建项目
android·前端·flutter
lijwsunyt21 分钟前
Ubuntu虚拟机部署OpenClaw全踩坑实录|本地访问+模型配置一站式解决
linux·运维·ubuntu
夜猫子ing21 分钟前
《UNIX高级环境编程》 第十四章 高级I/O(一文读懂UNIX下高级I/O)
运维·服务器·网络
悲伤小伞27 分钟前
10-MySQL_事务管理
linux·数据库·c++·mysql·centos
zhouping@33 分钟前
[极客大挑战 2020]Greatphp
android·ide·web安全·android studio
朱一头zcy35 分钟前
Linux系列04:简单理解inode、硬链接、软链接、挂载的概念
linux·笔记