Running Android in chroot

1,889 views
Skip to first unread message

Magnus

unread,
Aug 10, 2011, 9:02:47 AM8/10/11
to android-porting
I'm working on a project where the goal is to run Android in a
chroot'ed environment from Ubuntu.

As of now I have a kernel for Android running (compiled from
http://nv-tegra.nvidia.com/). From that kernel I can start both ubuntu
and Android depending on what init I choose from uBoot and pass to the
kernel.

The thing is that I want to boot into Ubuntu and after that start
Android inside a chroot.
After I run the command:
chroot android/ /init
Android starts and the init program starts executing everything in the
init.rc file and the problem is now that it stops when hitting the
line:
mount rootfs rootfs / ro remount
with the error:
init: Cannot mount the device rootfs at / as rootfs file
system...retrying

So I wonder what might be wrong, can/should I do anything different
when starting Android or are there anything I can do to fix the
mounting issue?

I have a Harmony board if that might change things.

koba

unread,
Aug 10, 2011, 9:10:42 PM8/10/11
to android-porting
Hi,

You don't have to remount /. comment out the line.

About Android on Ubuntu, see my slides.

http://www.slideshare.net/tetsu.koba/reusing-your-existing-software-on-android
http://www.slideshare.net/tetsu.koba/android-on-ubuntu-for-developer


On Aug 10, 10:02 pm, Magnus <ma...@mange.name> wrote:
> I'm working on a project where the goal is to run Android in a
> chroot'ed environment from Ubuntu.
>
> As of now I have a kernel for Android running (compiled fromhttp://nv-tegra.nvidia.com/). From that kernel I can start both ubuntu

Magnus

unread,
Aug 16, 2011, 7:37:49 AM8/16/11
to android-porting
Hi,

Thank you for your response, I've commented out the mounting part and
also changed the line in NetLinkEvent.cpp and now Android starts up
and I can enter the console, no graphics yet.

one thing remains and that is that the nvrm_daemon complains that it
cannot find /dev/nvhost-ctrl which is understandable because it does
not exists, any ideas on how to fix this?
Can I create it myself, or should I change anything?

On 11 Aug, 03:10, koba <tetsu.k...@gmail.com> wrote:
> Hi,
>
> You don't have to remount /. comment out the line.
>
> About Android on Ubuntu, see my slides.
>
> http://www.slideshare.net/tetsu.koba/reusing-your-existing-software-o...http://www.slideshare.net/tetsu.koba/android-on-ubuntu-for-developer
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages