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;

}

相关推荐
码农101号17 分钟前
Linux中容器文件操作和数据卷使用以及目录挂载
linux·运维·服务器
PanZonghui34 分钟前
Centos项目部署之Nginx 的安装与卸载
linux·nginx
PanZonghui41 分钟前
Centos项目部署之安装数据库MySQL8
linux·后端·mysql
PanZonghui43 分钟前
Centos项目部署之运行SpringBoot打包后的jar文件
linux·spring boot
PanZonghui43 分钟前
Centos项目部署之Java安装与配置
java·linux
程序员弘羽1 小时前
Linux进程管理:从基础到实战
linux·运维·服务器
PanZonghui1 小时前
Centos项目部署之常用操作命令
linux
JeffersonZU1 小时前
Linux/Unix进程概念及基本操作(PID、内存布局、虚拟内存、环境变量、fork、exit、wait、exec、system)
linux·c语言·unix·gnu
大熊程序猿1 小时前
netcore PowerShell 安装-linux
linux·运维
Johny_Zhao2 小时前
Docker 一键安装部署 JumpServer 堡垒机
linux·网络安全·信息安全·云计算·shell·jumpserver·ldap·yum源·系统运维