虚拟机搭建Android源码环境(一)

我这里用的虚拟机安装的ubuntu,下载android源码,配合OpenGrok查看源码。

虚拟机:VMware15.5.0

ubuntu:ubuntu-18.04.4-desktop-amd64

OpenGrok :opengrok-0.12.1.6

Tomcat:apache-tomcat-8.5.51

一、虚拟机中安装ubuntu

二、用MobaXterm 登录ubuntu(可选)

三、下载Android源码

四、配置OpenGrok

 

一、首先在虚拟机中安装ubuntu

二、用MobaXterm 登录ubuntu(可选)

1、如果不设置固定IP,虚拟机每次重启都会生成新的ip,所以用MobaXterm登录ubuntu前,所以先设置好ubuntu的固定ip。当然也可继续在虚拟机里工作,也可以用其他工具登录ubuntu,配置方法相同。

①点击编辑按钮->虚拟机网络编辑器,选择NAT模式,因为设置固定ip,故取消动态DHCP设置

②点击NAT设置,查看网关,我这里是192.168.188.2

③从设置-->Network,或右上角进去Wired Setting,设置固定ip

④选择IPv4,选择手动设置,设置在②中查看到的网关,设置在这个网关中的固定ip后,点击apply

⑤设置好后,在终端中输入:ifconfig,即可查看自己设置的ip

如果提升command not found,调用命令安装即可

sudo apt install net-tools

⑥保证本地和ubuntu两边的ip,能互ping通

 

2、关闭防火墙,配置SSH

①在ubuntu中输入:sudo ufw status

查看当前防火墙状态,inactive状态是防火墙关闭状态 active是开启状态。

②如果开启,输入命令关闭:sudo ufw disable

③在虚拟机中的ubuntu 输入:    ssh localhost

若出现  ssh: connect to hostlocalhost port 22: Connection refused 

则表示没呀安装ssh,命令:

sudo apt-get install openssh-server

④启动SSH,命令:service ssh start 

⑤打开MobaXterm,点击Session,选择SSH,输入之前设置的固定IP,输入用户名,点击OK,进去后输入ubuntu密码即可

如果你是第一次,会让你输入主密码,来保护所有存储的密码,主密码用于加密其他存储的密码

登录成功后界面类似如图

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android虚拟机Dalvik完整源码,宝贵资源,欢迎下载! This directory contains the Dalvik virtual machine and core class library, as well as related tools, libraries, and tests. A note about the licenses and header comments --------------------------------------------- Much of the code under this directory originally came from the Apache Harmony project, and as such contains the standard Apache header comment. Some of the code was written originally for the Android project, and as such contains the standard Android header comment. Some files contain code from both projects. In these cases, the header comment is a combination of the other two, and the portions of the code from Harmony are identified as indicated in the comment. Here is the combined header comment: /* * Copyright (C) The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ---------- * * Portions of the code surrounded by "// BEGIN Harmony code" and * "// END Harmony code" are copyrighted and licensed separately, as * follows: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Native SH call bridge --------------------- Native SH call bridge is written by Shin-ichiro KAWASAKI and Contributed to Android by Hitachi, Ltd. and Renesas Solutions Corp.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值