[KERNEL/TUTORIAL] UPDATE 31/07 Howto mod the stock XXJVR/S/T kernel SU/Init.d Support - Galaxy S I9000 Android Development

Well what do you do when you're bored and need some distraction .....Modify the stock kernel and include SU!
If you just search on the internet and especially on XDA than you find out that this is not so difficult.
The only purpose of this modified kernel is install SU and thus get ROOT
Why superuser and busybox are not installed by default is simple: it takes only 1 minute to download it from the market...
So here I give you the stock kernel + su/Root for XXJVQ/ XXJVR
installation:
1. Flash the tar file with Odin
2. Download superuser from the market and install it
3. Download Busybox installer from the market and install it
Credits to Supercurio, Hardcore, Liliniser for the tools and sources
Tutorial is Linux based!!!
So if i can do it than you can do it also!! All you have to do is read and follow post 2
Update 01/08/11 Added XXJVT
Update 01/08/11 Added Working XXJVR
Update 06/07/11 Howto add init.d support to the kernel (post 3)

Tutorial
1. Download and install the needed tools
2. extract de stock kernel to a temporary directory
3. modify the init.rc script to include your su install script.
4. add in the tmp folder busybox and su
5. add in the sbin directory your install script.
6. Recompile the kernel
7. Tar de kernel
8. Flash the kernel with heimdall or Odin
1. Download and install the needed tools
* Cross compiler: http://www.codesourcery.com/sgpp/li...eabi/arm-2009q3-67-arm-none-linux-gnueabi.bin and install it to /opt/toolchains/arm-2009q3/
* Kernel repacker made by Liliniser / dkcldark : Download from supercurio's github. with (if installed) git clone git://github.com/project-voodoo/kernel_repack_utils or goto the website https://github.com/project-voodoo/kernel_repack_utils and click on download.
* Download busybox,su and the install script from this post, and extract the files.
2. extract de stock kernel to a temporary directory
Copy the original zImage to de directory where you extracted the kernel repacker
Rename it to zImage.org
create a temp directory in the kernel repacker directory
Open a linux shell and go to kernel repacker directory
./extracter.sh -s zImage.org -d temp (hit enter)
3. modify the init.rc script to include your su install script.
Go to the temp directory and edit init.rc with your favourite editor and put this on a new line at the end off the file.
service install_su /sbin/install_su.sh
user root
oneshot
Save the file and exit
4. add in the tmp folder busybox and su
copy busybox and su to the tmp folder in your extracted kernel folder
make sure they are markt als executable.
5. add in the sbin directory your install script.
copy install_su.sh to the sbin folder in your extracted kernel folder
6. Recompile the kernel
Open a linux shell and go to kernel repacker directory
./repacker.sh -s zImage.org -d zImage -r temp -c gzip
congratulations you must cooked your first modified kernel
7. Tar de kernel
tar -H ustar -c zImage >code.tar
8. Flash the kernel with heimdall or Odin

Howto add init.d support to the stock kernel
Whell this is easy to implement
1. Open a linux shell and goto to the extracted kernel directory. (read post 2 howto do that)
add the following lines to the init.rc file
Code:
service initd_support /sbin/initd_support.sh
user root
oneshot
Save the file and exit
2. Create a new file in the sbin directory called initd_support.sh and add the following code
Code:
#!/tmp/busybox sh
if cd /system/etc/init.d >/dev/null 2>&1 ; then
for file in S* ; do
if ! ls "$file" >/dev/null 2>&1 ; then continue ; fi
/system/bin/sh "$file"
done
fi
Save the file and make it executable
3. repack the kernel (see post 2 for the howto)
4. on your device mount system Read/Writable and create the directory /system/etc/init.d
5. Copy your init scripts to /system/etc/init.d/
Make sure the name starts with a S, and set the permissions to 777
Example step 5/6
Code:
adb push Stweakscript /sdcard/
adb shell
su
/tmp/busybox mount -o remount,rw /system
/tmp/busybox mkdir /system/etc/init.d
/tmp/busybox cp /sdcard/Stweakscript /system/etc/init.d/Stweakscript
/tmp/busybox/chmod 777 /system/etc/init.d/Stweakscripts
7. flash the kernel

I'm sorry in advance.
But WTF?

vladoots said:
I'm sorry in advance.
But WTF?
Click to expand...
Click to collapse
If you only want to root your rom don't wait for devs to do it but do it your self

lownoise said:
If you only want to root your rom don't wait for devs to do it but do it your self
Click to expand...
Click to collapse
Yes, and for learning purposes. Thanks for the tips, I was sitting down to do this on another phone the other day actually... it's good to see your ideas, I was getting pretty frustrated with the limited Android init environment (the toolbox commands are so limited!).

Thanks for this nice tutorial.Worked great!

Great! Now we have good rooting kernel.
If I want root - I want root, not tweaks and other "shiny" things.
Cfroot breaks BT in some cases, Fuguroot breaks Kies connection.
Kernel which don't add Superuser.apk as a system application is the best choice - we don't have to delete other system files and there are updates of this app, so why should we have older version on /system and new on /data as an update?

Can I do "adb root" on this kernel ?

Sure Just install superuser and busybox from the market

Wooow! These are the sort of tutorials I miss here sooo much. It's a developer forum, but what we are getting here mainly are ready-products (roms, modded kernels). And why not to do it yourself. But sometimes googling for the information is not so easy, because applies to different conditions(devices, phone models, soft versions). There are many people who would spend their time learning how to compile a kernel or edit framework files. But there are so few tuts on this here... I miss tuts that tell how to do things step-by-step, without any specific linux/java knowledge.

sebarkh said:
Wooow! These are the sort of tutorials I miss here sooo much. It's a developer forum, but what we are getting here mainly are ready-products (roms, modded kernels). And why not to do it yourself. But sometimes googling for the information is not so easy, because applies to different conditions(devices, phone models, soft versions). There are many people who would spend their time learning how to compile a kernel or edit framework files. But there are so few tuts on this here... I miss tuts that tell how to do things step-by-step, without any specific linux/java knowledge.
Click to expand...
Click to collapse
And therefore I did it. Share the knowlegde and safe this forum

Why doesn't XDA have more stuff like this?
Thanks OP!

Yes, I must thank you too.
Now I understand... Sorry for my initial confusion!

I've problem:
after applying script:
line 47: ./out/project/original.cpio -> no such files or directory
Any idea ?
Where is original.cpio files ?
Screen of error:
{
"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"
}

tq man...!!

man this is amazing, I was looking for something simple like this for months. It's right, should be more posts like these in xda

+1
Thank you very much for this, lownoise
We need more topics like that, since I am interested to learn myself...
Members posting tutorials like that are always appreciated, I cannot thank you enough.
Do you know how to replace the recovery 3e with 2e additionally?
It would be great to know since I want to have it CWM compatible (flash unsigned update.zip)
AFAIK recovery is a part of the kernel....
It would be great if you could point me to the right direction.
Others probably would like to know that as well.
Thanks again.

dago said:
I've problem:
after applying script:
line 47: ./out/project/original.cpio -> no such files or directory
Any idea ?
Where is original.cpio files ?
Screen of error:
Click to expand...
Click to collapse
Which kernel did you try to modify

lownoise said:
2. extract de stock kernel to a temporary directory
Copy the original zImage to de directory where you extracted the kernel repacker
Rename it to zImage.org
create a temp directory in the kernel repacker directory
Open a linux shell and go to kernel repacker directory
./extracter.sh -s zImage.org -d temp (hit enter)
Click to expand...
Click to collapse
Two noob questions:
1. from where to copy zImage file? Where can I find zImage file?
2. How to open linux shell? Should I install linux shell application on my PC and run it or?
Sorry for such questions but I want to try.
Thanks.

Related

[HOW TO][Windows]Extract Deodex Sign and Zipalign an official ROM

Hi,
Just want to share tools I found in order to :
- Extract SGS2 stock firmwares :
* Use sgs2toext4.jar Application from drphrozen to convert .img files to ext4.img
* Then MOUNT ans EXTRACT ext4.img with Diskinternals Linux Reader : Here
- Deodex, sign and zippalign :
with this deodex kit : _Kit_Deodexage.zip
- Create your CWM customROM (wype script)
using a Skeleton ROM : Custom_ROM GS2 by SicOpaT.zip
Click to expand...
Click to collapse
Nothing from me, just reporting for you
Links at the end of post (or in changeLog)
EDIT 16/08 :
1/ update of Kit_deodexage with last versions of smali/baksmali v1.2.7 to avoid LAG bug of browser
2/ add of Custom_ROM GS2 by SicOpaT_v2.zip with a new CWM script NON WIPE
To customise the CWM script, go to Custom_ROM GS2 by SicOpaT.zip\META-INF\com\google\android and edit updater-script with notepad ++
Step by step guide ​:
Preparation :
1/ Extract Custom_ROM GS2 by SicOpaT.zip in order to have a folder with the same name (your future customROM)
2/ Extract sgs2toext4.zip to sgs2toext4.jar and put it in C:\
3/ Extract _Kit_Deodexage.zip to a folder of the same name
4/ install Diskinternals Linux Reader : Here
5/ Install Java SE Development Kit (JDK) if not already installed : Here
Click to expand...
Click to collapse
Extracting the stock ROM :
1/ open your stock__firmware.tar with 7-zip or winRAR
2/ extract in C:\ :
factoryfs.img,
cache.img (if you have 3 tar files in your firmware, extract cache.img from CSC.tar)
modem.bin
zImage : your kernel
Click to expand...
Click to collapse
* Extracting KERNEL and PHONE part :
3/ put zImage and modem.bin in the root folder of : Custom_ROM GS2 by SicOpaT (next to META_INF)
Click to expand...
Click to collapse
* Extracting Factoryfs.img :
4/ Double click sgs2toext4.jar, a windows is opening :
{
"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/ drag factoryfs.img in the sgs2converter.jar windows
factoryfs.ext4.img is created
6/ Open Diskinternals Linux Reader
Code:
> Drives > Mount Image > browse to your factoryfs.ext4.img > Mount
Then a new drive appears in the Diskinternals window, called Linux native Volume > double click on it
7/ Select all and press Save > Next > Browse to Custom_ROM GS2 by SicOpaT/System/ check for Save directory structure and then press Next > Next > Finish
8/ In Diskinternals click Back and then right click to your Linux volume and select unmount
Click to expand...
Click to collapse
* Extracting cache.img :
9/ Double click sgs2toext4.jar
10/ drag cache.img in the sgs2converter.jar windows
cache.ext4.img is created
11/ Mount cache.ext4.img in diskinternals
12/ In your linux drive goto \recovery and save sec_csc.zip
Don't save it in your Custom_ROM GS2 by SicOpaT folder
13/ Extract sec_csc.zip (same structure as an update.zip)
14/ Copy everything in /system exept /app to Custom_ROM GS2 by SicOpaT/system
like here :
Now you can unmount and close diskinternal, we have done with extracting the ROM
Click to expand...
Click to collapse
Now time to Deodex, sign and zipalign : with the _Kit_Deodexage script
1/ in Custom_ROM GS2 by SicOpaT/system/ MOVE everything in the app folder to _Kit_Deodexage/app
3/ in Custom_ROM GS2 by SicOpaT/system/ MOVE everything in the framework folder to _Kit_Deodexage/framework
4/ Press : Deodex_Gingerbread.cmd and it will
- deodex
- sign
- zipalign
4 bis/ edit after beginning of deodexing process the NePasSigner.txt and add samsung apps
5/ 2 folders are created : Deodex_framework and Deodex_app
6/ verify that the /app and /framework folders are empty
6/ Move everything from /Deodex_framework exept java.awt.jar to Custom_ROM GS2 by SicOpaT/system/framework
7/ Move everything from Deodex_app to Custom_ROM GS2 by SicOpaT/system/app
Click to expand...
Click to collapse
Buid your CWM update.zip :
With WinRAR : CTRL A in your custonROM root folder and Right Click > Add to Archive > ZIP and None or Normal compression
Click to expand...
Click to collapse
That's all ! You have a stock customROM fully deodexed, signed and zipaligned
PS : You should change the Kernel for the CF-Root Kernel (CWM Manager ...) changing the zImage with the zImage from ChainFire CF-Root
PS 2 : You can add some apps (like Titanium backup) in the /data/app folder of your customROM
EDIT 1 : The deodexed browser.apk obtained will be bugy : Lag scrolling
Since pulser_g2 found the FIX, DEVs used an old deodexed browser.apk (from KE2 ROM for example).
So pulser_g2 foung the FIX, in order to avoid this Lag trouble using the last deodexed browser.apk (KF2 for example). You can see the How To FIX yourself the laggy browser.apk following advices from pulser_g2 in the changeLog of 07/03/2011.
EDIT 2 : just added a zip of an META_INF folder witch can be used for update over a previous deodexed customROM with same signature (a previous ROM built with the same script).
With this META_INF, you will not loose any data/cache
Credits :
Thanks to drphrozen for sgs2toext4.jar and sgs2converter.jar tools
Thanks to xeudoxus for his custom java.awt.jar (deodexing some apks without errors)
Thanks to Okarin for his Deodex script
Thanks to Pulser-g2 for the laggy Browser Fix
Thanks to omrij for showing us an alternative to _Kit_Deodexage : AutoDeoTool (see below)
Click to expand...
Click to collapse
ChangeLog of the HOW TO :
07/04/2011 :
* Switch bugy sgs2converter.jar to new sgs2toext4.jar from drphrozen
* Re-Add the Convert_sgs2img.exe tool to extract .img to .ext4.img (end of post)
CMD command :
Code:
Convert_sgs2img.exe factoryfs.img factoryfs_ext4.img
07/02/2011 :
Modification of _Kit_deodexage.zip in order to add the custom java.awt.jar from xeudoxus
07/01/2011 :
Add the new version of drphrozen sgs2converter.jar, available HERE
Now you just need to double click on the sgs2converter.jar, without opening any CMD promt command.
You drag and drop your stock .img file and the tool will convert it in <inputname>.ext4.img in the same folder
06/30/2011 :
How to manually deodex Email.apk and MobilePrint.apk : (working for others APKs)
Code:
[QUOTE][B]1/[/B] In the same folder, you put :
[QUOTE]*Email.apk
*Email.odex
*MobilePrint.apk
*Mobileprint.odex
AND
all the content of the initial ODEXED framework folder (with all JAR files)
PLUS custom [B]java.awt.jar[/B]
AND
*smali.jar ---> found in _Kit_Deodexage/_binaires/
*baksmali.jar ---> found in _Kit_Deodexage/_binaires/[/QUOTE]
[B]2/[/B] Then open a [B]CMD promt[/B] in the target folder
[B]3/[/B] Then type :
[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 Email.odex
You have a new OUT folder created
4/ Then type :
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
A classes.dex file is created
5/ Open (without extracting) Email.apk with 7-zip
Push classes.dex in Email.apk with 7-zip
6/ Put the new deodexed Email.apk in app folder, in _Kit_Deodexage
Press Deodex_Gingerbread.cmd
You now have a fully deodexed signed zipalligned Email.apk
Now Mobileprint.apk :
7/ DELETE classes.dex ans Out folder created before
8/ Same procedure, in CMD pompt, type :
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 MobilePrint.odex
You have a new OUT folder created
9/ Then type :
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
A classes.dex file is created
10/ Open (without extracting) MobilePrint.apk with 7-zip
Push classes.dex in MobilePrint.apk with 7-zip
11/ Put the new deodexed MobilePrint.apk in app folder, in _Kit_Deodexage
Press Deodex_Gingerbread.cmd
You now have a fully deodexed signed zipalligned MobilePrint.apk[/CODE]
Important !! You should NOT have error while deodexing
Click to expand...
Click to collapse
06/27/11 :
added : old version of sgs2converter.jar from drphrozen get it HERE
How To :
Extract sgs2converter.zip to sgs2converter.jar
Put in the same folder : Stock .IMG file, sgs2converter.jar
Open CMD Promt in the folder
run command :
Code:
java -jar sgs2converter.jar factoryfs.img factoryfs.ext4.img
factoryfs.ext4.img is created in same folder. You can pen it with Diskinternals Linux Reader
*AutoDeoTool an alternative to the "kit_deodexage" from HERE thanks to omrij
[/QUOTE]
BONUS :
To personalise your customROM, you can change the name of the ROM shown in Parameters > Version number :
with Notepad++, open the file "\Custom_ROM GS2 by sicOpaT\system\build.prop" and look for the line beginning with : "ro.build.display.id=" (often the 4th). Example : ro.build.display.id=GINGERBREAD.XXKF2
Replace everything after the "=" with what you want. Example : ro.build.display.id=SicOpaT's ROM KF2
Then save the file
Thanks for the infor .. but what does the " - CWM GS2 Skeleton ROM (wype script) : Custom_ROM GS2 by SicOpaT.zip" do ??
anyway of getting a step by step guide.
Thanks
I've used Ubuntu until now... Testing this one
xinfinityoO said:
Thanks for the infor .. but what does the " - CWM GS2 Skeleton ROM (wype script) : Custom_ROM GS2 by SicOpaT.zip" do ??
anyway of getting a step by step guide.
Thanks
Click to expand...
Click to collapse
This is the begining oh a CWM update.zip with the structure folders and I just added : busybox, superuser an su.
I am going to add a step by step guide
nice thanks
Email.apk and MobilePrint.apk are leftover. Trying to do them manually but can't find superclass Ljava/awt/componet;
Mackzen said:
nice thanks
Email.apk and MobilePrint.apk are leftover. Trying to do them manually but can't find superclass Ljava/awt/componet;
Click to expand...
Click to collapse
got the same problem, i took deodexed ones from other deodexedROM
Couldn't flash using cwm (maybe battery low, don't know)
better luck tomorrow I guess
How does the script take care of the Linux file permissions in Windows?
Thanks for the info.
That was some info which i was looking for the last few weeks, but mostly ended in apps that didn't work for everything.
Gonna give it a shot tomorrow.
Thnx for the info.
very well defined and this will sure help some newcomers to build thier own custom roms. you deserve a star from me !!
Thanks for this Guide!
1.) The last step would be to put the new CustomRom Folder to a Zip and flash via CWM?
...or is it a problem with signing then?
EDIT: you have to put the files back into the original ZIP!
2.) why do we have to put cache.img and modem.bin to the customrom root folder?
Thanks
Flashed via cwm 4.0.2 -> Bootloop :/
No modifications done at the moment
walda said:
Thanks for this Guide!
1.) The last step would be to put the new CustomRom Folder to a Zip and flash via CWM?
...or is it a problem with signing then?
EDIT: you have to put the files back into the original ZIP!
Click to expand...
Click to collapse
Yes you have to create an update.zip archive with all in your CustomROM root folder
walda said:
2.) why do we have to put cache.img and modem.bin to the customrom root folder?
Thanks
Click to expand...
Click to collapse
No you have to put :
- zImage (your kernel)
- modem.bin (phone part in ODIN)
Mackzen said:
Couldn't flash using cwm (maybe battery low, don't know)
better luck tomorrow I guess
Click to expand...
Click to collapse
walda said:
Flashed via cwm 4.0.2 -> Bootloop :/
No modifications done at the moment
Click to expand...
Click to collapse
I have forgotten wype.sh in the /system folder of the skeleton customROM.
The wype.sh will wype everything in the /data folder in order to prevent bootloops
I reuploaded the CustomROM GS2 with the wipe.sh
Thanks! Works now
walda said:
Thanks! Works now
Click to expand...
Click to collapse
You're welkome
Sorry for the forgotten wype.sh
thanks for this!
i am running per instructions, trying to deodex KF2 rom. but i face problem at the deodex/sign/zipalign. after running the script file, there are still a lot of files in the "app" and "frameworks" directory. what am i doing wrong?
edit: 2nd round works, no idea why?? but left email and mobileprint, and as per you suggestion get it from another deodex rom.
This is EXACTLY the thing i was looking for since getting my SGS2 this week.
Wanted this since the Hebrew/RTL routine fixing i did on other devices needed deodexed ROMs to work (modifies framework.jar/libwebcore.so).
I'll give it a shot today or tomorrow and report back.
Either way, THANK YOU very much for the effort!
I know this is a stupid question, but where can i find my factoryfs_out.img iv done the cmd bit but cannot find the factoryfs_out.img to mount??

[ADDON][Xperia S] Generic startup/init.d scripts support for Stock ROM/Kernel

[ info ]
i am attaching a easy to run package which contains the files required for full functionality of executing startup scripts (init.d scripts)...
basically this will allow the user to execute custom shell scripts, placed in /system/etc/init.d/ folder and they will be executed on each boot!
i dont have this device yet!!
thanks to Jozinek for testing this on his phone!
[ requirements ]
stock rooted ROM
windows PC with adb drivers installed
[ how to install ]
download the provided zip package
save it on c:\
extract the contents of the package
connect phone with usb debugging active to PC via ADB
execute "runme.bat"
follow onscreen instructions & enjoy!
incase some issue is there post the output/log of script
[ additional info ]
i have added the following things in the package:
corrected /system/bin/sysint file
run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
correct /system/etc/install-recovery.sh file (this file gets executed by default on stock kernel too!)
test/example script /system/etc/init.d/99test
to check if this is working the test script (99test) will create a temporary file /data/local/tmp/init.d_log_test.txt on each boot
[ donations/device fund ]
i dont yet have this device but i plan to buy it.... if u guys want to donate to me to get this device OR if u feel that this work has helped u OR u think that the work i put into making this is worthy of donations, then click on the following link for buying me some coffee/beer/etc
i am currently channeling all my donations to get this phone asap and to avoid selling my ARC!!!
PAYPAL DONATION LINK
[ download link ]
generic-init.d-support-v01.zip
MD5HASH: 2eda273af4b91c34f868807820cceaee
let me know how it goes!
{
"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"
}
ENJOY!
Nice work, this will enable the Speedy v7 int.d hacks, can you incorporate this in the above? As an addon perhaps.
Done, $50 "AU" dollars coming your way mate.
-smc
somemadcaaant said:
Nice work, this will enable the Speedy v7 int.d hacks, can you incorporate this in the above? As an addon perhaps.
Done, $50 "AU" dollars coming your way mate.
-smc
Click to expand...
Click to collapse
this init.d support can be used to execute ANY shell script/program at startup... u are free to choose the ones u want...
if anyone needs help on how to push the scripts onto device let me know... but script specific info i dont have, u will need to ask the developer of those scripts..
I used this script to move dalvik cache to /cache folder:
Code:
#!/system/bin/sh
#
# relocate dalvik-cache to /cache/dalvik-cache
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# create symlink
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
After reboot i saw folder /cache-dalvid in both folders /data and /cache, is it normal?
Thank!
I found that for devices rooted with locked bootloader
Line 21 of runme.bat need to change from
HTML:
@files\adb shell "su -c 'busybox mount -t ext4 -o rw,remount /system /system'"
to
HTML:
@files\adb shell "su -c 'busybox mount -o remount,rw /system'"
This is all great, exactly what I was looking for! But what about if the ROM already has a custom kernel that makes use of /etc/init.d? Do the /etc/init.d scripts get executed twice?
EDIT: in my phone this solution can't work. In the init.rc file the following lines are commented out
Code:
#service flash_recovery /system/etc/install-recovery.sh
# oneshot
Thanks, it's working but I have a question, how we can include this in a rom?
Please respond, I would appreciate that
DooMLoRD said:
run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
Click to expand...
Click to collapse
That means I don't need run-parts if I've busybox installed?
1-Tell me please if I understand: I've done everything the post says Doomlord ([ADDON] [Xperia S] Generic startup /init.d scripts support for Stock ROM / Kernel) my question is this, after this I can already install scripts from cwm?
2-I try installing ''NullVoid'' tweaK by cmw and apparently well was installed. (I say apparently because i do not know if it is working)
3-Another thing about Tweaks: These have to be installed every time the phone restarts? This tweaks are compatible with the stock ics rom? (With the Doomloard Method ?
DooMLoRD said:
........
[ additional info ]
i have added the following things in the package:
corrected /system/bin/sysint file
run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
correct /system/etc/install-recovery.sh file (this file gets executed by default on stock kernel too!)
test/example script /system/etc/init.d/99test
to check if this is working the test script (99test) will create a temporary file /data/local/tmp/init.d_log_test.txt on each boot
..........
Click to expand...
Click to collapse
So the "install-recovery.sh" file is executed by system by default and does not need to be executed manually from terminal or what else?
And about the file...that is not a one-run file...right? It is executed at every phone boot...right??
Thank you.
Sent from my GT-I9000 using xda app-developers app
AW: [ADDON][Xperia S] Generic startup/init.d scripts support for Stock ROM/Kernel
Sorry leaving footprint, to see this again after im home.
Gesendet von meinem LT26i mit Tapatalk 2
Hello,
Is this package valid for deodexed rom?
I'm on stock .55, bootloader locked.
Currently the folder /system/etc/init.d doesn't exists
Thank you
marvasten said:
Hello,
Is this package valid for deodexed rom?
I'm on stock .55, bootloader locked.
Currently the folder /system/etc/init.d doesn't exists
Thank you
Click to expand...
Click to collapse
it doesnt matter which ROM you are on... this should work on any ROM as long as the kernel ramdisk executes install-recovery.sh service...
dont worry it creates all required folders/files

[KERNEL]How to build a custom Android Kernel for your device

here is the guide
http://forum.xda-developers.com/showpost.php?p=24747881&postcount=4
thakz irfanbagus for the guide
where's the package link?have you try this guide by yourself?
i hope he tried
got a ubuntu, i will try this one (cross-fingers)
it's not working. sgy stock kernel do not have /proc/config.gz and gcc version in arm-2011.03 not compatible with other precompiled module.
this is work for me
requirement :
1. linux box 32 bit with working gcc. you can use real linux machine or virtual machine
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/showpost.php?p=22224170&postcount=241 . credit to harish2704
4. split_bootimg.pl (google it)
5. kernel source from http://opensource.samsung.com . i use GT-S5360_GB_Opensource_Update2.zip
6. stock boot.img (or from your custom kernel).
step :
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-S5360_Kernel.tar.gz" from "GT-S5360_GB_Opensource_Update2.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-S5360_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 have dual core cpu and 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. make odin flash-able
Code:
tar -cf boot-sgy.tar boot.img
I thought you have to put your post into a new thread irfan...this one is a fake guide.
kurotsugi said:
I thought you have to put your post into a new thread irfan...this one is a fake guide.
Click to expand...
Click to collapse
Irfan must create a guide.yes yes..I also think Irfan sahab must compile a CM7.2 from sources.
offtopic:
btw, do you know who's working on cm7 from source with motafoca?his thread is missing and I just get curious on their progress.
kurotsugi said:
offtopic:
btw, do you know who's working on cm7 from source with motafoca?his thread is missing and I just get curious on their progress.
Click to expand...
Click to collapse
His thread was closed by moderator.You can request MOD to reopen his thread.Motafoca wanted a galacy y to be lended for his experiments
---------- Post added at 03:37 PM ---------- Previous post was at 03:33 PM ----------
Can someone download the sources around 15Gigs and stripe down the file and share it to Maroc ?
Whre can i download it?
Sent from my GT-S5360 using xda premium
kurotsugi said:
I thought you have to put your post into a new thread irfan...this one is a fake guide.
Click to expand...
Click to collapse
i don't call it fake. it's just too general and missing some detail (but critical) for our device. and in the 'spirit of operation iron fist', i think it's better to put here
premolikeshtc said:
Irfan must create a guide.yes yes..I also think Irfan sahab must compile a CM7.2 from sources.
Click to expand...
Click to collapse
with my internet connection, it will take weeks just to download the source. and i think cm, like android source, use repo. so you can't just download it. you clone it from their source repository, that mean no download accelerator.
btw beside kernel source, samsung also release their mod to android source. but to build it, you still need to get android source (about 10GB according their website).
well...thats your choice, irfan.
@sgy.creed: sorry, I don't mean to offend you. IMHO it will be nice if before someone post any guide they already have tested it by them. in this way, they'll able to give more accurate direction to anyone who need their guide. as we already know, kernel is crucial part in our device. any mistake in compiling it will lead to brick our device. we have to cautious on it. peace ^,^v
kurotsugi said:
well...thats your choice, irfan.
@sgy.creed: sorry, I don't mean to offend you. IMHO it will be nice if before someone post any guide they already have tested it by them. in this way, they'll able to give more accurate direction to anyone who need their guide. as we already know, kernel is crucial part in our device. any mistake in compiling it will lead to brick our device. we have to cautious on it. peace ^,^v
Click to expand...
Click to collapse
if you (or others) think it's better to put in other thread, or maybe op wanna edit his post, fell free to copy my post (or just link, it's up to you). i don't take any credit to that post, because it just recompilation from other thread.
GT-B5510
Is there by chance anyway to find a stock Kernel for my device for my GT-B5510???
I recently flashed a custom Kernel for GT-S5360 and the result was a Brick.
is there someone willing to help me??
Rui Oliveira 21 said:
Is there by chance anyway to find a stock Kernel for my device for my GT-B5510???
I recently flashed a custom Kernel for GT-S5360 and the result was a Brick.
is there someone willing to help me??
Click to expand...
Click to collapse
Have u tried through kies?if the answer u failed then only odin is the way.
u need pda files from the update.Search google,i found one FW but it is from Italy :
B5510CEKK1.
sgy.creed said:
Hi guys,
This guide teaches how to make a new kernel for your device, it works in most of the cases but doesnt mean it will work for everyone
You need a minimal linux experice to know WTF you are doing
If you have any questions, post Belloowww
Download the required files
You will need a linux machine with the basic development tools or a virtualbox machine running a linux distribution (ubuntu 64bits will do fine)
I use the codesourcery package
Download the IA32 GNU/Linux TAR
The tar package is the easier to install
You will also need your kernel source from your manufacturer, for samsung the sources are available here
Install the cross compiler
Enter the folder were you downloaded the package and extract it, you will get something like arm-2011.03
Move that folder to some location, i use opt
ex: mv arm-2011.03 /opt/
or
sudo mv arm-2011.03 /opt
Done!
Extract and prepare the kernel sources
I will use the samsung sources as example, but anything can be used
For the samsung sources, after you extract the zip, you will get something like DEVICE_Platform.tar and DEVICE_Kernel.tar.gz
Extract the kernel:
tar zxvf DEVICE_Kernel.tar.gz
Enter the kernel folder and list the folder contents
ls
The structure is something like this:
{
"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"
}
Most devices contain the config file inside the device
You can extract it like this:
adb shell
su
cp /proc/config.gz /sdcard/
exit
exit
adb pull /sdcard/config.gz
Good, now we have the sources, compiler and configuration
Compiling the kernel
To compile ther kernel, i usually clean the sources first, with this i know for sure nothing will go wrong (usually )
make ARCH=arm CROSS_COMPILE=/opt/arm-2011.03/bin/arm-none-eabi- distclean (Remember to replace acordingly the compiler folder)
Sources cleaned, time to load the config file
gunzip config.gz
cp config ./.config
Good, now lets check the menuconfig (menuconfig is a menu to choose the kernel options, created to make it easy to select)
make ARCH=arm CROSS_COMPILE=/opt/arm-2011.03/bin/arm-none-eabi- menuconfig
Change whatever you want and exit and save
good, now its time to build
make ARCH=arm CROSS_COMPILE=/opt/arm-2011.03/bin/arm-none-eabi- -j2
Now wait for it to finish!
Your compiled kernel will be located inside arch/arm/boot/zImage
Extracting a boot.img
Good, now we have the zImage, but WTF to do with it?
Well, android usually (some samsung devices use a different boot.img method, ex: I9000) has the boot.img, inside of it we contain:
- ramdisk (required files to load the /system partition and continue the boot sequence)
- zImage (our kernel)
- pagesize
- base
- cmdline (some kernel paremetes used on boot)
To create your own boot.img, you need one from a nandroid backup that was made from CWM or AmonRA custom recoveries (there are other methods, but for those use the madteam forum )
The boot.img is located inside your /sdcard/clockworkmod/backup/somedate/boot.img
You will also need the unpackbootimg and mkbootimg binaries, i this link there is the 64 bit version (wont work on 32 bit linux)
create an empty folder, copy the downloaded file inside, enter it and do:
tar zxvf bootimgtools.tar.gz
chmod 755 *
now copy the boot.img you got from the backup
and extract the boot.img with:
./unpackbootimg -i boot.img
this will create the files as explained above
Creating the boot.img
Before making the boot.img, we need some information from the files extracted
cat boot.img-base ( save the output #1)
cat boot.img-pagesize (save the output , place the value inside the Hex Value of this site, and copy the decimal value and save it #2)
cat boot.img-cmdline (save the output #3)
Good, now copy the compiled kernel (zImage) inside the current folder and do:
mkbootimg –kernel zImage –ramdisk boot.img-ramdisk.gz –cmdline “(replace with output#3)” –base (replace withoutput #1) –pagesize (replace with output#2) -o /tmp/boot.img
Good, the boot.img is created!
Now test on your device!
If you dont know how to flash the boot.img, enter the madteam forum and request help (its too difficult to explain the flashing of boot.img if you dont know how to do it )
Take care!
<External link removed>
Click to expand...
Click to collapse
please credits motafoca madteam
GT-B5510
Harsh06 said:
Have u tried through kies?if the answer u failed then only odin is the way.
u need pda files from the update.Search google,i found one FW but it is from Italy :
B5510CEKK1.
Click to expand...
Click to collapse
Kies said that I had the most recent firmware, tough I found some new versions.
right now trough kies I tried to do an emergency firmware restore, i guess thats the name, but it asked for a code, a 4 number code i guess and i dont know what's the code.
Via odin I tried to install stock firmware from sammobile but it failled as well, if you want I'll post the dialog from odin.
I can boot in recovery mode, Odin(download) mode and CWM mode.
could you point me in the right direction???
thanks for your time
Rui Oliveira 21 said:
Kies said that I had the most recent firmware, tough I found some new versions.
right now trough kies I tried to do an emergency firmware restore, i guess thats the name, but it asked for a code, a 4 number code i guess and i dont know what's the code.
Via odin I tried to install stock firmware from sammobile but it failled as well, if you want I'll post the dialog from odin.
I can boot in recovery mode, Odin(download) mode and CWM mode.
could you point me in the right direction???
thanks for your time
Click to expand...
Click to collapse
I believe Doky already reply your post n willing to help u in others thread.Give doky some info about your current FW.U need 3 complete files n flash through Odin.Key in *#1234# with your dialer(u will see current info version) and PM doky about the info.He surely gonna help u.
Sorry OP off topic.
GT-B5510
He did help, thanks
question now is...while trying to revive the phone I installed Creed's Rom for Gt-s5360, I got quiet, and obviously it doesnt work that well in my GT-B5510, so I need a custom Rom for my device or a Stock Rom, but I cant find neither :S
any lights??
Kernel
How to change Kernel Version when build kernel ??
usually display 2.6.35.7 [email protected] #1
i wanna change [email protected] #1 so how the setting on linux or maybe what file??
Thanks b4
Rui Oliveira 21 said:
He did help, thanks
question now is...while trying to revive the phone I installed Creed's Rom for Gt-s5360, I got quiet, and obviously it doesnt work that well in my GT-B5510, so I need a custom Rom for my device or a Stock Rom, but I cant find neither :S
any lights??
Click to expand...
Click to collapse
I was just wondering if you went to the oldest possible firmware you could find and then proceeded to update from that. Sometimes the updates only contain necessary info and kind of rely on the previous installs.
Sent from my TF101 using Crashntalk 2

[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 an extra (extra thanks..)
(may U?)
I did all the steps as you did. Packed boot.img and flashed but i still see old boot logo. Device is Huawei u8650
at this step ı have this Screen
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Well I've been scratching my head about this and just can't work out what's going wrong - after I run the ./extractboot boot.img command I keep getting the message: './extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory'
I followed your instructions as below:
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
When you say "move your fav kernel into same directory", what do you mean? Move it into the 'boot' folder? Or do you mean the 'cygwin' folder?
Any help you could give would be greatly appreciated - confused.com!
boot.img file problem
HTC ONE X beataudio
ENDEAVORU PVT SHIP S-ON RL
HBOOT-1.36.0000
CPLD-None
MICROP-None
RADIO-5.1204.162.29
eMMC-bootmode:disabled
CPU-bootmode: disabled
HW Secure boot:enabled
MODEM PATH : OFF
Nov 16 2012,18:32:39
cid: HTC__044
i install this ROM (cm-10.1-20130404-NIGHTLY-endeavoru.zip) file but can't boot.
boot problem how to fix pls i did flash boot.img file also but same problem.pls help
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
doesnt work on my innos d9 rom
sirhca said:
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
Click to expand...
Click to collapse
http://d-h.st/xwB
mesadbal said:
at this step ı have this Screen
Click to expand...
Click to collapse
Type this in your cygwin
Code:
chmod 777 extractboot
chmod 777 mkbootfs.exe
chmod 777 mkbootimg.exe
chmod 777 packboot
chmod 777 split_bootimg.pl
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Error when extracting
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
3X4MPL3 said:
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
Click to expand...
Click to collapse
Same problem here Bro... So how did you manage to fix it ?
FinixZ said:
Same problem here Bro... So how did you manage to fix it ?
Click to expand...
Click to collapse
Not at all, I didn't changed it and waited for an other kernel
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
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
Click to expand...
Click to collapse
why i am getting this error?
any idea?
$ ./extractboot boot.img
Page size: 131072 (0x00020000)
Kernel size: 4584280 (0x0045f358)
Ramdisk size: 3831016 (0x003a74e8)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: not in gzip format
Finally i manage to extract...
3X4MPL3 said:
Not at all, I didn't changed it and waited for an other kernel
Click to expand...
Click to collapse
Finally i manage to extract the boot image by using this script... :victory:
Thanks to the author "Beide" for his script :highfive:
Code:
#!/usr/bin/perl -W
use strict;
use bytes;
use File::Path;
die "did not specify boot img file\n" unless $ARGV[0];
my $bootimgfile = $ARGV[0];
my $slurpvar = $/;
undef $/;
open (BOOTIMGFILE, "$bootimgfile") or die "could not open boot img file: $bootimgfile\n";
my $bootimg = <BOOTIMGFILE>;
close BOOTIMGFILE;
$/ = $slurpvar;
# chop off the header
$bootimg = substr($bootimg,2048);
# we'll check how many ramdisks are embedded in this image
my $numfiles = 0;
# we look for the hex 00 00 00 00 1F 8B because we expect some trailing padding zeroes from the kernel or previous ramdisk, followed by 1F 8B (the gzip magic number)
while ($bootimg =~ m/\x00\x00\x00\x00\x1F\x8B/g) {
$numfiles++;
}
if ($numfiles == 0) {
die "Could not find any embedded ramdisk images. Are you sure this is a full boot image?\n";
} elsif ($numfiles > 1) {
die "Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.\n";
}
$bootimg =~ /(.*\x00\x00\x00\x00)(\x1F\x8B.*)/s;
my $kernel = $1;
my $ramdisk = $2;
open (KERNELFILE, ">$ARGV[0]-kernel.gz");
print KERNELFILE $kernel or die;
close KERNELFILE;
open (RAMDISKFILE, ">$ARGV[0]-ramdisk.cpio.gz");
print RAMDISKFILE $ramdisk or die;
close RAMDISKFILE;
print "\nkernel written to $ARGV[0]-kernel.gz\nramdisk written to $ARGV[0]-ramdisk.cpio.gz\n";
if (-e "$ARGV[0]-ramdisk") {
rmtree "$ARGV[0]-ramdisk";
print "\nremoved old directory $ARGV[0]-ramdisk\n";
}
mkdir "$ARGV[0]-ramdisk" or die;
chdir "$ARGV[0]-ramdisk" or die;
system ("gunzip -c ../$ARGV[0]-ramdisk.cpio.gz | cpio -i");
print "\nextracted ramdisk contents to directory $ARGV[0]-ramdisk/\n";
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Click to expand...
Click to collapse
thank you for your n00b-friendly tut., but for some reason it already goes wrong in step 1, 'cause when I extract the kernel the folder out/ramdisk remains empty, so nothing to replace. Have I done something wrong or is my Arc S just not suitable for this sort of tinkering?
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
BordenG said:
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
Click to expand...
Click to collapse
ok, found "perl" but for "cpio" I searched and installed the 3 items that had "cpio" in 'em (on top of my head "default '& "items" and a third I can't remember).
If it works the OP should add that info to the tut.

[Kitchen] Ghost Kitchen v2 [MODYFIED FOR KITKAT] (Samsung Galaxy S4) [GT-I9505]

Ghost Kitchen v2
Compatible with Windows(Cygwin) / Mac OS X / Linux
{
"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"
}
Ghost Kitchen Based on dsixda's Android Kitchen and was only modyfied by me and thehacker911 for the new Android 4.4,X ROM's (My extras are only for Galaxy S4 and i don't support any other Devices!!!
So please don't ask if i support any other Device, the answer is NO, cause i don't have enough time to support any other Devices.
This Kitchen is only for Galaxy S4 KitKat ROMs modyfied !!!
Features:
Code:
[FONT="Comic Sans MS"][SIZE="3"][COLOR="Black"]
1. Set up working folder from ROM
2. Zipalign all *.apk files to optimize RAM usage
3. Change name of ROM
4. Show working folder information
5. Add Root Permissions
6. Add BusyBox
7 Remove Knox
8 Create Base (Ghost Extra Mod by [URL="http://forum.xda-developers.com/member.php?u=5068852"]thehacker911[/URL])
GHOST Advanced Options
11 - Deodex files in your ROM
12 - Tools for boot image (unpack/re-pack/etc.)
13 - Sign APK or ZIP file(s)
14 - Add etc/init.d scripts support (old - use only for kernel)
15 - Add etc/init.d support (newest Method)
99. Build ROM from working folder
0. Exit
GHOST Base Menu
1 - Unpack system.ext4.img
2 - Unpack cache.ext4.img
3 - Unpack hidden.ext4.img
4 - Unpack data.ext4.img
99. Build ROM from working folder
0. Exit
[/COLOR][/SIZE][/FONT]
All Credits / Questions and answers can be found
Here
A Big Thanks to:
dsixda
thehacker911
Download
​
How to Use​​​
Open Cygwin or Terminal
write
cd ghost
./ghost
Ghost Menu opens and you can begin to make your ROM ​
​
Please move this thread to developers only forum
Sorry for that my Friend but i have this Thread created in Original I9505, cause my modyfications are only for I9505
any Moderator please move this thread to developers only forum
All fine thank you
really nice, thank you for your work!
No
What No ??
Kitchen Works Great if you say no, don't use it
Let's try it
I put the ghost folder where the kitchen folder is. I type cd ghost and it says:
-bash: cd: ghost: No such file or directory
I type cd kitchen and I am in there... confused a little where the ghost folder goes to be found... thanks in advance...
[email protected]:~/Ghost_Kitchen_v2/ghost$ ./ghost
bash: ./ghost: Permission denied
how to fix this?
bobfrantic said:
I put the ghost folder where the kitchen folder is. I type cd ghost and it says:
-bash: cd: ghost: No such file or directory
I type cd kitchen and I am in there... confused a little where the ghost folder goes to be found... thanks in advance...
Click to expand...
Click to collapse
First help here Bob, after you changed device. You download program then you have a main folder where inside there's a folder named ghost. Cd to main folder=>cd to ghost folder and write ./ghost to start kitchen, if you get "permission denied" write chmod a+x ghost then again ./ghost
kentandrei said:
[email protected]:~/Ghost_Kitchen_v2/ghost$ ./ghost
bash: ./ghost: Permission denied
how to fix this?
Click to expand...
Click to collapse
Read my answer above this quote
Inviato dal mio GT-I9505
Give the kitchen folder 0777 rights
Gesendet von meinem One mit Tapatalk
AntaresOne said:
First help here Bob, after you changed device. You download program then you have a main folder where inside there's a folder named ghost. Cd to main folder=>cd to ghost folder and write ./ghost to start kitchen, if you get "permission denied" write chmod a+x ghost then again ./ghost
Read my answer above this quote
Inviato dal mio GT-I9505
Click to expand...
Click to collapse
thanks i will try your solution sir later after work.
thehacker911 said:
Give the kitchen folder 0777 rights
Gesendet von meinem One mit Tapatalk
Click to expand...
Click to collapse
how to do that sir?
EDIT: the first quote answered already my question for you sir, sorry for the noob question
btw sir how to solve this?
Enter option: 8
./ghost: line 124: scripts/ghost/menu_base: Permission denied
i choose to create a base and that comes out.
go into the folder scripts/ghost/menu_base and give all the files 0777 rights
Ghost44 said:
go into the folder scripts/ghost/menu_base and give all the files 0777 rights
Click to expand...
Click to collapse
i did what you've said sir but
[email protected]:~/Ghost_Kitchen_v2/ghost/scripts$ chmod a+x menu_base
chmod: cannot access ‘menu_base’: No such file or director
EDIT: above post is already solve.
EDIT2:
Proceed (y/n)? (default: y): y
Creating folder /home/kyang/Ghost_Kitchen_v2/ghost/system.ext4_101814_203716 ...
---> Place system.ext4.img into the folder mentioned above <--
Press Enter to continue
NON-YAFFS/NON-TAR FILE FORMAT DETECTED
Mounting system.ext4.img to loopback device and then extracting files ...
mkdir: cannot create directory ‘../tmp’: File exists
Error: Unable to mount system.ext4.img
Error: /home/kyang/Ghost_Kitchen_v2/ghost/system.ext4_101814_203716 is empty!
Press Enter to continue
i extract the I9505VJUGNI2_I9505ZTOGNI2_I9505VJUGNI2_HOME.tar.md5 and replace the system.img.ext4 to system.ext4.img and that error came out. how to extract the system.img.ext4 originally from the I9505VJUGNI2_I9505ZTOGNI2_I9505VJUGNI2_HOME.tar.md5?
AntaresOne said:
First help here Bob, after you changed device. You download program then you have a main folder where inside there's a folder named ghost. Cd to main folder=>cd to ghost folder and write ./ghost to start kitchen, if you get "permission denied" write chmod a+x ghost then again ./ghost
Inviato dal mio GT-I9505
Click to expand...
Click to collapse
I don't get permission denied, I get this error: -bash: cd: ghost: No such file or directory. Do I have to setup cgywin all over again for ghost?
bobfrantic said:
I don't get permission denied, I get this error: -bash: cd: ghost: No such file or directory. Do I have to setup cgywin all over again for ghost?
Click to expand...
Click to collapse
No Bob, I wrote that thing about permission denied just in case. You don't have to setup again: after you download kitchen rar file extract it and rename the folder in "ghost". Paste this folder in cygwin folder->home->YOURNAME and start up cygwin
@ kentandrei
go into this folder scripts/ghost/menu_base/base_tool
open sgs2toext4.jar and drop the system.img.ext4 into the sgs2toext4.jar
then rename the converted img file to system.ext4
Got it working yay but when I was setting up a work folder I got this error:
-------------------------------------
Available ROMs:
(1) I9505XXUGNG8_I9505OXXGNG2_XSK.zip
Enter selection number (default=1, cancel=0, r=refresh):
Selected I9505XXUGNG8_I9505OXXGNG2_XSK.zip
The new working folder will be named WORKING_101914_184151
Change the name (y/n)? (default: n):
Creating working folder WORKING_101914_184151 ...
Extracting ROM from ZIP file ...
Error: No system folder found!
Press Enter to continue
-----------------------------------------
Shouldn't it be creating the system folder when creating the working folder?

Categories

Resources