Saturday, December 29, 2012

How to create Android Custom ROM

Some of you probably wonders: "Why another ROM?", "Why not using existing custom ROM?". So, this is my answer. Some ROMs are created specifically to a specific radio. Therefore, ROMs from Europe may be not compatible with devices from Asia. I don't know, what the cause of it. In my case, using Europe ROMs may cause bootloop into my Asia device. So, I have to create my own ROM.

How to create it? You see, a lot of ROM enhancers (I'm not saying 'creator' since they do not create it but modifying either stock ROMs or another custom ROMs) use DSIXDA's kitchen to make ROMs. I'm going to tell you how to create a little bit super ROM from stock ROM using the kitchen in Ubuntu :D (Sorry, I'm not too good at Windows). This tips works on HTC Wildfire S, but more or less may be working on other devices.


Preparing...

0. Backup your stock ROM with CWM (please refer to my previous post about installing CWM)

1. Download and extract the Kitchen in ~/kitchen

2. Copy system.img and boot.img from the CWM backup into ~/kitchen/original_update
        cp WFS-Pink-2012/system.yaffs2.img system.img
        cp WFS-Pink-2012/boot.img boot.img

3. Open the kitchen
        Run ./menu

4. Choose ROM to modify (option 1)
        After make some basic setup like name, etc. Now create!

5. (Optional) Use overclocked kernel (READ: Using other kernels with kitchen)

Start modifying in the kitchen...

6. Choose:
        2 to root (I chose c for SuperSU)
        3 to add busybox (a set of shell scripting utility required by many scripts)
        7 to change name

Move out unused apps inside WORKING_xxx/system/app. Please see list of (I think) required apks below.
        11 to deodex (allowing you to add themes, etc..)
                bb to backup
                v to change Android version of the ROM (enter 10 for 2.3.3+)
                b to start deodexing
          5 to optimize apps
        14 to add /etc/init.d
        13 to create /data/app functionality
        26 to add app2sd (if your current device's internal memory is too small like Wildfire S)
        99 to build ROM from this kitchen

7. Put custom bootanimation
        put bootanimation.zip into /system/media/ or /data/local/ or /system/customize/resource/. You should replace existing bootanimation.zip.
        You may get one from http://droidmodderx.com/installing-boot-animations/

8. Copy some useful-but-removable apps into /data/app/
        + Adobe Flash
        + Youtube
        + GMail
        + Facebook
        + ES Explorer
        + Terminal
        + Titanium Backup

        + WhatsApp
        + Yahoo Messenger
        + A2SD GUI                              // Only if you use DT-A2SD (app2sd)
        + No Frills CPU control              // Only if you use overclocked kernel

        + MX Player
        + My Data Manager

Start modifying in your device...

9. Create a ROM from it and flash it to your device (don't forget to wipe data, wipe cache partition and wipe dalvik cache prior to flashling the new ROM)

10. Flash some nice mods
        - Google Maps mod unlock (find it yourself)
        - Advance Power Menu from http://forum.xda-developers.com/showthread.php?t=1445222
        - Native screenshot from http://forum.xda-developers.com/showthread.php?t=1837850
                Add to build.prop:
                        ro.htc.framework.screencapture=true
                        don't forget to leave a blank line at the end of your build.prop

11. Fix Arabic font if your ROM has one
        http://forum.xda-developers.com/showthread.php?t=1410460

12. Install some nice scripts
        Run it using Script Manager as root
        - V6 supercharger to make memory usage efficient (Please see additional info below about installing it)

        Copy these scripts (find them) into /system/etc/init.d
        - Battery callibrator (87calibration by Jikantaru)
        - SD Card speed fix (77sdcardspeedfix)
        - Zipalign on boot (98zipalign by Wes Garner)

13. Create it as a final ROM.

Enjoy the dish...

14. After flashing for usage, you must tune your device through apps

        - No Frills CPU control: 
        - A2SD GUI: 
                + Zipalign on boot is ON
                + Dalvik Cache on SD-EXT
                + Set Dalvik VM Heapsize = 32

Remember to always wipe data, wipe cache partition and wipe dalvik cache prior to flashing a ROM into your device.

DT-Apps2SD in action!



Additional Tutorial: Installing V6 Supercharger, a memory booster

1. Run the script as root using Script Manager and answer:
    - Scrolling Speed: 1
    - Use Build.Prop: n
    - Launcher Strength: anykey (Die-Hard)
    - Kernel: H (Rock Hard)
    - Enable Miscellaneous & 3G Tweaks: y
    - Wheel Alignment: y?
    - Fix Emissions: y? => Fix file permission
    - Detailing: y? => Fix db index
    - Integrate init.rc = yes

    - Apply SuperMinFree Calculator Settings: y

    - You want to superclean and restart: y

2. Rerun the script once more, you should see 100% supercharged
    - Engine Flush (Y) => This should be run periodically using cron or like
    - SuperClean & Restart

List of required APKs in /system/app based on m1ndh4x8r Wildfire S ROM

  • AccountSyncManager.apk
  • ApplicationsProvider.apk
  • AppSharing.apk
  • Bluetooth.apk
  • BrcmBluetoothServices.apk
  • Browser.apk
  • Calculator.apk
  • Calendar.apk
  • CalendarProvider.apk
  • CertInstaller.apk
  • com.avast.android.antitheft.apk
  • com.htc.FriendStreamWidget.apk
  • com.htc.MusicWidget.apk
  • com.htc.TrendsWidget.apk
  • com.htc.TwitterWidget.apk
  • com.htc.WeatherWidget.apk
  • ContactsProvider.apk
  • CSPeopleSyncService.apk
  • CustomizationSettingsProvider.apk
  • CustomizationSetup.apk
  • DCSUtility.apk
  • DefaultContainerService.apk
  • DownloadProvider.apk
  • DownloadProviderUi.apk
  • DrmProvider.apk
  • FilePicker.apk
  • FlashLitePlugin.apk
  • Flickr.apk
  • FriendStream.apk
  • Ftp.apk
  • GenieWidget.apk
  • GoogleBackupTransport.apk
  • GoogleCalendarSyncAdapter.apk
  • GoogleContactsSyncAdapter.apk
  • GooglePartnerSetup.apk
  • GoogleQuickSearchBox.apk
  • GoogleServicesFramework.apk
  • Herring.apk
  • HtcAddProgramWidget.apk
  • HTCAlbum.apk
  • htccalendarwidgets.apk
  • HTCCamera.apk
  • HtcClockWidget.apk
  • HtcCompressViewer.apk
  • HtcContacts.apk
  • htccontactwidgets.apk
  • HtcDialer.apk
  • HtcDirect.apk
  • HtcDirectDownloadsProvider.apk
  • HtcFacebook.apk
  • HtcFMRadio.apk
  • HtcGreader.apk
  • HtcHubSyncProvider.apk
  • HTC_IME.apk
  • HtcLocationPicker.apk
  • HtcLocationService.apk
  • HtcLockScreen.apk
  • htcmailwidgets.apk
  • HtcMessageCS.apk
  • HtcMessageProvider.apk
  • HtcMessageUploader.apk
  • htcmsgwidgets.apk
  • HtcMusic.apk
  • HtcMusicMarkedItems.apk
  • HtcPhotoWidget.apk
  • HtcProfileWidget.apk
  • HtcRecommends.apk
  • HtcRecommendsWidget.apk
  • HtcResetNotify.apk
  • HtcSettingsProvider.apk
  • htcsettingwidgets.apk
  • HTCSetupWizard.apk
  • HtcSoundRecorder.apk
  • HtcSoundSetDownloadManager.apk
  • HtcStreamPlayer.apk
  • HtcSyncwidget.apk
  • HtcTipWidget.apk
  • HtcTwitter.apk
  • HtcWeatherWallpaper.apk
  • LiveWallpapers.apk
  • LiveWallpapersPicker.apk
  • LMW.apk
  • Mail.apk
  • maps6.14.1-mod.apk
  • MarketUpdater.apk
  • MediaProvider.apk
  • MediaUploader.apk
  • MessageTabPlugin.apk
  • Mms.apk
  • MyHTC.apk
  • MySketcher.apk
  • NetworkLocation.apk
  • OnlineAssetDetails.apk
  • PackageInstaller.apk
  • PCSCII.apk
  • Phone.apk
  • PicoTts.apk
  • PluginManager.apk
  • QuickLookup.apk
  • Rosie.apk
  • Settings.apk
  • SettingsProvider.apk
  • SetupWizard.apk
  • SkinPicker.apk
  • SkinScanner.apk
  • Slate.apk
  • Stk.apk
  • Stock.apk
  • Superuser.apk
  • SystemUI.apk
  • Talk.apk
  • TelephonyProvider.apk
  • Transfer-marvel-8.21.0.44-S21.apk
  • TtsService.apk
  • Updater.apk
  • UpgradeSetup.apk
  • UploadProvider.apk
  • UserDictionaryProvider.apk
  • Vending.apk
  • VoiceSearch.apk
  • VpnServices.apk
  • WeatherAgentService.apk
  • Weather.apk
  • WeatherProvider.apk
  • WeatherSyncProvider.apk
  • WiFiKill-1.7-1.apk
  • WifiRouter.apk
  • WorldClock.apk

References:
Supercharger - http://forum.xda-developers.com/showthread.php?t=1603953

No comments: