I am putting this here because CallMeAria's how-to doesn't seem to work. Also like he said there is no documentation on this so to improve the community as a whole this is a much needed guide.
LINUX IS REQUIRED FOR THIS, WINDOWS METHOD IS EITHER NOT POSSIBLE OR NOT FOUND YET I SUGGEST UBUNTU (of course)
1) Download the tools.zip file below
2) Extract the tools.zip to your home directory
3) Open a terminal Window, you will need uboot-mkimage, it should already be installed in your Linux distro, if it isn't you can install from repo using
Code:
sudo apt-get install uboot-mkimage
4) With uboot installed, cd to the tools directory
Code:
cd ~/WORK
5) I have included the stock boot.img
6) Back to the terminal. Use this command to unpack
Code:
./unpack-bootimg.pl boot.img
7) You will get a few files, rename "boot.img-kernel.gz" to zImage and delete the boot-img.ramdisk.cpio.gz file.
8) The boot.img-ramdisk folder is where you will do all of your tweaking. This tutorial does not cover that.
9) Back to the terminal. You need to cd inside of the ramdisk folder.
Code:
cd boot.img-ramdisk
10) Now use this command to compress the ramdisk.
Code:
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
11) You will get a new file called newramdisk.cpio.gz in your work folder, you're almost there.
12) Back to the terminal. CD back to your work folder
Code:
cd ~/WORK
13) You should now have zImage and newramdisk.cpio.gz ready to be combined into a boot.img
14) Back to the terminal. This command will repack it all together.
CHANGE "NAME YOUR IMAGE" to whatever you want nothing ridiculous. New Kernel, My Kernel.... Doom Kernel something like that will suffice
Code:
mkimage -A ARM -T multi -n NAME YOUR IMAGE -C None -a 0x80008000 -e 0x80008000 -d zImage:newramdisk.cpio.gz newboot.img
15) You should now have a newboot.img file, you need to rename this to boot.img and put it into the installer.zip, just drag and drop it and you're done.
16) Move installer.zip to the sdcard, as a safe gaurd also move "stock.zip" to sdcard if your boot.img doesn't work this will return you to stock.
17) Go to CWM and flash. If all goes well... you are now running your repacked kernel.
18) If it doesn't boot just go back into CWM, flash the "stock.zip" file and you will be just fine.
DOWNLOAD: http://www.multiupload.com/5U2OTM84X4
I really hope this is all correct, trying to deal with people around me, people texting and calling plus write this up is a pain. If there are any errors or problems just let me know I will correct whatever is needed.
looks like what you passed my way just before this. I've packaged this in a script as well in the Waggle kernel as I'm working on it.
Will find in my Git below. (working on compiling, then will upload scripts. )
test it out first... my head hurts now... i LOVE this stuff but I haaaate writing up tutorials... I always seem to either mix something up, forget something....
I went through it and all looks correct but then... I could just be delusional
Good lookin' out with the tutorial!
I have a favor to ask, my friend...
I'm on a MacBook Pro, with no working substitute for mkbootimg or mkimage, and I have neither the time or hard disk space to do a linux vm... Plus that vm would be running only one core, because smp vm's on this CoreDuo 2.16(Not Core2Duo, we runnin' 32bit!) don't play nice, and unicore vm's on this thing are so damn slow. This damn thing ain't much faster than our phones! LOL
Needless to say, I need someone to package this for me, so I can test it out.
This is cyanogen's kernel base, with a little tweak... If it works, I will release a patch.
Ah yeah,can you do me a favor? Upload the GB boot.img? Otherwise you're going to get a froyo ramdisk which wont work. I could always download a GB rom....
...fighting ninjas at night, talkin' about this and that.
Urabewe said:
Ah yeah,can you do me a favor? Upload the GB boot.img? Otherwise you're going to get a froyo ramdisk which wont work. I could always download a GB rom....
...fighting ninjas at night, talkin' about this and that.
Click to expand...
Click to collapse
I want a froyo ramdisk so I can test. I'm on a P925, froyo right now...
tekahuna said:
I want a froyo ramdisk so I can test. I'm on a P925, froyo right now...
Click to expand...
Click to collapse
Ahhh I see what you're doing OK will do have it up in a bit.
You want stock ramdisk I would assume?
...fighting ninjas at night, talkin' about this and that.
Urabewe said:
Ahhh I see what you're doing OK will do have it up in a bit.
You want stock ramdisk I would assume?
...fighting ninjas at night, talkin' about this and that.
Click to expand...
Click to collapse
With overclock would be nice... But maybe stock at first.
Bah too late, http://www.multiupload.com/X2D84732ZH
Test it out if it works, I'll throw together a OC for ya
LOL you probably wanted that in a flashable zip huh?
http://www.multiupload.com/L7WCV0OHZ6
Not working, I think it's on my end... Here is that patch.. see if you can get it to work against your kernel source.
Will do.
Also announcing that there is a new boot.img up. This one doesn't have the OC but still includes all the tweaks to speed and memory. Hoping that anyone that isn't even using the OC (setting the max speed down) or experiencing battery drain this should hopefully fix it and you can now run at full speed.
Get it here: http://forum.xda-developers.com/showthread.php?t=1357718
Err... could somebody re-upload the tools.zip? It seems since the Megaupload fiasco all the upload webs went berserk deleting 'suspicious' files.
hey urabewe, can you upload the tools.zip somewhere else, multiupload is not working apparently............in any of your links throughout the this thread
i use 4share they still work and free upload without paying
anyone know how to build the wifi module?
jznomoney said:
anyone know how to build the wifi module?
Click to expand...
Click to collapse
I haven't tried yet, but does the cyanogen wiki method not work?
http://wiki.cyanogenmod.com/wiki/Building_Kernel_from_source
Sent from my LG-P925 using XDA App
Related
Before anything............. This may Brick your phone, follow instructions and it wont
Big shoutouts to:
2nd-init------
skrilax_cz for writing this awesome trick!
edgan for getting it working on atrix with taskset
this hack:
eval for crazy loopback mount idea and all scripts
unknown for lots of helpful testing and debug
XLR88 for the system.img of GB 2.3.4
This is an example of the sort of thing that 2ndinit makes possible
but it is a quick hack and running with the wrong kernel - so still buggy
Bugs
1) The screen flips out when locked, so basically you swipe left and screen goes right.
2) No wifi
3) Camera dont work
4) Moto sign in not working
5) fingerprint
Working
1) Mobile data
2) network
3) Google sign in
4) Market
5) Calls
Will update when fixes are found and bugs are ironed out.
How to get GingerBread via 2ndinit on a locked bootloader for motorola atrix
Tools you need
Adb or Rootexplorer, 2ndinit.apk, terminal
Fastboot
Install 2ndinit.apk
Reboot
in terminal type
ls -a /sys/kernel/debug
Click to expand...
Click to collapse
should get output not
...
Click to expand...
Click to collapse
Download this ...........http://download839.mediafire.com/gv6kzdu34z3g/lcldnltaqj8xd9x/2ndGB.tgz
extract this to sdcard
Download this ...........http://hotfile.com/dl/122055970/0a6dfce/moto-fastboot.zip.html
Extract to sdcard
Delete everything in /preinstall
adb shell
su
cd /preinstall
rm -rf
Click to expand...
Click to collapse
copy 2nd-init, taskset, busybox to /preinstall
In ternimal
chmod 755 2nd-int
chmod 755 taskset
chmod 755 busybox
Click to expand...
Click to collapse
Rename hk. Img to system.img to and then copy to /preinstall folder
copy files from /ETC/rootfs/ to /system/etc/rootfs/ and set permissions
chmod 644 /system/etc/rootfs/*
Click to expand...
Click to collapse
copy this to /system/bin/ download and add gb directory to /data/ so it becomes /data/gb/
In terminal type
ls -a /sys/kernel/debug
Click to expand...
Click to collapse
you should get nothing at all
reboot.....
Backup your data this is a recommendation just in case
reboot again...........
when rebooting hold volume down then scroll down to EARLY USB ENUMERATION then volume up (do this everytime you want gingerbread)
wait.............
You should successfully boot into GingerBread... Congradulations
getting back to froyo
reboot
If all this fails, install 2ndinit.apk from here
Then repeat this tutorial...
Sorry about the crap video
WATCH HERE
If anyone can help to solve the flip of screen here is some clues that may help
1) screen is working prefectly until screen turns off, then it flips
Glad my work could be of use =)
And thanks for taking this off my hands while I'm away... hope you can fix the touch screen left-right input flip ... if anyone has any ideas, PM me, _unknown and stevendeb25. Here's to hoping all international users can enjoy 2.3.4 soon!
PS. haha thanks for quoting all my cursing in IRC about my /data failures
How my hack works
For international devs who want an idea of how I did it (before stevendeb25's tutorial & release) the following details my mount_ext3.sh:
Loopback hack only loads if you fastboot menu to early USB enum, so, run if ro.usb_mode==debug (plus helps us debug to adb early... why /system/etc/rootfs/default.prop we copy to / has ro.secure=0 & persist.service.adb.enable=1) In addition to default.prop we copy, extracted files from GB's ramdisk:, /init, /init.rc (modified, comment out mounting /system) and ueventd.rc from etc/rootfs, plus symlink /sbin/ueventd->/init.
Next, mknod and mount /preinstall rw, where we keep taskset, 2nd-init and busybox binaries, as well as system.img (CG60 from hktw 2.3.4 sbf.) It's probably already in /dev/block/ but this varied across froyo builds so mknod and mount rw to be safe. Good idea to use /preinstall/busybox from now on as /system mount dis/appears.
e2fsck -y the system.img and then losetup the loopback mount, umount -f -l /system, and mount -t ext3 <loopbackdevice> /system. For debug cat out /proc/mounts to a file in /preinstall or /data, actually I also append ">>/preinstall/debug 2>&1" to every command. Finally, now you can (taskset) 2nd-init your new system!
Unfortunately, seems necessary to fastboot -w or just rm -r /data/* between boots of froyo and GB. Annoying, but I couldn't easily get a GB-only /data mounted.
Now, can you fix the input flip left-right after lock screen? Clues are: it doesn't happen if this trick is tried on GB kernel (with Froyo ramdisk, system, and same 2nd-init trick.) Also, it persists after warm reboot, GB->GB. Pulling in /system/lib/hw from Froyo didn't help. Tho you'll want to bring back (and insmod) aev.ko, evfwd.ko, plus revert dhd.ko to Froyo version, as the first two are in-kernel on GB, and the latter seems to differ. I am fairly confident most bugs can be fixed by replacing (lock screen? nvrm_daemon?) pieces of GB userspace with Froyo versions in system.img. I just lost a bit of ambition after finding the fastboot oem unlock in the BL plus I will be away for a bit.
So, good luck to stevendeb25 and all you non-ATT Atrix hackers!
At least International users get some Gingerbread love! Good job guys!
i can't believe!!!
what a great new!!!
thanks guys!
the video seems to be really amazing!
wanna try it!!!!
that bootscreen looks awesome at first part in the video, is that stock?? oo
Excellent work brothers, you guys are really making us proud as well as you should be!
Very good job!
Now I can start dreaming about GB in my non-att atrix
You sexy, sexy man! Rawr!!
Great news
Sent from my MB860 using XDA Premium App
stratax said:
that bootscreen looks awesome at first part in the video, is that stock?? oo
Click to expand...
Click to collapse
Yeah stock orange uk bootscreen
Sent from my MB860 using XDA Premium App
Lol..
Awesome Steven, lookin' forward
bongd said:
You sexy, sexy man! Rawr!!
Click to expand...
Click to collapse
Stock Bell Atrix on Rogers with updated radio, Rooted, deodexed, Honeycomb theme, and frozen!
Released ............ enjoy guys, if dont want flip screen, dont lock the phone
This remember me when we try to put android on Windows Mobile Phones!haha
Anyway, nice work man, Let's play a lil
Wow, good work guys. I am sure this has been torture for international users. For the past couple of weeks, we in the states (or anyone on at&t) have been like kids on Christmas, while everyone else sits on the sidelines It's a good thing the 2nd init port got put to good use.
HolySorento said:
This remember me when we try to put android on Windows Mobile Phones!haha
Anyway, nice work man, Let's play a lil
Click to expand...
Click to collapse
Android has been ported to the Iphone, but as far as I know only to the older generations.
c'mon guys, are you trying that??
post your opinions!!
stevendeb25 said:
Released ............ enjoy guys, if dont want flip screen, dont lock the phone
Click to expand...
Click to collapse
Great work steve
Steven, is there no way for you to use drivers from the hktw build to fix wifi and camera?
Or do those require kernel level access or something?
Sent from my MB860 using XDA Premium App
stevendeb25 said:
Yeah stock orange uk bootscreen
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
Think anyone could post this? It looks much better than the ATT one.
tasty_boy said:
c'mon guys, are you trying that??
post your opinions!!
Click to expand...
Click to collapse
I'd love to try but without wifi and that flip issue I think I'll pass this version.
Sinful Animosity said:
Steven, is there no way for you to use drivers from the hktw build to fix wifi and camera?
Or do those require kernel level access or something?
Click to expand...
Click to collapse
Other way around... if you pull in dhd.ko from the latest Froyo build you flashed on your system, as well as aev.ko and evfwd.ko (and /system/etc/firmware or wifi/ ?) into loopback mounted /system you will have more chance of working wifi in HKTW2.3.4. (HINT HINT you could do this directly in the mount_ext3.sh script... copy useful 2.2 stuff to /preinstall, copy back into new /system after unmount,remount, even insmod if you have to...)
Remember, this trick produces a mismatch between /system version (GB,2.3.4) and kernel version in boot.img which is actually running. We can take care of ramdisk post-hoc before 2nd-init but older kernel and its API is still in place so pieces of HKTW userspace will have to be replaced/modded to fix bugs. This version of mount_ext3 is an early release for the hackers who want to tinker until it works... good luck! I will have only web and ssh access off and on for 10 days but can answer any questions by PM, on IRC or here..
http://dl4.htc.com/RomCode/Source_and_Binaries/incrediblec-2.6.35-gb-mr.tar.gz
Go get it boys!!!
wildstang83 said:
http://www.htcdev.com/devcenter/downloads
Go get it boys!!!
Click to expand...
Click to collapse
I Beat ya to it posted in my thread.
Sent from my ADR6300 using Tapatalk
Does this include the source for the TV Out functionality? If so, can we port that to AOSP?
Awesome sauce
Sent from my ADR6300 using XDA App
tiny4579 said:
I Beat ya to it posted in my thread.
Sent from my ADR6300 using Tapatalk
Click to expand...
Click to collapse
Who cares? Somebody needs to just build the durn thing already, lol
I can't do it, I'm working on other junk right now.
Was just about to post this ..bout damn time HTC
Sent from my Incredible using XDA App
wildstang83 said:
Who cares? Somebody needs to just build the durn thing already, lol
I can't do it, I'm working on other junk right now.
Click to expand...
Click to collapse
I can. Monday at the earliest. They picked the wrong weekend to release it.
Sent from my ADR6300 using Tapatalk
tiny4579 said:
I can. Monday at the earliest. They picked the wrong weekend to release it.
Sent from my ADR6300 using Tapatalk
Click to expand...
Click to collapse
Yea that is for sure. Your not even lying there. I might try to build it right now for a test run. I ain't gotta clue what I'm doing so wish me luck, lol All I know at this point is I gotta have a computer to compile on and I have a couple so Im good there
About damn time lol
wdfowty said:
About damn time lol
Click to expand...
Click to collapse
About damn time we saw you around here again I know you've been through some hard times, glad to see your posts sprinkled around.
00McD00 said:
About damn time we saw you around here again I know you've been through some hard times, glad to see your posts sprinkled around.
Click to expand...
Click to collapse
Thanks man. Been slowly getting back into the swing of things around here again now that life is becoming less hectic.
I'll compile this thing once the damn toolchain finishes downloading lol
Code:
/home/tcberg2010/kernel/inc/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Anyone else running into this error? Saw on Evo 3D forums that it was an HTC issue. I sure hope not in our case.
Hey guys can someone please look over my instructions and see if I'm correct or not? I'm trying to learn something new here since I've never done this before.
Download http://dl4.htc.com/RomCode/Source_and_Binaries/incrediblec-2.6.35-gb-mr.tar.gz from HTC's website.
This is the correct size and MD5:
88.8 MB (93,175,808 bytes) 67c01623ff73415a99e5f8cd1d8ef11a
Enter “root” mode so we dont have to do 'sudo' so much.
Code:
sudo /bin/bash
1. Untar your incrediblec-2.6.35-gb-mr.tar.gz file
Code:
tar xvf incrediblec-2.6.35-gb-mr.tar.gz
Next, you can move the directory to /kernel for easy naming.
Code:
mv incrediblec-2.6.35-gb-mr.tar.gz /kernel
2. Next, let’s go to your SDK Tools directory android-sdk-linux/tools
Code:
cd android-sdk-linux/tools
3. Next, connect your HTC Droid Incredible to your computer and make sure it’s in USB Debugging Mode under Settings->Applications->Development.
4. Next, we will pull the current configuration from your existing kernel on the HTC Evo 4G, so we don’t break anything
Code:
adb pull /proc/config.gz .
5. Let’s gunzip the config.gz:
Code:
gunzip config.gz
6. Let’s move this config file into our kernel directory as .config:
Code:
cp config /kernel/.config
7. Go into your kernel directory:
Code:
cd /kernel
8. Let’s download the compiler for ARM on linux. (Select the latest version and download the one that says “A32 GNU/Linux TAR”. e.g. https://sourcery.mentor.com/public/...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
Just do in Terminal:
Code:
wget https://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
9. Untar the compiler
Code:
tar xvf arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
10. Let’s edit the Makefile to use the downloaded ARM compiler:
Code:
gedit Makefile
Next, change the CROSS_COMPILE ?= arm-eabi- line to:
Code:
CROSS_COMPILE ?= arm-2010q1/bin/arm-none-linux-gnueabi-
11. (Optional) You can now edit .config file to add your hacks such as enabling loop devices for mounting.
Uncomment the CONFIG_DEV_BLK_LOOP and write:
Code:
CONFIG_DEV_BLK_LOOP=y
to enable loop devices.
12. Let’s compile it by doing:
Code:
make
Once that’s done, you need to copy over the “compiled” wifi drivers to your HTC Droid Incredible to make it along with your new kernel.
Let’s copy over the new kernel and drivers to your android-sdk-linux/tools directory for easy installation.
Code:
cp /kernel/drivers/net/wireless/bcm4329_204/bcm4329.ko /android-sdk-linux/tools/
cp /kernel/arch/arm/boot/zImage /android-sdk-linux/tools/
13. Go to your SDK tools directory again and push the new files!
Code:
cd /android-sdk-linux/tools
adb push bcm4329.ko /system/lib/modules/bcm4329.ko
14. You will need fastboot to flash the new kernel image so do:
Code:
wget http://android-dls.com/files/linux/fastboot
chmod 755 fastboot
(For Windows, download this file and put into your SDK tools directory!)
Next let’s flash the new kernel image, zImage by doing:
Code:
fastboot flash zimage zImage
It should actually be waiting, now you need to turn your phone off, then boot it back up into bootloader mode by pressing the Power button WHILE holding down the volume button. Wait 3 seconds and hit the Power button to enter the fastboot mode.
15. Now you should see fastboot flashing the image and you can reboot it to try out your new HTC Droid Incredible kernel you built yourself!
wildstang83 said:
Who cares? Somebody needs to just build the durn thing already, lol
I can't do it, I'm working on other junk right now.
Click to expand...
Click to collapse
You cant not build it because I doubt you have even compiled a kernel before. You are just a drag and drop dev. None if your roms are orginal, tweaks of others!. Not trying to flame, but its the truth.
Well, its whatever. People on XDA would much rather bash those that need help than to actually help them. I'm still learning but I can't get anywhere with these types of comments. So until then I'll be over at themikmik.com.
Follow me if you truely care. If not, nice knowing ya.
Im sure a good bit of you have already figured out that there is ZERO documentation on building a boot.img for our phones. Unfortunately it is not a generic process and every device is different. So basically this is a how-to on unpacking/repacking a boot.img for flashing to the device. This will allow you to make ramdisk modifications and create a boot.img from a kernel you compiled.
Directions
First youre going to need a few things. First and foremost, I have NO IDEA HOW TO DO THIS ON WINDOWS, so dont ask. If someone does then shoot me the directions and Ill put it up here and give you full credit.
You will need a Linux distribution such as Ubuntu (you can use a live CD or run it in a Virtual Machine as well, but again, dont ask me how to run it in Virtual Machine, Ive never done it).
-You will need to download the included boot-tools.zip which includes three things: unpack-bootimg.pl, mkbootimg, and a META-INF directory for flashing the boot.img in cwm recovery.
-You will also need the stock boot.img (or a custom one if you can find one at this point )
-Extract the boot-tools.zip to youre home folder. Make sure both files inside can be Executed as a program by checking 'Properties>Permissions'.
-Paste your boot.img in that folder as well.
-Open up a Terminal and:
Code:
cd ~/boot-tools
-Type:
Code:
./unpack-bootimg.pl boot.img
-This will create:
boot-img.ramdisk (this is the extracted ramdisk where you can make changes to your ramdisk)
boot-img.ramdisk.cpio.gz (this is the compressed ramdisk. You dont need to touch this.
boot.img-kernel.gz (this is the actual kernel)
-Rename "boot.img-kernel.gz" to "zImage" (OR, if you compiled your own just delete "boot.img-kernel.gz" and paste your compiled zImage here.
-Now you can make any changes you want inside boot-img.ramdisk.
-Now to repack the ramdisk so it can be packaged with the kernel you need to change directories in Terminal again:
Code:
cd ~/boot-tools/boot-img.ramdisk
-Now in the Terminal type:
Code:
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
(This part may require some package dependencies which you may need to install (gzip)
-This will produce a new package called "newramdisk.cpio.gz" This is the ramdisk you will package into the boot.img.
-So now finally we are going to bundle it all up into a boot.img
-So again we are going to change directories in the Terminal:
Code:
cd ~/boot-tools
-Now this next part needs to be exact or it will not work. In Terminal type:
Code:
mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --cmdline "root=/dev/ram0 rw mem=128M console=ttyS2,115200n8 initrd=0x81600000,20M ramdisk_size=20480" --board omap4spd --base 0x756e0000 --ramdiskaddr 0x81600000 -o newboot.img
-This is very fast and it produces a new file called "newboot.img"
-You can now either delete or rename the original file called "boot.img"
-Now rename "newboot.img" to "boot.img"
-Now take "boot.img" and "Meta-INF" and zip those up together, naming the .zip whatever you want.
-Now you have a flashable boot.img update.zip you can put on your SD Card and flash from CWM recovery.
I suggest unpacking and then repacking a stock kernel without modification and then flashing it just to make sure it works before you make any changes.
Barring typo's, this process does work. Ive built a boot.img with it and the boot.img has been verified by other xda-ers to fully boot up and work. If I messed something up just let me know so I can fix it! Feedback is always welcome!
DOWNLOADS
boot-tools.zip
A breakdown of the boot.img bundling code:
Code:
mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --cmdline "root=/dev/ram0 rw mem=128M console=ttyS2,115200n8 initrd=0x81600000,20M ramdisk_size=20480" --board omap4spd --base 0x756e0000 --ramdiskaddr 0x81600000 -o newboot.img
mkbootimg: This is just the command to use mkbootimg that packages the boot.img
--kernel zImage:This defines the file you want mkbootimg to use as your kernel.
--ramdisk newramdisk.cpio.gz: This defines the package you want to use as your ramdisk.
--cmdline "root=/dev/ram0 rw mem=128M console=ttyS2,115200n8 initrd=0x81600000,20M ramdisk_size=20480": This part is specific to our device and is taken from the kernel source. This is the part that was such a mystery
--board: This defines what board were installing our kernel too. This may or may not be needed. But I didnt test without this.
--base 0x756e0000: This defines the kernel base address. This is also device specific.
--ramdiskaddr 0x81600000: This defines the ramdisk base address. This is also device specific.
-o newboot.img: This tells mkbootimg what to name the output file, which in this case is "newboot.img" You can change this to whatever you want.
Thanks, good write up. I have a question. I'm on mac. I have mkbootimg from ICS sources, but I have no --ramdiskaddr option. Are you using a special mkbootimg?
You can install run it through cygwin on windows and i think on a mac too. Thats what i use for my kitchen and tools...
Or you cab just make a 10 gig partition and run dual boot ubuntu... i do that too but actually use 20 gigs... it is much easier than virtual. I use cygwin the most unless its a heavy duty project.
Sent from my LG-P925 using XDA App
Dont know what im doing wrong...
getting
"mkbootimg not found"
dont know what i did wrong...
its in the folder...
any ideas?
Cannot repack in cygwin. You must use virtual or real ubuntu install.
Sent from my LG-P925 using XDA App
Thank you eternally sir! This shall come in handy.
oh, and I'm going to be doing this on my HP 210 netbook with Linux on it. It's what I've compiled every kernel over in the Infuse forums and even Linuxbozo's CM7 Kang for myself before I moved to the Thrill.
Anyone try to complie the kernel with cm7 source? Didn't get the Tiap_drv.ko (wifi driver)
Sent from my Optimus 3D using Tapatalk
anyone?
im running ubuntu linux...
i tried adding ./mkbootimg... (says cannot execute binary file)
i tried adding sudo ./mkbootimg... (says syntax error)
i tried sudo mkbootimg... (says command not found)
i tried a space between . and /... (says no such file or directory)
i tried adding the full file path.
i have no idea what to do...
help please.
bzlmnop said:
im running ubuntu linux...
i tried adding ./mkbootimg... (says cannot execute binary file)
i tried adding sudo ./mkbootimg... (says syntax error)
i tried sudo mkbootimg... (says command not found)
i tried a space between . and /... (says no such file or directory)
i tried adding the full file path.
i have no idea what to do...
help please.
Click to expand...
Click to collapse
Did you give mkbootimg executable permissions?
Also you might try
Code:
sudo cp [I]path_to_[/I]/mkbootimg /usr/bin
Sent from my LG-P925 using Tapatalk
I did make sure it had the proper permissions...
Will cp path move mkbootimg to /usr/bin?
Because right now its just in my boot-tools folder...
Either way I will try it when I get home...
Thanks.
Sent from my LG-P925 using xda premium
Edit:
I tried copying it to /usr/bin.
Made sure permissions were correct.
Still nothing...
Edit #2:
Ok it might be working now...
how long should it take?
And will there be any result dialog?
Edit #3:
Nevermind, didnt work at all.
Have tried the entire process start to finish about 3 or 4 times now.
Still no success...
However i did find a typo in the OP "cd ~/boot-tools/boot-img.ramdisk" should be "boot.img-ramdisk"
Still everytime i try mkbootimg it says "bash: /usr/bin/mkbootimg: cannot execute binary file"
Any help would be greatly appreciated.
Thanks.
Aria check your PM
???
Alright,
nevermind i guess.
I have given up.
i have read everything there is out there to read about using mkbootimg.
the closest i have gotten is using a root account and it gave me a usage message:
"usage: mkbootimg
--kernel <filename>
--ramdisk <filename>
[ --second <2ndbootloader-filename> ]
[ --cmdline <kernel-commandline> ]
[ --board <boardname> ]
[ --board <address> ]
-o | --output <filename>"
Nothing i can find or no one i have asked seems to have an answer.
im so mad right now, bc trying to develop and stuff was fun up to this point. Now it just completely blows.
Mkbooimg doesn't work for O3D or thrill, you need too use U-boots mkimage also when unpacking the boot.img you just remove the first 76 bytes not the first 2048 as you do with mkbootimg files
Sent from my LG-P920 using Tapatalk
Thank you Echts!
Ok i will try that and report back...
So, the guide in the OP is wrong then?
b/c the included .zip has mkbootimg in it...
bzlmnop said:
Ok i will try that and report back...
So, the guide in the OP is wrong then?
b/c the included .zip has mkbootimg in it...
Click to expand...
Click to collapse
haven't followed his guide to test exactly but has anyone gotten his way to work? Looks like the old way which I don't know anyone who has gotten to work.
O3D/Thrill use U-boot images afaik and mkimage works, I repack that way, it's how I put the overclock module tekahuna did in to the boot.img
Sent from my LG-P920 using Tapatalk
ok, I think I see the problem... I use another mkbootimg and the "file mkbootimg" command produces:
mkbootimg: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
Whereas using CallMeAria's produces:
mkbootimg: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped
The first one works for me but does not have the ramdiskaddr option. Are you using a 64bit system Aria?
Edit: or visa versa, not sure what I'm using on my HP210 Netbook. Just know it's XCFE xubuntu. Asked for it preinstalled.
Multiupload is down can somebody reupload or send me the link
thank you
I also need the link to the boot tools zip
THIS THREAD IS NOW OUTDATED. Page 17 and on contains information for Ubuntu Touch Saucy port.
NEW THREAD ON THE WAY.
http://forum.xda-developers.com/showthread.php?t=2426924
What works. Wifi+ADB+Touch.
What doesn't work: Sound+Bluetooth. Bluetooth doesn't work yet in Ubuntu Touch, and Sound doesn't work with the Evervolv source. Camera.
Download these files.
http://cdimage.ubuntu.com/ubuntu-to...c-demo/quantal-preinstalled-phablet-armhf.zip Ubuntu Touch RootFS
Recovery Image.
http://gdurl.com/A0mz/download
Put on your SDCARD and install in ClockWorkMod. You know.. when you first turn on the tablet, moboot loads.. you should see a menu for clockwork recovery mod.
EDIT: Oh yeah.. First do a factory reset in recovery mod, THEN install the zip files... The factory reset formats the cm-cache and cm-data partitions.. There are 3 partitions. cm-cache cm-data cm-system. Factory reset formats cache and data.. When you install the first zip, it formats the system partition. Then after that install the RootFS.zip that you downloaded from ubuntu... It extracts the RootFS to the cm-data partition, that you formatted. So it should be clean.
Reboot.
Enjoy!
Oh yeah.. Onscreen Keyboard is not sized right. Seems to be an Ubuntu bug... If your fonts are wrong. .reboot.. check out /system/etc/init.d/90userinit for the stuff I added.
thanks to the usual guys. JCSullins, Evervolv, Tigeris and litz and ompx in ubuntu-touch on irc. The wifi fix was an idea I got while stuck in traffic. Can't believe it worked.
Oh yeah.. THANK YOU DR. MARBLE.
PS. I read somewhere you need at least 600MB of free space, AFTER you copy the files to the sdcard, for the extraction to go well...
nice
Awesome, can't wait to try this out!
How to install that on tp?
Way too cool!! tnx for all the hard work
tux-world said:
How to install that on tp?
Click to expand...
Click to collapse
He says: POST IT SOON. In other words: you have to wait until he finishes the porting.
Crazy how the font turned out like that
Sent from my SAMSUNG-SGH-T989 using xda premium
Great news
SGA, thanks for your effort in bringing Ubuntu touch to Touchpad!
If you need help with testers, let me know
Vistaus said:
He says: POST IT SOON. In other words: you have to wait until he finishes the porting.
Click to expand...
Click to collapse
is this CM?
tux-world said:
is this CM?
Click to expand...
Click to collapse
No. It's Ubuntu Touch, but from what I have heard on XDA Developer T.V. (check 'em out on YouTube) it is based on CyanogenMod.
Sent from my Xperia S ~XZXperience~Unlocked BL~Rooted~6.1.A.2.55~
I'm assuming the install process will be similar to The Nexus line, flash the core system then the phablet zip.
Sent from my Nexus 7 using xda app-developers app
What source did you use to compile? I tried to compile it and kept getting some weird error got frustrated and gave up.
blmvxer said:
I'm assuming the install process will be similar to The Nexus line, flash the core system then the phablet zip.
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
Yeah, I think that's how it will always be. The core zip is device specific and contains the CM base while the phablet zip is for all devices.
Off to 3.0.8
EDIT TO POST. UNMOUNT PROC OUTSIDE OF CHROOT VIA USERINIT, AND NETWORK MANAGER WORKS WITHOUT FANOTIFY
Going to try a newer kernel to get wifi working. We need Fanotify in the kernel for the network manager to see the wireless. Has to do with proc mounted inside of a chroot and daemons having permission. Sad because once you run ubuntu_chroot shell to get in, you can run iwlist wlan0 scan...
Status Update Complete.
How to compile. Grab evervolv's device folder, but not his vendor folder.. grab hardware/qcom hardware/atheros and the compat-wireless from.. some folder.. forgot the name... I got these from evervolv's ubuntuphone branch for tenderloin.. (the kernel) and his build of android.
Those are the current sources.. May change.. Be sure to change ev.mk file to cm.mk, and change /vender/ev (inside of ev.mk) to /vendor/cm, ev.dependencies file to cm.dependencies....
JCSullins announced he will start work on JB. So that is cool. But.. 3.0.8 Kernel doesn't have working sound or bluetooth. Until someone figures that out with 3.0.8, Ubuntu-Touch and the Touchpad WILL NOT HAVE SOUND. (cough cough nag jcsullins cough cough).. That guy is the man to go to for that.
Backporting Fanotify is not easy. You run into having to change the msm code. (I ran into msm-watchdog.c) So much you might as well just go to 3.0.8.. I have an odd feeling that is someone were to backport it, sound would stop working....
EDIT TO POST. UNMOUNT PROC OUTSIDE OF CHROOT VIA USERINIT, AND NETWORK MANAGER WORKS WITHOUT FANOTIFY
Backup you jellybean system folder to a tarball and then extract it somewhere.. Same with the Ubuntu Touch system folder.
(I was about to give up!)
cp -R -f /jellybean/lib/* /system/lib
cp -R -f /ubuntutouch/lib/* /system/lib
cp -R -f /jellybean/etc/firmware/* /system/etc/firmware (my adreno firmware was missing, so this will fix that)
reboot.. and it worked.. merged libraries.
Fonts are not bad all the time..... Going to try this with 3.0.8 tonight.. If someone is bored today, give it a shot. Let us know how it works.
To brunch tenderloin I have to manually create out/host/linux-x86/bin and stick mkimage in there.
go to vender/cm/vendersetup.sh and add add-lunch-combo cm-tenderloin-userdebug.. I think.
there is a mkimage in the ubuntu touch source.. I used that. /system/extras/mkimage.. it needs to be compiled gcc mkimage.c -o mkimage -lz
then copy it cp ./system/extras/mkimage/mkimage ./out/host/linux-x86/bin no idea if this is required.
there are 2 bzr branch commands that need to be run.. google that.. Should be in Ubuntu Porting guide, but it's not. ubuntuappmanager library and some other library.
edit: run this inside of the ubuntu touch source folder/ubuntu
"bzr branch lphablet-extras/libhybris hybris" stupid smiles. =)
"bzr branch lplatform-api platform-api"
http://forum.xda-developers.com/showthread.php?p=38745624
dont forget to run extract-files.sh and get-prebuild, etc.
source build/envsetup.sh
lunch (pick 14)
brunch tenderloin
I bring over ts_srv and that other ts program from jellybean to ubuntu and currently add commands to /system/etc/init.d/90userinit to get stuff running.. Lazy, I am.
Confused? That is my rough draft guide.
A dude by the name of tigeris, or something that started with tig.. he helped me a lot on ubuntu-phone on irc. So did another guy named.. omxy.. I think... I will find them. Gotta go,
EDIT TO POST. UNMOUNT PROC OUTSIDE OF CHROOT VIA USERINIT, AND NETWORK MANAGER WORKS WITHOUT FANOTIFY
My wife would really like someone to pick this work up.. She wants me to .. "come back to the family"....
Oh yeah.. Wifi does work.
To get wifi working..
do this.
ubuntu_chroot shell
mount -o proc proc /proc
network manager should now bomb.
this is for open security.
ifconfig wlan0 essid "your essid"
ifconfig wlan0 up
dhcpcd wlan0
dhcpcd taken from jellybean tar.gz from the bin folder.. So.. yeah.. but no network-manager without fanotify and some other daemons. be sure to take dhcpcd stuff from etc.
DONT RUN ubuntu_chroot all by itself.. It will crash.
ALSO you MUST unmount proc before shutting down or it will be stuck in mtab and you will have old stuff inside of the /proc folder, inside of chroot, or rather /data/ubuntu/proc..
Problems? Restore ubuntufs tarball in recovery.
I will release something sometime soon.. after testing 3.0.8.. but if you know how to do all this stuff, be my guest.
Why don't you create your own github and share with us?
I bet that there are a lot of devs who want to continue.
I am really interested but I kind of got lost when you said to get the files from Evervolv... Can you post links to be more specific please?
Thank you.
Its just githib.com/evervolv
Sent from my Touchpad using xda premium
Doing that tonight... By the end of tonight I will release something..
It will be 3 files.
The first will be the .zip file that has the actual /system folder
second is of course from ubuntu and is the rootfs.
Third will be a tarball you guys can extract once the tablet is booted that will just have touch and graphics working. You can use wifi if you run it from adb, and keep the tablet powered on.
I haven't even touched pixel ratio.
Oh.. a 4th file.. of the whole ubuntu touch folder.. cleaned and made proper.. Uploaded to google drive.. Or hell I guess I can look at github...
Gotta play mario with my little girl first.
jshafer817 said:
Gotta play mario with my little girl first.
Click to expand...
Click to collapse
LOL
Gotta always spend time with them :good:
This is a tutorial I've decided to put together as I'm learning to compile kernels. It will cover unpacking and repacking a boot.img and/or recovery.img, and also touch on unpacking the ramdisk after we have unpacked the boot.img This tutorial will only focus on executing this on a android device using the terminal emulator app but of course you could use these tools on a PC in a adb shell.
This would not be possible without the hard work of xda member @Modding.MyMind. I am not responsible for anything you do to your device by using these tools.
What you will need
1. Android device
2. Have root
3. Have busybox installed (1.23.1 is recommended)
4. Terminal Emulator app
5. Root Explorer app
6. Your devices boot.img
7. mkbootimg_tools-master.zip (download below)
https://www.dropbox.com/s/fiat0zrf2f533uq/mkbootimg_tools-master.zip?dl=0
Directions;
1. Let's pull the boot.img we are going to work with using dd. Open your terminal and type su > press enter. Type dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img > press enter and now you should see a file on your sdcard called boot.img
2. Place the zip file on the root of your internal sdcard and extract it. You will see a folder called mkbootimg_tools-master and inside that folder you will see 2 folders. One called ARM and one called README.md Now we are going to copy the ARM folder to data/local/tmp and paste it inside of the tmp folder.
3. Now we need to go the ARM folder that you just copied inside tmp and set the permissions to 0777 (rwxrwxrwx) and also set the same permissions for each file inside the ARM folder.
4. Now go inside the ARM folder and copy the bash file to system/xbin and set the permission to chmod 0755 (rwxr-xr-x)
5. Ok now copy the boot.img file that we pulled onto your sdcard inside the ARM folder and leave the permissions for that file 0666 (rw-rw-rw-)
6. Now we are ready for the fun stuff! Open up your terminal emulator app and type su > press enter
7. Now we are going to change directories to the ARM folder which we want to be in by typing cd data/local/tmp/ARM > press enter
########################################
Now to unpack your boot.img
1. Type ./mkboot boot.img bootfolder > press enter and you will see the magic happen. It will automatically create a folder called bootfolder which is your project folder and you can name it whatever you like but I like to call it bootfolder and if I was unpacking a recovery.img I would call it recoveryfolder
2. So now you have your unpacked boot.img.
3. Now go to your terminal and type cd bootfolder > and press enter. We are going into your bootfolder now because that is where your ramdisk.gz is located and we are now going to decompress your ramdisk by typing gunzip -dc ramdisk.gz | cpio -i > and press enter and it will decompress your ramdisk for you.
4. So now you have unpacked a boot.img and also learned how to decompress your ramdisk.
#######################################
Now we are going to repack your boot.img
1. In your terminal type cd .. > and press enter so you will move back 1 directory into your ARM folder.
2. Now to repack you are going to type ./mkboot bootfolder boot.img > and press enter and that will repack your boot.img for you
*wherever you saw me type a > don't ever type that as I was just showing that you are done the command or syntax and your are ready to press enter.
Source code https://github.com/ModdingMyMind/mkbootimg_tools/commit/6c44267b4a8a43504c870678c68df6a31b8e2f18
Screenshot - https://www.dropbox.com/s/se171tzgnf6wp0q/Screenshot_2015-03-12-02-49-50.png?dl=0
Screenshot - https://www.dropbox.com/s/5bzt8p6l2ltosl6/Screenshot_2015-03-12-02-50-04.png?dl=0
Just in case..
1 more
Good looking on this. Its always good to see tutorials like this going up so others can profit
Tigerstown said:
Good looking on this. Its always good to see tutorials like this going up so others can profit
Click to expand...
Click to collapse
Thanks my dude
Thanks. I was working on getting my build environment up and running and learning how to do this. I'm sure this tutorial will help alot
Red_81 said:
Thanks. I was working on getting my build environment up and running and learning how to do this. I'm sure this tutorial will help alot
Click to expand...
Click to collapse
NP, that's what it's there for.. [emoji3]
Hello my friend! Nice to see you around here! Congratulations for your topic!!
leonardoafa said:
Hello my friend! Nice to see you around here! Congratulations for your topic!!
Click to expand...
Click to collapse
Appreciate it bro [emoji2]
cpio error
after gunzip -dc ramdisk.gz | cpio -i i got error cpio not found. I put cpio inside of bootfolder but still have same error.
artur0588 said:
cpio error
after gunzip -dc ramdisk.gz | cpio -i i got error cpio not found. I put cpio inside of bootfolder but still have same error.
Click to expand...
Click to collapse
Please inform me of what you are trying to do and with what ROM (stock or custom) are you using a custom kernel or recovery? Have you made any changes to the ramdisk. It's almost impossible to debug your situation without any info on what device your working on. cpio is statically compiled for our device and I posted screenshots of everything working flawlessly. Upload a screenshot of when you are getting the error because you should not have to cp cpio to any directory except for placing the ARM folder in data/local/tmp/ARM and make sure that you chmod 0755 on all subfolders and files but don't set execute on child files though.
Hello. I found that when I unpack and pack the boot.img, although I did nothing with the kernel, I still lose the baseband. The same thing happened when I use my PC and Linux. The size decreased by 2.5MB. I dont know why.
skulldreamz said:
Please inform me of what you are trying to do and with what ROM (stock or custom) are you using a custom kernel or recovery? Have you made any changes to the ramdisk. It's almost impossible to debug your situation without any info on what device your working on. cpio is statically compiled for our device and I posted screenshots of everything working flawlessly. Upload a screenshot of when you are getting the error because you should not have to cp cpio to any directory except for placing the ARM folder in data/local/tmp/ARM and make sure that you chmod 0755 on all subfolders and files but don't set execute on child files though.
Click to expand...
Click to collapse
Hello have you already try to change value in color température?!!!
Regards
JEZ69 said:
Hello have you already try to change value in color température?!!!
Regards
Click to expand...
Click to collapse
Were trying to get a solid base bug free and then we will start to implement extra features. We working smarter not harder with a kernel with features a-z to only come back and see people saying this doesn't work and this doesn't work. @RenderBroken has been blind deving and it's gonna be a couple days until he had his device in hand do please everyone be patient. Nothing ercks a Dev more than people rushing features when a foundation has not been set %100 solid yet. Thanks for your patience
Sent from my victara
skulldreamz said:
Were trying to get a solid base bug free and then we will start to implement extra features. We working smarter not harder with a kernel with features a-z to only come back and see people saying this doesn't work and this doesn't work. @RenderBroken has been blind deving and it's gonna be a couple days until he had his device in hand do please everyone be patient. Nothing ercks a Dev more than people rushing features when a foundation has not been set %100 solid yet. Thanks for your patience
Sent from my victara
Click to expand...
Click to collapse
Hello thank s for reply... I wait until you ready to give good work ...it s better way you re right...
@skulldreamz, just saw this thread. Not bad bro. Wanted to add that when you run the mkboot script alongside the binaries that it will automatically unpack the ramdisk as well just as long as the given image is properly supported of course. There is no need to unpack the ramdisk manually. In addition, the ramdisk will be repacked automatically when you use the mkboot script to rebuild the image also. Nice work.
Could you send source code to me?
Thanks for your great tutorial. But I have a problem on my phone. Could you send source code to me ? [email protected]
Not working on my Qualcomm Device....
Sent from my E using Tapatalk