[Q] Kernel Development Help Needed - Galaxy Note 3 Q&A, Help & Troubleshooting

I have been trying for two days now and after searching and searching, I am asking for some help.
I had an idea of changing the SELinux status from enforcing to permissive. This needs to be done in the kernel.
So I downloaded Samsung SM-N9005 source files and built the kernel. I have the zImage.
I just need some help with getting, and unpacking a boot.img file, replacing the kernel with my zImage and repacking the kernel and ramdisk into a boot.img to flash.
I have tried mkbootimg and unmkbootimg among other tools.
I get the following warning:
Code:
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00200100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
I did a clockworkmod backup and used the boot.img from there. Is that correct procedure?
Please please please please someone with kernel knowledge give me a helping hand, it will make my day!

Send over your zImage and the stock boot.img, I can give it a try and explain how if it works.

designgears said:
Send over your zImage and the stock boot.img, I can give it a try and explain how if it works.
Click to expand...
Click to collapse
Ok here they are:
zImage: http://www.multiupload.nl/J9TP9YCV8H
stock boot.img: http://www.multiupload.nl/6FVBWOOYHX
Many Thanks

designgears said:
Send over your zImage and the stock boot.img, I can give it a try and explain how if it works.
Click to expand...
Click to collapse
[email protected]:~/Android-Kitchen-0.224/WORKING_mj7_9008$ unpack boot.img
Boot = boot.img
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
Kernel size 8488008
Kernel address 0x8000
Ramdisk size 1335394
Ramdisk address 0x2000000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F"
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00200100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F' -o new_boot.img
---------------
5170 块
the zImage:https://mega.co.nz/#!uNY1gBzZ!L2qLYjEMQ-x9HRGl4GKs3XR8fTgCH0BBRvTuyfiKS5M
the boot.img:https://mega.co.nz/#!jIwhhboD!c2V21gS3DZIXsIKUUpaM6wIL_SZNzLmSRMqQw2Rn7G8
thanks

What happened ? what is the solution to this ?

Five years later ???

Related

Modify boot.img to have true root

I am trying to unpack boot.img and modify the property in default.prop file.
But after I flash the modified boot.img, the phone cannot boot.
I think the only step that I can go wrong is the parameter of mkbootimg.
And here is the command line that I use.
./mkbootimg --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz --base 0x81000000 --pagesize 4096 --ramdiskaddr 0x81800000 -o boot.img
Original boot.img is attached, it is actually nexus4 4.4 boot.img.
Thanks!
What do you mean by true root? And the android kernel is just different from the default Linux kernel, so I'd say their commands might not be interchangeable.
Sent from my Nexus 4 using Tapatalk

Build own kernel and stuck on LG logo

Hi,
if i try to build my own kernel for d802, i have a little problem. it should be for cm-11.0 and i tried the stock cm-11.0 kernel to test it.
i use:
./dtbTool -s 2048 -o dt.img -p cm11/scripts/dtc/ cm11/arch/arm/boot/
to get my dt.img
and:
./mkbootimg --kernel cm11/arch/arm/boot/zImage --ramdisk ramdisk.gz --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=g2 user_debug=31 msm_rtb.filter=0x0" --base 0x00000000 --offset 0x05000000 --tags-addr 0x04800000 --pagesize 2048 --dt dt.img -o boot.img
to build the boot.img (ramdisk extracted from cm11).
i put it into a loki-fied .zip to install it and the installation works, but if i try to boot it stuck on lg logo. can anyone help me? is there a problem with my lines above?
AuxXxilium said:
Hi,
if i try to build my own kernel for d802, i have a little problem. it should be for cm-11.0 and i tried the stock cm-11.0 kernel to test it.
i use:
./dtbTool -s 2048 -o dt.img -p cm11/scripts/dtc/ cm11/arch/arm/boot/
to get my dt.img
and:
./mkbootimg --kernel cm11/arch/arm/boot/zImage --ramdisk ramdisk.gz --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=g2 user_debug=31 msm_rtb.filter=0x0" --base 0x00000000 --offset 0x05000000 --tags-addr 0x04800000 --pagesize 2048 --dt dt.img -o boot.img
to build the boot.img (ramdisk extracted from cm11).
i put it into a loki-fied .zip to install it and the installation works, but if i try to boot it stuck on lg logo. can anyone help me? is there a problem with my lines above?
Click to expand...
Click to collapse
hey .. that looks correct to me. what rom are you trying to boot your boot.img with? i know if u using the latest CM11 branch it adds alot of commits that require new blobs .. unless that rom has those new blobs it won't boot.
houstonn said:
hey .. that looks correct to me. what rom are you trying to boot your boot.img with? i know if u using the latest CM11 branch it adds alot of commits that require new blobs .. unless that rom has those new blobs it won't boot.
Click to expand...
Click to collapse
i tried on a your rom but it didn't boot. i'll try it on cm11 to confirm it. thx for your help.

[Q] SM-G900F build custom boot.img

Hi
I am used to rebuild boot images with unkmbootimg/mkbootimg on my S4 mini. When I repack a G900F a working stock boot.img and flash it with Odin, the device boots into download mode. I didn't made any changes in the ramfs, the sources are binary the same, but when I repack it to the boot.img it's different to the stock.
Is my bootloader locked? Do I need a special mkbootimg to enable SEAndroid enforcing? It does not matter if I disable it in the ramfs. Do I have to modify the kernel too?
Regards
It seems, that not the boot image is the problem but the cpio initramfs.
I can use the command
Code:
abootimg -u boot.img -r initrd.img
to replace the ramdisk in a working boot image. This works only if a replace the current initramfs with the original initramfs. If I unpack the initramfs too and repack the exact same sources, it won't boot. The sources are binary the same, but the packed initramfs is totally different.
I use the following command to repack my initramfs:
Code:
find . | cpio -o -H newc | gzip > ../initrd.img
cloooned said:
It seems, that not the boot image is the problem but the cpio initramfs.
I can use the command
Code:
abootimg -u boot.img -r initrd.img
to replace the ramdisk in a working boot image. This works only if a replace the current initramfs with the original initramfs. If I unpack the initramfs too and repack the exact same sources, it won't boot. The sources are binary the same, but the packed initramfs is totally different.
I use the following command to repack my initramfs:
Code:
find . | cpio -o -H newc | gzip > ../initrd.img
Click to expand...
Click to collapse
I don't know if this is still relevant to you, but I have found that so far the only tool that repacks s5 kernel properly is the Osm0sis kernel kitchen. I am working on linux and I was able to pack my compiled zimage and modified ramdisk using his tool. You can read more on his original thread here .
I hope thos help you.

[Q] SM-G900S repack tool

Any body has repack tool for galaxy s5(SM-G900S) kernel?
I do have unpack tool, but repack tool I have is not working.
When I use unmkbootimg made by kuisma below messages shown.
Code:
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
Kernel size 8360752
Kernel address 0x8000
Ramdisk size 1764107
Ramdisk address 0x2000000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3"
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00200100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' -o new_boot.img
---------------
But I don't know where to get mkbootimg.c source mentioned in message.
I've tried to mkbootimg with --base 0x8000 --ramdiskaddr 0x2000000 and --base -x1dfff00 but both didn't work.
Anybody has a solutoin? Help me plz.
SMG900F repack problem
Hi
Any update with that issue. I experience similar problem.
Thanks

[Q] [SOLVED] Compiling and packing custom kernel for Galaxy Note 3

Hello.
I'm trying adding several drivers into my SM-N9005 firmware. My phone runs Omega ROM v21, whose kernel doesn't support kernel module drivers, so I decided to recompile Omega's kernel from sources with needed options. The sources were taken from here:
https://github.com/omega-roms/N9005_Omega_Kernel_KK_4.4.2
The compilation was easy, the drivers were compiled too, I have my zImage now.
I downloaded Omega's flashable kernel-only zip N9005_Omega_Kernel_KK_v1.1_XXUFNF4_ramdisk.zip from Omega's repo, unpacked boot.img from the zip and tried disassembling it with split_boot script from bootimg_tools found here:
http://forum.xda-developers.com/showthread.php?t=2319018
I got the following output:
Page size: 2048 (0x00000800)
Kernel size: 8259720 (0x007e0888)
Ramdisk size: 1581598 (0x0018221e)
Second size: 0 (0x00000000)
Board name:
Command line: 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3'
Base address: (0x01dfff00)
Writing boot/boot.img-kernel ... complete.
Writing boot/boot.img-ramdisk.cpio.gz ... complete.
Unpacking ramdisk... complete.
So I got original Omega's kernel boot.img-kernel and ramdisk boot.img-ramdisk.cpio.gz. Next I decided to reassemble it and flush back, coz' if it works - my kernel might work too.
I took mkbootimg tool from the same package and created new boot.img with it, using parameters I got previously from split_boot script:
./mkbootimg --kernel boot/boot.img-kernel --ramdisk boot/boot.img-ramdisk.cpio.gz --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' --base 0x01dfff00 --pagesize 2048 -o boot.img
So I got new boot.img with size 9846784 bytes, whereas original Omega's boot is 11149312 bytes.
I packed my boot.img into original Omega's kernel zip N9005_Omega_Kernel_KK_v1.1_XXUFNF4_ramdisk.zip, replacing existing original boot.img inside, renamed the zip and flushed with recovery.
Now my phone falls into download mode, saying 'Could not do normal boot'. Flashing back original Omega's kernel restores the phone to normal state, so the problem is with reassembling boot.img
What am I missing? Please, help.
The answer was easy: Android Image Kitchen v1.6 for Linux from http://forum.xda-developers.com/showthread.php?t=2073775
My kernel is rebuilt and my device is now working ok! Thanks to the authors.
jeweller_by said:
The answer was easy: Android Image Kitchen v1.6 for Linux from http://forum.xda-developers.com/showthread.php?t=2073775
My kernel is rebuilt and my device is now working ok! Thanks to the authors.
Click to expand...
Click to collapse
Thanks!

Categories

Resources