Android学习笔记之-刷机Nexus S: Full Update Guide(Dean)

简介: 前几个星期Jimmy跟我说正带的一个项目客户是阿拉伯人!要求有阿拉伯的语言支持!指定的机型是nexus s!很困扰的是亚洲版一般都吧这一语言屏蔽了!让我想办法刷一个有阿拉伯语言支持的!前几天一直尝试自己编一个img直接刷上去!但刚好我手上的源码版本是没有阿拉伯语言设置的支持的! 当然2.
前几个星期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) 阿拉伯语(以色列))
这里可以对比一下手机上的数组是
[, bg, bg_BG, ca, ca_ES, cs, cs_CZ, da, da_DK, de, de_DE, el, el_GR, en, en_GB, en_US, es, es_ES, es_US, fi, fi_FI, fr, fr_FR, hr, hr_HR, hu, hu_HU, in, in_ID, it, it_IT, iw, iw_IL, ja, ja_JP, ko, ko_KR, lt, lt_LT, lv, lv_LV, nb, nb_NO, nl, nl_NL, pl, pl_PL, pt, pt_BR, pt_PT, rm, rm_CH, ro, ro_RO, ru, ru_RU, sk, sk_SK, sl, sl_SI, sr, sr_RS, sv, sv_SE, tl, tl_PH, tr, tr_TR, uk, uk_UA, vi, vi_VN, zh, zh_CN, zh_TW]

模拟器上有阿拉伯语言设置它的数组是
[, da, ja, nb, de, el, nl, pl, ko, fr, tr, cs, es, it, pt, ru, sv, en_CA, uk_UA, en_ZA, en_GB, id_ID, en_IE, bg_BG, ar_EG, en_SG, th_TH, fi_FI, sl_SI, sk_SK, zh_CN, hi_IN, en_IN, vi_VN, ro_RO, hr_HR, ca_ES, sr_RS, en_US, es_US, lt_LT, pt_PT, en_AU, hu_HU, lv_LV, zh_TW, en_NZ, fr_CA, nl_BE, fr_BE, de_DE, sv_SE, de_CH, fr_CH, it_CH, tl_PH, de_LI, da_DK, he_IL, ar_IL, nl_NL, pl_PL, nb_NO, ja_JP, pt_BR, fr_FR, el_GR, ko_KR, tr_TR, es_ES, de_AT, it_IT, ru_RU, cs_CZ, en, th, fi, ar, hu, id, he, zh, sk, uk, ro, hr, sr]

追了下代码觉得挺麻烦的于是想下一个网上现成的!
带刷机没有自己编译源码的来的方便!
自己编译的话刷机方法如下:
(1) how to build source code:
  http://source.android.com/source/initializing.html
  http://source.android.com/source/building.html
(2) how to setup nexus
  1. use up key+power key into setpup module on nexus
  2. cd (nexus source code dir)
  3. cd out/target/product/crespo/
  4. ../../../host/linux-x86/bin/fastboot flash boot boot.img
  5. ../../../host/linux-x86/bin/fastboot flash system system.img
  6. ../../../host/linux-x86/bin/fastboot reboot

下了网上的话以我下的cyanogenmod提供的为例:
首先选择自己的机型: http://www.cyanogenmod.com/devices

然后选择一个比较新的版本下载: 我选的nexus s标准版 http://download.cyanogenmod.com/?type=stable&device=crespo
下面开始刷机我就直接贴官方的介绍了不翻译了:

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:
        fastboot oem unlock 

    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:
        fastboot flash recovery recovery-clockwork-4.0.0.2-crespo.img 

    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.
刷机成功后:
img_83a2ed5c4063243257ba4408825cf94d.png

img_195b8be14c57a81bf367ea8bfb63ad55.png
阿拉伯语言设置:
img_6e2f235970e1dde4464639224ff5bb29.png

目录
相关文章
|
6月前
|
架构师 网络协议 算法
Android高级架构师整理面试经历发现?(大厂面经+学习笔记(1)
Android高级架构师整理面试经历发现?(大厂面经+学习笔记(1)
|
6月前
|
消息中间件 缓存 架构师
2024年阿里Android高级面试题分享,附学习笔记+面试整理+进阶书籍
2024年阿里Android高级面试题分享,附学习笔记+面试整理+进阶书籍
|
缓存 安全 数据库
Android学习笔记4
Android学习笔记4
51 0
|
XML 数据库 数据安全/隐私保护
Android学习笔记3
Android学习笔记3
157 0
|
XML Java Android开发
Android学习笔记2
Android学习笔记2
73 0
|
XML Java Linux
Android学习笔记1
Android学习笔记1
58 0
|
存储 Java API
Android逆向 | 基础篇 - Java 学习笔记03
Android逆向 | 基础篇 - Java 学习笔记03
|
22天前
|
缓存 搜索推荐 Android开发
安卓开发中的自定义控件实践
【10月更文挑战第4天】在安卓开发的海洋中,自定义控件是那片璀璨的星辰。它不仅让应用界面设计变得丰富多彩,还提升了用户体验。本文将带你探索自定义控件的核心概念、实现过程以及优化技巧,让你的应用在众多竞争者中脱颖而出。
|
22天前
|
Java Android开发 Swift
安卓与iOS开发对比:平台选择对项目成功的影响
【10月更文挑战第4天】在移动应用开发的世界中,选择合适的平台是至关重要的。本文将深入探讨安卓和iOS两大主流平台的开发环境、用户基础、市场份额和开发成本等方面的差异,并分析这些差异如何影响项目的最终成果。通过比较这两个平台的优势与挑战,开发者可以更好地决定哪个平台更适合他们的项目需求。
83 1
|
5天前
|
Java API Android开发
安卓应用程序开发的新手指南:从零开始构建你的第一个应用
【10月更文挑战第20天】在这个数字技术不断进步的时代,掌握移动应用开发技能无疑打开了一扇通往创新世界的大门。对于初学者来说,了解并学习如何从无到有构建一个安卓应用是至关重要的第一步。本文将为你提供一份详尽的入门指南,帮助你理解安卓开发的基础知识,并通过实际示例引导你完成第一个简单的应用项目。无论你是编程新手还是希望扩展你的技能集,这份指南都将是你宝贵的资源。
22 5