mac 编译android系统,mac 编译 Android 系统杂记

挂载android分区

sudo hdiutil attach ~/android_code/android7.dmg.sparseimage -mountpoint /Volumes/android

原放入U盘:

echo '188jinghao' | sudo -S hdiutil attach ~/android7.dmg.sparseimage -mountpoint /Volumes/android

放入机械硬盘

sudo hdiutil attach /Volumes/chenjinghao/android7.dmg.sparseimage -mountpoint /Volumes/android7

sudo hdiutil attach /Volumes/chenjinghao/code/android.dmg.sparseimage -mountpoint /Volumes/android

tar -cvf android-6.0.1.tar /Volumes/android/android6_0_1/

启动模拟器

export ANDROID_PRODUCT_OUT=/Volumes/android/android6.0.1/out/target/product/generic

export ANDROID_PRODUCT_OUT_BIN=/Volumes/android/android6.0.1/out/host/linux-x86/bin

export PATH=$PATH:$ANDROID_PRODUCT_OUT_BIN:$ANDROID_PRODUCT_OUT

$cd ~/android/out/host/linux-x86/bin

$ emulator -system system.img -data userdata.img -ramdisk ramdisk.img

export ANDROID_BUILD_TOP=/Volumes/android/android6_0_1

export ANDROID_PRODUCT_OUT=/Volumes/android/android6.0.1/out/target/product/generic

export ANDROID_PRODUCT_OUT_BIN=/Volumes/android/android6.0.1/out/host/darwin-x86/bin

export PATH=$PATH:$ANDROID_PRODUCT_OUT_BIN:$ANDROID_PRODUCT_OUT:$ANDROID_BUILD_TOP

/Volumes/android/android6.0.1/out/host/linux-x86/bin/emulator

-system /Volumes/android/android6.0.1/out/target/product/generic/system.img

-data /Volumes/android/android6.0.1/out/target/product/generic/userdata.img

-ramdisk /Volumes/android/android6.0.1/out/target/product/generic/ramdisk.img

启动模拟器

export ANDROID_BUILD_TOP=/Volumes/android/android7.1.1

export ANDROID_PRODUCT_OUT=/Volumes/android/android7.1.1/out/target/product/shamu

export ANDROID_PRODUCT_OUT_BIN=/Volumes/android/android7.1.1/out/host/darwin-x86/bin

export PATH=$PATH:$ANDROID_PRODUCT_OUT_BIN:$ANDROID_PRODUCT_OUT:$ANDROID_BUILD_TOP

emulator

-system /Volumes/android/android7.1.1/out/target/product/shamu/system.img

-data /Volumes/android/android7.1.1/out/target/product/shamu/userdata.img

-ramdisk /Volumes/android/android7.1.1/out/target/product/shamu/ramdisk.img

下载源码遇到的问题一:

这个error信息忘了详细记录了,就是某个./repo/projects/.............下面报错了,把报错的文件夹删掉,repo sync

error:

………………………………………………………………………...

Traceback (most recent call last):

File "/Volumes/aosp/android-6.0.1/.repo/repo/main.py", line 531, in

_Main(sys.argv[1:])

…………………………….

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd4 in position 578: ordinal not in range(128)

解决办法:根据error的提示,删除./repo/projects/...相应下的git就行了,然后再repo sync

编译源码遇到的问题二:

build/core/combo/mac_version.mk:39: * Can not find SDK 10.12 at /Developer/SDKs/MacOSX10.6.sdk

build/core/combo/mac_version.mk:40: *****************************************************

build/core/combo/mac_version.mk:41: *** Stop.. Stop.

配置mac_sdk_versions_supported里添加10.12

编译源码遇到的问题三:

system/core/libcutils/threads.c:38:10: error: 'syscall' is deprecated: first deprecated in OS X 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]

return syscall(SYS_thread_selfid);

^

host C: libcutils <= system/core/libcutils/iosched_policy.c

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here

int syscall(int, ...);

MacOSX-SDKs下载地址:https://github.com/phracker/MacOSX-SDKs

删除10.12,下载MacOSX10.11.sdk,解压拷贝到/Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs

然后确保AOSP源码下build/core/combo/mac_version.mk文件中

mac_sdk_versions_supported := 10.9 10.10 10.11

后面不要写10.12。

编译源码遇到的问题四:

找不到com.sun.javadoc.ClassDoc

external/doclava/src/com/google/doclava/ClassInfo.java:20:

error: package com.sun.javadoc does not exist import com.sun.javadoc.ClassDoc;external/doclava/src/com/google/doclava/apicheck/XmlApiFile.java:80:

error: cannot find symbol ClassDoc classDoc = null; ^

symbol: class ClassDoc location: class XmlApiFile Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 163 errors

make: *** [out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/javalib.jar] Error 41

在bash_profile里添加

export ANDROID_JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home

nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor hdpi-v19

nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor xhdpi-v19

nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor xxhdpi-v4

nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor xxhdpi-v19

[ 99% 27238/27420] Compiling SDK Stubs...tubs_current_intermediates/classes.jar

注: 某些输入文件使用或覆盖了已过时的 API。

注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。

注: 某些输入文件使用了未经检查或不安全的操作。

注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

[ 99% 27413/27420] host Java: ahat-tes...RIES/ahat-tests_intermediates/classes)

注: art/tools/ahat/test/SortTest.java使用了未经检查或不安全的操作。

注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

[100% 27420/27420] Checking build with...sts_intermediates/jack.check.timestamp

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/456995.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Java开发必须熟悉的Linux命令总结

身为一个Java开发人员&#xff0c;这些常用的Linux命令必须掌握。即使平时开发过程中没有使用Linux&#xff08;Unix&#xff09;或者mac系统&#xff0c;也需要熟练掌握Linux命令。因为很多服务器上都是Linux系统。所以&#xff0c;要和服务器机器交互&#xff0c;就要通过she…

构析函数

析构函数&#xff1a;__del__() 释放对象时自动调用 class Person(object):def run(self):print("run")def eat(self,food):print("eat"food)def __init__(self,name,age,height,weight):self.name nameself.height heightself.age ageself.weight …

Java 序列化Serializable详解(附详细例子)

Java 序列化Serializable详解&#xff08;附详细例子&#xff09; 1、什么是序列化和反序列化Serialization&#xff08;序列化&#xff09;是一种将对象以一连串的字节描述的过程&#xff1b;反序列化deserialization是一种将这些字节重建成一个对象的过程。 2、什么情况下需要…

kettle-实现每个分组的前N的数据

2019独角兽企业重金招聘Python工程师标准>>> 第一步&#xff1a;创建表及数据&#xff1a; create table uid(uid int, --uidcate varchar(20), --类别price double --金额 ) insert into uid values(123,c1,21); insert into uid values(123,c2,23); insert into u…

重写__repr__与__str__函数

重写&#xff1a;将函数重新定义写一遍__str__():再调用print 打印对象时自动调用&#xff0c;是给用户用的是一个描述对象的方法__repr__():是给机器用的&#xff0c;在python解释器里面直接敲对象名再回车调用的方法注意&#xff1a;在没有str时&#xff0c;且有repr,str re…

linux nexus 使用问题

2019独角兽企业重金招聘Python工程师标准>>> 问题一&#xff0c;启动提示设置RUN_AS_USERroot 但是&#xff0c;设置export或 /etc/profile未生效。 **************************************** WARNING - NOT RECOMMENDED TO RUN AS ROOT *************************…

项目回顾-PopupWindow

右上菜单&#xff0c;可以通过 重写 onCreateOptionsMenu指定 menu&#xff0c; 重写 onOptionsItemSelected 来响应点击事件 不过 这个菜单在某些手机上弹出的有点卡顿&#xff0c;而且如果不对主题进行设置&#xff0c;会从actionbar 上直接弹出&#xff0c;而不是下面 如果想…

android listpreference 自定义,Android ListPreference的用法一

xmlns:android"http://schemas.android.com/apk/res/android"android:key"screen_list"android:title"标题"android:summary"说明摘要">< ListPreferenceandroid:key"myListPreference"android:title"标题"…

C语言求最大公约数和最小公倍数的几种算法

求最小公倍数算法&#xff1a; 最小公倍数两整数的乘积最大公约数 求最大公约数算法&#xff1a; (1)辗转相除法 有两整数a和b&#xff1a; ① a%b得余数c ② 若c0&#xff0c;则b即为两数的最大公约数 ③ 若c≠0&#xff0c;则ab&#xff0c;bc&#xff0c;再回去执行①…

3月15日云栖精选夜读:双管齐下,MaxCompute数据上云与生态

双管齐下&#xff0c;MaxCompute数据上云与生态 作者&#xff1a;场景研读 Go语言并发机制初探 作者&#xff1a;邴越 趣拍云短视频SDK全面升级&#xff0c;简单易用引开发者点赞 作者&#xff1a;sherry是雪梨 发表在&#xff1a;趣拍云团队 阿里云机器学习平台编程模型演…

qt android glsl,基于Qt的OpenGL学习(1)—— Hello Triangle

简介要学习OpenGL的话&#xff0c;强烈安利这个教程JoeyDeVries的learnopengl&#xff0c;这里是中文翻译好的版本。教程中使用OpenGL是通过GLFW这个库&#xff0c;而在Qt中对OpenGL封装得很好&#xff0c;并且和GUI以及IO相关的处理Qt更便捷&#xff0c;学习起来更轻松。这里就…

解决:Not Found: /favicon.ico

直接说解决办法&#xff1a; &#xff08;1&#xff09;制作一个 favicon.ico图标放在<head></head>标签中 <link rel"shortcut icon" href"xxxxxxxxxx.ico" type"image/x-icon" /> <!--制作的图标&#xff0c;使用hr…

多态方法调用的解析和分派

方法调用并不等同于方法执行&#xff0c;方法调用阶段唯一的任务就是确定被调用方法的版本&#xff08;即调用哪一个方法&#xff09;&#xff0c;暂时还不涉及方法内部的具体运行过程。在程序运行时&#xff0c;进行方法调用是最普遍、最频繁的操作&#xff0c;Class文件的编译…

ES6:Set和Map

Set Set:类似数组&#xff0c;但是成员的值都是唯一的&#xff0c;没有重复。Set本身是一个构造函数&#xff0c;用来生成Set数据结构。他包含的方法&#xff1a;add: 添加某个值&#xff0c;返回Set结构本身。delete: 删除某个值&#xff0c;返回一个布尔值&#xff0c;表示是…

九九乘法表[循环嵌套]

#九九乘法表 # 1*11 # 1*22 2*24 # 1*33 2*36 3*39 # ...#循环嵌套 #行数 i 1 while i < 9:# 打印每行的内容j 1while j < i:print("%d * %d %3d " % (i, j, i * j), end)j 1print() # 换行i 1while嵌套&#xff1a;w 1 while w < 10: #外层循…

关于用VS写C程序运行时出现烫字以及乱码的问题的原因

最近在复习C语言写程序时&#xff0c;突然碰到标题上的这种情况&#xff0c;后来经过上网查找以及逐步调试才发现原来是在打印数组的时候“越界”导致的&#xff0c;因为程序在默认初始化char类型的数组时&#xff0c;初始化的值是“烫”字&#xff0c;一般情况下是字符串未初始…

javascript函数调用的各种方法!!

在JavaScript中一共有下面4种调用方式&#xff1a; (1) 基本函数调用 (2)方法调用 (3)构造器调用 (4)通过call()和apply()进行调用 1. 基本函数调用 普通函数调用模式&#xff0c;如&#xff1a; JavaScript code?1234function fn(o){…… }fn({x:1});在基本函数调用中&#x…

ARM TK1 安装kinect驱动

首先安装usb库 $ git clone https://github.com/libusb/libusb.git 编译libusb需要的工具 $ sudo apt-get install autoconf autogen $ sudo apt-get install libtool $ sudo apt-get install libudev* 编译安装 $ sudo ./autogen.sh $ sudo make $ sudo make install $ sudo l…

如何在一个html页面中提交两个post,如何在同一个页面上从Django和Ajax获得多个post请求?...

我一整天都在为这事犯愁。似乎什么都没用。这是我的情况。在我有一个Django表单&#xff0c;有两个字段&#xff1a;redirect_from&#xff0c;redirect_to。此表单有两个提交按钮&#xff1a;Validate和{}。当页面加载时&#xff0c;Submit被隐藏&#xff0c;只显示Validate。…

大数据入门:各种大数据技术的介绍

大数据我们都知道hadoop&#xff0c;可是还会各种各样的技术进入我们的视野&#xff1a;Spark&#xff0c;Storm&#xff0c;impala&#xff0c;让我们都反映不过来。为了能够更好的架构大数据项目&#xff0c;这里整理一下&#xff0c;供技术人员&#xff0c;项目经理&#xf…