Compressing Recovery? - Galaxy Note II, Galaxy S III Developer Discussion

Well.. My recovery.img is 10.4MB when I build it. As you know, our recovery partition is not that big. How do I compress it/Make it fit?

compress kernel with lzma and ramdisk with lzma
Sent from my Xperia T using XDA Free mobile app

Related

[MOD] 10MB RAM Increase kernels/boot.img for Dream and Magic 32B[01/13]

The original thread troubleshooting and creating this patch can be found here
Kernel source for the boot.img I post here can be found here. The patch is here.
Discussion on whether to include this in future Cyanogen Mods can be found here
By modifying the memory map in the kernel we are able to increase the amount of usable linux memory by 10MB bringing the mapped LINUX ram to 110MB (minus kernel used memory making it around 107MB).
The patch moves the ram console and framebuffer memory to SMI on chip and changes the GPU1 ram from 8MB to 0MB. GPU0 still has 7MB mapped in SMI so only 3D intensive applications and games seem to suffer after this patch. The benefit is more RAM memory for linux to use. Several people have reported system performance improvements at the sacrifice of 3D graphics applications.
Note: you will not see extra ram under in recovery since it uses it's own (unpatched) kernel to boot.
CM 4.2.14.1 CFS boot.img
MD5SUM fd12d3635858d1da00e2590566b73564
http://www.mediafire.com/?aydmodmkdqk
http://www.sendspace.com/file/uqcy2e
CM 4.2.13 CFS boot.img by pershoot
http://rapidshare.com/files/334987707/boot-4213-dp_mem.zip
http://www.sendspace.com/file/9dvmvi
CM 4.2.13 CFS boot.img
MD5SUM be744f56306f1733ccabe48d4c8c974e
http://www.mediafire.com/?1hnzmnmfw2j
http://www.sendspace.com/file/t0sdkx
CM 4.2.13 BFS-313 boot.img
MD5SUM a82f08a68ec393f0d8bee416588d5b16
http://www.mediafire.com/?xwkeoidw52z
http://www.sendspace.com/file/2nmh6a
CM 4.2.12.2 CFS boot.img
MD5SUM 27601954b73c857ff6b70d112667ca69
http://www.mediafire.com/?ouzmzygguxz
CM 4.2.12.2 BFS-313 boot.img
MD5SUM c8d6a1aa4ad853406b3dd4bb683e043d
http://www.mediafire.com/?5noz0njajiz
CM 4.2.11.1 BFS-313 boot.img with ext fix
MD5SUM 70a1ce95a9017de62d7276a84e58e804
http://www.mediafire.com/?nodemj2xnet
CM 4.2.11.1 BFS-313 boot.img
MD5SUM 7fe910461d09d84b1a856de926e29311
http://www.mediafire.com/?z5tnmnmg4rq
CM 4.2.11.1 CFS boot.img
MD5SUM a5b229fc4704b8dbb1c12af170fd95e1
http://www.mediafire.com/?yyxzmyewjtq
CM 4.2.9.1 BFS-311 boot.img
MD5SUM 0582eb144c761d46fd097960ab9ce2c5
http://www.mediafire.com/?djvmmkozzkz
CM 4.2.9.1 CFS boot.img
MD5SUM 45fee1ab029af69a521ddae2f7c36f91
http://www.mediafire.com/?nm2mnmdyiwu
CM 4.2.9 CFS boot.img by dumfuq
http://www.mediafire.com/?zmdmhjmyzjy
CM 4.2.8 BFS-311 boot.img
http://www.mediafire.com/?fm1yngfm4fz
MD5SUM 72e990cf1bdeb9cc2e2c61f658fbc0dd
CM 4.2.8 CFS boot.img
http://www.mediafire.com/?xlwwmlzny2n
MD5SUM 9157e804c101bc41e4d4ce93f4466543
CM 4.2.7.1 BFS-311 boot.img
http://www.mediafire.com/?2mjywndydz1
MD5SUM 6a19bb778e912ef2ec8d53a2cbd4305e
CM 4.2.7.1 CFS boot.img by dwang
http://drop.io/f2hwhjz#
CM 4.2.6 BFS-311 boot.img
http://www.mediafire.com/?djmrreijnzk
MD5SUM bd4fc8d8bb25f326bcfa08fa30c1199d
CM 4.2.6 CFS boot.img
http://www.mediafire.com/?uzbnnmz124j
MD5SUM a7f8d6882abc9d583abe1aff46f8656b
CM 4.2.6 CFS boot.img by dumfuq
http://www.mediafire.com/?2gtjwngtydn
CM 4.2.5 CFS boot.img by dwang
http://drop.io/ga5vgpk#
CM 4.2.4 CFS boot.img
http://www.mediafire.com/?ndmjkk2zmga
MD5SUM 9672701c93db85da3e98755a7c12eb3d
CM 4.2.3.1 CFS boot.img
http://www.mediafire.com/?tzdnyjyg4iq
MD5SUM e874ada3f78fb709814e7e65ebc1e7f3
CM 4.2.1 BFS-304 boot.img
http://www.mediafire.com/?2znaudyduy3
MD5SUM 8c0e51737dc19ed192572b2f51c99bca
CM 4.2.1 CFS boot.img
http://www.mediafire.com/?tm5jbqv1ouf
MD5SUM eb7107ebb2025ce517b1af308de2fb28
CM 4.1.9999 BFS-304 boot.img
http://www.mediafire.com/?emeyhmzmqiz
MD5SUM c3f76045c7737d99f50518cb912f0f08
CM 4.1.999 BFS-303 boot.img packed by statickaos
https://home.statickaos.net/public/boot-new.img
CM 4.1.99 BFS-303 boot.img
http://www.mediafire.com/?nnk2mtiuioi
MD5SUM 8b11ace91c745138cde58b4bd1d7848a
CM 4.1.99 BFS-302 boot.img
http://www.mediafire.com/?ndwmmw2ti2y
MD5SUM 80cda08de15da8af824ffcb665c21c2f
CM 4.1.99 BFS-300 boot.img
http://www.mediafire.com/?mtlujofbkml
MD5SUM bc8c356d1b97c7c0ebc46c50a03b9eaa
CM 4.1.11.1 BFS-302 boot.img
MD5SUM 9d7f189db371ac3cc8ac7845d513be50
http://www.mediafire.com/?emzyyk5zwve
CM 4.1.11.1 BFS-300 boot.img
MD5SUM ab8978a92436f600ecd05fbf7ddbf027
http://www.mediafire.com/?yztwczjnzgo
CM 4.1.11.1 kernel boot.img
MD5SUM 9e49829ad466b2f3adf9402bcba9c9c0
http://www.mediafire.com/?dvwmwyit4yn
http://drop.io/mempatch
CM 4.1.11.1 kernel with CFS instead of BFS boot.img (by dumfuq only for Dream)
http://www.mediafire.com/?nzyg1f4jniu
CM 4.0.4 kernel boot.img (by dumfuq only for Dream)
http://www.mediafire.com/?12xboktlldj
HTC sourced kernel (by cyrowski and jac)
http://forum.xda-developers.com/showthread.php?t=534479
Stock Android 1.6 Kernel (by dwang)
http://forum.xda-developers.com/showthread.php?t=566676
Installation Instructions where boot.img is the name of the boot.img you download
As suggested by IConrad01 it is advisable to test a new boot.img before flashing it with:
Code:
fastboot boot boot.img
Make a nandroid backup before installing or download the stock boot.img to go back.
Fastboot Install
Code:
fastboot flash boot boot.img
fastboot reboot
Terminal Emulator Install
Copy the boot.img to the root of your sdcard. Then issue these commands from the terminal emulator.
Code:
su
flash_image boot /sdcard/boot.img
reboot
Check Linux Memory from Terminal Emulator
free or cat /proc/meminfo
Check Linux Memory from ADB
adb shell free or adb shell cat /proc/meminfo
Obviously, there is still room for improvement with this patch. Currently working on getting GPU1 RAM moved to SMI successfully and potentially accessing another 18MB of RAM if the specs on EBI memory are correct (128MB). Any ideas?
Cheers, i tried one of the earlier patches and seemed to suffer from the display dieing.
This (flashed from recovery comsole) so far seems far more stable.
Its 107.5 megs right? Not 110 megs?
dwang said:
Its 107.5 megs right? Not 110 megs?
Click to expand...
Click to collapse
I, also, get 107.5 instead of 110. either way it has been running nicely for me.
david1171 said:
I, also, get 107.5 instead of 110. either way it has been running nicely for me.
Click to expand...
Click to collapse
actually if you do the conversion from kilobytes, its roughly 105MB, but who's counting anyways? lol.
thanks daproy for the boost
andonnguyen said:
actually if you do the conversion from kilobytes, its roughly 105MB, but who's counting anyways? lol.
thanks daproy for the boost
Click to expand...
Click to collapse
more=better, i have more then before; therefore, i am happy.
john has 2 apples; jill has 3 oranges; and bill has 4 stamps of acid, so the real question is, which 1 is your friend?
numbers are fun.
Great! I've been finding the patch for cm4.0.4 for a long time.
The performance improved is great but I just have 104mb ram......
Just reporting:
Code:
total used free
Mem: 107292 105836 1456
Swap: 30864 4356 26508
Total: 138156 110192 27964
Nice
Haven't flashed it yet, I'm just gonna monitor the behaviour for a while...
Thanks!!!!!
some of the winmo mods had camera hacks and programs to set the ram to different settings without flashing all the time. how hard would it be to create a program that flashes the files necessary with the simple clicking of no extra gpu or default. also can we look into pulling from other sources this way like wifi and camera.
I, also, get 107.5 instead of 110
Hi, did it fixed the problem with 3D games?
yukkio said:
Hi, did it fixed the problem with 3D games?
Click to expand...
Click to collapse
unfortunately no :<
Thanks daproy. Is this boot.img the same as in the original thread, or has the 4.1.11.1 version been modified further?
seems to work well
jokersax11 said:
some of the winmo mods had camera hacks and programs to set the ram to different settings without flashing all the time. how hard would it be to create a program that flashes the files necessary with the simple clicking of no extra gpu or default. also can we look into pulling from other sources this way like wifi and camera.
Click to expand...
Click to collapse
I don't think we'd be able to modify and recompile the kernel through an app on the phone.
will this work on the adp1 1.6? or only on the roms listed?
Wow. What an increase. I'm a pretty heavy user so I'll update if I have any issues on 4.1.11.1.
BEFORE:
C:\Users\Greg\Desktop>adb shell free
total used free shared buffers
Mem: 97900 8860 89040 0 64
Swap: 0 0 0
Total: 97900 8860 89040
C:\Users\Greg\Desktop>adb shell reboot bootloader
C:\Users\Greg\Desktop>fastboot flash boot bootmem.img
sending 'boot' (2002 KB)... OKAY
writing 'boot'... OKAY
C:\Users\Greg\Desktop>fastboot reboot
rebooting...
AFTER:
C:\Users\Greg\Desktop>adb shell
# free
free
total used free shared buffers
Mem: 107292 11876 95416 0 952
Swap: 0 0 0
Total: 107292 11876 95416
#
Well, there's discussion in the include-in-Cyanogen area (instigated mostly by me) that's pushing for the idea of inclusion.
There seems to be a few options that could be taken to make this work.
1) We could, rather than simply allocating the GPU1 to 0 RAM, allocate its RAM to shared memory rather than none at all. This would make its RAM-"space" available when 3D games are /not/ in use. I don't know how easy that would be; conceivably it could be as simple as mounting the GPU1 as /dev/shm. No idea there. (We'd need some way to unmount as /dev/shm whenever the GPU1 is called for 3d games, in order to prevent errors.)
2) We could reduce the original filespace sizes for both GPU0 and GPU1, and give them both dedicated /dev/shm devices; or, to even go a step further, somehow "nest" /dev/shm within /dev/block/ramzswap0, for those who have it. If we could do that while keeping the compress/decompress on the CPU rather than GPU side, this would probably greatly extend the available memory and even increase graphical performance of the device -- at, of course, the cost of battery life in the form of processor load. Frankly, I don't think using traditional swap would be a good idea at all here; while a GPU could withstand nanosecond delays in data, I suspect the latency of millisecond delays would be above the threshold for human observation.
3) We could simply keep the patch as is, and do an active mount/unmount call whenever the GPU0 gets overburdened. This would be the "cleanest" of the three solutions, but would also limit the total available memory whenever the 3D graphics load gets heavy. It might also require game/app programmers to be aware of this so they establish the proper calls, unless it can be done on the device-side of things.
It is worth noting, once again, that I am /not/ a programmer -- I have no idea how difficult what I'm suggesting here is.
CM 4.1.11.1 kernel boot.img
works on stock 1.6 just to let people know.
It also helps out with the browser not reloading so much
im not sure if i am doing this wrong but when i patched it and restart my phone...it just goes to a blank screen and stays there...

kernel compile issue

I'm working on a kernel for the Samsung Exhibit II. I used dsixda's Android Kitchen to rip the initramfs from the stock kernel, it looks good, and I can edit it and rejoin it to the stock zImage w/o problems. Boots fine.
When I compile the zImage from source, initramfs is apparently not making into the kernel.
Code:
Android 'magic' header not found at start of boot.img
Checking if it exists elsewhere ...
Warning: Android header not found in boot.img (unsupported format)
Kernel found at offset 24061976 in boot.img
Making folder BOOT-EXTRACTED ...
Extracting kernel ...
Error: zImage is empty!
Extracting ramdisk ...
Error: No ramdisk folder found!
However, initramfs is being found & generated by the kernel compile. In Kernel/usr:
3549184 Jan 25 16:02 initramfs_data.cpio
Click to expand...
Click to collapse
Dumping the contents of the cpio file show the expected initramfs.
Any help appreciated, thanks.
Me to.
Please help someone!
jocala said:
I'm working on a kernel for the Samsung Exhibit II. I used dsixda's Android Kitchen to rip the initramfs from the stock kernel, it looks good, and I can edit it and rejoin it to the stock zImage w/o problems. Boots fine.
When I compile the zImage from source, initramfs is apparently not making into the kernel.
Android 'magic' header not found at start of boot.img
Checking if it exists elsewhere ...
Warning: Android header not found in boot.img (unsupported format)
Kernel found at offset 24061976 in boot.img
Making folder BOOT-EXTRACTED ...
Extracting kernel ...
Error: zImage is empty!
Extracting ramdisk ...
Error: No ramdisk folder found!
However, initramfs is being found & generated by the kernel compile. In Kernel/usr:
Dumping the contents of the cpio file show the expected initramfs.
Any help appreciated, thanks.
Click to expand...
Click to collapse
You need to make sure you add location of initramfs to config file
:: LOVE MY HATERS :: DARKSIDE ::
where you add the location address of the file?

[Q] How to build CM7 kernel for desire S?

I compiled source from github.com/CyanogenMod/htc-kernel-msm7x30 using 4.5-Linaro toolchain. I get 1.993.460 bytes size zImage. Original zImage from CM7 build is 2.060.976 bytes size.
I tried fastboot boot with my image. My smartphone just vibrates a few times and goes back into bootloader.
What do I need to do to make this work?

How can I change initlogo.rle 800x480.

I can not change initlogo.rle 1.46MB in size taplet. initlogo.rle 1.46 MB (1,536,000 bytes)
I use photoshop & to565 size to 1.1MB, and placed in a modified fw.
It does not show up and jump. bootanimetion.
I need to be able to use initlogo.rle in other sizes.
Thank you.

[Q] [GT-P3100][Kernel] Compiled kernel does not boot!

Hi,
I'm trying to boot my galaxy tab2 7 with compiled kernel.
First, I downloaded kernel source from http://opensource.samsung.com.
I download GT-P3100_JB_Opensource_Update2.zip file and extract it.
To compile, I followed ketut.kumajaya's thread (http://forum.xda-developers.com/show....php?t=2086996)
I build only kernel, not other modules. Compile was done without problem.
And I extract boot.img from Stock ROM file downloaded from samsung-updates.com (http://samsung-updates.com/device/?id=GT-P3100).
Stock ROM version is P3100XXCLJ3 (that's my device's baseband version).
I unpacked boot.img and I got boot.img-kernel.gz and boot.img-ramdisk.cpio.gz.
(To make sure unpack/repack tool is working properly, I simply unpack stock boot.img and repack it. And the new boot.img was working properly. So I assume my unpack/repack tool have no problem).
So, I replace boot.img-kernel.gz with zImage and repack it.
But this time new boot image does not working (Device stuck in boot logo)
What did I done wrong? Any body help! I've been stuck with this for a week now...
(When stock ROM is flashed, Kernel version in device info is "3.0.31-595683"
You must compile pvrsrvkm kernel module as I mentioned in http://forum.xda-developers.com/showthread.php?t=1859227 and then you can use KK-Boot 0.5.x core as your flashable zip template (have PowerVR 3D driver binary inside). If you decide to keep the stock PowerVR binary, change:
#define PVRVERSION_BUILD 2166536
Click to expand...
Click to collapse
to
#define PVRVERSION_BUILD 2120756
Click to expand...
Click to collapse
and
#define PVRVERSION_BUILD_HI 216
#define PVRVERSION_BUILD_LO 6536
Click to expand...
Click to collapse
to
#define PVRVERSION_BUILD_HI 212
#define PVRVERSION_BUILD_LO 0756
Click to expand...
Click to collapse
in pvrversion.h
Do not forget to copy pvrsrvkm_sgx540_120.ko to /system/lib/modules (backup the stock modules first!)
For trouble free development, I recommend you to use GT-P3110_JB_Opensource.zip, apply all my kernel patch and use my android_espresso_omap4430_r04_blackhawk_defconfig as your kernel config file. Good luck!
necesriverua
ketut.kumajaya said:
You must compile pvrsrvkm kernel module as I mentioned in http://forum.xda-developers.com/showthread.php?t=1859227 and then you can use KK-Boot 0.5.x core as your flashable zip template (have PowerVR 3D driver binary inside). If you decide to keep the stock PowerVR binary, change:
to
and
to
in pvrversion.h
Do not forget to copy pvrsrvkm_sgx540_120.ko to /system/lib/modules (backup the stock modules first!)
For trouble free development, I recommend you to use GT-P3110_JB_Opensource.zip, apply all my kernel patch and use my android_espresso_omap4430_r04_blackhawk_defconfig as your kernel config file. Good luck!
Click to expand...
Click to collapse
Many thanx.
I really appreiciate it.
I will try this right away.
ketut.kumajaya said:
You must compile pvrsrvkm kernel module as I mentioned in http://forum.xda-developers.com/showthread.php?t=1859227 and then you can use KK-Boot 0.5.x core as your flashable zip template (have PowerVR 3D driver binary inside). If you decide to keep the stock PowerVR binary, change:
to
and
to
in pvrversion.h
Do not forget to copy pvrsrvkm_sgx540_120.ko to /system/lib/modules (backup the stock modules first!)
For trouble free development, I recommend you to use GT-P3110_JB_Opensource.zip, apply all my kernel patch and use my android_espresso_omap4430_r04_blackhawk_defconfig as your kernel config file. Good luck!
Click to expand...
Click to collapse
Dear ketut,
Because I'm behind firewall, I cannot download pvrsrvkm kernel source.
Frankly, I have very little knowledge about android system. so I'm not sure I understand your guide correctly..
What I've done is as follows:
1. Download GT-P3110_JB_Opensource
2. Apply your patch from http://forum.xda-developers.com/showthread.php?t=1859227
3. Modify PVRVERSION_BUILD and PVRVERSION_BUILD_HI and PVRVERSION_BUILD_LOW in drivers/gpu/pvr/pvrversion.h (kernel source)
4. Apply android_espresso_omap4430_r04_blackhawk_defconfig and Build (using arm-2010q1-202..)
5. Repack zImage with ramdisk.cpio.gz (extracted from stock rom file)
6. Replace boot.img in your kkboot-0.5.2-core-p31xx.zip with repacked boot.img
7. Apply new kkboot.zip in CWM and installation failed and aborted.
Am I totally in wrong direction? What am I missing here?
I sincerely ask your help.
(I found that when build kernel after your patch, additional module files (.ko) are generated.
Should I do something with that?)
cks1119 said:
Dear ketut,
Because I'm behind firewall, I cannot download pvrsrvkm kernel source.
Frankly, I have very little knowledge about android system. so I'm not sure I understand your guide correctly..
What I've done is as follows:
1. Download GT-P3110_JB_Opensource
Click to expand...
Click to collapse
Correct.
2. Apply your patch from http://forum.xda-developers.com/showthread.php?t=1859227
Click to expand...
Click to collapse
Correct, all my patch from 01-07.
3. Modify PVRVERSION_BUILD and PVRVERSION_BUILD_HI and PVRVERSION_BUILD_LOW in drivers/gpu/pvr/pvrversion.h (kernel source)
Click to expand...
Click to collapse
Incorrect, nothing to do with pvr driver inside the kernel source, it's useless. You can download eurasia_km.tgz from http://www.mediafire.com/?m9te7t4rosp131d . Do not modify PVRVERSION if you plan to use my kkboot boot image.
4. Apply android_espresso_omap4430_r04_blackhawk_defconfig and Build (using arm-2010q1-202..)
Click to expand...
Click to collapse
Code:
export CROSS_COMPILE='/opt/toolchains/arm-2010q1/bin/arm-none-linux-gnueabi-'
export LDFLAGS=''
export CFLAGS=''
export SUBARCH=arm
export ARCH=arm
make mrproper
make android_espresso_omap4430_r04_blackhawk_defconfig
make -j4
5. Repack zImage with ramdisk.cpio.gz (extracted from stock rom file)
Click to expand...
Click to collapse
Incorrect, use kkboot ramdisk for now.
6. Replace boot.img in your kkboot-0.5.2-core-p31xx.zip with repacked boot.img
Click to expand...
Click to collapse
Correct.
7. Apply new kkboot.zip in CWM and installation failed and aborted.
Click to expand...
Click to collapse
Try to unpack and repack kkboot without modification, is it works?
Am I totally in wrong direction? What am I missing here?
I sincerely ask your help.
(I found that when build kernel after your patch, additional module files (.ko) are generated.
Should I do something with that?)
Click to expand...
Click to collapse
Unpack kkboot, you will see a lot of modules inside system/lib/modules
Try to unpack and repack kkboot without modification, is it works?
Click to expand...
Click to collapse
No, unpack tool that I have is not working.
I found the tool that you've uploaded, but the unzip password was not correct for some reason
I downloaded your tool in http://forum.xda-developers.com/showthread.php?t=1241005
But while unpacking, it says below:
Code:
BOARD_KERNEL_CMDLINE console=ttyO2,115200n8 mem=1024M androidboot.console=ttyO2 vram=20M omapfb.vram=0:16M
BOARD_KERNEL_BASE 80000000
BOARD_PAGE_SIZE 00000800
gzip: ../kkboot.img-ramdisk.gz: not in gzip format
cpio: premature end of archive
Is it require special tools to unpack kkboot image?
Forgot to mention, my ramdisk packed in lzo format You need lzop application to unpack it.
ketut.kumajaya said:
Forgot to mention, my ramdisk packed in lzo format You need lzop application to unpack it.
Click to expand...
Click to collapse
You mean only ramdisk?
If so, as my understanding, unpacking boot.img in kkboot-0.5.2 and repack without any change, should be working
whether your ramdisk is packed with lzo or not.
But when I did it, I still got installation fail.
(I used the unpackbootimg in blackhawk tool from http://forum.xda-developers.com/showthread.php?t=1241005)
By the way,
I've searching about lzop compressed ramdisk and found this: https://github.com/trevd/aos-tools/blob/master/scripts/unpack-ramdisk.sh
And with this method, I could unpack ramdisk file.
Code:
cat boot.img-ramdisk.gz | lzop -d | cpio -i
But, I think this is not the point.
ketut.kumajaya said:
Forgot to mention, my ramdisk packed in lzo format You need lzop application to unpack it.
Click to expand...
Click to collapse
I simply unpack and repack boot.img from kkboot-0.5.2-core-p31xx.zip
with boot.img-tools in http://forum.xda-developers.com/showthread.php?t=1241005
Then change original boot.img with repacked one and make new zip file in external SD card.
When I go to CWM recovery and try to install new zip file, then I got following message:
Code:
-Extracting files
set_perm : some changes failed
E:Error in /external_sd/newfile.zip
(Status 7)
Installation aborted
I've been trying other tools that I could find but still does not working :crying:
ketut.kumajaya said:
Forgot to mention, my ramdisk packed in lzo format You need lzop application to unpack it.
Click to expand...
Click to collapse
Finally done it!
I've got tab 2 running my own kernel!
Again, thank you for your help and all works you've done!:good:
cks1119 said:
Finally done it!
I've got tab 2 running my own kernel!
Again, thank you for your help and all works you've done!:good:
Click to expand...
Click to collapse
Congrat :good:

Categories

Resources