Microsoft Band Fitness Tracker Announced, Available

The wearable market has been around for a few years, with Pebble and Samsung smartwatches … more

Forums Added for the Oppo R5, Oppo N3, and Xiaomi Redmi Note

Just yesterday, Oppo unveiled a pair of rather unique smartphones, the Oppo … more

How to Play Music From Android Wear – XDA TV

Yesterday, we showed you how to do some advanced things with your Moto 360 quite easily … more

Google Updates Play Games, Wallet, Docs, Sheets, Slides, Drive, Google+, and Camera

While we haven’t really had much in the way of … more
Post Reply

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

OP Eliminator79

18th June 2014, 03:14 PM   |  #1  
Eliminator79's Avatar
OP Senior Member
Flag Alexandria
Thanks Meter: 438
 
267 posts
Join Date:Joined: Jul 2013
More
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


2) Open it using 7-ZIP

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

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

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

6)Cd kitchen  ./menu

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

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,163 84,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,163 84,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\wallpap erpicker\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
Nice Tip:CFQ Scheduler Makes the Media scanning process slow, Just Stick into SIO or deadline
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 [/FONT]
Last edited by Eliminator79; 5th September 2014 at 03:51 PM. Reason: Ease Of Reading
The Following 11 Users Say Thank You to Eliminator79 For This Useful Post: [ View ]
18th June 2014, 03:46 PM   |  #3  
Senior Member
Flag Smolyan
Thanks Meter: 24
 
212 posts
Join Date:Joined: Dec 2013
More
Good thread!
Last edited by D.Sirakov; 19th June 2014 at 02:14 PM.
3rd September 2014, 08:52 PM   |  #4  
axxx007xxxz's Avatar
Senior Member
Flag World
Thanks Meter: 41
 
388 posts
Join Date:Joined: Jul 2014
More
I have a problem:
  1. cd kitchen: work
  2. ./menu: doesn't work
Error
Can you help me?
Thanks in advance.
Attached Thumbnails
Click image for larger version

Name:	error1.png
Views:	487
Size:	35.1 KB
ID:	2923474  
5th September 2014, 03:08 PM   |  #5  
Eliminator79's Avatar
OP Senior Member
Flag Alexandria
Thanks Meter: 438
 
267 posts
Join Date:Joined: Jul 2013
More
Quote:
Originally Posted by axxx007xxxz

I have a problem:

  1. cd kitchen: work
  2. ./menu: doesn't work
Error
Can you help me?
Thanks in advance.

Thisguide may help.
you may also skip the DeOdexing part and download already deodexed ROM http://d-h.st/c6F
or that of @2010matej
5th September 2014, 03:18 PM   |  #6  
axxx007xxxz's Avatar
Senior Member
Flag World
Thanks Meter: 41
 
388 posts
Join Date:Joined: Jul 2014
More
@Eliminator79: Thanks!

[OFFTOPIC]Any news of Doomsday for Xperia E?[/OFFTOPIC]
5th September 2014, 03:44 PM   |  #7  
Eliminator79's Avatar
OP Senior Member
Flag Alexandria
Thanks Meter: 438
 
267 posts
Join Date:Joined: Jul 2013
More
:)
Quote:
Originally Posted by axxx007xxxz

@Eliminator79: Thanks!

[OFFTOPIC]Any news of Doomsday for Xperia E?[/OFFTOPIC]

Anytime
@DanielFlorin did the dRz ROM
there is no need for doomsday in XE Development
you can consider dRz as an initial release for Doomsday for XE
and im always with contact with him about porting some stuff from doomsday to dRz
5th September 2014, 03:49 PM   |  #8  
axxx007xxxz's Avatar
Senior Member
Flag World
Thanks Meter: 41
 
388 posts
Join Date:Joined: Jul 2014
More
Quote:
Originally Posted by Eliminator79

Anytime
@DanielFlorin did the dRz ROM
there is no need for doomsday in XE Development
you can consider dRz as an initial release for Doomsday for XE
and im always with contact with him about porting some stuff from doomsday to dRz

Now I'm using eXperia (see my signature); it is new dRz or I wrong?
5th September 2014, 03:52 PM   |  #9  
Eliminator79's Avatar
OP Senior Member
Flag Alexandria
Thanks Meter: 438
 
267 posts
Join Date:Joined: Jul 2013
More
Quote:
Originally Posted by axxx007xxxz

Now I'm using eXperia (see my signature); it is new dRz or I wrong?

Sorry for conflicting bro
i meant eXperia
Anyway,
Daniel Mentioned that he will release V3 but he needs some time
6th September 2014, 11:29 AM   |  #10  
axxx007xxxz's Avatar
Senior Member
Flag World
Thanks Meter: 41
 
388 posts
Join Date:Joined: Jul 2014
More
Quote:
Originally Posted by Eliminator79

http://d-h.st/c6F

It is DeOdexed system folder for Xperia E Jelly Bean or I wrong?

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Xperia Miro, Tipo (Dual), J, E Android Development by ThreadRank