Reputation: 803
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
Upvotes: 45
Views: 32726
Reputation: 400
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:
$ . build/envsetup.sh
$ 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
Upvotes: 0
Reputation: 981
Here follow one simple Trick.
By doing this old setting will be by default erased. New Setting of the emulator will available.
Upvotes: 2
Reputation: 17813
Simply just go to Tools > SDK Manager > SDK Tools and update what might be available under your selected choices.
It could many things:
Upvotes: 0
Reputation: 3127
See @voghDev answer above,
Tools > SDK Manager > SDK Tools > Android Emulator > Mark it checked to force update > Accept
Upvotes: 15
Reputation: 551
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
Upvotes: 4
Reputation: 5791
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
Upvotes: 149
Reputation: 431
Check your Android SDK settings -> SDK Tools enable HAXM installer (if you have Intel) like here
it helped me, good luck!
Upvotes: 0
Reputation: 803
To answer my own question:
You cannot run the build on the emulator if you compile for fugu - Nexus Player build.
Upvotes: -5