[Guide]How to mod a stock kernel (add adb root, init.d & bootanim support) - Galaxy S Plus I9001 Android Development

How to mod a stock kernel Tutorial (with Windows)
by: broodplank1337
​
In this tutorial I will explain how to unsecure a kernel and how to add init.d / custom bootanimation support to a stock kernel, in this tutorial we will be using Cygwin as shell, with Dsixda's Android Kitchen.
Requirements:
- Cygwin with Packages and Dsixda's Android Kitchen
- JRE or JDK
- Winrar
- A stock Kernel
- Some common sense
Chapters:
1. Getting the kernel
2. Setting up Cygwin
3. Setting up the Kitchen
4. Modifying the Kernel
5. Testing results
Chapter 1. Getting the Kernel
Since the kernel that you are going to use is a stock kernel, it can be found within the latest stock firmware. for example for the i9001, I have this Odin flashable: "I9001XXKQE_I9001ATOKP3_I9001XXKPL_HOME.tar.md5". Open this file with Winrar and you will see the boot.img in there, just extract it and your currently done. It may also be a zImage!
{
"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"
}
Chapter 2. Setting up Cygwin
The Cygwin package you downloaded needs to be extracted, the default folder of a Cygwin installation is: "C:\cygwin". This is recommended in most cases. Once unpacked navigate to the "home" folder. In this home folder you need to create a folder that has the same username as your current windows username. Once you made that folder you have to extract the contents of "kitchen.rar" to that folder. So you will get a folder structure like this: C:\cygwin\home\username\kitchen
Chapter 3. Setting up Kitchen
Go to the original_update folder (located in: C:\cygwin\home\username\kitchen) and open dummyrom.zip with Winrar, now move your own boot.img inside the zip and choose "Store" as compression, Press ok to update the archive. If you have an zImage instead, please remove the boot.img from the archive first. Now browse to the system folder inside the archive and replace the build.prop with a build.prop from your phone. Also choose "Store" as compression and update the archive.
Starting the Kitchen:
1. Open Cygwin (X:\Cygwin\Cygwin.bat)
2. Once loaded, enter: "cd kitchen" > Enter
3. now type "sh menu" The kitchen menu will now start...​
Setting up a working folder:
1. Press 1 > Enter
2. Press Enter and wait...
3. Choose (1) dummyrom.zip > Enter
4. Choose "y" > Enter > Enter a new name (I chose WORKING_KERNEL) > Enter
(now wait until the zip is extracted)
5. Choose 2 > Enter
6. Enter to return to main menu​
Chapter 4. Modifying the Kernel
Unsecuring the kernel (to use properly with ADB)
1. Press 2 > Enter (to add root permissions)
2. Press "s" > Enter (now wait until the process is done)
3. Press Enter to return to main menu​
Adding init.d support (for using startup scripts in /system/etc/init.d)
1. Press 0 > Enter
2. Press 17 > Enter (to add init.d support)
3. Enter "y" > Enter (now wait until the process is done)
4. Press Enter to return to main menu​
Adding custom bootanimation support
Since the bootanimation support is already inside the dummyrom.zip file, you don't need to add it again.
Chapter 5. Testing the results
Now you will find a working boot.img / zImage under: C:\cygwin\home\username\kitchen\WORKING_KERNEL\
You can copy this file directly to your phone but it won't have bootanimation support.
That's why you need to enter in the Kitchen menu:
1. Press 99 > Enter
2. Press 1 > Enter
3. Press "n" > Enter
4. Press "y" > Enter
5. Press "y" > Enter > "EnterANewZipName" > Enter
6. Now your cwm zip will be located at: C:\cygwin\home\username\kitchen\OUTPUT_ZIP​
The zip that can be found in the directory above can be flashable in CWM. Ejoy your own stock kernel with init.d/bootanimation support!

Great tutorial! Btw, this works also with cm9 kernels?
Sent from my GT-I9001 using xda premium

Third post reserved for further use.
Just joking.You should make a tutorial to teach.us how to make an overclocked kernel and so on.
Btw nice tutorial from a great dev.

RyanJWZ said:
Great tutorial! Btw, this works also with cm9 kernels?
Sent from my GT-I9001 using xda premium
Click to expand...
Click to collapse
Thank you
And honestly I have no idea if it's working on CM9 kernels, I think it does work actually, you should give it a try
Costinutz32 said:
Third post reserved for further use.
Just joking.You should make a tutorial to teach.us how to make an overclocked kernel and so on.
Btw nice tutorial from a great dev.
Click to expand...
Click to collapse
lol hehe, I wish I knew how to do that, If I knew that I would have posted a tutorial for sure . I'm totally inexperienced with coding kernels unfortunately
and thanks btw ^^
edit: added screenshots

how to check init.d work?

kingsonwongs said:
how to check init.d work?
Click to expand...
Click to collapse
for example:
/system/etc/init.d/00test
Code:
#!/system/bin/sh
su -c "echo "pass" > /sdcard/pass"
If a file called "pass" will appear on your sdcard it's working

this is more a tutorial for how to make a rom flashable for cwm with kitchen
bootanimation with kitchen is not working for me, had to modify the init.rc manually in boot.img. but you can use the kitchen for extract the boot.img.
however, the headline of this thread is a bit confusing, the tutorial is ok.
i guess, it is not complete.
for set up working folder, you will need
system.ext4.tar
cache.ext4.tar
boot.img
from a nandroid backup of your rom

texten said:
this is more a tutorial for how to make a rom flashable for cwm with kitchen
bootanimation with kitchen is not working for me, had to modify the init.rc manually in boot.img. but you can use the kitchen for extract the boot.img.
however, the headline of this thread is a bit confusing, the tutorial is ok.
i guess, it is not complete.
for set up working folder, you will need
system.ext4.tar
cache.ext4.tar
boot.img
from a nandroid backup of your rom
Click to expand...
Click to collapse
Well actually, I've kept the dummyrom.zip so minimalistic that boot.img is fully compatible with the kitchen (it needed app/bin folder and build.prop), but all other things are basically removed.
And you don't need all those files, we are not trying to create a working rom here, and the bootanimation is idd not working correctly, that's why I added the AOSP bootanimation library to the dummyrom.zip

broodplank1337 said:
Well actually, I've kept the dummyrom.zip so minimalistic that boot.img is fully compatible with the kitchen (it needed app/bin folder and build.prop), but all other things are basically removed.
And you don't need all those files, we are not trying to create a working rom here, and the bootanimation is idd not working correctly, that's why I added the AOSP bootanimation library to the dummyrom.zip
Click to expand...
Click to collapse
ah, ok i didn't know about the dummyrom.zip
but only for extract boot.img and make the small changesfor init.d and bootanimation, you can use other methods, not the kitchen.
the setup for kitchen is much more work as needed for this.
you can also use the tool "disk internals linux reader" and change everything you want manually.
just my 2 cents.
maybe with alle that what you have done for this tutorial, you can change/expand it to "how to make a rom with kitchen"...
well whatever. do it as you want. good luck.

texten said:
ah, ok i didn't know about the dummyrom.zip
but only for extract boot.img and make the small changesfor init.d and bootanimation, you can use other methods, not the kitchen.
the setup for kitchen is much more work as needed for this.
you can also use the tool "disk internals linux reader" and change everything you want manually.
just my 2 cents.
maybe with alle that what you have done for this tutorial, you can change/expand it to "how to make a rom with kitchen"...
well whatever. do it as you want. good luck.
Click to expand...
Click to collapse
about that, you're right, it can be done allot easier, but the thing is, I never got any working kernel when I manually packed them (or with some scripts), so I'm very thankful to the kitchen, which allows me to make an actual working boot.img

Hey brood i tried this tutorial with my stock XXKG3 kernel and did it step by step
Then i flashed the output.zip and added the folder init.d in system/etc/ and the pass script you posted above but there isnt any pass file on my sdcard ):
what went wrong?
//edit: tried pushing a bootanimation (sanim.zip) to /system/media/ but after the reboot it shows the old galaxy s plus bootanimation );

EternalFame said:
Hey brood i tried this tutorial with my stock XXKG3 kernel and did it step by step
Then i flashed the output.zip and added the folder init.d in system/etc/ and the pass script you posted above but there isnt any pass file on my sdcard ):
what went wrong?
//edit: tried pushing a bootanimation (sanim.zip) to /system/media/ but after the reboot it shows the old galaxy s plus bootanimation );
Click to expand...
Click to collapse
hmm the init.d part should work. try it without "su -c" this time
the name of the bootanimation has to be "bootanimation.zip" instead of "sanim.zip"

broodplank1337 said:
hmm the init.d part should work. try it without "su -c" this time
the name of the bootanimation has to be "bootanimation.zip" instead of "sanim.zip"
Click to expand...
Click to collapse
also doesnt work without su -c and renamed to bootanimation.zip but theres still stock bootanim ):
isnt this tut working with 2.3.3 kernel?
BTW: here is my kernel:
www.hengelmueller.bplaced.net/OUTPUT_ZIP.zip
Sent from my GT-I9001 using XDA

EternalFame said:
also doesnt work without su -c and renamed to bootanimation.zip but theres still stock bootanim ):
isnt this tut working with 2.3.3 kernel?
Sent from my GT-I9001 using XDA
Click to expand...
Click to collapse
Hmm then I don't know atm what the problem, but about the bootanimation, did you build a zip from the working folder? Or did you just copy boot.img? Since it needs the bootanimation library which is included in dummyrom.zip

broodplank1337 said:
Hmm then I don't know atm what the problem, but about the bootanimation, did you build a zip from the working folder? Or did you just copy boot.img? Since it needs the bootanimation library which is included in dummyrom.zip
Click to expand...
Click to collapse
i have the bootanimation file in system/bin so that shouldnt be the problem ):
could you pls try with my kernel from the link i posted above?
it drives me nuts that i am not able to do such "easy" things ): ^^
btw: do i need something in init.rc or something which tells the system when it should execute the scripts?
Sent from my GT-I9001 using XDA

Search in the init.rc for system/bin/samsungani and replace it with system/bin/bootanimation.
This should work I guess. AT least this is what i did with my Stock Kernels.
Sent from my GT-I9001 using XDA

Does not work either ):
could you pls try with my kernel above?
Sent from my GT-I9001 using XDA

Tried also with skyhigh and feacore and init.d also doesnt work
could it be that they dont work with 2.3.3 ?
Sent from my GT-I9001 using XDA

EternalFame said:
Tried also with skyhigh and feacore and init.d also doesnt work
could it be that they dont work with 2.3.3 ?
Sent from my GT-I9001 using XDA
Click to expand...
Click to collapse
does your init.d folder and the scripts inside have the right permissions?

broodplank1337 said:
does your init.d folder and the scripts inside have the right permissions?
Click to expand...
Click to collapse
Which permissions do i need?
Sent from my GT-I9001 using XDA

Related

[MOD] Overscroll Effect and CRT Screen off animation for GALAXY FIT S5670

Overscroll Glow MOD for Gingerbread Galaxy FIT S5670
Only for DEODEXED ROM.
For CRT screen off animation see post 2.
Source works with all Gingerbread Firmwares.!!
Here is the Overscroll Glow effect for GALAXY FIT running on Gingerbread similar to the one in CM7 and stock Gingerbread. dhiru1602 have ported the Functions and Code required for the Overscroll Glow to Gingerbread Stock firmware XXKPG and XWKPI. I made the Modifications to smali files to make it work in G-FIT with the help of dhiru1602. Thanx to him.
Note: Few Touchwiz apps that have "Swipe to Message or Call Feature" will have the default scrolling and this MOD doesn't take effect for such Scroll Lists, since this feature is a part of Touchwiz and not Stock Android. Its hardcoded directly in the APK and they would require appropriate edits which is not a part of this MOD. All the regular Android Scrolling Lists will have Overscroll Glow.
For Developers and Themers
There is an important thing to note. Some Touchwiz applications use calls to inbuilt scrolling functions, hence it is important to preserve the old functions so that scrolling in few TW Apps works fine.
1. Extract the Classes.dex from framework.jar (Use a Framework.jar with Extended Menu as a Base)
2. Use baksmali to decode the DEX file to .smali files.
3. Download the ZIP package and extract the files inside android/widget/
4. Use smali to recode the edited .smali files to a DEX file.
5. Use a file manager to add the newly created DEX file to the framework.jar
6. Copy the framework.jar to your device and reboot.
If you are facing problems with overscroll effect like white background or some other image instead of glow then You might need to change the Resource ID's for the Overscroll PNG Images
AbsListView.smali: (line 10884 and 10892)
.line 666
.local v2, res:Landroid/content/res/Resources;
const v3, *Resource ID of overscroll_edge.png*
.line 667
.local v0, edge:Landroid/graphics/drawable/Drawable;
const v3, *Resource ID of overscroll_glow.png*
Click to expand...
Click to collapse
Click to expand...
Click to collapse
For Users [DEODEXED XXKPG, XWKPI ROM ONLY]
ADB Method:
Download the framework.zip file and copy the file inside the zip to ur sdcard.(not in any folder)
use these commands:
adb shell
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/framework.jar /system/framework/
reboot
Click to expand...
Click to collapse
Recovery Method:
Download the overscroll.zip
copy it to sdcard
now restart in recovery mode(switch off ur device and hold middle(OK) button and power on)
now select "apply update from sdcard" option.(press vol down button to navigate through options)
select overscroll.zip u just copied to sdcard
wen its complete select "reboot system now" option.
Click to expand...
Click to collapse
Initial boot will take sometime. So please be patient.
Click to expand...
Click to collapse
Changing the Glow Color
Change the png's in framework-res.apk.
overscroll_edge.png
overscroll_glow.png
Click to expand...
Click to collapse
Thanks to dhiru1602 who ported this mod to SGS. I used the same source and made it possible for G-FIT. All credits goes to dhiru1602 and some for me for making it available for G-FIT.
Tested on XXKPI and XXKPG. If u face any issues them reply here. i wil try to help u. THANX.
SCREENSHOT:
{
"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"
}
I accept no responsibility for your bricked or non functional device from using this MOD. Use it with caution.
If u like this dont forget to press thanks button.
CRT Animation for GALAXY FIT S5670
CRT Screen off animation for GALAXY FIT Gingerbread.
In SAMSUNG GINGERBREAD ROM this animation is disabled by default but code for this still present.
So Here are the steps to enable it in SAMSUNG FIT:
Only for Stock ROM. Follow this step Only if u r having stock ROM and Stock theme as this file contains stock res. Otherwise skip this step.
Download the CRT ANIM.zip and extract it to ur sdcard.
And follow these steps.
ADB Commands:
adb shell
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
stop
cp /sdcard/framework-res.apk /system/framework/
cp /sdcard/build.prop /system/
reboot
Click to expand...
Click to collapse
Click to expand...
Click to collapse
For developers :
1. Get apk manager
2. Put framework-res.apk in "modding" folder
3. Run apk manager, decompile (option 9)
4. Go into projects\framework-res\res\values\bool.xml
5. Make config_animateScreenLights to false
6. Go back to apkmanager and select compile.
7. Say y
8. Say y
9. Delete resources.arsc from keep folder
10. Enter in apkmanager again
11. U'll find unsignedframework-res.apk in "modding" folder
Click to expand...
Click to collapse
For users :
Copy the unsignedframework-res.apk to your sdcard and rename it to framework-res.apk.
It should be in root of ur sdcard.(not in any folder)
Code:
adb shell
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
stop
rm /system/framework/framework-res.apk
cp /data/local/tmp/framework-res.apk /system/framework/
rm /data/local/tmp/framework-res.apk
reboot
Click to expand...
Click to collapse
Click to expand...
Click to collapse
And at last u need to modify the build.prop
Pull it from ur mobile or use the one i attached. It is inside the CRT ANIM.zip file.
Open the build.prop file in any Text editors (i used notepad++) find "debug.sf.hw=1" and add # (making it comment) at first.
It should look like this:
#debug.sf.hw=1
And save.
Now copy it to ur sdcard and then use
adb shell
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/build.prop /system/
reboot
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Now the Screen off animation should work.
Thanks to Daneshm90 who made this Guide. I made it to work on G-FIT.
Credits to Daneshm90 and to me for small changes.
If u like this post Then Please dont forget to press Thanks Button.
I am not responsible for any damage. Dont blame me if u didnt follow the steps correctly.
Nice work, over scroll looks too overdone..Maybe its the .png size in the framework, I'll Photoshop it to look smaller
which other overscroll colours are available and how do i change it???
thnx... btw hw did ya change d notification bar icons??? metamorph themes?
dint work on xxkpi :/
TRIED D ADB METHOD.. UNZIPPED D FRAMEWORK.JAR TO SD.. BUT ON PUTTING cp /sdcard/framework.jar /system/framework/ IT SAYS FRAMEWORK.JAR NOT FOUND
My rom is s5670xxkpi... Nw is it deodexed or d stock rom??????
xm2406 said:
TRIED D ADB METHOD.. UNZIPPED D FRAMEWORK.JAR TO SD.. BUT ON PUTTING cp /sdcard/framework.jar /system/framework/ IT SAYS FRAMEWORK.JAR NOT FOUND
Click to expand...
Click to collapse
did u unzipped the jar file or zip file? u need to have framework.jar file in sdcard. dont extract the jar file...
xm2406 said:
My rom is s5670xxkpi... Nw is it deodexed or d stock rom??????
Click to expand...
Click to collapse
XXKPI is stock rom and u need to deodex it manually. This mod have deodexed files....
xm2406 said:
dint work on xxkpi :/
Click to expand...
Click to collapse
U might have missed something. check the steps again. its tested on XXKPI in my phone.
reply
vishwanathptl said:
did u unzipped the jar file or zip file? u need to have framework.jar file in sdcard. dont extract the jar file...
Click to expand...
Click to collapse
i unzipped the zip file to d sdcard.... i hv d framework.jar on d sd.. still no luck...
i use better terminal emulator... even tried changng d sd.. nothng seems to work
reply
vishwanathptl said:
did u unzipped the jar file or zip file? u need to have framework.jar file in sdcard. dont extract the jar file...
Click to expand...
Click to collapse
by the recovery method it says succesfull but i c no overscroll effects!
wth!
vishwanathptl said:
XXKPI is stock rom and u need to deodex it manually. This mod have deodexed files....
Click to expand...
Click to collapse
hw do i de-odex?
http://wiki.sdx-developers.com/index.php/How_to_deodex_a_ROM ???????????????
man too complicated!
bro u did not reply me here
http://forum.xda-developers.com/showthread.php?t=1110591
xm2406 said:
hw do i de-odex?
http://wiki.sdx-developers.com/index.php/How_to_deodex_a_ROM ???????????????
man too complicated!
Click to expand...
Click to collapse
SORRY FOR LATE REPLY. I WAS BUSY.... DIDNT HAD TIME TO CHECK MY THREADS....
to deodex simply use xUltimate.... and GUIDE is here. In that guide skip step 5. Its not for our phone....
After deodex
Hi,
I just wanted to ask you that after I deodexed my G-Fit (XXkpi) my android doesn't work. I installed market externally but it doesn't open. It shows a white screen and closes. Also superuser app also force closes everytime !!
invincible authority said:
Hi,
I just wanted to ask you that after I deodexed my G-Fit (XXkpi) my android doesn't work. I installed market externally but it doesn't open. It shows a white screen and closes. Also superuser app also force closes everytime !!
Click to expand...
Click to collapse
guys wai for some time.... i wil post a basic deodexed, jit enables and all my mods included rom here... then all of u wil get deodexed rom....
vishwanathptl said:
guys wai for some time.... i wil post a basic deodexed, jit enables and all my mods included rom here... then all of u wil get deodexed rom....
Click to expand...
Click to collapse
That'll be awesome !!!
Will wait eagerly........
Manange app block on this theme some metode to work manange app?

[Tutorial] How to change kernel logo (1st boot srceen) [COMPLETED]

We have 3 major works here... So I gonna to make it seperated
-1st post is HOW TO EXTRACT kernel.img (boot.img)
-2nd post is HOW TO CONVERT PICTURE FILE to BOOT.RLE
-3rd post is HOW TO REPACK THE KERNEL PAKAGE into boot.img
Requiredment
-Window machine
-installed cygwin
-the full boot.img/kernel (some kernel won't work because there is no full pakage/ i mean we can't)
-bootimg.zip (tool for UNPACK and REPACK kernel)
-boot_screen_logo_creation_package.rar
Thank and Credit
i- Credit to DooMLoRD Recognized Developer over most of XPERIA devices for his own tool and tutor that I learned before
ii- Credit to jimbo77 Senior Member for his tutorial that I used and learned and tool for unpack and repack
ii- Don't forget to give them a thanks meter
=============================================================================
Here we go
1-This section I will show u how to unpack and repack the boot.img
just see from original thread by jimbo77 from here and download the UNPACK and REPACK tool by him HERE
this is a fast guide from me:-
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
cd /boot
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"
}
5-Now, unpack your boot.img by running the following command:
./extractboot boot.img
Click to expand...
Click to collapse
If your output looks like this, then the extraction has worked correctly! Note that the Command Line string has also been read from the source file, this will be used later when you go to re-pack your file.
Your script folder should now look like this:
boot.img-kernel is the compiled kernel blob that was inside the source boot.img, if you want to replace the kernel with another compiled kernel image, you can replace this file with another one (but leave the file name the same)
boot.img-ramdisk.gz is the gzipped ramdisk image which has been split from the boot.img, you should leave this file alone.
The “out” folder contains the EXTRACTED ramdisk, and this is where you should make your changes to the ramdisk.
Important Note!
Remember, when editing files in the ramdisk through Windows, such as init.rc, Windows notepad will not format the files correctly, making them almost impossible to read, wheras Wordpad will LOOK like it is formatting the files correctly, if you save one of these files from the Wordpad application it will BREAK the file and it will no longer be able to be read correctly by Android. To edit these files you MUST use an editor such as Notepad++ which you can download for free.
AGAIN...
Special thanks/credit to jimbo77 for his excellent guide
So.. NEXT step to change a kernel logo is here
Requiredment
1-a picture what are u like to look into the 1st boot screen (kernel logo) (make sure it size/resolution same your device resolution)
2-boot_screen_logo_creation_package.rar
3-some infos and knowledges here
4-window machine like i explained on 1st post
My quick guide
-extract the tool.rar
-move extracted files into new folder (name it 'rle' folder without quote)
-move into cygwin folder (to make it easy to follow my simple guide)
-copy your own logo.png (a picture u want to use on a kernel) into same rle folder
(for 4 steps above it shold look like tis)
-now launch cygwin.bat
cd /rle
Click to expand...
Click to collapse
./convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
Ah...my mistake..don't forget to move/copy/replace new logo.rle into
C/cygwin/boot/out/ramdisk/here
if you done good...follow next step on next post (to repack your moded kernel)
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
./packboot
Click to expand...
Click to collapse
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
I need this for extra (extra thanks..)
(may U?)
does this work on hboot 1.14?
byliu88 said:
does this work on hboot 1.14?
Click to expand...
Click to collapse
double that?
Will this remove the HTC red warning at the very bottom??
Sent from my HTC One S using Tapatalk 2
Elloco305 said:
Will this remove the HTC red warning at the very bottom??
Sent from my HTC One S using Tapatalk 2
Click to expand...
Click to collapse
Nothing removes that except SOFF.
Sent from my HTC One S running ViperOneS!
invasion2 said:
Nothing removes that except SOFF.
Sent from my HTC One S running ViperOneS!
Click to expand...
Click to collapse
Don't scream at me Bro!
I figured that much though just thought I'd ask. Lol
Sent from my HTC One S using Tapatalk 2
Hmm think I might try this tomorrow to see if it works on 1.14.
---------- Post added at 03:07 AM ---------- Previous post was at 02:38 AM ----------
Changed my mind lol but unpacking the boot.img is not working.
I fixed that but all I get is a bootloop and nothing has changed. Here the boot.img I did, don't if anybody wants to try it on a lower Hboot or can see if I did it wrong. Boot.img is from aokp_ville_experimental_Nov-01-12.
Darknites said:
I fixed that but all I get is a bootloop and nothing has changed. Here the boot.img I did, don't if anybody wants to try it on a lower Hboot or can see if I did it wrong. Boot.img is from aokp_ville_experimental_Nov-01-12.
Click to expand...
Click to collapse
Darn... no luck for hboot 1.14 I see. Updating was such a bad decision.
byliu88 said:
Darn... no luck for hboot 1.14 I see. Updating was such a bad decision.
Click to expand...
Click to collapse
nelikp is have a go doing it because he says the image I did didn't convert right.
I have a Nandroid of the axiom build (an awesome sense ROM popular here a few months ago before the devs fell under the SG3 spell) which I had been using on my phone until about a week ago, and for whatever reason this ROM, which has custom boot animation, has a splash screen without the red overlay text. I don't know why.. But if anyone wants to look at it, let me know. Because a pristine splash screen without S-Off is possible. I would think you could look at the partitions for the splash and maybe figure out if there is something different.
Just thought I would offer. I am trying to get up to speed on building ROMs, but am not quite there yet, otherwise I would examine it.
Sent from my HTC One S using xda premium
syntropic said:
I have a Nandroid of the axiom build (an awesome sense ROM popular here a few months ago before the devs fell under the SG3 spell) which I had been using on my phone until about a week ago, and for whatever reason this ROM, which has custom boot animation, has a splash screen without the red overlay text. I don't know why.. But if anyone wants to look at it, let me know. Because a pristine splash screen without S-Off is possible. I would think you could look at the partitions for the splash and maybe figure out if there is something different.
Just thought I would offer. I am trying to get up to speed on building ROMs, but am not quite there yet, otherwise I would examine it.
Sent from my HTC One S using xda premium
Click to expand...
Click to collapse
As far as I know we can't flash those partitions without the need of S-OFF or using adb to push those partitions manually.
So it should be not possible flashing those from recovery, same reason we can't flash the kernel in it.
Gesendet von meinem HTC One S
v3n3 said:
As far as I know we can't flash those partitions without the need of S-OFF or using adb to push those partitions manually.
So it should be not possible flashing those from recovery, same reason we can't flash the kernel in it.
Gesendet von meinem HTC One S
Click to expand...
Click to collapse
There is another way here but need to be 1.09 lower Hboot for it to work. I think this boot.img mod just dont work for us and nelikp never got back to me.
Darknites said:
I fixed that but all I get is a bootloop and nothing has changed. Here the boot.img I did, don't if anybody wants to try it on a lower Hboot or can see if I did it wrong. Boot.img is from aokp_ville_experimental_Nov-01-12.
Click to expand...
Click to collapse
How did you fixed that error?
alexeius said:
How did you fixed that error?
Click to expand...
Click to collapse
When you install Cygwin you be asked if you like to install plug-ins or something like that, when it does that search for cpio and select to install all and do the same for perl.
Darknites said:
I fixed that but all I get is a bootloop and nothing has changed. Here the boot.img I did, don't if anybody wants to try it on a lower Hboot or can see if I did it wrong. Boot.img is from aokp_ville_experimental_Nov-01-12.
Click to expand...
Click to collapse
I had the same problems. I followed your guide step by step and encountered boot loop without the change. Im on Hboot 1.09.0000. I realy wanted to get this image as my kernel logo -=*( woah is me...
essentialmindz said:
I had the same problems. I followed your guide step by step and encountered boot loop without the change. Im on Hboot 1.09.0000. I realy wanted to get this image as my kernel logo -=*( woah is me...
Click to expand...
Click to collapse
I got same thing so give up. Boot you in luck with that Hboot you can use this thread here to do what you want to.

[GUIDE][MOD][KERNEL] Change Bootsplash Image

DISCLAIMER NOTE: I AND XDA IS NOT TO BE HELD RESPONSIBLE FOR ANY DAMAGES THAT YOUR PHONE MIGHT INCUR DURING THIS PROCESS, I HAVE TESTED IT IN MY BEST KNOWLEDGE TO WORK FOR OUR DEVICE BUT JUST TO BE SURE, PLEASE PERFORM ALL NECESSARY BACKUPS FOR THE PHONE TO PREVENT ANY DATA LOSS, IF YOU HAVE THE NEED TO DISAGREE AND/OR FAIL TO COMPLY JUST DON'T FLASH IT AND GET ON WITH YOUR LIVES
Click to expand...
Click to collapse
This is for editing the bootsplash: the image wich is displayed while kernel is loaded.
For example in Samsung devices is the image which comes between Samsung Logo and bootanimation.
This change is made in kernel, so if you want to include this in your ROM you must include the edited kernel with it.
Pre-requisites:
1.-Android Image Kitchen (DOWNOLAD)(THREAD)
2.-edit image on windows Tool modified by me (DOWNLOAD)(thanks to championswimmer for this)
3.-I recommend Photoshop or similar software for image editing (GIMP or Paint are ok)
4.-I recommend to enable the file extension visualization in Windows.
Let's start!
1.-Take the boot.img of the kernel that you want to use
2.-Extract Android Image Kitchen
3.-Extract edit-image-windows.zip
4.-Put boot.img in Android Image Kitchen folder
5.-Now go to cmd and navigate to Android Image Kitchen folder
6.-Type:
Code:
unpackimg boot.img
7.-Now open windows explorer and navigate to *\Android Image Kitchen\ramdisk, look for a *.rle file and copy it. Rebember the name of the .rle file, you'll need it later.
8.-Paste the rle on edit-image-windows folder
9.- Open cmd, navigate to edit-image-windows folder and type:
Code:
rle2png nameoftthrle.rle 000x000
Where I wrote nameoftthrle.rle write the name of your rle and where I wrote 000x000 write your phone's resolution.
Example: for me, I have a GT-S6500D wich has a 320x480 resolution and the name of my rle is GT-S6500.rle so I must write:
Code:
rle2png GT-S6500.rle 320x480
10.- Open the .png file which is now on edit-image-windows folder with your image edition sowtware (I recommend Photoshop) and made the changes you want. In my phone, is only displayed on black and white, so it's useless to enable color mode.
11.-When you finished editing go again to cmd and write:
Code:
png2rle nameofttherle.png
Where I wrote nameoftthrle.rle write the name of your png.
Example:
Code:
png2rle GT-S6500.rle.png
12.-Now you'll have a file called nameofyourrle.rle.png.rle witch is the modified rle
13.-Go to *\Android Image Kitchen\ramdisk and replace the rle with the new one witch is modified.
14.-Now go to cmd, navigate to Android Image Kitchen folder, and type:
Code:
repackimg
15.-Done! rename the image-new.img to boot.img and flash it!
Click to expand...
Click to collapse
PLEASE give me a thanks if you like my work
reserved
last one reserved
manu19thebest said:
This is for editing the bootsplash: the image wich is displayed while kernel is loaded.
For example in Samsung devices is the image which comes between Samsung Logo and bootanimation.
This change is made in kernel, so if you want to include this in your ROM you must include the edited kernel with it.
Pre-requisites:
1.-Android Image Kitchen (DOWNOLAD)(THREAD)
2.-edit image on windows Tool modified by me (DOWNLOAD)(thanks to championswimmer for this)
3.-I recommend Photoshop or similar software for image editing (GIMP or Paint are ok)
4.-I recommend to enable the file extension visualization in Windows.
Let's start!
PLEASE give me a thanks if you like my work
Click to expand...
Click to collapse
Nice work, wonder if it work on window64
You can now edit/split a ramdisk on your phone now. Apktool on android has boot.img/ramdisk editing functionality. And a whole bunch of others....
Download apktool on android from here:
http://code.google.com/p/apktool/downloads/list
Make sure you download the correct zip file for your phone... And the updated apk. Follow the installation guide the developer has posted.
Before you split the boot.img make sure you're running apktool on an ext4 filesystem. Move the boot.img to /cache/subfolder our something like that.... then you shouldn't have a problem.
EDIT:
If your ROM has SElinux integrated, make sure it's set to permissive before splitting the image file or you'll get sh-applet error.
Go into terminal emulator and type:
su
setenforce 0
Happy editing
_kohjun_ said:
Nice work, wonder if it work on window64
Click to expand...
Click to collapse
My Windows is 64 so yes
Enviado desde mi GT-S6500D usando Tapatalk 2
DexedrineXR said:
You can now edit/split a ramdisk on your phone now. Apktool on android has boot.img/ramdisk editing functionality. And a whole bunch of others....
Download apktool on android from here:
http://code.google.com/p/apktool/downloads/list
Make sure you download the correct zip file for your phone... And the updated apk. Follow the installation guide the developer has posted.
Before you split the boot.img make sure you're running apktool on an ext4 filesystem. Move the boot.img to /cache/subfolder our something like that.... then you shouldn't have a problem.
EDIT:
If your ROM has SElinux integrated, make sure it's set to permissive before splitting the image file or you'll get sh-applet error.
Go into terminal emulator and type:
su
setenforce 0
Happy editing
Click to expand...
Click to collapse
I prefer using pc, mobile isn't good for image editing and boot.img is kernel, so just a little pediting will be a brick for sure.
Enviado desde mi GT-S6500D usando Tapatalk 2
manudroid19 said:
My Windows is 64 so yes
Enviado desde mi GT-S6500D usando Tapatalk 2
Click to expand...
Click to collapse
and on x32 sys? it didnt worked for me. bootloop. anyway doing for the 2nd time now
Edit- it did worked. many thanks
So how do you put a modified kernel in a rom zip? I built a rom from source, and want to change the uninstalled kernel to my own. P.S I have a tool that does this and creates a flashable zip for you, if anyone wants it.
Great work!!!
Tried it on my SONY... - perfect! :good:
Thank you very much
Can you use an .elf or .sin file instead of .img?
I'm on cm12.1 and there aren't any rle files
im also on cm12.1 an no rle file
By using these tools Can I able to change my boot splash ( ASUS Boot logo) in my asus zenfone 5 ? If not, then please guide me so that i can change my ASUS BOOT LOGO with custom made boot logo.
Thanks in advance?
I can't help myself but this work looks very similar to @DooMLoRD work - even the script is almost the same. Only resolution variable added....
https://forum.xda-developers.com/showthread.php?t=1140406

WIP Experimental DIY [Deodexed-Xposed Galaxy S5 Neo dirty-version

Xposed has been achieved with some long testing back and forth for Galaxy S5 Neo. Without the need of custom build recovery :victory:
Code:
method public Disclaimer();
You're allowed to take my work and create your own rom, or do anything with it.
I (Laststandingdroid) provide these files as/is by no EULA or anything else.
I share this with the community and you [I][B]don't[/B][/I] need to ask for permission.
Your cat, dog, horse or even your baby is allowed to take these files and put it in your phone without questioning me.
All i do ask is that you put correct credits. however if you don't want to it isn't a must i won't die, nor get a heart attack. I know how the internet works. people will always copy and being willing to take credits for others work ;)
.end method
Note this recovery is experimental, it was used for my personal testing but it is now released here.
Requirements:
Rooted Device (or not mandatory i guess)
Busybox
PC with odin
Custom Modified Stock Recovery with insecure adb
stock recovery here: (Odin tar) https://mega.nz/#!DgomiZAQ!1m7aU5ojoU7PCw4L7E8hmk7mCFo2z0f_sYafJHzN7XE (NEE)
Modified recovery (Odin tar)
https://mega.nz/#!jogHWBTC!jozQXYAdnfzblZNiUmei4RLnzgoFzQg3WAdsi-LDMPA
Flash with Odin
Stock deodex-xposed Download:
https://mega.nz/#!r8BzXQKD!YCJsATrxuXRg7-tiHFtJWRKc6Mt3fTQAYElzPR01uSo
DIY (Do It yourself) Method
1/ First you need to go to sammobile to download last available generic firmware OR download the one related to your carrier.
2/ You need to decompress twice (first is the zip from sam, 2nd the tar.md5 file) with Universal Extractor.
3/ you will see many file (boot, recovery....and system the one which is necessary).
4/ now we need to decompress system.img but you can't currently. We need to convert this file to ext4 format. So time to download some necessary extra files. (https://1fichier.com/?bz9rmuuap4)
5/ Decompress this zip file in c:\deodex and put inside the system.img
6/ run 1MODEXT4.bat. This will create a temp.ext4 file in this folder.
7/ Now you can open the temp.ext4 file with ext2explore.exe which is in the folder.
8/ Create a folder on your PC named "system". Go on ext2explore, select "app", framework", "priv-app" folder and right click and make "save". Choose the folder system, you created.
9/ Now you have all the odexed files we need to deodex
10/ Run "SVADeodexerForArt.exe" and precise the system folder you created. Tick all boxes. Wait until it deodex. See if there is no errors in window
11/ Watch inside the "deodex" folder. you will see app, priv-app & framework folder. Here are the deodexed files.
Optional step:
12/ If you want before pushing the files you can debloat the rom. Or include xposed files too as LastStandingDroid
Pre Built Files
1.Download the zip and extract it on your pc.
2. Flash modified recovery trough Odin
Reboot to system
adb shell
mount - remount,rw /system
rm -rf /data/dalvik-cache
4. Reboot into recovery (don't be fooled by the stock recovery, it is modified to get system mounted as r/w trough adb
5. Plug your phone to PC, and wait for adb to initialize (this can take up to 20 seconds)
6. Type: adb remount
7. type: skip this for now now to 8.
8. Type adb push *drag and drop the extracted system folder to cmd/terminal window. /system/
In the terminal you should now have adb push /path/to/system /system/
8. Wait until all files has been pushed
9. Reboot the device, it will take time to boot since it will rebuild dalvik-cache
Optional is to recover stock recovery
Thanks @wanam for his modified xposed version which makes it compatible with Samsung variants for 5 1+ @Chainfire for his insecure adbd which is used to mount the system as read/write in recovery. Without this this wouldn't be possible
Special thanks @WILMANS2M for testing and reporting back. @bolme123 for testing and reporting back. @Dennziil testing and reporting @kaodd for being funny and being happy that we work on this
Sent from my SM-G903F using Tapatalk
Bugs: your original /sdcard path might be replaced this will not remove your files it will rather just kill the path.
You can access the internal sd files using /storage/emulated/0/
Settings might force close sometimes, this only seems to happen if you go to app info from recent. Not sure what gives
At least it might takes longer to load
Sent from my SM-G903F using Tapatalk
{
"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"
}
Sent from my SM-G903F using Tapatalk
Think im missing something, but don't know what.
C:\Users\Dennis>adb shell
[email protected]:/ $ dd if=/dev/block/platform/13540000.dwmmc0/by-name/RECOVERY of=/sdcard/stockrecovery.img
000.dwmmc0/by-name/RECOVERY of=/sdcard/stockrecovery.img <
dd: /dev/block/platform/13540000.dwmmc0/by-name/RECOVERY: Permission denied
So laststandingdroid, no need of a permissive kernel to do this right ?
Envoyé de mon K00F en utilisant Tapatalk
If you follow this will it trigger Knox or other bits and does it require root for it to work?
Thank you very much for your work
Dennziil said:
Think im missing something, but don't know what.
C:\Users\Dennis>adb shell
[email protected]:/ $ dd if=/dev/block/platform/13540000.dwmmc0/by-name/RECOVERY of=/sdcard/stockrecovery.img
000.dwmmc0/by-name/RECOVERY of=/sdcard/stockrecovery.img <
dd: /dev/block/platform/13540000.dwmmc0/by-name/RECOVERY: Permission denied
Click to expand...
Click to collapse
You need to write su first sorry
WILMANS2M said:
So laststandingdroid, no need of a permissive kernel to do this right ?
Envoyé de mon K00F en utilisant Tapatalk
Click to expand...
Click to collapse
Not quite sure I used permissive kernel might work. But I use permissive one to be able to use viper4android
Tepes4 said:
If you follow this will it trigger Knox or other bits and does it require root for it to work?
Thank you very much for your work
Click to expand...
Click to collapse
Yes know will be triggered and it requires root ofc [emoji14]
Sent from my SM-G903F using Tapatalk
So maybe first install permissive kernel, 2nd flash cfautoroot and 3rd your method
Envoyé de mon SM-G903F en utilisant Tapatalk
WILMANS2M said:
So maybe first install permissive kernel, 2nd flash cfautoroot and 3rd your method
Envoyé de mon SM-G903F en utilisant Tapatalk
Click to expand...
Click to collapse
No idea on permissive kernel
Root shouldn't be needed as recovery can remount as r/w but it's recommended since some apps requires root
Sorry I posted this tutorial in a rush.
Will clear it later.
Other galaxy s5 neo users if you want deodex send me your system framework and apps in order to get deodexed system
Sent from my SM-G903F using Tapatalk
I finally succeed deodexed last sgs5 neo rom file G903FXXU1AOI5_G903FXEF1AOI1_G903FXXU1AOI7.
64-bit Deodexer for Android Runtime (Version 3.5 ?? 20/07/2015) © Valery Studenikin, 2015
Path to stock /system directory: D:\Deodex\5.1.1\system
Android 5.1.1: SM-G903F, LMY47X.G903FXXU1AOI5, changelist 5560999, Tue Sep 15 19:31:20 KST 2015
Processor architecture: \arm\
Files deodexed succesfully: 355, with errors: 0. CPU time: 00:23:46 (1426,132 sec.)
List of originally deodexed (within stock firmware) files, are left as they were originally:
/system/framework/com.google.android.maps.jar
/system/framework/com.google.android.media.effects.jar
/system/framework/com.samsung.device.jar
/system/app/Bridge.apk
/system/app/minimode-res.apk
/system/app/RCPComponents.apk
/system/app/SecurityLogAgent.apk
/system/priv-app/ContextProvider.apk
/system/priv-app/HealthService.apk
/system/priv-app/intelligenceservice.apk
/system/priv-app/SPDClient.apk
LastStandingDroid i see in your zip file that some app were not deodexed as GMScore...Normal ?
I will try to push mine and try your method and will make a factory reset to see what's happening.
WILMANS2M said:
I finally succeed deodexed last sgs5 neo rom file G903FXXU1AOI5_G903FXEF1AOI1_G903FXXU1AOI7.
LastStandingDroid i see in your zip file that some app were not deodexed as GMScore...Normal ?
I will try to push mine and try your method and will make a factory reset to see what's happening.
Click to expand...
Click to collapse
Yes gms core failed I don't care about it since it isn't needed.
Edit shealth is broken download an update trough Samsung apps or download: https://mega.nz/#!3lwmEaKQ!f3iG_WQrK4hTXumHZbo0Jvs5DT9O0UC1TDlLRr4kH4s
Install as an update.
Sent from my SM-G903F using Tapatalk
Just 3 questions :
1/ Do we need to keep folders of apk. Can we put only apk in folder app or priv-app like xposed apk ?
2/ What do you add to the deodexed rom apart xposed file ?
3/ About xposed file :
in app : XposedInstaller.apk
in lib : all files
in framework : XposedBridge.jar
That's all we need ?
I really thank you.
Next step : The dirty flash
WILMANS2M said:
Just 3 questions :
1/ Do we need to keep folders of apk. Can we put only apk in folder app or priv-app like xposed apk ?
2/ What do you add to the deodexed rom apart xposed file ?
3/ About xposed file :
in app : XposedInstaller.apk
in lib : all files
in framework : XposedBridge.jar
That's all we need ?
I really thank you.
Click to expand...
Click to collapse
Depends on what you mean to keep folders?
There's only xposed added and needed files.
There's also files in system/bin app_process oat2dex patchoat and two more check the zip file xposed containing
Now it's ice fishing
Sent from my SM-G903F using Tapatalk
LastStandingDroid said:
Depends on what you mean to keep folders?
There's only xposed added and needed files.
There's also files in system/bin app_process oat2dex patchoat and two more check the zip file xposed containing
Now it's ice fishing
Sent from my SM-G903F using Tapatalk
Click to expand...
Click to collapse
For ex, for the folder "AccuweatherPhone2015" we have inside "AccuweatherPhone2015.apk"
I just wonder if we can just put "AccuweatherPhone2015.apk" inside "app" folder without the folder "AccuweatherPhone2015"
Feel like a noob now, but when i type (adb shell su) in cmd, it gets locked. :S
WILMANS2M said:
For ex, for the folder "AccuweatherPhone2015" we have inside "AccuweatherPhone2015.apk"
I just wonder if we can just put "AccuweatherPhone2015.apk" inside "app" folder without the folder "AccuweatherPhone2015"
Click to expand...
Click to collapse
No since apps requires lib folders and stuff in arm/lib
Dennziil said:
Feel like a noob now, but when i type (adb shell su) in cmd, it gets locked. :S
Click to expand...
Click to collapse
Where do you type it? While phone is on?
Anyway I'll upload a stock recovery and modified as Odin tar file
Modified recovery flash able trough Odin comes soon
Sent from my SM-G903F using Tapatalk
LastStandingDroid said:
No since apps requires lib folders and stuff in arm/lib
Where do you type it? While phone is on?
Anyway I'll upload a stock recovery and modified as Odin tar file
Modified recovery flash able trough Odin comes soon
Sent from my SM-G903F using Tapatalk
Click to expand...
Click to collapse
I hope! because I'm a little bit lost :crying::crying:
noob I am, noob I stay
LastStandingDroid said:
Anyway I'll upload a stock recovery and modified as Odin tar file
Modified recovery flash able trough Odin comes soon
Sent from my SM-G903F using Tapatalk
Click to expand...
Click to collapse
Great, then i'll just waint for the tar file insted Great work btw :good:
mmh i will try to delete all apk folder which does not have other file/folder inside than the apk one. In fact, only some folder have lib...folder inside. Most have only apk.
Will try.
As i said, will make a few test
androidissime said:
I hope! because I'm a little bit lost :crying::crying:
noob I am, noob I stay
Click to expand...
Click to collapse
Don't worry it comes in some minutes
Dennziil said:
Great, then i'll just waint for the tar file insted Great work btw :good:
Click to expand...
Click to collapse
Yeah I forgot about that
WILMANS2M said:
mmh i will try to delete all apk folder which does not have other file/folder inside than the apk one. In fact, only some folder have lib...folder inside. Most have only apk.
Will try.
As i said, will make a few test
Click to expand...
Click to collapse
Sure I don't recommend it since I see no reason to use it that way [emoji14]
Hopefully sooner or later I'll get a modified system.Img working there's no eta for that though. Since it yet doesn't flash in Odin.
Sent from my SM-G903F using Tapatalk

[Guide][SC8830/SC7731/SC9830]Custom ROMs Porting Guide for Spreadtrum phones.

Thread will be best viewed in website
Code:
[CENTER][COLOR="red"]Your warranty is now void.[/COLOR]
I am not responsible for bricked devices, dead SD cards,
thermonuclear war, or you getting fired because the alarm app failed. Please
do some research before asking help and reporting bugs.
Please read the entire OP instructions and FAQ,if any.
You are choosing to make these modifications, and if
you point the finger at me for messing up your device, I will laugh at you.
A lot.[/CENTER]
This thread is for spreadtrum Marshmallow, lollipop and KitKat phones. I made this guide for porting especially CM/CM based ROMs. This thread is in under progress, I'll be keep adding and changing things. These lines will be removed when I think I'm done.
Requirements
A PC /Laptop /Even your android phone is enough for porting, since your not building ROM, provided that you know how to get things done
Android Image Kitchen
A ZIP archiver(winzip,7z,etc)
Notepad++/your favorite one
HEX Editor (for Android available on play store)
A working brain with basic understanding skills properly installed
An Android device with the chipset as per the title (of cource this will work on iPhone and Windows phones but sadly my kitten eaten flashing instructions , so blame my kitty:silly
A working custom recovery (if you don't have one, this thread might help you)
Aroma File Manager (this is used to skip the process of extracting system files from system.ext.win and system.new.dat and compressing it back)
Stock ROM (extracted to easily accessable folder, since we are going to port the ROM not using normal File Manager but a recovery based file manager
Custom ROM(S) (download links are in the 2nd post)
I'll suggest you to concentrate on booting the ROM rather fixing bugs at first shot, because if we are sure that the ROM boots we can go further, otherwise it's waste of time.
{
"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"
}
Marshmallow ROM porting guide
=> Download and Extract the ROM. Since ROM(S) is zipped out of custom recovery backup you'll see system.ext4.win (which is a compressed system folder) boot.emmc.win (boot.img) and some, maybe, compressed using system.new.dat.
Porting boot.img
=> Copy stock boot.img to working directory of AIK
=> Unpack boot.img and rename ramdisk to ramdisk.s and split_img to spli_img.s
=> Copy boot.emmc.win to working directory of AIK and rename it to boot.img
=> Unpack boot.img
=> Replace the following
/ramdisk/lib/modules with /ramdisk.s/lib/modules
/ramdisk/lib/modules/mali.ko with /system/lib/modules/mali.ko from stockrom
=> delete split_img and rename split_img.s to split_img
repack it and rename image-new.img to boot.emmc.win and replace Custom ROM boot.emmc.win with ported boot.emmc.win.
Porting System
=> Boot to recovery and wipe system, data, cache and dalvik-cache and flash the CM13/Marshmallow ROM
=> Go back to tab menu of TWRP tap on 'Mount tab' Mount system and go back to flash tab and flash aroma file manager zip
=> Now you are on Aroma FM. Copy and replace the following files with stock ROM files:
/system/lib/hw/<all files> except files audio.primary.sc8830.so & bluetooth.default.so
/system/etc/ all audio related files except audio_effect.conf
/system/etc/codec_pga.xml
/system/etc/ media related files
/system/etc/tiny_hw.xml
/system/lib/egl/libGLES_mali.so
/system/lib/libEGL.so
/system/lib/libGLES_trace.so
/system/lib/libGLESv1_CM.so
/system/lib/libGLESv2.so
/system/lib/libMali.ko,if any
=> After replacing files exit Aroma FM and reboot the system. Booting will take a while (~10m) so please be patient.
Bug Fixing Guide
Camera Fix
Open lib files one by one on stock rom lollipop & search for "_ZN7android5Fence4waitEj"(without quotes) with notepad++ (mainly look into the files related to camera.sc8830.so, to know open it with HeX editor and see what are the necessary lib***.so files)
In my case "_ZN7android5Fence4waitEj" are available on stock libui.so where that file needed by camera.sc8830.so
SO open camera.sc8830.so with HexEditor and search for libui.so
Then rename libui.so of stock rom file to libcm.so and save it
Copy and paste modified file to the exact directory and wipe data, cache, dalvik-cache (data is nedded because if the camera HAL fails to load at first time CM ROMs won't show camera app in that case it is must to wipe data)
Then reboot & make sure camera.sc8830.so loaded correctly with logcat
Fix for possible bootloops when porting Marshmallow ROM using lollipop kernel
Soon.....
Note:-I'm sure the marshmallow ROM(s) will boot on lollipop device also (because I personally tested with my phone but I need confirmation that this works on marshmallow devices also.
Lollipop ROM porting guide
Porting boot.img
=> Copy stock boot.img to working directory of AIK
=> Unpack boot.img and rename ramdisk to ramdisk.s and split_img to spli_img.s
=> Copy custom ROM boot.img to working directory of AIK
=> Unpack boot.img
=> Replace the following:
/ramdisk/lib/modules with /ramdisk.s/lib/modules
/ramdisk/lib/modules/mali.ko with /system/lib/modules/mali.ko from stockrom
delete split_img and rename split_img.s to split_img
repack it and rename image-new.img to boot.img and replace Custom ROM boot.img with ported boot.img.
Porting system
=> Boot to recovery and wipe system, data, cache and dalvik-cache and flash the CM12/lollipop ROM
=> Go back to tab menu of TWRP tap on 'Mount tab' Mount system and go back to flash tab and flash aroma file manager zip
=> Now you are on AromaFM. Copy and replace the following files with stock ROM files:
/system/lib/egl/libGLES_mali.so
/system/lib/hw/<all files> except files audio.primary.sc8830.so & bluetooth.default.so
/system/lib/modules<all files>
/system/vendor/lib/libbt-vendor.so with stockrom /system/lib/libbt-vendor.so.
=> After replacing files exit Aroma FM and reboot the system. Booting will take a while (~10m) so please be patient.
Typing Bug Fixing Guide
KitKat ROM porting guide
Porting boot.img
=> Copy stock boot.img to working directory of AIK
=> Unpack boot.img and rename ramdisk to ramdisk.s and split_img to spli_img.s
=> Copy custom ROM boot.img to working directory of AIK
=> Unpack boot.img
=> Replace the following
/ramdisk/sbin files with /ramdisk.s/sbin files
/ramdisk/init.sc8830.usb.rc with /ramdisk.s/init.sc8830.usb.rc
/ramdisk/init.usb.rc with /ramdisk.s/init.usb.rc
=> Delete split_img and rename split_img.s to split_img
repack it and rename image-new.img to boot.img and replace Custom ROM boot.img with ported boot.img.
Porting system
=>Replace the following:
/system/lib/egl/<all files>
/system/lib/hw (following files) :
camera.sc8830.so
camera2.sc8830.so
gralloc.default.so
gralloc.sc8830.so
hwcomposer.sc8830.so
keystore.default.so
lights.sc8830.so
local_time.default.so
power.default.so
sensors.sc8830.so
sprd_gsp.sc8830.so
/system/lib/modules<all files>
/system/vendor/lib/libbt-vendor.so with stock ROM /system/lib/libbt-vendor.so
Booting will take a while (~10m) so please be patient)
NOTE: If you stuck at Splash Logo (Manufacturer's logo) then delete CM11/system/lib/egl/libGLES_mali.so from recovery and then wipe data, cache, dalvik-cache and reboot.
Bug Fixing Guide
Camera Fix
Copy files camera.sc8830.so, camera2.sc8830.so & libandroidfw.so from stock ROM
Rename libandroidfw.so to libandroidcm.so
=> Download and install Hex Editor (Users who are using Android for porting can use Hex editor from playstore)
Open camera.sc8830.so with Hex Editor and search for libandroidfw.so & rename it to libandroidcm.so
Save camera.sc8830.so file, copy and paste it to CM/CM based ROM
Do the same for camera2.sc8830.so
This will fix the error "Cannot load Camera HAL" which is caused by camera.sc8830.so mising start_SprdPrefTracking & stop_SprdPrefTracking argument which is available only on original libandroidfw.so on your stockrom.
Reboot your device
If you haven't seen camera app then you may need to wipe the data and dalvik-cache but there is an alternative for this. The alternative is using third party camera app from play store if the camera works then you are good to go
but to have CM stock camera you must need to wipe data
WiFi/Hotspot fix
Part - I
Make sure your stock ROM WiFi (WLAN) driver name is sprdwl.ko on /system/lib/modules
Copy the following folder(s) from stok rom & paste to cm-11.0 rom
--/system/etc/wifi/<all files>
/system/etc/dhcpcd/<all files>
--/system/etc/connectivity_calibration.ini (related to WiFi connectivity)
--/system/etc/connectivity_configure.ini (related to Bluetooth connectivity)
I suggest you to replace files from Aroma FM (since we don't need to set permissions, etc which will automatically done by Aroma FM)
If you are replacing files from root explorer you need to properly set the permissions and Ownership/Group of particular for otherwise there will be no point in replacing the files and this will result in either unfixed bug or bootloop for this properly note down the permissions and Ownership/Group of individual files
for ex: /system/etc/dhcpcd/dhcpcd-run-hooks has permissions "-r-xr-x--- or 0550" and Owner is "dhcp" and Group is "shell"
Part - II
Unpack cm-11.0/based ported boot.img and replace "init.wifi.rc" file with this init.wifi.rc
Flash the modified boot.img using Flashify/ from recovery using flash image option (recommended)
To test whether the WiFi driver properly loaded or not
use terminal emulator type
Code:
su
<enter>
cat /proc/modules
<enter>
see whether the sprdwl.ko present on loaded modules list.
Try to use WiFi and immediately see the logs (use logcat Extreme app from play store) set if there are any errors
Do the same with Hotspot
as a result you may need to replace some files under --/system/bin/
ex:
--/system/bin/dhcpcd
--/system/bin/hostopad
--/system/bin/wcnd
--/system/bin/wpa_cli
--/system/bin/wpa_supplicant
etc
To root flash Magisk (systemless-root only for lollipop and above) or SuperSU
Credits: Hadi Khoirudin, Advan S4p [Official] fb group, @@ki,
@Jitheshwar (it's me :silly: )​
Created 2/10/2017
Last Updated 3/10/2017
Downloads:-
Marshmallow
CyanogenMd 13.1
Bug fix Update (extract zip and replace files and port boot.img and then zip it, boot to recovery wipe cache and dalvik-cache flash the zip and reboot)
=====================
Resurrection Remix 5.7.4
Offline Charging fix
PAC-MAN ROM
Lollipop ROMs
CyanogenMod 12.1
=====================
Resurrection Remix
WiFi-Hotspot-fix-for-CM/based-lollipop-ROMs
KitKat ROMs
PAC-MAN ROM
=====================
MIUI7-7.4.26
Video codec fix
WiFi-Hotspot-fix-for-CM/based-KitKat-ROMs
More links have been adding​
Reserved
You could have given me the credits.......well nice thread.....just a updated version of my thread
@ki said:
You could have given me the credits.......well nice thread.....just a updated version of my thread
Click to expand...
Click to collapse
But I took nothing from your work. I made this thread keeping CM ROMs in mind. But I have given credits to you in recovery porting thread since I used some of your work. Anyway you have given me Idea. PM me with more suggestions.
Edit: credits updated.
Jitheshwar said:
But I took nothing from your work. I made this thread keeping CM ROMs in mind. But I have given credits to you in recovery porting thread since I used some of your work. Anyway you have given me Idea. PM me with more suggestions.
Edit: credits updated.
Click to expand...
Click to collapse
Sorry for being so rude.......well i will try to suggest if anything good comes to my mind
Will the camera fix work with evercrossmod rom
[email protected] said:
Will the camera fix work with evercrossmod rom
Click to expand...
Click to collapse
No. That fix is for CM/CM based roms only. For stock based ROMs you just need replace camera libs.
Jitheshwar said:
No. That fix is for CM/CM based roms only. For stock based ROMs you just need replace camera libs.
Click to expand...
Click to collapse
This did not worked...the camera icon is showing but it says app not installed.I replaced the previous hw files (camera.sc8830.so and the camera2.sc8830.so). Now the app is opening but can't connect to camera.
[email protected] said:
This did not worked...the camera icon is showing but it says app not installed.I replaced the previous hw files (camera.sc8830.so and the camera2.sc8830.so). Now the app is opening but can't connect to camera.
Click to expand...
Click to collapse
You have to replace files having name "libcamera****.so" too.
How to unpack and repack system.ext4.win ?
[email protected] said:
How to unpack and repack system.ext4.win ?
Click to expand...
Click to collapse
just rename the file to system.ext4.win.tar.gz
and open it like a norma zip file
[email protected] said:
How to unpack and repack system.ext4.win ?
Click to expand...
Click to collapse
rename extension with .tar and extract it as usual but while repacking make sure you're using .tar compression type only. But I recommend using Aroma FM since extracting and compressing system.ext4.win may result in incorrect file permissions, as it is compressed by recovery.
@ki said:
just rename the file to system.ext4.win.tar.gz
and open it like a norma zip file
Click to expand...
Click to collapse
no need of .tar.gz, .tar is sufficient. As it is backuped in recovery by disabling "Enable Compression option" means we'll see the system files after extracting the system.ext4.win and not the system.ext4.win (compressed system image).
Jitheshwar said:
no need of .tar.gz, .tar is sufficient. As it is backuped in recovery by disabling "Enable Compression option" means we'll see the system files after extracting the system.ext4.win and not the system.ext4.win (compressed system image).
Click to expand...
Click to collapse
Now which software extracts .tar file. Plz tell me a software for windows
Jitheshwar said:
no need of .tar.gz, .tar is sufficient. As it is backuped in recovery by disabling "Enable Compression option" means we'll see the system files after extracting the system.ext4.win and not the system.ext4.win (compressed system image).
Click to expand...
Click to collapse
Yup....i forgot to mention that......just thought why anyone wants to backup without compression......
[email protected] said:
Now which software extracts .tar file. Plz tell me a software for windows
Click to expand...
Click to collapse
A zip archiver like 7zip, Winzip, etc. Mist if these software will be available for free. If you are using mobile to port I recommend ZArchiver.
After i'm port cm12 rom to sc7731 my device, is say Android is starting.... After that is restart and do that again, what i'm do wrong?
RustyDiamond said:
After i'm port cm12 rom to sc7731 my device, is say Android is starting.... After that is restart and do that again, what i'm do wrong?
Click to expand...
Click to collapse
your kernel....
RustyDiamond said:
After i'm port cm12 rom to sc7731 my device, is say Android is starting.... After that is restart and do that again, what i'm do wrong?
Click to expand...
Click to collapse
You may not replaced necessary lib(s).
Wipe everything before flashing the ROM (it is suggested to wipe internal storage also).
Don't replace everything (like camera libs) because they might give issues that you are facing, first key the device boot then fix bugs. If possible take logs using adb.

Categories

Resources