@c1cl0n
you should use root user to make the new initrd.gz otherwise some weird problem will happen.
and change the Nand ROM to NativeSD if you based on the Nand ROM's init.rc
some contents in the file should be commented. (mount xxx )
glad to see you dimdimdim & datagr :good:
i edited initrd.gz for "Sense" now working Native SD but with old kernel Ty14 ... market & download FAST no more lag for market ...
i try again for kernel marc .... need some magic
- Change name of your port folder in this line:
example:
- Save changes & execute script:
Hi pvkanjiyani
I don't understand too many logcat errors, but some one, like "Unknown permission" may point to your META-INF\com\google\android\updater-script
Verify original permissions (from NAND updater-script) with your
About network, I think you forgot to change kernel files (zImage and/or system\lib\modules)
Now create temporary work folder, if it wasn't exist by command:
Quote:
c1cl0n@ubuntu:~$ md myport
Now create temporary work folder, if it wasn't exist by command:
Quote:
c1cl0n@ubuntu:~$ mkdir myport
Yes peibolvig, little bug in tutoHi, thanks for your work (I already clicked the thanks button )
There is a typo in the STEP 3
Where it says:
Should be:
This is my little contribution
I am searching for a utility like the portadroid which we were using to port the NAND ROMs to SD ROM
is it possible to fined one to do so from NativeSD to SD
I was trying to change the init in the initrd.gz file but its encrypted how could i change it sow i can change the rom name? Or must i change the locations in the init.rz? sow the rom will boot the correct one.
package_extract_dir("NativeSD", "/tmp");
set_perm(0, 0, 0777, "/tmp/nativesd.sh");
run_program("/tmp/nativesd.sh");
package_extract_dir("data", "/data");
Get the v2 template (example.zip) from here http://xdaforums.com/showpost.php?p=31110719&postcount=2
And HypoTurtle's Patcher (and nativesd.sh.txt) from here http://xdaforums.com/showthread.php?t=1953428 and put the extracted NativeSD folder into the extracted template folder (alongside other folders)
Put your nand ROM's (nand) zImage and initrd.gz in template's kernel/boot and kernel/bootSD (you will overwrite it later), put both in both.
When editing scripts, use Notepad++
Put the lines
in template's (meta-inf/com/google/android) updater script before package_extract_dir("system", "/system"); in the SD-Ext install section.Code:package_extract_dir("NativeSD", "/tmp"); set_perm(0, 0, 0777, "/tmp/nativesd.sh"); run_program("/tmp/nativesd.sh");
And copy symlinks and permissions from your new ROMs updater script to template's updater script in the relevant section below SD-Ext install.
Edit template's aroma config with details of the ROM you are porting.
And put the nand initrd.gz in NativeSD folder
And put the nativesd.sh.txt saved as nativesd.sh in NativeSD folder.
And put correct unique ROM_NAME in install.sh
Put the system folder from new ROM to template folder (delete any apps2SD APK from system/apps and sytem/etc/init.d scripts)
Re-zip template contents and rename the zip to whatever
Flash using your favourite sd recovery
After flashing, you should have 2 extra .gz files in NativeSD folder, rename one of them to initrd.gz (overwrite) and see if it boots. if not, then try the other.
If it boots copy the initrd.gz from NativeSD to NativeSD/whetever-rom_name-you-chose and overwrite the one there, so that you can boot it after trying another ROM.
If you are posting the ROM, delete NativeSD folder from your template folder and remember to put a copy of your edited initrd.gz in kernel/bootSD.
Hope I haven't missed anything
Thanks to HypoTurtle, Xylograph, Securecrt, marco.palumbi, aroma ppl and others.
Edit; Different nand ROMs use aroma installer to install apps and options, you may have to play around with the aroma scripts to get these to work. Also, some ROMs have a data folder, you can add a line in updater script to install it.
after "package_extract_dir("system", "/system");"Code:package_extract_dir("data", "/data");
Thanks this is helpfull mate,
the next thing where i walk to a front is how to do it with clk, when you dont have any initrd.gz but the boot.img? Maybe to much questions i dont know.
See http://xdaforums.com/showpost.php?p=20227868&postcount=1124 to extract from pc
Or if using linux, use dsixda kitchen http://xdaforums.com/showthread.php?t=633246
This method based on SecureCRT with my modifications and comments[/COLOR]
C:\myport\kernel\boot\place kernel + nand ramdisk here
C:\myport\kernel\bootsd\place kernel + sd-ext ramdisk here
C:\myport\kernel\checksys.sh
C:\myport\kernel\mkbootimg
C:\myport\kernel\mkbootimg
C:\myport\META-INF\com\google\android\aroma\ etc... etc... etc...
C:\myport\META-INF\com\google\android\aroma-config
C:\myport\META-INF\com\google\android\update-binary
C:\myport\META-INF\com\google\android\update-binary-installer
C:\myport\META-INF\com\google\android\updater-script
C:\myport\sdcard\NativeSD\clrcad.exe
C:\myport\sdcard\NativeSD\haret.exe
C:\myport\sdcard\NativeSD\startup.txt
C:\myport\system\place the rom system folder contents in here
C:\myport\install.sh
C:\myport\kernel\boot\place kernel + nand ramdisk here
C:\myport\kernel\bootsd\place kernel + sd-ext ramdisk here
C:\myport\system\place the rom system folder contents in here
C:\myport\system\app\ ... include files, folders & subfolders
C:\myport\system\bin\ ... include files, folders & subfolders
C:\myport\system\etc\ ... include files, folders & subfolders
C:\myport\system\fonts\ ... include files, folders & subfolders
C:\myport\system\framework\ ... include files, folders & subfolders
C:\myport\system\lib\ ... include files, folders & subfolders
C:\myport\system\media\ ... include files, folders & subfolders
C:\myport\system\tts\ ... include files, folders & subfolders
C:\myport\system\usr\ ... include files, folders & subfolders
C:\myport\system\vendor\ ... include files, folders & subfolders
C:\myport\system\xbin\ ... include files, folders & subfolders
C:\myport\system\build.prop
P.S. Your module files may be diffirents, just delete it allC:\myport\system\lib\modules\alsa-mix-htc-leo.ko
C:\myport\system\lib\modules\alsa-pcm-htc-leo.ko
C:\myport\system\lib\modules\bcm4329.ko
C:\myport\system\lib\modules\cifs.ko
C:\myport\system\lib\modules\fuse.ko
C:\myport\system\lib\modules\kineto_gan.ko
C:\myport\system\lib\modules\msm_rmnet.ko
C:\myport\system\lib\modules\tun.ko
From: HyperDroid-CM7-v6.0.1_NativeSD modules folder:
HyperDroid-CM7-v6.0.1_NativeSD.zip\system\lib\modules\
It should be like this:
C:\myport\system\lib\modules\bcm4329.ko
C:\myport\system\lib\modules\cifs.ko
C:\myport\system\lib\modules\fuse.ko
C:\myport\system\lib\modules\kineto_gan.ko
C:\myport\system\lib\modules\msm_rmnet.ko
C:\myport\system\lib\modules\reiserfs.ko
C:\myport\system\lib\modules\tun.ko
C:\myport\system\lib\modules\zram.ko
From: HyperDroid-CM7-v6.0.1_NativeSD.zip\kernel\boot\initrd.gz
To: C:\myport\kernel\boot\initrd.gz
From: HyperDroid-CM7-v6.0.1_NativeSD.zip\kernel\bootsd\initrd.gz
To: C:\myport\kernel\bootsd\initrd.gz
And chenge (red selected: EXAMPLE) to your likly port name:
P.S. This is example. Do not use spaces!!
Where \username\home\ is your own home folder in Linux, and \myport\ is temprary folder to this step. Create it if don't existsFrom: C:\myport\kernel\bootsd\initrd.gz
To: \username\home\myport\initrd.gz
If you see root folder or some other forlder, not username@servername:~$ you can change it by this command:
c1cl0n@ubuntu:~/myport$ cp ./initrd.gz ./work
c1cl0n@ubuntu:~/myport$ cd ./work
c1cl0n@ubuntu:~/myport/work$ gunzip initrd.gz
c1cl0n@ubuntu:~/myport/work$ cpio -i < initrd
3261 Blocks
/bin /data /dev /proc /sbin /system
default.prop init init.android init.htcleo.rc init.htcleo.usb.rc init.rc initrd.gz
logo.rle ueventd.htcleo.rc ueventd.rc
c1cl0n@ubuntu:~/myport/work$ cp ./init ../
c1cl0n@ubuntu:~/myport/work$ chmod 777 ../init
and change it to your name, what you did in Nottepad++ with install.sh file
Deleting old initrd.gz it is very important becase we will save all changes in old initrd.gz file in /username/home/myport/initrd.gz
c1cl0n@ubuntu:~/myport/work$ find . | cpio -o -H newc | gzip > ../initrd.gz
3261 Blocks
If Linux talks about permissions, like Access Denied!, change your username to root by command:c1cl0n@ubuntu:~/myport/work$ cd ../..
c1cl0n@ubuntu:~$ chmod 777 ./myport
c1cl0n@ubuntu:~$ sudo su
c1cl0n@root:~$ _
c1cl0n@root:~$ rm -rf ./myport
run_program("/tmp/install.sh");
if file_getprop("/tmp/nfo.prop","NativeSD") == "true"
then
To:symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/arp", "/system/xbin/ash", "/system/xbin/awk",
"/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/brctl",
It is must be like this:set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/arp", "/system/xbin/ash", "/system/xbin/awk",
"/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/brctl",
"/system/xbin/bunzip2", "/system/xbin/bzcat", "/system/xbin/bzip2",
"/system/xbin/cal", "/system/xbin/cat", "/system/xbin/catv",
"/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown",
"/system/xbin/chroot", "/system/xbin/cksum", "/system/xbin/clear",
"/system/xbin/cmp", "/system/xbin/cp", "/system/xbin/cpio",
"/system/xbin/cut", "/system/xbin/date", "/system/xbin/dc",
.........
.........
.........
.........
.........
set_perm(0, 0, 06755, "/system/xbin/hcitool");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/tcpdump");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 0, 06755, "/system/xbin/su");
if file_getprop("/tmp/nfo.prop","NativeSD") == "true"
then
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/arp", "/system/xbin/ash", "/system/xbin/awk",
"/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/brctl",
"/system/xbin/bunzip2", "/system/xbin/bzcat", "/system/xbin/bzip2",
"/system/xbin/cal", "/system/xbin/cat", "/system/xbin/catv",
"/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown",
"/system/xbin/chroot", "/system/xbin/cksum", "/system/xbin/clear",
..........
..........
..........
..........
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/tcpdump");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
package_extract_dir("kernel/bootsd", "/boot");
package_extract_dir("kernel/bootsd", "/boot_dir");
package_extract_dir("sdcard", "/sdcard");
package_extract_dir("system", "/system");
else
ui_print("can't find ext4 partition on your SDcard");
ui_print("install failed");
endif;
endif;
##
# ROM SYMLINKS AND PERMISSONS
##
Find this:
ini_set("rom_name", "EXAMPLE");
ini_set("rom_version", "v2");
ini_set("rom_author", "DEVELOPER");
ini_set("rom_device", "HTC HD2");
ini_set("rom_date", "TODAY");
Change to this:
ini_set("rom_name", "NexusCM7");
ini_set("rom_version", "v2");
ini_set("rom_author", "YourNickName");
ini_set("rom_device", "HTC HD2");
ini_set("rom_date", "CurrentDate");
and install it via 4EXT Recovery for NativeSD port
as I understand, it is not possible to use nativesd script with sense3.5 roms?
I was trying to change the init in the initrd.gz file but its encrypted how could i change it sow i can change the rom name? Or must i change the locations in the init.rz? sow the rom will boot the correct one.
package_extract_dir("NativeSD", "/tmp");
set_perm(0, 0, 0777, "/tmp/nativesd.sh");
run_program("/tmp/nativesd.sh");
package_extract_dir("data", "/data");