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;

}

相关推荐
China_Yanhy4 分钟前
入职 Web3 运维日记 · 第 5 日:硬分叉倒计时 —— 给飞行中的飞机换引擎
运维·web3
TangDuoduo00056 分钟前
【Linux字符设备驱动】
linux·驱动开发
代码游侠7 分钟前
学习笔记——Linux内核与嵌入式开发2
linux·运维·arm开发·嵌入式硬件·学习·架构
Fᴏʀ ʏ꯭ᴏ꯭ᴜ꯭.10 分钟前
Nginx性能调优与压测实战指南
运维·nginx
郝学胜-神的一滴11 分钟前
深入Linux网络编程:accept函数——连接请求的“摆渡人”
linux·服务器·开发语言·网络·c++·程序人生
小义_21 分钟前
【Docker】知识一
linux·docker·云原生·容器
wefg126 分钟前
【Linux】进程地址空间深入理解
linux·运维·服务器
leisigoyle27 分钟前
SQL Server 2025安装教程
大数据·运维·服务器·数据库·人工智能·计算机视觉·数据可视化
ZHANG13HAO28 分钟前
android13 4G网络环境和wifi内网说明
linux·服务器·网络
Linux运维技术栈31 分钟前
Magento 2.3.5 宝塔Linux环境完整安装指南(避坑版+图文详解)
linux·运维·服务器