Help to get boot.img of my stock kernel - Galaxy Y GT-S5360 General

I'm new @xda and @SGy. Please tell me how to get boot.img of my kernel(As boot.img file)
(This file is for my f***ing bro. I don't let him to touch my SGy.)
Pls tell a easier method.
••••Rocking SGy™••••

Use root explorer and extract. Or andro zip. Any file manager free
Sent from City of Angels

Install Terminal Emulator from Google Play Store and enter these commands one after the other:
su
dd if=/dev/block/bml7 of=/sdcard/boot.img
tar cvf /sdcard/kernel-backup.tar /sdcard/boot.img
Boot.img and Kernel-backup.tar (for Odin flash) will be created.

Raol Emostar said:
Install Terminal Emulator from Google Play Store and enter these commands one after the other:
su
dd if=/dev/block/bml7 of=/sdcard/boot.img
tar cvf /sdcard/kernel-backup.tar /sdcard/boot.img
Boot.img and Kernel-backup.tar (for Odin flash) will be created.
Click to expand...
Click to collapse
Hi Raol,
I typed the command above and got my boot.img. However, when I try to work on it with Kitchen, it tells me that I must first root my ROM... but my ROM is already rooted. Is there someting missing in my boot.img? Is there another command to include the su binaries in the boot.img?
NB: I have a Samsung Galaxy Y Duos

JohnNAVI said:
Hi Raol,
I typed the command above and got my boot.img. However, when I try to work on it with Kitchen, it tells me that I must first root my ROM... but my ROM is already rooted. Is there someting missing in my boot.img? Is there another command to include the su binaries in the boot.img?
NB: I have a Samsung Galaxy Y Duos
Click to expand...
Click to collapse
nothing missing ............(BTW What Is Ur File Size)

root is usually stored outside the kernel. some of kernel have build in root, but it's only on custom kernel. stock kernel never have build in root. btw, what are you trying to do with your kernel? dsixda kitchen only have limited option to modify kernel. as far as I know it only has extract, build, and add init.d option. I've been doing that for several times and it succed. all my modified kernel is created via dsixda's kitchen.

kurotsugi said:
root is usually stored outside the kernel. some of kernel have build in root, but it's only on custom kernel. stock kernel never have build in root. btw, what are you trying to do with your kernel? dsixda kitchen only have limited option to modify kernel. as far as I know it only has extract, build, and add init.d option. I've been doing that for several times and it succed. all my modified kernel is created via dsixda's kitchen.
Click to expand...
Click to collapse
I'm triying to add init.d option to my rooted stock kernel. Unfortunately, I always get the following message in Kitchen:
'su' binary not found under working folder!
You must root your ROM first.
But if, as you say, root is stored outside the kernel, I understand why it doesn't work. Is there another way to add init.d to my stock kernel?
BTW, my boot.img file is 5120Ko.

search mikstev's post about droidwall. you can find the tut inside his zip file. extract that file then check readme.txt
EDIT: I forgot that you're using sgy duos. you'll need to extract boot.img via kitchen, find init.rc. add these script
Code:
start sysinit
class_start default
and
Code:
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
please refer to mikstev's init.rc to find where to put those script.

I tried to extract boot.img via Kitchen following mikstev's tuto, but it didn't work.
I have my boot.img in a folder called /kitchen/WORKING_XXX. In kitchen, I choose 0, then 20 and 'w'. And I get the following message:
Working folder found
Error: system folder not found under working folder!
I could extract boot.img with 'a'. I then get a file called zImage and a folder called boot.img-ramdisk. In boot.img-ramdisk I find the init.rc file. I modify it by adding the scripts following mikstev's tuto. But then, I cannot build a new boot.img as the 'b' option in not available in kitchen.
Do you have any idea why I cannot complete mikstev's tuto?
EDIT: Please do not take into account what I wrote above. My problem was that the file called zImage and the folder called boot.img-ramdisk must be placed in a folder named BOOT-EXTRACTED and not EXTRACTED_BOOT as mentioned in mikstev's tuto.

ah...thats it. you don't have system folder in working_xxx folder. if you have cwm, make a backup of your rom, copy system.rfs.tar to your computer, extract the file, then put whole system folder into working_xxx.

kurotsugi said:
ah...thats it. you don't have system folder in working_xxx folder. if you have cwm, make a backup of your rom, copy system.rfs.tar to your computer, extract the file, then put whole system folder into working_xxx.
Click to expand...
Click to collapse
I tried your method and that's probably the best way to make it work.
But I found a way around. What I did is extract my boot.img with the 'a' option (no need for system folder), rename the folder where boot.img has been extracted to BOOT-EXTRACTED, modify init.rc and build a new boot.img with 'b' option. Maybe not as clean as your method, but it's a newbie way .
I then installed the new boot.img and I checked that the init.rc file in my root was the modified one (which was the case). However, it seems that init.d support is not working as the scripts installed in the init.d folder didn't execute. Is it due to my noob method? Should I try your method instead?
Thanks a lot for helping me in my first steps in the Android world.

how did you test the init.d script? a simple way to test init.d script is by make a file in init.d contain
Code:
#!/system/bin/sh
touch /data/kurotsugi.txt
make sure that you have installed busybox and set the file permission to 777 (rwxrwxrwx). if the init.d script is working you'll find kurotsugi.txt in /data

kurotsugi said:
how did you test the init.d script? a simple way to test init.d script is by make a file in init.d contain
Code:
#!/system/bin/sh
touch /data/kurotsugi.txt
make sure that you have installed busybox and set the file permission to 777 (rwxrwxrwx). if the init.d script is working you'll find kurotsugi.txt in /data
Click to expand...
Click to collapse
I set the permission to 777 and your test file (called 03test) in init.d but nothing happens.
What I did in fact is to put the following command line in the updater-script of my update.zip file (used to transfer the 03test file to init.d):
Code:
set_perm(0, 0, 0777, "/system/etc/init.d/03test");
Any idea why this doesn't work?

have you install the busybox?
if that method didn't work you can try the other method that I've given to you.

I have busybox installed. But when I want to
Code:
chmod 777 03test
I get the following error message:
Unable to chmod 03test: Read-only file system
That's why I have to go through the update.zip method.
I also reinstalled the new boot.img created with your method but nothing changes. The scripts in init.d don't run at startup.

JohnNAVI said:
I think I have found the reason why it doesn't work. I have installed Busybox v1.18.14 and it looks like run-parts is not supported in this version. I will install a new version of Busybox and I will keep you posted.
Click to expand...
Click to collapse
It was a problem with the old Busybox version that did not support run-parts. I installed v1.19.4 and everything is working fine now.
Thank you so much for helping me kurotsugi. Have a nice day.

Related

[GUIDE] Beginner guide how to make your ROM *.img from Linux OS !!!

First you must to install yaffs!!!
Download attached archive and unpack it to /usr/sbin/ folder with your File Manager or Terminal window. I preffered File Manager, it is simpliest way.
After copyed mkfs.yaffs2 and unyaffs, you must to change permissions on these two files.
Open Terminal if you don`t previously opened and write...
[email protected]_name:~$ sudo nautilus
Nautilus is File Explorer on Ubuntu Linux. On other Linux distribution you may have other File Explorer. Anyway... open it with sudo command.
Enter your root password and navigate to /usr/sbin folder.
Find these two files mkfs.yaffs2 and unyaffs.
Right click mouse on it then click to see "Properties".
In properties tab you will see "Permissions" tab.
Click on it and set "read and write" option for all users and group in this tab then close window and Terminal.
You can change permission in the Terminal window with this command if you want...
[email protected]_name:~$ sudo chmod 667 /usr/sbin/mkfs.yaffs2
[email protected]_name:~$ sudo chmod 667 /usr/sbin/unyaffs
This is it for install mkfs.yaffs2 and unyaffs.
After that, create new folders on your desktop named as "newrom".
Copy system.img from ROM instalation folder to newrom folder and run unyaffs.
Open terminal and type... Only type BOLD text.
[email protected]_name:~$ cd /home/your_name/Desktop/newrom
[email protected]_name:~/Desktop/newrom$ unyaffs /home/your_name/Desktop/newrom/system.img
Wait unyaffs to uncompress all files and folders from system.img
When unyaffs has been completed uncompress procedure, you will see something like that...
end of image
[email protected]_name:~/Desktop/newrom$
Close terminal window if you want to close.
Open folder newrom and delete system.img file. Folder "newrom" contains everything from your system.img file. You may to change, delete or something else to create your new Android build. Yes you may to be ROM cookers.
After your intervention on files and many other stuff in your "new rom", you will be prepare to create your new "system.img" file.
This process must to be in other folder with diference name. Not to be in same folder where is your previous uncopressed folders and files. In my case this folder is "newrom".
Folder for new "system.img is my Desktop.
Ok, let see what we must to do... In case when you previous closed Terminal window, you must be placed on Desktop uses CD command in Terminal.
[email protected]_name:~$ cd Desktop
You must see this...
[email protected]_name:~/Desktop$
Enter this...
[email protected]_name:~/Desktop$ mkfs.yaffs2 newrom/ system.img
And you must see this...
mkfs.yaffs2: Android YAFFS2 Tool,Build by PowerGUI
at http://www.openhandsetalliance.org.cn
Building...
Build Ok.
[email protected]_name:~/Desktop$
After that you will see new system.img on your Desktop.
For boot.img file, procedure is same except name of *.img file.
That`s it. I hope that is help.
Thanks to everyone who helped me to write this guide.
Enjoy.
FileFixer.
so much thanks. i'll have a try~
Ignore this
I have extracted the files in to the directories as suggested but when I run the command to extract the system.img I get access is denied. I have tried this as my standard user account and logged on as root any ideas?
Edit: modified the permissions on the two files I dumped in to sbin and resolved the issue!
Yes... If you don`t permission you can login as root and change rigts on this two files.
In my case i just copy these two files in /usr/sbin folder and everything work fine.
This is, maybe i think,for per user mod.
I would be to edit thread for this problem...
Works very well very nice thread man. I was able to fully extract the img file from a gingerbread build and play arround with it and rebuild it cheers!
Pictures or video's?
You will be free to create them. I have no much time for this. if you try my procedure step by step, you can learn something...
@FileFixer
Maybe you could also post a way for us to edit the initrd.gz files in the rom builds, so we can make some changes that are necessary for SD builds to work with MAGLDR "AD SD" option ourselves?
Thanks, Santroph.
Unpack initrd.gz on your desktop and open cpio archive. Inside is a few scripts and few elf files.
I am not developer but i will trying to learn more about this.
Pretty useful tutorial i will try that soon.
FileFixer said:
Unpack initrd.gz on your desktop and open cpio archive. Inside is a few scripts and few elf files.
I am not developer but i will trying to learn more about this.
Click to expand...
Click to collapse
Cool guide did you have any help you would like to credit
No, i don`t have any help about this. I just playing with some files.
FileFixer said:
No, i don`t have any help about this. I just playing with some files.
Click to expand...
Click to collapse
KillaHurtz said:
Cool guide did you have any help you would like to credit
Click to expand...
Click to collapse
hehe
(10 chars)
When I use the command unyaffs /home/your_name/Desktop/newrom/system.img I get an error open image file failed.
Why is this not working for me?
...
Never mind, it worked!
Very useful topic!
Yo MUST be placed in to your "newrom" folder before start unyaffs command.
[email protected]_name:~$ cd /home/your_name/Desktop/newrom
then type this...
[email protected]_name:~/Desktop/newrom$ unyaffs /home/your_name/Desktop/newrom/system.img
Only type BOLD text.
Never mind, it worked for you!
After repack - no root
I did unpack and repack system.img according this guide (without any changes - only for testing). After flash the ROM works fine, but is not rooted. Original ROM is rooted.
Why? I didn't make any changes in unpacked system.img.
Can anyone help me with this, please?
Thanks.
I think that you must set permissions to all before pack img file.
santroph said:
@FileFixer
Maybe you could also post a way for us to edit the initrd.gz files in the rom builds, so we can make some changes that are necessary for SD builds to work with MAGLDR "AD SD" option ourselves?
Thanks, Santroph.
Click to expand...
Click to collapse
Hi,
Here's a quick howto
* mkdir initrd-temp
* cp initrd.gz initrd-temp
* cd initrd-temp
* gunzip initrd.gz -c | cpio --extract --make-directories
* rm initrd.gz
* Make your changes
* find .|cpio -H newc -o|gzip -9 -c - > ../initrd.gz
I hope that helps
Hey,
thanks for this useful thread!
I have problems in this whole process of booting a custom rom ( in my case Miui) in the Emulator . I have compiled the whole rom on a Linux VM with your Guide and pushed it in a Windows system into android-9/images/system.img but it won't boot I don't know what I am doing wrong. My system.img is 2 GB big I think this is not normal. if i am replacing the system.img with the original out of the emulator, it is booting. I just want to boot the Miui rom to port some features to Cyanogenmod... Thanks in advance. I have a HTC Legend btw .

Init.d do not run

I am using the rom IML74K Android 4.0.3 Build 8 from bigxie and franco.Kernel #13.
I think the rom and kernel suppose to support init.d scripts. And I can found the script in etc/init.d named 97schedmc.
I wanna the hotplug function, so I put a file named 98hotplug(I don't know how to named the script), but I found it would not work. The parameter would not change after restart the device. Even I excute it(rename to sh file) in RootExplor, the parameter did not changed.
I try to run or sh the command in adb shell, it works fine, and the parameter changed.
I thinks it is relate to the access right issue, but I don't know how to fix it.
Could any one can help me?
Thanks for the guy who reply me.
you most chmod the files. Just sticking them it won't allow them to run.
I am not such understand... What should I do then?
chmod them?
755 works.
Hi,
Like this:
For 755,right permissions for scripts in Init.d folder,a good link i think: http://www.elated.com/articles/understanding-permissions/
Do not create a sh. file,for example in Root Eplorer,go to system/etc/init.d and menu/New file then put your script with #!/system/bin/sh first then space then enter.
Or on your pc take a init.d file in a rom,erase the script,copy yours with the correct script,reput in your phone,set the correct permissions then reboot.
Are you really sure your rom/kernel suppot Init.d ?
Just one question,I do not use this combo...
Hoping this helps
Permissions are set correctly, the kernel (faux123) supports init.d scripts, and the script works when run from terminal, but it still does not run on boot.
Thanks for your reply and great help!
I am sure the kernel support the init.d, but I not sure the rom, is it necessary both of them to support init.d?
What is your combo??
Hi,
To monkeyzou,yes i use the same kernel wich support Init.d script,but i use aokp rom,the rom you are using seems not support Init.d (it is not specified?),but in any case the Franco kernel support it,and it create the necessary lines in "init.rc" for activate the init.d support+the init.d file+the correct permissions,all automatically when you flash the kernel...
So i don't now what is wrong
Are you sure you set the right permissions for your file script in init.d?Are you sure your script is written correctly?
Can you share it?
After that my knowledges stop there,sorry...
init.d support only needs to be in the kernel ramdisk. As for rom support, that only goes as far as needing the directory. Note that some of the kernels out there are anykernel format and therefore would not support init.d scripts.
I was trying to do the exact same thing and couldn't make it work either. Eventually I just used Script Manager (on market) and let it run the script at boot.
Here is my script:
Code:
#!/system/xbin/bash
echo 1 > /sys/module/dsscomp/parameters/hotplug_enabled
Re,
To monkeyzou can you test this script at the bottom of my message?
Remove the .txt and copy it to your init.d folder then set the right permissions for it as i have shown above.
Or test another script where you could see a change?
At the end are you sure your script don't work?
After reboot with the script go to /sys/module/dsscomp/parameters/hotplug_enabled and see if the value is set to 1,if yes it's ok,if no (so set to 0),i don't know more...
ctbear said:
I was trying to do the exact same thing and couldn't make it work either. Eventually I just used Script Manager (on market) and let it run the script at boot.
Here is my script:
Code:
#!/system/xbin/bash
echo 1 > /sys/module/dsscomp/parameters/hotplug_enabled
Click to expand...
Click to collapse
Hi,
Test the script i've posted above:
#!/system/bin/sh
echo 1 > /sys/module/dsscomp/parameters/hotplug_enabled
Click to expand...
Click to collapse
I hope that helps
viking37 said:
Hi,
Test the script i've posted above:
I hope that helps
Click to expand...
Click to collapse
Thanks. Unfortunately it still didn't work, but I've found a workaround (looks stupid, but somehow works):
Basically I have a script file at the root of storage, and it contains just the echo line. My init script will just run that /sdcard script and it works fine.
viking37 said:
Re,
To monkeyzou can you test this script at the bottom of my message?
Remove the .txt and copy it to your init.d folder then set the right permissions for it as i have shown above.
Or test another script where you could see a change?
At the end are you sure your script don't work?
After reboot with the script go to /sys/module/dsscomp/parameters/hotplug_enabled and see if the value is set to 1,if yes it's ok,if no (so set to 0),i don't know more...
Click to expand...
Click to collapse
Tried this script and it works

[Q] How to make stock ROM support INIT.D

hi guys, a friend of mine is asking me if there's something i can do to make her cp a bit faster/ smoother running stock rom (gb 2.3.6) since he don't want to use any custom rom. her cp
searching the thread, i was able to read some info that some was able to flash mod/ tweaks on stock roms to at least improve its performance. so i'm planning to install andrenaline engine or crossbreader on it but, as far as i know, flashing them requires ur rom, aside from of course being rooted, have cwm, etc., to support init.d which stock roms don't have. (corect me if i'm wrong)
i'm a bit in doubt doing this in the fist place, so any guide/ help or suggestions to make this init.d thing work is really really much appreciated. thnx in advance!
info i got (xda forum) about making stock rom support init.d Enable Init.d for Any Phones w/o Need of Custom Kernels
here, this link provide init.d support;
http://forum.xda-developers.com/showpost.php?p=32716432&postcount=3
flash zip_init.zip.
copy zip_init.zip to sd-card,
boot to cwm, mount /system, mount /data then flash zip_init.zip
check for test.log in /data if it is there or not, no test.log not working.
it work on my stock rom.
also flash adrenoboost v0.7 will boost perfromance from stock 5000 to 7000 (antutu benchmark).
adrenoboost link;
http://forum.xda-developers.com/showthread.php?t=2167228
saintsoh said:
here, this link provide init.d support;
http://forum.xda-developers.com/showpost.php?p=32716432&postcount=3
flash zip_init.zip.
copy zip_init.zip to sd-card,
boot to cwm, mount /system then flash zip_init.zip
check for test.log in /data if it is there or not, no test.log not working.
it work on my stock rom.
also flash adrenoboost v0.7 will boost perfromance from stock 5000 to 7000 (antutu benchmark).
adrenoboost link;
http://forum.xda-developers.com/showthread.php?t=2167228
Click to expand...
Click to collapse
thnx for the reply bro. about the adrenoboost, i think its main purpose is to boost the performance of Adreno 205 GPU or similar gpu but my friends device doesn't have gpu.
i didnt know tat.
anyway i think after mount /system, u should also mount /data (just in case).
it work on my sgw without mount /data but then i saw check /data for test.log which makes it necessary or not?
i'm not sure, just be on the safe side mount /data.
saintsoh said:
i didnt know tat.
anyway i think after mount /system, u should also mount /data (just in case).
it work on my sgw without mount /data but then i saw check /data for test.log which makes it necessary or not?
i'm not sure, just be on the safe side mount /data.
Click to expand...
Click to collapse
okay, i'll try that and hope it'll work
EDIT: sad, it didn't work
just learn something new when i reverted back to stock and re-install zip-init for init.d support.
when flash zip_init.zip and reboot, cwm will ask to "disable recovery flash" - select "NO".
(note: if select "yes", it will give a false positive, 'install-recovery.sh' will not have execute permissions and init.d support will not work).
after troubleshoot found out the install-recovery.sh is not in execute permission (rwxr--r-- instead of rwxr-xr-x).
by correcting the 'install-recovery.sh' permission, init.d support will work again.
ps;
must install busybox app (do a normal install).
saintsoh said:
just learn something new when i reverted back to stock and re-install zip-init for init.d support.
when flash zip_init.zip and reboot, cwm will ask to "disable recovery flash" - select "NO".
(note: if select "yes", it will give a false positive, 'install-recovery.sh' will not have execute permissions and init.d support will not work).
after troubleshoot found out the install-recovery.sh is not in execute permission (rwxr--r-- instead of rwxr-xr-x).
by correcting the 'install-recovery.sh' permission, init.d support will work again.
ps;
must install busybox app (do a normal install).
Click to expand...
Click to collapse
i got busybox installed, but i'm having status 0 error in CWM. in troubleshooting guide, it says replace the update-binary in zip-init.zip with a working update-binary of your phone and i don't how to do it
dec0der said:
i got busybox installed, but i'm having status 0 error in CWM. in troubleshooting guide, it says replace the update-binary in zip-init.zip with a working update-binary of your phone and i don't how to do it
Click to expand...
Click to collapse
update-binary is in the zip file, just download the latest which is the v2 and re-flash again.
if still doesn't work, try get help from init.d support thread.
i didn't get it working on the first time twice but somehow get it work again again.
saintsoh said:
update-binary is in the zip file, just download the latest which is the v2 and re-flash again.
if still doesn't work, try get help from init.d support thread.
i didn't get it working on the first time twice but somehow get it work again again.
Click to expand...
Click to collapse
it was v2 of zip_init that i use and i think i re flashed it 5x already and still getting that error anyways, thnx 4 ur help bro, godbless!
dec0der said:
it was v2 of zip_init that i use and i think i re flashed it 5x already and still getting that error anyways, thnx 4 ur help bro, godbless!
Click to expand...
Click to collapse
superusers app needed for terminal emulator, fx explorer(root access), busybox and script manager apps installed for root access.
use script manager, look for install-recovery.sh in /etc or system/etc (both r the same directory).
touch su n boot icon, su will turn green n boot will turn blue. reboot.
or
use fx explorer to set file permissions if u do not know linux commands.
google play search for fx explorer app and fx root addon (enable root access).
use root folder, look for install-recovery.sh in system/etc.
touch tool menu below and mount read-write then u can change file permission.
or
if u r familiar with linux commands, u can use terminal emulator to change file permission.
check install-recovery.sh permission is rwxr-xr-x, not other like rwxr--r--.
how2check in emulator, type n press enter:
ls -l etc/inst* ↵
how2change file permission, type n press enter:
su ↵
cd etc ↵
mount -o remount rw /system ↵
chmod 755 install-recovery.sh ↵
exit ↵
exit ↵
done, there shouldnt be any error, reboot.
if not re-flash zip_init.zip, reboot, select "NO" to disable flash recovery.
saintsoh said:
superusers app needed for terminal emulator, fx explorer(root access), busybox and script manager apps installed for root access.
use script manager, look for install-recovery.sh in /etc or system/etc (both r the same directory).
touch su n boot icon, su will turn green n boot will turn blue. reboot.
or
use fx explorer to set file permissions if u do not know linux commands.
google play search for fx explorer app and fx root addon (enable root access).
use root folder, look for install-recovery.sh in system/etc.
touch tool menu below and mount read-write then u can change file permission.
or
if u r familiar with linux commands, u can use terminal emulator to change file permission.
check install-recovery.sh permission is rwxr-xr-x, not other like rwxr--r--.
how2check in emulator, type n press enter:
ls -l etc/inst*
how2change file permission, type n press enter:
su
cd etc
mount -o remount rw /system
chmod 755 install-recovery.sh
exit
exit
done, there shouldnt be any error, reboot.
if not re-flash zip_init.zip, reboot, select "NO" to disable flash recovery.
Click to expand...
Click to collapse
busybox was installed correctly as i can see the folder bin/ xbin. it's rooted already so superuser was in there and i used root explorer file manager. i can't find install-recovery.sh in /etc or system/etc which maybe means that it was not working
dec0der said:
busybox was installed correctly as i can see the folder bin/ xbin. it's rooted already so superuser was in there and i used root explorer file manager. i can't find install-recovery.sh in /etc or system/etc which maybe means that it was not working
Click to expand...
Click to collapse
1) phone is rooted,
2) superuser app installed,
3) busybox app installed,
4) root explorer file manager app installed,
5) no install-recovery.sh in /etc or system/etc?
6) no test.log in /data?
7) re-flash zip_init.zip, reboot, select 'NO' to disable flash recovery?
8) no init.d directory in /etc?
9) in etc/init.d directory, there should have two files 00test n 08setperm. in /etc should have install-recovery.sh file.
10) u dont have these three files?
flashing cant write on system directory, means manufacturer locked the system.
unless u can find way to break the lock.
saintsoh said:
1) phone is rooted,
2) superuser app installed,
3) busybox app installed,
4) root explorer file manager app installed,
5) no install-recovery.sh in /etc or system/etc?
6) no test.log in /data?
7) re-flash zip_init.zip, reboot, select 'NO' to disable flash recovery?
8) no init.d directory in /etc?
9) in etc/init.d directory, there should have two files 00test n 08setperm. in /etc should have install-recovery.sh file.
10) u dont have these three files?
flashing cant write on system directory, means manufacturer locked the system.
unless u can find way to break the lock.
Click to expand...
Click to collapse
1-4 yes, all done
5-10 don't have those files coz i got status 0 error flashing zip_init.zip v2 in CWM
if thats the case, maybe i'll try to flash different stock firmware 1st
dec0der said:
1-4 yes, all done
5-10 don't have those files coz i got status 0 error flashing zip_init.zip v2 in CWM
if thats the case, maybe i'll try to flash different stock firmware 1st
Click to expand...
Click to collapse
try manually put in those files in their respectively directories.
unzip n try putting those files in their respective order.
create a init.d directory in /etc then put those two files 00test n 08setperm into it.
put the install-recovery.sh in /etc, set all permissions to rwxrwxrwx.
(upload manager doesnt allow .sh file, rename install-recovery.sh.txt to install-recovery.sh)
done, reboot n see it works or not.
saintsoh said:
try manually put in those files in their respectively directories.
unzip n try putting those files in their respective order.
create a init.d directory in /etc then put those two files 00test n 08setperm into it.
put the install-recovery.sh in /etc, set all permissions to rwxrwxrwx.
(upload manager doesnt allow .sh file, rename install-recovery.sh.txt to install-recovery.sh)
done, reboot n see it works or not.
Click to expand...
Click to collapse
okay, i'll try that. thnx

[MOD][HOW TO]Make your favorite kernel adbd insecure to run ADB as root on /system

Note: Found out there is one small problem with this mode - "adb logcat" is not working. As a workaround run "adb shell su -c logcat"
The Problem:
I am a heavy ADB user (QtADB) and was having problems getting it to mount /system rw and pushing/editing files in real time. Had no problems doing all this by mounting /system in recovery but rebooting the phone just to make some system files changes is kind of inconvenient. So I did some research and found this:
HEXcube said:
The real reason behind adb root or insecure adb is the adb daemon in the device running at root permissions. In pre-Android 4.1 versions, this is usually decided by some initialisation script(like init.rc) at boot time. The script checks for value in default.prop,local.propand other environment variables.
If it finds build.prop,default.prop or local.prop property file with ro.secure=0 adbd is allowed to run as root. You'll get adb root and hence will be able to do commands like adb remount,adb root and adb shell's prompt'll be # by default. The user may be displayed as [email protected] or [email protected] adb GUIs like Android Commander and QtADB will get to work in Root mode.
But,if it's ro.secure=1, adb daemon is made to work in secure mode, and adb won't change to root mode on issuing adb root command. However, if su binary is present in $PATH, u can still call su command from adb shell. But, it's not enough for Android Commander to get Root Access. It is possible to attain adb root through any one of the following methods:
1.For CyanoGenMod based ROMs there is an option in Settings->Developer Settings->Root access to control root access. Choose ADB only or Apps and ADB in options to get adb root.
2.Else use adbd Insecure app by chainfire if you have a rooted device. This is useful, especially for Android 4.1+ devices.
3.Or, you may manually edit default.prop to set it's value to 0, but original default.prop will be restored from boot partition everytime you reboot(this is the reason why adb Insecure cannot permanently do adb root, though there is an option to repeat the rooting procedure everytime the device boots). This method is called temporary adb root. On pre-Android 4.0 ROMs default.prop file was located in / directory. I read that from Android 4.x this file is in ramdisk and so more difficult to edit. But Android 4.0 has local.prop which is easier to modify than default.prop( See method 5)
4.For permanent adb root, you'll have to extract boot.img, change default.prop, repack and then flash it back to device.
5. In Android 4.0 there's local.prop file in /data partition. Setting ro.secure=0 in this file will do adb root permanently. Else you can set another property ro.kernel.qemu=1 in the same file. But, this value makes the system think that it is running in an android emulator. Many exploits and root methods set this property temporarily to gain root. But, it may cause side effects if used permanently. Setting ro.secure=0 is recommended. Do this command in terminal app or adb shell:
echo ro.secure=0 >/data/local.prop
or you can manually copy a local.prop file with ro.secure=0 as it's content to /data.
6.Note that method 3,4 and 5 won't work in Android 4.0 Jelly Bean onwards. According to Dan Rosenburg(drjbliss in XDA),the researcher who discovered adb root emulator exploit and many other exploits, Jelly Bean doesn't parse any property files to set the ownership of adb daemon. The stock adbd will have to be replaced with an insecure one to gain adb root. But still,as adbd is located in /sbin whose contents are reloaded everytime on reboot from boot.img, it won't be permanent.
7. For permanent adb root, you may flash an insecure boot.img(one that contains and insecure adbd)
8. If you're really desperate and can't get adb root to work with any of the above methods use an exploit. Most of the adb based rooting methods utilise some exploit to make the adb daemon run as root. By studying the exploit and implementing it you could gain adb root atleast temporarily.I'm not recommending this method but as a last resort you could try them.
Acknowledgements: Thanks to Dan Rosenberg for explaining the reasons behind adb root, especially the one in Jelly Bean.
Click to expand...
Click to collapse
Original thread: Can't get ADB Root Access in certain ROMs?
So I desided to modify my favorite kernel img and give it a try. I used Imoseyon's leanKernel but it should work with any kernel.
How To:
1. Get Android Image Kitchen and extract it to your PC;
2. Open your_favorite_kernel.zip with 7zip and extract boot.img file to Android Image Kitchen folder;
3. Drag and Drop boot.img over unpackimg.bat. Kernel is unpacked and you will see 2 new folders - ramdisk and split_img;
4. Go to ramdisk folder and open default.prop file with text editor. This probably is not necessary but just in case change ro.secure and ro.adb.secure to 0 (zero):
Code:
ro.secure=0
ro.adb.secure=0
5. Get Chainfire's adbd Insecure v1.30, open it with 7zip, in assets folder you will see 3 .png files. Extract adbd.17.png to ramdisk\sbin folder;
6. Delete original kernel adbd file and rename adbd.17.png to adbd;
7. Go back to Android Image Kitchen folder and run repackimg.bat by just click on it. This will repack the modified kernel to image-new.img file ready for flashing;
8. Rename image-new.img to boot.img and replace the original one in your_favorite_kernel.zip by Drag and Drop in 7zip window;
9. Close 7zip, copy modified your_favorite_kernel.zip to /sdcard and flash it in recovery.
10. Enjoy ADB full root access for /system;
Warnings:
I can't guarantee 100% success with this mod. I did this only with leanKernel and it works great, Haven't tried any other kernels so I am note sure how all this will end up. IT CAN SOFT BRICK YOUR PHONE!!! Keep a copy of the original kernel on your /sdcard!!!
Doing this while trying to find the correct tools for proper repack of the modified kernel sometime I was ending up with the phone not booting to Android, goes straight to download mode. Don't panic... Just remove battery, place it back, hold Volume Up + Home + Power buttons booting to recovery. Flash the original kernel and you are back all good.
The usual stuff:
I AM NOT RESPONSIBLE FOR ANYTHING ... bla-bla-bla...
All the credits goes for the developers created the great tools used for this mod.
If you think it's useful fill free to say THEM and me thanks.
@nijel8
Thanks for sharing this. I will test this out on my device. If successful I would like to share this over in the One SV forums.
I never even considered this idea smh lol.
Edit: confirmed working
Thanks so much for sharing this. I too use adb a lot and need an insecure kernel.
Success. Nexus 5 and I changed Franco kernel to insecure.
Franco kernels used to be insecure but none thus far have been on the N5. Any reason behind this?
Fuzzy13 said:
Thanks so much for sharing this. I too use adb a lot and need an insecure kernel.
Success. Nexus 5 and I changed Franco kernel to insecure.
Franco kernels used to be insecure but none thus far have been on the N5. Any reason behind this?
Click to expand...
Click to collapse
My guess is devs play it safe so average Joe don't mess with /system... ha-ha
btw is "adb logcat" working for you?
Only problem with the adbd from chainfires ADB Insecure is that it breaks adb wireless,any solution ?
nijel8 said:
Note: Found out there is one small problem with this mode - "adb logcat" is not working. As a workaround run "adb shell su -c logcat"
The Problem:
I am a heavy ADB user (QtADB) and was having problems getting it to mount /system rw and pushing/editing files in real time. Had no problems doing all this by mounting /system in recovery but rebooting the phone just to make some system files changes is kind of inconvenient. So I did some research and found this:
Original thread: Can't get ADB Root Access in certain ROMs?
So I desided to modify my favorite kernel img and give it a try. I used Imoseyon's leanKernel but it should work with any kernel.
How To:
1. Get Android Image Kitchen and extract it to your PC;
2. Open your_favorite_kernel.zip with 7zip and extract boot.img file to Android Image Kitchen folder;
3. Drag and Drop boot.img over unpackimg.bat. Kernel is unpacked and you will see 2 new folders - ramdisk and split_img;
4. Go to ramdisk folder and open default.prop file with text editor. This probably is not necessary but just in case change ro.secure and ro.adb.secure to 0 (zero):
Code:
ro.secure=0
ro.adb.secure=0
5. Get Chainfire's adbd Insecure v1.30, open it with 7zip, in assets folder you will see 3 .png files. Extract adbd.17.png to ramdisk\sbin folder;
6. Delete original kernel adbd file and rename adbd.17.png to adbd;
7. Go back to Android Image Kitchen folder and run repackimg.bat by just click on it. This will repack the modified kernel to image-new.img file ready for flashing;
8. Rename image-new.img to boot.img and replace the original one in your_favorite_kernel.zip by Drag and Drop in 7zip window;
9. Close 7zip, copy modified your_favorite_kernel.zip to /sdcard and flash it in recovery.
10. Enjoy ADB full root access for /system;
Warnings:
I can't guarantee 100% success with this mod. I did this only with leanKernel and it works great, Haven't tried any other kernels so I am note sure how all this will end up. IT CAN SOFT BRICK YOUR PHONE!!! Keep a copy of the original kernel on your /sdcard!!!
Doing this while trying to find the correct tools for proper repack of the modified kernel sometime I was ending up with the phone not booting to Android, goes straight to download mode. Don't panic... Just remove battery, place it back, hold Volume Up + Home + Power buttons booting to recovery. Flash the original kernel and you are back all good.
The usual stuff:
I AM NOT RESPONSIBLE FOR ANYTHING ... bla-bla-bla...
All the credits goes for the developers created the great tools used for this mod.
If you think it's useful fill free to say THEM and me thanks.
Click to expand...
Click to collapse
Some time ago I 've tried to do this for a Nexus6, running Marshmallow.
Android has tighten up security, so I got bootloops.
Anyone has managed to do this?
Thank you!
nijel8 said:
Note: Found out there is one small problem with this mode - "adb logcat" is not working. As a workaround run "adb shell su -c logcat"
The Problem:
I am a heavy ADB user (QtADB) and was having problems getting it to mount /system rw and pushing/editing files in real time. Had no problems doing all this by mounting /system in recovery but rebooting the phone just to make some system files changes is kind of inconvenient. So I did some research and found this:
Original thread: Can't get ADB Root Access in certain ROMs?
So I desided to modify my favorite kernel img and give it a try. I used Imoseyon's leanKernel but it should work with any kernel.
How To:
1. Get Android Image Kitchen and extract it to your PC;
2. Open your_favorite_kernel.zip with 7zip and extract boot.img file to Android Image Kitchen folder;
3. Drag and Drop boot.img over unpackimg.bat. Kernel is unpacked and you will see 2 new folders - ramdisk and split_img;
4. Go to ramdisk folder and open default.prop file with text editor. This probably is not necessary but just in case change ro.secure and ro.adb.secure to 0 (zero):
Code:
ro.secure=0
ro.adb.secure=0
5. Get Chainfire's adbd Insecure v1.30, open it with 7zip, in assets folder you will see 3 .png files. Extract adbd.17.png to ramdisk\sbin folder;
6. Delete original kernel adbd file and rename adbd.17.png to adbd;
7. Go back to Android Image Kitchen folder and run repackimg.bat by just click on it. This will repack the modified kernel to image-new.img file ready for flashing;
8. Rename image-new.img to boot.img and replace the original one in your_favorite_kernel.zip by Drag and Drop in 7zip window;
9. Close 7zip, copy modified your_favorite_kernel.zip to /sdcard and flash it in recovery.
10. Enjoy ADB full root access for /system;
Warnings:
I can't guarantee 100% success with this mod. I did this only with leanKernel and it works great, Haven't tried any other kernels so I am note sure how all this will end up. IT CAN SOFT BRICK YOUR PHONE!!! Keep a copy of the original kernel on your /sdcard!!!
Doing this while trying to find the correct tools for proper repack of the modified kernel sometime I was ending up with the phone not booting to Android, goes straight to download mode. Don't panic... Just remove battery, place it back, hold Volume Up + Home + Power buttons booting to recovery. Flash the original kernel and you are back all good.
The usual stuff:
I AM NOT RESPONSIBLE FOR ANYTHING ... bla-bla-bla...
All the credits goes for the developers created the great tools used for this mod.
If you think it's useful fill free to say THEM and me thanks.
Click to expand...
Click to collapse
Can this work with Note 3 N900 (exynos kernel) sir? Or just only for snapdragon chipsrt kernel? Thanks sir!
does this work on locked bootloader devices?
a custom kernel exists for my devices (G928A) with AdB Insecure , but its got a few qwirks that need worked out ( that require fully rooting the device )
all im looking for is insecure Adb, ( which I have tried to change ro.secure=0 and adb.secure=0 both with Echo commands in shell) for temporary adb root on the device
how did ManIT make his custom kernel undetectable/passable by the bootloader but with modifications?
if this will work ... then I will just edit an image pulled from the devices current boot.img and do the same adb insecure edit to the ramdisk.. to update the root flash kernel... shes a bit dated.... and there isn't one for marshmallow specific one yet.
I was also reading about a filler file due to block sizing when repacking the image ... so I created a copy file and edited the contents till it zipped back to within 1kb of data... will this be detected and flagged at boot?
help please
Great tutorial.
I did it by following the steps in your post.
Thank you for clear and precise explanation.
Anybody have a pre-patched / adb root enabled adbd at hand (10.0.36 or higher - current is 10.0.41 I think)?

[TUT][NOOB FRINDLY] Building Flashable On Device Rom-Kernel

Hello Guys
Iam Guiding you today to build your on device rom most Of u can do it but i belive somebudy doesn't know That is Noob Frindly Guide
Requirements
Code:
1-PC
2-Winrar/7zip
oR Root Explorer on Mobile
Part A (Rom Building)
METHOD1
Step1
Code:
Reboot To Recovery
Step2
Code:
Make Nandroid Backup
Step3
Code:
Open Your pc and connect via usb
Step4
Code:
Bull Your clockworkmod folder to pc
Step5
Code:
Extract Templete rom.zip attached below
Step6
Code:
Navigate to your cwm backup
Step7
Code:
Extract System(..).tar
Step8
Code:
Copy The files u extracted (inside system folder u extracted) To Template rom/ System/
[B]NOTE:DONT COPY WHOLE SYSTEM FOLDER - JUST ITS COMPONENTS[/B]
Step9
Code:
Go to Template Rom Folder Select Meta-inf
and system
then add them to new Archive with .zip extintion
Step10
Code:
Flash your rom and enjoy
METHOD 2
Code:
1. Go to treminal emulator
2. Type these commands dont copy that >"
[CODE]
1."su"
2."tar -c system/* >> sdcard/system.tar"
3.navigate to your sd root
4.extract system.tar
5.put its components to template rom>system (like method 1)
6.Enjoy
[/CODE]
Part B (On Device Kernel Packing)
Step 1
Code:
Follow Steps Up From 1-6
Step 2
Code:
Get Boot.img and put it in the root of zip attached (Kernel Template)
Credits
Myaservip
Marcussmith2626
you can also type in terminal emulator
su
tar -c system/* >> sdcard/system.tar
wait until the command promp returns (may take 5 mins so make sure screen timeout is set to at least 15mins to make it easier for you to keep an eye on it without the screen keep turning off)
once done you will have a file called system.tar on the root of your sd card
you can then load this file in android kitchen which is useful for deodexing
or you can just extract it and all your system files will be there to do with as you like - eg put in a flashable zip
note the above requires the following
root
terminal emulator (playstore)
busybox installed (get installer from playstore if not already installed)
my method in spoiler above added to op
How about my data.rfs.tar? Will I Flash again my Tweak on Phone, after reflashing the ROM backup?
U can push them by adb or wait untill i make data script
When I Flash my ROM Backup, It stucks on black screen But Heard the Boot Sound not the animation display.
Try fix premisions
I will update my template if it worked
Or u might deleted my fix premision binary
Be aware dont replace/delete it to avoid bootloops/breaks
myaservip said:
I will update my template if it worked
Or u might deleted my fix premision binary
Be aware dont replace/delete it to avoid bootloops/breaks
Click to expand...
Click to collapse
I'll Try again. *Report Later.

Categories

Resources