トラッキング コード

Showing posts with label Android building. Show all posts
Showing posts with label Android building. Show all posts

4/01/2012

Getting the Factory Image 4.0.4(IMM76D) of Galaxy Nexus(maguro)




You can get the Factory Image of Galaxy Nexus.

Google Support for Nexus Phones and Flagship Devices.
 http://code.google.com/intl/ja/android/nexus/images.html


Example of 4.0.4 (IMM76D) maguro

wget https://dl.google.com/dl/android/aosp/yakju-imm76d-factory-c6e807a1.tgz
tar xvf ./yakju-imm76d-factory-c6e807a1.tgz
cd yakju-icl53f
./flash-all.sh

2/27/2012

Using a local mirror, repo sync speed up!

Create a local mirror of AOSP
Add repo init option "--mirror".

$ mkdir -p /mirror
$ cd /mirror
$ repo init -u https://android.googlesource.com/mirror/manifest --mirror
$ repo sync

Download time : about 4 hours and over.
volume : 10GB over


Get source from a local mirror

when get source from a local mirror, change repo init url with locla path.

$ mkdir -p android-4.0.3_r1
$ cd android-4.0.3_r1
$ repo init -u /mirror/platform/manifest.git -b android-4.0.3_r1
$ repo sync

I try to get android-4.0.3_r1 branch.

$ repo init -u ../aosp_mirror/platform/manifest.git/ -b android-4.0.3_r1
real 3m18.429s
user 8m21.260s
sys 0m54.990s

when get ICS soruce, time is 3m18s !!
(using SSD, not HDD!)

2/26/2012

Setting up ccache, Because build speed up

http://source.android.com/source/initializing.html#ccache

Put the following in your .bashrc or equivalent.

export USE_CCACHE=1

By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.

export CCACHE_DIR= "path-to-your-cache-directory"

The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code.
prebuilt/linux-x86/ccache/ccache -M 50G



I measured the build time.

My builing pc spec

SSD:128G
memory:16G
CPU:Corei7 2600
OS:Ubuntu 10.04LTS

Build:1st time

Because creating ccache, do full build of android-4.0.3_r1.
$ . build/envsetup.sh
$ lunch full_maguro-userdebug
$ time make -j8

Time:
real 32m8.076s
user 249m16.350s
sys 13m3.600s

Building:2nd time

Because remove out directory, do "make clean".

$ make clean
$ time make -j8

Time:
real 14m30.814s
user 108m57.690s
sys 7m32.390s


Speed up

Build time speed up, to set Ccache enable!!
32m8.076s -> 14m30.814s

Removed sun-java6 from the Ubuntu Repository

I get new PC!

I try to build setup on Ubuntu 10.04.

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

But, I can not install sun-java6-sdk!!
So,sun-java6-sdk removed from the Ubuntu Repository...

http://www.ubuntuupdates.org/package/canonical_partner/lucid/partner/base/sun-java6


I try to install "LffL Java PPA".
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ferramroberto/java
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

I cound build for AOSP!!

2/12/2012

Launch Tablet Mode Android-4.0.3_r1 on Galaxy Nexus (maguro)

Disable config of config_showNavigationBar, because tablet device do not have NavigationBar.
If you want to know detail ,please read my Post.
Phone mode or Tablet mode in Ice Cream Sandwich ?
http://baroqueworksdev.blogspot.com/2012/01/phone-mode-or-tablet-mode-in-ice-cream.html
NavigationBar / Virtual buttons in the System Bar
http://baroqueworksdev.blogspot.com/2012/01/navigationbar.html


device/samsung/tuna/overlay/frameworks/base/core/res/res/values
- config.xml
<!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
         autodetected from the Configuration. -->
<bool name="config_showNavigationBar">true</bool>
↓
<bool name="config_showNavigationBar">false</bool>

Change to LCD Density 160.

device/samsung/tuna
- device.mk
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=320
↓
ro.sf.lcd_density=160


building ROM
Obtaining proprietary binaries

$ wget https://dl.google.com/dl/android/aosp/imgtec-maguro-iml74k-a796ffae.tgz
$ wget https://dl.google.com/dl/android/aosp/samsung-maguro-iml74k-de1cc439.tgz
$ for i in *maguro-iml74k* ; do tar zxvf $i ; done
$ for i in ./extract-*-maguro.sh ; do $i ; done


build
$ . build/envsetup.sh
$ lunch full_maguro-userdebug
$ make

Flashing a device
$ cd out/target/product/maguro
$ fastboot flashall -w


Launch device.
Tablet UI mode on Galaxy Nexus!!









2/11/2012

Building for maguro Android-4.0.3_r1

Building for devices
http://source.android.com/source/building-devices.html

I try to build for maguro Android-4.0.3_r1.
I successed boot of Android_4.0.3_r1 building Rom.

Obtaining proprietary binaries

$ wget https://dl.google.com/dl/android/aosp/imgtec-maguro-iml74k-a796ffae.tgz
$ wget https://dl.google.com/dl/android/aosp/samsung-maguro-iml74k-de1cc439.tgz
$ for i in *maguro-iml74k* ; do tar zxvf $i ; done
$ for i in ./extract-*-maguro.sh ; do $i ; done


build
$ . build/envsetup.sh
$ lunch full_maguro-userdebug
$ make

Flashing a device
I try to flash only system.img and boot.img, but devices is reboot loop.
So, You shoud read Offical Pag "Building for devices".

flash command is
$ fastboot flashall -w


Do not use extract-files.sh ?

Yout want to know detail, you shoud read android-building thread.

Camera not working on ICS 4.03 / Maguro
http://groups.google.com/group/android-building/browse_thread/thread/a6bdd53547c0af62/b84f5731198d605a?lnk=gst&q=extract-files.sh&pli=1

extract-files.sh is my own private tool
anyway, used during development of the self-extractors, it's not meant
to be used by the general public, especially because of licensing
issues.

2/08/2012

Building for wingray Android_4.0.3_r1 - Motorola Xoom (US Wi-Fi)

wingray is building name of "Motorola Xoom (US Wi-Fi)".

Reference WebPage

http://source.android.com/source/building-devices.html
http://code.google.com/intl/ja/android/nexus/drivers.html


Obtaining "proprietary binaries"

You need to obtain "proprietary binaries" which is not include the Android Open-Source Project.
To run the script for obtaining device's "proprietary binaries"

Get "proprietary binaries".
$ wget https://dl.google.com/dl/android/aosp/broadcom-wingray-iml74k-2c8a74c6.tgz
$ wget https://dl.google.com/dl/android/aosp/nvidia-wingray-iml74k-e5226417.tgz
$ for i in *wingray-iml74k* ; do tar zxvf $i ; done
$ for i in ./extract-*-wingray.sh ; do $i ; done

building the configuration that matches a device

running to build for wingray.

$ . build/envsetup.sh
$ lunch full_wingray-userdebug
$ make

Create AOSP via recovery

This works on AOSP master branch, do not work Android-4.0.3_r1 etc.

If you want to know detail, you shoud read Android-building's thread.

https://groups.google.com/group/android-building/browse_thread/thread/1d0f4fea5a577f93/8c698abb96533a97?#8c698abb96533a97

# Create a directory to store all the temporary files
mkdir -p ~/aosp-ota-exp

# Download all the IML74K maguro binaries from
# https://code.google.com/android/nexus/drivers.html into ~/aosp-ota-exp
wget https://dl.google.com/dl/android/aosp/imgtec-maguro-iml74k-a796ffae.tgz
wget https://dl.google.com/dl/android/aosp/samsung-maguro-iml74k-de1cc439.tgz


# download the ICL53F yakju factory image from
# https://code.google.com/android/nexus/images.html into ~/aosp-ota-exp
wget https://dl.google.com/dl/android/aosp/yakju-icl53f-factory-89fccaac.tgz

# download the matching stub target_files.zip directly from
wget https://dl.google.com/dl/android/aosp/stub-yakju-target_files-icl53f.zip

# Extract the proprietary binaries
for i in ~/aosp-ota-exp/*maguro-iml74k* ; do tar zxvf $i ; done
for i in ./extract-*-maguro.sh ; do $i ; done 

# Extract the individual factory images
(cd ~/aosp-ota-exp ; tar zxvf yakju-icl53f-factory-89fccaac.tgz)
(cd ~/aosp-ota-exp/yakju-icl53f ; unzip image-yakju-icl53f.zip) 

# Patch the OTA-packaging tool
repo forall build -c 'git pull https://android.googlesource.com/platform/build refs/changes/64/31464/1' 

# Set up the build. Insert dummy files where the original files should be preserved
wget https://dl.google.com/dl/android/aosp/imgtec-maguro-iml74k-a796ffae.tgz
wget https://dl.google.com/dl/android/aosp/samsung-maguro-iml74k-de1cc439.tgz
for i in  *maguro-iml74k* ; do tar zxvf $i ; done
for i in ./extract-*-maguro.sh ; do $i ; done 

. build/envsetup.sh
lunch full_maguro-userdebug
make installclean 
for i in vendor/firmware/bcm4330.hcd vendor/etc/sirfgps.conf vendor/lib/hw/gps.omap4.so vendor/lib/libinvensense_mpl.so vendor/firmware/libpn544_fw.so vendor/firmware/ducati-m3.bin ; do mkdir -p out/target/product/maguro/system/$(dirname $i) ; echo "DUMMY AOSP FILE" > out/target/product/maguro/system/$i ; done 

# Do the build (this is a dist build, not a plain build)
# Dist: out/dist/full-apps-eng.XXXXX.zip
# Dist: out/dist/full-emulator-eng.XXXXX.zip
# Dist: out/dist/full-target_files-eng.XXXXX.zip
# Dist: out/dist/full-symbols-eng.XXXXX.zip
time make -jX dist


# Create the OTA package and the custom cache partition
rm -rf ~/aosp-ota-exp/cache
mkdir -p ~/aosp-ota-exp/cache
build/tools/releasetools/ota_from_target_files -w -i ~/aosp-ota-exp/stub-yakju-target_files-icl53f.zip -k build/target/product/security/testkey out/dist/full_maguro-target_files-eng.*.zip ~/aosp-ota-exp/cache/aosp_update.zip 
make_ext4fs -s -l 209715200 -a cache ~/aosp-ota-exp/cache.img ~/aosp-ota-exp/cache 


# Flash the device
fastboot flash bootloader ~/aosp-ota-exp/yakju-icl53f/bootloader-maguro-primekk15.img
fastboot reboot-bootloader
fastboot flash radio ~/aosp-ota-exp/yakju-icl53f/radio-maguro-i9250xxkk6.img
fastboot reboot-bootloader
fastboot flash system ~/aosp-ota-exp/yakju-icl53f/system.img
fastboot flash boot
fastboot flash recovery
fastboot flash cache ~/aosp-ota-exp/cache.img 

# Boot into recovery (in the bootloader, navigate with volume up/down, and select with the power button)
# Get the recovery menu (hold power, press volume up)
# In recovery, apply /cache/aosp_update.zip, wipe the cache, and reboot.* 


Display About phone.
Android version is "4.0.3.0.2.0.1.0", count down???



Display Application list .
There is not GMS apps, Market etc.



WiFi work on. Connected to Google Top!!

2/07/2012

Don't work WIFI and Bluetooth on Galaxy Nexus ICS 4.0.3 ?

I don't try to build Android-4.0.3 for Galaxy Nexus.
Don't work WIFI and Bluetooth on Galaxy Nexus ICS 4.0.3 ?

Galaxy Nexus Android ICS and Bluetooth/Wifi drivers
https://groups.google.com/group/android-building/browse_thread/thread/d0294450823d093d/6470de50e54e600d?lnk=gst&q=android+4.0.3#6470de50e54e600d
We're still working on getting a license to distribute the Wifi/BT firmware
for Galaxy Nexus.

In the meantime, please try this and let me know if it works for you:
http://goo.gl/8jit8

2/04/2012

Get the Factory Image of Galaxy Nexus

You can get the Factory Image of Galaxy Nexus.

Google Support for Nexus Phones and Flagship Devices.
 http://code.google.com/intl/ja/android/nexus/images.html


Example of 4.0.2 (ICL53F) maguro
wget https://dl.google.com/dl/android/aosp/yakju-icl53f-factory-89fccaac.tgz
tar xvf ./yakju-icl53f-factory-89fccaac.tgz
cd yakju-icl53f
./flash-all.sh

1/21/2012

Build speed up : out directory changed to SSD

Link:
New experimental build system feature: out/ directories in another location
http://groups.google.com/group/android-building/browse_thread/thread/ca6c1648aa52acb9

This should be useful when storing the build output on a physically
different volume. Additional benefits might come from using a
dedicated volume for that where journaling is disabled, and/or from
using an SSD.

To use it, set the OUT_DIR_COMMON_BASE environment to the directory
where the output directories will be created. A subdirectory will be
created there for each source tree. The name of the subdirectory
matches that of the source tree.

memo:
- we can change "out directory" with OUT_DIR_COMMON_BASE
- use SSD to build speed up.

but, This patch is commited in Master blanch, so is not in Android-4.0.3_r1 blanch.

check it !!
\build\core\envsetup.mk

# ---------------------------------------------------------------
# figure out the output directories

ifeq (,$(strip $(OUT_DIR)))
ifeq (,$(strip $(OUT_DIR_COMMON_BASE)))
OUT_DIR := $(TOPDIR)out
else
OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD))
endif
endif

DEBUG_OUT_DIR := $(OUT_DIR)/debug

1/14/2012

Building for maguro ICS

maguro is building name of "Galaxy Nexus for GSM/HSPA+".

Reference WebPage

http://source.android.com/source/building-devices.html
http://code.google.com/intl/ja/android/nexus/drivers.html


Obtaining "proprietary binaries"

You need to obtain "proprietary binaries" which is not include the Android Open-Source Project.
To run the script for obtaining device's "proprietary binaries"

$ cd device/samsung/maguro
$ ./extract-files.sh

After running script, "vendor" drectory is generated in the root of the build environment.

vender/samsung/maguro/*

If you don't have Galaxy Nexus, need to get "proprietary binaries".

Example for getting Android-4.0.3 IML74K "proprietary binaries".
$ wget https://dl.google.com/dl/android/aosp/imgtec-maguro-iml74k-a796ffae.tgz
$ wget https://dl.google.com/dl/android/aosp/samsung-maguro-iml74k-de1cc439.tgz
$ tar zxvf imgtec-maguro-iml74k-a796ffae.tgz
$ tar zxvf samsung-maguro-iml74k-de1cc439.tgz
$ ./extract-imgtec-maguro.sh
$ ./extract-samsung-maguro.sh


building the configuration that matches a device

running to build for maguro.

$ . build/envsetup.sh
$ lunch full_maguro-userdebug
$ make

Building for Crespo ICS

Reference WebPage

http://source.android.com/source/building-devices.html
http://code.google.com/intl/ja/android/nexus/drivers.html


Obtaining "proprietary binaries"

You need to obtain "proprietary binaries" which is not include the Android Open-Source Project.
To run the script for obtaining device's "proprietary binaries"

$ cd device/samsung/crespo
$ ./extract-files.sh

After running script, "vendor" drectory is generated in the root of the build environment.

vender/samsung/crespo/*


building the configuration that matches a device

running to build for crespo.

$ . build/envsetup.sh
$ lunch full_crespo-userdebug
$ make