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;

}

相关推荐
程序视点3 分钟前
Escrcpy 3.0投屏控制软件使用教程:无线/有线连接+虚拟显示功能等
android
btyzadt2 小时前
虚拟机蓝屏问题排查与解决
linux·运维·网络
东京老树根3 小时前
Android - 用Scrcpy 将手机投屏到Windows电脑上
android
G_H_S_3_3 小时前
【网络运维】Shell 脚本编程:while 循环与 until 循环
linux·运维·网络·shell
张鱼小丸子4 小时前
MySQL企业级部署与高可用实战
运维·数据库·mysql·云原生·高可用·mha·组从复制
Wgllss4 小时前
完整烟花效果,Compose + 协程 + Flow + Channel 轻松实现
android·架构·android jetpack
扛麻袋的少年4 小时前
6.Kotlin的Duration类
android·开发语言·kotlin
独自破碎E4 小时前
得物25年春招-安卓部分笔试题1
android
coderklaus4 小时前
Shell 基础知识
linux·macos·shell
争不过朝夕,又念着往昔4 小时前
即时通讯项目---网关服务
linux·c++·vscode