[OUTDATED GUIDE]Make Custom Rom Easier Than Cycling
Things you need:
- Base firmware (i'm use Gingerbread S5830SERKPH 2.3.4)
- Windows (I'm use windows 7 X64 service pack 1)
- Linux (Ubuntu recommended)
- And the last thing is, You need enough experience in android world
what should we do to modify it :
- Flash your phone with your desired base firmware.
- Make required modifications at your phone.
- After that, do hard reset to your phone.
- Next back up system.rfs .
- put system.rfs with boot.img, data.rfs, recovery.img from PDA base firmware in one folder.
- After that, repack your custom rom.
How to back up System.rfs :
- Remove useless widgets
- Add more apps
- Change theme
How to hard reset your phone :
- Download at market "terminal emulator"
- next run this code:
dd if=/dev/stl12 of=/sdcard/system.rfs
How to repack your custom rom :
- Move by root explorer your modification apps to system/app then change permission like this :
- Next change the owner to "root" by root explorer
- At least boot into recovery mode "HOME+POWER" and choose "wipe data/factory reset" be sure your contact data already backup
How to change your rom name :
- PDA by running this code via terminal at linux:
change ROMNAME to your desired, of course, ROM name.
tar -H ustar -c boot.img recovery.img data.rfs system.rfs >> ROMNAME.tar
md5sum -t ROMNAME.tar >> ROMNAME.tar
mv ROMNAME.tar ROMNAME.tar.md5
- If you want to build One-Package ROM, just use 1st and 2nd command and don't forget to include all files on all *.tar.md5 (such as modem, csc, apboot) like this :
tar -H ustar -c *.* >> ROMNAME.tar
md5sum -t ROMNAME.tar >> ROMNAME.tar
Another Handy Modification Guide:
How to edit system.rfs on your Pc :
- At root explorer you see at folder system "build.prop"
- Open it in text editor edit "ro.build.display.id=GINGERBREAD.XXKPH" with your rom name
- importan : if you want to edit system.rfs at windows, DON'T use Magic Iso, why? because i was use it, then my system.rfs corrupt.
How to Unpacking & repacking the image :
- you must have linux (ubuntu recommended)
- run it from terminal :
sudo mount -o loop system.rfs /some_dir
- make required modification
- then Unmount it
Note: below I give you the details for unpacking and repacking manually, but I have attached two perl scripts that do most of this for you
If you are good with a hex editor, you can open up any of these images and strip off the first 2k of data. Then, look for a bunch of zeroes followed by the hex 1F 8B (which is the magic number of a gzip file). Copy everything from the first line of the file, through the zeroes, and stopping at the 1F 8B. That is the kernel. Everything from the 1F 8B through the end is the ramdisk. You could save each of these files separately. In order to see the contents of the ramdisk, you need to un-gzip it and then un-cpio it. You could use a command like this (ideally after creating a new directory and cd'ing into it):
gunzip -c ../your-ramdisk-file | cpio -i
That will place all of the files from the ramdisk in your working directory. You can now edit them.
In order to re-create the ramdisk, you need to re-cpio them and re-gzip those files, with a command like the following (remember, cpio will include everything in the current working directory, so you probably want to remove any other cruft you might have in there):
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
The final step is to combine the kernel and your new ramdisk into the full image, using the mkbootimg program (which you should download and compile from the git repository):
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel your-kernel-file --ramdisk newramdisk.cpio.gz -o mynewimage.img
Now, there's a lot of hassle in pulling apart files in hex editors and remembering all of these commands, so I wrote unpack and repack perl scripts for you (attached). Hooray.
How to Manually deodex your phone :
- What you'll need:
- Unzip xUltimate v2.2, and launch "Main.exe"
- If everything goes well xUlt should recognize the phone and make a connection. You now should see a list of options.
- Run option 1. After option 1 is done, run option 2.
- Now these well take a while. Run option 3.
- IMPORTANT: After you have run option 3, you MUST navigate to the xUltimate folder and find "origi_frame" folder, and delete "guava.odex". It's a bad file, and interferes with deodexing process.
- Now run option 4, and wait.
- Exit xUltimate, and put the phone in USB mass storage.
- Go back into the xUltimate folder and copy "done_frame", and "done_app", and move them to the root of the sdcard.
- Put the phone in PC mode
- Open a command prompt, and do the following:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Your phone should now be deodexed!
You may notice an increase in speed, and you now have the ability to edit certain files with greater effects.
How to change bootanimation :
- using a Root explorer goto the /system/media directory.
- Copy bootanimation.zip to your SD Card.
- Connect your droid to your computer with usb and mount the SD Card
- Copy bootanimation.zip to your computer.
- extract bootanimation.zip to a folder
- Inside you will find 2 folders with all the individual PNG files in them.
- With photoshop or paint modify the png files to add your custom graphics, OR make/download your own pictures. (Make sure they are match with your phone device)
- Highlight the two folders and the desc file.
- Right click the highlighted files.
- Select add files to archive.
- Select Zip check box
- In the compression method drop down box select Store. (this is key if you dont do this it wont play the animation)
- save the archive as bootanimation.zip
- copy the new bootanimation.zip to your SD Card
- Select the bootanimation.zip file from your SD Card and move it... system>media>paste
i'm just 12 years old if i can do it, why you can't