[FIXED] full r/w access via overlay filesystem - Desire Android Development

Hey guys!
Together with some others at android-hilfe.de I'm working on an overlay filesystem for the Desire.
We've chosen aufs (Another Unionfs) to implement our idea.
Basically, two filesystems are combined to a single one.
The first filesystem contains the initial data. The second one is used to overlap it.
Aufs first searches the second for files, then the first. We plan to use a fully writeable filesystem for the second and a secured filesystem for the first.
If you want to modify a file on the first partition, you can put it on the second filesystem and change it there.
So we can get indirect write access to the secured filesystem by mounting the aufs partition to the right path so that the system sees it as the original, secured filesystem.
In theory, a full r/w acces to the all partions on the phone could be possible.
Visit the project site for files and instructions.

that is actually a pretty good idea... and would be awesome if it could be implemented i have no experience in android development and would therefore not be at much help there, but i could help you with testing, as i don't use my phone for any important stuff

antweb said:
Hey guys!
Together with some guys at android-hilfe.de I'm working on an overlay filesystem for the Desire.
We've chosen aufs (Another Unionfs) to implement our idea.
.......
We still could use some help, as for now we are only 2 active developers.
Click to expand...
Click to collapse
Nice thought. Wish i could help

Great idea, and it seems it should work and will obviate the need for a eng-SPL.
Have you tried it ? You seem to have all the necessary bits (you don't really need the utils) so i'm not sure what else you need at this point. This should work with adb in normal mode (ie not recovery) as you should be able to remount the system ontop of itself like so:
adb shell
first to get to your desire root shell. Then do
insmod aufs2
Then create some persistent storage on your sdcard
mkdir /sdcard/sysrw
Then mount the dir
mount -t aufs -o br=/sdcard/sysrw=rw:/system=ro none /system
you should now be able to write to /system, so try doing a
touch /system/foo
If that works, you should be away.
Clearly your modules you provide above will be specific to a certain kernel and with so many ROMS out there i can't say it will work with the one i have so you can try and report back.
Putting the persistent storage on the sdcard means that when it is mounted via usb you will loose access to it and bad things will happen.
Also remember if this works you need to add this to your init scripts

daveba said:
mount -t aufs -o br=/sdcard/sysrw=rw:/system=ro none /system
Click to expand...
Click to collapse
This step fails. All I get is
Code:
mount: No such Device
daveba said:
Clearly your modules you provide above will be specific to a certain kernel and with so many ROMS out there i can't say it will work with the one i have so you can try and report back.
Click to expand...
Click to collapse
Every ROM (with a custom kernel) will need some kernel patches anyways as otherwise many simbols are missing (and sure some other stuff, no clue what the aufs kernel patches do in detail). The attachements include a patched stock kernel. To try it out, you'll have to install the included kernel.
daveba said:
Also remember if this works you need to add this to your init scripts
Click to expand...
Click to collapse
Yep, thats the next step after I get a successful mount.

antweb said:
This step fails. All I get is
Code:
mount: No such Device
Click to expand...
Click to collapse
So it looks like the mount command doesn't accept 'none' as a non-device argument perhaps which i find strange since /proc is one of those also. Are you getting any messages from 'dmesg' or 'logcat' ?

My basic question:
If we use more and more the SD card, i believe we will drain more and more battery.
Apps2sd, system2sd etc
Or it is not draining more battery the extended sd usage?

billias said:
My basic question:
If we use more and more the SD card, i believe we will drain more and more battery.
Apps2sd, system2sd etc
Or it is not draining more battery the extended sd usage?
Click to expand...
Click to collapse
Not much stuff gets written to /system constantly. Just a few changes so you shouldn't see much of a drain.

Ok, so it looks like this actually works. You can't put the rw partition on a VFAT sdcard partiton only. SO in theory if you make a ext{123} partition on your sdcard it should work. For now i tried with the writeable mtd /data partition on my CM nightly and all works. Look:
Code:
adb shell
modprobe aufs
lsmod (to check aufs worked)
mkdir /data/rw
mount -t aufs -o br=/data/rw=rw:/system=ro none /system
(no errors here)
touch /system/foo (YES IT WORKED)
ls -l /system/foo
-rw-rw-rw- 1 root root 0 Aug 8 20:30 /system/foo
A writeable /system !!!
And here is the real data on /data/rw
Code:
ls -l /data/rw/
-rw-rw-rw- 1 root root 0 Aug 8 20:30 foo
In theory Metamorph, adblock and all the rest that require /system should now work as expected.

daveba said:
Ok, so it looks like this actually works. You can't put the rw partition on a VFAT sdcard partiton only. SO in theory if you make a ext{123} partition on your sdcard it should work. For now i tried with the writeable mtd /data partition on my CM nightly and all works. Look:
Code:
adb shell
modprobe aufs
lsmod (to check aufs worked)
mkdir /data/rw
mount -t aufs -o br=/data/rw=rw:/system=ro none /system
(no errors here)
touch /system/foo (YES IT WORKED)
ls -l /system/foo
-rw-rw-rw- 1 root root 0 Aug 8 20:30 /system/foo
A writeable /system !!!
And here is the real data on /data/rw
Code:
ls -l /data/rw/
-rw-rw-rw- 1 root root 0 Aug 8 20:30 foo
In theory Metamorph, adblock and all the rest that require /system should now work as expected.
Click to expand...
Click to collapse
could you try metamorph?

finally....

Nice work!! :O
Edit: Ok I tried this but metamorph still gives me an error when trying to set it up.
daveba said:
Code:
adb shell
modprobe aufs
lsmod (to check aufs worked)
mkdir /data/rw
mount -t aufs -o br=/data/rw=rw:/system=ro none /system
(no errors here)
touch /system/foo (YES IT WORKED)
ls -l /system/foo
-rw-rw-rw- 1 root root 0 Aug 8 20:30 /system/foo
Click to expand...
Click to collapse

cTrox said:
Nice work!! :O
Edit: Ok I tried this but metamorph still gives me an error when trying to set it up.
Click to expand...
Click to collapse
Really ? I just tried it and it worked fine for me...

Could anyone give a step by step guide on doing this?

daveba said:
Really ? I just tried it and it worked fine for me...
Click to expand...
Click to collapse
Oh I just saw, that metamorph is giving me an error because I havn't got enough free space in /system. How much do I need? I have 20MB free.

Ireas said:
Could anyone give a step by step guide on doing this?
Click to expand...
Click to collapse
+1 I'm very interested on this

cTrox said:
Oh I just saw, that metamorph is giving me an error because I havn't got enough free space in /system. How much do I need? I have 20MB free.
Click to expand...
Click to collapse
Where did you put the writeable partition on ? Ensure it has enough space. I'm not sure exactly what checks metamorph does when it runs but it definetly succeeded for me.

shawe_ewahs said:
+1 I'm very interested on this
Click to expand...
Click to collapse
It's exactly as i wrote in the previous page.
You'll need to ROM to have the aufs overlay 'filesystem' built in or as a module. If you're on CM6 you're lucky as it has it builtin (i was suprised it loaded when i did the modprobe myself as i didn't think it was included).
You should see a aufs.ko if it's built in as a module. Try running a jar/grep on your ROM of choice to see if it's included
Code:
jar tvf RoufianosV6.zip |grep aufs
gives no output, but
Code:
jar tvf cm_bravo-08082010-104323.zip |grep aufs
169400 Fri Feb 29 02:33:46 GST 2008 system/lib/modules/2.6.34.2-cyanogenmod/kernel/fs/aufs/aufs.ko
does.
You can do the steps described earlier (via adb) when your desire is fully booted as it doesn't require it at recovery only.
This needs to be pushed out to rom creators as it needs to be included in the startup scripts or else the next time you reboot your desire you'll lose all changes you made while the overlay was active.

daveba said:
This needs to be pushed out to rom creators as it needs to be included in the startup scripts or else the next time you reboot your desire you'll lose all changes you made while the overlay was active.
Click to expand...
Click to collapse
Oh that's why it didn't work I thought I might have to reboot the device to get access

Thanx guys ! Someone tested on 2.2
Sent from my HTC Desire using XDA App

Related

Testers needed - latest busybox compiled for Android

PLEASE NOTE: THIS THREAD IS NOW OBSOLETE, BUSYBOX COMES WITH JUST ABOUT EVERY COOKED ROM
Hi all,
This is my first attempt at compiling anything for the android platform. My reason for doing this is whilst the busybox version does what we need it to do when rooting our HTC Dream's / G1's, as an everyday app it fails because it segfaults all the time.
This isn't a dig at Benno because to be honest, he's a bit of a hero for compiling it the first time round, without him it would have been a lot harder (if not impossible) to root our G1's.
Problem is, his version of busybox was compiled over a year ago (14 nov 2007 if his blog is anything to go by) and segfaults quite a lot (probably because it wasn't compiled for the G1, but more for the Android emulator), particularly if you try and do "ls -al"..
So what I've done is I've compiled the latest stable version of busybox (1.13.1 as of 14 December 2008) for the G1, I've tested this on my own G1 and it seems to work fine, but I could do with some help extensively testing it.
You can grab it here (for G1: long press -> save, for other browsers: right click -> save as / save target)
Installation Instructions:
Download the above file to your G1, it should be saved as /sdcard/download/busybox2.asc
(if you downloaded it with the G1 browser that is, otherwise please copy it to your G1's SD card to that exact path / name)
Remount your /system partition with this command:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
Copy the busybox binary into the /system/bin/ folder by running this command:
Code:
dd if=/sdcard/download/busybox2.asc of=/system/bin/busybox
Set the busybox binary as executable with suid bit by running this:
Code:
chmod 4755 /system/bin/busybox
Remount your /system/bin partition as read only again (unless you want to create more shortcuts) by doing the following:
Code:
mount -o remount,ro /dev/block/mtdblock3 /system
And thats it! Please test it as thoroughly as you can and let me know in this post if you have any problems
Ps. I take no responsibility for any damage that occurs directly or indirectly from using this program. Although I will try and make amends if something doesn't work as expected, you must acknowledge that you are solely responsible for your actions when modifying the filesystem of your G1.
Please note, this version is compiled as follows:
* It is compiled against regular libC so is 1.8MB big
* It is compiled with the soft links options
I'm investigating compiling it against uClibC to get the size down dramatically, and compiling it with a seperate set of options so it auto-identifies when to use itself when you're shell is busybox sh.
Appears to have installed alright! Haven't had a chance to test it out otherwise, but I'll let you know if my phone explodes.
Excellent going through it now!!!
Thank you!
anybody else get
Code:
/system/bin/busybox: write error: no space left on device, 1045+0 records in , 1044+0 records out, then the speed stats
Im just gonna chmod it anyway, I wonder which file it forgot?
man all my G1 hack went smooth till I tried the market cache move, i got 1 file and 100 force closes, tried moving them back to no avail..HARD RESET, now I messed up this one somehow, Its par for my course these days, f'it...
bhang
edit:
I reran the "dd" command after I freed up almost a meg and it output same write error: no space left on device 1+0 records in 0+0 out, looks like it copied the last file I missed in the first run? do I need to chmod everything again since I dunno which 1 of the files it may have been..
on second thought 'dd' looks like it may have realized it only needed the 1 file but still needed more room cause 0+0 out, I dunno im confused any advice?
good work
installed successfully. so far no problems. does this new version contain commands not found in the previous versions, ie/ the version JesusFreke used in modified rc30 v1.2 (Sauriks' version from here: http://www.telesphoreo.org/pipermail/g1-hackers/2008-November/000032.html)?
edit: just realized that the previous ver i had installed was 1.12.2 (2008-11-16)
I think JesusFreke was compiling the bionic version last night. Might wanna check on that before you spend your time doing if it you have not already.
Darkrift said:
I think JesusFreke was compiling the bionic version last night. Might wanna check on that before you spend your time doing if it you have not already.
Click to expand...
Click to collapse
uninstall is just as easy as installing
-beers!
Bhang, have you installed anything else on your /system partition bar the stock files?
I'm working on a solution at the moment that moves all this to the /data partition to provide some more usability. For now I suggest you delete busybox from /system/bin/ so you don't fill up your /system partition.
syntax?
I could not quite get this to work as stated. I am no command line expert, so I guessed at what might work. I did the following:
Instead of this:
mount -o remount, rw /dev/block/mtdblock3 /system
I did this:
mount -o remount, -rw /dev/block/mtdblock3 /system
At the last I did this:
mount -o remount, -r /dev/block/mtdblock3 /system
Then I rebooted. Everything seems fine. I looked up some busybox commands, but they don't seem to do anything. Any way to know for sure?
my bad, it works!
Excuse a noob, I didn't know you had to type "busybox" in front of the command...
Hi, the link is down, can someone please re-upload? Thank you .
Please note, this is now obsolete as busybox comes with just about every other ROM out there.
foxdie said:
Please note, this is now obsolete as busybox comes with just about every other ROM out there.
Click to expand...
Click to collapse
Unfortunitally there have been people releasing versions without busybox recentl for the mytouch series mainly and we need a good version of Busybox if possible
Hi,
I know that, but I'm having problems getting SUFBS (http://forum.xda-developers.com/showthread.php?t=530271) to work correctly. I read through the thread and someone tried your busybox and it worked. Also, the one I have (using myhero 0.0.7) is using 1.8.1.
You can actually rip the busybox binary out of any of the roms that come with it.
Any instructions? It'd be simpler if foxdie's busybox is re-uploaded though. Thanks!
Wysie said:
Any instructions? It'd be simpler if foxdie's busybox is re-uploaded though. Thanks!
Click to expand...
Click to collapse
try this out, it's what i used http://benno.id.au/blog/2007/11/14/android-busybox
http://www.busybox.net/downloads/snapshots/busybox-snapshot.tar.bz2
can anyone please compile the latest source or explain how to do this with windows and visual studio?
I tried to build busybox latest with android bionic lib and gave up on passwd.
I had problems with bionic umtp, no strchrnul in string.h and no pw_gecos in passwd.
I can not understand how other busybox builds where able to get build. Any experiances?
EDIT: Doh, stupid me. I made 2 big mistakes. I will give it a new try with an other compile.
EDIT2: wich lib was taken to compile busybox? androids c lib bionic was not possible for me.

Read-Only Filesystem?

Hello, all!
I'm trying edit a file in /etc/ and adb says 'Failed to copy: Read-only filesystem'
Now, is this actually true? Or is this simply a permissions issue? I'm doing this on a non-rooted phone, so I can't 'touch' anything without permission errors, but is it a futile task if the filesystem is read only anyway?
I'm trying to do this from a non-rooted environment as I had intended on making this into an application, but I imagine that if I can't touch or push these files from an adb shell then I won't be able to from the application space either.
It's frustrating not to be able to edit the filesystem of my own phone, I'll be rooting if this is just a permissions problem and not an issue of a non-writable filesystem. Perhaps I could still make an application for rooted-only phones.. hrm..
Any thoughts on this?
/etc is an alias for /system/etc, and /system is a partition mounted as ro (you can confirm this yourself by running mount)
Ah, bugger. So this is hopeless (without modifying and then reflashing)?
Thanks very much.
you need to mount it read write,
mount -oremount,rw /dev/block/mtdblock3 /system
then it will be read/write
try adb remount. if it failes you need root sorry.
Hello, i have the same error and I have root. i have tried adb remount and the mount -oremount,rw /dev/block/mtdblock3 /system
still dotn work. I want to move a script to /
so i only have to type sh debian.sh
nvm I figured it out. i just put it on system and then just type sh debian.sh on the terminal and it works
Rafase282 said:
Hello, i have the same error and I have root. i have tried adb remount and the mount -oremount,rw /dev/block/mtdblock3 /system
still dotn work. I want to move a script to /
so i only have to type sh debian.sh
Click to expand...
Click to collapse
what is the error message? saying it dont work doesnt provide enough info for us to help....
it says sh: cant open aw.sh
so i still have to put the path or cd to where the file is. Is there a way to make /system my home?
no you cant make system your home, system is system, home is home. you can make a symlink if you are familiar with linux - might want to read up about shell commands
korndub said:
you need to mount it read write,
mount -oremount,rw /dev/block/mtdblock3 /system
then it will be read/write
Click to expand...
Click to collapse
Thanks it really worked!! for me i had the same problem as the other guy.
Rafase282 said:
Hello, i have the same error and I have root. i have tried adb remount and the mount -oremount,rw /dev/block/mtdblock3 /system
still dotn work. I want to move a script to /
so i only have to type sh debian.sh
nvm I figured it out. i just put it on system and then just type sh debian.sh on the terminal and it works
Click to expand...
Click to collapse
You *CAN'T* modify the / filesystem. It is part of your BOOT partition, which CANNOT be remounted rw. You would have to read, modify, and write the boot partition.
Rafase282 said:
Hello, i have the same error and I have root. i have tried adb remount and the mount -oremount,rw /dev/block/mtdblock3 /system
still dotn work. I want to move a script to /
so i only have to type sh debian.sh
nvm I figured it out. i just put it on system and then just type sh debian.sh on the terminal and it works
Click to expand...
Click to collapse
Maybe you're typing it in too literally. It should actually read like this:
mount -o remount,rw /dev/block/mtdblock3 /system
There was a typo with -oremount, there should be a space after -o.
Hope that helps.
PS. That command worked for me on a device where everything else failed.
dhkr123 said:
You *CAN'T* modify the / filesystem. It is part of your BOOT partition, which CANNOT be remounted rw. You would have to read, modify, and write the boot partition.
Click to expand...
Click to collapse
actually, / can be mounted rw, but changes are lost on reboot
new user
Firerat said:
actually, / can be mounted rw, but changes are lost on reboot
Click to expand...
Click to collapse
Hi I have my Asus Prime rooted and installed a virtuous Rom and I tried to put a fonts on the System/ fonts folder using root explorer using a instructions to fix some error on some games that need that tis fonts exist on the tablet but it said it cant because file system is read only I'm new and I don't know how to do this commands any help on how to do in a easy (explained) form.
egalpr said:
Hi I have my Asus Prime rooted and installed a virtuous Rom and I tried to put a fonts on the System/ fonts folder using root explorer using a instructions to fix some error on some games that need that tis fonts exist on the tablet but it said it cant because file system is read only I'm new and I don't know how to do this commands any help on how to do in a easy (explained) form.
Click to expand...
Click to collapse
I would recommended not posting in the g1 section. The Asus forums would be a lot more helpful.
egalpr said:
Hi I have my Asus Prime rooted and installed a virtuous Rom and I tried to put a fonts on the System/ fonts folder using root explorer using a instructions to fix some error on some games that need that tis fonts exist on the tablet but it said it cant because file system is read only I'm new and I don't know how to do this commands any help on how to do in a easy (explained) form.
Click to expand...
Click to collapse
Download EStrong File Manager and within the settings of it, enable mounting of the system as read/write.
Or, download Terminal Emulator and type this in:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
Or, try typing this in terminal/cmd:
Code:
adb remount
Or, if you plan on doing it all from recovery you could do:
Code:
adb shell "mount system"
and then you could do it all from there.
Next time, please post in the proper forum.
Read-Only /system... i just deleted the file, tich push should update/replace and then it worked... only had this bug when i was trying to modify Trebuchet.apk (homescreen)
Hi guys
Not being a linux expert, i'm stuck with the following problem..
i'm using a program who uses low level adb commands to write on the phone extSdCard...
problem: this extSdcard is seen as a readonly filesystem.
What has to be done to make this FS RW instaed of RO ?
This does not happen under windows where I can write to the extSd without problems
thks in advance for the tip

Flash custom files or use adb?

Hi, this is my first time posting on this site and I apologizes if this is in the wrong place. I just recently rooted my evo and was wondering when I want to apply a customization such as a new notification bar how do I know to use either flashing the file from the sd card or to run a command in adb? Is there an important difference, or can either be used? Thanks in advance for the help.
rafroehlich2 said:
Hi, this is my first time posting on this site and I apologizes if this is in the wrong place. I just recently rooted my evo and was wondering when I want to apply a customization such as a new notification bar how do I know to use either flashing the file from the sd card or to run a command in adb? Is there an important difference, or can either be used? Thanks in advance for the help.
Click to expand...
Click to collapse
Most files can be flashed, if they are in a .zip form, you should be okay. However for things like the bootscreens, the recommended method is to use ADB and push the bootanimation.zip file to the specified folder on the phone. However, this has been extremely simplified by user-made tools here on the EVO forums, not many people like using ADB (don't know why)... so there are tools to make it easier for people.
Usually the person that is distributing the file should say whether you need to flash or use ADB commands, just read the OP's post.
Thanks so much for your help.
rafroehlich2 said:
Thanks so much for your help.
Click to expand...
Click to collapse
Sure, no problem!
pseudoremora said:
Most files can be flashed, if they are in a .zip form, you should be okay. However for things like the bootscreens, the recommended method is to use ADB and push the bootanimation.zip file to the specified folder on the phone. However, this has been extremely simplified by user-made tools here on the EVO forums, not many people like using ADB (don't know why)... so there are tools to make it easier for people.
Usually the person that is distributing the file should say whether you need to flash or use ADB commands, just read the OP's post.
Click to expand...
Click to collapse
If I use the flashing method will the files be moved to the correct system folder or will it just deposit it in the ROM? When you use adb you specify the target, if I'm not mistaken. I just don't want my system to get cluttered with random files. Sorry if this isn't worded well.
rafroehlich2 said:
If I use the flashing method will the files be moved to the correct system folder or will it just deposit it in the ROM? When you use adb you specify the target, if I'm not mistaken. I just don't want my system to get cluttered with random files. Sorry if this isn't worded well.
Click to expand...
Click to collapse
When using ADB, the system won't get "cluttered"... mainly because when you're are using the adb push (copy) command, you will be overwriting the file that is currently residing on your phone.
For example, if I wanted to replace my bootanimation -- I would type:
Code:
adb push bootanimation.zip /system/customize/resource
This would copy the new bootanimation.zip over to the directory being specified (/system/customize/resource -- where the bootanimation resides), upon copying, it explicitly overwrites any file/folder with the name "bootanimation" -- unless you set a parameter when typing the command to ask you if it should overwrite. You don't need to worry about this though, almost always you'll overwrite the files.
As long as you push (copy) any and all files to its correct directory, nothing should ever get cluttered and if it does, then you can always remove it just as easily.
pseudoremora said:
When using ADB, the system won't get "cluttered"... mainly because when you're are using the adb push (copy) command, you will be overwriting the file that is currently residing on your phone.
For example, if I wanted to replace my bootanimation -- I would type:
Code:
adb push bootanimation.zip /system/customize/resource
This would copy the new bootanimation.zip over to the directory being specified (/system/customize/resource -- where the bootanimation resides), upon copying, it explicitly overwrites any file/folder with the name "bootanimation" -- unless you set a parameter when typing the command to ask you if it should overwrite. You don't need to worry about this though, almost always you'll overwrite the files.
As long as you push (copy) any and all files to its correct directory, nothing should ever get cluttered and if it does, then you can always remove it just as easily.
Click to expand...
Click to collapse
Thanks for taking the time to answer. I'm new to this and any time I see command line I get hesitant. Thanks again for the thorough answer.
rafroehlich2 said:
Thanks for taking the time to answer. I'm new to this and any time I see command line I get hesitant. Thanks again for the thorough answer.
Click to expand...
Click to collapse
Yup, no problem. I try to usually give a detailed answer, as I'm sure not everyone will understand vague answers.
pseudoremora said:
Yup, no problem. I try to usually give a detailed answer, as I'm sure not everyone will understand vague answers.
Click to expand...
Click to collapse
Since you seem to be knowledgeable what is the difference between flashing a rom by its name.zip as opposed to renaming it update.zip? Does the former start new and the latter maintain all apps/settings?
Sent from my PC36100
rafroehlich2 said:
Since you seem to be knowledgeable what is the difference between flashing a rom by its name.zip as opposed to renaming it update.zip? Does the former start new and the latter maintain all apps/settings?
Sent from my PC36100
Click to expand...
Click to collapse
No difference.
The naming conventions don't mean anything really. There used to be a time when all packages had to be called "update.zip", but the Devs that built the recoveries made it so you could name the .zip files whatever you wanted.
You'll see ROM's/theme's/etc with fancy names -- that's just so its easier for the end user to identify what he/she is actually going to flash.
When I say "update.zip", I just mean that the file can be flashed via recovery and won't require command line/terminal/ADB.
However, there are certain files that will always have a static name (bootanimation.zip) -- that can't change because the phone is programmed to look for that specified file. So whenever someone uploads a bootanimation and calls it: "Nexus-bootanimation.zip" --- this should be renamed to bootanimation before adb pushing or flashing to its specified directory.
Now I understand the idea behind flashing a radio, however I don't understand flashing a kernel. How do I know when to do this and do the risks of radio apply to the kernel? Also, are there any other major components that I'll eventually have to flash? Thanks for answering my many questions.
Sent from my PC36100
rafroehlich2 said:
Now I understand the idea behind flashing a radio, however I don't understand flashing a kernel. How do I know when to do this and do the risks of radio apply to the kernel? Also, are there any other major components that I'll eventually have to flash? Thanks for answering my many questions.
Sent from my PC36100
Click to expand...
Click to collapse
There are risks with both.
Flashing a kernel or radio has the potential to brick your phone. The radio is used for controlling all the "wireless" functions (3G, 4G, x1 connections (texting/calling)) -- pretty much anytime the phone connects to the Sprint towers, the radio is playing its part. So if you flash it incorrectly; the consequences are obvious.
The kernel is the heart of the Android. The kernel itself is actually Linux. Android is built upon Linux, so pretty much Google took the already existing Linux kernel and built Android on top of it (the UI, the apps, etc) and made Android into a Mobile OS, which can run on virtually any platform or device.
How do you know? You don't -- it's a matter of wanting to be curious enough to test. Some devs will put out kernels that overclock your device, others will add different features (screen fixes, loopback interface, underclocking, etc). The kernel controls all the hardware on the phone and how everything functions -- so when devs mess with source code, they are essentially making the hardware function differently for your device.
Some of the major components? -- The biggest ones so far are the wireless driver and 4G driver. When the EVO came out -- the battery life wasn't great; but after the new update (1.47 and the accompanying radio's); battery life on the device have improved significantly and people have experience better WiFi reception and such.
Hope that helps.
pseudoremora said:
There are risks with both.
Flashing a kernel or radio has the potential to brick your phone. The radio is used for controlling all the "wireless" functions (3G, 4G, x1 connections (texting/calling)) -- pretty much anytime the phone connects to the Sprint towers, the radio is playing its part. So if you flash it incorrectly; the consequences are obvious.
The kernel is the heart of the Android. The kernel itself is actually Linux. Android is built upon Linux, so pretty much Google took the already existing Linux kernel and built Android on top of it (the UI, the apps, etc) and made Android into a Mobile OS, which can run on virtually any platform or device.
How do you know? You don't -- it's a matter of wanting to be curious enough to test. Some devs will put out kernels that overclock your device, others will add different features (screen fixes, loopback interface, underclocking, etc). The kernel controls all the hardware on the phone and how everything functions -- so when devs mess with source code, they are essentially making the hardware function differently for your device.
Some of the major components? -- The biggest ones so far are the wireless driver and 4G driver. When the EVO came out -- the battery life wasn't great; but after the new update (1.47 and the accompanying radio's); battery life on the device have improved significantly and people have experience better WiFi reception and such.
Hope that helps.
Click to expand...
Click to collapse
That does help. This is my first time with android and my first time attempting to actually mess with it.
rafroehlich2 said:
That does help. This is my first time with android and my first time attempting to actually mess with it.
Click to expand...
Click to collapse
There will be a lot more "firsts", believe me. Some things will be harder than others; but if you stick with it and actually take the time to learn, you'll realize that working Android can be a helluva lot of fun and unbelievably addictive!
pseudoremora said:
There will be a lot more "firsts", believe me. Some things will be harder than others; but if you stick with it and actually take the time to learn, you'll realize that working Android can be a helluva lot of fun and unbelievably addictive!
Click to expand...
Click to collapse
The bug has already bit me. I appreciate the help. It's nice to know there is a community to get good answers from when needed.
Sent from my PC36100
pseudoremora said:
There will be a lot more "firsts", believe me. Some things will be harder than others; but if you stick with it and actually take the time to learn, you'll realize that working Android can be a helluva lot of fun and unbelievably addictive!
Click to expand...
Click to collapse
Instead of posting a new thread perhaps you can help me on this. When I attempt to use adb to remove a bundled app.
adb shell
cd /system/app
ls
rm app.apk
I get Disk space read only. I have full root and NAND I assume. I used the OTA method and am able to flash custom ROMs. I am using the rooted stock 1.47.651.1
rafroehlich2 said:
Instead of posting a new thread perhaps you can help me on this. When I attempt to use adb to remove a bundled app.
adb shell
cd /system/app
ls
rm app.apk
I get Disk space read only. I have full root and NAND I assume. I used the OTA method and am able to flash custom ROMs. I am using the rooted stock 1.47.651.1
Click to expand...
Click to collapse
When a "read-only" message is returned, it usually means that you don't have RW (read-write access), to circumvent this, run this command:
Code:
adb remount -- Should always be run if you plan on changing something that requires RW access
Then:
adb shell
cd /system/app
ls
rm app.apk
If for some reason you get a error message with adb remount (most likely due to permissions), then you'll need to use the full "remount" command, for that, run:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
Hope that helps.
pseudoremora said:
When a "read-only" message is returned, it usually means that you don't have RW (read-write access), to circumvent this, run this command:
Code:
adb remount -- Should always be run if you plan on changing something that requires RW access
Then:
adb shell
cd /system/app
ls
rm app.apk
If for some reason you get a error message with adb remount (most likely due to permissions), then you'll need to use the full "remount" command, for that, run:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
Hope that helps.
Click to expand...
Click to collapse
I tried your method, but I get another error. It looks like:
Code:
mac-mini:~ rafroehlich2$ adb remount
remount failed: Operation not permitted
mac-mini:~ rafroehlich2$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount: exec /usr/sbin/mount_yaffs2 for /System: No such file or directory
Is there a preventable reason
Code:
adb remount
fails? Thanks for the help.
rafroehlich2 said:
I tried your method, but I get another error. It looks like:
Code:
mac-mini:~ rafroehlich2$ adb remount
remount failed: Operation not permitted
mac-mini:~ rafroehlich2$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount: exec /usr/sbin/mount_yaffs2 for /System: No such file or directory
Is there a preventable reason
Code:
adb remount
fails? Thanks for the help.
Click to expand...
Click to collapse
I figured you might have trouble with the ADB remount -- again, this is usually due to permissions. For testing purposes, try booting into recovery and then issuing the adb remount command.
In regards to the full remount command -- I'm wondering if you have busybox (it contains all the Linux command line tools) so that you can run the above commands.
Can you issue and then paste the output back here?:
Code:
cat /proc/mounts
Also, run this:
Code:
adb shell
cd /system/xbin
ls
If you can see a huge list of files -- then that means you do in fact have Busybox installed.
Also, what ROM are you running?
pseudoremora said:
I figured you might have trouble with the ADB remount -- again, this is usually due to permissions. For testing purposes, try booting into recovery and then issuing the adb remount command.
In regards to the full remount command -- I'm wondering if you have busybox (it contains all the Linux command line tools) so that you can run the above commands.
Can you issue and then paste the output back here?:
Code:
cat /proc/mounts
Also, run this:
Code:
adb shell
cd /system/xbin
ls
If you can see a huge list of files -- then that means you do in fact have Busybox installed.
Also, what ROM are you running?
Click to expand...
Click to collapse
After
Code:
cat /proc/mounts
Code:
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/mtdblock4 /system yaffs2 ro 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev 0 0
tmpfs /app-cache tmpfs rw,size=8192k 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Code:
mac-mini:~ rafroehlich2$ adb shell
$ cd /system/xbin
$ ls
wireless_modem
dnsmasq
su
I download the BusyBox app to keep it up to date and also installed it through the "problems" section on titanium backup. However, that's all I got.
The ROM I am using is the fully rooted stock RUU. I'd post a link, but am not sure if I'm allowed to yet. It is the one posted by whitslack.

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.

[Q&A] Mounts2SD - Storage & Memory Management

Mounts2SD - Storage & Memory Management
The Opening Post (OP) has been moved to a new DevDB Section
This Thread has been assigned as an Q&A.
You should see a new pane above where you can navigate this project.
About dalvik-cache? It remains in phone memory?
Hi I cant understand How to use it ! any guide ?!
denzel09 said:
About dalvik-cache? It remains in phone memory?
Click to expand...
Click to collapse
dalvik-cache remains, so does all of the app related data. Only the APK's is moved.
Taki2011 said:
Hi I cant understand How to use it ! any guide ?!
Click to expand...
Click to collapse
First of all you need a custom rom. If you have a stock rom it will not work since you need a rom that will allow custom scripts during boot.
You will also need to know how to use ADB (An android tool for communicating with your phone. It is used to enter the android shell and also to transfer files to and from the phone, among other things).
And last, you will need at least 2 or 3 partitions on your sdcard (Otherwise it's a waste of time, although the script is build to adapt for these scenarios). One as a regular fat32 sdcard partition, one for the sd-ext and one for the cache. (Use ext2 for the last two. ext3 will eat your card to fast)
Here is the steps (You need to have ADB working on your computer).
Copy/Paste the script content into a file editor and safe the file with the name "99mounts2sd"
Plug your phone to your computer using a usb cable (Select charge only on your phone))
Open a terminal on your computer (In windows use "run" and type "cmd")
Type in shell: "adb shell mount -o remount,rw /system"
Type in shell: "adb push <path to script> /system/etc/init.d/"
Type in shell: "adb shell chmod a+x /system/etc/init.d/99mounts2sd"
Reboot your phone
The first time you boot your phone using the script it will take some time, because the script needs to copy all of your APK's from internal storage to the sd-ext partition.
The script has been rewritten. Better checks and more options has been added.
Great script
Sent from my GT-S5570 using Tapatalk
It didn't work for me, I made the files made sure they were in the right place and rebooted but booted normally. No delay on first boot and still seems to not be using the other two partitions on my sd card. i used cwm4 to partiton my SD card and it is partitioned correctly (3 partitons). I see the script says "log" I don't know where the log is stored or how to view it. Thanks.
To see the log, type in the terminal: "logcat | grep mounts2sd". Download a terminal or use ADB.
Also run the command "df -h" to see what is mounted where.
Sent from my HTC Desire using xda premium
thanks for the share.
#7 @dyehya
It seams that logcat has a very limited lifetime. In order to get the log info, you would have to get it during boot.
Instead I have updated the script to do this itself. Update your script and config file content with the new above code.
In the config file set VAR_DEBUG="yes" and reboot your phone. Now enter a terminal and type "cat /var/mounts2sd.log | grep mounts2sd" which will show you all the messages from the script, and possible errors, if any.
I am not sure what is going on in boot. I just saw your replies and haven't had a chance to update the script and mess with the phone. I do know that when I was playing with it before it kept using the busybox minimal that was in the kernel loaded in sbin I tried copying your version of busybox into bin and xbin (and now reverted back) but it would still use the one in sbin. What I would really like to do and would recommend is you design the script where you can put busybox in a certain location and the script will use that version over any other versions. I am still learning with all this and despite being able to create the files throw them in the correct places I don't know the code well enough to do this myself. Thanks again for all your help.
Ok i have changed the script so that it now forces the usage of /system/xbin/busybox or /system/bin/busybox and ignores /sbin/busybox
Place a full busybox version in one of the system bin folders, update the script and see what happends.
Otherwise paste a copy of "df -h" and "cat /data/mounts2sd.log | grep mounts2sd" here so that I can see what it does during boot.
Thanks for this. Just flashed the ICS beta 0.1 with your a2sd embedded. Just a suggestion, I added $CMD_CHMOD 777 $CMD_BUSYBOX at line 260, just after the affectation of CMD_BUSYBOX.
For now, it seems to work very well !
virus2013 said:
Thanks for this. Just flashed the ICS beta 0.1 with your a2sd embedded. Just a suggestion, I added $CMD_CHMOD 777 $CMD_BUSYBOX at line 260, just after the affectation of CMD_BUSYBOX.
For now, it seems to work very well !
Click to expand...
Click to collapse
That I don't get? $CMD_CHMOD is undefined at line 260 and why use busybox to change permissions on itself?
dk_zero-cool said:
That I don't get? $CMD_CHMOD is undefined at line 260 and why use busybox to change permissions on itself?
Click to expand...
Click to collapse
Sorry, I'm tired... :-\
In fact, I just wanna be sure that the busybox in /system/bin was executable as I pushed it into the rom zip. And as chmod was already used upper, I was thinking it could be a good idea. However, I'm not a script writer! ;-)
Sent from my Desire running ICS
Hello Cool,
trying ICS with your script. Here is the output of logcat an df -h command:
Code:
# cat /data/mounts2sd.log | grep mounts2sd
cat /data/mounts2sd.log | grep mounts2sd
12-14 13:05:12.905 V/mounts2sd( 96): Initiating Mounts2SD (v:1.1.1)...
12-14 13:05:12.985 V/mounts2sd( 101): Including configuration file...
12-14 13:05:14.897 V/mounts2sd( 212): Searching for sdcard...
12-14 13:05:15.277 V/mounts2sd( 231): Searching for sd-ext partition (/dev/block/mmcblk0p2)...
12-14 13:05:16.198 V/mounts2sd( 254): sd-ext partition was mounted successfully...
12-14 13:05:16.728 V/mounts2sd( 278): Moving /data/app to /sd-ext/app...
12-14 13:05:17.049 V/mounts2sd( 297): Moving /data/app-private to /sd-ext/app-private...
12-14 13:05:17.209 V/mounts2sd( 305): Searching for the sd-cache partition (/dev/block/mmcblk0p3)...
12-14 13:05:18.050 V/mounts2sd( 326): sd-cache was mounted successfully...
12-14 13:05:18.280 V/mounts2sd( 335): A device is already mounted at /cache. Umounting it...
12-14 13:05:18.420 V/mounts2sd( 341): Moving /cache to /sd-cache...
12-14 13:05:18.440 V/mounts2sd( 342): Done!
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 202.9M 32.0K 202.9M 0% /dev
tmpfs 202.9M 0 202.9M 0% /mnt/asec
tmpfs 202.9M 0 202.9M 0% /mnt/obb
/dev/block/mtdblock3 250.0M 165.0M 85.0M 66% /system
/dev/block/mtdblock5 147.6M 62.4M 85.2M 42% /data
/dev/block/mmcblk0p2 960.7M 1.2M 959.4M 0% /sd-ext
/dev/block/mmcblk0p2 960.7M 1.2M 959.4M 0% /data/app
/dev/block/mmcblk0p2 960.7M 1.2M 959.4M 0% /data/app-private
/dev/block/mmcblk0p3 295.9M 168.0K 295.8M 0% /sd-cache
/dev/block/mmcblk0p3 295.9M 168.0K 295.8M 0% /cache
/dev/block/vold/179:1
6.2G 4.6G 1.6G 75% /mnt/sdcard
/dev/block/vold/179:1
6.2G 4.6G 1.6G 75% /mnt/secure/asec
This looks good, can you please confirm?
Also, why is /data not on ext partition but on phone memory?
Thanks for the script though!
Cheers, keep up the good work.
jukyO said:
This looks good, can you please confirm?
Also, why is /data not on ext partition but on phone memory?
Thanks for the script though!
Cheers, keep up the good work.
Click to expand...
Click to collapse
That looks as it should.
The whole /data is not moved to the /sd-ext for that simple reason that there are no hboot out there with 0mb /data.
I have options in my script to move both the .apk files (The applications) and the dalvik-cache which are the biggest things in the /data partition. If I moved everything to sd-ext, there would be nothing using the remaining space available on the internal data which is a waste of good space. It's like having an extra room in your house that is not used for anything at all. If we have to have it, we might as well use it
BTW:
You don't have dalvik-cache aktivated. So if you ever need more space on /data, activate it in /system/etc/mounts2sd.conf
dk_zero-cool said:
BTW:
You don't have dalvik-cache aktivated. So if you ever need more space on /data, activate it in /system/etc/mounts2sd.conf
Click to expand...
Click to collapse
Could you provide an example mounts2sd.conf file, so that all settings could be established at first boot. This would make it much easier when updating ROMS.
uzi2 said:
Could you provide an example mounts2sd.conf file, so that all settings could be established at first boot. This would make it much easier when updating ROMS.
Click to expand...
Click to collapse
You don't need a .conf file now - it's not used. You simply install the zip and then use the m2sd commands in terminal to make changes (see instructions in OP - type m2sd help for more info)
uzi2 said:
Could you provide an example mounts2sd.conf file, so that all settings could be established at first boot. This would make it much easier when updating ROMS.
Click to expand...
Click to collapse
The config files is deprecated and replaced with the "m2sd" command, as said above. Settings is saved to /data/.m2sd which means that it keeps your settings when you flash new ROM's as long as you don't wipe data.

Categories

Resources