Lanchon / Flashize

Turn Shell Scripts Into Flashable Android Recovery Zips
27 stars 7 forks source link

flashize-env: Illegal instruction [ERROR 132] #3

Closed Lanchon closed 8 years ago

Lanchon commented 8 years ago

Hi @Dees-Troy,

i need a second of your embedded linux expertise.

i built a recovery-based data-sparing repartitioning tool for android. this tool depends on too much stuff to reliably run on just any recovery environment, so i did a small foundation (the project hosting this issue) that bundles with the tool a full recovery environment and temporarily sets it up to run the tool. (the environments are usually borrowed from official TWRP as detailed in the docs and filenames.) (currently sets up the environment using LD_LIBRARY_PATH and some symlinks instead of chroot).

unfortunately i have an unforeseen problem: the /sbin/linker in TWRP (which can be run as a standalone binary) runs fine on some recovery environments but fails on others, printing "Illegal instruction", exit code 132. but i thought that the linker file was the right architecture for the device.

for instance:

it looks like some build flag is causing this. could it be a kernel build flag? could it be a kernel that doesn't have VFP support enabled? what could be wrong?

thanks for your help!

Lanchon commented 8 years ago

more info: https://github.com/Lanchon/REPIT/issues/23#issuecomment-205392431

Lanchon commented 8 years ago

worked-around by significantly scaling down Flashize. the old (abandoned) version of Flashize affected by this issue can be found here.

Lanchon commented 8 years ago

@kularny,

hey arnab, i don't know but this might be the issue that's preventing TWRP 3 from booting with CM's 12.1 kernel. suggested test if you care to do it:

Dees-Troy commented 8 years ago

If you build TWRP in an Android 6.0 tree you have to use a kernel that is compatible with 6.0's newer sepolicy version. Otherwise the kernel will panic causing a reboot in most cases. In the case of IsoRec, TWRP is booting with whatever kernel is in the boot partition so it may be necessary to build TWRP in an Android 5.1 tree to ensure that it boots with older kernels.

Lanchon commented 8 years ago

thanks! i thought that permissive mode would eliminate all selinux issues and was suspecting some kind of abi problem.

arny24x7 commented 8 years ago

WTF i am not getting any notifications :-s many new sepolicy patches were added in cm-13.0 kernel...My kernel also has those. I guess u can take my twrp tree commit and test it in cm-12.1. or when il release the final DU for 5.1...Il give it a shot.