Xiao Li

17 papers Journal 17
YearRankTypeTitle / Venue / Authors
2026 J jnl
J. Comput. Civ. Eng.
Qing Dong, Xiao Li, Guohao Liu, Chengke Wu, Taicong Chen
2026 J jnl
Eur. J. Oper. Res.
Nianmin Zhang, Xiao Li, Zhiwei Xu
2025 J jnl
Comput. Ind. Eng.
Yaning Zhang, Xiao Li, Yue Teng, Geoffrey Q. P. Shen, Sijun Bai
2025 J jnl
Adv. Eng. Informatics
Chengke Wu, Wenjun Ding, Qisen Jin, Junjie Jiang, Rui Jiang, Qinge Xiao, Longhui Liao, Xiao Li
2025 J jnl
Complex Intell. Syst.
Jinning Yang, Zhile Yang, Chengke Wu, Yuanjun Guo, Xiao Li, Jiarui Lin
2024 J jnl
Expert Syst. Appl.
Yaning Zhang, Xiao Li, Yue Teng, Geoffrey Qiping Shen, Sijun Bai
2023 J jnl
Adv. Eng. Informatics
Rongyan Li, Hung-Lin Chi, Zhenyu Peng, Xiao Li, Albert P. C. Chan
2023 J jnl
Comput. Aided Civ. Infrastructure Eng.
Chengke Wu, Xiao Li, Rui Jiang, Yuanjun Guo, Jun Wang, Zhile Yang
2023 J jnl
Knowl. Based Syst.
Xiao Li, Chengke Wu, Zhile Yang, Yuanjun Guo, Rui Jiang
2023 J jnl
Comput. Aided Civ. Infrastructure Eng.
Xiao Li, Jianhuan Zeng, Chen Chen, Hung-Lin Chi, Geoffrey Qiping Shen
2022 J jnl
Comput. Ind.
Liupengfei Wu, Weisheng Lu, Fan Xue, Xiao Li, Rui Zhao, Maohong Tang
2021 J jnl
ISPRS Int. J. Geo Inf.
Fan Xue, Xiao Li, Weisheng Lu, Christopher J. Webster, Zhe Chen, Lvwen Lin
2021 J jnl
Comput. Ind.
Xiao Li, Liupengfei Wu, Rui Zhao, Weisheng Lu, Fan Xue
2020 J jnl
Adv. Eng. Informatics
Xiao Li, Hung-Lin Chi, Peng Wu, Geoffrey Qiping Shen
2019 J jnl
Adv. Eng. Informatics
Xiao Li, Geoffrey Qiping Shen, Peng Wu, Fan Xue, Hung-Lin Chi, Clyde Zhengdao Li
2017 J jnl
ISPRS Int. J. Geo Inf.
Xin Liu, Xiangyu Wang, Graeme Wright, Jack C. P. Cheng, Xiao Li, Rui Liu
2017 J jnl
J. Inf. Technol. Constr.
Bo Xu, Chao Mao, Chengke Wu, Xiao Li
redb/extractors/decompiler/apk/library_filter.py
← Index redb/extractors/decompiler/apk/library_filter.py python
"""Package-based library filtering for APK DEX code analysis.

Determines whether a method belongs to a known library/framework package
and should be filtered out of content tables. This is the Android equivalent
of is_lib_or_thunk() in the Binary Ninja pipeline.
"""

import os
from typing import Dict, List


DEFAULT_LIBRARY_PREFIXES = [
    "android.",
    "androidx.",
    "com.google.android.",
    "com.google.firebase.",
    "com.google.gson.",
    "com.google.protobuf.",
    "kotlin.",
    "kotlinx.",
    "org.apache.",
    "com.squareup.",
    "io.reactivex.",
    "org.reactivestreams.",
    "com.facebook.",
    "com.crashlytics.",
    "io.fabric.",
    "org.junit.",
    "org.mockito.",
]


class LibraryFilter:
    """Filters library/framework classes from APK analysis."""

    def __init__(self, prefixes: List[str] = None):
        env_prefixes = os.getenv("APK_LIBRARY_PREFIXES")
        if env_prefixes:
            self._prefixes = [p.strip() for p in env_prefixes.split(",") if p.strip()]
        elif prefixes is not None:
            self._prefixes = prefixes
        else:
            self._prefixes = DEFAULT_LIBRARY_PREFIXES

        # Convert Dalvik-style prefixes to both formats for matching
        self._dot_prefixes = tuple(self._prefixes)

        self._stats = {"library": 0, "user": 0}

    def is_library(self, class_name: str) -> bool:
        """Check if a class belongs to a known library/framework package.

        Accepts both Java dot notation (com.example.Foo) and Dalvik
        descriptor notation (Lcom/example/Foo;).
        """
        # Normalize Dalvik descriptor to dot notation
        normalized = self._normalize_class_name(class_name)

        is_lib = normalized.startswith(self._dot_prefixes)
        if is_lib:
            self._stats["library"] += 1
        else:
            self._stats["user"] += 1
        return is_lib

    def get_filter_stats(self) -> Dict[str, int]:
        """Return counts of filtered vs. retained classes."""
        return dict(self._stats)

    @staticmethod
    def _normalize_class_name(class_name: str) -> str:
        """Convert Dalvik descriptor to dot notation.

        Lcom/example/Foo; -> com.example.Foo
        com.example.Foo -> com.example.Foo
        """
        if class_name.startswith("L") and class_name.endswith(";"):
            return class_name[1:-1].replace("/", ".")
        return class_name.replace("/", ".")