kernel-ranchu in Android 29

跟風遠走 提交于 2020-07-10 07:17:20

问题


So I'm using APACHE CORDOVA, withoutIonic`.

I created an app normally with the command at the prompt

    cordova create myApp br.com.carcleo myApp

I created 2 AVD's, one for Android 22 and another for Android 28.

For the Android 22 the emulator works correctly. But for the Android 28 emulator does not work.

It asks for kernel-qemu which should be in the image folder of Android 28 but there is no such file there.

However, in the Android 22 folder the file exists.

Well, there are 2 files with similar names, kernel-qemu andkernel-ranchu. In this case, Android 28 only haskernel-ranchu.

I even tried copying kernel-qemu fromAndroid 22 folders to the same folders on Android 28. Android even starts, but it stops on the black screen of the simulator and neither does theAndroid desktop show.

I've noticed the following: it looks for kernel-qemu in theAndroid 28 folder. However, there is only this file in Android 22 folder down. In the Android 23 folders, there is only thekernel-ranchu.

But what can be done to get around this problem? Should I make a build for the old version of Android? Was it just these the way out? Or do you have to edit config.ini to solve this? If so, how to proceed?

Thanks to anyone who can help!


回答1:


Even if this is old, for people googling for help and landing here, as of 2019 :

  • Having modern versions of the emulator looking for this kernel-qemu is the "second chance" (using the old emulator mode, goldfish) when the emulator failed to boot with the prefered modern emulation mode (ranchu) and kernel version (kernel-ranchu).

For older Android versions system files files (like Android 22), kernel-qemu and kernel-ranchu were both available and working, in both "goldfish" and "ranchu" mode. And for scary old versions, kernel-ranchu wasn't available.

But kernel-qemu (used for "goldfish" mode) is a pretty out of date kernel kind (old emulation mode based on qemu 1). There is no up to date enough "kernel-qemu" kernels versions for booting modern Android versions into "goldfish mode" : goldfish mode support will be dropped soon or late.

That being said : it probably means that you have a problem with the Android 28 (9.0.0) emulator, something makes "ranchu" mode and associated kernel unable to boot on this version, on your machine, with your current files.

It's really simple to check if you can do something or not (there is very few things to know/check/reset about the emulator to make sure you tested everything). Debugging can be done this way :

  • Go to c:\Users\Username.android\avd\
  • For each created AVD, you have one *.ini file and one subfolder
  • into the subfolder, delete everything apart from config.ini file : if one of those files is corrupt or stuck, it won't be able to work. If it's deleted, it creates fresh new ones. You can always take a look at what's inside config.ini if you want.
  • You can run the emulator from command line :
    • C:\Users\Username\AppData\Local\Android\Sdk\emulator>emulator.exe @ExampleName (-engine qemu2)
    • or even, for goldfish mode, or more debug informations, additional parameters are available
    • C:\Users\Username\AppData\Local\Android\Sdk\emulator>emulator.exe @ExampleName -verbose -show-kernel -engine classic

Finally, if your system-image files (link into config.ini) are corrupt, you can delete them, delete all your AVD files, and clean downloading, creating and starting again your AVD. In my case, my hardware is just unable to work fine with the emulator (HAXM bugs and too old CPU). But it works in Linux (but without KVM support : very slow).



来源:https://stackoverflow.com/questions/52347866/kernel-ranchu-in-android-29

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!