[GUIDE] Beginner guide how to make your ROM *.img from Linux OS !!! - HD2 Android NAND Development

First you must to install yaffs!!!
Download attached archive and unpack it to /usr/sbin/ folder with your File Manager or Terminal window. I preffered File Manager, it is simpliest way.
After copyed mkfs.yaffs2 and unyaffs, you must to change permissions on these two files.
Open Terminal if you don`t previously opened and write...
[email protected]_name:~$ sudo nautilus
Nautilus is File Explorer on Ubuntu Linux. On other Linux distribution you may have other File Explorer. Anyway... open it with sudo command.
Enter your root password and navigate to /usr/sbin folder.
Find these two files mkfs.yaffs2 and unyaffs.
Right click mouse on it then click to see "Properties".
In properties tab you will see "Permissions" tab.
Click on it and set "read and write" option for all users and group in this tab then close window and Terminal.
You can change permission in the Terminal window with this command if you want...
[email protected]_name:~$ sudo chmod 667 /usr/sbin/mkfs.yaffs2
[email protected]_name:~$ sudo chmod 667 /usr/sbin/unyaffs
This is it for install mkfs.yaffs2 and unyaffs.
After that, create new folders on your desktop named as "newrom".
Copy system.img from ROM instalation folder to newrom folder and run unyaffs.
Open terminal and type... Only type BOLD text.
[email protected]_name:~$ cd /home/your_name/Desktop/newrom
[email protected]_name:~/Desktop/newrom$ unyaffs /home/your_name/Desktop/newrom/system.img
Wait unyaffs to uncompress all files and folders from system.img
When unyaffs has been completed uncompress procedure, you will see something like that...
end of image
[email protected]_name:~/Desktop/newrom$
Close terminal window if you want to close.
Open folder newrom and delete system.img file. Folder "newrom" contains everything from your system.img file. You may to change, delete or something else to create your new Android build. Yes you may to be ROM cookers.
After your intervention on files and many other stuff in your "new rom", you will be prepare to create your new "system.img" file.
This process must to be in other folder with diference name. Not to be in same folder where is your previous uncopressed folders and files. In my case this folder is "newrom".
Folder for new "system.img is my Desktop.
Ok, let see what we must to do... In case when you previous closed Terminal window, you must be placed on Desktop uses CD command in Terminal.
[email protected]_name:~$ cd Desktop
You must see this...
[email protected]_name:~/Desktop$
Enter this...
[email protected]_name:~/Desktop$ mkfs.yaffs2 newrom/ system.img
And you must see this...
mkfs.yaffs2: Android YAFFS2 Tool,Build by PowerGUI
at http://www.openhandsetalliance.org.cn
Building...
Build Ok.
[email protected]_name:~/Desktop$
After that you will see new system.img on your Desktop.
For boot.img file, procedure is same except name of *.img file.
That`s it. I hope that is help.
Thanks to everyone who helped me to write this guide.
Enjoy.
FileFixer.

so much thanks. i'll have a try~

Ignore this

I have extracted the files in to the directories as suggested but when I run the command to extract the system.img I get access is denied. I have tried this as my standard user account and logged on as root any ideas?
Edit: modified the permissions on the two files I dumped in to sbin and resolved the issue!

Yes... If you don`t permission you can login as root and change rigts on this two files.
In my case i just copy these two files in /usr/sbin folder and everything work fine.
This is, maybe i think,for per user mod.
I would be to edit thread for this problem...

Works very well very nice thread man. I was able to fully extract the img file from a gingerbread build and play arround with it and rebuild it cheers!

Pictures or video's?

You will be free to create them. I have no much time for this. if you try my procedure step by step, you can learn something...

@FileFixer
Maybe you could also post a way for us to edit the initrd.gz files in the rom builds, so we can make some changes that are necessary for SD builds to work with MAGLDR "AD SD" option ourselves?
Thanks, Santroph.

Unpack initrd.gz on your desktop and open cpio archive. Inside is a few scripts and few elf files.
I am not developer but i will trying to learn more about this.

Pretty useful tutorial i will try that soon.

FileFixer said:
Unpack initrd.gz on your desktop and open cpio archive. Inside is a few scripts and few elf files.
I am not developer but i will trying to learn more about this.
Click to expand...
Click to collapse
Cool guide did you have any help you would like to credit

No, i don`t have any help about this. I just playing with some files.

FileFixer said:
No, i don`t have any help about this. I just playing with some files.
Click to expand...
Click to collapse
KillaHurtz said:
Cool guide did you have any help you would like to credit
Click to expand...
Click to collapse
hehe
(10 chars)

When I use the command unyaffs /home/your_name/Desktop/newrom/system.img I get an error open image file failed.
Why is this not working for me?
...
Never mind, it worked!
Very useful topic!

Yo MUST be placed in to your "newrom" folder before start unyaffs command.
[email protected]_name:~$ cd /home/your_name/Desktop/newrom
then type this...
[email protected]_name:~/Desktop/newrom$ unyaffs /home/your_name/Desktop/newrom/system.img
Only type BOLD text.
Never mind, it worked for you!

After repack - no root
I did unpack and repack system.img according this guide (without any changes - only for testing). After flash the ROM works fine, but is not rooted. Original ROM is rooted.
Why? I didn't make any changes in unpacked system.img.
Can anyone help me with this, please?
Thanks.

I think that you must set permissions to all before pack img file.

santroph said:
@FileFixer
Maybe you could also post a way for us to edit the initrd.gz files in the rom builds, so we can make some changes that are necessary for SD builds to work with MAGLDR "AD SD" option ourselves?
Thanks, Santroph.
Click to expand...
Click to collapse
Hi,
Here's a quick howto
* mkdir initrd-temp
* cp initrd.gz initrd-temp
* cd initrd-temp
* gunzip initrd.gz -c | cpio --extract --make-directories
* rm initrd.gz
* Make your changes
* find .|cpio -H newc -o|gzip -9 -c - > ../initrd.gz
I hope that helps

Hey,
thanks for this useful thread!
I have problems in this whole process of booting a custom rom ( in my case Miui) in the Emulator . I have compiled the whole rom on a Linux VM with your Guide and pushed it in a Windows system into android-9/images/system.img but it won't boot I don't know what I am doing wrong. My system.img is 2 GB big I think this is not normal. if i am replacing the system.img with the original out of the emulator, it is booting. I just want to boot the Miui rom to port some features to Cyanogenmod... Thanks in advance. I have a HTC Legend btw .

Related

How to Theme JFv1.51 CRB43-US using Ubuntu

One may think that it was nearly imposible to theme or modify a Us cupcake rom from JesusFreke because of his method of saving space on the system partition. In fact we have extra room for bigger sized themes. Here I will explain to you how to easily open and close the Cramfs files to modify /system/framework folder.
Cramfs can be opened and closed only through a Linux based shell.
To do this in windows, you should download Virtualbox.
After you finish installing it go and download Ubuntu.
Open Virtualbox and click on new. Follow directions to create your new Virtualbox Ubuntu OS.
Make sure you enable usb sharing. So that you can transfer files back and forth to both OS's.
Once you got Ubuntu running, open the terminal.
Type:
Code:
sudo -s
enter your password
apt-get install cramfsprogs
This command loads the Cramfs program files to your (Virtualbox Ubuntu OS).
Once the package installs, your ready to go.
-Opening Cramfs files:
Open terminal on your Virtualbox Ubuntu OS.
Type:
Code:
cramfsck -x /home/username/Desktop/opened 'framework.cramfs'
Cramfsck -x /home/username/Desktop/opened= Where the un cramfs-ed folder will be placed and what the folder is called.
Replace username above, with your user name.
framework.cramfs= the cramfs file you want to open.(Drag and drop in terminal)
The system will create a folder called "opened" on your desktop. (Feel free the change the name of folder from /opened to your liking)
That folder contains the /system/framework files un Cramfs-ed.
-Closing Cramfs files
You MUST be logged on to ROOT before closing Cramfs!!!
You MUST use the ORIGINAL files from the framework and app's folders of CRB43-US to prevent problems!!!
Open terminal on your Virtualbox Ubuntu OS.
Type:
Code:
sudo -s
enter password
mkcramfs '/home/username/Desktop/opened' framework.cramfs
mkcramfs '/home/username/Desktop/opened'= Location of the cramfs file.(Drag and drop in terminal)
Replace username above, with your user name.
framework.cramfs=The name of the cramfs file.
The system will create a cramfs file, located in the /home folder.(Click Places)
I have uploaded a CRB43-US Theme template to make it easier for you.
CRB43_US_Theme_Template.zip
Edit the template's framework and apps files to prevent forcloser!
I hope that you find this information useful in any way.
Here's some helpfull links:
How to manuals for creating themes
How to edit XML's
How to edit .9.png
Great technique. I've not tried it yet however I tried it with Cygwin. Unfortunately I don't think I was able to get it to work with it. Any thoughts?
From the other thread:
You need linux to do this! I mean come on, Android is not a Microsoft product, it's Linux based....Time to get your hands dirty.
Click to expand...
Click to collapse
I'm going to try it on SUSE Linux soon.
blackknightavalon said:
I'm going to try it on SUSE Linux soon.
Click to expand...
Click to collapse
Well ****. I did the sudo -s and password instructions and when I typed in the "apt-get install cramfsprogs" one I got "bash: apt-get: command not found" error message. HALP!!!1!
/SUSE Linux 10
blackknightavalon said:
Well ****. I did the sudo -s and password instructions and when I typed in the "apt-get install cramfsprogs" one I got "bash: apt-get: command not found" error message. HALP!!!1!
/SUSE Linux 10
Click to expand...
Click to collapse
apt-get is for Ubuntu and (i think) other Debian based Linux system. You'll need to use Redhat Package Manager (rpm) or some similar package manager.
http://en.opensuse.org/Libzypp/Package_Management
-Andy in Indy
Binary100100 said:
Great technique. I've not tried it yet however I tried it with Cygwin. Unfortunately I don't think I was able to get it to work with it. Any thoughts?
Click to expand...
Click to collapse
I tried it through Cygwin and I gave up because of the long process. I had to download a mirror site to download the cramfs program. Then I had to relocate most of the folders I wanted to modify because of that shell. Then I got more errors, so I said ...... that!!! And did it the way I posted it. I'll try to get it running on Cygwin and I'll let you know if I'm successful. FYI- you have alot more options on Ubuntu to Open ,see, and modify files on the Android packages, then you would on Cygwin.
So this maybe a newb question for some of you but I installed VirtualBox and Ubuntu 9.04 and followed the instructions. But I've hit a bump.
When I opened Terminal and entered sudo -s it will not let me enter my password. It just stays as a black box that doesn't move. I can type everywhere else... just not there for some reason. What am I missing?
Binary100100 said:
So this maybe a newb question for some of you but I installed VirtualBox and Ubuntu 9.04 and followed the instructions. But I've hit a bump.
When I opened Terminal and entered sudo -s it will not let me enter my password. It just stays as a black box that doesn't move. I can type everywhere else... just not there for some reason. What am I missing?
Click to expand...
Click to collapse
It doesn't show **** or anything, but its entering. Type password and press enter!
RichieDaze said:
It doesn't show **** or anything, but its entering. Type password and press enter!
Click to expand...
Click to collapse
Heh. I was hoping it was that easy. Thanks. I'm playing with it now.
Andy_in_Indy said:
apt-get is for Ubuntu and (i think) other Debian based Linux system. You'll need to use Redhat Package Manager (rpm) or some similar package manager.
http://en.opensuse.org/Libzypp/Package_Management
-Andy in Indy
Click to expand...
Click to collapse
Okay, I checked with my laptop's bin folder and I have rpm installed already. Today's n00b question is "now what?"
Wubi
Why don't you guys just use the wubi installer for ubuntu?
Its pretty mind numbingly easy to set up... and i haven't had any issues with it for the last month I've been using it.
http://wubi-installer.org/
then you can just use apt
jonnybueno said:
Why don't you guys just use the wubi installer for ubuntu?
Its pretty mind numbingly easy to set up... and i haven't had any issues with it for the last month I've been using it.
http://wubi-installer.org/
then you can just use apt
Click to expand...
Click to collapse
The only thing I didn't like about that installation was that I had to reboot to use either OS. With Virtual Box I can run my Os + 1,2, or 3 other OS's at the same time. That how I had it installed before I started using the Live cd to do the work. Thanks for giving us an other option. I guess its up to the users preference. I do recommend its use if you don't mind to reboot.
n00b question time: Would I be able to use the mkfs.cramfs program using SUSE? If so, what are the terminal codes?
/seriously stuck on this
its not working wat am i doing wrong
[email protected]:~$ sudo -s
[email protected]:~# ******
bash: ******: command not found
[email protected]:~# apt-get install cramfsprogs
Reading package lists... Done
Building dependency tree
Reading state information... Done
cramfsprogs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[email protected]:~# cramfsck -x /home/ubuntu/Desktop/opened 'framework.cramfs'
cramfsck: stat failed: framework.cramfs: No such file or directory
[email protected]:~#
Click to expand...
Click to collapse
the ****** is the password.
i have the framework.cramfs
i also have the CRB43_US_Theme_Template.zip file on the ubuntu dektop
i tried this also
[email protected]:~# cramfsck -x C:\Documents and Settings\******\Desktop 'framework.cramfs'
usage: cramfsck [-hv] [-x dir] file
-h print this help
-x dir extract into dir
-v be more verbose
file file to test
[email protected]:~#
Click to expand...
Click to collapse
can someone help
bboy_201 said:
its not working wat am i doing wrong
can someone help
Click to expand...
Click to collapse
Did you pull the cramfs file from the zip onto your desktop before you dragged it onto the terminal?
yes i did..
its on my destop for my windows n my ubuntu desktop
Finally, progress!
Just to update you guys on one thing: After roughly 3 weeks of blindly thrashing about SUSE Linux Enterprise Desktop 10 and its buggy BIOS screen like a n00b, I FINALLY got installed Debian on my laptop! Next step: Figure out how to make a cramfs image and test-port my personal modded Moon Dust theme (with the Firefox logo on the browser and Carbon Black trashcan) before I actually start porting other devs (and them submitting the ports to the original devs for their approval).
Am I the only one actually working on this?
Progress Part The Second
blackknightavalon said:
Just to update you guys on one thing: After roughly 3 weeks of blindly thrashing about SUSE Linux Enterprise Desktop 10 and its buggy BIOS screen like a n00b, I FINALLY got installed Debian on my laptop! Next step: Figure out how to make a cramfs image and test-port my personal modded Moon Dust theme (with the Firefox logo on the browser and Carbon Black trashcan) before I actually start porting other devs (and them submitting the ports to the original devs for their approval).
Am I the only one actually working on this?
Click to expand...
Click to collapse
I had a few bugs to work out, but now Debian is working as good as I can hope to get it working on my laptop. Now I need to compare the differences between the CRB43 framework-res images and RC33's. After that, it'll simply be a matter of a one-for-one swap with the instructions courtesy of OP.
The main thing is that I got the "apt-get install cramfsprogs" part working!

How to cook android

I tried to do this too yesterday, but this spend a lot of time.
for who want to try, here go a link with the basic for make a build.
http://forum.xda-developers.com/showthread.php?t=610303
i searched a most detailed post, but i dont found.
can anyone make an better tutorial?
the only thing that is useful is "how to extract and how to repack the squashfs"
but is useful, is old, i know, but is the only
here is the full post
By jamezelle
[TUT]-PORTING-Android To The VOGUE
after many requests here is the guide
most of this is spread around the vogue
forum here and there, i just wanted to bring it all together
goal-seeing lately we have lost some good developers, this is a shot at getting more involvement in vogue/android development
I.SETTING UP YOUR SYSTEM
1. GETTING LINUX you will need to have Linux installed on your computer(dual-boot, vm, whatever). i recommend Ubuntu karmic (9.10) because its pretty new-user friendly. It can be found at http://www.ubuntu.com/
for you windows lovers here is a guide to setting up a ubuntu VM(virtual machine (if you really didnt know ))
2. THINGS/TOOLS YOU WILL NEED
Download these:
original 8/8/09 ion 1.5 build HERE(we are gonna use the bin-files and the apns-conf.xml, and a few apps) http://sourceforge.net/projects/androidhtc/files/2009-11-16/system-2009-08-08.img/download
the latest rootfs.img (find it)
these android tools (included are genext2fs (android version), split_bootimg.pl, and extract_ramdisk.sh)
after downloading, extract the zip to a folder. open a terminal and cd to the dir of the tools. click applications>accesories>terminal and type:
Code:
cd ~/whatever/
sudo rm -rf /bin/genext2fs
#dont type whats after the pound signs
#type in your password
#if you havent set up a su password yet type:
sudo passwd
#then make one, next
sudo cp -r ./whatever/genext2fs /bin/
squashfs-tools (if you have ubuntu 9.10-karmic first you will have to uninstall squashfs-tools 4.0(4.0 WILL NOT NOT NOT NOT NOT WORK) that is installed during the installation of linux ): go to system>administration>synaptic package manager. type squashfs-tools in the quick search, then right click and click mark for complete removal. then hit apply. then download and install this here http://http://ftp.us.debian.org/debian/pool/main/s/squashfs/squashfs-tools_3.3-7_i386.deb
i also strongly recommend downloading the sdk-tools v1.1(adb is almost essential when porting, for debugging purposes) enatefox has it posted on his media fire. (search for it)
3. ORGANIZATION
now that we have what we need. lets get organized.
a.mount points
we are going to use mount points while porting.
terminal:
Code:
sudo mkdir /mnt/rootfs
sudo mkdir /mnt/system
#i also have one for mounting data files
mkdir /mnt/data
b. directories
terminal:
Code:
mkdir ~/Desktop/android
mkdir ~/Desktop/android/ion
mkdir ~/Desktop/android/donut
#you get the point...
now put the ion 8/8/09 build in the ~/Desktop/android/ion folder and rename it system.sqsh then
terminal:
Code:
cd ~/Desktop/android/ion
unsquashfs ./system.sqsh
you should now have a folder called squashfs-root in the ion directory. it contains all the guts from the ion build. feel free to look around in that folder as you should get familiar with the folders and things in there
II PORTING
1. PORTING A HERO ROM(this was in zens how-to-make-a-hero-rom.txt im just adding on to it)
a. Download a rom from the dream/sapphire development forums.
b. Extract what you downloaded to ~/Desktop/android/hero. It is usually an update.zip.
c. Open the extracted folder. Inside you should see a data directory and a system directory.
d. Open the data directory and look for an app or app_s folder.
e. Open those folders and copy the apks to the system/app/ folder. Leave out what you don't need. feel free to add any custom apps. as long as they are from the same sdk number. ie 1.5, 1.6, 2.0.1, 2.1 most are pretty cross-compatible though.
f. Delete system/xbin from the rom your porting and replace it with the one from Ion.
g. Copy ~/Desktop/android/ion/squashfs-root/etc/apns-conf.xml from Ion to ~/Desktop/android/hero/system/etc/
h. Mount the latest rootfs.img
terminal:
Code:
sudo mount ~/whereever/rootfs.img -o loop /mnt/rootfs
i. Copy libaudio.so libaudioflinger.so libcameraservice.so libgps.so from /lib in the mounted rootfs over to system/lib in the rom you are porting*(donut and eclair really dont need this step because those files are in most of the latest rootfs.img's but be sure to check)
j. Edit the system/build.prop or even use the Ion build.prop.*(for donut/eclair you may want to edit the lcd density to 120 or 110 in the build.prop for qvga and 160 for 320x480)
k. Create a blank file in system/ called hero.build*(for eclair/donut create donut.build or eclair.build or eclairhero.build.....etc)
*l. for hero any systems too big to run on nand, here is a script to make a data file. put this in the ~/Desktop/android/hero directory. cut the app folder from ~/Desktop/android/hero/system and paste it to ~/Desktop/android/hero , and rename it too app_s . next run the mkdataimg.sh it should ask for you password in a terminal. type it in and then it should mount the data.img to data-mnt folder in ~/Desktop/android/hero . keep that terminal open copy the app_s folder in to data-mnt. then type y in the terminal to unmount the data.img. next:
terminal:
Code:
cd ~/Desktop/android/hero
ln -s /data/app_s ./system/app
that should make a broken symlink in system
2. Mount it and squash it
ok now that we are done porting lets put it together
terminal:
Code:
cd ~/Desktop/android/hero
genext2fs -d ./system -b 180000 -a system.ext2
sudo mount -o loop ./system.ext2 /mnt/system
sudo mksquashfs /mnt/system system.sqsh
sudo chown $USER ./system.sqsh
#and if you want
rm -rf ./system.ext2
After i will post my genext2fs
Htanks for the guide, i will try
ftp://ftp.us.debian.org/debian/pool/main/s/squashfs
The link for some reason wasn't working, so I decided to repost it seeing as how the http:// extension breaks it? Hm. Well, that's just linking to the directory tree incase if you're a 64-Bit Linux user like me .
Also, I think the instructions should be altered a bit as it doesn't seem to tell how to use squashfs tools. (I personally don't use genext2fs, but I know XDAndroid is compatible)
Here's the syntax:
Code:
mksquashfs <directory containing your Android root> <squash file destination> <other parameters>
Live example of such a usage would be:
Code:
mksquashfs ./ /home/John/desktop/system.sqsh
To extract an existing squashfs:
Code:
unsquashfs <squashfile> <extraction destination>
Note: Even squashfs-tools 4.0 seems to work just fine with extracting older versions.
There's a HOWTO document which goes more in-depth than my general overview of creating a basic system.sqsh. I only listed the key things that you would need to know.
http://tldp.org/HOWTO/SquashFS-HOWTO/mksqoverview.html
Essentially, it's almost no different than building any other Android ROM. Stinebd actually has a kitchen made for the XDAndroid package.
http://southcape.org/category/android/ <-- His blog
http://xdandroid.com/wiki/Main_Page <-- Official Wiki
There are other parameters which are optional, just type "man mksquashfs" to pull up the help man docs. Oh, and you should probably put it in bold that the version of squash-tools matters so people see that better. There's a reason for why the newer ones break compatibility with the older versions.

Ubuntu/Debian install for Slide

Ok so the ubuntu install now works on slide credit goes to eratosthene he updated all the files to make it work all other credit goes to the dev’s listed on the links provided. FYI this was tested on eugenes latest froyo rom.
1. Go to http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/ download the ubuntu.zip file .
2. Unzip to a location on your pc to a folder named ubuntu.
3. Download the ubuntu-slide-v2 from here.
4. Unzip the ubuntu-slide-v2 to the same folder you used in step 2.
5. Create a ubuntu folder on the root of your sdcard .
6. Connect your Slide to the pc verify debugging enabled and storage disabled.
7. Adb push the files in the ubuntu folder to the /sdcard/ubuntu.
8. Then adb shell.
9. cd /sdcard then sh ubuntu.sh
Note: At this point, the scripts are now located in /data/local/bin and the mount point is /data/local/mnt
10. sh /data/local/bin/bootubuntu
11. you should now see [email protected]:/#
Note : install completed only do the following if you want to access ubuntu from android vnc app.
12. apt-get update
13. apt-get install tightvncserver
14. export USER=root
15. vncserver -geometry 480x320
16. • Run the android-vnc-viewer app and specify localhost port 5901 .
UPDATE: This is not working on CM 6 , I'm not sure why please help if you know .
That would be sooooo coool
Sent From My HTC Espresso Running Froyo Thanks to eugene373
Tried it but the install fails , may be the script or may be rights to edit the files im not that good with linux yet so im not sure .
Ok thanks, any help would be apriciated . If we can get a procedure that works ill write up a step by step for everyone and maybe make a video how to also.
Just guessing but it's probably because we don't have rw access to /system.
Until we get an unlocked bootloader it ain't happenin...
I could be completely way off though
I think you are right , if i rember most the errors where do to access issue's with files in the system folder. If it is the bootloader what would need to be done to " unlock " it ?
bled82 said:
I think you are right , if i rember most the errors where do to access issue's with files in the system folder. If it is the bootloader what would need to be done to " unlock " it ?
Click to expand...
Click to collapse
An OTA update would unlock it.
So once we get the froyo ota we should be able to follow the same process as the nexus one then ?
i would say "unlikely," i dont see how an ota would unlock the bootloader in any fashion. but i guess he might have been referencing the possibility of someone using the new ota to create an unlocked bootloader. the whole "how could the bootloader be unlocked," question bothers me, i never seem to get a straight answer
aceraider4 said:
i would say "unlikely," i dont see how an ota would unlock the bootloader in any fashion. but i guess he might have been referencing the possibility of someone using the new ota to create an unlocked bootloader. the whole "how could the bootloader be unlocked," question bothers me, i never seem to get a straight answer
Click to expand...
Click to collapse
Once there is an official OTA devs will be able to extract the keys needed to properly sign files I believe.
I thought the engineering build had an unlocked boot loader on it and once we flashed it that was that ?
Here's an updated zip for you guys. The process is generally the same as on the above-linked nexus one version, I just changed the scripts to move a few files to different places. You'll need to download ubuntu.zip from that post as well. Summary:
unzip ubuntu.zip somewhere
unzip ubuntu-slide.zip in the same place, replace all the files
make a directory called 'ubuntu' on your sdcard
adb push all the files in the zip to that directory
adb shell
cd /sdcard/ubuntu
sh ubuntu.sh
At this point, the scripts are now located in /data/local/bin and the mount point is /data/local/mnt
sh /data/local/bin/bootubuntu
You're now chrooted into the ubuntu install. Have fun.
Thanks going to try it now !!!
Does not work get attached error.
bled82 said:
Does not work get attached error.
Click to expand...
Click to collapse
I haven't tried this but based on your error, try this from the shell:
mkdir /data/local/bin
then run the ubuntu.sh again
falken98 said:
I haven't tried this but based on your error, try this from the shell:
mkdir /data/local/bin
then run the ubuntu.sh again
Click to expand...
Click to collapse
I did cd /data/local then ls and bin is listed , ran mkdir /data/local/bin failed file exists . i cant cd /data/local/bin get error cant cd to /data/local/bin
bled82 said:
I did cd /data/local then ls and bin is listed , ran mkdir /data/local/bin failed file exists . i cant cd /data/local/bin get error cant cd to /data/local/bin
Click to expand...
Click to collapse
This is some other script messed up when bin wasn't there and ended up creating a file called bin instead of it being a directory.
rm /data/local/bin
mkdir /data/local/bin
falken98 said:
This is some other script messed up when bin wasn't there and ended up creating a file called bin instead of it being a directory.
rm /data/local/bin
mkdir /data/local/bin
Click to expand...
Click to collapse
Ok getting closer , Thank you very much . Now when i ran sh .data/local/bin/bootubuntu i get error attached .
bled82 said:
Ok getting closer , Thank you very much . Now when i ran sh .data/local/bin/bootubuntu i get error attached .
Click to expand...
Click to collapse
What rom are you using? It looks like you don't have the ext3 module built into your kernel. I set my scripts up to use ext3 (more reliable, I really don't care that it eats into the life of my sd card), but many roms only have ext2. You might try uncommenting the first line of bootubuntu, and changing the ext3 to ext2 on line 10.
eratosthene said:
What rom are you using? It looks like you don't have the ext3 module built into your kernel. I set my scripts up to use ext3 (more reliable, I really don't care that it eats into the life of my sd card), but many roms only have ext2. You might try uncommenting the first line of bootubuntu, and changing the ext3 to ext2 on line 10.
Click to expand...
Click to collapse
I am running froyo using Kanged CM6 newbuild.zip from eugene373 , http://forum.xda-developers.com/showthread.php?t=721515 .

Help to get boot.img of my stock kernel

I'm new @xda and @SGy. Please tell me how to get boot.img of my kernel(As boot.img file)
(This file is for my f***ing bro. I don't let him to touch my SGy.)
Pls tell a easier method.
••••Rocking SGy™••••
Use root explorer and extract. Or andro zip. Any file manager free
Sent from City of Angels
Install Terminal Emulator from Google Play Store and enter these commands one after the other:
su
dd if=/dev/block/bml7 of=/sdcard/boot.img
tar cvf /sdcard/kernel-backup.tar /sdcard/boot.img
Boot.img and Kernel-backup.tar (for Odin flash) will be created.
Raol Emostar said:
Install Terminal Emulator from Google Play Store and enter these commands one after the other:
su
dd if=/dev/block/bml7 of=/sdcard/boot.img
tar cvf /sdcard/kernel-backup.tar /sdcard/boot.img
Boot.img and Kernel-backup.tar (for Odin flash) will be created.
Click to expand...
Click to collapse
Hi Raol,
I typed the command above and got my boot.img. However, when I try to work on it with Kitchen, it tells me that I must first root my ROM... but my ROM is already rooted. Is there someting missing in my boot.img? Is there another command to include the su binaries in the boot.img?
NB: I have a Samsung Galaxy Y Duos
JohnNAVI said:
Hi Raol,
I typed the command above and got my boot.img. However, when I try to work on it with Kitchen, it tells me that I must first root my ROM... but my ROM is already rooted. Is there someting missing in my boot.img? Is there another command to include the su binaries in the boot.img?
NB: I have a Samsung Galaxy Y Duos
Click to expand...
Click to collapse
nothing missing ............(BTW What Is Ur File Size)
root is usually stored outside the kernel. some of kernel have build in root, but it's only on custom kernel. stock kernel never have build in root. btw, what are you trying to do with your kernel? dsixda kitchen only have limited option to modify kernel. as far as I know it only has extract, build, and add init.d option. I've been doing that for several times and it succed. all my modified kernel is created via dsixda's kitchen.
kurotsugi said:
root is usually stored outside the kernel. some of kernel have build in root, but it's only on custom kernel. stock kernel never have build in root. btw, what are you trying to do with your kernel? dsixda kitchen only have limited option to modify kernel. as far as I know it only has extract, build, and add init.d option. I've been doing that for several times and it succed. all my modified kernel is created via dsixda's kitchen.
Click to expand...
Click to collapse
I'm triying to add init.d option to my rooted stock kernel. Unfortunately, I always get the following message in Kitchen:
'su' binary not found under working folder!
You must root your ROM first.
But if, as you say, root is stored outside the kernel, I understand why it doesn't work. Is there another way to add init.d to my stock kernel?
BTW, my boot.img file is 5120Ko.
search mikstev's post about droidwall. you can find the tut inside his zip file. extract that file then check readme.txt
EDIT: I forgot that you're using sgy duos. you'll need to extract boot.img via kitchen, find init.rc. add these script
Code:
start sysinit
class_start default
and
Code:
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
please refer to mikstev's init.rc to find where to put those script.
I tried to extract boot.img via Kitchen following mikstev's tuto, but it didn't work.
I have my boot.img in a folder called /kitchen/WORKING_XXX. In kitchen, I choose 0, then 20 and 'w'. And I get the following message:
Working folder found
Error: system folder not found under working folder!
I could extract boot.img with 'a'. I then get a file called zImage and a folder called boot.img-ramdisk. In boot.img-ramdisk I find the init.rc file. I modify it by adding the scripts following mikstev's tuto. But then, I cannot build a new boot.img as the 'b' option in not available in kitchen.
Do you have any idea why I cannot complete mikstev's tuto?
EDIT: Please do not take into account what I wrote above. My problem was that the file called zImage and the folder called boot.img-ramdisk must be placed in a folder named BOOT-EXTRACTED and not EXTRACTED_BOOT as mentioned in mikstev's tuto.
ah...thats it. you don't have system folder in working_xxx folder. if you have cwm, make a backup of your rom, copy system.rfs.tar to your computer, extract the file, then put whole system folder into working_xxx.
kurotsugi said:
ah...thats it. you don't have system folder in working_xxx folder. if you have cwm, make a backup of your rom, copy system.rfs.tar to your computer, extract the file, then put whole system folder into working_xxx.
Click to expand...
Click to collapse
I tried your method and that's probably the best way to make it work.
But I found a way around. What I did is extract my boot.img with the 'a' option (no need for system folder), rename the folder where boot.img has been extracted to BOOT-EXTRACTED, modify init.rc and build a new boot.img with 'b' option. Maybe not as clean as your method, but it's a newbie way .
I then installed the new boot.img and I checked that the init.rc file in my root was the modified one (which was the case). However, it seems that init.d support is not working as the scripts installed in the init.d folder didn't execute. Is it due to my noob method? Should I try your method instead?
Thanks a lot for helping me in my first steps in the Android world.
how did you test the init.d script? a simple way to test init.d script is by make a file in init.d contain
Code:
#!/system/bin/sh
touch /data/kurotsugi.txt
make sure that you have installed busybox and set the file permission to 777 (rwxrwxrwx). if the init.d script is working you'll find kurotsugi.txt in /data
kurotsugi said:
how did you test the init.d script? a simple way to test init.d script is by make a file in init.d contain
Code:
#!/system/bin/sh
touch /data/kurotsugi.txt
make sure that you have installed busybox and set the file permission to 777 (rwxrwxrwx). if the init.d script is working you'll find kurotsugi.txt in /data
Click to expand...
Click to collapse
I set the permission to 777 and your test file (called 03test) in init.d but nothing happens.
What I did in fact is to put the following command line in the updater-script of my update.zip file (used to transfer the 03test file to init.d):
Code:
set_perm(0, 0, 0777, "/system/etc/init.d/03test");
Any idea why this doesn't work?
have you install the busybox?
if that method didn't work you can try the other method that I've given to you.
I have busybox installed. But when I want to
Code:
chmod 777 03test
I get the following error message:
Unable to chmod 03test: Read-only file system
That's why I have to go through the update.zip method.
I also reinstalled the new boot.img created with your method but nothing changes. The scripts in init.d don't run at startup.
JohnNAVI said:
I think I have found the reason why it doesn't work. I have installed Busybox v1.18.14 and it looks like run-parts is not supported in this version. I will install a new version of Busybox and I will keep you posted.
Click to expand...
Click to collapse
It was a problem with the old Busybox version that did not support run-parts. I installed v1.19.4 and everything is working fine now.
Thank you so much for helping me kurotsugi. Have a nice day.

[TUT][NOOB FRINDLY] Building Flashable On Device Rom-Kernel

Hello Guys
Iam Guiding you today to build your on device rom most Of u can do it but i belive somebudy doesn't know That is Noob Frindly Guide
Requirements
Code:
1-PC
2-Winrar/7zip
oR Root Explorer on Mobile
Part A (Rom Building)
METHOD1
Step1
Code:
Reboot To Recovery
Step2
Code:
Make Nandroid Backup
Step3
Code:
Open Your pc and connect via usb
Step4
Code:
Bull Your clockworkmod folder to pc
Step5
Code:
Extract Templete rom.zip attached below
Step6
Code:
Navigate to your cwm backup
Step7
Code:
Extract System(..).tar
Step8
Code:
Copy The files u extracted (inside system folder u extracted) To Template rom/ System/
[B]NOTE:DONT COPY WHOLE SYSTEM FOLDER - JUST ITS COMPONENTS[/B]
Step9
Code:
Go to Template Rom Folder Select Meta-inf
and system
then add them to new Archive with .zip extintion
Step10
Code:
Flash your rom and enjoy
METHOD 2
Code:
1. Go to treminal emulator
2. Type these commands dont copy that >"
[CODE]
1."su"
2."tar -c system/* >> sdcard/system.tar"
3.navigate to your sd root
4.extract system.tar
5.put its components to template rom>system (like method 1)
6.Enjoy
[/CODE]
Part B (On Device Kernel Packing)
Step 1
Code:
Follow Steps Up From 1-6
Step 2
Code:
Get Boot.img and put it in the root of zip attached (Kernel Template)
Credits
Myaservip
Marcussmith2626
you can also type in terminal emulator
su
tar -c system/* >> sdcard/system.tar
wait until the command promp returns (may take 5 mins so make sure screen timeout is set to at least 15mins to make it easier for you to keep an eye on it without the screen keep turning off)
once done you will have a file called system.tar on the root of your sd card
you can then load this file in android kitchen which is useful for deodexing
or you can just extract it and all your system files will be there to do with as you like - eg put in a flashable zip
note the above requires the following
root
terminal emulator (playstore)
busybox installed (get installer from playstore if not already installed)
my method in spoiler above added to op
How about my data.rfs.tar? Will I Flash again my Tweak on Phone, after reflashing the ROM backup?
U can push them by adb or wait untill i make data script
When I Flash my ROM Backup, It stucks on black screen But Heard the Boot Sound not the animation display.
Try fix premisions
I will update my template if it worked
Or u might deleted my fix premision binary
Be aware dont replace/delete it to avoid bootloops/breaks
myaservip said:
I will update my template if it worked
Or u might deleted my fix premision binary
Be aware dont replace/delete it to avoid bootloops/breaks
Click to expand...
Click to collapse
I'll Try again. *Report Later.

Categories

Resources