First of, I should say I am not an expert at this, I started from scratch without knowing anything at all about custom roms or how android buildsystem work, and that was just a few weeks ago. I hope to share some of the things I have learned, but I also hope I will get some feedback and update to correct things I have done wrong or things that could be improved. Let's start. This post will be updated with time. As of now this guide won't get all hardware working (camera,proximitysensor, problem with audio over bluetooth,automatic brightness control, and non functional leds)
[1]
To build android you need Linux or Mac (Windows is not supported). I would recommend using Ubuntu linux 32 bit it probably has the easiest setup and is tested regularly with the buildsystem by Google. I have not used any other Linux distribution or Mac to build Android.
The codebase is big and I would recommend at least 10gb free disk space It is possible to use Linux in virtualization if you are using windows, but compiling android takes a lot of ram and the recommended amount for virtual machine is 1.5gb.
To get your computer setup go to http://source.android.com/source/download.html and follow the instructions. This site gives easy instruction on how to setup your machine, download and install the "repo" tool and how to use it. If you have any questions about it, you can ask it in this thread.
You probably also want to make adb working on your computer, you can do that by following the guide athttp://developer.android.com/guide/developing/device.html 3rd step under "setting up a device for development"
For initialization of repo client you will probably want to use:
repo init -u git://codeaurora.org/platform/manifest.git -b froyo_almond -m Q8650BSDCANLYA5025.xml
repo sync
This is the stabilization branch for Froyo on Qualcom qsd860 (from codeaurora, they also have a guide there that I recommend you looking at (https://www.codeaurora.org/xwiki/bin/QAEP/)
From now on, the files and folders I am talking about will be from inside the folder you did repo init and sync.
[2]
When everything has downloaded you can get the buildfiles (and some proprietary and or precompiled libraries) from here http://www.multiupload.com/IY135XIZ8O
Enter the device folder and create a folder called acer with subfolder named liquid, and there you extract the buildfiles. (I will describe more about the files further down)
[3]
Now you should be ready to compile AOSP, to initialize the buildsystem. open terminal, cd into yourdroid folder and run
. build/envsetup.sh (this will be for your opened terminal, if you close it or enter another one, you wont have the same build system config there)
then run choosecombo and you will be guided to setup buildsystem for your device. Probably you want to use 1.device, 1. release, and device "liquid"
To start compiling run make -jN where N two times the numbers of cores in your computers cpu. (to speedup the build). Android is big, so this will probably take alot of time (hours).
when it is done you will see something like
Install system fs image: out/target/product/liquid/system.img
Installed file list: out/target/product/liquid/installed-files.txt
koudelka@koudelka-laptop:~/liquid-aosp$
[4]
All the files that has been created you can find in out/target/product/liquid/ . my buildfiles does not build kernel for the liquid, but it is made to work together with phh liquide kernel, so you can use boot.img from his FRF91 rom with your build. There will be both folders with all the applications/frameworks and libs you have compiled, and also generated images you can flash using liquid bootloader (fastboot, same way you install malez recovery).
enter bootloader by using adb, adb reboot bootloader
*note* If you are using virtual machine, it is probably best not to flash from inside it, rather use native windows
fastboot -i 0x0502 flash boot boot.img (extract from phh FRF91 rom, or if you are already running it, you dont neet do flash it again)
fastboot -i 0x0502 flash system system.img (the one you crated in /out/target/product/liquid/
fastboot -i 0x0502 flash userdata userdata.img (also from /out/target/product/liquid/)
fastboot -i 0x0502 reboot
now it is just to see if your device is booting
if not you can use adb to reboot to recovery or bootloader again to flash new images, or revert to another rom. If you cant connect to adb, you can use the button combination (check sticked thread on this forum)
Instead of using the images you can create a update.zip and flash it using malez recovery. If you include the cache folder from phh FRF91 rom you will also get radio working for calling/sms and data.
Short comment on buildfiles in device/acer/liquid/
The two most important files are BoardConfig.mk and liquid.mk, BoardConfig includes as the name suggest board(liquid internal) specific settings, hardware settings and other things. Editing this probably will endup in non booting build unless you know short of what you are doing
. liquid.mk is for configuration on what languages and applications should be included in your build, it is also the file where proprietary and config files get copied to your build. ex, apn config file. Looking in the files you can probably figure out what they do.
Extra reading
If you are interesting in learning some more about adding things to your build, or adding a module/application I can suggest some interesting articles to read.
http://www.androidenea.com/2010/06/using-l...in-repo-to.html To add external git projects to your repo setup
http://android.git.kernel.org/?p=platform/...ild-system.html Document describing what the android buildsystem is trying to be (Old document, there is not so much recent information on this)
http://www.androidenea.com/2009/04/closer-...ject-build.html Close look at android buildsystem part 1
http://www.androidenea.com/2009/04/closer-...t-build_27.html Part 2
http://source.android.com/porting/build_system.html official porting guide for android, good source for information but is probably aimed more for professionals
(and some parts are outdated?)
Please give feedback about things to add/remove, and I will update the post
Hope someone finds this of use, even though it is a bit unstructured:) Ps, If you read this far, I am impressed 
[1]
To build android you need Linux or Mac (Windows is not supported). I would recommend using Ubuntu linux 32 bit it probably has the easiest setup and is tested regularly with the buildsystem by Google. I have not used any other Linux distribution or Mac to build Android.
The codebase is big and I would recommend at least 10gb free disk space It is possible to use Linux in virtualization if you are using windows, but compiling android takes a lot of ram and the recommended amount for virtual machine is 1.5gb.
To get your computer setup go to http://source.android.com/source/download.html and follow the instructions. This site gives easy instruction on how to setup your machine, download and install the "repo" tool and how to use it. If you have any questions about it, you can ask it in this thread.
You probably also want to make adb working on your computer, you can do that by following the guide athttp://developer.android.com/guide/developing/device.html 3rd step under "setting up a device for development"
For initialization of repo client you will probably want to use:
repo init -u git://codeaurora.org/platform/manifest.git -b froyo_almond -m Q8650BSDCANLYA5025.xml
repo sync
This is the stabilization branch for Froyo on Qualcom qsd860 (from codeaurora, they also have a guide there that I recommend you looking at (https://www.codeaurora.org/xwiki/bin/QAEP/)
From now on, the files and folders I am talking about will be from inside the folder you did repo init and sync.
[2]
When everything has downloaded you can get the buildfiles (and some proprietary and or precompiled libraries) from here http://www.multiupload.com/IY135XIZ8O
Enter the device folder and create a folder called acer with subfolder named liquid, and there you extract the buildfiles. (I will describe more about the files further down)
[3]
Now you should be ready to compile AOSP, to initialize the buildsystem. open terminal, cd into yourdroid folder and run
. build/envsetup.sh (this will be for your opened terminal, if you close it or enter another one, you wont have the same build system config there)
then run choosecombo and you will be guided to setup buildsystem for your device. Probably you want to use 1.device, 1. release, and device "liquid"
To start compiling run make -jN where N two times the numbers of cores in your computers cpu. (to speedup the build). Android is big, so this will probably take alot of time (hours).
when it is done you will see something like
Install system fs image: out/target/product/liquid/system.img
Installed file list: out/target/product/liquid/installed-files.txt
koudelka@koudelka-laptop:~/liquid-aosp$
[4]
All the files that has been created you can find in out/target/product/liquid/ . my buildfiles does not build kernel for the liquid, but it is made to work together with phh liquide kernel, so you can use boot.img from his FRF91 rom with your build. There will be both folders with all the applications/frameworks and libs you have compiled, and also generated images you can flash using liquid bootloader (fastboot, same way you install malez recovery).
enter bootloader by using adb, adb reboot bootloader
*note* If you are using virtual machine, it is probably best not to flash from inside it, rather use native windows
fastboot -i 0x0502 flash boot boot.img (extract from phh FRF91 rom, or if you are already running it, you dont neet do flash it again)
fastboot -i 0x0502 flash system system.img (the one you crated in /out/target/product/liquid/
fastboot -i 0x0502 flash userdata userdata.img (also from /out/target/product/liquid/)
fastboot -i 0x0502 reboot
now it is just to see if your device is booting
Instead of using the images you can create a update.zip and flash it using malez recovery. If you include the cache folder from phh FRF91 rom you will also get radio working for calling/sms and data.
Short comment on buildfiles in device/acer/liquid/
The two most important files are BoardConfig.mk and liquid.mk, BoardConfig includes as the name suggest board(liquid internal) specific settings, hardware settings and other things. Editing this probably will endup in non booting build unless you know short of what you are doing
Extra reading
If you are interesting in learning some more about adding things to your build, or adding a module/application I can suggest some interesting articles to read.
http://www.androidenea.com/2010/06/using-l...in-repo-to.html To add external git projects to your repo setup
http://android.git.kernel.org/?p=platform/...ild-system.html Document describing what the android buildsystem is trying to be (Old document, there is not so much recent information on this)
http://www.androidenea.com/2009/04/closer-...ject-build.html Close look at android buildsystem part 1
http://www.androidenea.com/2009/04/closer-...t-build_27.html Part 2
http://source.android.com/porting/build_system.html official porting guide for android, good source for information but is probably aimed more for professionals
Please give feedback about things to add/remove, and I will update the post
Không có nhận xét nào:
Đăng nhận xét