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;

}

相关推荐
忙里偷闲学python7 小时前
containerd_buildkitd构建镜像,告别docker构建
运维·docker·容器
w***15318 小时前
ubuntu 安装 Redis
linux·redis·ubuntu
Nerve8 小时前
GooglePay: API 文档
android·google
liweiweili1268 小时前
Linux 中替换某个目录下所有文件中的特定字符串
linux·运维·服务器
Nerve8 小时前
GooglePay: 订阅商品购买流程
android·google
summerkissyou19878 小时前
Audio-触摸音-播放流程
android
Nerve9 小时前
GooglePay: 消耗商品购买流程
android·google
wanhengidc9 小时前
云手机 多端互通 科技
运维·服务器·科技·游戏·智能手机
init_23619 小时前
【BGP入门专题-3】bgp路由传递规则与路由属性1
运维·网络
弓弧名家_玄真君9 小时前
Ubuntu 20.04.3 LTS 安装vnc (Xfce4 + Xvfb)
linux·运维·ubuntu