[Q] SM-G900F build custom boot.img - Galaxy S 5 Q&A, Help & Troubleshooting

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.

Related

How to change boot splash image ..

Hello folks, I am using the tytung r9 kernel with Hyperdroid GBX 12 and I want change the default splash image of the kernel. I have already converted the image to .rle thanks to this guide, and I been told I have to unpack the initird, place it on the root of the initrd and pack it back, problem is I don't know how to do it.
Can anyone help me to unpack an pack back the initrd??? Also I couldn't find it on the phone.. Where exactly is it located ???
Thanks
Ok, all the credits goes to @Curious_ from #htc-linux-chat on irc who has kindly helped me to sort this out, and now I want to share it with everyone.
In order to replace the logo.rle image with the one we made we have to mount the /boot partition, so lets begin
Code:
mkdir /data/boot/
mount -t yaffs2 /dev/block/mtdblock2 /data/boot/
now that the /boot partition is mounted we want to pull the initrd.gz file into ur pc
Code:
adb pull /boot/data/initrd.gz /path/to/dir/
now we'r gonna extract the initrd file from initrd.gz and unpack it
Code:
gunzip initrd.gz
cpio -i < initrd
now replace the logo.rle file with our one and lets repack it
Code:
find . | cpio -o -H newc | gzip > initrd.gz
Ok, last step is to push the new initrd.gz file into /data/boot and reboot the phone
Code:
adb push /wherever/it/is/initrd.gz /data/boot/
reboot
Enjoy
In addition here you can find lots of splash screens specifically made for the HD2. Those are not specifically boot splash screen, but you can convert the image to .rle using too565 tool.
Hope you guys will be making lots of custom boot splash screens

[HELP]Re-create bootable blob with init.rc changes

Good evening all!!
Well after two days of hitting my head against the wall I decided to ask for help.. typical guy here!!
Problem: when using the blobtools to create a boot blob it soft bricks my transformer. No idea why.
Objective: Create a bootable boot blob with init.rc changes
Steps token to create the boot blob:
::Tools Used::
- BlobTools created by RaYmAn
- BootTools created by RaYmAn
::Blob used:: Stock kernel provided by clemsyn ( h t t p : / / w w w . megaupload.com/?d=GSIHUPJ6 ) kernelblob
1. After compiling blobtools I used "blobunpack" to unpack my blob
Code:
./blobunpack /home/mike/Android/kernelblob
Once done it produced "kernelblob.HEADER" and "kernelblob.LNX"
2. After compiling boottools I used "bootunpack" to unpack "kernelblob.LNX"
Code:
./bootunpack /home/mike/Android/kernelblob.LNX
Which produced "kernelblob.LNX-kernel.gz" and "kernelblob.LNX-ramdisk.cpio.gz"
3. Then I uncompressed "kernelblob.LNX-ramdisk.cpio.gz"
Code:
gunzip -c /home/mike/Android/kernelblob.LNX-ramdisk.cpio.gz | cpio -i
Which produced the initramfs. Made my changes to init.rc
4. Re-created ramdisk using this command
Code:
find . | cpio -o -H newc | gzip > ../newkernelblob.LNX-ramdisk.cpio.gz
5. Then re-create kernelblob.LNX (boot.img) with mkbootimg
Code:
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel kernelblob.LNX-kernel.gz --ramdisk newkernelblob.LNX-ramdisk.cpio.gz -o newkernelblob.LNX
6. re-created blob using blobpack
Code:
./blobpack kernelblob.HEADER boot_blob LNX newkernelblob.LNX
Example provided by RaYmAn
Code:
./blobpack blobname.HEADER outputfile LNX boot.img
Then I try to flash the new boot_blob but after I reboot it just gets stuck on the ASUS screen...
Thanks for taking the time to read this and help me!!!! Hope this will help others
Just to note:: Even if I do not make changes to init.rc it still does not boot which tells me it might have something to do with the way I'm repacking the blob..... Thanks again for anyones help!!!
Anyone?????
trying to keep the thread alive.... I've tried with the offical blob too. No luck!
I am running ubuntu 64-bit with jdk installed!
The problem is the fact that you pass a cmdline to the mkbootimg command.
On most tegra2 based devices, the cmdline is passed by the bootloader UNLESS the boot.img has a cmdline. Your cmdline is obviously wrong for a tegra2 device, so it never boots.

I'm trying to boot my Nexus 10 with your linux-kvm-arm kernel version 3.13...

Hello to everyone,
I'm trying to boot my Nexus 10 with another kind of kernel version,because I'm not interested to use the Android kernel,but the Ubuntu pure kernel. I've chosen to use the linux-kvm-arm kernel version 3.13 :
These are the commands that I have used :
git clone git://github.com/virtualopensystems/linux-kvm-arm.git
cd linux-kvm-arm
git checkout origin/chromebook-3.13 -b chromebook-3.13
curl http://www.virtualopensystems.com/downloads/guides/kvm_on_chromebook/config > .config
and then I've added these lines to the .config file :
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ASHMEM=y
CONFIG_ANDROID_LOGGER=y
CONFIG_ANDROID_PERSISTENT_RAM=y
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_TIMED_OUTPUT=y
CONFIG_ANDROID_TIMED_GPIO is not set
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
CONFIG_ANDROID_SWITCH is not set
CONFIG_ANDROID_INTF_ALARM is not set
CONFIG_FB_TILEBLITTING=y
CONFIG_PHONE is not set
CONFIG_USB_WPAN_HCD is not set
CONFIG_WIMAX_GDM72XX is not set
CONFIG_ARM_PLATFORM_DEVICES=y
CONFIG_ARM_CHROMEOS_FIRMWARE=y
CONFIG_CHROMEOS=y
CONFIG_CHROMEOS_VBC_BLK=y
CONFIG_CHROMEOS_VBC_EC=y
CONFIG_CHROMEOS_RAMOOPS_RAM_START=0x41f00000
CONFIG_CHROMEOS_RAMOOPS_RAM_SIZE=0x00100000
CONFIG_CHROMEOS_RAMOOPS_RECORD_SIZE=0x00020000
CONFIG_CHROMEOS_RAMOOPS_DUMP_OOPS=0x1
CONFIG_CLKDEV_LOOKUP=y
and then I did :
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make uImage dtbs
from here I've followed the tutorial that I've found here :
http://forum.xda-developers.com/showthread.php?t=1981788
and here :
http://forum.xda-developers.com/showthread.php?t=1981788&page=2
mkdir -p newkernel
cd newkernel
wget -c https://dl.google.com/dl/android/aosp/mantaray-kot49h-factory-174ba74f.tgz
tar xvzf mantaray-kot49h-factory-174ba74f.tgz
cd mantaray-kot49h
unzip image-mantaray-kot49h.zip
wget -c http://android-serialport-api.googlecode.com/files/getramdisk.py
chmod +x getramdisk.py
./getramdisk.py boot.img --> ramdisk.img
wget -c http://android-serialport-api.googlecode.com/files/android_bootimg_tools.tar.gz
tar xvf android_bootimg_tools.tar.gz
./mkbootimg --kernel ../../linux-kvm-arm/arch/arm/boot/zImage --ramdisk ramdisk.img --cmdline bootimg.cfg -o new-boot.img
fastboot flash boot new-boot.img
I think that something is wrong here,because it is not able to boot....I see a black screen and nothing else happens...
Hi,
probably too simple, but:
How does your .config look?
Did the curl actually work? (I ask because I tried your URL and it didn't work for me).
Did you actually compile a guest kernel too and boot it?
Special ChromeOS suupport does not exist in that branch.
Keep up the work, if you succeed booting linux, I got a prize for you.
Don't take it wrong, I'm just too bored of the tablet as it is now.
Wejgomi

[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!

How can I compile the Kernel of the Meizu Pro 5?

Hi,
I have a Meizu Pro 5 Ubuntu Edition, and I try to Compile the Meizu Pro 5 Kernel from here: github.com/meizuosc/m576 using the Compiler from here: android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
I compiled the Kernel using thr following commands:
Code:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- pro5_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android-
It did compile, and I got a arch/arm64/boot/Image
Then, I tried to replace the current kernel on my phone with the new one. I copied the partition bootimg from my Phone using dd, extracted the files zImage, bootimg.cfg and initrd.img using the command "abootimg -x bootimg.img", removed the line "bootsize" from the bootimg.cfg, and created, flashed and started a new bootimg.img using the following commands:
Code:
abootimg --create bootimg.img -f bootimg.cfg -k zImage -r initrd.img
fastboot flash recovery bootimg.img
fastboot oem reboot recovery
However, the Phone just froze on the Meizu splash screen. Am I doing something wrong?
PS: If I recreate the bootimg.img using the original Kernel, the Phone starts normally.

Categories

Resources