gpt4 book ai didi

Android 无法执行 : 64-bit ELF file

转载 作者:行者123 更新时间:2023-11-30 15:01:07 59 4
gpt4 key购买 nike

我正在尝试为我的 Oneplus 3T (LogoInjector) 构建一个 C 二进制文件,它使用 snapdragon 821,因此它是一个 arm64 设备。

当我运行时:

android-ndk-r13b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc -I android-ndk-r13b/platforms/android-24/arch-arm64/usr/include -c LogoInjector.v1.4.c lodepng

并将编译后的二进制文件复制到我手机上的/system/bin 我收到此错误:

sush: /system/bin/LogoInjector: not executable: 64-bit ELF file

我也尝试了 32 位工具链,但它给了我:

sush: /system/bin/LogoInjector: not executable: 32-bit ELF file

我将二进制文件的权限设置为 755,就像/system/bin 中的所有其他文件一样

谁能帮我解决这个问题吗?

谢谢!

最佳答案

-c 开关指示编译器执行仅编译步骤,跳过链接阶段,生成目标文件而不是可执行文件。调用

aarch64-linux-android-gcc -I android-ndk-r13b/platforms/android-24/arch-arm64/usr/include LogoInjector.v1.4.c -o lodepng

命令代替。除了这些参数之外,您可能还需要指定一些链接器选项(例如要链接的库)。

关于Android 无法执行 : 64-bit ELF file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41644382/

59 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com