[Guide] Make your first custom Rom- easiest way - Android Software Development

Newbies Thinks to make custom rom.. but dunno how
But when forever king's guide here NO prob!​
Things we Need-
1 winrar or winzip
base rom
Brain
notepad ++
Things You will find in Rom (when will you extract-:
1- Boot.img (in some roms not)
2-System
3- Meta-inf
No need to touch Boot.img, Meta inf as i will tell later on
So open system folder
Open Build.prop in system folder and open with notepad++
Open this page
tweaks by forever king
See open build.prop tweaks
And open build.prop and scroll to last....
Press enter
and type
"#Tweaks"
Now add all tweaks in that Webpage
Mods
You can add many mods like
1 Beats Audio (2.3+)
2 Adrenaline Engine (2.3+)
3 SlaidyBoost (2.3+)
4 Megabassbeats (2.2+ need$ xloud)
U need to port them to ya fone , dont ask me as i also dunno l0l
Adding tweaks to ya rom (build.prop)
Open build.prop (system folder)
find line ' ro.build.id=xxxxxxx '
Now change this to ' ro.build.id=yournameorwhatever '
Adding Apps to your Rom
1 Open system>app (folder)
Add .apk files to it (copy n paste xD)
2 Adding Init.d tweaks (if your base rom having init.d support in boot.img)
Open this webpage
tweaks by forever king
Scroll down (lil bit)
and see init.d tweaks
Add like this
Make new file and paste any script
like
"echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree"
this and save this file (no extention , save without .txt or any)
3 Adding bootanimation
Replacing bootanimation
-download bootanimation u want to use and rename it to "bootanimation.zip"
-delete animation u find in /./"rom"/system/media and then paste bootanimation u downloaded
Now modifying framework (u see statubar in rom and many tweaks)
Using UOT kitchen
Thanks to "CallMeVentus" for guide
Finnaly Done... will add more when i am freek xD >.<
Now Compress it in .zip
Now sign the Rom Signer
Open and see how
now flash Rom and test.....
if workeD then coool
Never say 'thanks' , hit it ​

Advance for N00bs
Never say thanks,hit it ​
How to make Rom transparent
See my guide = http://forum.xda-developers.com/showthread.php?t=1799373
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to decompile android app , u need this TUT for making rom transparent or editing apps..
See my guide= http://forum.xda-developers.com/showthread.php?t=1772220
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to add powermenu on your Rom
http://forum.xda-developers.com/showthread.php?t=811532
Thanks untermensch
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Some tweaks making Rom fast
http://www.mediafire.com/?t8rsdmedu5w2vo5 (by me)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to Deodex Rom and >odex back
Things nEeded
Code:
backsmali.jar
* smali.jar
* custom java.awt.jar
* dexopt wrapper
* recent version of busybox
Download this
Open CMD CD to folder extracted those scripts and type
1 Deodexing Framework files-
Code:
java -Xmx1024m -jar baksmali.jar -c :core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -x android.policy.odex
(i am taking android.policy.jar as example , if framework.jar or whatever just change 'android.policy.jar' to 'framework.jar' and 'framework.odex'
This will make out folder
now smali that out folder by
typing
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
in CMD
HTML:
open android.policy.jar with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed android.policy.jar
2 Deodexing any App file i am taking systemUI.apk as example
Code:
java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:com.google.android.maps.jar:com.samsung.device.jar:com.yamaha.android.media.jar:core.jar:core-junit.jar:ext.jar:framework.jar:ime.jar:input.jar:java.awt.jar:javax.obex.jar:libvtmanagerjar.jar:monkey.jar:pm.jar:sec_feature.jar:seccamera.jar:sechardware.jar:secmediarecorder.jar:services.jar:sqlite-jdbc.jar:svc.jar:twframework.jar -x SystemUI.odex
Again out folder created now make it smali
by typing
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
in CMD
open SystemUI.apk with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed SystemUI.apk
Click to expand...
Click to collapse
3 Now we will learn to odexing back
1/ backup your original files (apk jar and odex) to /sdcard/Mod/
2/ copy modified deodexed files (.apk and .jar) in /system/framework/
3/ open a CMD prompt in the folder of adb.exe (usualy /android-sdk-windows/platform-tools/)
4/ type command :
Code:
adb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jaradb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
It will makepatched_apknameyouodexing file now remove (renaming) "patched_" line so it will be "apknameyouodexing.odex"
Now copy Signatures- (in same CMD)
Code:
# if not already done ...
adb shell
su
# copy the original .odex and .jar in system/framework (not .apk) :
cp /sdcard/MOD/original.XXX.odex /system/framework
cp -f /sdcard/MOD/XXX.jar /system/framework # where XXX.jar is the original odexed .jar
# give all permissions to XXX.odex files :
chmod 777 /system/framework/original.XXX.odex
chmod 777 /system/framework/patched_XXX.odex
# copy signature :
busybox dd if=/system/framework/original.XXX.odex of=/system/framework/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
response must be :
busybox dd if=/system/framework/original.XXX.odex of=/system/framewor
k/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.002042 seconds, 9.6KB/s
Done now odex/deodex your Rom , so easy!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Changing splash Screen (bootsccreen before bootanimation)
Ok. 1st of all i dont maDe this script and i dont know who made it xD but i would day 'thanks' to Him
http://www.mediafire.com/?sr6lso6w7vj21o6
How to use this!! >>??
Decompile boot.img Scroll down to see HoW to decompile it/use DSIXDA kitchen
Ramdisk>initlogo.rle (make new folder and paste initlogo.rle into it)
now extract that downloaded kit in it
1 Now open CD to location and type
Code:
convert_image to rle.bat initlogo.rle
(if u named .rle file to 'yourfilename'
then type
Code:
convert image to rle.bat yourfilename.rle
2 the filename.raw file and filename.rle file will be created at the same location as filename.rle
Now yoU will see filename.png edit it like what you Want xD
3 For compiling filename.png to .rle , CD to that folder having dose files!
typE
Code:
convert rle to image.bat filename.png
Use this if you see Decompiled .rle Burred-
Code:
@bin\convert -depth 8 -size 333x774 rgb:initlogo.raw initlogo.png
(take your phone's size i just took which my mind told xD)
4 Now you will see new file named
filename.png.rle rename it to filename.rle
Done now replace it into your extracted boot.img and repack it
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Decompilng Boot.img
I didnt made this Script http://www.modaco.com/topic/340710-tool-edit-bootimg/ is originall thread thanks to him
Download Boot.img tools
So easy to use
Just extract it in folder
Now place boot.img also in it
Now open 'start.bat'
* Press 1 to decompile the boot.img
* replace the ramdisk.gz (if you want)
* replace the kernel (if you want)
* Press 2 and it will compile the boot.img again!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Modifying updater-script (found in /META-INF/com/google/android)
Open with Notepad++
Now you can see in this pic theres written 'Welcome to Cm installer....'
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
How to make this!
open updater-script
you will see 1st line ! make enter so you can add 1 line (at first)
Now add
Code:
ui_print("your text anything");
Code:
package_extract_dir("system", "/system");
tells extract directory system to system (in android)
Code:
mount("system");
tells mount specific directory like u can change location to dev folder
Code:
unmount("/system");
means unmount from where you mounted ! before
Code:
show_progress(0.200000, 5);
tells us that show progress like you can see when installing Rom yellow lines comes (CWM) u can control by this. its by Seconds..
Code:
symlink("busybox", "/system/xbin/fold");
means make symbolic link to that file at folder 'xbin'
Code:
format("MTD", "system");
means format mounted system folder
Code:
delete("/data/local");
Tells that delete /data/local folder
Code:
set_perm(0, 0, 0777, "/system/bin/chka2sd");
set pem means setting permission like chka2sd permission rww-rww-rww
Code:
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
it means flash boot.img make raw file (image) at tmp/boot (afterwards android do which i dunno) and delete that file!
Now save this file
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Modifying settings.apk
Creed$ rom!
you can see 'author name' which is not in our normal settings!
how he D!d?
Decompile apk by apkmanager ( i wont tell again xD , not by apktool )
1 goto res>xml open "device_info_settings.xml"
2 scroll to last and add line before "</PreferenceScreen>" line
3 add this line
Code:
<Preference android:title="Rom name (or whatever" android:summary="My rom name (what ever)" style="?android:preferenceInformationStyle" />
you can add many of them
4 Now compile from apkmanager when ask delete any file from 'keep folder' delete this file from keep folder and Install apk
too easy!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Enabling CRT animation on 2.3x
CRT animation is dam cool animation effect when locking phone so see how to make in your rom
But what is it?
1 Decompile framework-res.apk
2 goto res>values>bools.xml
3 Change "<bool name="config_animateScreenLights">true</bool>" to "<bool name="config_animateScreenLights">false</bool>"
Done.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Swipe to clear notifications
http://forum.xda-developers.com/showthread.php?t=1483193
thanks hansip87
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When i do something (just that thing which i moded) i got bootloap/loop!
1 Open that think you will get loop
2 open terminal
3 type
Code:
su
logcat>sdcard/logcat.txt
So end. i will add more if i got any in mind/guidE xD

A nice guide for the noobs, but I think all of this is a little basic. But if you keep adding onto this, then it will be a great guide.

Nice

asvantypography said:
Nice
Click to expand...
Click to collapse
thanks button dere
invasion2-- adding sooon!!

Is it possible to deodex from terminal emulator?

-XoRoX- said:
Is it possible to deodex from terminal emulator?
Click to expand...
Click to collapse
sooory dude! but u can thru fone.... I saw app' odex me ' or maybe it was 'deodex me' I dunno it works/not

Thanks for your work!

john9 said:
Thanks for your work!
Click to expand...
Click to collapse
button there >.< read....this..every user commenting btw welcome!

Thanks for this guide! I assume no linux dev environment is needed, cuz I can't, at least that's what happened with dsixda kitchen
Sent from my HTC_Amaze_4G using Xparent Green Tapatalk 2

eggydrums said:
Thanks for this guide! I assume no linux dev environment is needed, cuz I can't, at least that's what happened with dsixda kitchen
Sent from my HTC_Amaze_4G using Xparent Green Tapatalk 2
Click to expand...
Click to collapse
press thanks n welcome...I will add sooon its long so its future plan xD

modifying settings tut is wrong.
we have to edit xml in strings and public also

lol ur wrong
Avilove.Cullen said:
modifying settings tut is wrong.
we have to edit xml in strings and public also
Click to expand...
Click to collapse
ps. I am not editing settings.xml!
its lyk this! I made it dude! public.xml?
which entry? of Icon? no Icon needed!

Well its comprehensive and noob proof
Just a side note: Always mention the link to original article of any forum especially the deodexing part!
Secondly as Avilove.cullen said the tutorial for modification in Settings is incomplete as you also have to kang up the respective strings in strings.xml
And FYI we need not modify public.xml only when you put icons or images

varun.chitre15 said:
Well its comprehensive and noob proof
Just a side note: Always mention the link to original article of any forum especially the deodexing part!
Secondly as Avilove.cullen said the tutorial for modification in Settings is incomplete as you also have to kang up the respective strings in strings.xml
And FYI we need not modify public.xml only when you put icons or images
Click to expand...
Click to collapse
ok... will makE comlelty fr noobs !
dude I sa!d credits to dere devs ok will add link soon xD
fr icons u r wrong
decompile microfire 2's rom decompil settings.apk lol seee fire icon deres entry in public.xml Icons- which sum roms having coloured icons ! seee I can calll aksh too he also say this!
its ofcourCe v need png entry in settings.xml (or whereva)
and 1 png of that name I'm drawable-xxx

For adding strings, adding those strings in string.xml and public.xml is not necessary.... u cat do that too... but it works without adding too... i checked it ma self.... just remv "@string\" and "your_text".....

When adding a new menu item you need to edit the layout right?
Sent from my LG-E739 using Tapatalk 2

mistere372002 said:
When adding a new menu item you need to edit the layout right?
Sent from my LG-E739 using Tapatalk 2
Click to expand...
Click to collapse
Actually this isn't fundamental
It depends on the original developer where he defines it
In case of settings.apk it is with xml folder.

varun.chitre15 said:
Actually this isn't fundamental
It depends on the original developer where he defines it
In case of settings.apk it is with xml folder.
Click to expand...
Click to collapse
OK so say you wanted to add a list item called start clock. You would add the preferencescreen code and specify the target in settings.XML only? You wouldn't add lines to Id.XML or strings.XML and values.XML and then specify where in the layout folder of the appropriate XML in that folder?
Sent from my LG-E739 using Tapatalk 2

Who knows the reason for always apps optimizing in my custom Rom in every reboot?( always android is upgrading)
Sent from my SK17i using xda premium

Related

[GUIDE] Beginners/Ref Guide to Making Roms.

Hi guys! I see many people trying to learn how to make roms, Here i show the easiest and shortest way on how anyone can begin making roms for the Galaxy S3. ​
Requirements:
Prepared CWM Stock Package.
Apktool
7-zip
Notepad ++
Setting Up, and Introduction​
IF you have downloaded firmware from sammobile instead of zoot1's package, use this part for Setting up and introduction: http://forum.xda-developers.com/showpost.php?p=37812381&postcount=33
OR ELSE THE EASIER WAY
To start with, Download the prepared CWM Stock Rom by zoot1 here: http://forum.xda-developers.com/showthread.php?t=1868004
I personally use firmware from sammobile, because i like to do everything myself. Though this method would be easier for beginners.
Extract the zip file to folder called "ROM".
Now lets head towards the customizing.
Thanks to Prawesome alot for this part. I took some info from his guide.
So now, open up the system folder. You'll find loads of folders in it. Here is a brief introduction to each of those folders:
1. apps
When you open this folder. You will find apk's. An apk is an install-able app package for any Android Device.
You can delete specific apps incase you want to delete. But take extra precautions on what you're deleting. As some apps are useful. You can add apps here as well in formats of apk's. But note, adding Play Store apps to the system/app folder is not recommended. For example you don't want Google Talk in your rom, you just have to delete the Talk.apk.
2. bin
Nothing really to mod in this folder. Full of advanced techy stuff. xD
3. etc
Here is where most of the tweaks come in. There is a folder called init.d where mods like the V6 Supercharger or multi-tasking fixes can be applied. Note! Don't add more than 1 or 2 scripts. Most of them usually conflict with each other.
In the gps.conf file, you can edit your gps info to make the gps more accurate. Pretty good guides about this, search them out.
Next is the hosts file. Devs use this to block sites from generating ads, and keeping their roms ad-free. Take a look at my DroidS3 hosts file, there are over 20,000 hosts blocked. You can use the same hosts file for your rom too.
4. Fonts
Very easy folder to understand. All you need to do here is replace ttf files, and you'll change the fonts.
5. Framework
Here is where the big mods come in. I'll explain further on about this. It contains the android.policy.jar, a useful element to add many mods. Framework-res is used to change wallpapers and theme the rom. I'll explain later.
6. libs
Contains all the libs needed for specific system apps to work. Don't mess here unless you're adding a mod.
7. Folders like csc, hdic, sipdb, wakeupdata, vendor, excetra..
These are the folders, there isn't much to do. Csc folder contains the feature.xml where some mods can be added. Search the forums for that. The rest contain multi-languages and more stuff.
8. xbin folder
Used to add scripts like busybox, dexdump, openvpn support. More like the bin folder but smaller.
9. Build.prop
Ever wondered how some roms have android 5.0, when it hasn't even released? All you need to change is the ro.build.version.release to any number you like. Even Android 20! Go change it, and fool some noobs out there. More mods can be added to this file. e.g:
Code:
debug.sf.hw=1
video.accelerate.hw=1
debug.performance.tuning=1
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
ro.config.nocheckin=1
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.telephony.call_ring.delay=0
ro.lge.proximity.delay=15
mot.proximity.delay=15
ro.ril.disable.power.collapse=0
pm.sleep_mode=1
ro.config.nocheckin=1
The codes listed above are for improving jpeg quality, saving some battery life, reducing call delay and more. Search for build.prop mods, you'll find loads of them. ​Now, a small explanation of the Meta-inf folder.
In Meta-Inf you'll find the updater-script.
Since this is aimed at beginners, I'll just show you how to change what text is shown during install in CWM.
Just edit what's in the quotes of the ui_print code in the file, and enter your own text. e.g:
Code:
ui_print("Hi, This message in quotes is displayed in recovery");
Modding!​
It's time for the modding to begin.
Get apktool from: http://forum.xda-developers.com/showthread.php?t=1755243
Now, first copy your framework-res from the /system/framework directory to where you extracted apktool files. Let's call this folder "apktool"
Open the folder apktool, press shift and right click. Click on "Open command window here". Type:
Code:
apktool if framework-res.apk
Now you are ready to decompile apk's.
I'm going to show you how to mod different files. Copy over:
SystemUI.apk
android.policy.jar
framework-res.apk
1. SystemUI.apk
Just showing you basic modding here. Copy over SystemUI.apk to apktool folder. In the command prompt, type
Code:
apktool d SystemUI.apk
After it's done, you should see a SystemUI folder in the apktool directory.
I'm going to show you how to make the status bar transparent, thanks to raubkatze for this part.
Navigate to res/layout/tw_super_status_bar.xml and change android:background to match the red line.
Code:
<com.android.systemui.statusbar.phone.StatusBarWindowView [B][COLOR="Red"]android:background="#00000000[/COLOR][/B]" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Save and close.
Then navigate to /res/values/drawables.xml
Edit to match:
Code:
<item type="drawable" name="status_bar_background">[COLOR="red"][B]#00000000[/B][/COLOR]</item>
That's it. Save and close.
Go back to your command prompt and type
Code:
apktool b SystemUI SystemUI-new.apk
After it's done, probably will take around 5-10 minutes. You'll find SystemUI-new.apk in your apktool folder. Open both SystemUI.apk and SystemUI-new.apk with 7-zip. Delete AndroidManifest.xml from SystemUI-new.apk and copy AndroidManifest.xml and META-INF from SystemUI.apk to SystemUI-new.apk
That's it. Close the zip files.
If you have adb or android-sdk push SystemUI-new.apk to your phone using:
Code:
adb remount
adb push SystemUI-new.apk /system/app/SystemUI.apk
adb reboot
If you don't have adb, just copy over SystemUI-new.apk to your phone. Rename it to SystemUI.apk and copy to system/app with root explorer. Reboot.
There you have transparent statusbar now! ​
2. android.policy.jar
Decompile android.policy.jar with:
Code:
apktool d android.policy.jar
You will find android.policy.jar.out, open it and use Cristiano Matos guide to mod the files: http://forum.xda-developers.com/showthread.php?t=2018633
After that use:
Code:
apktool b android.policy.jar.out
Open the android.policy.jar.out folder, you will find a dist folder created and inside that is your modified android.policy.jar.
You can use adb again by:
Code:
adb push android.policy.jar /system/framework
or the normal root explorer method. ​
3. framework-res.apk
Here i'll show you small mods.
Decompile it using
Code:
apktool d framework-res.apk
Navigate to res/values/bools.xml. ​Here you can add these. Thanks to DSA for this! :
4 Way Rotation:
Code:
Code:
<bool name="config_allowAllRotations">false</bool>
Change to:
Code:
Code:
<bool name="config_allowAllRotations">true</bool>
Lock Screen Rotation:
Code:
Code:
<bool name="config_enableLockScreenRotation">false</bool>
Change to:
Code:
Code:
<bool name="config_enableLockScreenRotation">true</bool>
and
Code:
Code:
<bool name="lockscreen_isPortrait">true</bool>
change to
Code:
Code:
<bool name="lockscreen_isPortrait">false</bool>
Disable Keyboard Switch In StatusBar When Typing
Code:
Code:
<bool name="show_ongoing_ime_switcher">true</bool>
Change to:
Code:
Code:
<bool name="show_ongoing_ime_switcher">false</bool>
Unplugging From USB doesn't Turn Screen On
Code:
Code:
<bool name="config_unplugTurnsOnScreen">true</bool>
Change to:
Code:
Code:
<bool name="config_unplugTurnsOnScreen">false</bool>[/indent]
Now to change wallpaper. Change the default_wallpaper.jpg in drawable-xhdpi and to change lockscreen wallpaper change keyguard_default_wallpaper.jpg.
Now recompile using:
Code:
apktool b framework-res framework-new.apk
Delete AndroidManifest.xml from framework-new. Copy AndroidManifest.xml and META-INF from framework-res.apk to framework-new.apk
To test use adb:
Code:
adb push framework-new.apk /system/framework/framework-res.apk
Or rename to framework-res.apk and copy to system/framework using root explorer. Reboot.​
Once you've added everything, your modified apks. Ui_print mods, A custom kernel (just replace boot.img) it's time to compile. Now this is really easy. Just highlight all the folders/files like system, meta-inf and boot.img. Right click. Hover over 7-zip and click Add to Rom.zip. Wait for it to be done, and copy Rom.zip to your sd card and flash. Voila! You've made your rom!!​
You can get more mods to add from here: http://forum.xda-developers.com/showpost.php?p=26583654&postcount=4
I was a beginner once, everyone was a beginner once. People helped me, and now I want to help people.
Press the Thanks button, and/or rate this thread 5 stars to show your support. ​
FAQ
- How do i add a mod?
To add a mod, just download it. Open it and copy over all the folders from the zip file EXCEPT the META-INF.
- How can i set up apktool on windows?
To set up apktool on windows, you need aapt, apktool.jar and apktool.bat
- My modified apk is not working?
Do some testing and get to know what went wrong. I'm always here. I'll be glad to help.
- Are these the only apps i can modify?
Ofcourse not! Any apk can be modified. Just decompile it, and make your changes.
- I'm looking for a guide on something i want to learn. Can you add it here?
I'll try my best.​​​
Reserved
Reserved one more.
Any feedback guys? I hope this is useful.
Forget that i had to reserve one more.
R: [GUIDE] Beginners/Ref Guide to Making Roms.
Looks interesting...when i will finish my exam i will check with more attention
Sent from my GT-I9300 using xda app-developers app
Willy89 said:
Looks interesting...when i will finish my exam i will check with more attention
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Thanks. Glad it's of help.
Sent from my GT-I9300 using xda premium
Thnx for making this thread.
It's always useful to read thread's like this.
Nice job.
Verzonden door mijn GT-I9300 met xda premium
Great guide, thanks, I will point Theshawty in this direction :thumbup::thumbup:
slaphead20 said:
Great guide, thanks, I will point Theshawty in this direction :thumbup::thumbup:
Click to expand...
Click to collapse
Too late old man. Not interested in building roms anymore.
Thanks guys.
If there's anything you'd like to have added.
Let me know.
AW: [GUIDE] Beginners/Ref Guide to Making Roms.
Thanks. That's it what i searched for to start. Great.
weli..this would be intersting..and will c hw thread moves...
I Need Help In Building the ROM
Hi,
I am steinert. i need your help in biulding the rom, actually i finished everything but getting the problem while flashing the rom. when i googled it. i came to know that the problem lies in updater-script. i used root explorer to find out the reason. it was like.
FINISHED EXECUTING SCRIPT FILE
EXIT VALUE:126
STDOUT:
NULL
STDERR:
SH:<STDIN>[1]:/CACHE/RECOVERY/LAST_LOG:CAN'T EXECUTEERMISSION DENIED.
I Hope that You help a NOOB like me....
Thank you in advance....
Jacqueline Steinert said:
Hi,
I am steinert. i need your help in biulding the rom, actually i finished everything but getting the problem while flashing the rom. when i googled it. i came to know that the problem lies in updater-script. i used root explorer to find out the reason. it was like.
FINISHED EXECUTING SCRIPT FILE
EXIT VALUE:126
STDOUT:
NULL
STDERR:
SH:<STDIN>[1]:/CACHE/RECOVERY/LAST_LOG:CAN'T EXECUTEERMISSION DENIED.
I Hope that You help a NOOB like me....
Thank you in advance....
Click to expand...
Click to collapse
After flashing the rom.
Check the error through Advanced > Show recovery log in recovery.
Post results here.
I : checking for entendedcommand..
I : skipping execution of extendedcommand, file not found...
Jacqueline Steinert said:
I : checking for entendedcommand..
I : skipping execution of extendedcommand, file not found...
Click to expand...
Click to collapse
Huh?
Get me a screenshot of your meta-inf/com/google/android directory.
What exactly did you modify? It should work if you left the meta-inf untouched.
masterex567 said:
Huh?
Get me a screenshot of your meta-inf/com/google/android directory.
What exactly did you modify? It should work if you left the meta-inf untouched.
Click to expand...
Click to collapse
I just removed all the apps and inserted new apps...!!
Should i send you my updater-script?
Jacqueline Steinert said:
I just removed all the apps and inserted new apps...!!
Should i send you my updater-script?
Click to expand...
Click to collapse
Removed all?
Some are core apps like SystemUI, etc.
Get me a screenshot of your rom.zip..
masterex567 said:
Removed all?
Some are core apps like SystemUI, etc.
Get me a screenshot of your rom.zip..
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is the screenshot of my rom..! and before also i got the same problem with out changing the system .apk's
Jacqueline Steinert said:
View attachment 1700664
This is the screenshot of my rom..! and before also i got the same problem with out changing the system .apk's
Click to expand...
Click to collapse
Highlight those 3 and in 7zip options click add to " ".zip
Sent from my GT-I9300 using xda premium

[Guide For creating custom Rom's]N00B Proof ]

So you heard alot about creating a custom rom how about creating one with ease with this simple guide you will find it easy
So for whom is this guide?
1.Absolute Beginners.
2.People with little or no programming skills
3.people who really want to learn how to make custom rom's
4.people who want to learn android and don't know where to start
Click to expand...
Click to collapse
Tools Required : (Update them manually and report me dead links please)
Java JDK FROM HERE FOR INSTALLING CYWIGN
WARNING: Do not install Cygwin before the JDK!!
Click to expand...
Click to collapse
Cywign Direct Download- Linux Terminal For Windows
Android Kitchen (ROM Development Tool)- For Cooking custom ROM and many more things, Please update this Kitchen to latest version when available.
notepad++ - for editing files like build.prop, updaterscript
MOST IMPORTANT TOOL YOUR BRAIN... AND ALSO LOTS OF TIME...
Click to expand...
Click to collapse
Step one: Installing the JAVA JDK, Cygwin and Setting up the Kitchen
*Before you do anything install the java jdk* (don't skip)
Try this Dsixda Kitchen Install Picture Tutor(recommended)Or
Watch this video guide by gitagaire for how to setup cygwin and kitchen
http://www.youtube.com/watch?feature=player_embedded&v=sYJMdHPD410
Now for the real developing so lets get ready
Click to expand...
Click to collapse
INSTRUCTIONS
1.Download and extract the cygwin_packages.zip
2.Run the set up(make sure there is no previous cygwin installation)
NOTE: INSTALL CYGWIN IN ROOT DISK LIKE C:\
1. Follow the kitchen read me txt!!!
2.Run the set up(make sure there is no previous cygwin installation)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
1.when it shows all the package names, go to the top and select "all default" until it changes to "all install" (you must click on the arrows)
Click to expand...
Click to collapse
1.Download the kitchen from above. Then, extract the kitchen's .zip file to a folder under your home account. Rename the dsixda-android-kitchen-*** folder to just "kitchen". In Cygwin, this folder would depend on what was set for your Cygwin install directory, e.g. C:\cygwin\home\John\kitchen
NOTE!! If your user folder contains spaces (e.g. C:\cygwin\home\John Smith\kitchen), then the kitchen will not function properly. Instead, copy it under C:\cygwin\home\kitchen
1.It's the time now you run the kitchen so follow carefully
2.Run the kitchen and follow
those who have their kitchen like this C:\cygwin\home\John\kitchen use these commands given below.
cd kitchen(enter)
./menu(enter)
Click to expand...
Click to collapse
those who have their kitchen like this C:\cygwin\home\kitchen use these commands given below.
cd ../kitchen(enter)
./menu(enter)
Click to expand...
Click to collapse
Click to expand...
Click to collapse
If every things are right you should have this
congratulations!! you have sucsessfully setup up The kitchen
Click to expand...
Click to collapse
Step Two: Setting up a working folder
THERE ARE TOW METHODS FOR THIS -but i will mention only one for now.
1. WHEN YOU HAVE BASE ROM AVAILABLE.
FIRST METHOD -
1.First our folder structure should look like this:
Code:
cygwin folder/home/your user name/kitchen
1.Inside the kitchen it should look like this:
1. Now we need a base rom for working on, You can any rom but i don't know if it works with stock roms:silly:
Just Place the original rom zip in the original_update folder inside the kitchen.
2.run the cygwin.exe again type:
Code:
cd kitchen(enter)
./menu(enter)
1.now enter option 1, enter again. You should see your rom listed, choose and enter
you will be asked about changing the working folders name, at this point it makes no difference so just continue.
2.congratulations you have a working folder!!!:victory:
Step Two :change/modify/update rom
YOU CAN MODIFY YOUR ROM IN TWO STEPS:
MODIFY USING ANDROID KITCHEN - for basic modification.
MODIFY MANUALLY. - for advanced modification.
1. MODIFYING USING ANDROID KITCHEN
watch this amazing tutorial by neroyoung on how to editing rom with kitchen
NOTE: DON'T FORGET TO DEODEX YOUR ROM
Click to expand...
Click to collapse
2.Modifying manually will be added later on
3.Modifying .9.png's and oter stuff will be added soon saw stay tuned
BUILDING KERNELs​This post includes every thing that helps you develop and make a good kernel for your device
Requirements
1. linux box 32 bit with working gcc. you can use real linux machine or virtual machineOr just simply UBUNTU 10.04 64-bit
2. Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI from http://www.codesourcery.com/ (Linux version without installer arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2)
3. mkbootimg with md5support. got it from http://forum.xda-developers.com/show...&postcount=241 . credit to harish2704
4. split_bootimg.pl (google it)
5. kernel source from http://opensource.samsung.com . i use GT-P3100_ICS_Opensource_Update.zip
6. stock boot.img (or from your custom kernel).
Click to expand...
Click to collapse
Setting up the environment & building the kernel for the first time
Ubuntu 10.04 64-Bit (recommended)
Ubuntu 12.04 64-Bit
Note: If you want to use virtualization software, do not use Virtualbox. You can run into networking issues and so on. I suggest using VMWare Player instead, which is available for free on http://www.vmware.com
Steps :
1. make folder "sgy" in your home. the result is folder "/home/<yourname>/sgy". <yourname> is your linux user name, and from now replace <yourname> with your user name. put all file you already download there
2. extract "GT-P3100_Kernel.tar.gz" from "GT-P3100_GB_Opensource_Update.zip". put also in "sgy" folder
3. open terminal emulator and go to your working path with command
Code:
cd ~/sgy
4. extract your compiler with
Code:
tar -xvf arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
5. create folder "kernel" and extract kernel source there
Code:
mkdir kernel
cd kernel
tar -xvf ../GT-P3100_Kernel.tar.gz
you got 2 folder, "common" and "modules"
6. open folder "common", there is file "Makefile". open with text editor and find line with content "/opt/toolchains/arm-eabi-4.4.3/bin/arm-eabi-". replace with "/home/<yourname>/sgy/arm-2009q3/bin/arm-none-eabi-", don't forget replace <yourname>.
7. in terminal goto folder "common" and load default config for sgy
Code:
cd ~/sgy/kernel/common
make bcm21553_totoro_05_defconfig
8. if you want change you config run
Code:
make menuconfig
9. if you ready to build then run
Code:
make
or if you want to make it faster
Code:
make -j3
10. when complete and no error appear, copy your kernel to "sgy" folder
Code:
cp arch/arm/boot/zImage ~/sgy
11. extract ramdisk from your boot.img
Code:
cd ~/sgy/
perl split_bootimg.pl boot.img
you got "boot.img-kernel" and "boot.img-ramdisk.gz". move "boot.img" and "boot.img-kernel" to other place.
12. repack your new kernel and ramdisk. but first get md5sum of your new kernel
Code:
md5sum zImage
you got something like
Code:
1fd319aa60abc2abae2e5932bcb9fc77 zImage
you need that "1fd319aa60abc2abae2e5932bcb9fc77" write it or copy to text editor. you need run it every time compile new kernel
13.Repack
Code:
chmod +x mkbootimg
./mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.gz --base 0x81600000 --kernelMD5 <your md5sum result> -o boot.img
14.And if you want to make an odin flashble
Code:
tar -cf boot-sgy.tar boot.img
Now you've built you'r kernel
reserved For FAQ
UOT Kitchen customization​Hello everyone, today I'm creating this thread for newbies who want to learn how to use UOT Kitchen so it can be used by the Galaxy Tab 2.
It allows us to mod everything in the phone! You can even choose which to mod.
Prerequisites:
- You current ROM's SystemUI.apk, framework-res.apk and twframework-res.apk
The instructions are as follows:
Step 1: Battery mod
Over here, you can change:
Battery icon
Battery charging animation
Battery style
Battery colour parts
Firstly, just choose a battery bar that you like. (I personally prefer the Honeycomb one)
Secondly, choose the charging animation. (Hybrid looks nice)
Thirdly, you can choose to change the colour parts or leave it as it is.
Fourthly, (optional) you can select Additional options:
Remove % numbers
Remove charging icon
Use gradient colour fill
Well, that's all for battery.
Step 2: Icons
Here you can change:
Smiley icons
Status bar icons
Notification Power icons
This doesn't need much instructions; pick what you like.
Step 3: Status bar
This is probably the most important thing when it comes to theming: the Status Bar!
It allows you to change:
Status bar transparency
Top bar
Add/edit top bar text
Add a header
Add/edit carrier
Add a background on the status bar
Customize notifications' colours
Add/edit footer
Firstly, you need to specify your phone's screen resolution size. (Ours is hdpi.)
Secondly, mix-and-match.
Step 4: Popup (a.k.a Window Animations)
This one is just as important.
It allows you to change:
Add/edit overscroll glow
Edit popup windows
Loading circle
Volume/Download bar
Add/edit list dividers
Same thing, mix-and-match.
Step 5: Lockscreen
This allows you to change:
Lockscreen
Step 6: Window
This allows you to change:
Window animations
It allows us to use the ICS windows animation effect!
Step 7: Fonts
This allows you to change:
System fonts
They have 26 fonts to choose, including the famous Roboto font!
Step 8: Bootanimation
This allows you to change:
System bootanimation
They have loads of bootanimations to choose from. Have fun!
Step 9: File upload
This is where you:
Upload system files for modding
Choosing updater-script type
Apply 9patch autofix
Toggle ThemeChooser preview for ldpi/mdpi/hdpi
Allow to download your settings into a UOT Kitchen-openable format
Just upload your system files.
But remember to choose the updater-script type as Galaxy !!!!!!!!!!!!!!
Step 10: Summary
This is where you can check the status of your mods.
Once it's okay, you can submit the work to the kitchen.
Once you submit it, you'll be given a number. That's the name where your file will be processed under and be shown for download at the "Pickup" section.
(Note: If it gives an error instead of a download post it at the UOT thread)
Thanks for reading this small guide, I'll update it with more info!
Credits ​1. Neroyoung for his video tutorials
2.For lokeshsaini94 for his amazing tutorial
3.For irfanbagus and his nice tutorial that i ported to galaxy tab 2
4.For shakatu fo remembering me to credit people thanks Alot!!!!
And any one that Iforgot to mention lol

[TUT]Series of guides to become a PRO DEV!!!!!!

[Hey guys Aditya here. After a month or so i'm posting tutorial and basic decompiling compiling using adb command!
THINGS YOU WILL NEED​
ON WINDOWS PC
1) Winrar
2) 7zip
3) Java
4) Apktool and adb tools!!!!! (Many tools are available download anyone of them)
5) notepad+ AWESOME THING
ON UBUNTU
1) Java
2) Android SDK
3) APKTOOL ofcourse
Let's get started! I asume you using a Windows PC
First of all download and install JAVA
From here
Download Latest Apktool, extract to :
Windows XP : C:\Document and setting\folder your computer name
Windows 7 : C:\user\folder your computer name
copy your apk & framework-res.apk/SemcGenericUxpRes.apk/framework 2 to same folder with apktool
Now you can start Editing apk
Example Editing Walkman
Open Command Prompt (CMD)
TO DECOMPILE
Code:
java -jar apktool.jar if framework-res.apk
java -jar apktool.jar d semcmusic.apk ( can be whatever name you give to your apk )
Some apks need dependies like tw-framework.apk
Code:
java -jar apktool.jar if framework-res.apk
java -jar apktool.jar if semcgenericuxpres.apk
java -jar apktool.jar d your.apk ( can be whatever name you give to your apk )
Now you can edit what you like to. E.g. Res layout etc!
(For more detalis refer Post #3)
TO COMPILE
To compile back the edited apk
Code:
java -jar apktool.jar yourapkname.apk
For signing apk just drop the android manifest and meta inf of older apk or original apk!!!!!!
F.A.Q
A.I'm getting error while compiling apk??
Check if you have installed framework-res.apk most of compiling errors are becoz of this
B.Can apktool batch decompile and recompile apk's??
Yes,many of modded apk manegers or tools can batch decompile and recompile apk's!!
C.Can i MOD any system app using apk tool?
Yes it can mod all types of apk's just make sure you have correctly installed framework and all other dependices!!!!
D.My modded apk is not working! What should i do???
This question is mostly asked to me! Firstly check weather you have put the Meta-Inf from original APK as this folder contain signatures required for apk to get install.Secondly if you have modded some xml check its correct or some code or values are wrong.If any values or wrong code can lead us to FC or Bootloop..!!!
Using ADB and taking logcat!!!!!
USING ADB AND TAKING LOGCAT
What ia adb??
adb stands for Android Debugging Bridge
For what it is used for
adb is commonly used to pull,push,taking system dumpFOR TAKING LOGCAT
What you will need
On windows
1) Java (Hmmm not needed but u should have. )
2) adb tools by me http://d-h.st/vHJ
Now to make it easy first of all check you have enabled USB Debugging in phone its in Developer Options.
PROCDURE
Make a new folder in C Drive
Extract these tools into it (Asume you folder name is adb)
Now open cmd
Code:
type cd..
cd.. again
cd adb
adb
Now you have installed adb on your PC!
TAKING LOGCAT
Code:
adb logcat>logcat.txt
For only redio related log type
Code:
adb -r logcat>logcatr.txt
For only errors type
Code:
adb -v logcat>logcate.txt
Push and pulling apps from system!
Pushing Apps
Pushing app is installing app on its intenrnal memory!Its simple and doesn't need extra powers!
Code:
adb push yourappname.apk /system/app or /system/framework
Place the app in the adb folder
Pulling Apps
Pulling app is to take out your system apps or frameworks etc!
Code:
adb pull /system/app or /framework yourapp.apk
By this method you can take a system dump
Code:
adb pull /system
Understanding Logcats!!!!!
Some keyword's that represent's error'
Code:
"E/" - error
"E/dalvikvm" - possibly crucial system error
"No such file or directory" - says it all
"couldn't" - android likes that, mostly shows faulty things.
"fail"/"failed" - mostly crucial error
"W/"/"warning" - says it all, but not always warn could be a boot failure cause
"exception"(especially NullPointerException) - points you that something went wrong in framework or application work
These type of errors help us understand the error's and we can easily call out from these bugs or errors!!!
Most common errors occuring in an logcat!
"couldn't find native method", the most common reason of a bootloop.
This error causes most of bootloop problems!!!
For example
Code:
E/dalvikvm( 100): ERROR: couldn't find native method
E/dalvikvm( 100): Requested: Landroid/view/GLES20Canvas;.nStartTileRendering:(IIIII)V
E/JNIHelp ( 100): RegisterNatives failed for 'android/view/GLES20Canvas', aborting
As you can see! The main reson for this error is smali present in android/view of framework.jar called GLES20Canvas.smali
This happens while you are trying to port ROMS!!!!
Now if you are having bugs in other apkor jars how can u find ahem! i.e logcat gives us only the location of smali files and not the name of apk or jar! For that you have to study hole android code sources! Some common folders i have posted here!!
Code:
"com/android/server" - services.jar (there is the same folder at framework.jar but most likely you don't need to touch it).
another place we could be mixed up:
"com/android/internal" - framework.jar
"com/android/internal/policy/impl/" - android.policy.jar
for framework.jar path ends up on internal, which represents telephony folder. policy/impl is the only android.policy.jar folder.
Other frameworks are actually not used in port as they contain core android functionality which is common.
Simple MOD's
Now you guy's have idea about how to take a Logcat,use adb,use apktool.
NOW SOME REAL STUFF
MOD's Related to SystemUI.apk
We will start with simple MOD's! Like replacing icons and to some extend changing layout!
Now we will start will replacing icons inside the SystemUI.apk
First of all pull app from /system/app using adb Refer #2
Then copy that app to apktool folder! Type this cmd
Code:
java -jar apktool.jar d SystemUI.apk
Now go to out folder of SystemUI.apk!
Will find META-INF! RES! ANDROID.manifest
Now Navigate to res/drawable-hdpi as our device uses HPDI
You will find many icons now be carefull here! If youare expert n photoshop or any bitmap editor eit these icons! Or search it! Google it you will find many!
Replace these default icons by ur edited once or downloaded once!!
XML EDITING
Some XML's are not so complicated as other once! Some xml's have just true or false! Example
Code:
<bool name="config_hardwareAccelerated">true</bool>
This tells me that Hardware Acceleration is enabled you can disable it by replacing true by false! You just need to experiment around!
Smali Editing!
Coming soon!
Patching!
Coming soon :d
Changelog
CHANGELOG
1 July Monday 6.04pm -- Inital Editing
Old info but very usefull for noobs. Keep it up
:thumbup:
Hit thanks if you think I helped you.
Sent from LG Nexus 4
Thats really awesome keep it coming am a noob and I rly want to learn n b a part of z dev team
Sent from my GT-I9082 using xda app-developers app
For apk editing there are many 3rd party softwares which doesn't requires one to write such huge codes for signing and etc .
Kinda old method
Make.Believe
Razor! said:
For apk editing there are many 3rd party softwares which doesn't requires one to write such huge codes for signing and etc .
Kinda old method
Make.Believe
Click to expand...
Click to collapse
Yup . Like chotu tools
Sent from my GT-I9082 using xda premium

[Guide]How To Port & Modify Roms For Mediatek[Everything]

PORTING ROMS FOR MEDIATEK​
FEATURE OF THIS GUIDE- NOOB -> EXPERT
I DONT KNOW THE METHOD I USE TO PORT WILL WORK FOR OTHER CHIPSET DEVICES OR NOT AS I ONLY USED MEDIATEK DEVICE.
IF YOU ARE IN A HURRY THEN SEE HERE MY 1-MIN PORTING GUIDE.
AND YOU CAN FIND HERE MY TRICKY CONCEPT- "X" TO SAVE MONEY,TIME,NET DATA.
Credits
@dsixda for awesome android kitchen @rua1 for Mtk Dorid Tools @knzo for tweaks @https://www.otaupdatecenter.pro/ and their team for OTA. @tech mashido As Helper
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
WORK BEGINS
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
THINGS NEEDED​
(INSTALL BELOW THINGS AS PER YOUR OS BIT VERSION,IF YOU HAVE 32 BIT OS THEN INSTALL 32 BIT STUFFS AND IF YOU HAVE 64 BIT OS THEN CHOOSE 64 BIT STUFFS.
WIndows Running PC or Laptop.
JAVA - Download
Cygwin - Download
7zip Compressor-Download
Notepad++ -Download
Android Kitchen- Download
Time(as per you how much take to understand)
Your Base Rom(stock Rom,in any format-CWM flashable or SP_tools Flashable,Prefer to have Both)
CWM Recovery
SD card & Card Reader.(some phones do not have SD slot so no worry for them,i have alternative way)
APKTOOL- DOWNLOAD
SP_Flash Tools to Unbrick In case Device Get Bricked- Download
SETTING UP IMPORTANT THINGS FIRST​
JAVA
Download Java From Above link as per your OS type.
Install it by running its setup like normal softwares.
CYGWIN
Download Cygwin From Above link.
Extract the Zip
By default it will be installed at c:\cygwin .i also recommend to install at default location.
Run Setup and Select "Install from Local Directory"
Then is will ask for packages location.Verify it.
Hit next-next and finish at the end.
Now you see a Cygwin folder under "C" drive and a shortcut Icon at desktop.
*For some 64 BIT users this method might not work,they can download setup from here-Download & install it from internet instead from local packages and select all packages during installation.
7ZiP
Download 7Zip From Above link as per your OS type.
Install it by running its setup like normal softwares.
Notepad++
Download Notepad++ From Above link as per your OS type.
Install it by running its setup like normal softwares.
dsixda's Android Kitchen
Download dsixda's Android Kitchen From Above link.
Extract it and then it will be like this- Android-Kitchen-0.224\Android-Kitchen-0.224\orgianal_update,tools etc....
Now open Android-Kitchen-0.224 folder and you will again find Android-Kitchen-0.224 folder,then rename it to only " kitchen " (small letters).
Now directory will look like this- Android-Kitchen-0.224\kitchen\orgianal_update,tools etc....
Now copy that kitchen folder which we renamed and paste to c:\cygwin\home"your_username""paste here"
Now your cygwin directory will look like this- C:\cygwin\home\your_username\kitchen\orignal_update,tools,etc.....
To check Kitchen is working,open cygwin from desktop and type - "cd kitchen" and hit enter(small letters).
If no error shown then you have sucessfully installed it or if error like- bash:cd :kitchen:No such file or dirctory hen you should check above steps again.
>>OPENING KITCHEN- open cygwin,type "cd kitchen" hit enter,now type " ./menu " and hit enter.Now kitchen will load.
PORTING CWM RECOVERY(PORT IF YOUR DEVICE DO NOT HAVE IT)- ROOT REQUIRE
Download and install ADB drivers on PC first.DOWNLOAD
Get MTK Droid tools From Here and Extract-HERE
Now go to developers option and enable USB debugging.If you cant find Developers option then go to settings/about Phone and press 7 times on BUILD NUMBER then you will see Developers option under settings.
Open MTK Droid tools on pc and then plug your device(turned on) via usb cable.Now the tool will recognise your device and connect to it(if asked for root permission on device then grant).
If the colour indicator in the bottom left corner is green in MTK Droid Tools,then you already have root shell,and can go on to the next step, if it is yellow, click on the root button at the bottom, and wait for the progress bar, if the indicator stays yellow, or you get an error message, this probably means you do not have Busybox installed, you can install it from the Google play store. When the indicator turns to green you have root shell which is necessary for this operation.
Now click on 'root,backup,recovery' and then select 'to use boot from phone'
Now click on 'recovery and boot'
Then you will see a dialogue box will appear asking if you want to 'make cwm recovery automatically' click yes.
The tool will then create the recovery and then another dialogue box will appear asking to 'install created recovery to phone', click yes.
Now you reboot into recovery mode and check that it is working fine or not.
You can find generated cwm recovery under MTK Droid Tools location.
If you want to revert to stock recovery then take recovery.img from your stock rom(sp_tools) and paste into sd card.And then install mobileuncletools from playstore and click on update recovery and select your stock recovery from SD.Same method for installing CWM recovery.
WHICH ROMS YOU CAN PORT​
Port rom should be of same android version as your stock rom.Like if your stock rom is 4.2 then you should only try with 4.2.In some cased you can port higher versions like kikat too,it will require Custom kernel but we are skipping that.
The device from you porting should have same chipset,like if your device is MT6589 then you shoul only try with MT6589 chip-sets.You can port from MT6589T to MT6589 or MT659M but you cannot port from MT6592.
Choose the port rom from most close specification device,like screen size,screen resolution,dual-sim,etc....higher resolution to lower resolution resolution or lower to higher can be ported but not all boots up.
Some Sites To get Port Rom:-
anzhuodiy.com
romzj.com
dashi.com
shendu.com
needrom.com
Porting begins
MAKING PORTING ENVIRONMENT​
Registering Your Device To Kitchen:-This step will help to write updater script automatically.
Open kitchen and select option 0(advance options) and then select option 12(tools for unpack and repack boot.img etc.) and press "a"(Extract kernel+ramdisk from boot.img,recovery.img etc.) and hit enter.
Now a folder will be created Under kitcehn directory named like this- bootimg_040714_132352
Now copy your CWM recovery.img for your device to this folder and check that the name must be - recovery.img if not then rename it. and hit enter in kitchen terminal.It will extract your recovery in that folder.
Open up boot.img-ramdisk folder, and look for /system/etc/recovery.fstab or /etc/recovery.fstab or similar FSTAB file location. Open this file by notepad++ to find the mount points.
Download below file and paste it to C:\cygwin\home\username\kitchen\tools\edify_defs .Now rename it to your device code name.Mine is A110Q so i used this file. You can use as your choice also.
Then open this file and recovery.fstab with notepad++ and compare and replace mount points and save it.Means copy mount points from recovery.fstab and paste/replace into Your device codenamed file.
Now if you done all above steps right then kitchen will make updater script for you.
If you porting for Micromax A110Q then just Download the below File and paste it.No need to edit.Just paste it.
>>>>>>Micromax A110Q file - http://d-h.st/Qa5
>>>>>>IF you have any confusion or you are unable to create this file then PM me your recovery.fstab file and i will make it.
GET BOTH ROMS- STOCK AND PORT
STOCK-Your stock rom which was provided by device manufacturer.
PORT- The Rom you selected to port after comparing your device to port device.
GETTING STOCK ROM SYSTEM FOLDER
IF your Stock ROM is in already in form of CWM flashable zip then create a Stock Folder in any drive of Computer and extract it for further Use.
Basic Strurture od CWM FLASHABLE ZIPs
META-INF
SYSTEM
DATA
boot.img
IF YOUR ROM IS SP_TOOLS FLASHABLE THEN DO THESE TO EXTRACT SYSTEM FOLDER FROM IT:-
Basically IN SP_TOOLS flashable zips the folder structure is-
DATABASE
boot.img
cache.img
EBR1
EBR2
IK.bin
logo.bin
MBR
MT65xx_Android_scatter_emmc.txt
Preloaded_xxxxxx.bin
recovery.img
secro.img
system.mg
userdata.img
[STEPS]
Extract system.img from stock rom zip to C;\cygwin\home\username\kitchen\original_update
*You should add kitchen folder to favorites panel in my computer as you will be using this folder very frequent.
Now open cygwin,type "cd kitchen" hit enter,now press- " ./menu " then android kitchen will load with lots of functions numbering from 1 to ...
Press 1 to setup working folder now again hit Enter.Now it will ask you to choose an option to select working folder.Select system.img one folder by pressing its value and hitting enter.
Now it will ask about changing working folder name,leave it as default and hit enter.So kitchen will now start copying rom to working folder.
After Copying files it will auto prompt and open Ext2Explore application.In some cases it will show that error message that "unable to read disk,please make sure you are running appliacation with administrative rights."But don't worry,click ok.
Now after Ext2Explore opened,click on "FILE" on upper left corner and click on "OPEN IMAGE".Now browse to kitchen directory and go through newly created working folder and you will find "ext4_system.img" under system folder.Select it.
Right click on file selected in Ext2Explore and Click on SAVE,now browse to same folder where "ext4_system.img" was.Means newly created working folder/system under kitchen directory.
Then it will extract "ext4_system.img" to same folder.After finishing extraction close the Ext2Explore application.Now hit Enter in kitchen,again it will say "warning,no boot.img found" .Do not worry,HIT ENTER and go with default.
It will ask to view Rom info,you can skit this.
So finally you got system folder under working folder.So copy that system folder to any drive and rename it to Stock rom folder for further use.
[TIP:-]
>>IF your Rom is odexed then you should deodexed it before copying to any other drive for further use.<<
HOW TO CHECK THE ROM IS ODEXED:-
GO TO SYSTEM/APP and SYSTEM/FRAMEWORK folder and see that for every file there is clone file ending with .odex .If there is then your rom is odexed.
WHAT IS DEMAERIT OF ODEXED ROM FOR DEVELOPERS-
You will not able to theme and modify your rom if system and framework is odexed so better deodex the rom.Deodexing will combine file and its clone .odex to one unit.
DEODEXING:-
AFTER SETTING UP WORKING FOLDER AND DOING ALL ABOVE STEPS,now hit 0 in kithcen and select 11 option and hit enter.
IT will show number of odex files in your Rom.Now Select "b" option to deodexing all files,it will take some time.
After done,it will show that "0" files left odexed in Rom,now exit kitchen and Now you should copy your system folder to any drive for furter use.
GETTING STOCK ROM BOOT.IMG EXTRACTED
[STEPS]
Now open Kitchen and select 0(advance options) and Hit enter,now select option 12(tools for unpack and repack boot.img etc.)
Under 12th option,press "a"(Extract kernel+ramdisk from boot.img,recovery.img etc.) and hit Enter
Now a folder will be created Under kitcehn directory named like this- bootimg_040714_132352 Now copy your boot.img and paste into this folder.
Now switch to Kitchen Terminal and press Enter.Then it will do some process and extract your boot.img,Now copy that folder and save it to any drive and Rename it to stock boot for further use.
NOW DOWNLOAD PORT ROM YOU CHOOSED TO PORT AND MOVE TO NEXT STEP BELOW.​
PORTING
PORTING​
>>>>Follow STEP I if you have port rom flashable via cwm.To check that your rom is flashable vai cwm see above post for structure.Those who having SP Tools flashable port rom follow StepII directly.<<<<
First we will port and check that rom boots or not by simple way,then if it boots then we will modify it and tweak it by using kithcen.Or you can skip this step I and directly follow step II but you have to do almost all things from step I in Step II except modifying updater script.If you do these things in step I then no need to do in Step II.
STEP I​
[*]Make a folder and name it as you want and copy and paste your port rom zip in it,means make a clone file of it and we will be working with clone zip,always keep in mind.I said to copy paste as if your rom did not boot up then you have a backup of clean port rom.
[*]Now create a folder under original update of kitchen- " WORKING_XXXX "
[*]Then open zip using 7zip(make 7zip is as default app) and drag drop boot.img to " WORKING_XXXX " folder.Now Open kitchen and Press 1 to setup working Folder.And go with default in all steps forward.(keep 7zip opened,you will need to drag back boot.img in it)
[*]After working folder setuped.Now press 0 for advance option and hit enter.Now press 12 and hit enter.Now you press "w" to extract boot.img from working folder.
[*]After sucessful extraction you will find a folder under kitchen named BOOT EXTRACTED.
[*]Now you have to copy zImage from stock boot extracted folder(which was created by you in second post last step) to this BOOT EXTRACTED folder and replace it.
[*]Then switch to kitchen and press "b" to build boot.img from BOOT EXTRACTED folder then after repacking boot.img finish,you have to drag and drop only boot.img(kitchen/working folder)(not meta-inf) to port rom zip.
[*]Now Open System Folder In port Zip and drag drop build.prop file out of it to anywhere you wish.
[*]Now edit it with Notepad++.
[*]Add this line if you are porting from a higher resolution device- ro.sf.lcd.density=220 .Change its value after rom boots as to your display resolution.If after rom boots up and everything looking large then reduce the value and if looking small then increase it.
[*]You can Edit These Values as desired:-
Code:
ro.build.id=
ro.build.display.id=
ro.custom.build.version=
ro.build.version.release=This is Andriod version That Displays in Settings
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=
ro.product.manufacturer=
ro.build.bluetooth.name=
[*]EDIT BELOW LINES TO SET YOUR TIMEZONE AND AREA REGION.You can find your default details in your stock rom's build.prop which you extracted earlier.
Code:
ro.product.locale.language=(en for English,ru for Russian and other similar codes for other language)
ro.product.locale.region=(us for usa, IN for india etc.)
persist.sys.timezone=( Asia/kolkata for india,Asia/... different for different regions)
[*]Now after editing done drag build.prop to port zip.
[*]Now keep opened port zip one side and open stock rom system folder which we extracted in post 2.
[*]Open System/etc/firmware in both zip and stock folder.Now drag modem.img from stock folder to zip and drop it.
[*]Now head to lib folder in both.Here you have to drag and drop libcamercustom.so file to port zip.
[*]Go to system/lib/modules now,here drag and drop mtk_stp_wmt.ko file to port zip.If rom did not boots forward then you should drag and drop whole modules folder under system/lib of port zip.
[*]Go to usr/keylayout in both and drag drop Generic.kl file from stock to port zip.
[*]Lastly drag and drop a launcher like nova,apex or any to system/app/ of port zip in case port launcher did not worked.
[*]IF you rom did not booted by applying all above steps then replace these folder/files from stock to port:-
1)system/etc/firmware
2)system/lib/hw
3)system/lib/modules
4)system/vendor
[*]If your cwm port rom zip have these files then delete those.
---uboot.bin
---preloader
---logo.bin(you can keep it but you need your stock logo.bin which is available in sptool flahable roms.I will also tell you how to create own logo.bin and bootanimation in below post.)
[*]Your zip should look like this-
--Meta-inf
--system
--boot.img
--data (in some roms)
[*]After deleting the extra files you need to modify the updater script which can be found under,Meta-inf/com/google/android/updater-script...we are modifying by own only this time as we have to check only.During building rom from kitchen,it will be automatically created
as we registered our device.If we do not register our device in kitchen then during making roms from kithcen our current updater script will converted to update script which will be again converted to updater script and that will cause installation aborted error.
[*]Now drag and drop updater script from zip to anywhere and open it with notepad++,now find lines below-
Code:
format("ext4", "EMMC", "/dev/block/[COLOR="DarkOrange"]mmcblk0p7[/COLOR]", "0");
format("ext4", "EMMC", "/dev/block/[COLOR="DarkOrange"]mmcblk0p5[/COLOR]", "0");
mount("ext4", "EMMC", "/dev/block/[COLOR="Red"]mmcblk0p7[/COLOR]", "/data");
mount("ext4", "EMMC", "/dev/block/[COLOR="Red"]mmcblk0p5[/COLOR]", "/system");
[*]Here you have to deal with text in red.Your updater script may be different so use your brain and understand what i am saying forward.Text in red is mount point.In above mmcblk0p7 is mount point of data folder and mmcblk0p5 is mount point of system folder.So you need to replace mount points of updater script with your device mount points.You must found mount points of your device during registering device to kitchen.So open recovery.fstab or that kitchen/tool/edify_defs/your file with notepad++ and copy replace mount points from your device file to updater-script of port zip.If you find those lines any more places in updater script then also replace there.Here you only need some mind to use.For example if you edited and replaced red text then you must also replace orange text as they are also same.
[*]Remove the lines of the files which you removed in zip if there,like uboot.bin,logo.bin,preloader etc...they will look like below codes,you only need to find the line matching to the file you removed and deleat that.
Code:
package_extract_file("uboot.bin", "/dev/uboot");
or
assert(package_extract_file("uboot.img", "/tmp/uboot.img"),
write_raw_image("/tmp/uboot.img", "uboot"),
delete("/tmp/uboot.img"));
or
assert(package_extract_file("preloader.img", "/tmp/preloader.img"),
write_raw_image("/tmp/preloader.img", "preloader"),
delete("/tmp/preloader.img"));
[*]And replace this line
Code:
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "bootimg"),
delete("/tmp/boot.img"));
From this if any error occurs during installtion like boot.img assert failed.
Code:
package_extract_file("boot.img", "/dev/boot");
[*]Drag back the updater-script to zip from where it was taken from.
What we have done above is that we drag and drop some stock files from stock rom to port zip without extrating it.​
Now you are good to flash your ported rom.Make CWM backup if you want to go back to previous rom or rom did not booted.After that wipe data factory reset,wipe cache partition,wipe dalvic cahce under advance option and then format system under mount and storage OF CWM RECOVEY then install zip from sd card and install your zip.I said SD card in first post if your rom did not booted and you understood your mistake and modified your port rom zip then you can do that directly by transferring zip to sd and flash instead of installing or restoring another rom.But for the users with not sd card must save their CWM backup or a working cwm flahable Rom zip otherwise they will have to reflash the rom by SP tools if rom didnot booted.
STEP II​
NOTES BEFORE BEGINNING STEP II :-
If you ported your ROM using STEP I and booted then for modifying use this STEP II.
If you tried porting rom using STEP I but it is showing installation aboted then follow this STEP II directly.
IF you have SP Flash tools format port rom and you extracted system folder and boot.img from your stock rom using my method then Follow STEP II directly.
STEP II contains some steps from STEP I,so if you already did those steps in STEP I and using same zip here then you can skip steps here.If you get confused then again do all steps.
STEP(A)- ADDING A WORKING FOLDER IN KITCHEN
FOR CWM ROM:-
Create a folder " WORKING_XXXX " under kitchen/original _update if you haven't.If you having it then check that it is empty.
Now open your port zip (or zip you ported through STEP I and was booted) and extract its System and boot.img to "WORKING_XXXX " folder.
Open kitchen and press "1" to setup a working folder.
Press Enter and select "WORKING_XXXX " folder by it assigned digit and hitting Enter
Now it will ask for name,you may change it or leave it,it does not matter.Skip it by pressing Enter.
It will start copying files to a working folder,wait sometime.
After it will ask to view Rom info,then press Y and see its info as your wish.
Now you have a working folder setup-ed.
FOR SP TOOLS ROM:-
Extract system.img & boot.img from port rom zip to C;\cygwin\home\username\kitchen\original_update
Run Kitchen and press "1" to setup working folder and hit enter.
Now again hit Enter,this time it will ask you to choose an option to select working folder,Select system.img&boot.img one folder by pressing its value and hitting enter.
Now it will ask about changing working folder name,leave it as default and hit enter.So kitchen will now start copying rom to working folder.
After Copying files it will auto prompt and open Ext2Explore application.In some cases it will show that error message that "unable to read disk,please make sure you are running appliacation with administrative rights."But don't worry,click ok.
Now after Ext2Explore opened,click on "FILE" on upper left corner and click on "OPEN IMAGE".Now browse to kitchen directory and go through newly created working folder and you will find "ext4_system.img" under system folder.Select it.
Right click on file selected in Ext2Explore and Click on SAVE,now browse to same folder where "ext4_system.img" was.Means newly created working folder/system under kitchen directory.
Then it will extract "ext4_system.img" to same folder.After finishing extraction close the Ext2Explore application.Now hit Enter in kitchen and go with default then Press y to view ROM info as per your wish.
Now you have a working folder setup-ed.
STEP(B)-Porting Rom
PATCHING BOOT.IMG:-
After successful creation of working folder you will find a new folder created named like-"WORKING_041214_135729".
Open kitchen then Press 0 for advance option and hit enter.Now press 12 and hit enter.Now you press "w" to extract boot.img from working folder.
After sucessful extraction you will find a folder under kitchen named BOOT EXTRACTED.
Now you have to copy zImage from stock boot extracted folder(which was created by you in second post last step) to this BOOT EXTRACTED folder and replace it.
Now switch to kitchen and press "b" to build boot.img from BOOT EXTRACTED folder then after repacking boot.img finish press x to exit and back to main menu.
Editing Build Prop:-
you will find build.prop under kitchen/your_working_folder/system/
Edit build.prop with notepad++
You can Edit These Values as desired:-
Code:
ro.build.id=
ro.build.display.id=
ro.custom.build.version=
ro.build.version.release=This is Andriod version That Displays in Settings
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=[B][U][COLOR="Red"]NAME OF FILE WHICH YOU USED TO REGISTER YOUR DEVICE TO KITCHEN[/COLOR][/U][/B]
ro.product.manufacturer=
ro.build.bluetooth.name=
EDIT BELOW LINES TO SET YOUR TIMEZONE AND AREA REGION.You can find your default details in your stock rom's build.prop which you extracted earlier.
Code:
ro.product.locale.language=(en for English,ru for Russian and other similar codes for other language)
ro.product.locale.region=(us for usa, IN for india etc.)
persist.sys.timezone=( Asia/kolkata for india,Asia/... different for different regions)
Add this line if you are porting from higher resolution deice or lower resolution device.If from higher to lower then put lower values and if lower to higher then put higher values.
Code:
ro.sf.lcd_density=xxx
Now after editing done save it and exit.
Patching Rom With Some STOCK Rom Files:-
Copy modem.img from stock Rom- System/etc/firmware to kitchen/working_folder/system/etc/firmware and replace it.
Copy libcamercustom.so file from stock Rom- System/lib to kitchen/working_folder/system/lib and replace it.
Copy mtk_stp_wmt.ko file from stock Rom- System/lib/modules to kitchen/working_folder/system/lib/modules and replace it.If ROM not booted then replace whole modules.
Copy Generic.kl file from stock Rom- System/usr/keylayout to kitchen/working_folder/system/usr/keylayout and replace it.
Download any launcher apk from net link nova,apex etc and paste into kitchen/working_folder/system/app/
If after Building rom from next step,your rom did not booted then replace these files from stock to port then build rom.
1)system/etc/firmware
2)system/lib/hw
3)system/lib/modules
4)system/vendor
Building Rom
After all above steps done,now switch to kitchen and press 99 to build ROM.
But before pressing 99 check that you put name of file by which you registered your device to kitchen in build.prop/ro.product.device="".If you registered with name x then put like this-ro.product.device="x"
If you have not done above step then you will get installation aborted error during installation.If you are confused to register device send me required fies as asked by me in above post.
After all checked now press 99
Select Build Option 1 then hit Enter
Now it will ask to zip-lang the apk,do as your wish.
After that step it will convert Updater Script and ask two option,Proceed or cancel,then Proceed by pressing "y".
It will then start making update.zip.Wait some time.
Next it will ask to sign the zip or not?You should go with default by signing update zip by hitting Enter or Pressing "y" then pressing enter.It will take some time.
After that if you want to change your ROM name then put desired name by pressing y or leave as it is by hitting Enter or 'N' then enter.
Collect you rom.zip from Output_zip folder created under kitchen directory.
Flash it and check it.
If you find some bugs then see post below to solve bugs or if you are not able to find bug solution below then post it.I will tell you how to solve it if i know.
I have ported 10+ Roms using this method,this should work for you too.Hopes that your ROM will boot.Good Luck.​
SOLVING BUGS​
BUG SOLVING USES HIT AND TRIAL METHOD.I mentioned one or more ways to solve,you try one by one and see which works for you.
FM NOT WORKING:-
COPY THESE FILES FROM STOCK TO PORT:-
\system\lib\libaudio.a2dp.default.so
\system\lib\libaudio.primary.default.so
\system\lib\libaudiocompensationfilter.so
\system\lib\libaudiocustparam.so
\system\lib\libaudioeffect_jni.so
\system\lib\libaudioflinger.so
\system\lib\libaudiosetting.so
\system\lib\libfmar1000.so
\system\lib\libfmcust.so
\system\lib\libfmjni.so
\system\lib\libfmmt6616.so
\system\lib\libfmmt6620.so
\system\lib\libfmmt6626.so
\system\lib\libfmmt6628.so
OR try this
system/etc/firmware/mt6620_patch_e3_hdr.bin
system/etc/firmware/mt6620_patch_e6_hdr.bin-> If yours is MT6628, you'll need to patch all mt6628_fm_*_*.bin too
system/etc/firmware/WMT.CFG-> This is the antenna cfg, without this, FMradio cannot receive clearly
system/lib/modules/mtk_fm_drv.ko
system/lib/libfmcust.so
For WiFi Bluethooth:-
system/lib/modules/mtk_wmt_wifi.ko -> After patching, both works & can be individually switch on/ off
system/lib/libbluetooth_mtk.so
system/lib/libbluetoothem_mtk.so -> MTK Engineering will show MT6628 if not patch...
system/etc/firmware -> if yours is MT6628, you'll need to patch all WIFI_RAM_CODE_* too
For GPS:-
->>>> system/xbin/libmnlp
or, If you porting From MT6628 to MT6620, some apps at system/vendor/operator/ is blocking GPS so just delete all apps & use MTK Engineering mode to confirmed it...
Edit in build.prop
fmradio.driver.chip=1 -> if yours is MT6628 then change it to 3
mediatek.wlan.chip=MT6620 -> if yours is MT6628 then change last digit to 8
mediatek.wlan.module.postfix=_mt6620 -> if yours is MT6628 then change last digit to 8
For Camera:-
->Unpack boot.img again and go to BOOT-EXTRACTED/boot.img-ramdisk/init.project.rc and edit with notepad++,also open stock bootextracted/ramdisk/init.project.rc.Now find camera permissions and replace whole camera line with stock camera lines.
->then open init.rc of both port and stock and find camera lines and copy/replace camera lines from stock to port.
->Now repack boot.img
OR
copy these from stock to port
system\lib\hw\camera.default.so --- (if you have two files like camera.goldfish.so delete this the one with the goldfish)
\system\lib\libcamera_client.so
\system\lib\libcameracustom.so
\system\lib\libcameraprofile.so
\system\lib\libcameraservice.so
or
copy from system/lib of stock to port.
- libmhal.so
- libmhalcontent.so
- libmhaldrv.so
- libmhalmdp.so
- libmhalpipe.so
- libmhalscenario.so
- libmhalutility.so
or
Put libcamdrv.so of rom only or campare the file of size of your porting rom file and the base rom then whose size is same leave it and whose size is greater in ur stock rom jst add and replace that file only.
or
lib3a.so
liba3m.so
libacdk.so
libaudioflinger.so
libc.so
libcam.camadapter.so
libcam.campipe.so
libcam.camshot.so
libcam.client.so
libcam.paramsmgr.so
libcam.utils.so
libcam_camera_exif.so
libcamalgo.so
libcamdrv.so
libcamera_client.so
libcamera_jni_eglfence.so
libcamera_metadata.so
libcameracustom.so
libcameraservice.so
libgn_camera_feature.so
libexif
libfeatureio.so
libfrsdk.so
libft.so
libgcomm_jni.so
libgoggles_clientvision.so
libgui.so
libimageio.so
libja3m.so
libjni_mosaic.so
(Skip if any missing)
or
Replace camera.apk in sysyem/app
And do a ctrl+f search in system/lib for anything called 'camera', 'camrecorder', or just 'cam' and replace those.
Storage mount Problem Fix:-
copy paste sytem/etc/vold.fstab from stock to port
USB NOT MOUNTING IN PC FIX:-
copy init.usb.rc from stock boot.img extracted to port and repack.
Audio Problem Fix:-
copy paste sytem/lib/all audio lib file from stock to port.(search by ctrl+f)
ICON RESIZER:-
see these
http://forum.xda-developers.com/showthread.php?t=2219584
http://forum.xda-developers.com/showthread.php?t=2380513
DATE AND TIME ERROR FIX:-
check build prop region and compare and replace from stock build prop.
or
Use gravity box date and time fix
Minimum Brightness:-
ro.init.screen_brightness=110 in build prop
If App Force Closing:-
Use Updated App or if only rooted apps are getting Force close then Check Root
If nothing helped then removed that apk from system folder.
If a weird image Showing Between Boot logo and boot animation:-
Use stock rom's system/media/images/boot_logo in port.
TWEAKING&MODIFICATION​
BUILD.PROP TWEAKS
HOW TO ADD:-Open Build.prop with Notepad++ and copy and paste these tweaks lines and save it.
Force launcher into memory
Code:
ro.HOME_APP_ADJ=1
Raise JPG quality to 100%
Code:
ro.media.enc.jpeg.quality=100
VM Heapsize; higher the RAM, higher the hp can be.
Code:
dalvik.vm.heapsize=48m
Render UI with GPU
Code:
debug.sf.hw=1
Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=150
Save battery
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
Increase overall touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
Raise photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
Signal (3G) tweaks
Code:
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
Net speed tweaks
Code:
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
Disable blackscreen issue after a call
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
Fix some application issues
Code:
ro.kernel.android.checkjni=0
Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
Force button lights on when screen is on
Code:
ro.mot.buttonlight.timeout=0
Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
Miscellaneous flags
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
Init.d TWEAKS
HOW TO ADD:-
-->>For adding init.d tweaks you must add init.d support from kitchen by using option "14" then you will see a new folder will be created under system/etc/"init.d"
-->>Now open a empty file with notepad++ and add- " #!/system/bin/sh " at top and then add below lines then save it with name as you wish.Make separate file for each tweak.
[*]Strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
[*]Internet speed tweaks
Code:
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
[*]Vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
[*]misc kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
[*]Battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
[*]EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
[*]Perfect mount options
Code:
busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
[*]Flags blocks as non-rotational and increases cache size
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
[*]MicroSD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
[*]Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
[*]Remove logger
Code:
rm /dev/log/main
[*]Ondemand governor tweaks
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
[*]Auto change governor and I/O Scheduler
Code:
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
echo "sio" > /sys/block/mmcblk0/queue/scheduler
[*]Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
[*] Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
GPS.conf TWEAKS
How To:-Create or edit your /system/etc/gps.conf with a Notepad++.
Benefit:-For improving GPS lock time and signal.
-->>SE supl for A-GPS (better than Nokia's or Google's)
Code:
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
Or DOWNLOAD this patched gps.config
APN TWEAKS
-->>apns-conf.xml located at system/etc/"apns-conf.xml"
-->>Edit apns-conf.xml with notepad++ to add desired apns.
-->>Use CyanogenMOD's APN list file - it's one of the most complete.Download from google.
-->>You can use Mine one too- Downlaod
ADS BLOCK TWEAK
(Lots of developers are supported Through it so please think twice before adding it.)
-->>You can use mine hosts file.Download
-->>You can refer these url for getting file content-
http://www.mvps.org/winhelp2002/hosts.txt
http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts
-->>hosts file are located to system/etc/"hosts"
USE LATEST SUPERUSER APP AND SU BINARY
Downlaod From here
USE PORTED APPS IN YOUR ROM
HERE IS LINK OF HUGE COLLECTION OF PORTED APPS:-CLICK
How to Implemant Ported Apps?
->Download it and open its zip.
->Now open system folder in zip and drag and drop all files to port rom means copy all system folder contents only to port system folder.
More things will be added soon.
THEMING​
I will discuss very short on Theming,rest search on Google.
[START]
SETTING UP APKTOOL:-
->>If you have installed apktool and java then you can start.
->>Now go to the extracted apktool folder and hold "SHIFT" keyboard button and then right click mouse.
->>Here select-Open command window Here" option.
->>For Theming you need to decompile the apk which you want to theme,so grab those apks first and put into apktool folder.
-->>Also take framework-res.apk and medaitek-res.apk and put these also in apktool folder.
->>For decompiling system folder apk,you need to install framework-res.apk and medaitek-res.apk first.So in command window input-
Code:
apktool if framework-res.apk
apktool if mediatek-res.apk
->>hit enter one after one.So you will get message that apk installed to....for both apks.
->>Always write words carefully in command terminal,write same words as apks in apktool folder.
NOW YOU CAN DECOMPILE SYSTEM APKS OF THE ROM WHOSE FRAMEWORK YOU HAVE INSTALLED.IF YOU DONE WITH THAT ROM AND WANT TO MODIFY NEXT ROM APKS THEN
GO TO C:\users\yourusername\apktool and delete all present apks.
Lets start Decompiling:-
->>Open command terminal under apktool,if you already opened then good.
Lets assume that you are decompiling launcher.apk then,
->>Type this below command to decompile apk.You need to replace only apk name....
Code:
apktool d launcher.apk
->>and hit enter.It will decompile in same apktool folder.
->>Now open it and modify it as you wish.
->>For editing its images and theme and look,go to drawable-hdpi folder replace pngs with same resolution pics or edit with photoshop or gimp etc.
->>You can do major modification in thems with systemUI.apk
->>And for rest take help from google.I will update this and add more stuffs when i get time.
->>Now after all modifications done,now lets compile apk.Use command below and replace apk name....
Code:
apktool b launcher.apk
->>Hit enter.Now you have to drag and drop meta-inf and AndroidManifest.xml of launcher.apk which was placed under apktool directory for decompiling(use 7 zip to open apk and drag files from it) to apktool directory/launcher/build/apk/ and replace when prompt.
->>Now again repeat this command in command bar-
Code:
apktool b launcher.apk
->>hit enter,Now this time you can collect you compiled apk from- apktool directory/launcher/dist/"launcher.apk"
->>I know you may get confused by all these steps so watch an awesome video by nero young to clear your confusions-VIDEO
MAKING PATCHES ZIP​
IT WILL BE VERY EASY FOR YOU TO MAKE PATCHES ZIP IF YOU DOWNLOAD THESE BELOW 4 FILES :-
1) ONLY BOOT.IMG PATCH ZIP
2) ONLY SYSTEM FOLDER PATCH ZIP
3) SYSTEM FOLDER + BOOT.IMG PATCH ZIP
4) KERNEL ZIP & KEREL REVERT ZIP.
Download above Zips.
First zip is for extracting only boot.img patch .
Second zip will patch system folder's all folder.
Third Zip will allow you to patch both boot.img and system folder contents of your rom.
Fourth one will allow you to flash any custom kernel if available for your device.
How to use all above patches.zip?
->For first one open zip using 7zip and drag the boot.img you want to patch to it then flash it with cwm
->For second one,if you want to add an apk or any other lib files or replce lib file or any other system folder files to your rom then drag and drop that file to second zip with correct folder path.
->Third one will allow first and second to flash at once.
->Fourth zip is for custom kernel,Custom kernel contains two part,boot.img and another system/lib/modules/lots of file.For custom kernel flashing or reverting with stock kernel,you need to drag and drop boot.img and system/lib/modules/ to fouth zip and flash via cwm.
IF YOU WANT TO ADD UBOOT.BIN TO ROM OR FLASH UBOOT.BIN THEN USE BELOW LINE IN UPDATER SCRIPT:-
package_extract_file("uboot.bin", "/dev/uboot");
Click to expand...
Click to collapse
ADDING OTA UPDATE​
You will need to download its apk first- OTA_UPDATER_DWONLAOD
You will also require all 4 patch zips from above post.
STEPS TO ADD OTA UPDATE :-
Put OTAUpdater-1.0.5.apk in system/app folder.
Edit build prop by notepad++ and add these three lines:-
Code:
otaupdater.otaid=<ROM ID any you can pick>
otaupdater.otatime=<Date/time of this build in yyyymmdd-hhmm format>
otaupdater.otaver=<The human-readable version number/name>
EXAMPLE FROM MY ROM:-
Code:
otaupdater.otaid=xos
otaupdater.otatime=20130930-1553
otaupdater.otaver=1.0
Now you are good to receive and send OTA update to your Rom....but first you have to setup account online.
Registering Device Online
Go to https://www.otaupdatecenter.pro/ and Register there.
After successful registration,click on +Add Rom.A form will be opened then.Fill it.
1)Enter Rom name same as you written in build prop display id.
2)Enter ROM OTA ID (as in build.prop)
3)Enter ROM version (as in build.prop)
4)Enter OTA date/time here (yyyymmdd-hhmm, as in build.prop).
5)Enter download url.(put any URL right now,we are just adding rom first)
6)Enter MD5 file-hash.(put any file md5 check sum.we will edit it when we provide update)
7)Put any Change log...write anything
8)On last column put the name of your device same as in build prop "ro.product.device= ".In my case i use a110q and here is my code in build prop:-
Code:
ro.product.device=a110q
Lastly do not tick on check box as it will make OTA private.
Now your device is registered.
PROVIDING OTA UPDATE:-
Create update using any of my 4 files which you need to update.Lets assume you want to update an apk or add an apk,so you will use my only system folder patch zip.
Now open my provide zip using 7zip and drag and drop your apk with its path.As i provided patch with only system folder and no path forward.So open system folder and right click and create folder,name it "app" and then open app and drag apk in it.
If you were updating bootanimation then you should create media folder under system folder of my zip.
Now after making patches done.Download the Sign-em! from HERE and extract it anywhere.
You will get input,output and some more files....put your zip in input and run "sign-em.bat",it will sign your update zip and also give you its md5checksum.Signing your update is necessary.
After signing zip upload it to drop-box (suggested and tested) and after upload finished,click on download button and copy its url which is generated after that.Means copy url which is prompt in download manager if you using.If you do not use this url then OTA will not work.
Again open https://www.otaupdatecenter.pro/ and go to rom list and click on update rom.
This time put download URL which was generated after clicking download button on dropbox in URL box and also put its md5 checsum which was generated in output folder text file of sign-em!!
And change version also,put 2.0 in version if earlier 1.0,you can also put 1.1 or 1.2 any you want but change it.
And lastly put new date and time as per its format and give your update description if you want.
Check all things then click Update.All done you are good to get update.
Your mobile should have data connection enabled all time during this process.
if any confusion ask me or see faq on https://www.otaupdatecenter.pro/
WIP
ADDING CUSTOM KERNEL​
CUSTOM KERNEL ZIP STRUCTURE:-
->>Meta-inf
->>system/lib/modules
->>boot.img
For Adding it to your rom extract your kernel zip or drag and drop system/lib/modules/all files to port rom and replace all.
Then switch to kitchen and press "0" for advance option and then 12 for extracting boot.img.Here press "a" for extracting boot.img from any folder.Hit enter,you will see a folder created named like "bootimg_041114_230352" and put your custom kernel boot.img in it.
Now press Enter then kitchen will extract it in same folder.
Then back to kitchen 12 th menu of extraction of boot.img,here press "w" to extract boot.img from working folder,so it will extract boot.img from port rom(which is present in working folder) to BOOT-EXTRACTED folder under Kitchen.
Now copy zImage from previous extracted folder "bootimg_041114_230352" to BOOT-EXTRACTED folder and replace it.
Press b in kitchen to repack boot.img.All done.
What we have done above- We used zImage(from boot.img) of custom kernel in port rom boot.img and used all system/lib/modules folder from Custom kernel zip.
ADDING SMALL BUT COOL STUFFS​
ADDING DESIRED TEXT DURING ROM INSTALLATION:-
After Finishing your Rom,drag and drop Meta-inf/com/google/android/"Updater-script" to anywhere in your pc.
Now open it with Notepad++,and use this code to dislpay your texts in installation:-
Code:
ui_print(" ");
Put any alphabet or symbol or digit between (" ") and it will show during Installation.
For generating cool Ui prints you can search Google about text to ASCII converter websites and put your text and get cool texts for installation window.
After all modifications done,drag and drop back updater script to zip.
For Example:-
Code:
ui_print("========STARTING INSTALLATION===========");
ui_print("========================================");
ui_print(" |\ _,--------._ / | ");
ui_print(" | `.,' `. / | ");
ui_print(" ` ' BEAST ,-' ' ");
ui_print(" \/_ _ ( / ");
ui_print(" (,-.`. ,',-.`. `__,' ");
ui_print(" |/*\ ),-','*\`= ,'.` | ");
ui_print(" `._/) -'.\_,' ) ))| ");
ui_print(" / (_.)\ . -'// ");
ui_print(" ( /\____/\ ) )`'\ ");
ui_print(" \ |V----V|| ' , \ ");
ui_print(" |`- -- -' ,' \ \ _____ ");
ui_print(" ___ | .' \ \ `._,-' `- ");
ui_print(" `.__,`---^---' \ ` -' ");
ui_print(" -.______ \ . / ______,- ");
ui_print(" `. ,' ");
ui_print("=== STOCK BEAST ROM BY DIGYVIJAY KR. ===");
ADDING AROMA INSTALLER:-
Take help from HERE
And here is an HELPFUL VIDEO.
I will explain these stuffs later
ADDING CUSTOM BOOT ANIMATION & SHUT-ANIMATION:-
You Can find bootanimation and shutanimation under system/media folder.If you ported from larger resolution device or smaller resolution device then animation will look weird.so you need to resize it or add own made one.
[*]For adding own or editing previous boot-animation you will need this software-Download thanks to @despotovski01 for this)
[*]Now install it.You will also need to know your mobile resolution for making or resizing boot-animation or shut-animation to your size.
FOR RESIZING BOOT-ANIMATION & Shutanimation:-
[*]Take bootanimation.zip from system/media and extract it to any folder.
[*]Now you will see lots of images in it under its sub folder like part0 part1...
[*]Resize all images to your screen resolution.You can use some softwares to resize them easily.Find on Google.(do not mess with serial number order)
[*]Now make a New folder and make another folder under it named- "part0" and put your all resized pngs to it.(from all folders you have in your bootanimation.zip)
[*]Start Boot Animation Factory and Click on "create a new boot-animation",then choose "folder" and click OK.
[*]Now click choose folder button and browse your created folder in which you put part0 folder.DO not choose part0 folder,choose is outer folder.
[*]Here Click on add loop then select part0 folder in prompt dialog box and click on add.
[*]If you want to repeat animation then tick repeat.Now you should preview it first before saving.you can adujust animation speed by clciking on text above your loop created,and click to edit it and then edit FPS according to need.Here is the example line:-30 is FPS here and rest is reso...
Code:
480,854,30
[*]If everything fine then click save boot-animation and save it with name same as in sytem/medaia folder and then replace it.Its all done.
[*]Same process for shut-animation.
FOR CREATING BOOT-ANIMATION & Shutanimation:-
You will have to use own creativity skill for creating its frames.Some knowledge of Photoshop required.
Design your boot animation frames and manage it serially.
Create a folder with any name and create another sub folder in it named "part0" and put all your designed pngs in it.
Start Boot Animation Factory and Click on "create a new boot-animation",then choose "folder" and click OK.
Now click choose folder button and browse your created folder in which you put part0 folder.DO not choose part0 folder,choose is outer folder.
Here Click on add loop then select part0 folder in prompt dialog box and click on add.
If you want to repeat animation then tick repeat.Now you should preview it first before saving.you can adujust animation speed by clciking on text above your loop created,and click to edit it and then edit FPS according to need.Here is the example line:-30 is FPS here and rest is reso...
Code:
480,854,30
If everything fine then click save boot-animation and save it with name same as in sytem/medaia folder and then replace it.Its all done.
Same process for shut-animation.
ADDING DESIRED BOOT LOGO:-
Download logo builder-Download And install.
Get Stock logo.bin -Get the file from your device (/dev/logo) or from stock Rom sp tools flasher.
Open Logo-builder and Click Create New Project
.,? ,1
Now Select the logo.bin file you extracted from the device or took from stock rom.
Make a new folder for the project, any name will work
0Select the folder and click on OK
You will see a progress bar running down. After finishing, you will get a whole bunch of images in the above selected folder
After that,Open the folder containing all the images which you made earlier.
Here Edit or replace" img1.png and img39.png " but keep one thing in mind that use same name and same resolution and same format(png) for replacing.
Click on "make" button on LogoBuilder and you will get update.zip in the folder you made for this project.You can flash this update.zip directly via cwm or you can add to your rom by using below step.
For using logo in your rom,extract logo.bin from update.zip and drag and drop to port rom zip or you can also put this in working folder of kitchen before making Rom.After that,add below code in updater-script to extract your logo-
Code:
package_extract_file("logo.bin", "/dev/logo");
Reserved.
Great Guide
Best Guide Thanks For Helping New Developer like me
yes best guide ever seen for Mediatek devices ....please add seperate section in this thread for MIUI and Lewa os framework and bug solving:fingers-crossed:
excellent guide
Not booting
Everything i done mentioned by you .... But, after flashing with the ported rom created by me , my device stucks in booting.... i don't understand where is the problem actually....
I just ported to this rom
http://forum.xda-developers.com/can...-april-note-3-chrizelnotethree-v3-7a-t2707462
for my mmx canvas 2 plus a110q....
plz help me.....
sawankumar2012 said:
Everything i done mentioned by you .... But, after flashing with the ported rom created by me , my device stucks in booting.... i don't understand where is the problem actually....
I just ported to this rom
http://forum.xda-developers.com/can...-april-note-3-chrizelnotethree-v3-7a-t2707462
for my mmx canvas 2 plus a110q....
plz help me.....
Click to expand...
Click to collapse
remove uboot.bin if present.And also try replacing bootclasspath from stock init.rc to port init.rc
srinath2912 said:
yes best guide ever seen for Mediatek devices ....please add seperate section in this thread for MIUI and Lewa os framework and bug solving:fingers-crossed:
Click to expand...
Click to collapse
Ok i will add them next time i modify the post.....all suggestions are welcome,,,
chanti548 said:
excellent guide
Click to expand...
Click to collapse
thank-you my friend.......
DevendraMilmile121 said:
Best Guide Thanks For Helping New Developer like me
Click to expand...
Click to collapse
thanks milee
digyvijaykumar123 said:
remove uboot.bin if present.And also try replacing bootclasspath from stock init.rc to port init.rc
Click to expand...
Click to collapse
In which directory i found init.rc & bootclasspath .........
sawankumar2012 said:
In which directory i found init.rc & bootclasspath .........
Click to expand...
Click to collapse
under extracted boot.img/ramdisk/init.rc.........you will find bootclass path there.
sawankumar2012 said:
In which directory i found init.rc & bootclasspath .........
Click to expand...
Click to collapse
I'm uploading some screenshot here... It may help u to find my problem... these are the port roms screenshot which i wanna port for my mmx a110Q

[BUG REPORT] oat2dex breaks OpenGL/Play Store SOLVED!

EDIT: The latest oat2dex solves this issue altogether.
WTF IS THE PROBLEM?
The OpenGL and Google Play Store refuse to work because baksmali inside the oat2dex tool misinterprets some fields in a single smali file and breaks "services.jar" when deodexing, and the main problem it causes is mistakenly setting your OpenGL version to 0 (instead of 3), basically disabling it.
oat2dex, for some reason, flips just a few specific fields (name and type) when deodexing, as if there is an ambiguity between 2 fields on the same offset.
When you flash the deodexed services.jar back to your phone and clear dalvik-cache, Android re-optimizes it (takes the "classes.dex" inside your new JAR file, does dex2oat on it, and saves it in /data/dalvik-cache/arm/). The deodexed file is broken, so that optimized file is broken too.
You take that broken odex file from dalvik-cache and deodex it again. Since it contains those flipped field names, this time it flips them again but to the correct fields.
The result DEX file you get by that second deodexing is a properly working DEX file, and if you rename it to "classes.dex" and replace "classes.dex" inside your broken "services.jar", you'll get a working "services.jar" and all your OpenGL and Google Play Store problems will disappear immediately.
HOW TO QUICKLY GET A WORKING DEX?
* Extract classes.dex from the JARs, rename them to framework.dex and services.dex.
* Copy them to your internal SD.
* Enable "USB debugging" in Developer options.
* Connect your device to your PC and open Command Prompt:
Code:
[B]adb shell[/B] (confirm ADB on your device)
[B]su[/B] (confirm SU on your device)
[B]dex2oat --dex-file=/sdcard/framework.dex --oat-file=/sdcard/framework.odex[/B]
[B]dex2oat --dex-file=/sdcard/services.dex --oat-file=/sdcard/services.odex[/B]
* Copy these odex files to your PC and deodex them again with oat2dex.
* Rename the new framework.dex and services.dex to classes.dex and add them to their JARs, replacing the broken classes.dex.
JARS AFFECTED BY THIS BUG
framework.jar/classes.dex --- only a single non-critical error in NumberPicker.smali (classes2.dex is fine)
http://forum.xda-developers.com/attachment.php?attachmentid=3338076&d=1432918042
services,jar/classes.dex --- Total of 8 errors, described below...
http://forum.xda-developers.com/attachment.php?attachmentid=3335118&d=1432772056
BUG REPRODUCTION
Requirements:
1) Java installed
2) oat2dex_bug.zip
ZIP contents:
* baksmali.jar
* oat2dex.jar
* boot.oat --- taken from /framework/arm/
* services.dex --- this is "classes.dex" from the deodexed "services.jar" (which breaks OpenGL)
* services-from-dcache.odex --- this is the odex file taken from "/data/dalvik-cache/arm/" that was created by Android after flashing the broken deodexed "services.jar" and clearing dalvik-cache
Reproduction steps:
1) Open "oat2dex_bug" folder, right-click inside it and then select "Open command window here".
2) Write the following lines exactly as follows:
java -jar oat2dex.jar boot boot.oat
java -jar oat2dex.jar services-from-dcache.odex odex
java -jar baksmali.jar -o services-from-dcache services-deodex.dex
java -jar baksmali.jar -o services services.dex
3) With WinMerge, compare folders "services" and "services-from-dcache".
You'll see that only one file has differences, and it's "ActivityManagerService.smali", that's the file you need to fix.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In the above images are the only affected areas you need to fix.
Holy @#%. Well done! This issue was a real pain. Thanks
What about fixing framework.jar ? Play store compatibility ?
Sent from my C6903 using XDA Free mobile app
dstrikersZ1 said:
What about fixing framework.jar ? Play store compatibility ?
Sent from my C6903 using XDA Free mobile app
Click to expand...
Click to collapse
framework.jar has only 1 error in NumberPicker.smali, and it's not very critical. Has nothing to do with the Play Store bug. After you've fixed services.jar by deodexing it twice, Play Store is fixed.
IaguCool said:
WTF IS THE PROBLEM?
The OpenGL and Google Play Store refuse to work because baksmali inside the oat2dex tool misinterprets some smali files and breaks "services.jar" when deodexing, and the main problem it causes is mistakenly setting your OpenGL version to 0 (instead of 3), basically disabling it.
oat2dex, for some reason, flips just a few specific fields (name and type) when deodexing, as if there is an ambiguity between 2 fields on the same spot.
When you flash the deodexed services.jar back to your phone and clear dalvik-cache, Android re-optimizes it (takes the "classes.dex" inside your new JAR file, does dex2oat on it, and saves it in /data/dalvik-cache/arm/). The deodexed file is broken, so that optimized file is broken too.
You take that broken odex file from dalvik-cache and deodex it again. Since it contains those flipped field names, this time it flips them again but to the correct fields.
The result DEX file you get by that second deodexing is a properly working DEX file, and if you rename it to "classes.dex" and replace "classes.dex" inside your broken "services.jar", you'll get a working "services.jar" and all your OpenGL and Google Play Store problems will disappear immediately.
JARS AFFECTED BY THIS BUG
framework.jar/classes.dex --- only a single non-critical error (classes2.dex is fine)
services,jar/classes.dex --- described below
BUG REPRODUCTION
Requirements:
1) Java installed
2) oat2dex_bug.zip
ZIP contents:
* baksmali.jar
* oat2dex.jar
* boot.oat --- taken from /framework/arm/
* services.dex --- this is "classes.dex" from the deodexed "services.jar" (which breaks OpenGL)
* services-from-dcache.odex --- this is the odex file taken from "/data/dalvik-cache/arm/" that was created by Android after flashing the broken deodexed "services.jar" and clearing dalvik-cache
Reproduction steps:
1) Open "oat2dex_bug" folder, right-click inside it and then select "Open command window here".
2) Write the following lines exactly as follows:
java -jar oat2dex.jar boot boot.oat
java -jar oat2dex.jar services-from-dcache.odex odex
java -jar baksmali.jar -o services-from-dcache services-from-dcache.dex
java -jar baksmali.jar -o services services.dex
3) With WinMerge, compare folders "services" and "services-from-dcache".
You'll see that only one file has differences, and it's "ActivityManagerService.smali", that's the file you need to fix.
And here are the only differences you find in the file (notice especially the first one and the last one):
Click to expand...
Click to collapse
java -jar baksmali.jar -o services-from-dcache services-from-dcache.dex
Click to expand...
Click to collapse
Error: "Can´t find the file services-from-dcache.dex"
There is no such file in the zip either - only services-from-dcache.odex, but with this file it did not work
moonryder said:
Error: "Can´t find the file services-from-dcache.dex"
There is no such file in the zip either - only services-from-dcache.odex, but with this file it did not work
Click to expand...
Click to collapse
Then you made a mistake somewhere.
IaguCool said:
Then you made a mistake somewhere.
Click to expand...
Click to collapse
tried it again, step 1 and 2 without problems, but step3 the same error as mentioned before
there is a new file in the folder called "services-deodex.dex"
moonryder said:
tried it again, step 1 and 2 without problems, but step3 the same error as mentioned before
there is a new file in the folder called "services-deodex.dex"
Click to expand...
Click to collapse
Ahh I see that oat2dex renames the file for some reason. I fixed line 3 to
java -jar baksmali.jar -o services-from-dcache services-deodex.dex
You could figure that out yourself, you know... by looking inside the folder, I don't see why you repeat every step like a robot uncritically.
IaguCool said:
...I don't see why you repeat every step like a robot uncritically....
Click to expand...
Click to collapse
cause i am not a programmer and a noob in this field contrary to you (maybe you are a genius and i am a little user :angel: )
moonryder said:
cause i am not a programmer and a noob in this field contrary to you (maybe you are a genius and i am a little user :angel: )
Click to expand...
Click to collapse
So basically it's like pushing a screwdriver into a wall socket without knowing what electricity is... I don't get why people that don't develop even try to deodex themselves in the first place. Deodexing is meant for developers, not "little users"...
so its must to be writen GL_ES_VERSION:I
its i/1/L ?
Alvian_P said:
so its must to be writen GL_ES_VERSION:I
its i/1/L ?
Click to expand...
Click to collapse
It's "I" for Integer. Seriously what are you people doing here? It's for *developers*, normal users have nothing to gain from this process.
That's how I have fixed it too, well done
Take care that mWentToSleep must also be fixed.
Both lines are inverted.
Edit: nevermind, your method is inverting both... I did it manually.
Please tell what command compiles the folder "services" into file "services.dex" back?
Bazooka Joe said:
Please tell what command compiles the folder "services" into file "services.dex" back?
Click to expand...
Click to collapse
Google for "smali-2.0.5.jar" for that. baksmali only decompiles.
IaguCool said:
It's "I" for Integer. Seriously what are you people doing here? It's for *developers*, normal users have nothing to gain from this process.
Click to expand...
Click to collapse
@laguCool
1. thx for discovering that problem and its solution
2. all devs began once upon a time, so i think threads like this one are very helpful for users who want to learn and become a dev in future too. So
3. please be soft with all of them who asks questions here.
Thx again for your excellent work and knowledge.
m.
moonryder said:
@laguCool
1. thx for discovering that problem and its solution
2. all devs began once upon a time, so i think threads like this one are very helpful for users who want to learn and become a dev in future too. So
3. please be soft with all of them who asks questions here.
Thx again for your excellent work and knowledge.
m.
Click to expand...
Click to collapse
Well, being soft isn't my thing, it's against my nature...
Anyways, if a person doesn't know what "I" means in Dalvik opcode, they are doing the learning process wrong. They need to be familiar with Dalvik datatypes beforehand.
IaguCool said:
It's "I" for Integer. Seriously what are you people doing here? It's for *developers*, normal users have nothing to gain from this process.
Click to expand...
Click to collapse
just look around , anyways my college is IT
ah sorry if this thread not open for normal users
IaguCool, Big, big Thanks!!! OpenGL worked now! :good:
There is a more simple way for obtain dirty odex from dirty dex file. Just copy deodexed services.dex to sdcard and type in terminal
dex2oat --dex-file=/sdcard/services.dex --oat-file=/sdcard/services.odex
Then copy created /sdcard/services.odex to PC and deodex them again to obtain correct services.dex.
_SIL_ said:
IaguCool, Big, big Thanks!!! OpenGL worked now! :good:
There is a more simple way for obtain dirty odex from dirty dex file. Just copy deodexed services.dex to sdcard and type in terminal
dex2oat --dex-file=/sdcard/services.dex --oat-file=/sdcard/services.odex
Then copy created /sdcard/services.odex to PC and deodex them again to obtain correct services.dex.
Click to expand...
Click to collapse
Thank you I rarely use the terminal so I missed that. I actually copied all /framework/ odex files from dalvik-cache to see if there are more JARs affected by this bug, will add them to the list if I find any.

Categories

Resources