Home

Awesome

projectsandcastle

Android/Linux for the iPhone

Provided utilities:

Kernel

Kernel can be obtained from our fork of linux-stable:

https://github.com/corellium/linux-sandcastle

Buildroot

The Sandcastle Linux ramdisk is built using buildroot. Our customizations are here:

https://github.com/corellium/sandcastle-buildroot

Android applications

Installing APKs

You can generally install APK files with adb install foo.apk. However, the following limitations apply:

Rebuilding binary libraries

Binary libraries need to be built for 16kB page size. First, try these options when the library is linked:

-z common-page-size=0x4000 -z max-page-size=0x4000

If the linker is wrapped with C compiler, most likely you'll need this:

-Wl,-z,common-page-size=0x4000 -Wl,-z,max-page-size=0x4000

To check if stuff went well, use readelf -l on the library:

Basically the idea is that files that are incorrectly built end up having executable, read-write and read-only data in the same 16k page.

If this doesn't help, check the source of the library for blatant uses of 4096, 0x1000 or 12 for PAGE_SIZE, kPageSize, PAGE_SHIFT, PAGE_BITS, etc. (comparatively rare, but Chromium is a good example).