注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

讀萬卷書,行萬里路

开心快乐的方式有很多种,寻找自己的快乐方式

 
 
 

日志

 
 

Full steps for build Android ROM 编译流程(原创)  

2011-08-23 14:51:33|  分类: 我的安卓 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Android 编译流程:
 my favorate text editor: joe
 #rpm -ivh ftp://rpmfind.net/linux/fedora/releases/15/Everything/i386/os/Packages/joe-3.7-7.fc15.i686.rpm
0. Create Directories
    $mkdir -p ~/bin
    $mkdir -p ~/android/system

1. Make sure you have installed the Java Development Kit (JDK)
1.1 Install JDK via install disk(.iso)
1.2 Online install via rpm -ivh ftp://rpmfind.net/linux/fedora/development/rawhide/i386/os/Packages/java-1.6.0-openjdk-1.6.0.0-59.1.10.3.fc16.i686.rpm

2. Make sure you have install the Android SDK, if not, download and install it (Android SDK)
2.1 Download  http://dl.google.com/android/android-sdk_r12-linux_x86.tgz
2.2 tar xvzf android-sdk_r12-linux_x86.tgz
2.3 mv android-sdk_r12-linux_x86 android-sdk
2.4 $cd ~/android/system/android-sdk && ./tools/android &  //open in gui
2.5 download SDK Platform-tools within gui //
2.6 make sure adb installed normaly.
2.7 Add this to $~/.bash_profile "export PATH="~/android/android-sdk/platform-tools/:${PATH}"
2.8 check adb driver, $adb devices if it shows devices id, that's ok.

3. Install the Build Packages (with root permission)
3.1 yum install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
3.2 there are some error messaqge disply after yum install, just ignore it:
g-dev sun-java6-jdk pngcrush schedtool
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Setting up Install Process
Package flex-2.5.35-8.el6.i686 already installed and latest version
Package bison-2.4.1-5.el6.i686 already installed and latest version
No package libsdl1.2-dev available.
No package libesd0-dev available.
No package libwxgtk2.6-dev available.
No package build-essential available.
Package zip-3.0-1.el6.i686 already installed and latest version
Package curl-7.19.7-16.el6.i686 already installed and latest version
No package libncurses5-dev available.
No package zlib1g-dev available.
No package sun-java6-jdk available.
No package pngcrush available.
No package schedtool available.
Resolving Dependencies
--> Running transaction check
---> Package gperf.i686 0:3.0.3-9.1.el6 set to be updated
---> Package squashfs-tools.i686 0:4.0-3.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

3.3 # rpm -ivh ftp://fr2.rpmfind.net/linux/fedora/releases/15/Everything/i386/os/Packages/schedtool-1.3.0-4.fc15.i686.rpm

4. Install the Repository
   $curl http://android.git.kernel.org/repo > ~/bin/repo
   $chmod a+x ~/bin/repo
   $cd ~/android/system/
   $repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
   {this step will require you to enter your name and email address, just do it}
   $repo sync -j16
   {this step will take about 4~10hrs depend on your bandwidth and computer device}

5. Copy proprietary files(on run it first time)
5.1 connect mobile device to linux pc.
    (make sure replace following $DEVICE with your owns)
    $cd ~/android/system/device/motorola/$DEVICE/
    $./extract-files.sh
5.2 extract file from stock rom (optional)
5.2.1  $mkdir -p ~/android/system/vendor/motorola/$DEVICE/proprietary
5.2.2 copy file list into ...$DEVICE/proprietary
5.2.3 special for morrison device : find a stock morrison rom and extrack "libloc_api.so" here
5.3 all file should list here:
-rw-r--r-- 1 hzkindy hzkindy  124212 Aug 23 15:02 akmd2
-rw-r--r-- 1 hzkindy hzkindy    1161 Aug 23 15:02 akmd_set.cfg
-rw-r--r-- 1 hzkindy hzkindy    4216 Aug 23 15:02 AudioFilter.csv
-rw-r--r-- 1 hzkindy hzkindy   44167 Aug 23 15:02 AudioPara4.csv
-rw-r--r-- 1 hzkindy hzkindy     245 Aug 23 15:02 AVRCP.kl
-rw-r--r-- 1 hzkindy hzkindy   11476 Aug 23 15:02 BCM4325D1_004.002.004.0218.0225.hcd
-rw-r--r-- 1 hzkindy hzkindy   10036 Aug 23 15:02 bt_downloader
-rw-r--r-- 1 hzkindy hzkindy   13784 Aug 23 15:02 bthelp
-rw-r--r-- 1 hzkindy hzkindy   22268 Aug 23 15:02 bt_init
-rw-r--r-- 1 hzkindy hzkindy     672 Aug 23 15:02 bt_init.config
-rw-r--r-- 1 hzkindy hzkindy  121260 Aug 23 15:02 charge_only_mode
-rw-r--r-- 1 hzkindy hzkindy    9804 Aug 23 15:02 fuel_gauge
-rw-r--r-- 1 hzkindy hzkindy    9240 Aug 23 15:02 libaudioeq.so
-rw-r--r-- 1 hzkindy hzkindy  173168 Aug 23 15:02 libcm.so
-rw-r--r-- 1 hzkindy hzkindy   25680 Aug 23 15:02 libdsm.so
-rw-r--r-- 1 hzkindy hzkindy   63988 Aug 23 15:02 libdss.so
-rw-r--r-- 1 hzkindy hzkindy  533456 Aug 23 15:02 libGLES_qcom.so
-rw-r--r-- 1 hzkindy hzkindy   54364 Aug 23 15:02 libgsdi_exp.so
-rw-r--r-- 1 hzkindy hzkindy   46184 Aug 23 15:02 libgstk_exp.so
-rw-r--r-- 1 hzkindy hzkindy    5204 Aug 23 15:02 libhpprop.so
-rwxr--r-- 1 hzkindy hzkindy   47272 Aug 23 15:02 libloc_api.so
-rw-r--r-- 1 hzkindy hzkindy   21904 Aug 23 15:02 libloc_api_unknown.so
-rw-r--r-- 1 hzkindy hzkindy    5272 Aug 23 15:02 libmm-adspsvc.so
-rw-r--r-- 1 hzkindy hzkindy    9488 Aug 23 15:02 libmmcamera.so
-rw-r--r-- 1 hzkindy hzkindy   66664 Aug 23 15:02 libmmgsdilib.so
-rw-r--r-- 1 hzkindy hzkindy   79940 Aug 23 15:02 libmmjpeg.so
-rw-r--r-- 1 hzkindy hzkindy 1126888 Aug 23 15:02 libmm-qcamera-tgt.so
-rw-r--r-- 1 hzkindy hzkindy   54384 Aug 23 15:02 libnv.so
-rw-r--r-- 1 hzkindy hzkindy  155540 Aug 23 15:02 libOmxH264Dec.so
-rw-r--r-- 1 hzkindy hzkindy   26108 Aug 23 15:02 libOmxMp3Dec.so
-rw-r--r-- 1 hzkindy hzkindy  156756 Aug 23 15:02 libOmxMpeg4Dec.so
-rw-r--r-- 1 hzkindy hzkindy  144948 Aug 23 15:02 libOmxVidEnc.so
-rw-r--r-- 1 hzkindy hzkindy   92844 Aug 23 15:02 liboncrpc.so
-rw-r--r-- 1 hzkindy hzkindy   33944 Aug 23 15:02 libqmi.so
-rw-r--r-- 1 hzkindy hzkindy    5016 Aug 23 15:02 libqueue.so
-rw-r--r-- 1 hzkindy hzkindy  437260 Aug 23 15:02 libril-moto-umts-1.so
-rw-r--r-- 1 hzkindy hzkindy  744620 Aug 23 15:02 libril-qc-1.so
-rw-r--r-- 1 hzkindy hzkindy   29796 Aug 23 15:02 libsnd.so
-rw-r--r-- 1 hzkindy hzkindy  137644 Aug 23 15:02 libspeech.so
-rw-r--r-- 1 hzkindy hzkindy  473467 Aug 23 15:02 libvideotrimer.so
-rw-r--r-- 1 hzkindy hzkindy   66652 Aug 23 15:02 libwms.so
-rw-r--r-- 1 hzkindy hzkindy   25572 Aug 23 15:02 libwmsts.so
-rw-r--r-- 1 hzkindy hzkindy     546 Aug 23 15:02 nvram.txt
-rw-r--r-- 1 hzkindy hzkindy    9800 Aug 23 15:02 qmuxd
-rw-r--r-- 1 hzkindy hzkindy     896 Aug 23 15:02 qwerty2.kcm.bin
-rw-r--r-- 1 hzkindy hzkindy     896 Aug 23 15:02 qwerty.kcm.bin
-rw-r--r-- 1 hzkindy hzkindy    1834 Aug 23 15:02 qwerty.kl
-rw-r--r-- 1 hzkindy hzkindy  246376 Aug 23 15:02 sdio-g-cdc-reclaim-wme.bin
-rw-r--r-- 1 hzkindy hzkindy  379356 Aug 23 15:02 tcmd_engine
-rw-r--r-- 1 hzkindy hzkindy    5592 Aug 23 15:02 tcmd_sql
-rw-r--r-- 1 hzkindy hzkindy   22112 Aug 23 15:02 touchpad


6. Download RomManager
     $~/android/system/vendor/cyanogen/get-rommanager

7. personalize mod:
7.1 replace default wallpaper(There are 2 default_wallpaper.jpg should be replaced, don't know reason):
    $cd ~/android/system/vendor/cyanogen/overlay/common/frameworks/base/core/res/res/drawable/
    $cp [my_default_wallpaper.jpg]
~/android/system/vendor/cyanogen/overlay/common/frameworks/base/core/res/res/drawable/default_wallpaper.jpg
    $cp [my_default_wallpaper.jpg]  ~/android/system/frameworks/base/core/res/res/drawable-mdpi/
default_wallpaper.jpg
    (if want to keep original default wallpaper, it must be rename with .jpg extension in same folder)
7.2 replace default battery status icon
    $cd ~/android/system/frameworks/base/core/res/res/drawable-mdpi
    $cp my_own_batter_png_files/stat_sys_battery_*.png ./
7.3. modify ~/android/system/frameworks/base/core/res/res/values/public.xml
     add "<public type="drawable" name="stat_sys_battery_1" id=  "0x0108009e" />" make sure the id number is unique.
7.4  modofy ~/android/system/frameworks/base/core/res/res/drawable/stat_sys_battery.xml go here(http://ttyjm.blog.163.com/blog/static/864525201172161234861/)

8.  modify link (since arm-eabi-4.4.3 version problem, it should be replace with arm-eabi-4.4.0)
    $cd ~/android/system/prebuilt/linux-x86/toolchain/
    $mv arm-eabi-4.4.3 arm-eabi-4.4.3.old
    $ln -s arm-eabi-4.4.0 arm-eabi-4.4.3

9.Begin to Building CyanogenMod ROM(just repeat flollowing steps further more)

8.1 if necessary, check updates
    $cd ~/android/system/
    $repo sync
8.2 go build(take special care following do and a space before build)
    $ . build/envsetup.sh && brunch {device name}

9. Install ROM
    Copy your .zip file from ~/android/system/out/target/product/zeppelin/update.cm-XXXXX-signed.zip to the root of the SD card.

        Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.

    Flash both of these .zip files from recovery.
  评论这张
 
阅读(2095)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017