3

I have no experience in that so please forgive me if it sounds a bit silly:

Is it possible to remove all "user layer" application and DalvikVM from an Android, just to obtain plain linux-based embedded OS with all libraries and drivers already configured? Does graphical environment requres DalvikVM? Could I get a classic terminal in that case?

Maybe somebody already have done something like this or knows good resources about it?

2 Answers 2

6

You can. Understand that it's running Bionic rather than glibc, and not everything you're used to having on desktop Linux will be available.

The simplest way to experience this is to shut the Android framework down with adb shell stop (while running as root). At this point, anything you can do on the device is being done without the VM.

You can run native programs, sending stdin/stdout over ADB. You can interact with HardwareComposer to get access to the display, and use OpenGL ES to render stuff. (You might want to keep SurfaceFlinger around, but that's entirely native code.)

Having the VM available doesn't stop you from doing anything, so getting rid of it doesn't do anything but free up disk space.

You might be better off with a Raspberry Pi for hobby projects.

1

As far as I know, without Dalvik, you can't be running any application packages (APK's, like SystemUI or framework-res.apk) and JARs without which there would be no means to run the logical Android UI as we know.

Maybe you could get some shell running if you really know about Android and its stuffs.

And yeah, Android is not Android without Dalvik or ART :)
Removing them makes Android meaningless.

If you really are a Linux genius, you can completely wipe the phone's SD and somehow modify a Linux distro from its source and put it to the device, that too provided you know how to link the drivers (yeah, drivers are just compiled binaries, it'd be good if you had the source), and that's way more difficult than what one can think.. :)

4
  • "Android is not Android without Dalvik or ART" - true. But what I intuitively think is that since VM is just a process (and all other Android apps) it would be possible to get rid of it all, boot the same system with my custom C/C++ app running instead. But this is only intuition, I wanted to confront it with facts, before I will commit any time for hacking this. Commented Aug 27, 2015 at 14:31
  • What kind of app can you create (using C/C++ ;) ) that can run without Dalvik?? What API layer will you have to use, without Dalvik or ART ??
    – Gokul NC
    Commented Aug 27, 2015 at 14:37
  • Of course, that's another question. But there may be libraries APIs available, let's say libc, with stdin / stdout? Or some other to display frames on a screen. I am not thinking about very user-friendly app, more about checking how much fun can I get from playing with hardware offered by my old mobile. Commented Aug 27, 2015 at 15:03
  • Well, atleast you need an environment to run them. It's not that easy and I really don't know if it's possible. Try asking in XDA Developers Forum
    – Gokul NC
    Commented Aug 27, 2015 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .