Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

* * * * *
2 votes

[HOW-TO] Build a simple ROM with stock Moto base.

build rom how to easy
  • Please log in to reply

OP frostincredible

frostincredible

Teenage Hacker >:)

Posted 07 December 2011 - 06:05 PM #1

How to build a simple ROM from Stock Moto ROM

by: frostincredible


-Prerequisites:

---OS's this works on:

-------Ubuntu (recommended)

-------Windows 7

-------Mac OS X

---Minimal Knowledge of Terminal/CMD recommended


1. Find a ROM.zip to start with (must be deodexed if planning to theme ANYTHING). For just plain stock deodexed, use Kejar31's here: http://rootzwiki.com/topic/5061-romcwm-deodexed-debloated-bionic/ (if you release the ROM, be sure to ask if it's alright with him you are using it, and give him credit for the base in the OP of your thread).

2. Install dsixda's Android Kitchen (newest version v0.188). Download and follow install instructions on this page in post 2, (easiest on Ubuntu in my opinion) http://forum.xda-developers.com/showthread.php?t=633246. (I know it says retired, but I have used this on my BIONIC and it works perfect!).

3. Open the folder that you put the Kitchen files in from the instructions in the XDA post. Open your "original_update" folder, and put your ROM.zip from step 1 into this folder.

4. Open Terminal and cd into the folder of your Kitchen, for example, if it was in your home folder you would type:

cd ~/*your username*/Kitchen
(if you named the Kitchen folder something else than type that where it says "Kitchen")

5. Run the Kitchen menu by typing this in Terminal:

./menu

6. Choose option 1 "Set up working folder from ROM"

6a. Choose your ROM.zip (should be the only option if you only put in one).

6b. Wait for it to set up working folder. (When asked whether to convert updater-script to update-script choose NOT to do this, leave it as is).

Note: It will tell you that it needs a boot.img to proceed, and whether it should create a fake one, choose yes to make fake one, as it removes it when building the ROM. The reason our ROMs do not contain boot.img’s is because our bootloader is locked, that is where the boot.img is stored. The boot.img on the BIONIC is encrypted, and if the bootloader sees that it is not, it simply does not boot.

7. Use any of the other options available in the kitchen menu that you wish to include (however, recommended to not use the following options: 2, 5, 7, 9, 10, 11, 12, 19, 20, 21, 22, 23, 24. This is because they either will not work with the ROM, are already implemented in Gingerbread (which the BIONIC ships with), can hurt the phone, or are just unnecessary for the current project).

Don’t run option 99 (Build ROM from working directory) yet! And don’t close Terminal!

8. Go to your Kitchen folder and open your WORKING_DIRECTORY_*date here* folder, and open the "system" folder. (Do NOT edit anything in the META-INF folder, unless you are taking "Liberty" out of the updater-script [see Final Note]).

9a. In this folder, you will find all of your ROM's folders, from the apps, to the libs, to the frameworks, to everything. This folder IS the ROM. If you are looking to add a theme to it, you are going to want to edit the following APKs: /system/app/SystemUI.apk, /system/framework/framework-res.apk, /system/framework/moto-res.apk, /system/framework/blur-res.apk.

To edit these files, you will need apktool (again, recommended Ubuntu). To learn how to use and how to install apktool, go here: http://code.google.com/p/android-apktool/

The only real commands you will need to know to use it after you install it (how to install is on the Google Code page linked above) is:
apktool d APK.apk - This will decompile the APK
apktool b APK.apk - This will build the APK.

9b. You can also replace the APKs if you want to do something such as replace the Launcher for expample. To do so, simply delete Blur-Launcher.apk from the /system/app folder, and put in something such as ADWLauncher.apk. MAKE SURE YOU ALWAYS HAVE A LAUNCHER, otherwise you won’t have a home to work the phone from after you install it!!

10. After you are done with any and all modifications you want to make to the ROM, open the Terminal window that you have the Kitchen menu running in. Choose option 99 “Build ROM from working directory” and choose option 1 “Interactive Mode,” choose Y to zipalign, it will build the update.zip, and choose Y when it asks to SIGN the ROM!

Your are completed! Put the completed ROM onto your SDCARD and flash in CWM! Be sure to back up! Be sure you didn’t leave out any important parts! And have fun with your new custom ROM!


Final Note: Before releasing, because you used (assuming you used) Kejar31's base ROM, you will need to take out the "Liberty" banner from the updater-script. To do so, go to your WORKING_DIRECTORY and go to META-INF/com/google/android and open the updater-script in a text editor. Then simply delete all the lines at the beginning of the file that start with "ui_print" and save and you are done. Do this edit BEFORE you build the ROM. After this, it will no longer say "Liberty" while installing.

Edited by frostincredible, 03 March 2012 - 08:14 PM.

  • 14 Likes
Device: iPhone 5 32GB, Nexus 7
Current ROM: Custom AOSP

bionicmonkey

bionicmonkey

Member

  • 68 posts

Posted 07 December 2011 - 06:57 PM #2

Awesome always wanted to try building a ROM can't wait to try
  • 0 Likes

_matt

_matt

Android Freedom

Posted 07 December 2011 - 07:15 PM #3

Thanks for this
  • 0 Likes

belatukadro

belatukadro

Android Beginner

  • 75 posts

Posted 07 December 2011 - 07:19 PM #4

frost, thank you soooooo much for this. I have been searching for something like this to try and get a toe dipped into dev, as its something I really want to do.
I think i'll give it a try tomorrow after I get linux up on my lappy :-D.
  • 0 Likes

darkrom

darkrom

Average Android

  • 420 posts

Posted 07 December 2011 - 08:59 PM #5

Thank you!!!

Tomorrow @ work = adderall + vm ubuntu and an attempt at a rom of my own.
  • 0 Likes

sjflowerhorn

sjflowerhorn

Android Aficionado

Posted 07 December 2011 - 10:08 PM #6

Nice post.
  • 0 Likes

terryrook

terryrook

CELL TECH

Posted 07 December 2011 - 10:22 PM #7

You are the fuc#ing man! This is the clearest, most well and most needed thread in our section imho. Watch and see what people do with this. Ive already started. Seriously my wife is hot,ill send you pics if you want. I owe you big time. Thank you for sharing your knowledge with the rest of us. For those that cant tell I AM TOTALLY JOCKING RIGHT NOW. Not to be confused with joking.
  • 0 Likes
ASPIRING DEVELOPER BUT STILL LEARNING- Does your mom still have to tell you to wipe? THEN WHY SHOULD WE?
My name is Terry, and I am a Flashaholic, and I also like bacon, long walks on the beach, and The Departed...that's it.
I'VE SOFT BRICKED MORE DROID'S THAN I CARE TO REMEMBER SO IF YOU NEED HELP, HIT ME UP, THEN AGAIN....
ROM OF CHOICE: BEANS TOWN!!!

darkrom

darkrom

Average Android

  • 420 posts

Posted 08 December 2011 - 06:59 AM #8

Will safestrap work with a rom created using the De-bloat linked here or will we have to change anything to make it work?


Also, could I use the same guide and use Theoryrom or eclipse or something? Just curious. Due to my lack of experience I'll start with the de-bloat, but the safestrap question is kind of important.
  • 0 Likes

OP frostincredible

frostincredible

Teenage Hacker >:)

Posted 08 December 2011 - 07:28 AM #9

Will safestrap work with a rom created using the De-bloat linked here or will we have to change anything to make it work?


Also, could I use the same guide and use Theoryrom or eclipse or something? Just curious. Due to my lack of experience I'll start with the de-bloat, but the safestrap question is kind of important.


I haven't tried it with Safestrap, so I can't speak from that perspective. I don't really know if there's a difference in the way updater scripts are written for Safestrap or if they're the same...but to the Th3oryRom or Eclipse question, yes, you can use them too, but don't release without getting permission from DT or nitro, always give credit. :)

Edited by frostincredible, 08 December 2011 - 07:29 AM.

  • 0 Likes
Device: iPhone 5 32GB, Nexus 7
Current ROM: Custom AOSP

runandhide05

runandhide05

Android Guru

Posted 08 December 2011 - 09:58 AM #10

Correct me if i an wrong but u can use a backup of stock ROM to use as your base, at least I was with the gs2, captivste, and the dx
  • 0 Likes