{"id":28891909,"url":"https://github.com/jd-opensource/arkdecompiler","last_synced_at":"2026-01-21T13:25:26.469Z","repository":{"id":287355349,"uuid":"950453695","full_name":"jd-opensource/arkdecompiler","owner":"jd-opensource","description":"We developed the HarmonyOS NEXT decompilation tool named arkdecompiler, which takes Panda Binary File as input, parses Panda Bytecode, and then translates it into Panda IR. After having IR, we can do various analyses.","archived":false,"fork":false,"pushed_at":"2026-01-13T03:44:02.000Z","size":1079,"stargazers_count":139,"open_issues_count":2,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-13T06:49:45.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jd-opensource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-18T07:26:15.000Z","updated_at":"2026-01-13T03:44:08.000Z","dependencies_parsed_at":"2025-11-28T02:02:27.507Z","dependency_job_id":null,"html_url":"https://github.com/jd-opensource/arkdecompiler","commit_stats":null,"previous_names":["jd-opensource/arkdecompiler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jd-opensource/arkdecompiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Farkdecompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Farkdecompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Farkdecompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Farkdecompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jd-opensource","download_url":"https://codeload.github.com/jd-opensource/arkdecompiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-opensource%2Farkdecompiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28580365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T18:29:59.827Z","status":"ssl_error","status_checked_at":"2026-01-19T18:29:40.878Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-21T01:43:58.148Z","updated_at":"2026-01-19T22:14:49.528Z","avatar_url":"https://github.com/jd-opensource.png","language":"C++","readme":"# Description\nWe developed the HarmonyOS NEXT decompilation tool named arkdecompiler, which takes Panda Binary File as input, parses Panda Bytecode, and then translates it into Panda IR. After having IR, we can do various analyses. Based on IR, we reversely construct the native arkTS AST tree, and then we traverse the AST tree and translate it into native arkTS source code.\n\n\n\n- 2025.Q3: [2025 Black Hat, USA](https://www.blackhat.com/us-25/arsenal/schedule/index.html#decompiler-for-harmonyos-next-45569)\n- 2026.Q1: Support all instructions and program structures\n\n# Installation\n## Tested platform\nUbuntu 18.04\n\nIn the future we will adapt to other development platforms such as (windows, macOS) and add a GUI.\n## Prepare enviroment\n```bash\nmkdir harmonyos\ncd harmonyos\nrun scripts/prepare.sh\n```\n\n## Clone arkdecompiler in harmonyos\n```bash\ngit clone https://github.com/jd-opensource/arkdecompiler.git\n```\n\n\n## Apply patches to arkcompiler and  third_party\nApply patches to `harmonyos/arkcompiler/runtime_core`, `harmonyos/arkcompiler/ets_frontend`, and `harmonyos/third_party/protobuf` according to the `patches`.\n\n\n## Build \u0026 Run\n```bash\n./build.sh\n\n```\n\n## Usage\n## Prepare demo.ts\nrefer `tests` directory\n\n### Run\n./run.sh\n\n### detailed description\n- binary executable is **xabc**,\n- default input file is：**demo.abc**\n- default output file is：**arkdemo.ts**\n\n\n## Demo\n### Decompile bytecode to arkTS\n![demo](demo.png)\n\n### AST\n```\n{\n  \"type\": \"Program\",\n  \"statements\": [\n    {\n      \"type\": \"ExpressionStatement\",\n      \"expression\": {\n        \"type\": \"AssignmentExpression\",\n        \"operator\": \"=\",\n        \"left\": {\n          \"type\": \"Identifier\",\n          \"name\": \"v254\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"right\": {\n          \"type\": \"Identifier\",\n          \"name\": \"undefined\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"loc\": {\n          \"start\": {\n            \"line\": 1,\n            \"column\": 1\n          },\n          \"end\": {\n            \"line\": 1,\n            \"column\": 1\n          }\n        }\n      },\n      \"loc\": {\n        \"start\": {\n          \"line\": 1,\n          \"column\": 1\n        },\n        \"end\": {\n          \"line\": 1,\n          \"column\": 1\n        }\n      }\n    },\n    {\n      \"type\": \"ExpressionStatement\",\n      \"expression\": {\n        \"type\": \"AssignmentExpression\",\n        \"operator\": \"=\",\n        \"left\": {\n          \"type\": \"Identifier\",\n          \"name\": \"c\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"right\": {\n          \"type\": \"Identifier\",\n          \"name\": \"v254\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"loc\": {\n          \"start\": {\n            \"line\": 1,\n            \"column\": 1\n          },\n          \"end\": {\n            \"line\": 1,\n            \"column\": 1\n          }\n        }\n      },\n      \"loc\": {\n        \"start\": {\n          \"line\": 1,\n          \"column\": 1\n        },\n        \"end\": {\n          \"line\": 1,\n          \"column\": 1\n        }\n      }\n    },\n    {\n      \"type\": \"ExpressionStatement\",\n      \"expression\": {\n        \"type\": \"AssignmentExpression\",\n        \"operator\": \"=\",\n        \"left\": {\n          \"type\": \"Identifier\",\n          \"name\": \"v0\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"right\": {\n          \"type\": \"NumberLiteral\",\n          \"value\": 1,\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"loc\": {\n          \"start\": {\n            \"line\": 1,\n            \"column\": 1\n          },\n          \"end\": {\n            \"line\": 1,\n            \"column\": 1\n          }\n        }\n      },\n      \"loc\": {\n        \"start\": {\n          \"line\": 1,\n          \"column\": 1\n        },\n        \"end\": {\n          \"line\": 1,\n          \"column\": 1\n        }\n      }\n    },\n    {\n      \"type\": \"ExpressionStatement\",\n      \"expression\": {\n        \"type\": \"AssignmentExpression\",\n        \"operator\": \"=\",\n        \"left\": {\n          \"type\": \"Identifier\",\n          \"name\": \"v254\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"right\": {\n          \"type\": \"BinaryExpression\",\n          \"operator\": \"+\",\n          \"left\": {\n            \"type\": \"NumberLiteral\",\n            \"value\": 1,\n            \"loc\": {\n              \"start\": {\n                \"line\": 1,\n                \"column\": 1\n              },\n              \"end\": {\n                \"line\": 1,\n                \"column\": 1\n              }\n            }\n          },\n          \"right\": {\n            \"type\": \"Identifier\",\n            \"name\": \"v0\",\n            \"loc\": {\n              \"start\": {\n                \"line\": 1,\n                \"column\": 1\n              },\n              \"end\": {\n                \"line\": 1,\n                \"column\": 1\n              }\n            }\n          },\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"loc\": {\n          \"start\": {\n            \"line\": 1,\n            \"column\": 1\n          },\n          \"end\": {\n            \"line\": 1,\n            \"column\": 1\n          }\n        }\n      },\n      \"loc\": {\n        \"start\": {\n          \"line\": 1,\n          \"column\": 1\n        },\n        \"end\": {\n          \"line\": 1,\n          \"column\": 1\n        }\n      }\n    },\n    {\n      \"type\": \"ExpressionStatement\",\n      \"expression\": {\n        \"type\": \"AssignmentExpression\",\n        \"operator\": \"=\",\n        \"left\": {\n          \"type\": \"Identifier\",\n          \"name\": \"c\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"right\": {\n          \"type\": \"Identifier\",\n          \"name\": \"v254\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"loc\": {\n          \"start\": {\n            \"line\": 1,\n            \"column\": 1\n          },\n          \"end\": {\n            \"line\": 1,\n            \"column\": 1\n          }\n        }\n      },\n      \"loc\": {\n        \"start\": {\n          \"line\": 1,\n          \"column\": 1\n        },\n        \"end\": {\n          \"line\": 1,\n          \"column\": 1\n        }\n      }\n    },\n    {\n      \"type\": \"ExpressionStatement\",\n      \"expression\": {\n        \"type\": \"AssignmentExpression\",\n        \"operator\": \"=\",\n        \"left\": {\n          \"type\": \"Identifier\",\n          \"name\": \"v254\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"right\": {\n          \"type\": \"Identifier\",\n          \"name\": \"undefined\",\n          \"loc\": {\n            \"start\": {\n              \"line\": 1,\n              \"column\": 1\n            },\n            \"end\": {\n              \"line\": 1,\n              \"column\": 1\n            }\n          }\n        },\n        \"loc\": {\n          \"start\": {\n            \"line\": 1,\n            \"column\": 1\n          },\n          \"end\": {\n            \"line\": 1,\n            \"column\": 1\n          }\n        }\n      },\n      \"loc\": {\n        \"start\": {\n          \"line\": 1,\n          \"column\": 1\n        },\n        \"end\": {\n          \"line\": 1,\n          \"column\": 1\n        }\n      }\n    },\n    {\n      \"type\": \"ReturnStatement\",\n      \"argument\": {\n        \"type\": \"Identifier\",\n        \"name\": \"undefined\",\n        \"loc\": {\n          \"start\": {\n            \"line\": 1,\n            \"column\": 1\n          },\n          \"end\": {\n            \"line\": 1,\n            \"column\": 1\n          }\n        }\n      },\n      \"loc\": {\n        \"start\": {\n          \"line\": 1,\n          \"column\": 1\n        },\n        \"end\": {\n          \"line\": 1,\n          \"column\": 1\n        }\n      }\n    }\n  ],\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 1\n    },\n    \"end\": {\n      \"line\": 1,\n      \"column\": 1\n    }\n  }\n}\n\n```\n","funding_links":[],"categories":["C++","逆向破解"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd-opensource%2Farkdecompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjd-opensource%2Farkdecompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd-opensource%2Farkdecompiler/lists"}