热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

如何编译Dalvik在Linux上本地运行?-HowcanIcompileDalviktorunitlocallyonLinux?

Whataretheminimalstepsnecessary(includingretrievingthesourcecode)tocompileandrunjust

What are the minimal steps necessary (including retrieving the source code) to compile and run just the Dalvik virtual machine on Linux?

在Linux上编译和运行Dalvik虚拟机所需的最小步骤(包括检索源代码)是什么?

7 个解决方案

#1


0  

Dalvik runs on Android. The authors of Dalvik are only worrying about it running on Android, as far as we are aware.

Dalvik在Android上运行。据我们所知,Dalvik的作者只担心它在Android上运行。

Various groups have indicated they are working on getting Dalvik outside of Android. You are probably best off finding and talking to them.

各种团体都表示他们正致力于将Dalvik置于Android之外。你可能最好找到并与他们交谈。

In other words, there are no official instructions of the type you seek.

换句话说,没有您所寻求类型的官方说明。

Sorry!

#2


3  

Use sabayon Linux. This is a distro that can natively run Android programs and all Linux ones too.

使用sabayon Linux。这是一个可以原生运行Android程序和所有Linux程序的发行版。

#3


3  

Actually, that's rather android running on Dalvik and the underlying system is already linux.

实际上,这是在Dalvik上运行的android而且底层系统已经是linux了。

I guess running a bare Dalvik VM on a desktop linux box is just a matter of getting the sources and compile it.

我想在桌面Linux机器上运行一个裸的Dalvik VM只需要获取源代码并进行编译。

The GUI stuff is something else.

GUI的东西是别的东西。

#4


3  

Actually , I got Dalvik working on my elementary OS installation.

实际上,我让Dalvik在我的基本操作系统安装上工作。

First download the Android AOSP source tree using https://source.android.com/source/downloading.html. Wait for it to download (2 hours for me cloning only the current commits and Marshmallow branch)

首先使用https://source.android.com/source/downloading.html下载Android AOSP源代码树。等待它下载(2小时我只克隆当前提交和Marshmallow分支)

After running build/envsetup.sh while in the source tree run lunch full_x86-eng. Then type make -jN (replace N with number of cores).

在源代码树中运行build / envsetup.sh之后运行午餐full_x86-eng。然后键入make -jN(用核心数替换N)。

WAIT. This took me about 1 hour on an AMD-4500M laptop. Newer ccomputers may be as low as half and hour and older ones might take half a day.

等待。在AMD-4500M笔记本电脑上花了我大约1个小时。较新的计算机可能只有一半,小时和较旧的计算机可能需要半天。

Change directory to !!AOSP-PATH!!/out/host/linux-x86/bin/ and run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/obj/lib/ or

将目录更改为!! AOSP-PATH !! / out / host / linux-x86 / bin /并运行export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:!! AOSP-PATH !! / out / host / linux-x86 / obj / lib /或

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/lib

or export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/lib64

或导出LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:!! AOSP-PATH !! / out / host / linux-x86 / lib64

TRY ALL OF THESE

尝试所有这些

and then ./dalvikvm --32. If you try to run without the --32 option it will crash (don't know why)

然后./dalvikvm --32。如果你尝试在没有--32选项的情况下运行它会崩溃(不知道为什么)

Working Marshmallow Dalvik. To get the GUI apps working you will need to do some more porting and coding which is another project which I am working on.

工作棉花糖Dalvik。为了使GUI应用程序正常工作,您需要进行更多的移植和编码,这是我正在开发的另一个项目。

Took me half a day to figure this out.

花了半天时间来弄明白这一点。

References

http://milk.com/kodebase/dalvik-docs-mirror/docs/hello-world.html

#5


1  

You are not the only one with this idea, and that is great in internet society terms.

你不是唯一有这个想法的人,这在互联网社会方面很有用。

This is probably what you are looking for: http://www.android-x86.org/. Those guys ported android over to x86.

这可能是您正在寻找的:http://www.android-x86.org/。那些家伙将android移植到x86。

It still works as an OS, so I'm not sure if you can run Linux and Android(Linux) together without using VirtualBox.

它仍然可以用作操作系统,所以我不确定你是否可以在不使用VirtualBox的情况下同时运行Linux和Android(Linux)。

#6


0  

Getting apps designed for Android to run on Linux is going to be tricky. However, it is possible to run a Dalvik VM on Linux. In fact, this GitHub project has a pre-compiled binary of Dalvik VM for Linux, ready to use! Check the associated blog post for information about how the binary was compiled and how to use it.

获取专为Android设计的应用程序在Linux上运行将变得棘手。但是,可以在Linux上运行Dalvik VM。事实上,这个GitHub项目有一个预编译的Dalvik VM for Linux二进制文件,随时可以使用!查看相关的博客文章,了解有关如何编译二进制文件以及如何使用它的信息。

#7


-1  

Learn to program Java \ C \ C++ and other frameworks

学习编写Java \ C \ C ++和其他框架

Modify the Android source (I think app_process or something) so it shows a windows on the Linux desktop (learn X11 / Wayland APIs)

修改Android源代码(我认为app_process或其他东西),这样就可以在Linux桌面上显示一个窗口(学习X11 / Wayland API)

Below is a simpile base for you to start with

下面是一个简单的基础供您开始

www.android-x86.org/getsourcecode

Getting Android-x86 source code

获取Android-x86源代码

First, follow this page to configure your build environment. Then

首先,按照此页面配置您的构建环境。然后

mkdir android-x86
cd android-x86

repo init -u git.android-x86.org/manifest -b $branch
repo sync

Where $branch is any branch name described in the previous section. This will point the projects created or modified by android-x86 to our git server. All the other projects still point to AOSP. We also have a git mirror server on SourceForge.net. To use it, you only need to change the repo init command to

其中$ branch是上一节中描述的任何分支名称。这将把android-x86创建或修改的项目指向我们的git服务器。所有其他项目仍然指向AOSP。我们在SourceForge.net上也有一个git镜像服务器。要使用它,您只需要将repo init命令更改为

repo init -u git.code.sf.net/p/android-x86/manifest -b $branch

推荐阅读
author-avatar
wcnm
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有