Android init.rc Language - myTouch 3G, Magic Android Development

Hi XDA,
I havent found much on this topic on the forum. I wonder if anyone can elaborate or link me in the right direction regarding this issue.
Im working with Amon_Ra's latest 1.6.2 ROM. I unzipped it, took the boot.img, unpacked it, add a line in /etc/fstab and init.rc, repacked it, zipped the ROM, signed it, flashed it. But my changes dont seem to do the trick.
the following was added to init.rc
Code:
mount ext2 /dev/block/mmcblk0p2 /system/sd rw noatime nodiratime
and this was added to /etc/fstab
Code:
/dev/block/mmcblk0p2 /system/sd ext2 rw
Yes /system/sd exists, and Yes my microSD is partitioned correctly. I presume my line might be in wrong syntax? Or? Wiped before I flashed, didnt help.
If I've missed a thread on init.rc syntax I pardon that
Any help is appreciated!

altso tried,
Code:
mount ext2 [email protected] /system/sd
any suggestions at all?
bump, bump!

im running a motorola cliq, but i do know that the init.rc has the ability to start services.
You may want to try adding your lines into a script (shell script), and put that script into /system/bin
THEN add a command to open console and start that particular script, in init.rc
works for me with apps2sd for cliq.

Related

Squashfs not automounting at init

Okay, so I'm most likely missing something stupidly obvious, but I'm pretty much banging my head against the wall here, so...
I'm trying to make squashfs work with my 32A kernel compile (from Cyanogen's sources - tried both regular and BFS), specifically the usual /system/modules/modules.sqf. Problem is, the file doesn't mount at startup. The kernel is compiled with squashfs support in kernel (=not as a module, obviously), loopback, loopcrypto and LZO compression support is also compiled in. The init.rc is pretty much the basic init.rc for any Hero ROM (specificaly we're talking about Qteknology ROM), which contains the usual
Code:
import /system/init.rc
trigger system
and the /system/init.rc contains just
Code:
on system
mount squashfs [email protected]/system/modules/modules.sqf /system/modules ro
There's also the corresponding line in fstab. Yet when the phone boots, /system/modules is not mounted. Strange thing is that when i enter mount /system/modules in terminal, it simply mounts without any problems. I thought this might have something to do with permissions, but I really can't track anything wrong with them. No obvious errors in logs as well. I've tried pretty much anything I could think of, spent countless hours trying to solve it, but I'm very much out of ideas. Anybody has any idea about what's going on here? Thanks for any suggestions.
mount -t sqaushfs?
I dont think mount supports specification of the FS without the -t flag.
If you mean adding the -t to the init.rc, then init.rc entries obviously follow somehow different mount syntax.
Ive got a thread regarding the init mount syntax aswell. You would think that with all of these ROM cookers and such around on the forum atleast someone would care to clarify this, as these certain people obviously detain more knowledge on this then we do, haha

[Q] How to create a symlink on every reboot?

Hi!
I'm using the Tiamat Custom ROM and am facing the problem, that the external SDcard is mounted on /mnt/external1 and symlinked to /MicroSD. But I'm using an app that needs it mounted on /sdcard-ext.
Now I have remounted / and symlinked /mnt/external1 to /sdcard-ext and that works until my next reboot (the symlink isn't reboot-proof ;-) ). Now I'm searching for a way to automatically create that symlink on each reboot.
Can anyone help me?
Thanks guys!
McDV
Create a script in /etc/init.d to do it.
You'll need to remount / to read+write first though.
PM me if you need help setting this up -- its really easy to do. You need to name your script with a specific run level (I believe).
I've done this on my phone to set up swap partitions and the like. Its really easy!!!
Thanks for your help! I'm quite firm in shell-operations, I just didn't think I could just put a script to /etc/init.d!
I'v created a shell-script named 07sdcard and with the content:
Code:
#!/system/bin/sh
rootrw
ln -s /mnt/external1 /sdcard-ext
rootro
Works geat!
You've got it now -- awesome.
HI,
Could this be a way to mount the external1 as rw at boot ?
See here: http://forum.xda-developers.com/showthread.php?t=1173195

Experiments with GB Kernel

I'm opening this thread to share information about experiments with the new GB kernel with other devs/contributors of M2 community.
Based on the idea of dual-booting I managed today to get my phone running using system directly from an image on /data.
The base system installed is boot/devtree/recovery from signed GB Leak with Mostly Blurless ROM. I created an image from this same system with dd if=/dev/block/system of=/data/blurless.img.
I then edited bootmenu 2nd-int init.rc to:
- comment lines that mount /data and /system
- added the following lines:
Code:
mount ext3 [email protected] /data nosuid nodev noatime nodiratime barrier=0
mount ext3 [email protected]/data/blurless.img /system noatime nodiratime barrier=1
In init.mapphone_umts.rc:
- commented lines that remounts /system
- added following line:
Code:
mount ext3 [email protected]/data/blurless-system.img /system ro noatime nodiratime remount
In /system/bootmenu/scripts/2nd-init.sh:
Code:
#!/sbin/sh
######## BootMenu Script v0.8.6
######## Execute [2nd-init] Menu
export PATH=/sbin:/system/xbin:/system/bin
######## Main Script
rm /*.rc
cp -r -f /system/bootmenu/2nd-init/* /
cp -fp /system/bootmenu/binary/2nd-init /sbin/
chmod 755 /*.rc
#chmod 755 /system/bootmenu/binary/2nd-init
chmod 755 /sbin/2nd-init
umount /acct
umount /mnt/asec
umount /dev/cpuctl
umount /dev/pts
umount /mnt/obb
## sbin cleanup
## move post_bootmenu.sh
#/system/bootmenu/binary/2nd-init
umount -l /system
/sbin/2nd-init
exit
Works fine and system is really mounted on loopback device after boot. Now I want to mount on init.rc /data as a bind fs. Does anyone know how to do that as a init.rc script command?
As a test I tried
mount ext3 [email protected]/data/system /mnt/data
but it didn't work
Ok. I found a way to do that mounting data first as /mnt/data then mounting loopback system. with system ready I can mount bind /data with the following command:
exec /system/xbin/busybox mount -obind /mnt/data/rom/blurless-data /data
I'd like better to mount this with a native init command if anybody knows how to, but for the moment this will do.
It doesn't work because bind is not supported by the original mount command ?
Anyway, may be you can do symlink with the data directory .
But good job allowing us to test img system without breaking existing one !
Trying now to boot MIUI on a second system image I get the following error:
08-26 21:06:40.773 2971 2979 E FramebufferNativeWindow: couldn't open framebuffer HAL (No such device)
I'm not sure if this error was caused by kernel incompatibility or by some special file libsurfaceflinger could not find. Doing strings | grep on libsurfaceflinger.so from miui I could find this references:
/dev/tty0
/sys/android_power/wait_for_fb_sleep
/sys/android_power/wait_for_fb_wake
/sys/class/graphics/fbcon
/sys/power/wait_for_fb_sleep
/sys/power/wait_for_fb_wake
Maybe we can map old devices to new devices (ln -s) at run time and make it work but I don't know exactly how to map them.
Edit: I am unable to create anything in /sys, even mounting it as RW. Does n1 know what I should do?
Yeah! You rule!
r2beta0 said:
Trying now to boot MIUI on a second system image I get the following error:
08-26 21:06:40.773 2971 2979 E FramebufferNativeWindow: couldn't open framebuffer HAL (No such device)
I'm not sure if this error was caused by kernel incompatibility or by some special file libsurfaceflinger could not find. Doing strings | grep on libsurfaceflinger.so from miui I could find this references:
/dev/tty0
/sys/android_power/wait_for_fb_sleep
/sys/android_power/wait_for_fb_wake
/sys/class/graphics/fbcon
/sys/power/wait_for_fb_sleep
/sys/power/wait_for_fb_wake
Maybe we can map old devices to new devices (ln -s) at run time and make it work but I don't know exactly how to map them.
Edit: I am unable to create anything in /sys, even mounting it as RW. Does n1 know what I should do?
Click to expand...
Click to collapse
Ok. for your system find all it needs, you have to "bind" (by anyway i think) /proc and /sys . Like a normal linux when you do a chroot. I don't know the exact order of execution of your script, but before anything else, you must have proper /proc , /sys ,/dev . For example, here it what we need in to do in linux,
#!/bin/bash
mount --bind /dev /répertoire-vers-votre-chroot/dev
mount --bind /dev/pts /répertoire-vers-votre-chroot/dev/pts
mount --bind /dev/shm /répertoire-vers-votre-chroot/dev/shm
mount -t proc none /répertoire-vers-votre-chroot/proc
mount -t sysfs none /répertoire-vers-votre-chroot/sys
As you can't bind them with mount, try the symlink , it might work (i dont see why not) . These directories are created by the kernel , maybe there are other in android , i don't know.
Try that and let me know , it should do the trick !
Edit: i read too fast! It couldnt be that, as you dont change / .
r2beta0 said:
Trying now to boot MIUI on a second system image I get the following error:
08-26 21:06:40.773 2971 2979 E FramebufferNativeWindow: couldn't open framebuffer HAL (No such device)
I'm not sure if this error was caused by kernel incompatibility or by some special file libsurfaceflinger could not find. Doing strings | grep on libsurfaceflinger.so from miui I could find this references:
/dev/tty0
/sys/android_power/wait_for_fb_sleep
/sys/android_power/wait_for_fb_wake
/sys/class/graphics/fbcon
/sys/power/wait_for_fb_sleep
/sys/power/wait_for_fb_wake
Maybe we can map old devices to new devices (ln -s) at run time and make it work but I don't know exactly how to map them.
Edit: I am unable to create anything in /sys, even mounting it as RW. Does n1 know what I should do?
Click to expand...
Click to collapse
Isn't MIUI and CM7 running on top of froyo kernel/dev tree?
I remember I got the same HAL issue when I tried to run unsigned GB on froyo kernel. I assume trying to run froyo based rom's on 2.3.4 kernel will show the same issues.
n3ptun3 said:
Isn't MIUI and CM7 running on top of froyo kernel/dev tree?
I remember I got the same HAL issue when I tried to run unsigned GB on froyo kernel. I assume trying to run froyo based rom's on 2.3.4 kernel will show the same issues.
Click to expand...
Click to collapse
Hm... maybe you're right. The new nightly CM from Defy should work with GB kernel I think.
Sent from my Milestone 2 XDA App
dangpzanco said:
Hm... maybe you're right. The new nightly CM from Defy should work with GB kernel I think.
Sent from my Milestone 2 XDA App
Click to expand...
Click to collapse
I wouldn't bet on it. 2nd-init might be GB ready, but Defy's CM7 is still built over a froyo base. If I have time this weekend I'll experiment on D2G CM7 with GB base.
Just let GB kernel boot CM7. ch-2.2 kernel suck in touch screen.
n3ptun3 said:
I wouldn't bet on it. 2nd-init might be GB ready, but Defy's CM7 is still built over a froyo base. If I have time this weekend I'll experiment on D2G CM7 with GB base.
Click to expand...
Click to collapse
I can't boot CM7 0826 nightly bulid with both ch-2.2.2/GB kernels. Anyone know why? The author has changed the 2nd-init?
Edit: I think I know why. The author delete 2nd-init in /binary. So we need to change the boot method to 2nd-boot. GB kernel isn't suported yet.
Endless7 said:
Edit: I think I know why. The author delete 2nd-init in /binary. So we need to change the boot method to 2nd-boot. GB kernel isn't suported yet.
Click to expand...
Click to collapse
That seems to be a mistake and was fixed in 3e3c820adecf812e3dfea872a184f5f428fd4fbc (Allow 2nd-init support with bootmenu, which is stored in system image). It was caused by heavy restructuring of the motorola common boot-code in the CM7 repository. Just copy my 2nd-init into the binary directory, and you should be fine.
pat972 said:
Ok. for your system find all it needs, you have to "bind" (by anyway i think) /proc and /sys . Like a normal linux when you do a chroot. I don't know the exact order of execution of your script, but before anything else, you must have proper /proc , /sys ,/dev . For example, here it what we need in to do in linux,
#!/bin/bash
mount --bind /dev /répertoire-vers-votre-chroot/dev
mount --bind /dev/pts /répertoire-vers-votre-chroot/dev/pts
mount --bind /dev/shm /répertoire-vers-votre-chroot/dev/shm
mount -t proc none /répertoire-vers-votre-chroot/proc
mount -t sysfs none /répertoire-vers-votre-chroot/sys
As you can't bind them with mount, try the symlink , it might work (i dont see why not) . These directories are created by the kernel , maybe there are other in android , i don't know.
Try that and let me know , it should do the trick !
Edit: i read too fast! It couldnt be that, as you dont change / .
Click to expand...
Click to collapse
It's a good idea, as I can bind filesystems using busybox mount. It needs just some engineering into 2nd-init script like copying busybox to /sbin and forcing umount of /dev /proc and /sys, but it can be done.
How do I clone /sys to some other folder like /data/sys? I tried with 'cp -a' but it doesn't work fine. As I see I have to clone /sys and make some symlinks on this clone. Then I bind it with original /sys on init.rc. Is that right?
r2beta0 said:
It's a good idea, as I can bind filesystems using busybox mount. It needs just some engineering into 2nd-init script like copying busybox to /sbin and forcing umount of /dev /proc and /sys, but it can be done.
How do I clone /sys to some other folder like /data/sys? I tried with 'cp -a' but it doesn't work fine. As I see I have to clone /sys and make some symlinks on this clone. Then I bind it with original /sys on init.rc. Is that right?
Click to expand...
Click to collapse
I would not unmount /dev /proc and /sys, they are closely related to kernel init, in linux desktop it the first thing rc.sysinit does.
I was thinking more to something like "ln -s /sys/ /data/sys" , and one other solution i've just tested, is to do a "mount -n -t sysfs sys /data/sys -o nosuid,noexec,nodev" ! The difference for me is that with the mount command you'll not be able to umount /data/sys until reboot ! With the symlink you can just rm it when you finish.
The bind option is usefull cause when you do a chroot, you don't have access the other part of the system , so i'm not sure the symlink method work in that case. i'll ask and tell you.
Edit : I confirm It's that well about bind and chroot. and it seems to me , you can't create file in /sys , the kernel create them and you can read/change values. If you create one, it will not be taken in account by the kernel.
Also can you light up my lantern, which script in /system is called after the 2nd-init to launch the MIUI ?
pat972 said:
I would not unmount /dev /proc and /sys, they are closely related to kernel init, in linux desktop it the first thing rc.sysinit does.
I was thinking more to something like "ln -s /sys/ /data/sys" , and one other solution i've just tested, is to do a "mount -n -t sysfs sys /data/sys -o nosuid,noexec,nodev" ! The difference for me is that with the mount command you'll not be able to umount /data/sys until reboot ! With the symlink you can just rm it when you finish.
The bind option is usefull cause when you do a chroot, you don't have access the other part of the system , so i'm not sure the symlink method work in that case. i'll ask and tell you.
Edit : I confirm It's that well about bind and chroot. and it seems to me , you can't create file in /sys , the kernel create them and you can read/change values. If you create one, it will not be taken in account by the kernel.
Also can you light up my lantern, which script in /system is called after the 2nd-init to launch the MIUI ?
Click to expand...
Click to collapse
When you use bootmenu to start 2nd-init it will run a script called /system/bootmenu/script/2nd-init.sh. The last line of this script is 2nd-init binary itself. When you call 2nd-init binary it forks init on top of itself causing something like a hot restart. So, what 2nd-init script does is remount / as RW and copy new init.rc, init.mpaphone_umts.rc and init binary to /. Then it calls 2nd-init binary in order to use your custom files instead of stock ones. You can do anything you like on init.rc, as I did to boot MIUI from a loopback device. Unfortunately MIUI was compiled for froyo kernel and can't find some devices it needs to work. Thats why I need to create symlinks inside /sys and I think I already found a way to do that. Will test and explain that later.
Ok thanks !
Even with the new symlinks the system is unable to boot. As I suspected it is far more complicated then just adding links to /sys, too bad. I think the only way we have to boot multi-systems with multi-kernels (like miui on froyo and stock on gb) will be using kexec hack. n1 know if some group already found a way to run kexec on milestone or milestone2?
You can't rebuilt miui over a generic 2.6.32 kernel ? Well i'm a total newb in rom dev, i assume the officiel ginger from google won't work, you must have some specific hardware stuff ! For kexec it seems they have some driver problem, but since you want to boot the moto kernel may be it'll be easier !
pat972 said:
You can't rebuilt miui over a generic 2.6.32 kernel ? Well i'm a total newb in rom dev, i assume the officiel ginger from google won't work, you must have some specific hardware stuff ! For kexec it seems they have some driver problem, but since you want to boot the moto kernel may be it'll be easier !
Click to expand...
Click to collapse
MIUI is closed source, so only team members are able to rebuilt it
Do you know how can I use kexec to boot moto kernel?
r2beta0 said:
MIUI is closed source, so only team members are able to rebuilt it
Click to expand...
Click to collapse
This is illegal - violation of GPL license. If they modified Linux kernel they should give users source code to those modifications.

SGY Bootscript

What is it ?
Bootscript is small modification to SGY's init.rc, to run several shell script on spesific boot event. Right now it's support 5 event :
1. init, before system partition mounted
2. post-system, after system partition mounted
3. post-cache, after cache partition mounted
4. post-data, after data partition mounted
5. done, before service run
Bootscript also have init.d support. init.d run after "done" script running.
Why ?
Originally i write this script to make my dual boot script easier to customise. But then i relize that it can be use to create another cool thing.
How ?
First download and flash Bootscript (Link at bottom of post). Put that file on PDA field if you use Odin or unpack tar file if you use other method. It's modification from DXLC1 boot.img. If you want study my mod, unpack ramfs from boot.img and look at "init.rc" and "sbin/bootscript.sh".
Create folder ".bootscript" in your sdcard (1st,fat partition) root. Put your script there. Your script must have name "init","post-system","post-cache","post-data","done". You don't need all 5 files, use only event you needed.
Before running your script, Bootscript copy all your ".bootscript" content to "/tmp/bootscript". You can add other file(s) beside your script in ".bootscript" folder but keep it small in size because all that file(s) will eat your ram. You can delete "/tmp/bootscript" content in your script, except in "done" script. When "done" running, your root path already become read only. If you need do clean up, do it in "post-data" and use "/data" as your temporary (but make sure you don't delete "done" script).
Bootscript ramfs have build-in busybox. You have to use that for your "init" script interpreter because "init" script run before system partition mounted. Just put in first line of your script
Code:
#!/sbin/busybox.boot sh
What is the drawback ?
Depend on your script, it can slow down your boot process. With Bootscript you can easily mess up your device. Use only if you familiar with android boot process and shell scripting. If you concern about security, if used without care, Bootscript can make your device unsecure because it's put importance boot process on unsecure location (sdcard).
What it can do ?
A lot. Few example :
1. Dual boot
2. Temporary install themes
3. Data2SD
4. Backup your applications
Where I can get it
boot-script-0.1.tar
Dual Boot
Use same partition and and custom rom instalation process as in http://forum.xda-developers.com/showthread.php?t=1598803 . Save this scripts in ".bootscript" in your sdcard
post-system
Code:
#!/sbin/busybox.boot sh
BUSYBOX=/sbin/busybox.boot
PART_DEV=/dev/block/mmcblk0p2
PART_TYPE=ext3
if [ -f /tmp/bootscript/bootsdcard ]
then
$BUSYBOX umount /system
$BUSYBOX mount -t $PART_TYPE $PART_DEV /system
fi
post-cache
Code:
#!/sbin/busybox.boot sh
BUSYBOX=/sbin/busybox.boot
PART_DEV=/dev/block/mmcblk0p3
PART_TYPE=ext3
if [ -f /tmp/bootscript/bootsdcard ]
then
$BUSYBOX umount /cache
$BUSYBOX mount -t $PART_TYPE $PART_DEV /cache
fi
post-data
Code:
#!/sbin/busybox.boot sh
BUSYBOX=/sbin/busybox.boot
PART_DEV=/dev/block/mmcblk0p4
PART_TYPE=ext3
if [ -f /tmp/bootscript/bootsdcard ]
then
$BUSYBOX umount /data
$BUSYBOX mount -t $PART_TYPE $PART_DEV /data
fi
Create file "bootsdcard" inside ".bootscript" to boot from sdcard.
Temporary-install themes
Save this scripts in ".bootscript" in your sdcard
post-data
Code:
#!/sbin/busybox.boot sh
BUSYBOX=/sbin/busybox.boot
$BUSYBOX mkdir -p /data/themes
$BUSYBOX rm -r /data/themes/*
$BUSYBOX cp -r /tmp/bootscript/themes/* /data/themes
$BUSYBOX rm -r /tmp/bootscript/themes
$BUSYBOX mount -o bind /data/themes/framework-res.apk /system/framework/framework-res.apk
$BUSYBOX mount -o bind /data/themes/twframework-res.apk /system/framework/twframework-res.apk
$BUSYBOX mount -o bind /data/themes/SystemUI.apk /system/app/SystemUI.apk
Create folder "themes" inside ".bootsdcard" and put your themes (framework-res.apk,twframework-res.apk,SystemUI.apk). Reboot your phone.
Warning, this script have possibility make your phone uncleanly unmounted. I don't have any problem with it, but better to be careful. Use only for test purpose, like when you build your own themes or test downloaded themes before you decide to use. Use when you need small modification to your themes. If you do a lot of modification, use dual boot.
Remember to clean "/data/themes" after you done.
admirable idea! +1
remark to the others: It's a modified kernel image, You can't play custom kernels and this Bootscript at the same time!
Doky73 said:
admirable idea! +1
remark to the others: It's a modified kernel image, You can't play custom kernels and this Bootscript at the same time!
Click to expand...
Click to collapse
thank you, but it's just small script.
you right about custom kernel. but i'm not mod kernel image (zImage) only init.rc inside ramfs and add one script "/sbin/bootscript.sh" and of course busybox binary (busybox.boot). i try to KISS so others can easily integrated to other kernel.
we can use this mod to only use the 4th partition as /data without install a new rom in 2nd partition. sounds nice.
Data2SD
@kurotsugi
Yes, it is possible to make data2sd. Create 2nd partition in your sdcard with type ext3. Save this scripts in ".bootscript" in your sdcard 1st partition
post-data
Code:
#!/sbin/busybox.boot sh
BUSYBOX=/sbin/busybox.boot
PART_DEV=/dev/block/mmcblk0p2
PART_TYPE=ext3
$BUSYBOX umount /data
$BUSYBOX mount -t $PART_TYPE $PART_DEV /data
Edit PART_DEV if you have different partition block and PART_TYPE if you use different partition type.
something is weird. your bootscript.sh in sbin/ is empty.
kurotsugi said:
something is weird. your bootscript.sh in sbin/ is empty.
Click to expand...
Click to collapse
the file is in "/sbin/". how you open it ?
i send in attachment both bootscript.sh and init.rc. i copy that file directly from my device using scp.
using rootexplorer, view as text. its empty. the init.d script didn't work neither.
---------- Post added at 09:16 PM ---------- Previous post was at 08:50 PM ----------
I've extracted the kernel and check the files. it has exact same script with the one in your attachement. I think my cwm is not work or something. now I can't install any custom kernel into my device.
test speed
irfanbagus said:
Use same partition and and custom rom instalation process as in irfan's "DUAL BOOT" method http://forum.xda-developers.com/showthread.php?t=1598803 .
Save this scripts in ".bootscript" in your sdcard
BUSYBOX=/sbin/busybox.boot
PART_DEV=/dev/block/mmcblk0p3
PART_TYPE=ext3
if [ -f /tmp/bootscript/bootsdcard ]
then
$BUSYBOX umount /cache
$BUSYBOX mount -t $PART_TYPE $PART_DEV /cache
fi[/code]post-data
Code:
#!/sbin/busybox.boot sh
[/QUOTE]
I suggest to those who run this method: compare speed with /cache on p3 and on NAND-internal. There is no need to use cache on sdcard, I believe !! :cool::cool: its very slow !
putting /cache unecessarily on sd-card is not a good idea. it is improper to do that.
[SIZE=1]---------- Post added at 06:32 PM ---------- Previous post was at 06:03 PM ----------[/SIZE]
[B]
Test Report
[/B]
the file /sdcard/.bootscript/post-data wasn't executed. remember /sdcard/.bootscript is a dir., not a file !
boot-script-0.1.tar includes some stock kernel built on March 7th 2012. boots up nicely.
after reboot /data was still on stl11 acc. to rootexplorer.
/init.rc included mods
/sbin/bootscript.sh seemed empty in rootexplorer (use other file manager, then its OK) . after editing, was empty again after reboot. s.th. is deleting stuff from /sbin ....
clarification: your scripts naming scheme:
file path : /sdcard/.bootscript
in there, file name : "post-data" (no extension!) or some of the other mentioned names.
in post #7 irfan there is mentioning of the /sdcard/bootsdcard flagging file. it only applies for full DUAL ROM, not with /data from sd only.
but even with it, still no luck !
Click to expand...
Click to collapse
in theory we can have triple or quad boot on this thing...
mai77 said:
I suggest to those who run this method: compare speed with /cache on p3 and on NAND-internal. There is no need to use cache on sdcard, I believe !! its very slow !
putting /cache unecessarily on sd-card is not a good idea. it is improper to do that.
---------- Post added at 06:32 PM ---------- Previous post was at 06:03 PM ----------
Test Report
the file /sdcard/.bootscript/runme.sh wasnt executed. remember /sdcard/,bootscript is a dir., not a file !
boot-script-0.1.tar includes some stock kernel built on March 7th 2012. boots up nicely.
after reboot /data was still on stl11 acc. to rootexplorer.
/init.rc included mods
/sbin/bootscript.sh seemed empty in rootexplorer (use other file manager, then its OK) . after editing, was empty again after reboot. s.th. is deleting stuff from /sbin ....
clarification: your scripts naming scheme:
file path : /sdcard/.bootscript
in there, file name : "post-data" (no extension!) or some of the other mentioned names.
in post #7 irfan forgot to mention the /sdcard/bootsdcard flagging file. without it, no mounting of /data !
but even with it, still no luck !
Click to expand...
Click to collapse
Irfan work very awesome even little script but have big impact..
I use all his work with little modification and u can do with ur style.. For me cache still use internal coz 1 partition on external can use for link2sd/a2sd..
could you just clearly state whether the download worked immediatly or did it not work.
yes
or
no
mai77 said:
could you just clearly state whether the download worked immediatly or did it not work.
yes
or
no
Click to expand...
Click to collapse
If im not wrong this is 1st mod fro irfan but he finish it with dualboot kernel (he say beta but for me its final).. Then I play with his work to my kernel with modification..
the problem is: -t ext3
ext2
works better.
maybe missing ext3 module ...
test result: the download does not work unless you take further preparation. if you use ext2 fs for /data directory, then it works.
mai77 said:
the problem is: -t ext3
ext2
works better.
maybe missing ext3 module ...
test result: the download does not work unless you take further preparation. if you use ext2 fs for /data directory, then it works.
Click to expand...
Click to collapse
I prefer ext4
Working well with cm7/9 on 2nd rom with my kernel..
I tried savie kernel many times with all tricks. it never booted up over here...
---------- Post added at 09:15 PM ---------- Previous post was at 09:02 PM ----------
so, irfan's BOOTSCRIPT is quite nice. but the above .tar download does not contain the kernel that I want.
so s.o. needs to zip up a current kernel into a boot.img
---------- Post added at 09:28 PM ---------- Previous post was at 09:15 PM ----------
irfanbagus said:
@kurotsugi
Yes, it is possible to make data2sd. Create 2nd partition in your sdcard with type ext3. Save this scripts in ".bootscript" in your sdcard 1st partition
post-data
Code:
#!/sbin/busybox.boot sh
BUSYBOX=/sbin/busybox.boot
PART_DEV=/dev/block/mmcblk0p2
PART_TYPE=ext3
$BUSYBOX umount /data
$BUSYBOX mount -t $PART_TYPE $PART_DEV /data
Edit PART_DEV if you have different partition block and PART_TYPE if you use different partition type.
Click to expand...
Click to collapse
stock rom users dont have ext3 available, they should use ext2.
on first boot from sd, expect 3 minutes longer boot time ! SGY is not stuck, it copies /data !
Terminal ide app works only if installed to NAND. Not poss in /data on sd mode
hi all, another great tutorial from irfanbagus, one question can we mount a img file ?
In linux we can mount a image file with -o loop, i have tryed in android but with no sucess so far, is there a way we can mount a image file(img) in android ?
that way we dont need the partitions and we will be able to run more roms.
Just one idea.
hal_2000

Mediatek YAFFS2 EXT4 mount, building kernel

I built already kernel, forced printk.c never stop, added busybox to ramfs.
But Android doesnot come up. See attached log.
Question is that init.rc mounts to /system first mtd as yaffs2, then mounts [email protected] again as ext4 to /system. I do not understand this. I checked original kernel and there seems to be no yaffs support.
How it can mount it??
Look into log and search for busybox...
Why android doesnot start? Is the android_main not found a problem? Attached is also my init.rc modified with busybox calls

Categories

Resources