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;

}

相关推荐
pingao1413781 分钟前
智慧井盖传感器震动倾斜溢水监测:传统市政设施的智慧化升级典范
运维·网络·安全
不愿透露姓名的大鹏11 分钟前
Linux实操:ext4转换为xfs(含完整步骤+避坑指南)
linux·服务器
ZzzZZzzzZZZzzzz…12 分钟前
MySQL备份还原方法1----xtrabackup
linux·运维·数据库·mysql·xtrabackup·物理备份
Redemption13 分钟前
嵌软面试每日一阅----Linux驱动之字符设备驱动
linux·面试·职场和发展
赵民勇15 分钟前
Linux桌面/usr/share/menu目录详解
linux
charlie11451419115 分钟前
嵌入式C++教程实战之Linux下的单片机编程:从零搭建 STM32 开发工具链(5):调试进阶篇 —— 从 printf 到完整 GDB 调试环境
linux·c++·单片机·学习·嵌入式·c
一根狗尾巴草34 分钟前
【Linux】linux软链接硬链接区别
linux·运维·服务器
wang090736 分钟前
Linux性能优化之CPU利用率
java·linux·运维
私人珍藏库1 小时前
[Android] 后台视频录制 FadCam v3.0.1
android·app·工具·软件·多功能
双翌视觉1 小时前
基于机器视觉实现开口卡簧自动化装配
运维·数码相机·自动化