37
votes

I was building AOSP for the Nexus Player and after successful compilation I tried to run the emulator and the message I received is:

emulator: ERROR: Can't find 'Linux version ' string in kernel image file: /home/mita/Work/Nexus/out/target/product/fugu/kernel

I can't find anything about this, somebody please help.

The full output is:

emulator:Found ANDROID_PRODUCT_OUT: /home/mita/Work/Nexus/out/target/product/fugu emulator:Found build target architecture: x86 emulator:Looking for emulator-x86 to emulate 'x86' CPU emulator:Probing program: ./emulator64-x86 emulator:Probing program: ./emulator-x86 emulator:Probing path for: emulator64-x86 emulator:return result: /home/mita/Work/Nexus/prebuilts/android-emulator/linux-x86_64/emulator64-x86 emulator:Found target-specific emulator binary: /home/mita/Work/Nexus/prebuilts/android-emulator/linux-x86_64/emulator64-x86 emulator:GPU emulation is disabled emulator: Running :/home/mita/Work/Nexus/prebuilts/android-emulator/linux-x86_64/emulator64-x86 emulator: qemu backend: argv[00] = "/home/mita/Work/Nexus/prebuilts/android-emulator/linux-x86_64/emulator64-x86" emulator: qemu backend: argv[01] = "-verbose" emulator: Concatenated backend parameters: /home/mita/Work/Nexus/prebuilts/android-emulator/linux-x86_64/emulator64-x86 -verbose emulator: found Android build root: /home/mita/Work/Nexus emulator: found Android build out: /home/mita/Work/Nexus/out/target/product/fugu emulator: Read property file at /home/mita/Work/Nexus/out/target/product/fugu/system/build.prop emulator: Cannot find boot properties file: /home/mita/Work/Nexus/out/target/product/fugu/boot.prop

emulator: Found target API sdkVersion: 25

emulator: virtual device has no config file - no problem emulator: using core hw config path: /home/mita/Work/Nexus/out/target/product/fugu/hardware-qemu.ini emulator: found skin-specific hardware.ini: /home/mita/Work/Nexus/development/tools/emulator/skins/HVGA/hardware.ini emulator: autoconfig: -skin HVGA emulator: autoconfig: -skindir /home/mita/Work/Nexus/development/tools/emulator/skins emulator: found skin-specific hardware.ini: /home/mita/Work/Nexus/development/tools/emulator/skins/HVGA/hardware.ini emulator: keyset loaded from: /home/mita/.android/default.keyset emulator: trying to load skin file '/home/mita/Work/Nexus/development/tools/emulator/skins/HVGA/layout' emulator: skin network speed: 'full' emulator: skin network delay: 'none' emulator: autoconfig: -kernel /home/mita/Work/Nexus/out/target/product/fugu/kernel emulator: Target arch = 'x86' emulator: Auto-config: -qemu -cpu qemu32 emulator: ERROR: Can't find 'Linux version ' string in kernel image file: /home/mita/Work/Nexus/out/target/product/fugu/kernel

8
Which command did you use for compiling? Also can you post the list of files available in /home/mita/Work/Nexus/out/target/product/fugu/ ?Sanyam Jain
Sorry for not answering. I just posted the solution to the problem, but here are the files if you need them: 2ndbootloader installed-files.txt recovery.id android-info.txt kernel recovery.img boot.img module-info.json root build_fingerprint.txt obj symbols clean_steps.mk previous_build_config.mk system data ramdisk.img system.img dex_bootjars ramdisk-recovery.img gen recoveryMita_

8 Answers

122
votes

I was having this error and the cause was my Emulator running an old version. I went to SDK Manager and updated the Android Emulator

Tools > SDK Manager > SDK Tools > Android Emulator > Mark it checked to force update > Accept

After this, the emulator ran correctly

4
votes

See @voghDev answer above,

Tools > SDK Manager > SDK Tools > Android Emulator > Mark it checked to force update > Accept

2
votes

I was also having this error and the cause was my Emulator running an old version. I went to SDK Manager and updated the Android Emulator

I followed the steps of @voghdev

Tools > SDK Manager > SDK Tools > Android Emulator > Mark it checked to force update > Accept

And also make sure enough space is available for the emulator to run.

it requires around 8gb of disk space.

After this, the emulator ran correctly

0
votes

Check your Android SDK settings -> SDK Tools enable HAXM installer (if you have Intel) like here

it helped me, good luck!

0
votes

Simply just go to Tools > SDK Manager > SDK Tools and update what might be available under your selected choices.

It could many things:

  • Android SDK Build-Toolsxxx
  • Android Emulator
  • Intel x86 Emulator Accelator (HAXM installer)
0
votes

I had a similar issue when building AOSP then launching the emulator from the same terminal

Late post for OP, but I hope this helps others building for earlier versions of AOSP (OP posted build for API 25).

Problem:

As I'm sure you're aware, to configure an AOSP build, you run:

  1. $ . build/envsetup.sh
  2. $ lunch (and then select your build target)

In envsetup.sh, if you look near the bottom of the function lunch(), there is a call to set_stuff_for_environment. Within function set_stuff_for_environment(), there is a call to setpaths.

function setpaths(), as the name suggests, adds some paths to the $PATH variable for your AOSP build to run correctly. One of the paths added to $PATH, is a version of the emulator command that is packaged with AOSP.

Since the path to the AOSP emulator will be found first in your $PATH, when running $ emulator, the system will use the AOSP version of emulator rather than your Android Sdk version of emulator.

In short, when you run $ emulator from the command line after running $ lunch, you'll be running the AOSP version of the emulator which is associated with what ever version of AOSP you're building for. (In my case it was an older version of AOSP)

Solution:

In addition to the other answers, which correctly point out you need to update the emulator version in your Android Sdk, you need to make sure that you are running the emulator command from the Android Sdk path and not from the AOSP emulator path.

To quickly check this you can use $ which emulator. This will show you the full path to the command that will be run when running $ emulator

The "correct" path should read something like:

  • /home/user-name/Android/Sdk/emulator/emulator.

After running $ lunch, the path will read something like:

  • /home/user-name/aosp-home-dir/prebuilts/android-emulator/<target>/emulator

TL;DR

If you are running $ emulator from the same terminal that you built AOSP with, try running $ emulator from a new terminal. In addition, you should confirm the path of the emulator command by using $ which emulator.

$ which emulator should be pointing to the emulator location of < Android Sdk dir >/emulator/emulator, NOT the AOSP version of the emulator.

NOTE: < Android Sdk dir > is typically installed to ~/Android/Sdk

Other note: I'm not 100% sure that this answer applies to all AOSP builds. For this answer, I was building for 8.1 (And OP was building for API 25 or Android 7.1). In any case, I'm looking at the source for the latest envsetup.sh and it has the same setup routine I list above.

0
votes

enter image description hereTools SDK Manger SDK Tools..

Here follow one simple Trick.

  1. If the (Android Emulator)CheckBox is already checked.
  2. Uncheck the checkbox.
  3. Apply
  4. Ok
  5. Again Open the TOOLS-->SDK MANAGER-->SDK TOOLS
  6. Check the Android Emulator CheckBox

By doing this old setting will be by default erased. New Setting of the emulator will available.

enter image description here

-5
votes

To answer my own question:

You cannot run the build on the emulator if you compile for fugu - Nexus Player build.