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;

}

相关推荐
summerkissyou198711 分钟前
Android-MediaSession-播放流程和例子
android·mediasession
IMPYLH12 分钟前
Linux 的 nice 命令
linux·运维·服务器·bash
l1o3v1e4ding43 分钟前
排查linux CentOS7.6的mysql磁盘 I/O 延迟过高问题
linux·运维·mysql
航Hang*1 小时前
Windows Server 配置与管理——第12章:配置数字证书服务器
运维·服务器·windows
私人珍藏库1 小时前
[Android] 蓝叠模拟器工具箱v1.1
android·智能手机·app·工具·软件·多功能
Edward111111112 小时前
linux创建普通用户
linux·运维·服务器
mzhan0173 小时前
Linux: rcu: 加速宽限期
linux·rcu
云霄IT3 小时前
安卓开发之java转dex再转smali
android·java·python
Fanfanaas3 小时前
Linux 基础开发工具(二)
linux·运维·服务器·c语言
雾岛听蓝3 小时前
Linux线程基础
linux·开发语言·经验分享