学习了这么多其他人的博客,终于编译成功了。技术小白前来分享,有不到位的希望大牛们指正。开源的意义在于分享。本文主要为遇到的错误解决

http://blog.sina.com.cn/s/blog_4ba5b45e0102ejbb.html这篇文章对我的帮助很大,感谢作者
源码是别人给的,所以直接开始编译
cm12编译
1.
对本地库的操作:
android要求的库
更新 sudo yum update
sudo yum install mesa-libGL-devel
sudo yum install libstdc++.so.6
sudo yum install gcc, yum install gcc-c++
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
由于以上是对于unbunte的安装,fedora里会显示有些包没有。所以又看了fedora官网提供的android编译环境
https://fedoraproject.org/wiki/HOWTO_Setup_Android_Development
yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686
2.
首先:下载
kernel http://www.github.com/cyanogenmod/android_kernel_samsung_smdk4412
device http://www.github.com/cyanogenmod/android_device_samsung_n7100
下载 android_device_samsung_n7100 到/cm12/device/samsung/目录
Put the kernel in kernel/samsung/smdk4412并且命名为kernel
3.
要求openjdk7,fedora21只提供openjdk8
修改build/core/main.mk
改为requires_openjdk := false
具体:
For building Android, your best bet is to just install the Oracle JDK 7. I downloaded jdk-7u80-linux-x64.tar.gz and put in /opt/oracle/java/.
Then you can just edit build/core/main.mk and force for all cases
requires_openjdk := false
Note that even if you get OpenJDK 1.7 installed on Fedora it returns 'java -version' differently than Ubuntu and you'll have to change the build/core/main.mk check for the version to look for "openjdk" instead of "java" at the beginning of the version.
Using the Oracle JDK is fine, though. It is used for all host types that are not Linux.
4.
错误
build/core/main.mk:118: You are building on a case-insensitive filesystem.
build/core/main.mk:119: Please move your source tree to a case-sensitive filesystem.
build/core/main.mk:120: ************************************************************
build/core/main.mk:121: *** Case-insensitive filesystems not supported. Stop.
solution:
Remove this from build/core/main.mk, then compile:
ifneq ($(HOST_OS),windows)
ifneq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc)
# check for a case sensitive file system
ifneq (a,$(shell mkdir -p $(OUT_DIR) ; \
echo a > $(OUT_DIR)/casecheck.txt; \
echo B > $(OUT_DIR)/CaseCheck.txt; \
cat $(OUT_DIR)/casecheck.txt))
$(warning ************************************************************)
$(warning You are building on a case-insensitive filesystem.)
$(warning Please move your source tree to a case-sensitive filesystem.)
$(warning ************************************************************)
$(error Case-insensitive filesystems not supported)
endif
endif
endif
It will disable the case-sensitivity check.
5.
ake: *** 没有规则可以创建“/home/pengfei/work/Android/cm12/out/target/product/n7100/system/bin/gpsd”需要的目标“vendor/samsung/n7100/proprietary/system/bin/gpsd”。 停止
solution:
https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-12.0
下载n7100和smdk4412-common
直接拷贝到相应的 /vendor/samsung/ 目录下
6.
错误
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/n8000/cm.mk]]: "hardware/samsung/exynos4x12.mk" does not exist。 停止。
** Don't have a product spec for: 'cm_n8000'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
solution:
解决办法:缺少samsung硬件基础库。
https://github.com/CyanogenMod/android_hardware_samsung 下载后将里面的文件替换到 hardware/samsung/下面。

7.
[root@localhost android-cm-10.2]# breakfast n8000
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/n8000/cm.mk]]: "device/samsung/n80xx-common/n80xx-common.mk" does not exist。 停止。
Device n8000 not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
^X^CTraceback (most recent call last):
File "build/tools/roomservice.py", line 76, in
result = json.loads(urllib.request.urlopen(githubreq).read().decode())
File "/usr/lib64/python2.6/socket.py", line 354, in read
data = self._sock.recv(rbufsize)
File "/usr/lib64/python2.6/httplib.py", line 542, in read
s = self.fp.read(amt)
File "/usr/lib64/python2.6/socket.py", line 383, in read
data = self._sock.recv(left)
File "/usr/lib64/python2.6/ssl.py", line 215, in recv
return self.read(buflen)
File "/usr/lib64/python2.6/ssl.py", line 136, in read
return self._sslobj.read(len)
KeyboardInterrupt
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/n8000/cm.mk]]: "device/samsung/n80xx-common/n80xx-common.mk" does not exist。 停止。
** Don't have a product spec for: 'cm_n8000'
** Do you have the right repo manifest?
由于n8000的很多驱动是基于 n80xx-common 驱动包的,所以需要预先下载 n80xx-common 驱动包,这也是为何 n8000 驱动包那么小的缘故。
从 https://github.com/CyanogenMod/android_device_samsung_n80xx-common
这里面将 n80xx-common 驱动包下载下来,放到 cm-10/device/samsung/n80xx-common 这个目录下,这个目录本身是没有的,需要新建。
chmod +x android-cm-10.2/device/samsung/n80xx-common/extract-files.sh
https://github.com/CyanogenMod/android_device_samsung_n7100/tree/cm-12.0https://github.com/CyanogenMod/android_device_samsung_smdk4412-common
下载后放到
device/samsung/
8.
一直显示这个错误
make: *** No rule to make target `out/target/product/n7000/kernel', needed by `out/target/product/n7000/boot.img'看看
或者cannot load kernel out/target/product/n7000/kernel
solution:
我觉得是因为首先是没有编好内核。
而没能编出来内核是因为我忽略了这一步./extract-files.sh,认为是给电脑编,不需要连接手机,原谅我是小白。
这个脚本的主要作用是将手机中的驱动so库pull出来。
这期间还需要手机的root,国内网站的包刷了,总fail,
这个网站的包能用,下载CF-Auto-Root和Odin 3.09
http://www.ibtimes.co.uk/root-galaxy-note-2-n7100-all-android-4-4-2-kitkat-firmware-1446111
9.
root之后进行./extract-files.sh,依然报错: adbd cannot run as root in production builds
root不彻底
http://stackoverflow.com/questions/25271878/android-adbd-cannot-run-as-root-in-production-buildshttp://forum.xda-developers.com/showthread.php?t=1687590

The problem is that, even though your phone is rooted, the 'adbd' server on the phone does not use root permissions. You can try to bypass these checks or install a different adbd on your phone or install a custom kernel/distribution that includes a patched adbd.
Or, a much easier solution is to use 'adbd insecure' from chainfire which will patch your adbd on the fly. It's not permanent, so you have to run it before starting up the adb server (or else set it to run every boot). You can get the app from the google play store for a couple bucks:
https://play.google.com/store/apps/details?id=eu.chainfire.adbd&hl=en
Or you can get it for free, the author has posted a free version on xda-developers:
http://forum.xda-developers.com/showthread.php?t=1687590
Install it to your device (copy it to the device and open the apk file with a file manager), run 'adb insecure' on the device, and finally kill the adb server on your computer:
% adb kill-server
And then restart the server and it should already be root.
这段英文讲的很详细,大概ia就算第二个网站可以免费下到adb insecure,下到以后直接复制到手机的文件夹里,以便可以直接从手机操作,点击安装起来。运行这个软件,点击两个钩:enable insecure adbd enable at boot.之后要在电脑上面adb kill-server。再重新连接adb shell su。
再进到目录/device/samsung/n7100下,./extract-files.sh。
下面看看怎么编内核
总体流程是这个样子的:
$ cd ~/cm12
$ source build/envsetup.sh
$ breakfast n7100
$ cd /device/samsung/n7100
$ ./extract-files.sh。。。。。。做这步的时候,手机要root。
回到/cm12$ croot
http://ju.outofmemory.cn/entry/226866 这篇文章非常详细并且正确
按照文中所说:进入kernel目录下面,kernel/samsung/smdk4412
make ARCH=arm cyanogenmod_n7100_defconfig
make ARCH=arm menuconfig
cp .config arch/arm/configs/cyanogenmod_n7100_defconfig
make mrproper。。。。。这步不能丢
回到根目录mka bootimage

cm12 for 三星n7100编译相关推荐

  1. 三星n7100刷机步骤

    2019独角兽企业重金招聘Python工程师标准>>> 三星n7100也就是三星galaxy note2,接下来这篇文章为大家介绍的是三星n7100升级安卓4.3的详细步骤,如果有机 ...

  2. 三星N7100 Galaxy Note2 Root权限获取详细教程

    三星N7100 Galaxy Note2如何ROOT?怎么ROOT?下面是三星N7100 Galaxy Note2详细的ROOT教程! 准备工作:一台正常的三星Galaxy note2,正常的USB数 ...

  3. 三星n7100Android5.1,三星N7100 5.1.1 ROM刷机包 个人适配 附加高级设置 稳定最终版

    1)本ROM已在本人测试通过. 2)请务必保证电池电量在60%以上并保证刷机过程中电脑不会断电. 3)刷机有风险,请仔细阅读相关的刷机教程并自行承担刷机风险,本人及论坛不对任何刷机失败承担任何责任. ...

  4. n7100 android版本,三星GT-N7100是什么型号?是什么手机?

    三星手机做为安卓机皇,目前推出了很多的手机机型,今天小编解释下三星GT-N7100,很多朋友在手机型号里面看到这个,但是不知道是什么机型代码, 三星GT-N7100型号为:三星Note2港版 该机是三 ...

  5. 三星Note2(N7100)刷机

    使用 完美刷机 对三星 Note2(N7100)进行刷机,确实是比较方便. 手机连接后(需要打开 USB 调试),在 完美刷机 的界面上会显示可用的 ROM.下载后,直接点击一键刷机就 OK 了. 我 ...

  6. android 通知 广告,解决三星/小米等Android手机通知栏推送广告的问题

    三星和小米都是使用安卓系统的手机,有时候突然在手机通知栏弹出很多的广告,而且广告是不定时的弹出,你把消息清理掉之后,过段时间还是会弹出广告. 而且下载的都是一些乱七八糟的东西,对手机没有什么用处,想完 ...

  7. android组合按键截屏,三星安卓手机截图组合键图文汇总(4种)

    三星安卓手机因其综合性价比高的优势,在智能手机市场的份额非常大.所以,很多用户对三星安卓手机的一些功能都非常熟悉,比如:三星手机也有手机截图组合键,不过,三星拥有4种的组合键,不知道大家是否都了解,这 ...

  8. android组合键截图原理,三星安卓手机怎么截图组合键 三星安卓手机截图组合键步骤...

    三星安卓手机因其综合性价比高的优势,在智能手机市场的份额非常大.所以,很多用户对三星安卓手机的一些功能都非常熟悉,比如:三星手机也有手机截图组合键,不过,三星拥有4种的组合键,不知道大家是否都了解,这 ...

  9. 三星 GALAXY Note2系列完美自动root工具

    绿豆root神器力作: 1. 三星N7100/GALAXY Note2系列 ROOT一键线刷方案,无需recovery, 2.支持华为c8813.c8812.c8813Q.u8825d等华为机型免解锁 ...

  10. 普通充电器充三星\苹果产品兼容问题

    利用普通充电器给三星平板电脑充电的改造 仔细观察一下充电器的USB接口,你会发现一共有四个窄金属条,称为四个引脚.这四个引脚分别连接5V电源.D+数据线正信号.D-数据线负信号和GND地. 标准USB ...

最新文章

  1. python元类深入理解
  2. jquery validate 详解一
  3. R语言基于forestplot包可视化森林图实战详解:美化的森林图:自定义字体设置、置信区间、坐标轴(刻度、标签、范围)、无效线去除、水平线、辅助线、box形状、色彩等
  4. 好的英文视频照片网站
  5. c# 定位内存快速增长_CTF丨Linux Pwn入门教程:针对函数重定位流程的相关测试(下)...
  6. 【Python】求多个字符串的最长公共前缀
  7. 2015 2020 r4烧录卡 区别_谁跑赢了沪深300?聪明指数全收益排名 2020-04-10
  8. 使用CodeFirst创建并更新数据库
  9. 最全的“大数据”学习资源
  10. 打印表格_Excel表格打印技巧,让你分分钟打印出完美表格!建议收藏!
  11. linux线程组和进程区别,Linux中进程和线程之间的区别
  12. Ubuntu下.tar.bz2和.tar.gz文件的解压命令
  13. js进行txt文件下载方式或oss文件访问下载跨域解决
  14. 美剧之《黑客军团第四季》(Mr robot)第12集摘要
  15. 高并发(水平扩展,垂直扩展)
  16. python3 教程 下载图片资源
  17. 利用百度地图根据三点求位置
  18. linux解除用户锁,linux禁用锁定和解除解锁用户账号的方法
  19. 复现Transformer架构主干网络过程中的心路历程和个人感悟
  20. 选择中医 - 醒脑(养生、穴位)

热门文章

  1. 【史上最全】国内外常用精品API接口汇总
  2. Golang FORM相关字段理解
  3. 使用R从Excel中删除带有空单元格的行
  4. 激活mircrosoft office2013
  5. [云原生专题-24]:K8S - Kubernetes(K8S)Master集群构建与安装过程详细解读 - 初始控制节点的安装
  6. ubuntu 打开任务管理器命令行命令
  7. cnode社区vue和react渲染
  8. LA 4670 Dominating Patterns AC自动机简单题
  9. 女神舒淇同款敏感肌,应该如何修复呢??
  10. 百度运维部农场,绿色畅想