{"id":13511493,"url":"https://github.com/corellium/projectsandcastle","last_synced_at":"2025-10-26T01:07:33.951Z","repository":{"id":44340034,"uuid":"244935651","full_name":"corellium/projectsandcastle","owner":"corellium","description":"Supporting tools for Android/Linux on the iPhone","archived":false,"fork":false,"pushed_at":"2023-03-25T17:51:00.000Z","size":29234,"stargazers_count":1967,"open_issues_count":11,"forks_count":154,"subscribers_count":143,"default_branch":"master","last_synced_at":"2025-04-08T01:36:56.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corellium.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}},"created_at":"2020-03-04T15:28:55.000Z","updated_at":"2025-04-07T08:41:31.000Z","dependencies_parsed_at":"2024-01-15T00:11:05.809Z","dependency_job_id":"852d0e22-e6e8-4fcd-93cd-0a9e7652ae52","html_url":"https://github.com/corellium/projectsandcastle","commit_stats":{"total_commits":11,"total_committers":3,"mean_commits":"3.6666666666666665","dds":0.2727272727272727,"last_synced_commit":"03db9c6ae04141eb940f3b9f56d446f50d57fadf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fprojectsandcastle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fprojectsandcastle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fprojectsandcastle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corellium%2Fprojectsandcastle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corellium","download_url":"https://codeload.github.com/corellium/projectsandcastle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414455,"owners_count":22067262,"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-08-01T03:00:51.915Z","updated_at":"2025-10-26T01:07:28.921Z","avatar_url":"https://github.com/corellium.png","language":"C","funding_links":[],"categories":["C","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# projectsandcastle\nAndroid/Linux for the iPhone\n\n## Provided utilities:\n\n* `loader/` loads kernel and device tree via pongoOS\n* `syscfg/` tool to extract configuration information from syscfg partition on devices\n* `hx-touchd/` touch screen support daemon\n* `hcdpack/` tool to heuristically extract Bluetooth firmware from binaries\n\n## Kernel\n\nKernel can be obtained from our fork of linux-stable:\n\nhttps://github.com/corellium/linux-sandcastle\n\n## Buildroot\n\nThe Sandcastle Linux ramdisk is built using buildroot. Our customizations are here:\n\nhttps://github.com/corellium/sandcastle-buildroot\n\n## Android applications\n\n### Installing APKs\n\nYou can generally install APK files with `adb install foo.apk`. However, the following\nlimitations apply:\n\n  * pure Java APKs will generally work if they don't need unsupported hardware,\n  * APKs containing only ARMv7 binaries (32-bit) will not work,\n  * APKs containing ARMv8 binaries (64-bit) will require a rebuild of those binaries.\n\n### Rebuilding binary libraries\n\nBinary libraries need to be built for 16kB page size. First, try these options when\nthe library is linked:\n\n  `-z common-page-size=0x4000 -z max-page-size=0x4000`\n\nIf the linker is wrapped with C compiler, most likely you'll need this:\n\n  `-Wl,-z,common-page-size=0x4000 -Wl,-z,max-page-size=0x4000`\n\nTo check if stuff went well, use `readelf -l` on the library:\n\n * if there's no RELRO segment, check that the LOAD segments with different attributes\n   do not occupy the same 16kB page in any place (a good tip-off is 4000 in the ALIGN\n   column on all of them),\n\n * if there is a RELRO segment, make sure that it either starts or ends on a 16kB\n   boundary; sometimes compilers put RELRO at start of the RW segment (and RELRO should\n   then end at a 16k boundary) and sometimes they put it at the end (and RELRO should\n   then start at a 16k boundary).\n\nBasically the idea is that files that are incorrectly built end up having executable,\nread-write and read-only data in the same 16k page.\n\nIf this doesn't help, check the source of the library for blatant uses of 4096, 0x1000\nor 12 for PAGE_SIZE, kPageSize, PAGE_SHIFT, PAGE_BITS, etc. (comparatively rare, but\nChromium is a good example).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorellium%2Fprojectsandcastle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorellium%2Fprojectsandcastle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorellium%2Fprojectsandcastle/lists"}