Android-x86 8.0 - /init not executing

682 views
Skip to first unread message

Jacob Jacobson

unread,
Oct 10, 2017, 5:50:54 PM10/10/17
to Android-x86

I am trying to run recently released Android-x86 (on android-x86.org) 8.0 on x86_64 laptop.
This is the developer build of oreo-x86 and my target is android_x86_64-eng.

The release builds & I have kernel, initrd.img, ramdisk.img & system.sfs. Everything looks good. 
I can see the init script in "initrd.img" executing (I put some echo statements). Runs OK but:

          exec switch_root /android /init

does not start the init in ramdisk.img. Just hangs. I know because I put print LOG(INFO) statement 
& also an "system /system/xbin/sh" call in the main function of init.cpp. Using strings, I can see 
my print statement in the init of ramdisk.img.

    LOG(INFO) << "Start init main...";
    system("/system/xbin/sh");


Program size looks good. It built without any errors (mm in init directory). My kernel command line:

androidboot.selinux=permissive androidboot.hardware=android_x86_64 console=hvc0 androidboot.
console=hvc0 earlycon=xenboot init=/init earlyprintk=xen nomodeset loglevel=7

Almost identical setup with 7.1.1 runs flawlessly & I get to android window.

Please help.

spin877

unread,
Oct 10, 2017, 9:28:26 PM10/10/17
to Android-x86

I also tried to compile oreo-x86 and also not boot me. But the logo android I can see it. A curiosity, in the file system.sfs, the first 5 bytes how are they?

3A FF 26 ED 01
or
68 73 71 73 5C
????

fguy

unread,
Oct 11, 2017, 5:58:03 AM10/11/17
to Android-x86

Jacob Jacobson

unread,
Oct 11, 2017, 10:52:52 AM10/11/17
to Android-x86
I have 68 73 71 73 C7

Jacob Jacobson

unread,
Oct 11, 2017, 10:57:49 AM10/11/17
to Android-x86
I did not find anything relevant to this issue (init not executing). 

On Wednesday, October 11, 2017 at 5:58:03 AM UTC-4, fguy wrote:

Jacob Jacobson

unread,
Oct 11, 2017, 11:19:11 AM10/11/17
to Android-x86
If I invoke shell just before the switch_root, below is what I see. Is this OK?


android:/android # df 
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                  8221288      5368   8215920   0% /android
/dev/block/xvda1      41022688   1945788  36963364   5% /mnt
/dev/loop0              528768    528768         0 100% /android/system
tmpfs                  8221288         0   8221288   0% /android/data

android:/android # ls /android
acct                        nonplat_hwservice_contexts
bugreports                  nonplat_property_contexts
cache                       nonplat_seapp_contexts
charger                     nonplat_service_contexts
config                      oem
d                           plat_file_contexts
data                        plat_hwservice_contexts
default.prop                plat_property_contexts
dev                         plat_seapp_contexts
etc                         plat_service_contexts
fstab.android_x86_64        proc
init                        sbin
init.android_x86_64.rc      sdcard
init.environ.rc             sepolicy
init.rc                     storage
init.usb.configfs.rc        sys
init.usb.rc                 system
init.zygote32.rc            ueventd.android_x86_64.rc
init.zygote64_32.rc         ueventd.rc
mnt                         vendor
nonplat_file_contexts       vndservice_contexts

android:/android # ls /android/system
app                       fonts                     priv-app
bin                       framework                 usr
compatibility_matrix.xml  lib                       vendor
etc                       lib64                     xbin
fake-libs                 manifest.xml
fake-libs64               media
android:/android # 


On Tuesday, October 10, 2017 at 9:28:26 PM UTC-4, spin877 wrote:

fguy

unread,
Oct 11, 2017, 11:24:41 AM10/11/17
to Android-x86
I did not find anything relevant to this issue (init not executing). 

Jacob Jacobson

unread,
Oct 11, 2017, 1:34:29 PM10/11/17
to Android-x86
Please bear with me because I still do not understand.

The init script in initrd.img ends with the exec call. There is no do_init function or script in initrd.img.

There is no do_init.sh in ramdisk.img either.

What is the change and which file (or image) is it in?

fguy

unread,
Oct 11, 2017, 1:43:29 PM10/11/17
to Android-x86
What is the change and which file (or image) is it in?

file init.sh is located in the system/etc

Jacob Jacobson

unread,
Oct 11, 2017, 3:07:41 PM10/11/17
to Android-x86
Thanks. I found the file and made the change. Commented out 3 lines. Now, Android stays up. It
was continuously rebooting earlier. Now it just freezes.

However, there is still a problem because after the "exec" in the init (in initrd.img), the program
"init" in ramdisk.img should be executing but it's not. It appears that all these files simply vanish
after the exec and there is no "init" to execute.
Reply all
Reply to author
Forward
0 new messages