天天看點

Android學習筆記之-刷機Nexus S: Full Update Guide(Dean)

前幾個星期Jimmy跟我說正帶的一個項目客戶是阿拉伯人!要求有阿拉伯的語言支援!指定的機型是nexus s!很困擾的是亞洲版一般都吧這一語言屏蔽了!讓我想辦法刷一個有阿拉伯語言支援的!前幾天一直嘗試自己編一個img直接刷上去!但剛好我手上的源碼版本是沒有阿拉伯語言設定的支援的!

當然2.3版本的源碼都有DroidSansArabic.ttf這也就是說阿拉伯語言的支援都是可以的!我下了一個阿拉伯輸入法果然可以儲存阿拉伯文字!隻是為什麼設定裡沒有呢!跟蹤代碼發現

/home/deanye/Android/gingerbread0711nexus/packages/apps/Settings/src/com/android/LocalePicker.java中的

       String[] locales = getAssets().getLocales();

這個localer中就沒獲得到ar的字元(阿拉伯語言的國際 Arabic, Egypt (ar_EG) 阿拉伯語(埃及) Arabic, Israel (ar_IL) 阿拉伯語(以色列))

這裡可以對比一下手機上的數組是

模拟器上有阿拉伯語言設定它的數組是

追了下代碼覺得挺麻煩的于是想下一個網上現成的!

帶刷機沒有自己編譯源碼的來的友善!

自己編譯的話刷機方法如下:

下了網上的話以我下的cyanogenmod提供的為例:

下面開始刷機我就直接貼官方的介紹了不翻譯了:

Before you do anything — Make a backup

Don't forget to back up your data. If you have synced the device with a Google account, then the contacts, calendar, Gmail, & select other Google-related data will not be lost and will come back after the next sync. However, you should backup anything you want to keep that is not stored on the SD card:

    SMS/MMS messages,

    Call Log,

    Bookmarks,

    Applications; use Titanium Backup or the Astro File Manager, for example,

    Any application data not on the SD card.

It would also be a good idea to backup everything stored on the SD card in the rare case the SD card must be formatted to resolve any major problems.

MyBackup Root, SMS Backup & Restore, and Call Backup & Restore are all free applications that can assist with backing up your data.

Unlocking the Bootloader

Warning: Unlocking the Nexus S's bootloader will void the warranty.

If the Bootloader on the Nexus S has already been unlocked, you may skip this section.

    1.You will need fastboot on the computer to unlock the bootloader on the Nexus S. Follow the Android SDK guide, to get the fastboot on the computer.

    2.Power the Nexus S down, and hold Volume Up & the Power button until booted into the bootloader. You should see a white screen with three skating androids.

    3.Connect the Nexus S to the computer via USB.

    4.On the computer, open terminal and run:

    5.On the Nexus S, a prompt will open up asking you if you are sure you want to unlock the bootloader and again warning you that doing so will void your warranty. If you agree to these terms, press Volume Up to select Yes, and then press the Power button to confirm.

        NOTE: Unlocking the bootloader wipes the device.

    6.The Nexus S will reboot.

Installing the ClockworkMod Recovery Image

If you have already flashed a custom recovery image, skip this section.

    1.Download the latest version of the ClockworkMod Recovery:

        ClockworkMod Recovery 4.0.0.2: Download

    2.Place the ClockworkMod Recovery Image in the same folder as fastboot (the /tools folder with the Android SDK folder).

    3.Power the Nexus S down, and hold Volume Up & the Power button until booted into the bootloader. You should see a white screen with three skating androids.

    4.Connect the Nexus S to the computer via USB.

    5.On the computer, open terminal and run:

    The ClockworkMod Recovery should now be installed on the Nexus S.

Flashing CyanogenMod

    NOTE: In order to flash CyanogenMod via ROM Manager, root access is required. Attaining root access is outside the scope of this wiki page

Method via Recovery

    1.Download the latest version of CyanogenMod.

        Optional: Download the Google Apps for the device.

    2.Place the CyanogenMod update.zip file on the root of the SD card.

     Optional: Place the Google Apps .zip on the root of the SD card also.

    3.Boot into the ClockworkMod Recovery.

    4.Once the device boots into the ClockworkMod Recovery, use the side volume buttons to move around, and either the power button or the trackball to select.

        Optional: Select backup and restore to create a backup of current installation on the Nexus S.

    5.Select the option to Wipe data/factory reset.

    6.Then select the option to Wipe cache partition.

    7.Select Install zip from sdcard.

    8.Select Choose zip from sdcard.

    9.Select the CyanogenMod update.zip.

        Optional: Install the Google Apps by performing steps 7 - 9 again and choosing the Google Apps update.zip.

    10.Once the installation has finished, select +++++Go Back+++++ to get back to the main menu, and select the Reboot system now option. The Nexus S should now boot into CyanogenMod.

Method via ROM Manager

    1.Launch RomManager.

        Optional: Choose the first option in the app, Flash ClockworkMod Recovery to update to the latest version.

    2.Select the Download ROM option from the main menu in the ROM Manager.

    3.Select the CyanogenMod option, and then choose the latest version of CyanogenMod from the menu.

        Optional: When you select the latest version of CyanogenMod, check the Google Apps* option.

    4.Once the ROM is finished downloading, it asks if you would like to Backup Existing ROM and Wipe Data and Cache.

    5.If Superuser prompts for root permissions check to Remember and then Allow.

    6.The Nexus S will now reboot into the recovery, wipe data and cache, and then install CyanogenMod. When it's finished installing it will reboot into CyanogenMod.

刷機成功後:

Android學習筆記之-刷機Nexus S: Full Update Guide(Dean)
Android學習筆記之-刷機Nexus S: Full Update Guide(Dean)

阿拉伯語言設定:

Android學習筆記之-刷機Nexus S: Full Update Guide(Dean)

繼續閱讀