Android Studio for Platform (ASfP) 使用教程

2023-10-12 15:21

本文主要是介绍Android Studio for Platform (ASfP) 使用教程,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文章目录

      • 编写脚本
      • 下载源代码
      • lunch 查看版本

在这里插入图片描述
归纳的很清楚,下载Repo并下载源码->可以参考我的 Framework入门のPiex 6P源码(下载/编译/刷机)

启动图标(重启生效)

[Desktop Entry]
Encoding=UTF-8
Name=AndroidStudio                                     
Comment=AndroidStudio                                  
Exec=/opt/android-studio-for-platform/bin/studio.sh
Icon=/opt/android-studio-for-platform/bin/studio.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Application;Development;

OR
/opt/android-studio-for-platform/bin/studio.sh

编写脚本

#!/usr/bin/env bashexport LOG_ACCOUNT=tmp
export LOG_FILENAME=repo-sync
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'aosp_branch=android-11.0.0_r9if [ ! -d ".repo" ]; thenrepo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b $aosp_branchrepo_stat=$?if [ $repo_stat -ne 0 ]; thenecho "init repo faild, please try again"exit 0fi
elselog -o -- "local .repo dir exists"
fitry_count=0
echo "from remote sync aosp"repo sync
repo_stat=$?
while [ $repo_stat -ne 0 ]; dolog -o -- "sync faild, status: $repo_stat, try again in 5s ..."sleep 5repo syncrepo_stat=$?((try_count++))
doneecho "sync repo over, try_count: $try_count"
echo "sync over, success"

下载源代码

在这里插入图片描述

lunch 查看版本

Lunch menu... pick a combo:1. aosp_arm-eng2. aosp_arm64-eng3. aosp_blueline-userdebug4. aosp_blueline_car-userdebug5. aosp_bonito-userdebug6. aosp_bonito_car-userdebug7. aosp_bramble-userdebug8. aosp_car_arm-userdebug9. aosp_car_arm64-userdebug10. aosp_car_x86-userdebug11. aosp_car_x86_64-userdebug12. aosp_cf_arm64_auto-userdebug13. aosp_cf_arm64_phone-userdebug14. aosp_cf_x86_64_phone-userdebug15. aosp_cf_x86_auto-userdebug16. aosp_cf_x86_phone-userdebug17. aosp_cf_x86_tv-userdebug18. aosp_coral-userdebug19. aosp_coral_car-userdebug20. aosp_crosshatch-userdebug21. aosp_crosshatch_car-userdebug22. aosp_flame-userdebug23. aosp_flame_car-userdebug24. aosp_redfin-userdebug25. aosp_sargo-userdebug26. aosp_sunfish-userdebug27. aosp_taimen-userdebug28. aosp_trout_arm64-userdebug29. aosp_trout_x86-userdebug30. aosp_walleye-userdebug31. aosp_walleye_test-userdebug32. aosp_x86-eng33. aosp_x86_64-eng34. arm_krait-eng35. arm_v7_v8-eng36. armv8-eng37. armv8_kryo385-eng38. beagle_x15-userdebug39. beagle_x15_auto-userdebug40. car_x86_64-userdebug41. db845c-userdebug42. fuchsia_arm64-eng43. fuchsia_x86_64-eng44. hikey-userdebug45. hikey64_only-userdebug46. hikey960-userdebug47. hikey960_tv-userdebug48. hikey_tv-userdebug49. pixel3_mainline-userdebug50. poplar-eng51. poplar-user52. poplar-userdebug53. qemu_trusty_arm64-userdebug54. silvermont-eng55. uml-userdebug56. yukawa-userdebug57. yukawa_sei510-userdebug

lunch product_name-build_variant
product_name作为需要构建的产品
build_variant 作为需要构建的变体

PS:安卓官网这步给出的 lunch aosp_arm-eng在实际编译完成后是无法正常运行的,这个是很大的,很多人都是在这一步卡住了很久
真正能在模拟器上运行的是 lunch sdk_phone_x86_64
在这里插入图片描述
在这里插入图片描述
开始编译

Syncing targets: [frameworks, packages/apps/Settings]Preparing for sync...
Updating MAX_ARG_STRLEN to 131072Generating Soong artifacts...
/bin/bash -c "source build/envsetup.sh && lunch sdk_phone_x86_64 && echo ANDROID_PRODUCT_OUT=$ANDROID_PRODUCT_OUT && refreshmod"Refreshing modules (building module-info.json). Log at /data/android-11.0.0_r9/out/target/product/generic_x86_64/module-info.json.build.log.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=sdk_phone_x86_64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=x86_64
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=x86_64
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-86-generic-x86_64-Ubuntu-20.04.4-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RD1A.200810.020.A1
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl hardware/google/camera hardware/google/camera/devices/EmulatedCamera device/generic/goldfish device/generic/goldfish-opengl
============================================
ANDROID_PRODUCT_OUT=/data/android-11.0.0_r9/out/target/product/generic_x86_64

编译成功
在这里插入图片描述
IDE占用内存高达8G
在这里插入图片描述

虚拟机设置
在这里插入图片描述
在这里插入图片描述

https://developer.android.com/studio/platform?hl=zh-cn
https://adtxl.com/index.php/archives/85.html
https://blog.csdn.net/u011897062/article/details/133065217

这篇关于Android Studio for Platform (ASfP) 使用教程的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/196729

相关文章

Spring Security 从入门到进阶系列教程

Spring Security 入门系列 《保护 Web 应用的安全》 《Spring-Security-入门(一):登录与退出》 《Spring-Security-入门(二):基于数据库验证》 《Spring-Security-入门(三):密码加密》 《Spring-Security-入门(四):自定义-Filter》 《Spring-Security-入门(五):在 Sprin

中文分词jieba库的使用与实景应用(一)

知识星球:https://articles.zsxq.com/id_fxvgc803qmr2.html 目录 一.定义: 精确模式(默认模式): 全模式: 搜索引擎模式: paddle 模式(基于深度学习的分词模式): 二 自定义词典 三.文本解析   调整词出现的频率 四. 关键词提取 A. 基于TF-IDF算法的关键词提取 B. 基于TextRank算法的关键词提取

使用SecondaryNameNode恢复NameNode的数据

1)需求: NameNode进程挂了并且存储的数据也丢失了,如何恢复NameNode 此种方式恢复的数据可能存在小部分数据的丢失。 2)故障模拟 (1)kill -9 NameNode进程 [lytfly@hadoop102 current]$ kill -9 19886 (2)删除NameNode存储的数据(/opt/module/hadoop-3.1.4/data/tmp/dfs/na

Hadoop数据压缩使用介绍

一、压缩原则 (1)运算密集型的Job,少用压缩 (2)IO密集型的Job,多用压缩 二、压缩算法比较 三、压缩位置选择 四、压缩参数配置 1)为了支持多种压缩/解压缩算法,Hadoop引入了编码/解码器 2)要在Hadoop中启用压缩,可以配置如下参数

Makefile简明使用教程

文章目录 规则makefile文件的基本语法:加在命令前的特殊符号:.PHONY伪目标: Makefilev1 直观写法v2 加上中间过程v3 伪目标v4 变量 make 选项-f-n-C Make 是一种流行的构建工具,常用于将源代码转换成可执行文件或者其他形式的输出文件(如库文件、文档等)。Make 可以自动化地执行编译、链接等一系列操作。 规则 makefile文件

使用opencv优化图片(画面变清晰)

文章目录 需求影响照片清晰度的因素 实现降噪测试代码 锐化空间锐化Unsharp Masking频率域锐化对比测试 对比度增强常用算法对比测试 需求 对图像进行优化,使其看起来更清晰,同时保持尺寸不变,通常涉及到图像处理技术如锐化、降噪、对比度增强等 影响照片清晰度的因素 影响照片清晰度的因素有很多,主要可以从以下几个方面来分析 1. 拍摄设备 相机传感器:相机传

Android实现任意版本设置默认的锁屏壁纸和桌面壁纸(两张壁纸可不一致)

客户有些需求需要设置默认壁纸和锁屏壁纸  在默认情况下 这两个壁纸是相同的  如果需要默认的锁屏壁纸和桌面壁纸不一样 需要额外修改 Android13实现 替换默认桌面壁纸: 将图片文件替换frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.*  (注意不能是bmp格式) 替换默认锁屏壁纸: 将图片资源放入vendo

pdfmake生成pdf的使用

实际项目中有时会有根据填写的表单数据或者其他格式的数据,将数据自动填充到pdf文件中根据固定模板生成pdf文件的需求 文章目录 利用pdfmake生成pdf文件1.下载安装pdfmake第三方包2.封装生成pdf文件的共用配置3.生成pdf文件的文件模板内容4.调用方法生成pdf 利用pdfmake生成pdf文件 1.下载安装pdfmake第三方包 npm i pdfma

零基础学习Redis(10) -- zset类型命令使用

zset是有序集合,内部除了存储元素外,还会存储一个score,存储在zset中的元素会按照score的大小升序排列,不同元素的score可以重复,score相同的元素会按照元素的字典序排列。 1. zset常用命令 1.1 zadd  zadd key [NX | XX] [GT | LT]   [CH] [INCR] score member [score member ...]

Android平台播放RTSP流的几种方案探究(VLC VS ExoPlayer VS SmartPlayer)

技术背景 好多开发者需要遴选Android平台RTSP直播播放器的时候,不知道如何选的好,本文针对常用的方案,做个大概的说明: 1. 使用VLC for Android VLC Media Player(VLC多媒体播放器),最初命名为VideoLAN客户端,是VideoLAN品牌产品,是VideoLAN计划的多媒体播放器。它支持众多音频与视频解码器及文件格式,并支持DVD影音光盘,VCD影