Discussion:
Android-x86 8.0 - /init not executing
(too old to reply)
Jacob Jacobson
2017-10-10 21:50:54 UTC
Permalink
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.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
spin877
2017-10-11 01:28:26 UTC
Permalink
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
????
Post by Jacob Jacobson
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
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
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.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
fguy
2017-10-11 09:58:03 UTC
Permalink
read this https://groups.google.com/forum/#!topic/android-x86/jUAH5OITOs4
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Jacob Jacobson
2017-10-11 14:57:48 UTC
Permalink
I did not find anything relevant to this issue (init not executing).
Post by fguy
read this https://groups.google.com/forum/#!topic/android-x86/jUAH5OITOs4
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
fguy
2017-10-11 15:24:40 UTC
Permalink
Post by Jacob Jacobson
I did not find anything relevant to this issue (init not executing).
read this
https://groups.google.com/d/msg/android-x86/jUAH5OITOs4/448Iile5BQAJ
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Jacob Jacobson
2017-10-11 17:34:29 UTC
Permalink
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?
Post by Jacob Jacobson
I did not find anything relevant to this issue (init not executing).
read this
https://groups.google.com/d/msg/android-x86/jUAH5OITOs4/448Iile5BQAJ
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
fguy
2017-10-11 17:43:29 UTC
Permalink
Post by Jacob Jacobson
What is the change and which file (or image) is it in?
file init.sh is located in the system/etc
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Jacob Jacobson
2017-10-11 19:07:41 UTC
Permalink
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.
Post by Jacob Jacobson
What is the change and which file (or image) is it in?
Post by Jacob Jacobson
file init.sh is located in the system/etc
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Jacob Jacobson
2017-10-11 14:52:52 UTC
Permalink
I have 68 73 71 73 C7
Post by spin877
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
????
Post by Jacob Jacobson
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
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
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.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Jacob Jacobson
2017-10-11 15:19:10 UTC
Permalink
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 #
Post by spin877
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
????
Post by Jacob Jacobson
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
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
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.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...