当前位置: 首页 > news >正文

[Android] ubuntu虚拟机上搭建 Waydroid 环境

1.安装虚拟机




2.安装waydroid

Ubuntu/Debian and derivatives

For Droidian and Ubuntu Touch, skip directly to the last step

  • Install pre-requisites

sudo apt install curl ca-certificates -y
  • Add the official repository

curl https://repo.waydro.id | sudo bash

If the script fails to detect your distribution, you can provide a valid option by appending -s <DISTRO>. Currently supported values are: focal, jammy, kinetic, lunar, mantic, bookworm, bullseye, sid

  • Install waydroid

sudo apt install waydroid -y

Then start Waydroid from the applications menu.

 至此,waydroid已经安装完毕,如何使用见:Install Instructions - Waydroidicon-default.png?t=N7T8https://docs.waydro.id/usage/




3.下载waydoird 对应的 lineage 源码&&编译 lineage 源码

Getting started

To get started with Android/LineageOS, you'll need to get familiar with Repo and its Git workflow.

Initializing

To initialize your local repository using the LineageOS trees, use a command like this:

repo init -u https://github.com/LineageOS/android.git -b lineage-18.1 --git-lfs

repo sync build/make

Then we grab the Waydroid local_manifests

wget -O - https://raw.githubusercontent.com/waydroid/android_vendor_waydroid/lineage-18.1/manifest_scripts/generate-manifest.sh | bash

Syncing

Then to sync up:

repo sync

Then we setup the local build environment:

. build/envsetup.sh

Patching

After that is complete, we apply the Waydroid patches:

apply-waydroid-patches

How to build

Please see the LineageOS Wiki for building environment setup.

Waydroid AOSP Lunch Options:

lineage_waydroid_arm-userdebug

lineage_waydroid_arm64-userdebug

lineage_waydroid_x86-userdebug

lineage_waydroid_x86_64-userdebug

Waydroid Build Commands:

. build/envsetup.sh

lunch lineage_waydroid_arm64-userdebug

make systemimage -j$(nproc --all)

make vendorimage -j$(nproc --all)

Image Generation From Sparse Image:

The default output of the AOSP build system is an "Android Sparse Image". We need raw fileystems instead. From the same terminal where you just built a system and a vendor image, run:

simg2img $OUT/system.img ~/system.img

simg2img $OUT/vendor.img ~/vendor.img

to obtain your target raw images at ~/system.img and ~/vendor.img

Troubleshooting

Local Manifest:

To manually regenerate the local_manifests, we also have added a function to do so

waydroid-generate-manifest

After doing that you will want to resync (this will wipe out any local changes, so make sure you save your work to a different branch)

参考:

Compile Waydroid - Lineage OS based images - Waydroidicon-default.png?t=N7T8https://docs.waydro.id/development/compile-waydroid-lineage-os-based-images#how-to-build




 4.替换自己编译的 lineage 镜像,替换原有 waydroid 默认android 镜像

In order to get custom images to work on Waydroid, there are just a couple extra steps needed.

First, download the images (e.g. x86_64 gapps system and mainline vendor) manually from sourceforge or use your custom built system.img and vendor.img produced from following the Compile Instructions.

Then copy/move them to the following folder:

/etc/waydroid-extra/images/

/usr/share/waydroid-extra/images/ used to be the previously preferred path before waydroid --version 1.3.3 (it still is perfectly valid however right now as well).

An example of setting up from downloaded sourceforce zips (assuming terminal open in the directory where they were downloaded):

sudo mkdir -p /etc/waydroid-extra/images

sudo unzip lineage-*-system.zip -d /etc/waydroid-extra/images

sudo unzip lineage-*-vendor.zip -d /etc/waydroid-extra/images

rm lineage-*-system.zip lineage-*-vendor.zip

Then we need to re-init Waydroid in order for it to use the custom images:

sudo waydroid init -f

参考:Using custom Waydroid images - Waydroidicon-default.png?t=N7T8https://docs.waydro.id/faq/using-custom-waydroid-images

相关文章:

[Android] ubuntu虚拟机上搭建 Waydroid 环境

1.安装虚拟机 略 2.安装waydroid Ubuntu/Debian and derivatives For Droidian and Ubuntu Touch, skip directly to the last step Install pre-requisites sudo apt install curl ca-certificates -y Add the official repository curl https://repo.waydro.id | sudo…...

LeedCode刷题---滑动窗口问题(二)

顾得泉&#xff1a;个人主页 个人专栏&#xff1a;《Linux操作系统》 《C/C》 《LeedCode刷题》 键盘敲烂&#xff0c;年薪百万&#xff01; 一、将X减到0的最小操作数 题目链接&#xff1a;将 x 减到 0 的最小操作数 题目描述 给你一个整数数组 nums 和一个整数 x 。每一…...

pycharm依赖管理(不要用pip freeze)

在使用python虚拟环境时&#xff0c;可以使用requirements.txt来管理当前项目的依赖。 注意&#xff0c;不要用 pip freeze > requirements.txt 这个命令&#xff0c;因为它会引入很多无关的包。 可以使用 pipreqs ./ --encodingutf-8 ./ 表示当前项目的目录&#xff0…...

[Kafka 常见面试题]如何保证消息的不重复不丢失

文章目录 Kafka1. Kafka如何保证不丢失消息&#xff1f;生产者数据的不丢失消费者数据的不丢失Kafka集群中的broker的数据不丢失 2. Kafka中的消息是否会丢失和重复消费&#xff1f;1. 消息发送2. 消息消费 3. Kafka 的设计是什么样的呢&#xff1f;4. 数据传输的事务定义有哪三…...

Java中System.setProperty()用法

Java中System.setProperty()用法 大家好&#xff0c;我是免费搭建查券返利机器人赚佣金就用微赚淘客系统3.0的小编&#xff0c;也是冬天不穿秋裤&#xff0c;天冷也要风度的程序猿&#xff01;今天&#xff0c;让我们一起深入了解Java中的System.setProperty()方法&#xff0c…...

Eclipse 自动生成注解,如果是IDEA可以参考编译器自带模版进行修改

IDEA添加自动注解 左上角选择 File -> Settings -> Editor -> File and Code Templates&#xff1b; 1、添加class文件自动注解&#xff1a; ​/*** <b>Function: </b> todo* program: ${NAME}* Package: ${PACKAGE_NAME}* author: Jerry* date: ${YEA…...

微信小程序vant安装使用过程中遇到无法构建npm的问题

官网地址&#xff0c;然而如果完全按照这个教程来&#xff0c;实际上是缺少步骤的&#xff0c;需要补充一些步骤&#xff08;参考https://www.bilibili.com/video/BV1vL41127Er&#xff09; # 这步init就是补充的 npm init npm i vant/weapp -S --production# 剩下的按照vant的…...

[python]用python获取EXCEL文件内容并保存到DBC

目录 关键词平台说明背景所需库实现过程方法1.1.安装相关库2.代码实现 关键词 python、excel、DBC、openpyxl 平台说明 项目Valuepython版本3.6 背景 在搭建自动化测试平台的时候经常会提取DBC文件中的信息并保存为excel或者其他文件格式&#xff0c;用于自动化测试。本文…...

Spring Boot 如何配置 log4j2

Log4j2 介绍 Spring Boot 中默认使用 Logback 作为日志框架&#xff0c;接下来我们将学习如何在 Spring Boot 中集成与配置 Log4j2。在配置之前&#xff0c;我们需要知道的是 Log4j2 是 Log4j 的升级版&#xff0c;它在 Log4j 的基础上做了诸多改进&#xff1a; 异步日志&…...

如何安装docker

安装Docker的步骤取决于您使用的操作系统。以下是常见操作系统上安装Docker的基本步骤&#xff1a; 对于Linux: 更新软件包索引&#xff1a; sudo apt-get update安装允许apt通过HTTPS使用仓库的包&#xff1a; sudo apt-get install apt-transport-https ca-certificates cur…...

Linux 之 性能优化

uptime $ uptime -p up 1 week, 1 day, 21 hours, 27 minutes$ uptime12:04:11 up 8 days, 21:27, 1 user, load average: 0.54, 0.32, 0.23“12:04:11” 表示当前时间“up 8 days, 21:27,” 表示运行了多长时间“load average: 0.54, 0.32, 0.23”“1 user” 表示 正在登录…...

用Go汇编实现一个快速排序算法

本代码全网首发&#xff0c;使用Go plan9 windows arm64汇编&#xff0c;实现基础版快速排序算法。 未引入随机因子的快速排序的普通Go代码长这样。 func QuickSort(arr []int) {if len(arr) < 1 {return}base, l, r : arr[0], 0, len(arr)-1for i : 1; i < r; {if arr…...

Spring-整合MyBatis

依赖 <dependencies><!--提供数据源--><dependency><groupId>org.springframework</groupId><artifactId>spring-jdbc</artifactId><version>5.1.9.RELEASE</version></dependency><!--提供sqlSessionFactory…...

sql宽字节注入

magic_quotes_gpc&#xff08;魔术引号开关&#xff09; https://www.cnblogs.com/timelesszhuang/p/3726736.html magic_quotes_gpc函数在php中的作用是判断解析用户提交的数据&#xff0c;如包括有&#xff1a;post、get、cookie过来的数据增加转义字符“\”&#xff0c;以…...

开源 LLM 微调训练指南:如何打造属于自己的 LLM 模型

一、介绍 今天我们来聊一聊关于LLM的微调训练&#xff0c;LLM应该算是目前当之无愧的最有影响力的AI技术。尽管它只是一个语言模型&#xff0c;但它具备理解和生成人类语言的能力&#xff0c;非常厉害&#xff01;它可以革新各个行业&#xff0c;包括自然语言处理、机器翻译、…...

Android hilt使用

一&#xff0c;添加依赖库 添加依赖库app build.gradle.kts implementation("com.google.dagger:hilt-android:2.49")annotationProcessor("com.google.dagger:hilt-android:2.49")annotationProcessor("com.google.dagger:hilt-compiler:2.49"…...

2023/12/17 初始化

普通变量&#xff08;int,float,double变量&#xff09;初始化&#xff1a; int a0; float b(0); double c0; 数组初始化&#xff1a; int arr[10]{0}; 指针初始化&#xff1a; 空指针 int *pnullptr; 被一个同类型的变量的地址初始化&#xff08;赋值&#xff09; int…...

【算法Hot100系列】三数之和

&#x1f49d;&#x1f49d;&#x1f49d;欢迎来到我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…...

CSS 简介

什么是 CSS? CSS 是层叠样式表(Cascading Style Sheets)的缩写,是一种用来为结构化文档(如 HTML 文档或 XML 应用)添加样式(字体、间距和颜色等)的计算机语言。 CSS 的主要作用是: 控制网页的样式,如字体、颜色、背景、布局等提高网页的开发效率CSS 的语法 CSS 的…...

myBatis-plus自动填充插件

在 MyBatis-Plus 3.x 中&#xff0c;自动填充的插件方式发生了变化。现在推荐使用 MetaObjectHandler 接口的实现类来定义字段的填充逻辑。以下是使用 MyBatis-Plus 3.x 自动填充的基本步骤&#xff1a; 1.基本配置 1.1添加 Maven 依赖&#xff1a; 确保你的 Maven 依赖中使…...

【项目实战】通过多模态+LangGraph实现PPT生成助手

PPT自动生成系统 基于LangGraph的PPT自动生成系统&#xff0c;可以将Markdown文档自动转换为PPT演示文稿。 功能特点 Markdown解析&#xff1a;自动解析Markdown文档结构PPT模板分析&#xff1a;分析PPT模板的布局和风格智能布局决策&#xff1a;匹配内容与合适的PPT布局自动…...

NLP学习路线图(二十三):长短期记忆网络(LSTM)

在自然语言处理(NLP)领域,我们时刻面临着处理序列数据的核心挑战。无论是理解句子的结构、分析文本的情感,还是实现语言的翻译,都需要模型能够捕捉词语之间依时序产生的复杂依赖关系。传统的神经网络结构在处理这种序列依赖时显得力不从心,而循环神经网络(RNN) 曾被视为…...

全面解析各类VPN技术:GRE、IPsec、L2TP、SSL与MPLS VPN对比

目录 引言 VPN技术概述 GRE VPN 3.1 GRE封装结构 3.2 GRE的应用场景 GRE over IPsec 4.1 GRE over IPsec封装结构 4.2 为什么使用GRE over IPsec&#xff1f; IPsec VPN 5.1 IPsec传输模式&#xff08;Transport Mode&#xff09; 5.2 IPsec隧道模式&#xff08;Tunne…...

3-11单元格区域边界定位(End属性)学习笔记

返回一个Range 对象&#xff0c;只读。该对象代表包含源区域的区域上端下端左端右端的最后一个单元格。等同于按键 End 向上键(End(xlUp))、End向下键(End(xlDown))、End向左键(End(xlToLeft)End向右键(End(xlToRight)) 注意&#xff1a;它移动的位置必须是相连的有内容的单元格…...

莫兰迪高级灰总结计划简约商务通用PPT模版

莫兰迪高级灰总结计划简约商务通用PPT模版&#xff0c;莫兰迪调色板清新简约工作汇报PPT模版&#xff0c;莫兰迪时尚风极简设计PPT模版&#xff0c;大学生毕业论文答辩PPT模版&#xff0c;莫兰迪配色总结计划简约商务通用PPT模版&#xff0c;莫兰迪商务汇报PPT模版&#xff0c;…...

手机平板能效生态设计指令EU 2023/1670标准解读

手机平板能效生态设计指令EU 2023/1670标准解读 以下是针对欧盟《手机和平板电脑生态设计法规》(EU) 2023/1670 的核心解读&#xff0c;综合法规核心要求、最新修正及企业合规要点&#xff1a; 一、法规背景与目标 生效与强制时间 发布于2023年8月31日&#xff08;OJ公报&…...

《Docker》架构

文章目录 架构模式单机架构应用数据分离架构应用服务器集群架构读写分离/主从分离架构冷热分离架构垂直分库架构微服务架构容器编排架构什么是容器&#xff0c;docker&#xff0c;镜像&#xff0c;k8s 架构模式 单机架构 单机架构其实就是应用服务器和单机服务器都部署在同一…...

【无标题】湖北理元理律师事务所:债务优化中的生活保障与法律平衡之道

文/法律实务观察组 在债务重组领域&#xff0c;专业机构的核心价值不仅在于减轻债务数字&#xff0c;更在于帮助债务人在履行义务的同时维持基本生活尊严。湖北理元理律师事务所的服务实践表明&#xff0c;合法债务优化需同步实现三重平衡&#xff1a; 法律刚性&#xff08;债…...

【Kafka】Kafka从入门到实战:构建高吞吐量分布式消息系统

Kafka从入门到实战:构建高吞吐量分布式消息系统 一、Kafka概述 Apache Kafka是一个分布式流处理平台,最初由LinkedIn开发,后成为Apache顶级项目。它被设计用于高吞吐量、低延迟的消息处理,能够处理来自多个生产者的海量数据,并将这些数据实时传递给消费者。 Kafka核心特…...

前端开发者常用网站

Can I use网站&#xff1a;一个查询网页技术兼容性的网站 一个查询网页技术兼容性的网站Can I use&#xff1a;Can I use... Support tables for HTML5, CSS3, etc (查询浏览器对HTML5的支持情况) 权威网站&#xff1a;MDN JavaScript权威网站&#xff1a;JavaScript | MDN...