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;

}

相关推荐
NiNg_1_23439 分钟前
使用Docker Compose一键部署
运维·docker·容器
萠哥啥都行43 分钟前
Linux安装Docker以及Docker入门操作
运维·docker·容器
王哲晓44 分钟前
Linux通过yum安装Docker
java·linux·docker
小江湖19941 小时前
元数据保护者,Caesium压缩不丢重要信息
运维·学习·软件需求·改行学it
gopher95111 小时前
linux驱动开发-中断子系统
linux·运维·驱动开发
码哝小鱼1 小时前
firewalld封禁IP或IP段
linux·网络
Reese_Cool1 小时前
【C语言二级考试】循环结构设计
android·java·c语言·开发语言
鼠鼠龙年发大财1 小时前
【x**3专享】安装SSH、XFTP、XShell、ARM Linux
linux·arm开发·ssh
nfgo1 小时前
快速体验Linux发行版:DistroSea详解与操作指南
linux·ubuntu·centos
平凡シンプル2 小时前
安卓 uniapp跨端开发
android·uni-app