如何编译 Dalvik 以在 Linux 上本地运行它?

发布于 2024-09-15 15:56:15 字数 52 浏览 5 评论 0原文

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

无悔心 2024-09-22 15:56:15

事实上,我让 Dalvik 开始安装我的基本操作系统。

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

在源代码树中运行 build/envsetup.sh 后运行 lunch full_x86-eng 。然后输入 make -jN(将 N 替换为核心数)。

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

将目录更改为 !!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

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

尝试所有这些

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

正在工作的 Marshmallow Dalvik。为了让 GUI 应用程序正常工作,您将需要进行更多的移植和编码,这是我正在从事的另一个项目。

我花了半天时间才弄清楚这个问题。

参考文献

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

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

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)

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).

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.

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

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

TRY ALL OF THESE

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

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.

Took me half a day to figure this out.

References

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

南街九尾狐 2024-09-22 15:56:15

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

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

你的呼吸 2024-09-22 15:56:15

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

我想在桌面 Linux 机器上运行裸露的 Dalvik VM 只需要获取源代码并编译它即可。

GUI 的东西是另外一回事。

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

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

The GUI stuff is something else.

Oo萌小芽oO 2024-09-22 15:56:15

你并不是唯一一个有这个想法的人,这从互联网社会的角度来看是很棒的。

这可能就是您正在寻找的内容:http://www.android-x86.org/
那些人将 android 移植到了 x86。

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

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.

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

廻憶裏菂餘溫 2024-09-22 15:56:15

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

多个组织表示他们正在努力将 Dalvik 移出 Android。您最好找到他们并与他们交谈。

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

对不起!

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

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

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

Sorry!

只为守护你 2024-09-22 15:56:15

让专为 Android 设计的应用程序在 Linux 上运行将会很棘手。但是,可以在 Linux 上运行 Dalvik VM。事实上,这个 GitHub 项目 有一个预编译的 Dalvik VM 二进制文件,用于Linux,准备使用!检查相关的博客文章有关如何编译二进制文件以及如何使用它的信息。

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.

感受沵的脚步 2024-09-22 15:56:15

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

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

下面是一个简单的基础,供您从

www. android-x86.org/getsourcecode

获取 Android-x86 源代码

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

mkdir android-x86
cd android-x86

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

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

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

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

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

Below is a simpile base for you to start with

www.android-x86.org/getsourcecode

Getting Android-x86 source code

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

repo init -u git.code.sf.net/p/android-x86/manifest -b $branch
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文