only for eXperienced Users - need help please ! - Miscellaneous Android Development

hi there
i need some help
if someone could pack these for me it will be great.
couse i can not do it by my self.
boot.img-kernel and ramdisk-new.gz
here is the unpacked boot.img
http://www.mediafire.com/?njygqtmnypx7t8l
someone, anybody please pack them if you could with these values
BOARD_KERNEL_CMDLINE no command line just kernel and page
---------------------------------------------------
BOARD_KERNEL_BASE ------> ffff8000 <------
BOARD_PAGE_SIZE ------> 3270696 <------
---------------------------------------------------
i could not pack these values 3270696
it says page size error
my command line
./mkbootimg --kernel boot.img-kernel --ramdisk ramdisk-new.gz --base 0xffff8000 --pagesize 3270696 -o boot_new.img

Related

How to know the base of a android device

./mkbootimg --base 0x48000000 --cmdline 'console=-ttyHSL3 androidboot.hardware=holiday' --kernel recovery.img-kernel.gz --ramdisk ramdisk_recovery-edited.gz -o new_recovery.img
How to know the base of a android device

[9001] Kernel - Extracting initrd.img from zImage and package again

Disclaimer: Do only use this information if you know what you're doing!
PATH=$PATH:/home/markus/android/sdk/platform-tools
Get kernel from phone:
adb shell
su
dd if=/dev/block/mmcblk0p8 of=/sdcard/external_sd/stockboot.img
Exit adb shell
adb pull /sdcard/external_sd/stockboot.img
Separate the zImage from the ramdisk (see below for abootimg):
abootimg -x stockboot.img
unpacks the archive and copies contents to working directory:
gunzip -c initrd.img | cpio -i
Do your edits, e.g. default.prop, add:
debug.performance.tuning=1
video.accelerate.hw=1
windowsmgr.max_events_per_sec=150
--> move all files to new folder, cd into this folder:
repacks files from working directory into an archive (MAKE SURE NO OTHER FILES ARE IN THE WORKING DIRECTORY!!)
find . | cpio -o -H newc | gzip > ../myinitrd.img
New boot.img:
./mkbootimg --kernel zImage --ramdisk myinitrd.img --cmdline "console=null androidboot.hardware=qcom androidboot.emmc=true hw=6" -o myBuiltBoot.img --base 0x00400000 --pagesize 4096
You can also use abootimg to create your new .img file, it has an easier syntax as it exports the commandline to a .cfg file and you can use that while creating the package.
Push your new kernel.img to the phone:
adb push myBuiltBoot.img /sdcard/external_sd/myBuiltBoot.img
Write kernel to kernel-partition in phone:
adb shell
su
dd if=/sdcard/external_sd/myBuiltBoot.img of=/dev/block/mmcblk0p8
adb reboot
< pray >
Sources:
http://forums.androidcentral.com/lg...ense-back-up-your-phone-without-nandroid.html
http://forum.xda-developers.com/showthread.php?t=1227269
http://forum.xda-developers.com/showthread.php?t=1292557
Also quite handy: http://packages.debian.org/de/sid/abootimg
wouldnt just editing build.prop in /system without touching kernel do the same job? ^_^
Yep. I just wanted to describe the whole process of extracting and packing the needed files. The edit was just an example. And in fact, i made a typo, it's called default.prop.

What base/pagesize parameters to use for mkbootimg?

I want to mod my stock boot.img for init.d support, but I'm not sure what "base" and "pagesize" parameters to use with mkbootimg. Can anyone help me out?
See here lines 37 and 38
imnuts said:
See here lines 37 and 38
Click to expand...
Click to collapse
Thanks! So, these settings are specific to the kernel. I see that for CM kernel, I would use:
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_BASE := 0x40000000
I was also trying to modify the stock boot.img for my device (p3110) and I came across a tool called "unmkbootimg" found here:
http://forum.xda-developers.com/showthread.php?t=1877807
When I use this new tool to extract the stock boot.img, I get this:
mkbootimg --kernel kernel.gz --ramdisk initramfs.cpio.gz --base 0x80000000 --cmdline 'console=ttyO2,115200n8 mem=1024M androidboot.console=ttyO2 vram=20M omapfb.vram=0:16M androidboot.carrier=wifi' -o new_boot.img
When I use the tool to extract the CM10 boot.img, I get this:
mkbootimg --kernel kernel.gz --ramdisk initramfs.cpio.gz --base 0x40000000 --pagesize 4096 -o new_boot.img
cool.

[HELP] 4.2.2 correct address

Hi!
What is the correct line to generate a kernel for 4.2.2?
mkbootimg --kernel zImage --ramdisk ramdisk.gz --base 0x80600000 --pagesize 2048 --ramdiskaddr 0x81ะก08100 --cmdline cmdline.txt -o boot-new_4_2_2.img - bootloop
mkbootimg --kernel zImage --ramdisk ramdisk.gz --base 0x80600000 --pagesize 2048 --ramdiskaddr 0x80C08100 --cmdline cmdline.txt -o boot-new_4_2_2.img - bootloop
or
mkbootimg --kernel zImage --ramdisk ramdisk.gz --base 0x80600000 --pagesize 2048 --ramdiskaddr 0x80C08000 --cmdline cmdline.txt -o boot-new_4_2_2.img
http://blog.djodjo.org/?p=536
This should help you see the offset address from the ramdisk. Or point you in the right direction.
Sent from my C525c using XDA Premium 4 mobile app

[Q] boot.img creation dt.img problem

Recently I tried to build kernel from source. All went pretty good, kernel works but only with old pre-build dt.img which comes with the boot.img which I use as a base.
To collect dt.img i used compiled from source
gitlab.com/Thecrazyskull/oneplus2/raw/652861ab053df83c61e4c8d4807a52598703a5e6/dtbTool/dtbtool.c
Code:
./dtbTool -s 4096 -o boot/dt.img -p kernel-out/scripts/dtc/ kernel-out/arch/arm64/boot/dts/
or mkqcdtbootimg(allow to specify dtb dir) from sony xperia
To make image I use github.com/luckasfb/mkbootimg-worked-mtk
Code:
./mkbootimg --kernel Image --ramdisk boot.img-ramdisk.gz --cmdline "console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 boot_cpus=0-5 ramoops_memreserve=2M androidboot.selinux=permissive" --base 0 --pagesize 4096 --dt dt.img --ramdisk_offset 01000000 --tags_offset 00000100 -o newboot.img
So, the question, what am I doing wrong?
Use the dtbTool found here https://source.codeaurora.org/quic/kernel/skales/tree/
git clone git://codeaurora.org/quic/kernel/skales
Click to expand...
Click to collapse
I use it in my kernel build helper and it works.
Cozzmy13 said:
Use the dtbTool found here https://source.codeaurora.org/quic/kernel/skales/tree/
I use it in my kernel build helper and it works.
Click to expand...
Click to collapse
Thanks a lot! It worked! Problem solved.
can I use this tool for qualcomm and exynos (samsung) devices?

Categories

Resources