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;

}

相关推荐
乐维_lwops1 天前
五层架构全景解析:Lerwee 运维智能体如何实现 “从感知到行动”(二)
运维·架构·运维智能体
彭泽布衣1 天前
Linux异常文件名文件如何删除
linux·运维·服务器
优泽云安全1 天前
如何选择IRCS云信息安全管理系统 IRCS云资源评测
linux·服务器·安全·安全架构
ShineWinsu1 天前
对于Linux:Ext系列文件系统的解析—下
linux·面试·笔试·文件系统··ext2·挂载分区
小夏子_riotous1 天前
Docker学习路径——2、安装
linux·运维·分布式·学习·docker·容器·云计算
csj501 天前
安卓基础之《(28)—Service组件》
android
豆包公子1 天前
程序流监控:AUTOSAR CP 功能安全在裸机 MCU 上的实现(理论篇)
运维·单片机·嵌入式硬件·安全·车载系统·autosar
添砖java‘’1 天前
NAT代理、内网打洞和内网穿透
linux·服务器·网络
SilentSamsara1 天前
Linux 文件系统入门:目录结构不是随便画的
linux·运维·服务器
0vvv01 天前
linux-操作系统(基础
linux