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;

}

相关推荐
timi先生3 分钟前
安装 GitLab
linux·运维
黄林晴6 分钟前
你写过多少个重复的 @Preview?Compose 终于要解决这个问题了
android
REDcker7 分钟前
Android MediaCodec 架构与实现解析
android·架构
李长渊哦8 分钟前
PostgreSQL 18 本地部署与运维完全指南 (Windows版)
运维·windows·postgresql
常利兵8 分钟前
Android Compose 指南:Column与LazyColumn的抉择
android
黄林晴9 分钟前
Kotlin 2.3.20 发布!解构声明不怕写反了
android·kotlin
阿拉斯攀登9 分钟前
第 16 篇 摄像头驱动适配,V4L2 子系统详解
android·驱动开发·rk3568·瑞芯微·rk安卓驱动
[纳川]10 分钟前
Alibaba Cloud Linux 4或者 CentOS 9 无法秘钥登录
linux·运维·centos
炸炸鱼.12 分钟前
Nginx 性能调优与深度监控实战指南
运维·nginx
FriendshipT14 分钟前
Ultralytics Docker 安装使用教程(以训练 YOLO26 模型为例)
linux·运维·人工智能·目标检测·ubuntu·docker·容器