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;

}

相关推荐
晚风吹人醒.2 分钟前
Linux系统安全及应用(账号权限管理、登录控制、弱口令、端口扫描)
linux·运维·系统安全·grub·sudo·账号管理
躲在云朵里`11 分钟前
Linux环境下部署SpringBoot前后端分离项目
linux·服务器
llilian_1612 分钟前
时间同步校时服务器配件清单及挑选攻略 校时时间服务器 网络时间同步装置
运维·服务器·网络
jzlhll12316 分钟前
android ViewModel传参
android
有位神秘人18 分钟前
Android最新动态权限申请框架YbPermissions
android
深圳市恒讯科技20 分钟前
防止服务器被黑:终极防范网络攻击指南
运维·服务器·网络安全
VicdorLin21 分钟前
docker报错: client version 1.24 is too old. Minimum supported API version is 1.44
运维·docker·容器
橘颂TA22 分钟前
【Linux】从 “抢资源” 到 “优雅控场”:Linux 互斥锁的原理与 C++ RAII 封装实战(Ⅰ)
linux·运维·服务器·c++·算法
RisunJan23 分钟前
Linux命令-init命令(管理运行级别和控制系统状态)
linux·运维·服务器
ayaya_mana23 分钟前
Chrony:通用-替换国内 NTP 源进行时间同步
linux·运维·服务器·chrony