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;

}

相关推荐
美式请加冰14 分钟前
Linux权限的概念
linux·运维·服务器
zandy101115 分钟前
指标管理的AI自治之路:衡石平台如何实现异常检测、血缘分析与智能推荐的自动化治理
运维·人工智能·自动化
Android系统攻城狮15 分钟前
Android tinyalsa深度解析之pcm_params_get_period_size_max调用流程与实战(一百七十二)
android·pcm·tinyalsa·音频进阶
两年半的个人练习生^_^20 分钟前
List集合的使用和源码
linux·windows·list
空空kkk24 分钟前
MySQL 主从同步
android·数据库·mysql
CSND74030 分钟前
什么是Docker,容器是什么,镜像是什么,一文解读
运维·人工智能·docker·容器
蓝天居士37 分钟前
认识libcurl(2)
linux·libcurl
weiggle37 分钟前
Android View绘制流程深度解析
android
运维有小邓@40 分钟前
多系统账号反复手动配置?使用自动化编排提升身份管理效率
运维·自动化·ad域
KKKlucifer1 小时前
4A 平台如何提升企业账号安全与操作可追溯性
运维·服务器·网络