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;

}

相关推荐
红豆子不相思11 分钟前
Keepalived
运维·服务器·网络
古月-一个C++方向的小白32 分钟前
Linux——进程控制
linux·运维·服务器
文静小土豆1 小时前
CentOS 7 OpenSSH 10.2p1 升级全攻略(含离线安装与回退方案)
linux·运维·centos·ssh
bqliang1 小时前
Compose 实验性 Styles API
android·android jetpack
五阿哥永琪1 小时前
进程的调度算法
linux·运维·服务器
小杜的生信筆記1 小时前
生信技能技巧小知识,Linux多线程压缩/解压工具
linux·数据库·redis
nzxzn1 小时前
LVS(Linux virual server)知识点
linux·运维·lvs
大尚来也1 小时前
PHP 入门指南:从零基础到掌握核心语法
android
菜鸟别浪1 小时前
内存管理-第1章-Linux 内核内存管理概述
linux·运维·云计算·虚拟化·内存管理
lzhailb1 小时前
LVS(Linux virual server)
运维·服务器·网络