{"id":13480672,"url":"https://github.com/crmulliner/adbi","last_synced_at":"2025-05-16T12:10:52.148Z","repository":{"id":10355250,"uuid":"12493642","full_name":"crmulliner/adbi","owner":"crmulliner","description":"Android Dynamic Binary Instrumentation Toolkit  ","archived":false,"fork":false,"pushed_at":"2017-06-23T10:32:32.000Z","size":191,"stargazers_count":1260,"open_issues_count":24,"forks_count":420,"subscribers_count":124,"default_branch":"master","last_synced_at":"2025-03-30T13:07:33.884Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.mulliner.org/android","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crmulliner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-30T19:13:02.000Z","updated_at":"2025-03-26T01:38:15.000Z","dependencies_parsed_at":"2022-09-04T23:00:26.412Z","dependency_job_id":null,"html_url":"https://github.com/crmulliner/adbi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crmulliner%2Fadbi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crmulliner%2Fadbi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crmulliner%2Fadbi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crmulliner%2Fadbi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crmulliner","download_url":"https://codeload.github.com/crmulliner/adbi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492513,"owners_count":20947544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-07-31T17:00:43.450Z","updated_at":"2025-04-06T14:10:03.143Z","avatar_url":"https://github.com/crmulliner.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"adbi - The Android Dynamic Binary Instrumentation Toolkit  \n=========================================================\n\nSimple binary instrumentation toolkit for Android ARM + Thumb.\n\nInstrumentation is based on library injection and hooking function entry \npoints (in-line hooking).\n\nThe toolkit consists of two main components the hijack tool and the base \nlibrary.\n\n**hijack**\n\n The hijack tool provides the injection functionality. It supports a number of  modes for supporting older and newer Android devices. hijack provides help on the command line.\n \n**libbase**\n\n The base library provides the hooking and unhooking functionality. The base library is compiled as a static library so it can be directly included in the\n actual instrumentation library. This is done so we can keep everything in /data/local/tmp. \n\nBelow we provide and easy to follow step-by-step instructions for howto build and use adbi. The example instrument hijacks epoll_wait() and logs every call\nto a file.\n\n=== External Resources ===\n\nmore information at: \n http://www.mulliner.org/android/\n\nslide deck about this toolkit: \n http://www.mulliner.org/android/feed/binaryinstrumentationandroid_mulliner_summercon12.pdf\n \nold code (with more examples):\n http://www.mulliner.org/android/feed/collin_android_dbi_v02.zip\n\n=== Prerequisites ===\n\nAndroid SDK\nAndroid NDK\n\n=== How to Build ===\n\n= build the hijack tool =\n```\ncd hijack\ncd jni\nndk-build\ncd ..\nadb push libs/armeabi/hijack /data/local/tmp/\ncd ..\n```\n\n= build the instrumentation base code =\n\n```\ncd instruments\ncd base\ncd jni\nndk-build\ncd ..\ncd ..\n```\n\n= build instrumentation example =\n\n```\ncd example\ncd jni\nndk-build\ncd ..\nadb push libs/armeabi/libexample.so /data/local/tmp/\n```\n\n=== How to Run ===\n\n```\nadb shell\nsu\ncd /data/local/tmp\n\u003e/data/local/tmp/adbi_example.log\n# GET PID from com.android.phone\n./hijack -d -p PID -l /data/local/tmp/libexample.so\ncat adbi_example.log\n```\n\noutput should look similar to:\n\n```\nstarted\nhooking:   epoll_wait = 0x4004c378 ARM using 0x4a84a588\nepoll_wait() called\nepoll_wait() called\nepoll_wait() called\nremoving hook for epoll_wait()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrmulliner%2Fadbi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrmulliner%2Fadbi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrmulliner%2Fadbi/lists"}