{"id":21861377,"url":"https://github.com/gmh5225/androiddrivesignity","last_synced_at":"2025-04-14T19:35:58.611Z","repository":{"id":225883683,"uuid":"767129866","full_name":"gmh5225/AndroidDriveSignity","owner":"gmh5225","description":"AndroidDriveSignity is a Python utility designed to bypass driver signature verification in Android kernel(ARMv8.3), facilitating the loading of custom drivers","archived":false,"fork":false,"pushed_at":"2024-03-04T20:10:08.000Z","size":34,"stargazers_count":63,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T05:24:57.726Z","etag":null,"topics":["android","armv8","bypass","driver","kernel","linux","patch","signature","verification"],"latest_commit_sha":null,"homepage":"https://github.com/gmh5225/android-kernel-driver-template","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmh5225.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["gmh5225"]}},"created_at":"2024-03-04T18:54:59.000Z","updated_at":"2025-03-18T17:59:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"271eff82-66cf-43fc-979f-1696394254b5","html_url":"https://github.com/gmh5225/AndroidDriveSignity","commit_stats":null,"previous_names":["gmh5225/androiddrivesignity"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmh5225%2FAndroidDriveSignity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmh5225%2FAndroidDriveSignity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmh5225%2FAndroidDriveSignity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmh5225%2FAndroidDriveSignity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmh5225","download_url":"https://codeload.github.com/gmh5225/AndroidDriveSignity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248946797,"owners_count":21187574,"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":["android","armv8","bypass","driver","kernel","linux","patch","signature","verification"],"created_at":"2024-11-28T03:11:24.783Z","updated_at":"2025-04-14T19:35:58.592Z","avatar_url":"https://github.com/gmh5225.png","language":"Python","funding_links":["https://github.com/sponsors/gmh5225"],"categories":[],"sub_categories":[],"readme":"# `AndroidDriveSignity`\n\nAndroidDriveSignity is a Python script designed for patching Android kernel``(ARMv8.3)`` files, enabling the loading of drivers without being subject to various verification checks, specifically signature verifications. This tool aims to facilitate the development and testing process by allowing developers to bypass the kernel's built-in security measures that prevent unofficial or modified drivers from being loaded.\n\n### Features\n\n- **Targeted Symbol Patching:** Modifies specific symbols within the kernel (`check_modinfo`, `check_version`, and `module_sig_check`) to circumvent driver signature verification mechanisms.\n- **Intelligent Patching:** Dynamically adjusts patching based on the presence of the PACIASP instruction, ensuring compatibility across different kernel configurations.\n- **User-Friendly CLI:** Provides a straightforward command-line interface for specifying the kernel binary, the kallsyms symbol table, and the output file paths.\n\n### Requirements\n\n- Rooted Android devices``(ARMv8.3)`` with [Magisk](https://github.com/topjohnwu/Magisk) or [KernelSU](https://github.com/tiann/KernelSU)\n- Python 3.x\n- ADB\n\n### Usage\n\n1. **Prepare the Necessary Files:** Ensure you have the kernel binary file (`kernel_file_path`), the kallsyms symbol table file (`kallsyms_file_path`), and a destination for the patched kernel (`output_file_path`).\n\n2. **Execute AndroidDriveSignity:** Navigate to the script's directory in your terminal or command prompt and run:\n\n   ```bash\n   python AndroidDriveSignity.py \u003ckernel_file_path\u003e \u003ckallsyms_file_path\u003e \u003coutput_file_path\u003e\n\n### How to get your kallsyms?\n```\nadb shell\nsu\necho 0 \u003e /proc/sys/kernel/kptr_restrict\nexit\nexit\nadb shell su -c \"cat /proc/kallsyms \u003e /data/local/tmp/kallsyms\"\nadb pull /data/local/tmp/kallsyms\n```\n\n### How to extract your kernel file?\nIf there are two partitions, prioritize trying \"boot_a\":\n```\nadb shell su -c \"dd if=$(readlink /dev/block/by-name/boot_a) of=/data/local/tmp/boot.img\"\n```\nIf there is only one partition, then it is \"boot.img\":\n```\nadb shell su -c \"dd if=$(readlink /dev/block/by-name/boot) of=/data/local/tmp/boot.img\"\n```\nThen, pull the boot image to your local machine:\n```\nadb pull /data/local/tmp/boot.img\n```\n\nFinally, use [magiskboot](https://github.com/svoboda18/magiskboot/releases) to extract the kernel file from boot.img.\n```\nmagiskboot --unpack boot.img\n```\nYou will obtain two files: one is the ``kernel``(your kernel file), and the other is ``ramdisk.cpio``.\n\n### Testing on android12-5.10\n```\npython AndroidDriveSignity.py kernel kallsyms new-kernel\nmove/mv new-kernel kernel\nmagiskboot --repack boot.img\nadb reboot bootloader\nfastboot flash boot new-boot.img\nfastboot reboot\nadb push demo.ko /data/local/tmp\nadb shell su -c insmod /data/local/tmp/demo.ko\nadb shell su -c \"lsmod |grep demo\"\nadb shell su -c rmmod /data/local/tmp/demo.ko\n```\nYou can obtain an example of the Android driver [here](https://github.com/gmh5225/android-kernel-driver-template/releases)\n\n## Credits\n- ``Linux``\n- ``Android``\n- Some anonymous people\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmh5225%2Fandroiddrivesignity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmh5225%2Fandroiddrivesignity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmh5225%2Fandroiddrivesignity/lists"}