AOSP via recoveryをインストールしてみた

(※端末が文鎮になっても責任は負いません。自己責任でお願いいたします。)


AOSPのリカバリー生成を行って、NexusGalaxyに入れてみました。
まずはこちらを読んでください。

An experiment: installing AOSP via recovery
https://groups.google.com/group/android-building/browse_thread/thread/1d0f4fea5a577f93/8c698abb96533a97?#8c698abb96533a97


いまのところ、GSM版NexusGalaxy(maguro)のみ可能です。
また、リカバリー生成を行う環境はmasterブランチです。
(android-4.0.3_r1では生成できません、失敗します)

以下、JBQさんが公開されたScriptに少し手順を加えたものです。
(※buildディレクトリにproprietary binariesの展開を忘れないように)

# Create a directory to store all the temporary files
mkdir -p ~/aosp-ota-exp
cd ~/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
cd <YOUR_BUILD_PATH>
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.* 

build情報はこんな感じ。
Android versionが「4.0.3.0.2.0.1.0」となっています。
4.3.2.1.0ってカウントダウンでしょうか。




アプリ一覧画面です。マーケットなどGMSアプリはありません。



WiFiをONにしてみました。正常に接続可能でした。
ブラウザを起動してGoogleTopを表示。