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;

}

相关推荐
开开心心_Every9 分钟前
局域网大文件传输,设密码双向共享易用工具
运维·服务器·网络·游戏·pdf·电脑·excel
什么都干的派森9 分钟前
Qdrant生产环境部署方法(Docker)
运维·docker·容器·qdrant
阿猿收手吧!14 分钟前
【Linux/C++】线程切换与协程切换,协程池
linux·c++
人间花海15 分钟前
Xshell高效运维实战全攻略
运维
qq_242188633221 分钟前
分享Xshell在服务器管理中的高级技巧与自动化脚本案例
运维·服务器·自动化
叱咤少帅(少帅)28 分钟前
docker 镜像加速地址
运维·docker·容器
袁袁袁袁满1 小时前
Linux网络连接之ss命令详细使用指南(从入门到运维实战)
linux·运维·服务器·网络·ssh·网络连接·ss命令
爱华晨宇2 小时前
Xshell高效运维实战指南
运维·服务器
未来之窗软件服务2 小时前
服务器运维(四十一)日服务器linux-audit.log分析工具—东方仙盟
linux·运维·服务器·服务器运维·仙盟创梦ide·东方仙盟
志栋智能2 小时前
AI驱动的自动化运维机器人:从“数字劳动力”到“智能协作者”的进化
大数据·运维·网络·人工智能·机器人·自动化