Handi Chen

24 papers A* 3Journal 18Unranked 3
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Handi Chen, Running Zhao, Xiuzhe Wu, Edith C. H. Ngai
2025 A* conf
INFOCOM
Xinchen Zhang, Running Zhao, Zhihan Jiang, Handi Chen, Yulong Ding, Edith C. H. Ngai, Shuang-Hua Yang
2025 J jnl
CoRR
Zhihan Jiang, Running Zhao, Lin Lin, Yue Yu, Handi Chen, Xinchen Zhang, Xuhai Xu, Yifang Wang, Xiaojuan Ma, Edith C. H. Ngai
2025 J jnl
CoRR
Handi Chen, Jing Deng, Xiuzhe Wu, Zhihan Jiang, Xinchen Zhang, Xianhao Chen, Edith C. H. Ngai
2025 J jnl
CoRR
Handi Chen, Rui Zhou, Yun-Hin Chan, Zhihan Jiang, Xianhao Chen, Edith C. H. Ngai
2025 J jnl
IEEE Trans. Mob. Comput.
Handi Chen, Rui Zhou, Yun-Hin Chan, Zhihan Jiang, Xianhao Chen, Edith C. H. Ngai
2025 A* conf
UIST
Running Zhao, Zhihan Jiang, Xinchen Zhang, Chirui Chang, Handi Chen, Weipeng Deng, Luyao Jin, Xiaojuan Qi, Xun Qian, Edith C. H. Ngai
2025 J jnl
CoRR
Running Zhao, Zhihan Jiang, Xinchen Zhang, Chirui Chang, Handi Chen, Weipeng Deng, Luyao Jin, Xiaojuan Qi, Xun Qian, Edith C. H. Ngai
2025 J jnl
IEEE Netw.
Handi Chen, Weipeng Deng, Shuo Yang, Jinfeng Xu, Zhihan Jiang, Edith C. H. Ngai, Jiangchuan Liu, Xue Liu
2024 conf
ECCV (88)
Xiuzhe Wu, Yang-Tian Sun, Handi Chen, Hang Zhou, Jingdong Wang, Zhengzhe Liu, Xiaojuan Qi
2024 J jnl
IEEE Trans. Vis. Comput. Graph.
Zhihan Jiang, Handi Chen, Rui Zhou, Jing Deng, Xinchen Zhang, Running Zhao, Cong Xie, Yifang Wang, Edith C. H. Ngai
2024 conf
MetaCom
Wenbo Liu, Handi Chen, Edith C. H. Ngai
2024 J jnl
CoRR
Wenbo Liu, Handi Chen, Edith C. H. Ngai
2024 J jnl
CoRR
Xinchen Zhang, Running Zhao, Zhihan Jiang, Handi Chen, Yulong Ding, Edith C. H. Ngai, Shuang-Hua Yang
2024 J jnl
IEEE Trans. Mob. Comput.
Zhaolong Ning, Handi Chen, Edith C. H. Ngai, Xiaojie Wang, Lei Guo, Jiangchuan Liu
2024 J jnl
CoRR
Handi Chen, Weipeng Deng, Shuo Yang, Jinfeng Xu, Zhihan Jiang, Edith C. H. Ngai, Jiangchuan Liu, Xue Liu
2023 A* conf
NeurIPS
Xiuzhe Wu, Peng Dai, Weipeng Deng, Handi Chen, Yang Wu, Yan-Pei Cao, Ying Shan, Xiaojuan Qi
2023 J jnl
CoRR
Zhihan Jiang, Handi Chen, Rui Zhou, Jing Deng, Xinchen Zhang, Running Zhao, Cong Xie, Yifang Wang, Edith C. H. Ngai
2022 J jnl
IEEE J. Sel. Top. Signal Process.
Zhaolong Ning, Handi Chen, Xiaojie Wang, Shupeng Wang, Lei Guo
2022 J jnl
IEEE Trans. Comput. Soc. Syst.
Shupeng Wang, Handi Chen, Yongjian Wang
2022 J jnl
IEEE Trans. Ind. Informatics
Handi Chen, Shupeng Wang, Guojun Li, Laisen Nie, Xiaojie Wang, Zhaolong Ning
2022 J jnl
IEEE Trans. Comput. Soc. Syst.
Shupeng Wang, Jun Li, Guangjun Wu, Handi Chen, Shihui Sun
2021 conf
CECNet
Handi Chen, Xiaojie Wang, Zhaolong Ning, Lei Guo
2019 J jnl
IEEE Access
Handi Chen, Tingting Zhao, Chengming Li, Yi Guo
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("/", ".")