Jair Cervantes

53 papers B 5C 1Misc 1Journal 21Unranked 25
YearRankTypeTitle / Venue / Authors
2025 J jnl
SN Comput. Sci.
Laura D. Jalili, Josué Espejel Cabrera, José Sergio Ruiz Castilla, Jair Cervantes
2024 J jnl
Medical Biol. Eng. Comput.
Farid García-Lamont, Asdrúbal López-Chau, Jair Cervantes, Sergio Ruiz
2024 conf
ICIC (11)
Josué Espejel, Laura D. Jalili, Jair Cervantes, José Sergio Ruiz Castilla
2023 J jnl
Neurocomputing
Jair Cervantes, Jared Cervantes Canales, Farid García-Lamont, Arturo Yee Rendón, Josué Espejel Cabrera, Laura D. Jalili
2022 conf
ICIC (1)
Jared Cervantes Canales, Dalia Luna, Jair Cervantes, Farid García-Lamont
2021 conf
ICIC (3)
Adrián Trueba-Espinosa, Jessica Sánchez-Arrazola, Jair Cervantes, Farid García-Lamont
2021 conf
ICIC (1)
Laura D. Jalili, Jair Cervantes, Farid García-Lamont, Adrián Trueba
2021 J jnl
Expert Syst. Appl.
Josué Espejel Cabrera, Jair Cervantes, Farid García-Lamont, José Sergio Ruiz Castilla, Laura D. Jalili
2020 J jnl
Neurocomputing
Jair Cervantes, Farid García-Lamont, Lisbeth Rodríguez-Mazahua, Asdrúbal López-Chau
2020 J jnl
Entropy
Felipe Castro-Medina, Lisbeth Rodríguez-Mazahua, Asdrúbal López-Chau, Jair Cervantes, Giner Alor-Hernández, Isaac Machorro-Cano
2020 J jnl
Pattern Anal. Appl.
Farid García-Lamont, Jair Cervantes, Asdrúbal López-Chau, Arturo Yee Rendón
2020 J jnl
Multim. Tools Appl.
Farid García-Lamont, Jair Cervantes, Asdrúbal López-Chau, José Sergio Ruiz Castilla
2018 J jnl
Sci. Program.
Elayne Rubio Delgado, Lisbeth Rodríguez-Mazahua, José Antonio Palet Guzmán, Jair Cervantes, José Luis Sánchez-Cervantes, Silvestre Gustavo Peláez-Camarena, Asdrúbal López-Chau
2018 conf
ICIC (3)
Jair Cervantes, Farid García-Lamont, Lisbeth Rodríguez-Mazahua, Alfonso Zarco Hidalgo, José Sergio Ruiz Castilla
2018 conf
ICIC (3)
Farid García-Lamont, Jair Cervantes, Asdrúbal López-Chau, Sergio Ruiz
2018 J jnl
Neural Comput. Appl.
Farid García-Lamont, Jair Cervantes, Asdrúbal López-Chau
2018 J jnl
Neurocomputing
Farid García-Lamont, Jair Cervantes, Asdrúbal López-Chau, Lisbeth Rodríguez-Mazahua
2017 J jnl
J. Intell. Inf. Syst.
Lisbeth Rodríguez-Mazahua, Giner Alor-Hernández, Xiaoou Li, Jair Cervantes, Asdrúbal López-Chau
2017 conf
WEA
Sergio Ruiz, Daniel Escudero, Jair Cervantes, Adrián Trueba
2017 conf
ICIC (3)
Asdrúbal López-Chau, Rafael Rojas-Hernández, Farid García-Lamont, Valentín Trujillo-Mora, Lisbeth Rodríguez-Mazahua, Jair Cervantes
2017 J jnl
Neurocomputing
Jair Cervantes, Farid García-Lamont, Lisbeth Rodríguez-Mazahua, Asdrúbal López-Chau, José Sergio Ruiz Castilla, Adrián Trueba
2016 conf
WEA
José Sergio Ruiz Castilla, Yulia Ledeneva, Jair Cervantes, Adrián Trueba
2016 J jnl
J. Supercomput.
Lisbeth Rodríguez-Mazahua, Cristian Aarón Rodríguez-Enríquez, José Luis Sánchez-Cervantes, Jair Cervantes, Jorge Luis García-Alcaraz, Giner Alor-Hernández
2016 conf
ICIC (2)
Farid García-Lamont, Jair Cervantes, José Sergio Ruiz Castilla, Asdrúbal López-Chau
2016 conf
WEA
Laura D. Jalili, Alfredo Morales, Jair Cervantes, José Sergio Ruiz Castilla
2016 conf
ICIC (1)
Asdrúbal López-Chau, Farid García-Lamont, Jair Cervantes
2016 conf
ICIC (2)
Jair Cervantes, Farid García-Lamont, Lisbeth Rodríguez-Mazahua, Arturo Yee Rendón, Asdrúbal López-Chau
2015 conf
ICIC (3)
Asdrúbal López-Chau, Farid García-Lamont, Jair Cervantes
2015 conf
ICIC (1)
Farid García-Lamont, Jair Cervantes, José Sergio Ruiz Castilla, Asdrúbal López-Chau
2015 J jnl
Appl. Soft Comput.
Jair Cervantes, Farid García-Lamont, Asdrúbal López-Chau, Lisbeth Rodríguez-Mazahua, José Sergio Ruiz Castilla
2015 conf
ICIC (3)
Jair Cervantes, Farid García-Lamont, Asdrúbal López-Chau, Lisbeth Rodríguez-Mazahua, José Sergio Ruiz Castilla, Adrián Trueba
2014 conf
ICIC (1)
Jair Cervantes, De-Shuang Huang, Farid García-Lamont, Asdrúbal López-Chau
2014 J jnl
Connect. Sci.
Jair Cervantes, Xiaoou Li, Wen Yu
2013 conf
CIARP (2)
Jair Cervantes, De-Shuang Huang, Xiaoou Li, Wen Yu
2013 conf
MICAI (2)
Farid García-Lamont, Jair Cervantes, Asdrúbal López-Chau, Lisbeth Rodríguez-Mazahua
2013 J jnl
Expert Syst. Appl.
Asdrúbal López-Chau, Jair Cervantes, Lourdes López-García, Farid García-Lamont
2013 B conf
SMC
Jair Cervantes, Xiaoou Li, Wen Yu
2012 C conf
IDEAS
Lisbeth Rodríguez-Mazahua, Xiaoou Li, Jair Cervantes, Farid García-Lamont
2012 B conf
ICTAI
Asdrúbal López-Chau, Lourdes López-García, Jair Cervantes, Xiaoou Li, Wen Yu
2012 conf
IBERAMIA
José Hernández Santiago, Jair Cervantes, Asdrúbal López-Chau, Farid García-Lamont
2012 J jnl
Intell. Data Anal.
Xiaoou Li, Jair Cervantes, Wen Yu
2012 J jnl
Expert Syst. Appl.
Farid García-Lamont, Jair Cervantes, Asdrúbal López-Chau
2011 conf
MICAI (1)
Jair Cervantes, Asdrúbal López-Chau, Farid García, Adrián Trueba
2011 conf
MICAI (2)
Asdrúbal López-Chau, Xiaoou Li, Wen Yu, Jair Cervantes, Pedro Mejía-Alvarez
2010 Misc conf
GrC
Xiaoou Li, Jair Cervantes, Wen Yu
2010 conf
CCE
Asdrúbal López-Chau, Xiaoou Li, Wen Yu, Jair Cervantes
2009 B conf
SMC
Jair Cervantes, Xiaoou Li, Wen Yu
2008 J jnl
Res. Comput. Sci.
Jair Cervantes, Farid García, Xiaoou Li, Wen Yu
2008 conf
DMIN
Jair Cervantes, Xiaoou Li, Wen Yu
2008 B conf
SMC
Jair Cervantes, Xiaoou Li, Wen Yu
2008 J jnl
Neurocomputing
Jair Cervantes, Xiaoou Li, Wen Yu, Kang Li
2007 B conf
SMC
Xiaoou Li, Jair Cervantes, Wen Yu
2006 conf
MICAI
Jair Cervantes, Xiaoou Li, Wen Yu
redb/extractors/decompiler/apk/apktool_wrapper.py
← Index redb/extractors/decompiler/apk/apktool_wrapper.py python
"""Apktool disassembler subprocess wrapper.

Manages apktool subprocess execution for smali disassembly,
following the CAPA extractor subprocess pattern.
"""

import os
import signal
import subprocess
from typing import List, Optional


class ApktoolDisassembler:
    """Subprocess wrapper for apktool smali disassembly."""

    def __init__(
        self, apktool_path: str = None, timeout: int = None, log=None
    ):
        self.apktool_path = apktool_path or os.getenv("APKTOOL_PATH", "apktool")
        self.timeout = timeout or int(os.getenv("APKTOOL_TIMEOUT", "120"))
        self.log = log

    def disassemble(self, apk_path: str, output_dir: str) -> bool:
        """Run apktool disassembly on an APK file.

        Returns True on success, False on failure.
        """
        cmd = [
            self.apktool_path,
            "d",
            "--no-res",
            "--force",
            "--output", output_dir,
            apk_path,
        ]

        try:
            process = subprocess.Popen(
                cmd,
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE,
                text=True,
                preexec_fn=os.setsid,
            )

            try:
                stdout, stderr = process.communicate(timeout=self.timeout)
                if process.returncode != 0:
                    if self.log:
                        self.log.warning(
                            f"apktool returned non-zero exit code {process.returncode}: "
                            f"{stderr[:500] if stderr else 'no stderr'}"
                        )
                    return False
                return True

            except subprocess.TimeoutExpired:
                if self.log:
                    self.log.error(
                        f"apktool timed out after {self.timeout}s"
                    )
                try:
                    os.killpg(os.getpgid(process.pid), signal.SIGTERM)
                    process.wait(timeout=3)
                except (ProcessLookupError, subprocess.TimeoutExpired):
                    try:
                        os.killpg(os.getpgid(process.pid), signal.SIGKILL)
                    except ProcessLookupError:
                        pass
                return False

        except FileNotFoundError:
            if self.log:
                self.log.error(
                    f"apktool not found at '{self.apktool_path}'. "
                    "Install apktool or set APKTOOL_PATH env var."
                )
            return False
        except Exception as e:
            if self.log:
                self.log.error(f"apktool execution error: {e}")
            return False

    def get_smali_directories(self, output_dir: str) -> List[str]:
        """Return paths to all smali output directories.

        Handles multi-DEX: smali/, smali_classes2/, smali_classes3/, etc.
        """
        smali_dirs = []
        if not os.path.isdir(output_dir):
            return smali_dirs

        for entry in sorted(os.listdir(output_dir)):
            if entry == "smali" or entry.startswith("smali_classes"):
                full_path = os.path.join(output_dir, entry)
                if os.path.isdir(full_path):
                    smali_dirs.append(full_path)

        return smali_dirs