How to cook your own Android ROM 如何制作自己的刷机包

来源:互联网 发布:氢弹 知乎 编辑:程序博客网 时间:2024/05/22 15:36

How to cook your own Android ROM

Want to get started with building your own custom ROM for Android? Our tutorial guide will show you how.

You will often hear to Android being referred to as Open Source. This means that the code that makes up the operating system is available for everyone to view,download , and if they wish,edit. Android is now pretty mature,  and having the option of tailoring the OS to your need is incredibly exciting ,  but something most people  don’t even  think about  doing as they feel they need a degree in Computer Science to even start.(上面讲了写了刷机相关的背景知识,跟开源这个概念有关)

While its true that to truly develop the next CyanogenMod is going to take a fair bit of hard work and knowledge, there are a number of tools available that simplify the process. The easiest way to cook up your own ROM is to use one of the online Kitchens such as UOTKitchen or RomKitchen.(这里讲到2个能在线制作刷机包的网站,功能还蛮强大的,不过有局限性,动手能力要求不是很高)

These online resources allow for a point and click interface where you chose the features you want, click generate and it spits out the ROM ready to flash. Before starting this guide it might be a good idea to have a quick hunt about and try out a few ROMS of your own. Online kitchens are great, but don’t offer a huge amount of flexibility or device support, and many of them are not up to date with the latest versions of Android.(具体讲了下局限性---灵活性和支持的设备不是很多,所以我们要用以下更有挑战性的方法)

In this guide though we are going to go a little deeper but still just basically adding and removing some features as a gentle introduction into building your own ROMs.


  1. How to cook your own Android ROM

    Download the tools(下载制作工具)

    First off we need to navigate to dsixda’s Android Kitchen http://forum.xda-developers.com/showthread.php?t=633246 and download the tool. Its mainly for HTC devices , although others are supported. Depending on your operating system you will also need to install a few extra files.(dsixda's这个工具主要是用于HTC的手机的,不过其他一些设备也支持.这取决于你的操作系统,你也将需要安装一些额外的文件。)

  2. How to cook your own Android ROM

    Download our source(下载源代码)

    Next download CyanogenMod for your device from http://www.cyanogenmod.com/devices. Choose the stable version and remember not to unzip the download.  If you want you could instead download standard Android AOSP from: http://source.android.com/index.htmlalthough this will involve some command line work.(到CM的官网下源代码,要稳定版的,下载后不要解压。也可以选择AOSP的源代码)

  3. How to cook your own Android ROM

    Run the Kitchen app(运行制作软件)

    Depending on your operating system the commands may differ slightly, but unzip the Kitchen files , then open up a Terminal or command line and move to that directory. Something like ‘cd user/documents/kitchen’. Once there type./menu to run the app. You will then see the menu.(解压文件,在终端打开存放路径,也可以移到其他地方。然后只要在终端输入./menu就能运行了。不同的操作系统命令或许会有些不一样。)

  4. How to cook your own Android ROM

    Import our base ROM(导入基包)

    You can edit any .zip ROM image file you like , including stock ones. This is great if you want to remove unwanted apps from the image. To import our CyanogenMod 

    ROM move the .zip to the ‘original_update’ folder in the Kitchen directory.(把.zip后缀的基包移动到制作工具没下的‘original_update’ 文件夹)

  5. How to cook your own Android ROM

    Add ROM image to working directory(添加ROM镜像到工作路径)

    In the menu press 1, then press enter to add the existing ROM to our working directory so that we can edit it. You will be given some options such as making a backup , and then a choice of ROM images within that directory. Choose the update-cm-7.1.zip.(再菜单里按1,然后按enter添加已有的ROM到的工作目录这样我们就可以编辑它了。你会得到一些选项,如做一个备份,然后在目录里选择ROM镜像。例如选择update-cm-7.1.zip。)

  6. How to cook your own Android ROM

    Rename the ROM(重命名ROM)

    Our first bit of personalization is to rename the ROM. In the Kitchen menu press ’8′. You will be shown the original name , press ‘y’ and then type in your new name and press enter. This will then show in Settings->About when you boot the ROM.(按‘8’会显示初始名,再按’y'然后输入你想要的名字,按'enter'完成。这些将显示在Settings->About 当你启动了这个ROM。)

  7. How to cook your own Android ROM

    Add/Remove some Apps(添加/删除一些应用)

    A common complaint with stock ROMS is that they come bundled with lots of apps that you don’t want. When cooking your own, you can add or remove apps by adding or deleting the .apk file in the system/app folder in the WORKING_myrom directory.(你可以添加或删除应用程通过添加或删除.apk文件在system/app文件夹中WORKING_myrom目录。)

  8. How to cook your own Android ROM

    ZipAlign your APKs(打包你的应用)

    After you have added or removed the apps you want, the next step is to zip align them. This process greatly speeds up access to the applications. In the Kitchen menu 

    press ’6′ and then press ‘y’. After this check for errors using option 23.(在您添加或删除应用后,下一步是压缩调整。这一过程大大加快了访问应用的速度。在工具菜单

    中,按“6′,然后按‘y'之后,经过检查错误后选择第23个选项。)

  9. How to cook your own Android ROM

    Build the ROM(编译这个ROM)

    Next we need to build the ROM. In the menu press ’99′ and then ’1′. Make sure to choose ‘y’ when asked to sign the ROM. You can then rename the .zip file to 

    something more personal. The ROM image will then be located in the Output_Zip folder.(在菜单中按“99′,然后1′。要求签名时,一定要选择' Y '。你可以将.zip文件重

    命名使它更个性化。这个ROM镜像最后将生产在output_zip文件夹里。)

  10. How to cook your own Android ROM

    Boot the ROM(运行这个ROM)

    Once the file is completed compiling ,copy the zip to the Sdcard and then boot into recovery by holding down the volume while turning on phone. Install as you would

     any other ROM and watch it load! Now go and try some moretweaks…(就是把刷机包刷到手机里,这样就完成了。)

    打那么多字还蛮累的,感谢外国的编辑,让我看到这么好的一篇文章,翻译能力有限敬请见谅。

    原文链接http://www.littlegreenrobot.co.uk/tutorials/how-to-cook-your-own-android-rom/

原创粉丝点击