How To Burn your own kernel on SM-G900H: - Galaxy S 5 General

Preliminary requirements:
1. Phone rooted.
2. CWM recovery installed.
3. Full backup created using CWM.
Actions:
1. Download the mkbootimg tools.
2. Get the current boot.img by using:
adb pull sdcard/clockworkmod/backup/xxx/boot.img
if sdcard symlink does not exist grab it from: /data/media/0/clockworkmod/backup/xxx/boot.img
3. use umkbootimg to extract boot.img:
./umkbootimg boot.img
you suppose to get two files:
1. zImage - kernel
2. initramfs.cpio.gz - ramdisk filesystem
4. build samsung kernel with dtb support:
4.1. Download kernel version from samsung website.
4.2 Do make exynos5422-k3g_00_defconfig
4.3 manually edit the .config created by adding the following lines:
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos5422-k3g_eur_open_10"
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
4.4 run: make -j8
5. Take the build product from:
arch/arm/boot/zImage-dtb and copy it to the folder where you extracted the boot.img
6. Run the following to create a new boot.img:
./mkbootimg --kernel zImage-dtb --ramdisk initramfs.cpio.gz -o new_boot.img
7. Push the new_boot.img to the sdcard:
adb push new_boot.img sdcard/
8. Get into adb shell and run from there:
su -c dd if=/sdcard/new_boot.img of=/dev/block/platform/12200000.dwmmc0/by-name/BOOT
9. Get out of adb shell, and run adb reboot.
10. Wait for the phone to upload.. And you've get your own kenrel running on Samsung galaxy s5 sm-g900h!!

Related

How to compile Kernel

What you need:
1) Download file in attachment
2) Have a working adb-(windows|mac|linux)
3) A linux os (i used debian!)
I take some scripts (like H-repack and H-unpak from http://wiki.cyanogenmod.com)
I get arm compiler from google git
Let's start!
BUILD KERNEL
1) Download from here http://developer.htc.com/ legend's kernel source
2) Decompress, modify and configure it! (you could use the default .config i extracted from my running kernel)
3) Copy boot.img into the AndroidKernelBuilder folder
4) Enter in AndroidKernelBuilder and run my script
./compiler.sh /path/of/the/kernel/source/
5) wait
Now you have your own kernel repacked and ready to be flashed!
INSTALL
1) copy boot_repacked.img to /sdcard/
2) reboot in recovery
3) adb-linux shell
(from now inside the shell)
# mount /sdcard/
# cat /dev/zero > /dev/mtd/mtd2
# flash_image boot /sdcard/boot_repacked.img
# reboot
Now keep all the fingers you can crossed! (and sorry for all the errors i may have done)
http://www.4shared.com/file/dKJH5kJP/AndroidKernelBuildertar.html
You are the man!
In the week end i'll try to compile by myself.

Working Steps For New Boot Animation & Now AT&T Boot Logo[Captivate/Galaxy S]

These steps worked for me everytime when pushing a new boot animation
**Stay booted into your ROM, no need to boot into RECOVERY**
Make sure dev is enabled under Settings>Applications
Then run SuperOneClickv1.6.5-ShortFuse
Download the Android SDK and place on your C:\
Rename folder to Android
1. Copy the NEW bootanimation.zip of your choice in SDK Folder
2. Open up CMD
3. cd C:\AndroidSDK\tools (or were ever you SDK files are, in v10 tools is called platform-tools)
4. adb remount
The filesystem is mounted read only. You need to mount it read/write.
5. adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
6. adb push bootanimation.zip /system/media/bootanimation.zip
7. adb push bootanimation.zip /data/local/bootanimation.zip
To return to read only,
8. adb shell mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system
9. Reboot and there you go (adb reboot)
Steps above found @ http://forum.xda-developers.com/archive/index.php/t-736412.html
I pushed the new honeycomb boot animation attached to this post, it came from the Phoenix Ultimate ROM, im lovin it!
+++++NEW+++++
CHANGING AT&T BOOT LOGO!!!! (INITIAL STATIC SCREEN)
This replaces the AT&T boot logo static that is displayed with a customized logo.
Download the attachment file logo_ATNT.jpg This is what your AT&T boot logo is gonna be.. You can edit this, add your own.. But make sure that the name stays the same.
Using ADB tools from PC,
1. Put your logo_ATNT.jpg in the folder where adb.exe exists.
2. In command prompt, adb devices to make sure your phone is connected.
3. adb push logo_ATNT.jpg /mnt/.lfs
4. adb reboot
AND THAT'S IT!! You'll now have your own customized AT&T logo on your phone!!!
Credit to Darky from post @ http://forum.xda-developers.com/showpost.php?p=11137470&postcount=1

[TUTORIAL] Self-assembly of Android Firmwares

I just saw a tutorial in 4PDA by R0iz and wanted to share it here!
The link to the original post translated:
http://tinyurl.com/self-assembly-androidOS
Extract the files *. img
To extract system.img, used unyaffs (http://code.google.com/p/unyaffs/)
I have compiled under Ubuntu 64. With Unyaffs can only be extracted system.img.
To extract boot.img use extract-kernel.pl and extract-ramdisk.pl
# extract-kernel.pl boot.img
# extract-ramdisk.pl boot.img
Click to expand...
Click to collapse
Rebuilding boot.img
After extracting boot.img with the enclosed extract-*. pl
In order to collect boot.img with Custom kernel in the same folder run:
# mkbootfs boot.img-ramdisk | gzip > ramdisk-boot
# mkbootimg --kernel boot.img-kernel --ramdisk ramdisk-boot --cmdline "no_console_suspend=1 console=null" -o newBoot.img --base 0x19200000
Click to expand...
Click to collapse
Rebuilding system.img
At first glance it seems that you can simply mount the image and format it with YAFFS, but it's not because, as SPL Hero does not allow flash system.img directly.
You must use the format update.zip packages for this. (читайте ниже) (See below)
Write update.zip quite simple really. For example, to add the package test.apk in your rum:
- Create an empty folder <workdir>
- Create a folder structure for test.apk (<workdir> / system / app) and copy test.apk
- Create a folder structure for the update-script (<workdir> / META-INF/com/google/android)
- Edit <workdir> / META-INF/com/google/android/update-script
- Insert the following:
show_progress 0.1 0 show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM: copy_dir PACKAGE: system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app set_perm_recursive 0 0 0755 0644 SYSTEM: app
show_progress 0.1 10 show_progress 0.1 10
- Pack the contents <workdir> in zip (not the folder itself <workdir>, only its contents)
Now you have to sign a zip file. Testsign.zip download and copy it to your <SDK> / tools.
Unzip it there, thus creating a sub-folder sign with a file testsign. in it.
Then in the folder <workdir>, run this command:
java-classpath "<SDK> / tools / sign / testsign.jar" testsign file.zip file-signed.zip
Everything is now ready for your update.zip pouring into the apparatus by a modified recovery.
Click to expand...
Click to collapse
Change. Apk package
apk can just unpack an archive, change what you need and pack it back. But in the end you have to sign it as well as update.zip packages.
ODEX files
- What is it? Answer
- How to get rid of them?
For deodex ODEX files, use this howto
Then you can create classes.dex file by running smali from your "out". Then rename it to classes.dex and add it to apk.
- How to create them?
Use dexopt-wrapper on the device.
Click to expand...
Click to collapse
Porting ROM with other devices.
Well, this part is simple smile_good.gif
- Extract system.img
- Extract boot.img
- Replace boot.img-kernel of the original Roma HTC Hero.
- Rebuild boot.img
- Collect update.zip (see how it's done in any Custom rum for Hero)
- Sign and flash.
Device should start, and even be able to call, but probably will not work WiFi, BT, trackball.
Androsign script (Linux)
Androsign allows you to quickly sign the zip and apk. Just put it in <SDK> / tools, then CHMOD + X. If the path to the folder \ tools registered in the PATH, then you can run this script by typing:
androsign /dev/folder1/folder2/update.zip
He will Update-signed.zip (or App-signed.apk, etc.) in the same folder where the original file.
THANKS ARE WELCOMED!
Can we actually use this to port Sense or MIUI ?
this explains part of the process, the steps to do fo that purpose extracting and rebuilding but of course not about the code. i've heard MIUI is complex than sense
Most of us know this allready but nice to see it being said instead of learning the hard way
Sent from my GT540 using XDA Premium App

[HOWTO] build Stock Kernel

1) Backup the current boot image
> adb shell "dd if=/dev/block/mmcblk0p22 of=/sdcard/originalBoot.img"
> adb pull /sdcard/originalBoot.img
2) Get the stock kernel sources from htcdev.com.
3) Go into the top kernel directory and pull the kernel config file from the device
> adb pull /proc/config.gz
> cat config.gz | gunzip > .config
4) Build kernel
> make ARCH=arm CROSS_COMPILE="path-to-cross-compiler"
5) The resulting kernel is in arch/arm/boot/zImage
6) Use the following command to pack kernel and ramdisk into a boot image
> mkbootimg --kernel My_zImage --ramdisk My_ramdisk.gz --cmdline "no_console_suspend=1" --base 14400000 --output MyBoot.img
7) Install boot image
> adb reboot bootloader
> fastboot flash boot MyBoot.img
> fastboot reboot
Here you can download a ramdisk for the Sensation XL
http://www.eidelen.ch/android/sensationXL-ramdisk.gz
If the device doesn't start anymore, go into the fastboot mode and install the backup of the original boot image.
> fastboot flash boot originalBoot.img
Good Luck!
Building Modules
Building:
> make ARCH=arm CROSS_COMPILE="path-to-cross-compiler" modules
Installing:
> adb shell "mount -o remount,rw -t ext4 /dev/block/mmcblk0p25 /system"
> adb push drivers/net/wireless/bcm4330b2/bcm4330.ko /system/lib/modules/
> adb push drivers/net/kineto_gan.ko /system/lib/modules/
Note: If you don't have default root shell session (ro.secure=0 in file default.prop), you have to do the installing steps manually:
> adb shell
> su
> mount -o remount,rw -t ext4 /dev/block/mmcblk0p25 /system
> cp bcm4330.ko /system/lib/modules/
> ...
eidelen said:
1) Backup the current boot image
> adb shell "dd if=/dev/block/mmcblk0p22 of=/sdcard/originalBoot.img"
> adb pull /sdcard/originalBoot.img
2) Get the stock kernel sources from htcdev.com.
3) Go into the top kernel directory and pull the kernel config file from the device
> adb pull /proc/config.gz
> cat config.gz | gunzip > .config
4) Build kernel
> make ARCH=arm CROSS_COMPILE="path-to-cross-compiler"
5) The resulting kernel is in arch/arm/boot/zImage
6) Use the following command to pack kernel and ramdisk into a boot image
> mkbootimg --kernel My_zImage --ramdisk My_ramdisk.gz --cmdline "no_console_suspend=1" --base 14400000 --output MyBoot.img
7) Install boot image
> adb reboot bootloader
> fastboot flash boot MyBoot.img
> fastboot reboot
Here you can download a ramdisk for the Sensation XL
http://www.eidelen.ch/android/sensationXL-ramdisk.gz
If the device doesn't start anymore, go into the fastboot mode and install the backup of the original boot image.
> fastboot flash boot originalBoot.img
Good Luck!
Click to expand...
Click to collapse
If only did the backup bit, is it same as nandroid backup?
"dd if=/dev/block/mmcblk0p22 of=/sdcard/originalBoot.img" just backups the boot image (kernel), whereas nandroid backups probably also the system and data.
With above command, you could also backup the whole system
"dd if=/dev/block/mmcblk0p25 of=/sdcard/originalSystem.img".
You can get a list of partitions and their meaning with
> cat /proc/emmc (on some devices its mmc)
eidelen said:
"dd if=/dev/block/mmcblk0p22 of=/sdcard/originalBoot.img" just backups the boot image (kernel), whereas nandroid backups probably also the system and data.
With above command, you could also backup the whole system
"dd if=/dev/block/mmcblk0p25 of=/sdcard/originalSystem.img".
You can get a list of partitions and their meaning with
> cat /proc/emmc (on some devices its mmc)
Click to expand...
Click to collapse
So if I do system image backup will it also include backup of boot image as well or I need to do them separately. Thank you for your help.
You need to do them separately, since boot image and system are on different partitions.
I could make you a flashable.zip from Stock kernel..... Easy for all to use
DutchDanny said:
I could make you a flashable.zip from Stock kernel..... Easy for all to use
Click to expand...
Click to collapse
please make me one pls
DutchDanny said:
I could make you a flashable.zip from Stock kernel..... Easy for all to use
Click to expand...
Click to collapse
Please make this for all
I have a ridiculous question
if have stock kernel, can download any update from htc ?!
Or else the difference is ?!
Please explain what is difference stock kernel and custom kernel ?!
DutchDanny said:
I could make you a flashable.zip from Stock kernel..... Easy for all to use
Click to expand...
Click to collapse
It might be good for those which don't backup the kernel.
Anyway, this is about development and I strongly hope, that nobody is wasting time by installing his kernels with flashable zips when there exitsts 'fastboot'. One would get bloody fingers
nader1450 said:
Please make this for all
I have a ridiculous question
if have stock kernel, can download any update from htc ?!
Or else the difference is ?!
Please explain what is difference stock kernel and custom kernel ?!
Click to expand...
Click to collapse
The stock kernel is released by the manufacturer. The mobile is delivered with that kernel. A custom kernel may offer additional things like overclocking, etc. You have to inform you about the differences of that particular kernel.
If you have a custom kernel installed, a HTC update might install again the stock kernel.
I have made a flashable zip of the STOCK kernel
FIND IT HERE

[GUIDE] How to Create Custom Boot Logo (Splash Screen) for Lenovo Vibe Z2 Pro

Note:
This is not bootanimation, this is the splash screen (the 'Lenovo' boot logo which is displayed when device is switched ON)
This is for Lenovo Vibe Z2 Pro Only..
For other devices, please send me your splash.img so that I can create a tool for you too.
Requirements:
1. Rooted Lenovo Vibe Z2 Pro Plus (any ROM)
2. Optional: Terminal Emulator app or Custom Recovery or atleast working fastboot in computer
3. You're proceeding at your own risk.
STEPS to create splash.img:
1. Make sure you have a picture in PNG format with resolution exactly 1440x2560px.
2. Download & Extract this: Vibe_Z2_Pro_Splash_Maker.zip
3. Now rename your picture as logo.png & replace it inside "pics" folder of the extracted folder.
4. Finally, run the 'CREATE_LOGO.bat' to create splash.img and flashable zip file, which you can find inside the "output" folder after completion.
STEPS to flash splash.img:
Choose any one easy method:
a. To flash from recovery:
Transfer the flashable_splash.zip to your device and flash from TWRP or CWM or Philz or any other custom recovery.
b. To flash from Terminal Emulator:
Transfer the splash.img to your device's Internal Storage, Open Terminal Emulator & enter the following to flash it:
Code:
su
dd if=/sdcard/splash.img of=/dev/block/bootdevice/by-name/splash
c. To flash from Fastboot mode:
Code:
fastboot flash splash splash.img
Note:
Incase something goes wrong or device doesn't bootup, flash the stock splash.img from custom recovery or fastboot.
Hit the Thanks :good: button if it worked for you
You're welcome to post the splash images that you created..
I am on Linux so i couldn't use your .bat script, so I just did it manually, and it works
In case anyone wants to try this on linux, here's what I've done:
First install ffmpeg, in my case it was
Code:
sudo apt install ffmpeg
Then create the splash.raw (out of 1440x2560 splash.png)
Code:
ffmpeg -i splash.png -f rawvideo -vcodec rawvideo -pix_fmt bgr24 -y splash.raw
Append it to the header.img
Code:
cat 1440x2560_header.img splash.raw > splash.img
And finally, flash via fastboot
Code:
sudo fastboot flash splash splash.img
I just updated the Lenovo & powered by android logos, take a look.
https://imgur.com/a/f0xma
You can download it here: https://mega.nz/#!wM5lTRTb!k8FYZScVBeEJsd9I8gVMWCiLcoFXwjPsGRaw8yaZsJY

Categories

Resources