[GUIDE][Noobs]How to Create your own stock based XPERIA ROM

Search This thread

Kiro Ayman

Member
Feb 10, 2015
45
3
Build Prop

Hey ur Build prop link doesn't work
u can send me ur build prop or
u can send me a video how to add thes lines to build prop becuz i have an error of foreground.......................etc
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    Hey Guys,
    My name is Braa, I’am just a new developer here in the XDA and today I’am going to show you a complete guide on how to make your own “XPERIA” Stock Based ROM.
    First of all you have to get the Stock XPERIA Firmware of your device

    Let’s get started to build our ROM:
    First Step: (Getting the STOCK FTF File of your Device)
    1) Get the latest stock FTF Firmware of your device

    0UmjvBq.jpg

    2) Open it using 7-ZIP
    kNBqD64.jpg

    3) Now we will be focusing on the most important file “system.sin” Just Extract it to your desktop
    4)Now go to the XPERIA Flashtool  Tools  Sin Editor   Choose the system.sin file you have just extracted to your desktop Extract Data
    5)Now you will have a file called “system.ext4”
    6)Get a tool called “EXT4 Unpacker” then select that file  Extract all the files into a folder
    isIzsX7.jpg

    Congrlatiouns you have got your stock device firmware but not in the form of “FTF” instead in the form of “ZIP”
    But this was not everything we will now move into more advanced part but don’t panic everything will be explained easily with screenshots so, Let’s GO !
    Understanding the System folder you have just extracted
    System Folder Contains the Majority of ROM Files, now we have to explain the SYSTEM Folder structure
    1. app : contain all the system's app and the odex file of system app
    2. bin : contain the command and bin files for the rom
    3. vendor: specified vendor system. you have your specific vendor's app, libs, and config files here also contains the Themes (XPERIA 2011-2012 Devices)
    4. etc : additional setting and files for the ROM.
    5. font : It’s Clear :p it contains the fonts
    6. framework : system's framework files and the odex file for framework
    7. lib : drivers, modules, kernel related files for the rom
    8. media: media files-ringtones, notification, bootanimation.
    10. usr : files needed for keyboard, bluetooth, etc.
    11. xbin : additional command and bin files (busybox is usually installed here)
    12. build.prop file : Contains your Device default properties
    Q)DEODEX VS ODEX
    A)Most of custom rom available is deodexed rom while our stock rom is half deodexed rom. I'll try to explain it in most simple way. First of all, we should understand that mostly every app in android consist of three part, *apk files, *dex/odex files, and lib files.

    ODEXED rom means that *dex file needed to run the app is extracted from the apk file and placed in same folder with the apk files (/system/app). the positive side, it consume less internal memory and a execute faster. the negative side, it makes the app uncostumizable (cannot apply custom themes) and need more space in system partition.

    DEODEXED rom means that *dex file needed to run the app is extracted from the apk file and placed in /data/dalvik-cache. the positive side, the app can be themed (full customizable) and consume less system partition. we could put more app in /system/app in deodexed rom. the negative side, it consume a lot of internal memory. please be cautious with the internal memory space if you use deodexed rom. (NOTE: if you start from stock rom, you may use Kitchen to convert odexed to deodexed rom).
    Now if you want a really looking good Ui ROM u will stick into DeOdexing your ROM
    Note: What was explained above in the part of ODEX VS DEODEX doesn’t mean that DeOdexing ROM will decrease it’s Performance

    Q)How to DeOdex My ROM ?
    A)Bro, This could be done using many tools like (Universal DeOdexer or DsiXda Kitchen)
    Now I will explain the Dsixda kitchen method
    Tools Needed:
    Cygwin
    JDK
    Android Kitchen
    Steps:
    1)Extract Cygwin.zip  Run Setup.exe  Next  Install from local directory  Set the root directory as it  Set the local package directory as cygwin_packages  Select that reload icon and install all
    gfex4yK.jpg

    2)Now Click on Cygwin icon on desktop you will see that commands appear automaticly
    3)Now Extract the kitchen Android-Kitchen-0.224.zip then rename it to “kitchen” (without the quotations)
    4)Then copy that folder into c:/Cygwin  home  your username folder
    5)Open the cygwin and write these commnds
    8I4Po8L.jpg

    6)Cd kitchen  ./menu
    CIPm0Xv.jpg

    7) Just compress the system folder we have just extracted from the ext4 unpacker into ZIP File
    h4Ik7No.jpg

    8)Now copy that file to C:\cygwin\home\Your username\kitchen\original_update
    9)Open the cygwin  then write the kitchen commands I’ve mentioned above
    10)Select “Set up working folder of your ROM”  Press Enter  Select the zip you compressed  It will ask you to add a null boot.img agree to this
    11)Select the “Advanced Options”  Select De-Odex files in your ROM  Select “b” DeOdex both folders (Recommended) wait till the process finishes
    Updater Script ! (Nightmare to a lot of noobs)
    Sorry Guys I can’t help you with this part  even my updater-script in my ROM I forgot how I did it here is it you can base your updater-script on it

    Just download it !
    WE’VE Done this part !
    Modifying your ROM
    1)Adding Tweaks
    1.1)Adding init.d Support
    Adding init.d support means that you can run your favorite scripts and tweaks on your Stock Based ROM
    Download the file “enable_init.d.zip” and put all its files inside system folder into your ROM System Folder

    1.2)Modifying Build.Prop for more stability
    Here’s a lot of Build.prop Tweaks
    1. Force launcher into memory
    ro.HOME_APP_ADJ=1
    2. Raise JPG quality to 100%
    ro.media.enc.jpeg.quality=100
    3. VM Heapsize; higher RAM, higher hp can be
    dalvik.vm.heapsize=48m
    4. Render UI with GPU
    debug.sf.hw=1
    5. Decrease dialing out delay
    ro.telephony.call_ring.delay=0
    6. Helps scrolling responsiveness
    windowsmgr.max_events_per_sec=150
    7. Save battery
    wifi.supplicant_scan_interval=180
    pm.sleep_mode=1
    ro.ril.disable.power.collapse=0
    8. Disable debugging notify icon on statusbar
    persist.adb.notify=0
    9. Increase overall touch responsiveness
    debug.performance.tuning=1
    video.accelerate.hw=1
    10. Raise photo and video recording quality
    ro.media.dec.jpeg.memcap=8000000
    ro.media.enc.hprof.vid.bps=8000000
    11. Signal (3G) tweaks
    ro.ril.hsxpa=2
    ro.ril.gprsclass=10
    ro.ril.hep=1
    ro.ril.enable.dtm=1
    ro.ril.hsdpa.category=10
    ro.ril.enable.a53=1
    ro.ril.enable.3g.prefix=1
    ro.ril.htcmaskw1.bitmask=4294967295
    ro.ril.htcmaskw1=14449
    ro.ril.hsupa.category=5
    12. Net speed tweaks
    net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
    net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
    net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
    net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
    net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
    13. Disable blackscreen issue after a call
    ro.lge.proximity.delay=25
    mot.proximity.delay=25
    14. Fix some application issues
    ro.kernel.android.checkjni=0
    15. Phone will not wake up from hitting volume rocker
    ro.config.hwfeature_wakeupkey=0
    16. Force button lights on when screen is on
    ro.mot.buttonlight.timeout=0
    17. Disable boot animation for faster boot
    debug.sf.nobootanimation=1
    18. Miscellaneous flags
    ro.config.hw_menu_unlockscreen=false
    persist.sys.use_di ring=0
    persist.sys.purgeable_assets=1
    dalvik.vm.dexopt-flags=m=y
    ro.mot.eri.losalert.delay=1000

    Q)How can I add these lines to my build.prop
    A)I will tell you
    Download a tool called “Notepad++”
    Extract the build.prop file from your ROM then right click on it then edit with notepad++
    Go to Last line:
    Then add
    # Tweak Name
    Tweak Properties
    #
    Done
    Here’s my build.prop I used in my ROM: its just a sample copy what you want from it ;)
    2)Bravia Engine 2 with X-Reality
    Download the file of BE-2 then paste it in your ROM then add these lines to build.prop
    # X-Reality Engine
    ro.service.swiqi2.supported = true
    persist.service.swiqi2.enable = 1
    #
    ro.service.swiqi3.supported = true
    persist.service.swiqi3.enable = 1
    #
    3) Modifying the wallpapers of the ROM
    Go to etc\customization\content\com\sonyericsson\wallpaperpicker\wallpapers
    Then Add your Wallpapers
    4) Modifying the Themes
    system\vendor\overlay\framework
    Themes are found here
    In newer XPERIA Devices Themes are found in /app

    5) Adding Supercharger intiries
    Just add these lines to your build.prop
    # V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox.
    # DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!
    # BEGIN OOM_MEM_Settings
    ro.FOREGROUND_APP_MEM=1536
    ro.VISIBLE_APP_MEM=3072
    ro.PERCEPTIBLE_APP_MEM=4096
    ro.HEAVY_WEIGHT_APP_MEM=20480
    ro.SECONDARY_SERVER_MEM=8192
    ro.BACKUP_APP_MEM=14080
    ro.HOME_APP_MEM=1024
    ro.HIDDEN_APP_MEM=10240
    ro.EMPTY_APP_MEM=15360
    # END OOM_MEM_Settings
    # BEGIN OOM_ADJ_Settings
    ro.FOREGROUND_APP_ADJ=0
    ro.VISIBLE_APP_ADJ=3
    ro.PERCEPTIBLE_APP_ADJ=3
    ro.HEAVY_WEIGHT_APP_ADJ=5
    ro.SECONDARY_SERVER_ADJ=7
    ro.BACKUP_APP_ADJ=6
    ro.HOME_APP_ADJ=1
    ro.HIDDEN_APP_MIN_ADJ=12
    ro.EMPTY_APP_ADJ=15
    # END OOM_ADJ_Settings
    # End of V6 SuperCharged Entries
    6) Making your Apptray Transparent
    Just Replace the apptray_pane_bg.9.png I provided to your Home.apk in store mode

    7) Changing the bootanimation (HDPI)
    XPERIA Z1
    XPERIA Z2

    8) Media not scanned or No pictures found here’s the solution
    Download Rescan media root and put it in data folder of your ROM

    If you are on 4.1.2 and HDPI Device (Maybe works on XHDPI or MDPI)
    So my ROM “Doomsday” is open source for you, it contains full XPERIA Z2 Ui just take the download link from my signature then download it and take what you need from it but don’t forget to give me the proper credits and press thanks for me


    Thread will be updated soon :laugh:
    2
    Might be an updater-script

    @Eliminator79 ho did you made a working custom rom from the above tutorial?

    I have created 15-20 custom rom in different ways from different tutorials from xda, mostly it stops installation with an error. 4-5 times it started phone just for showing start animation ...

    I quit....

    Right now Installed stock rom back. after wasting 2 days..
    :rolleyes:

    Might be an updater-script problem
    What's the error that comes during installation ?
    Status 7 or Status 6 :good:
    1
    this time is says , aborted status (0)

    View attachment 2893076

    Here is the updater script code

    Code:
    show_progress(0.1, 0);
    format("MTD", "system");
    mount("MTD", "system", "/system");
    package_extract_dir("system", "/system");
    symlink("dumpstate", "/system/bin/dumpcrash");
    symlink("debuggerd", "/system/bin/csview");
    symlink("mksh", "/system/bin/sh");
    symlink("toolbox", "/system/bin/chcon");
    symlink("toolbox", "/system/bin/setenforce");
    symlink("toolbox", "/system/bin/grep");
    symlink("toolbox", "/system/bin/runcon");
    symlink("toolbox", "/system/bin/touchinput");
    symlink("toolbox", "/system/bin/getsebool");
    symlink("toolbox", "/system/bin/setsebool");
    symlink("toolbox", "/system/bin/restorecon");
    symlink("toolbox", "/system/bin/getenforce");
    symlink("toolbox", "/system/bin/load_policy");
    symlink("toolbox", "/system/bin/cp");
    symlink("toolbox", "/system/bin/playback");
    symlink("toolbox", "/system/bin/du");
    set_perm_recursive(0, 0, 0755, 0644, "/system");
    set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
    set_perm(0, 3003, 06755, "/system/bin/ip");
    set_perm(0, 3003, 02750, "/system/bin/netcfg");
    set_perm(0, 3004, 02755, "/system/bin/ping");
    set_perm(0, 2000, 06750, "/system/bin/run-as");
    set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
    set_perm(0, 0, 0755, "/system/etc/bluetooth");
    set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
    set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
    set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
    set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
    set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
    set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
    set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
    set_perm(0, 2000, 0755, "/system/vendor/lib");
    set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
    set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
    show_progress(0.1, 10);
    show_progress(0.2, 0);
    show_progress(0.2, 10);
    unmount("/system");

    you should set correct code partition in your update script
    i mean this lines:

    format("MTD", "system");
    mount("MTD", "system", "/system");

    you can find this lines in another custom roms which correct work on your phone.
    just find this lines in that custom rom ( in meta inf folder in that custom rom ) then copy that lines and replace that in your update script
    if your custom rom has a kernel , you should find the partition of kernel at the end of update script and replace in end of your update script
    finally replace the update binary in that custom rom which correct work on your rom with your update binary.
    do this work at the end of your work.means make your rom first then do this work with your rom.zip file

    hope can help you ;)
    1
    Maybe works

    I have also used the working update script downloaded from Eliminator79's 2nd post... but still displaying same error..

    Replace the whole META-INF folder of your ROM with mine :D
    Strongly will work :good: