gpt4 book ai didi

android - 如何为 Android x86 手机编译 Google stressapptest?

转载 作者:行者123 更新时间:2023-11-29 20:51:35 25 4
gpt4 key购买 nike

步骤(1)下载源

svn checkout http://stressapptest.googlecode.com/svn/trunk/ stressapptest

第 (2) 步如何为 Android x86 手机编译以上代码?

Answer Not available with me.

步骤(3)如何安装?

adb push stressapptest /data/local/tmp/
adb shell chmod 777 /data/local/tmp/stressapptest
adb shell /data/local/tmp/stressapptest

步骤(4)如何运行? 用户指南:https://code.google.com/p/stressapptest/wiki/UserGuide

示例命令行

./stressapptest -s 20 -M 256 -m 8 -C 8 -W # Allocate 256MB of memory and run 8 "warm copy" threads, and 8 cpu load threads. Exit after 20 seconds.

./stressapptest -f /tmp/file1 -f /tmp/file2 # Run 2 file IO threads, and autodetect memory size and core count to select allocated memory and memory copy threads.

问题是:如何为 Android x86 手机编译以上代码?

最佳答案

使用安卓 NDK

您可以使用 NDK 编译可执行文件,您的 Android.mk 文件有一个包含 $(BUILD_EXECUTABLE) 语句。 (已包含在源文件中)。

步骤

  1. 将整个源文件放入jni文件夹(不存在则创建)

  2. 制作Aplication.mk文件。

APP_STL := STLport_static
APP_ABI := x86
APP_PLATFORM := android-18

  1. 编辑 stressapptest_config_android.h 文件

    • 取消注释#undef STRESSAPPTEST_CPU_I686 并将#undef 替换为#define。
    • 评论#define STRESAPPTEST_CPU_ARMV7A
  2. 使用 ndk-build 命令编译 stressapptest 文件夹。
  3. 在 lib\x86 文件夹中,您将获得 stressapptest
  4. 问题中所示的下一步

关于android - 如何为 Android x86 手机编译 Google stressapptest?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29025457/

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