Android OS Forum banner
1 - 20 of 66 Posts

·
Teenage Hacker >:)
Joined
·
228 Posts
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:

Code:
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:

Code:
./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.
 

·
Android Beginner
Joined
·
75 Posts
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.
 

·
CELL TECH
Joined
·
1,173 Posts
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.
 

·
Average Android
Joined
·
420 Posts
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.
 

·
Teenage Hacker >:)
Joined
·
228 Posts
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.
 

·
Registered
Joined
·
1,298 Posts
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
 

·
Average Android
Joined
·
420 Posts
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.
Always would give credit. I'm at no skill level to release shit lol.
 

·
The Dude
Joined
·
287 Posts
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.
I will take you up on this offer..lol ... yes i will.
 

·
Average Android
Joined
·
420 Posts
Woot. Darkrom Alpha 1 booted lol.

I added a random APK for adw launcher and it didn't seem to do anything. Still uses blur launcher, but I didn't see the blur launcher APK anywhere to remove. Would have thought it would have made me pick one or the other.

This is really cool, but without any thememing skills am I really just adding or removing APKs? Is there more I can do with the kitchen?
 

·
Teenage Hacker >:)
Joined
·
228 Posts
Discussion Starter · #14 ·
Woot. Darkrom Alpha 1 booted lol.

I added a random APK for adw launcher and it didn't seem to do anything. Still uses blur launcher, but I didn't see the blur launcher APK anywhere to remove. Would have thought it would have made me pick one or the other.

This is really cool, but without any thememing skills am I really just adding or removing APKs? Is there more I can do with the kitchen?
Are you using Kejar's or a different base?

And yes, there's not much else to do than that if you aren't editing APKs.
 

·
Android Beginner
Joined
·
21 Posts
frostincredible said:
Are you using Kejar's or a different base?

And yes, there's not much else to do than that if you aren't editing APKs.
Thanks for the tutorial. It is greatly appreciated. Do you know how to compile roms from source like cyanogemmod? I would love to get into it.
 

·
Teenage Hacker >:)
Joined
·
228 Posts
Discussion Starter · #16 ·
Thanks for the tutorial. It is greatly appreciated. Do you know how to compile roms from source like cyanogemmod? I would love to get into it.
I kind of sort of do...if you follow Googles instructions at http://source.android.com/ it helps a lot. But where it gives you the AOSP repo, just put in CMs instead (or dhackers if you want the ICS4DB files).
 

·
CELL TECH
Joined
·
1,173 Posts
this is helping me so much its gross, I'm getting good at some of it, still bad at others, but im creating something, just not sure what it is, I am now a master at restores, well honestly I've always been a master at restores but its not something I like to brag about"hey I'm so lame I bricked 6 times today! DDOOOIIIII DUHHH. I like to eat paste too"
 

·
Teenage Hacker >:)
Joined
·
228 Posts
this is helping me so much its gross, I'm getting good at some of it, still bad at others, but im creating something, just not sure what it is, I am now a master at restores, well honestly I've always been a master at restores but its not something I like to brag about"hey I'm so lame I bricked 6 times today! DDOOOIIIII DUHHH. I like to eat paste too"
You're posts make me lol

And glad it's helping, looking forward to what you make!!
 
1 - 20 of 66 Posts
Top