[TOOL] Incremental ROM builder (Linux) - RAZR i Android Development

This is just a small script to compare two ROMs from the same series. It will find the difference of the two ROMs and build a zip file contains only the altered files.
Just tested with Omar-Avelar's 5.5 & 5.8 ROMs, the final "update.zip" is only about 7M.
Any feedback is welcomed.
INSTRUCTIONS
1. put the attached script in an empty folder
2. make two symbolic links to the unziped ROM folders, "new" for the newer ROM, "old" for the older one.
3. run the script in that folder
4. the result file will be called "update.zip"
5. DO NOT format system partation when use recovery to upgrade.

Setarcos said:
This is just a small script to compare two ROMs from the same series. It will find the difference of the two ROMs and build a zip file contains only the altered files.
Just tested with Omar-Avelar's 5.5 & 5.8 ROMs, the final "update.zip" is only about 7M.
Any feedback is welcomed.
INSTRUCTIONS
1. put the attached script in an empty folder
2. make two symbolic links to the unziped ROM folders, "new" for the newer ROM, "old" for the older one.
3. run the script in that folder
4. the result file will be called "update.zip"
5. DO NOT format system partation when use recovery to upgrade.
Click to expand...
Click to collapse
This might come in very handy, would it be compatible porting a Mediatek based ROM?

Related

Problems upgrading OS's in Kitchens

I'm a little noobish when it comes to building roms. Right now I'm using Ervius kitchen and I can add/remove packages and all sorts of things just fine. My problem is when I want to put a newer OS in I run into a problem when I flash the device. No matter what OS I try, when I flash, I get to the "preparing your device for first use" progress bar, it completes and then I just get a white screen which never goes past.
The steps I'm taking are:
1. Take the OS files which include a SYS folder and an XIPKernel Folder.
2. Copy SYS folder into the SYS folder of the Kitchen
3. Create a new folder in ROM\RHODIUM named : 2xxxx and copy XIPKernal Folder to there.
4. In the ROM\Shared folder, copy one of the ones there and paste and renamed to the 2xxxx name in step 3.
5. Rebuild Rom and send to device.
Am I missing a step here, two other people told me that above is what I need to do but it never works.
stevecn70 said:
I'm a little noobish when it comes to building roms. Right now I'm using Ervius kitchen and I can add/remove packages and all sorts of things just fine. My problem is when I want to put a newer OS in I run into a problem when I flash the device. No matter what OS I try, when I flash, I get to the "preparing your device for first use" progress bar, it completes and then I just get a white screen which never goes past.
The steps I'm taking are:
1. Take the OS files which include a SYS folder and an XIPKernel Folder.
2. Copy SYS folder into the SYS folder of the Kitchen
3. Create a new folder in ROM\RHODIUM named : 2xxxx and copy XIPKernal Folder to there.
4. In the ROM\Shared folder, copy one of the ones there and paste and renamed to the 2xxxx name in step 3.
5. Rebuild Rom and send to device.
Am I missing a step here, two other people told me that above is what I need to do but it never works.
Click to expand...
Click to collapse
I created a guied for Da_G's Raphael Kitchen. You can use the guide for the Rhodium and everywhere you see Raphael in the Guide, just change it to Rhodium. The guide tells you to copy the EXT folder to a new build number also, but you don't really have to do this. I am using Ervius Kitchen 1.8.2 without any problems.
Here is the link to the guide. http://forum.xda-developers.com/showpost.php?p=4288317&postcount=197
Hope it helps you get things going.

[Q] how to create cm7.2 odin flash fw

hi guys i am running cm7.2 nightly on my captivate and i want to create an odin flashable firmware of cm7.2 rom on windows xp for backup purpose please give me a full tutorial on doing this
I believe it isn't possible. I was asking around for ICS and from what i gathered it isn't.
Two things you could do.
1.download the newest nightly that you want to base it on.
2. Use Root Explorer and EXTRACT ALL.
3. Then go to the extracted folder for the nightly, and delete out the SYSTEM folder.
4.Now MAKE SURE you have your phone set up EXACTLY how you want it to look like. Reboot the phone once that is done.
5. Now with root explorer navigate to /system and long press on the system folder. Choose COPY
6. Navigate to the extracted folder (which should be like sdcard/speedsoftware/extracted OR something like that) and go into the folder where you deleted out SYSTEM folder earlier. Now long press and choose PASTE.
7. Back out until your back at the extracted folder name, long press on it and choose RENAME. Pick the name you want it to be. (I usually use something like: CM7.2RockRattRedRemixThemed02-10-2012).
8.Long press on the name again and choose ZIP THIS FOLDER.
9. GO TO ZIPPED FOLDER.
10. Move the zipped folder to your sdcard, reboot to recovery and flash it to make sure it works.
11. If it worked just copy or or move that .zip file to your computer for backup.
Or I can upload the one I have created so you can see it and test it out. I have made some other changes so it is partially already themed, has the theme chooser. apk File I use instead of the stock theme chooser .apks that come with the original cm7. I use zip themer to set up certain things so they are automatically themed when just flashing the build i created. Hope this helps you get an idea of a pretty bazsic way of making your own cwm flashable cm7 rom already personalized. Oh I also delete of some of the apps that come in cm7 and just put my own personal apps into the system folder so I already have them built in.
Sent From My KickAss ATT SGS2 SPORTING CM7
RockRatt said:
Two things you could do.
1.download the newest nightly that you want to base it on.
2. Use Root Explorer and EXTRACT ALL.
3. Then go to the extracted folder for the nightly, and delete out the SYSTEM folder.
4.Now MAKE SURE you have your phone set up EXACTLY how you want it to look like. Reboot the phone once that is done.
5. Now with root explorer navigate to /system and long press on the system folder. Choose COPY
6. Navigate to the extracted folder (which should be like sdcard/speedsoftware/extracted OR something like that) and go into the folder where you deleted out SYSTEM folder earlier. Now long press and choose PASTE.
7. Back out until your back at the extracted folder name, long press on it and choose RENAME. Pick the name you want it to be. (I usually use something like: CM7.2RockRattRedRemixThemed02-10-2012).
8.Long press on the name again and choose ZIP THIS FOLDER.
9. GO TO ZIPPED FOLDER.
10. Move the zipped folder to your sdcard, reboot to recovery and flash it to make sure it works.
11. If it worked just copy or or move that .zip file to your computer for backup
Click to expand...
Click to collapse
thanks for your effort and reply but i want to create odin flashable fw not cwm, i know how to create cwm flashable rom, but anyway thanks for your reply
You could DD'ing a back up of all partitions and then tar'ing it, then flashing it in ODIN
Aren't the partition blocks different on AOSP?
Yess, but you can look them up then dd them, and DL the pit with heimdall, and create an ODIN FW flasher
Boot.img vs zImage. Way around?
decompile the boot.img and grab the zImage from the decompiled boot.img
b-eock said:
You could DD'ing a back up of all partitions and then tar'ing it, then flashing it in ODIN
Click to expand...
Click to collapse
can you please tell me step by step tutorial, i also dont know about dd'ing and do not use heimdal so cannot create pit file

When to flash recovery?

I found this site on how to root my Touchpad:
http://forum.xda-developers.com/showthread.php?t=1390829
and this one on how to install CM onto it:
http://chrisbryson.blogspot.com/2013/09/how-to-install-android-on-hp-touchpad.html
But nothing mentions when/how to install CWM (or one of the ones listed below) as shown on the CM nightly page found below
-PhilZ Clockworkmod 6.0.4.7 (non-touch)(will backup and restore in both cwm and twrp format)
-Milaq's ClockworkMod 6.0.5.4
-Flintman's TWRP
http://forum.xda-developers.com/showthread.php?t=2592909
At what place would I flash the Recovery?
To install android you will create a folder on the touchpad called cminstall.
This folder contains the three files needed to install android - moboot, cwm and whichever version of android you prefer. Optionally you can flash gapps from this folder too.
There are much better tutorials on the web and this site than the ones you quote - the first is irrelevant to installng android, and there are better ones here on xda than the second.
Also the recoveries you mention are for installing kitkat which requires repartitioning of the file system. Prob best to stick to JB for now
Cheers
chris5s said:
To install android you will create a folder on the touchpad called cminstall.
This folder contains the three files needed to install android - moboot, cwm and whichever version of android you prefer. Optionally you can flash gapps from this folder too.
There are much better tutorials on the web and this site than the ones you quote - the first is irrelevant to installng android, and there are better ones here on xda than the second.
Also the recoveries you mention are for installing kitkat which requires repartitioning of the file system. Prob best to stick to JB for now
Cheers
Click to expand...
Click to collapse
I found a tutorial here:
http://forum.xda-developers.com/showthread.php?t=2147284
But when I attempt to extract the Acme Installer - I downloaded ACMEInstaller5M - but when I try to extract with 7Zip to the Nova Directory it keeps giving me an error?
You don't need to extract the acmeinstaller file, just place it in Program Files/Palm, Inc, open up a terminal window and enter in the command to run it.
Of course, you do this after you have set up your cminstall folder on the touchpad.
A word of advice - I find it useful to have 2 copies of the rom you want to flash - one in the cminstall folder, and one in the root folder of the touchpad. This is because sometimes the flashing process with acme can be a bit funny, and it automatically deletes the files in cminstall once its done. I've flashed a couple of touchpads with acme and Android hasn't installed properly, so having a backup somewhere else on the touchpad is useful.
Cheers
jo15765 said:
I found a tutorial here:
http://forum.xda-developers.com/showthread.php?t=2147284
But when I attempt to extract the Acme Installer - I downloaded ACMEInstaller5M - but when I try to extract with 7Zip to the Nova Directory it keeps giving me an error?
Click to expand...
Click to collapse
It's been awhile since I have had to use acme but I believe it is a jar file so either use a different browser to download or change the file extension from (.zip to .jar).
Unfortunately I am not at my PC but can check later if someone else is unable to confirm this.
sstar said:
It's been awhile since I have had to use acme but I believe it is a jar file so either use a different browser to download or change the file extension from (.zip to .jar).
Unfortunately I am not at my PC but can check later if someone else is unable to confirm this.
Click to expand...
Click to collapse
Its not a .jar or .zip, use as is...
Cheers

[GUIDE][TUTORIAL] Create small flashable zips to restore before applying MODs/Fonts

I originally posted this on the G2 forum, now I am on OnePlus and I realized of course this is the same procedure with a few small differences in file locations, etc, so posting here too.
GUIDE: CREATING SMALL FLASHABLE ZIPs TO RESTORE FILES OR SETTINGS WITHOUT HAVING TO DO FULL NANDROID RESTORE
This will enable you to apply MODs without having to do a FULL NANDROID restore to recover if the MOD fails or if you don't like it
This brief guide will teach you how to create a flashable ZIP file that you can use to restore your phone to pre-MOD settings if you want to revert back or if the MOD simply does not work
WITHOUT having to do a full restore of your phone.​
It is a very good idea to create these backup flashable ZIPs and keep them safe to recover from mishaps or when creating/testing MODs/themes.​
*************************************************************************************************************************************************
As usual: Disclaimer: I am not responsible for any loss of data or functionality on your phone. To be 100% sure, always make a NANDROID backup if you are not 100% certain you can recover.
*************************************************************************************************************************************************​
There are many reasons you might want to do this, for example when testing a MOD for another ROM that is similar to yours but not exactly the same, or when upgrading your ROM to a new version and wanting to re-apply old MODs to test if they work.
There are many ways to get into boot loops or fail to boot, the biggest culprit being fonts installations, but include also bootanimations and others.
INSTRUCTIONS:
Part 1: general
1. Install ZIPme app from playstore
2. Find out which files are being modified by the MOD you are trying to apply, this is usually framework-res.apk, SystemUI.apk, but be aware that some MODs affect a lot of files. See part 2 for more details on how to do this.
3. If you are applying a font, don't worry, the FONTs section (see part 2) should cover all Fonts.
4. If you are applying a bootanimation, don't worry, the bootanimation section (see part 4) should cover all Bootanimations.
5. For every flashable ZIP you create you can test it straight away by booting into recovery and applying the zip file. There is no reason why it should not work.
Part 2: FONTS
1. In ZIPme select the following:
- ADD FOLDER: /system/fonts
- ADD FILE: /system/etc/system_fonts.xml
2. Create the flashable zip in an /sdcard location you can access from recovery
Part 3: MODs that affect framework-res.apk, LGSystemUI.apk or any other app
1. Find out which apks are being modified:
- You should of course read the OP (instructions for the MOD)
- The easiest way to find out modified apks is to download the MOD and open it: the zip file will contain either the apk files themselves or have directories with the names of the apks being modified.
- You can always ask the developer to make sure
2. Once you have a full list of files being affected you can create the flashable zip:
- in ZIPme, simply select "ADD -> File" for every file being affected
- If you have an ODEX ROM (.odex files are present) make sure you pick those too!
- save the flashable zip in an /sdcard location you can access from recovery
Part 4: Bootanimations
1. In ZIPme select the following:
- ADD FILE: /system/bin/bootnimation
- ADD FILE: /system/media/bootanimation.zip
2. Create the flashable zip in an /sdcard location you can access from recovery
Part 5: Other flashable files you should always keep handy
1. Always keep with you the following files for good measure: they don't take much space but can help recover from problems without having to fully restore from NANDROID backup
- original kernel from your ROM
- flashable bootloader (if you do not know what I am talking about then DON'T do it)
- flashable baseband (if you do not know what I am talking about then DON'T do it)
- flashable recovery image (TWRP, etc)
- "Xposed-Disabler-Recovery.zip": this is created by Xposed when you install it. It is located in the root folder of your sdcard. Copy it and put it somewhere safe.
- SuperSU: keep a flashable latest SuperSU with you to recover root
Any comments, suggestions, feedback are welcome

[MODULE] Boot Animation Installer

This is a simple module to replace your device's boot animation systemlessly.
Supports any device (probably)
Supports any boot animation (for your device)
Use with Magisk 20.3 or newer
Usage:
Place any boot animation.zip file on root of internal storage
( sdcard/ or storage/emulated/0/ )
Default install location is /system/media
(Most devices use this location)
If your device doesn't place boot animations there, you can create a txt file on the root of internal storage (This file is automatically generated after running the script once) to specify a different install location. It needs to be labeled
Code:
install-location.txt
Contents of it should be the location directory for your device
Example
Code:
/system/media
Or
Code:
/carrier/media
Thanks to @topjohnwu for Magisk
Thanks @Zackptg5 for MMT-Extended and debugging
Tested on OnePlus 7T - Android 10 - Magisk 20.3
Future plans are to add this module to the Magisk Official Repo, but for now downloads are attached here.
Also planned support for more than just bootanimation.zip such as Samsung phones
Script Error
During the installation, the script says "Install-location.txt not round!" In which folder should I place the install-location.txt file ?
LavaboSatanique said:
During the installation, the script says "Install-location.txt not round!" In which folder should I place the install-location.txt file ?
Click to expand...
Click to collapse
( sdcard/ or storage/emulated/0/ )
LavaboSatanique said:
During the installation, the script says "Install-location.txt not round!" In which folder should I place the install-location.txt file ?
Click to expand...
Click to collapse
After installing the first time, if it doesn't find it, it will make one that you can edit. Or you can place it in the root of your internal storage. Usually /sdcard
Thanks! Was going nuts trying to find something that worked for my Oneplus 7T Pro Mclaren.
Will it work with MSM Xtended ROM for oneplus 7T?
vikram. vikie said:
Will it work with MSM Xtended ROM for oneplus 7T?
Click to expand...
Click to collapse
Yes if you set the location to system/product/media
Cm4nXD said:
Yes if you set the location to system/product/media
Click to expand...
Click to collapse
Tried but no luck.
Working fine on Mi 9T. Thanks!
cant seem to get this to work on my pixel 3 running the last Dirty Unicorns.
Got this working. Thanks.
Neither working for me. Only longens the boot. My Device is an FP3 on Andoid 10 and location /system/product/media. Just to give you an short feedback.
I had to unzip the replacer zip file and edit the customize.sh file. Also put everything including your new bootanimation in root of internal storage.
You need to modify these lines:
# Construct your own list here
REPLACE="
$LOCATION/bootanimation.zip
to something like this :
# Construct your own list here
REPLACE="system/media/bootanimation.zip"
after REPLACE= this is the location of your original bootanimation.zip which us usually in system/media but may also be in locations like prism/media/carriers/single/ATT/media/
on newer Samsung phones. The ATT would be replaced with whatever network name your phone is on like VZ, TMOB etc or whatever you find in that folder if your aren't on ATT.
droidzer1 said:
I had to unzip the replacer zip file and edit the customize.sh file. Also put everything including your new bootanimation in root of internal storage.
You need to modify these lines:
# Construct your own list here
REPLACE="
$LOCATION/bootanimation.zip
to something like this :
# Construct your own list here
REPLACE="system/media/bootanimation.zip"
after REPLACE= this is the location of your original bootanimation.zip which us usually in system/media but may also be in locations like prism/media/carriers/single/ATT/media/
on newer Samsung phones. The ATT would be replaced with whatever network name your phone is on like VZ, TMOB etc or whatever you find in that folder if your aren't on ATT.
Click to expand...
Click to collapse
The $LOCATION variable is read from the install location txt file.
I have a rooted OP8T running DerpFest... I got this to work making the following 2 changes:
1. If you edit "customize.sh" file, there is no need for the "install-location.txt" file...
- here is what mine looks like (notice I left all lines in place)
Code:
# Construct your own list here
REPLACE="
system/product/media/bootanimation.zip
"
2. If you unzip the file, you'll see a "system" folder... I basically created the same folder structure from above and then added the "bootanimation.zip" file I want to use. For example, the files and folders within "system" should match ur phones directories. This idea came from a similar Mod I used on the same phone, but with the stock OS.
So once everything was in place, I zipped that along with the edited "customize.sh" file into a new "bootanimationreplacer" file.
If anyone has an OP8T, my modified version should work for you... I also created my own boot animation if you wanna check it out.

Categories

Resources