[TUT][20110115][Expert Users & ROM Makers]To add userdata everywhere to your HD2 ROM - HD2 Android NAND Development

[TUT][20110115][Expert Users & ROM Makers]To add userdata everywhere to your HD2 ROM
*FOR EXPERT USERS OR ROM MAKERS ONLY*
*I AM NOT RESPONSIBLE FOR ANY DAMAGE CAUSED TO YOUR DEVICE BY USING THIS*
Features:
- Able to have userdata on NAND or in ext sdcard partition or in /sdcard/.data/data.img
- Check if NAND partition exist
- Check if ext sdcard partition exist
- Resizable data.img (bigger or smaller)
- Able to prioritize data.img, ext or NAND
- Able to copy data from NAND to data.img, or ext to data.img (in this order)
- Write data.log in /sdcard/.data/
- Automatic update data.config if it haven't all options
Click to expand...
Click to collapse
Requirements
Kernel with:
# -File systems: yaffs2, ext2, ext3 (, ext4)
# -MTD partition in /proc/mtd
# -MTD block in /dev/block/mtdblock*
# -SD Card in /sys/block/mmcblk0
InitRD with:
# -/system
# -/proc
# -/sys
# -/data
# -/mfbin
SD Card with first partition as FAT32 or EXT*: mmcblk0p1
SD Card with second partition as EXT*: mmcblk0p2
Click to expand...
Click to collapse
How to use it
In your initrd root
Rename your android init (binary) to init.android
Comment "mount yaffs2 [email protected] /data nosuid nodev noatime nodiratime" in your init.rc
Past mfbin folder
Modify mfbin/.data/data.config with your default setup and "Some variables" in init script
Use new init script and chmod it with 755
Click to expand...
Click to collapse
Download : http://www.multiupload.com/F86WGU6H70
Zip content:
- my initrd.gz example (normally for ManusFreedom or tytung ROM)
- init (extracted from initrd.gz)
- .data folder sample
Click to expand...
Click to collapse
Logical description
To prioritize use data.img over userdata on NAND or ext sdcard partition:
Change data_force_mount to y
To prioritize use ext sdcard partition over userdata on NAND:
Change data_force_mount to n
Change data_ext_priority to y
To prioritize use NAND:
Change data_force_mount to n
Change data_ext_priority to n
Click to expand...
Click to collapse
Use data_copy_to_img=y to copy data from NAND to data.img. If no data on NAND, it try to mount ext partition to copy it to data.img. Works only during creation of data.img (not after).
Click to expand...
Click to collapse
To resize to a bigger data.img (backup your data.img before):
1. If you don't have on sd a directory .data copy .data from install to the root of your sd
2. Open .data/data.config of root of SD Card
3. Change data_size to the size you want in megabytes (recommand not less than 128MB and not over 2GB)
4. Change data_resize to y
5. Boot your phone
6. Wait (time depend)
7. You will be normally under Android
8. You can change data_resize to n for security
To resize to a smaller data.img [CHECK THE FREE SPACE BEFORE SHRINK] (backup your data.img before):
1. If you don't have on sd a directory .data copy .data from install to the root of your sd
2. Open .data/data.config of root of SD Card
3. Change data_size to the size you want in megabytes (recommand not less than 128MB and not over 2GB)
4. Change data_resize to y
5. Change data_force_shrink to y
6. Boot your phone
7. Wait (time depend)
8. You will be normally under Android
8. You can change data_resize and data_force_shrink to n for security
Click to expand...
Click to collapse
Please test it and give feedback.
Thanks meter click .
And if you appreciate my work and want to buy me a drink, please consider making a donation too, thanks.

Added ext sdcard partition support.

manusfreedom said:
Added ext sdcard partition support.
Click to expand...
Click to collapse
Great stuff! I will test it out...

Quick question... how do I create the boot.img using this initrd.gz and the kernel of my choice?

pongster said:
Quick question... how do I create the boot.img using this initrd.gz and the kernel of my choice?
Click to expand...
Click to collapse
the easy way for me is using android itself, put initrd.gz and zimage in /sdcard/boot/
adb shell
mkyaffs2image /sdcard/boot/ /sdcard/boot.img
edit..
this is great, make me so easy creating a rom.. thanks manus

lesjaw said:
the easy way for me is using android itself, put initrd.gz and zimage in /sdcard/boot/
adb shell
mkyaffs2image /sdcard/boot/ /sdcard/boot.img
Click to expand...
Click to collapse
Thanks. I actually created one using mkfs.yaffs2 in linux... but it gave me a kernel error after successfully installing via clockwork... Possible reason as well is the update-script I use... what update-script do you use for your ROM-ZIPs?

pongster said:
Thanks. I actually created one using mkfs.yaffs2 in linux... but it gave me a kernel error after successfully installing via clockwork... Possible reason as well is the update-script I use... what update-script do you use for your ROM-ZIPs?
Click to expand...
Click to collapse
i don't know this for sure, i don't make boot.img for a zip rom, i just put initrd.gz and zimage in boot folder, for update script i use just like raider zip build then compare it with original update script from my original build so i know what i should change in my update script..

lesjaw said:
the easy way for me is using android itself, put initrd.gz and zimage in /sdcard/boot/
adb shell
mkyaffs2image /sdcard/boot/ /sdcard/boot.img
edit..
this is great, make me so easy creating a rom.. thanks manus
Click to expand...
Click to collapse
I actually got the 'NAND kernel open failed' error using another boot.img works though... any ideas to what I'm goofing up?

lesjaw said:
i don't know this for sure, i don't make boot.img for a zip rom, i just put initrd.gz and zimage in boot folder, for update script i use just like raider zip build then compare it with original update script from my original build so i know what i should change in my update script..
Click to expand...
Click to collapse
is your boot folder inside the /system folder? so initrd.gz and zImage inside /system/boot
then you take the META from RaiderX and compare update scripts
before finally creating an update.zip using 1. /system folder and 2. META folder ?

pongster said:
is your boot folder inside the /system folder? so initrd.gz and zImage inside /system/boot
Click to expand...
Click to collapse
No, boot folder is on itself, together with system folder and Meta folder, so we have three folder inside zip
pongster said:
then you take the META from RaiderX and compare update scripts
before finally creating an update.zip using 1. /system folder and 2. META folder ?
Click to expand...
Click to collapse
yes, i need to do that to see if any spesific file permission need to be added

lesjaw said:
No, boot folder is on itself, together with system folder and Meta folder, so we have three folder inside zip
yes, i need to do that to see if any spesific file permission need to be added
Click to expand...
Click to collapse
Thanks.. tried the 3 folders before reading your post... got past the error but its stuck at gogogo...
could you attach the meta folder you use so i can test it out... ?

lesjaw said:
No, boot folder is on itself, together with system folder and Meta folder, so we have three folder inside zip
yes, i need to do that to see if any spesific file permission need to be added
Click to expand...
Click to collapse
so for this manus initrd.gz you just put this in your /boot folder in the romzip and flash away? it must be my update-script then... installing via daf works so i know my system works...

pongster said:
so for this manus initrd.gz you just put this in your /boot folder in the romzip and flash away? it must be my update-script then... installing via daf works so i know my system works...
Click to expand...
Click to collapse
uploading..btw, you can hit me up at gtalk [email protected] rather then we talk about it here..i'm afraid our conversation is getting out of topic from OP thread..

lesjaw said:
uploading..btw, you can hit me up at gtalk [email protected] rather then we talk about it here..i'm afraid our conversation is getting out of topic from OP thread..
Click to expand...
Click to collapse
i know... sorry mods...
back on topic...
did this initrdgz detect your ext partition on sd properly?

New version available (v3)
Added:
- Able to prioritize data.img, ext or NAND
- Able to copy data from NAND to data.img, or ext to data.img (in this order)
- Write data.log in /sdcard/.data/
- Automatic update data.config if it haven't all options

The download file is removed from all servers!!

zooz11 said:
The download file is removed from all servers!!
Click to expand...
Click to collapse
No more direct support for this thread.
You can extract my init script from my updated zip:
http://forum.xda-developers.com/showthread.php?p=11986922#post11986922

Related

[NEED HELP] Help with update-script

I need to copy a single file using an update-script (update.zip's script)
I know that command to copy a dir is
Code:
copy_dir
But if i want to copy only a single file how can i do?
Exit93 said:
I need to copy a single file using an update-script (update.zip's script)
I know that command to copy a dir is
Code:
copy_dir
But if i want to copy only a single file how can i do?
Click to expand...
Click to collapse
put only a single file in the dir? not sure i get your problem, the script should copy everything from the update.zip to the flash memory, why would there be a need to copy a single file?
Kendon is right. Just
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
is needed to copy a single file into the system directory. That script is from one to install WaveSecure to ROM. All it does is copy the contents of the system folder (which is a folder called app, to that location on the system partition of the phone. As there is only one file in the folder app, that file is added or overwritten. Nothing else is changed.
No, i need to copy only one file form SYSTEM to DATA
Then format SYSTEM and recopy that file from DATA to SYSTEM
How can i do?
Exit93 said:
No, i need to copy only one file form SYSTEM to DATA
Then format SYSTEM and recopy that file from DATA to SYSTEM
How can i do?
Click to expand...
Click to collapse
i don't think this is possible with update-script, as it wasn't made for this purpose. care to elaborate what your main goal is, maybe we can find other ways?
kendong2 said:
i don't think this is possible with update-script, as it wasn't made for this purpose. care to elaborate what your main goal is, maybe we can find other ways?
Click to expand...
Click to collapse
I have to format system partition but i have to preserve /system/init.rc file
Deleting all system's subdirs doesn't work

[KERNEL] Universal external lagfix (btrfs,jfs,ext4,reiserfs)

This lagfix will mount /data /dbdata /cache on your external SD almost whichever
FS you choose.
You must partition your SD with 4 partitions in this order:
primary FAT32 (size you wish)
primary your_FS 2Gb for /data
primary your_FS 128Mb for /dbdata
primary your_FS 30Mb for /cache
Supported filesystems are btrfs, ext4, jfs, reiserfs
Sizes are given as indication
This kernel mounts filesystems noatime,nodiratime
Kernel includes busybox full and su. adbd starts at boot by default.
You can even mix and match FS like reiserfs on dbdata, ext4 on data and jfs on cache
How to do:
1: partition your external SD appropriately and format it (using i.e. http://partedmagic.com/)
2: flash zImage_0.1 as kernel with Heimdall
or alternatively flash zImage_0.1.tar with Odin
Kernel can be found at http://llorien.org/samsung_galaxys/jpm/universal
This will obviously wipe your data, if you don't copy it first.
I only tested this on the international Samsung Galaxy S GT-I9000 running froyo JPM.
NOTE: Do not flash unnumbered versions
If you want to revert back to the normal behavior, just flash a stock jpm kernel and you should be fine.
Well, this seems very promising.
Thank you Nikademus.
+1
What do you mean by unnumbered versions?
And what about battery life on HD2 if filesystem is on SD it drains more battery?
nikademus said:
This lagfix will mount /data /dbdata /cache on your external SD almost whichever
FS you choose.
You must partition your SD with 4 partitions in this order:
primary FAT32 (size you wish)
primary your_FS 2Gb for /data
primary your_FS 128Mb for /dbdata
primary your_FS 30Mb for /cache
Supported filesystems are btrfs, ext4, jfs, reiserfs
Sizes are given as indication
This kernel mounts filesystems noatime,nodiratime
Kernel includes busybox full and su. adbd starts at boot by default.
You can even mix and match FS like reiserfs on dbdata, ext4 on data and jfs on cache
How to do:
1: partition your external SD appropriately and format it (using i.e. http://partedmagic.com/)
2: flash zImage_0.1 as kernel with Heimdall
or alternatively flash zImage_0.1.tar with Odin
Kernel can be found at http://llorien.org/samsung_galaxys/jpm/universal
This will obviously wipe your data, if you don't copy it first.
I only tested this on the international Samsung Galaxy S GT-I9000 running froyo JPM.
NOTE: Do not flash unnumbered versions
If you want to revert back to the normal behavior, just flash a stock jpm kernel and you should be fine.
Click to expand...
Click to collapse
Can you somehow make this automated? Not a lot of people here are on linux & repartitioning is not really everyone's cup of tea.
Thnaks.
Some bugs:
1.Tried o flash zImage_0.1.tar and that did corrupt the phone system, so beware!!
The zImage in the tar file is named zImage_0.1, it should be named zImage (more on this later).
2.Extracted zImage_0.1.tar and renamed zImage_0.1 to zImage and added it to a tar file using 7-zip and tried using Odin, that did not work, Odin would hang on flashing zImage.
3. Downloaded zImage_0.1 and renamed that to zImage and flashed using Heimdall, this worked, but the phone seemed to continue scan the external SD-card.
4. Powered down the phone and did a cache wipe and a factory reset and rebooted the phone, it booted but then got to a black screen with the return-key and menu-key on all the time.
The card was partitioned using Partedmagic in external card-reader.
Will try again now and report back.
eclair or froyo ?
hi
Can't read anywhere.
Is this lagfix for eclair rom or froyo ?
It seems the mounbt point of external sdcard isn't just the same on those roms.
Op, could you make the light, please ?
Thanks
deli_gt said:
And what about battery life on HD2 if filesystem is on SD it drains more battery?
Click to expand...
Click to collapse
That does not seem to really affect battery usage.
ragin said:
Can you somehow make this automated? Not a lot of people here are on linux & repartitioning is not really everyone's cup of tea.
Thnaks.
Click to expand...
Click to collapse
That is planned, although you will probably have to put a config file somewhere to define filesystems you want.
[Ramad] said:
Some bugs:
1.Tried o flash zImage_0.1.tar and that did corrupt the phone system, so beware!!
The zImage in the tar file is named zImage_0.1, it should be named zImage (more on this later).
Click to expand...
Click to collapse
Well, I just verified and it's called zImage, not zImage_0.1
[email protected]:~/galaxy$ tar xvf zImage_0.1.tar
zImage
2.Extracted zImage_0.1.tar and renamed zImage_0.1 to zImage and added it to a tar file using 7-zip and tried using Odin, that did not work, Odin would hang on flashing zImage.
Click to expand...
Click to collapse
I don't know what created this. But I haven't tested with Odin yet.
3. Downloaded zImage_0.1 and renamed that to zImage and flashed using Heimdall, this worked, but the phone seemed to continue scan the external SD-card.
Click to expand...
Click to collapse
You don't need to rename it to flash with Heimdall.
What do you mean by phone seems to continue scan the external SD?
4. Powered down the phone and did a cache wipe and a factory reset and rebooted the phone, it booted but then got to a black screen with the return-key and menu-key on all the time.
The card was partitioned using Partedmagic in external card-reader.
Will try again now and report back.
Click to expand...
Click to collapse
Did you format the filesystems?
@nikademus
Here is the deal...The zImage_0.1.tar that can be downloaded from the link you provided is not a tar file but a Gzip file, when extracted then there is what appears to be a file named zImage_0.1, this is not a file but a tar file, that is missing the tar extension, by adding the tar extension, i.e renaming it to zImage_0.1.tar then it can be flashed using Odin. The majority of us are using windows, and some of us are using Linux and OSX where these archives might be read right by the operating system, but in windows it can only be checked by using winrar or 7-zip.
I'm not a novice Windows or Linux user, I know enough, and offcourse I did format the 3 partitions as jfs.
Well, I don't know how you have got a gzipped file but I can ensure you that the tar file is a real tar file. I don't use windows at all, so it's a little bit hard for me to test on windows to find the reason behind this.
@nikademus
Details of the zImage_0.1.tar when downloaded from http://llorien.org/samsung_galaxys/jpm/universal/ :
Uploaded with ImageShack.us
Details when the zImage_0.1.tar is extracted:
Uploaded with ImageShack.us
.tar extension added:
Uploaded with ImageShack.us
Details on the file above, viewed by winrar (se the zImage inside it, now this tar file can be flashed using Odin):
Uploaded with ImageShack.us
I hope that these pictures does show what I mean.
nikademus said:
Well, I don't know how you have got a gzipped file but I can ensure you that the tar file is a real tar file. I don't use windows at all, so it's a little bit hard for me to test on windows to find the reason behind this.
Click to expand...
Click to collapse
He's right. Although it's strange that "tar xvf" would extract without the z option (pipe through gzip), but if you rename the file to .tar.gz, then gunzip will work on it, and more importantly, 'file' identifies it as a gzipped file:
[email protected]:~/Downloads$ ls -l zImage_0.1.tar
-rw-r--r-- 1 carl carl 5704623 2010-10-29 21:32 zImage_0.1.tar
[email protected]:~/Downloads$ file zImage_0.1.tar
zImage_0.1.tar: gzip compressed data, from Unix, last modified: Fri Oct 29 13:42:54 2010
[email protected]:~/Downloads$
Click to expand...
Click to collapse
then, rename to .tar.gz and gunzip, and identify again:
[email protected]:~/Downloads$ mv zImage_0.1.tar zImage_0.1.tar.gz
[email protected]:~/Downloads$ gunzip zImage_0.1.tar.gz
[email protected]:~/Downloads$ file zImage_0.1.tar
zImage_0.1.tar: POSIX tar archive (GNU)
[email protected]:~/Downloads$
Click to expand...
Click to collapse
cmf said:
He's right.
Click to expand...
Click to collapse
Thanks, at last
I was trying to point out that the file can be flashed by Heimdall but not by Odin, Odin can only flash tar files, if you flash the file in it's current stat then it will corrupt the system and when the majority here are using Odin this should have been taken seriously, but it appear that it does not matter, unless a member reporting a bug has been spaming the forum and has a load of posts to backup his words.
I'm done testing this release...good luck.
Well, I must admit this is quite strange because this is not gzipped. Which program did you use to download the file? I would say it's probably because the web server compresses pages using gzip to reduce bandwidth and the program who fetched the file did not uncompress the file like it should have done.
nikademus said:
Well, I must admit this is quite strange because this is not gzipped. Which program did you use to download the file? I would say it's probably because the web server compresses pages using gzip to reduce bandwidth and the program who fetched the file did not uncompress the file like it should have done.
Click to expand...
Click to collapse
I used Google Chrome on Ubuntu Maverick x64. I'll try wget and see what happens, but that's an interesting thought regarding mod_gzip or whatever the apache extension is called.
Regardless, perhaps it would be best to supply a .tgz instead? What's the point in tar-ing a single file ? The idea of tar is to pretty much concatenate multiple files into a single file, without compression, isn't it?
cmf said:
I used Google Chrome on Ubuntu Maverick x64. I'll try wget and see what happens, but that's an interesting thought regarding mod_gzip or whatever the apache extension is called.
Click to expand...
Click to collapse
I am not using apache, but the idea is about the same.
Regardless, perhaps it would be best to supply a .tgz instead? What's the point in tar-ing a single file ? The idea of tar is to pretty much concatenate multiple files into a single file, without compression, isn't it?
Click to expand...
Click to collapse
Because Odin only understands .tar format. If you run from linux, just download the zImage_0.1 with tar, you can flash this one with heimdall
Same with wget:
[email protected]:~/Downloads$ wget http://llorien.org/samsung_galaxys/jpm/universal/zImage_0.1.tar
--2010-10-29 23:09:29-- http://llorien.org/samsung_galaxys/jpm/universal/zImage_0.1.tar
Resolving llorien.org... 206.251.244.96
Connecting to llorien.org|206.251.244.96|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5704623 (5.4M) [application/octet-stream]
Saving to: `zImage_0.1.tar'
100%[==========================================================>] 5,704,623 332K/s in 13s
2010-10-29 23:09:43 (442 KB/s) - `zImage_0.1.tar' saved [5704623/5704623]
[email protected]:~/Downloads$ file zImage_0.1.tar
zImage_0.1.tar: gzip compressed data, from Unix, last modified: Fri Oct 29 13:42:54 2010
[email protected]:~/Downloads$
Click to expand...
Click to collapse
nikademus said:
I am not using apache, but the idea is about the same.
Because Odin only understands .tar format. If you run from linux, just download the zImage_0.1 with tar, you can flash this one with heimdall
Click to expand...
Click to collapse
Ah, fair enough.
Strange then!
BTW, "tar xvf" *does* still work on the apparently gzipped file. Which is weird. Unless GNU tar is just being 'clever' by detecting the gzip compression..
At first I was just looking at your output from before where you did tar xvf, but I just tried it myself on the supposedly gzip file. Weird.

[03 JAN][IDEA] Ramdisk for CM6 builds with external data.img [NOT BUILD]

Features
- external data.img support.
- update kernel and system files without adb.
- easily update build with update.zip, don't have to re-flash.
- options to set data.img size, lcd density, etc in config file.
To enable external data.img
1. create '.data' folde under sdcard (/sdcard/.data).
2. create 'config.txt' under '.data' directory, add 'data_img=1' into 'config.txt'.
3. copy old data.img to '.data' directory, otherwise a new data.img will be created.
4. boot into Android.
If experiencing issue with 1 and 2, simply copy '.data' from View attachment data.zip to sdcard.
To disable external data.img
- delete 'data_img=1' in config.txt.
- delete config.txt.
To change kernel and modules
1. create 'update' folder under sdcard (/sdcard/update).
2. create 'boot' folder under 'update' directory, put zImage into 'boot'. (reboot is needed after updating)
3. create 'system/lib/modules' under 'update' directory, put bcm4329.ko, tun.ko, etc into 'modules'.
4. boot into Android.
To replace initrd.gz and system files
- same as change kernel and modules.
- put 'initrd.gz' under '/sdcard/update/boot'. (reboot is needed after updating)
- put system files under '/sdcard/update/system'.
To use update.zip
- create an update.sh and compress it with update files to update.zip.
- put update.zip under 'sdcard/update'.
- Try ClockworkMod Recovery for HD2
Downloads
- View attachment leo-initrd-0.1.1.zip
- if you want to test the ramdisk, download this build package. Don't forget to backup your data. (thanks to projection for the kernel)
If you've downloaded LEO-CM6.1.1-NAND-3.zip, to update to 3.1, please download the new initrd file, then try the update method above.
To do
- add desire builds support
- add squashfs support
Changes
0.1.1 - fix a stupid typo, sorry.
0.1 - initial.
About config.txt
Code:
data_img=0
- 0, default, use nand userdata, about 250 MB for cm builds
- 1, enable external data.img support (/sdcard/.data/data.img)
data_size=512
- size of data.img, only work when data.img support enabled and first install
data_sync=1
- 0, fast, default, disable sync option when mount data.img
- 1, safe, enable sync option when mount data.img, use this if experiencing data corruption
lcd_density=240
- size of icons
gps_zone=us
- country code, us, fr, jp, etc
Credit to DarkForces Team and everyone in this thread.
that will be very usefull one.another massive milestone in android-hd2 development.cheers
I'm just downloading RAM DISK build... why You strike it ? shoudn't I install it ?
it is becoming obvious that this will be essential for euro H2 NAND builds being that there is very little phone space to play with, where this would be best cooked into ROMs more detailed instructions for noobs would be good.
This is a great idea and will help with the euro versions of hd2 with limited space.
I wonder what will happen with sync, will we run into data corruption problems as with sd builds?
Can this be made so as the data can be on a seperate ext 3/4 partition in sync and the rest of the sdcard can be mounted / unmounted etc ?
DavidX_07 said:
I'm just downloading RAM DISK build... why You strike it ? shoudn't I install it ?
Click to expand...
Click to collapse
Found a stupid typo... will be back soon.
getting back on the horse Kouno? =P
d/l and will test it later
I need to update from your nandv1
had problems with your nandv2, can't change system/lib to r/w
Time to test nandv3
ikkon said:
getting back on the horse Kouno? =P
d/l and will test it later
I need to update from your nandv1
had problems with your nandv2, can't change system/lib to r/w
Time to test nandv3
Click to expand...
Click to collapse
Please download later since it is not available right now.
The lib and xbin is compressed with squashfs in v2, so you can't edit. That's just for test propose. And squashfs file systems have been removed in v3.
i love your job HD2One.
great idea
Is it become to HD2NAND?
LondonTownGuy said:
Can this be made so as the data can be on a seperate ext 3/4 partition in sync and the rest of the sdcard can be mounted / unmounted etc ?
Click to expand...
Click to collapse
I'm new to Android builds configuration, but after some research it looks like it's possible in theory. Personally I do not understand why everyone is so obsessed in data.img file, while it's linux partition in file, that stored on FAT partition. I think actual linux partition on sd card is more elegant solution.
lcd_density=xxx not changing dpi
DavidX_07 said:
lcd_density=xxx not changing dpi
Click to expand...
Click to collapse
Right, it is a typo issue and fixed in 0.1.1.
Please download the new initrd file, then try the update method, tell me if it works
hey Kouno
I just hope you know that Window users can't name a folder that starts with "."
We can always find a way but just giving you the heads up
Ready to Quadrant v.3.1
Kouno.Takaaki said:
Right, it is a typo issue and fixed in 0.1.1.
Please download the new initrd file, then try the update method, tell me if it works
Click to expand...
Click to collapse
Yup, it works BTW blazing fast, testing more now
ikkon said:
hey Kouno
I just hope you know that Window users can't name a folder that starts with "."
We can always find a way but just giving you the heads up
Click to expand...
Click to collapse
I know, so I've provided data.zip and .data folder in the flash package.
Why I use .data instead of data or data2sd? Just want to keep it hidden.
Using the Ramdisk file, when I first turn on the device.
Code:
# cat /proc/meminfo | grep "MemFree"
cat /proc/meminfo | grep "MemFree"
MemFree: 273232 kB
And 5 minutes later.
Code:
# cat /proc/meminfo | grep "MemFree"
cat /proc/meminfo | grep "MemFree"
MemFree: 25596 kB
Memory gets really low, I wonder why?
EDIT: Could just be me. :s
SystemPanel shows 270MB free ram
shadiku said:
Using the Ramdisk file, when I first turn on the device.
Code:
# cat /proc/meminfo | grep "MemFree"
cat /proc/meminfo | grep "MemFree"
MemFree: 273232 kB
And 5 minutes later.
Code:
# cat /proc/meminfo | grep "MemFree"
cat /proc/meminfo | grep "MemFree"
MemFree: 25596 kB
Memory gets really low, I wonder why?
Click to expand...
Click to collapse
Try 'free' command or check the cached memory size.
updating works fine...
framework-res.apk updated succesfull
Sorry , may i ask a stupid question ?
does it work on MDJ Revolution HD v.2.2 build ?
my English is not good !
Sorry for ask this

[Cuestion] Swap Partition on CyanogenMod 7.2

I tried every way, but I can not use the swap partition on my WFS.
I installed the latest version of the ROM and the Kernel, but I can't make it work.
Does anyone know what should I do to run the "Swap Partition" on my phone?
Go through this.
http://wiki.cyanogenmod.com/wiki/Swap_and_Compcache
The cyanogenmod team feels that swap doesn't serve it's purpose on an Android device. To quote them
"This question is hotly debated, but you almost definitely do not need swap or compcache. The only exception to this may be if the device is a first generation device (i.e. HTC Dream or HTC Magic). If you think swap or compcache may make the device faster, feel free to follow the directions below."
Click to expand...
Click to collapse
And the WFS is not a first generation device
If you still want to go ahead with it, that link provides a how-to.
But the problem is that with this ROM my phone does not recognize the swap partition. I would like to post on its own thread, but I can not because I am a new user.
DanHidalgo said:
I tried every way, but I can not use the swap partition on my WFS.
I installed the latest version of the ROM and the Kernel, but I can't make it work.
Does anyone know what should I do to run the "Swap Partition" on my phone?
Click to expand...
Click to collapse
You have to create a mount script and copy it to /system/etc/init.d and give it the same permissions all the other files in init.d
Attached is the code to use if you have swap as the third partition on your SD card. Remove the .txt extension and place it in /system/etc/init.d and give it the appropriate permissions then reboot
Use the command "free" in a terminal session to verify swap is active and working.
It should be pretty straightforward to modify it to be the second if you aren't using an SD Ext partition for programs.
The code is:
Code:
#!/system/bin/sh
#Checks for a swap partition on mount 3 of the SD card and use it for swap partition.
if [ -b /dev/block/mmcblk0p3 ];
then
#Uncomment the line below to adjust swappiness. Default is 60 I believe
# echo 20 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
Change the line:
if [ -b /dev/block/mmcblk0p3 ];
to
if [ -b /dev/block/mmcblk0p2 ];
If you only have your FAT32 Primary and your Swap partition and no SDExt
I will try it this evening. Some people told me that oboe is that I created the Swap Partition with the recovery and I have to create it with the PC.
If I get it working I'll post my results. If not you will see me here again.
Enviado desde mi HTC Wildfire S usando Tapatalk
d33ps1x said:
You have to create a mount script and copy it to /system/etc/init.d and give it the same permissions all the other files in init.d
Attached is the code to use if you have swap as the third partition on your SD card. Remove the .txt extension and place it in /system/etc/init.d and give it the appropriate permissions then reboot
Use the command "free" in a terminal session to verify swap is active and working.
It should be pretty straightforward to modify it to be the second if you aren't using an SD Ext partition for programs.
The code is:
Code:
#!/system/bin/sh
#Checks for a swap partition on mount 3 of the SD card and use it for swap partition.
if [ -b /dev/block/mmcblk0p3 ];
then
#Uncomment the line below to adjust swappiness. Default is 60 I believe
# echo 20 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
Change the line:
if [ -b /dev/block/mmcblk0p3 ];
to
if [ -b /dev/block/mmcblk0p2 ];
If you only have your FAT32 Primary and your Swap partition and no SDExt
Click to expand...
Click to collapse
When I try to move the script to the specific file I get: failed to copy, or failed to move. How could I copy or move the script in /system/etc/init.d and give all permissions? I am using ES File Explorer and ASTRO. Should I move the zipped file or only the script? I couldn't move none of them
Portugah said:
When I try to move the script to the specific file I get: failed to copy, or failed to move. How could I copy or move the script in /system/etc/init.d and give all permissions? I am using ES File Explorer and ASTRO. Should I move the zipped file or only the script? I couldn't move none of them
Click to expand...
Click to collapse
You have to mount system partition as RW to be able to manipulate with files there, big white button "Mounr R/W" in the upper part of the Root explorer app while you are in /system/etc/init.d folder. Then you put there swap.txt file that d33ps1x provided up in the post, rename it just to swap and reboot phone.
I did that with almost every version of cm7 from the begining (in which kernel allowed that) and every time it worked, tnx to d33ps1x
kobredabre said:
You have to mount system partition as RW to be able to manipulate with files there, big white button "Mounr R/W" in the upper part of the Root explorer app while you are in /system/etc/init.d folder. Then you put there swap.txt file that d33ps1x provided up in the post, rename it just to swap and reboot phone.
I did that with almost every version of cm7 from the begining (in which kernel allowed that) and every time it worked, tnx to d33ps1x
Click to expand...
Click to collapse
Root explorer is a paid app. Is there any other app I could do that?
Portugah said:
Root explorer is a paid app. Is there any other app I could do that?
Click to expand...
Click to collapse
Total commander for android can do same:
http://forum.xda-developers.com/showthread.php?t=1619734
and it's free
kobredabre said:
Total commander for android can do same:
http://forum.xda-developers.com/showthread.php?t=1619734
and it's free
Click to expand...
Click to collapse
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.
Portugah said:
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.
Click to expand...
Click to collapse
Push and hold the file, choose properties and then hit first button right from the file name and current permissions to expand the menu
kobredabre said:
Push and hold the file, choose properties and then hit first button right from the file name and current permissions to expand the menu
Click to expand...
Click to collapse
I moved the file to the specific folder and I restarted my phone. Opening a2sd the swap button was turned off. I opened the terminal and I typed free, the results are 0-0-0. I didn't work.
Portugah said:
Once installed the app, how do I grant permissions to the file? the link shows images from the older version.
Click to expand...
Click to collapse
I granted permissions to the file using Total Commander app. Thank you. But it looks like it is not working yet.
Portugah said:
I granted permissions to the file using Total Commander app. Thank you. But it looks like it is not working yet.
Click to expand...
Click to collapse
Then the problem can be with kernel on ROM you are using, basic thing is that kernel needs to be abble to support swap for swap to even work... Can't help you much there since you are probably on marvelc version according to you'r country flag, i'm on diferent version. Some1 with same model as yours could help you tough
Is there any way to install another ROM that support swap? which ROM should I use? is there any tutorial?
Portugah said:
Is there any way to install another ROM that support swap? which ROM should I use? is there any tutorial?
Click to expand...
Click to collapse
The [2nd] above post is correct. Swap support is enabled in some custom kernels. If you're looking for another ROM, you're going to primarily ask about the kernel included with that ROM. Stock kernels do NOT support swap. You can enable swap [if you have a supporting kernel] via A2SDGUI or terminal... read up and familiarize yourself with linux swap.. since Android is a branch of Linux; same principles apply
Rob
Sent from my HTC_A510c using Tapatalk 2
This says it's possible to enable swap and compcache on CM7.2, but the howto wiki link is dead
To answer you question directly, by default the swap and Compcache schemes are disabled, but if you still feel the need to use them, above link provides you with a how-to.
So, yes, the CyanogenMod 7.2 supports swap and its usage needs to be activated.
Click to expand...
Click to collapse
Any idea how to do this?
For me the same question. I'm investigating since 1 week, tried scripts etc. no chance
Nexus One,
4EXT recovery (needed for correct sd-ext formatting)
CM 7.2
swap partition is there but not used.
What could i do to enable the swap partition?
Regards,
Marc
Hello,
I have the stable release cyanogenmod 7.2.0.
Swap is not working and gives following message:
swapon: /dev/block/mmcblk0p3: Function not implement
I found some notes saying that the problem is the kernel not supporting
swap. Which kernel can I use with cyanogenmod 7.2.0 with swap support?.
Thanks for your help.

[Q] Mounting Stock ROM system.img on W7/8/Linux to view and copy files

- I unzipped e.g. T705XXU1ANF from samdownloads.de.rar.
- Then I opened the T705XXU1ANF7.tar.md5 and extracted the *.img files with winrar.
- Then I tried to mount system.img / recovery.img with OSFMount.
Mounting worked but non of the ext2 tools (Ext2Fsd, ext2explore, explore2fs-1.08beta9, Paragon ExtFS for Windows, LinuReader ) would recognice the mounted image or could mount the image itself to view the files.
For ICS/JB I read about ext4_unpacker. Do we have something like that for Kitkat ? Or is it possible under Linux (I am a noob there)
Basically on Linux, it's really easy.
mount -o loop disk1.iso /mnt/disk
Or wherever that you want it to be.
did one of you mount an system.img from Kitkat Stock Rom already ?? Because I dont think ist about W7/8 .... some of the tools listed should be able to read ext4 ... (ext4_unpacker wont work either !!)
pegasus21 said:
Basically on Linux, it's really easy.
mount -o loop disk1.iso /mnt/disk
Or wherever that you want it to be.
Click to expand...
Click to collapse
no it cant be mounted that way... I tried under unbuntu LiveDVD. the System.img can be mounted, but there is no readable filesystem. So it must be processed in some form like ext4unpacker did for ICS/JB ...
gggg said:
no it cant be mounted that way... I tried under unbuntu LiveDVD. the System.img can be mounted, but there is no readable filesystem. So it must be processed in some form like ext4unpacker did for ICS/JB ...
Click to expand...
Click to collapse
You're right... I thought it worked out of the box.
Anyway, I used RKwinTools to extract the system.img contents on Windows.
Place system.img in RKwinTools_v133\unpack\firmware\image\
Run the batch file and select option 6 and you'll find the contents under RKwinTools_v133\unpack\System
pegasus21 said:
You're right... I thought it worked out of the box.
Anyway, I used RKwinTools to extract the system.img contents on Windows. Place system.img in RKwinTools_v133\unpack\firmware\image\
Run the batch file and select option 6 and you'll find the contents under RKwinTools_v133\unpack\System
Click to expand...
Click to collapse
THX unpacking worked like a charm, but is there also a way of just converting the img to one that is a mountable.ext4. This one I could use under Win and Linux as it would keep permissions ... (Simg2img didnt work)
This is the error:
Code:
*** Please wait... ***
Ext4Extractor version 1.5.2 Created by And_PDA Based on sources ext4_unpacker
Extractor for images in EXT2\EXT3\EXT4\SPARSE formats
Open image file Unpack/Firmware/Image/system.img successfull...
Found SPARSE FORMAT
Convert to EXT4 format started...
Convert to EXT4 format finish success
*********************************
*** Error! ***
*********************************
gggg said:
THX unpacking worked like a charm, but is there also a way of just converting the img to one that is a mountable.ext4. This one I could use under Win and Linux as it would keep permissions ... (Simg2img didnt work)
This is the error:
Code:
*** Please wait... ***
Ext4Extractor version 1.5.2 Created by And_PDA Based on sources ext4_unpacker
Extractor for images in EXT2\EXT3\EXT4\SPARSE formats
Open image file Unpack/Firmware/Image/system.img successfull...
Found SPARSE FORMAT
Convert to EXT4 format started...
Convert to EXT4 format finish success
*********************************
*** Error! ***
*********************************
Click to expand...
Click to collapse
Well option 7 will convert the sparse ext4 image to a normal ext4 image. The message shows error but it would seem that it's converted. Find the image in the same location that you placed system.img.
Mount system_ext4.img on linux using
Code:
mount -t ext4 -o loop system_ext4.img /mnt
pegasus21 said:
Well option 7 will convert the sparse ext4 image to a normal ext4 image. The message shows error but it would seem that it's converted. Find the image in the same location that you placed system.img.
Click to expand...
Click to collapse
THX so far, I can mount it on my Linux PC not under Win8
- Linux Rader still cant open it
- I can Mount it with OSFMount, but neither paragon ExtFS nor ext2Mgr recognice the mounted Drive ????
ideas very welcome
gggg said:
ideas very welcome
Click to expand...
Click to collapse
try this windows system to ext4 double click bat file then drag your system.ing,cache.img or data.img to the open window
pegasus21 said:
You're right... I thought it worked out of the box.
Anyway, I used RKwinTools to extract the system.img contents on Windows.
Place system.img in RKwinTools_v133\unpack\firmware\image\
Run the batch file and select option 6 and you'll find the contents under RKwinTools_v133\unpack\System
Click to expand...
Click to collapse
How to decompile the boot and the kernel?
hello... how to repack the unpacked files?
pegasus21 said:
You're right... I thought it worked out of the box.
Anyway, I used RKwinTools to extract the system.img contents on Windows.
Place system.img in RKwinTools_v133\unpack\firmware\image\
Run the batch file and select option 6 and you'll find the contents under RKwinTools_v133\unpack\System
Click to expand...
Click to collapse
bro can you little explain how its work, i have win , after extract i have just this 3 folders
_in
app
cywim
so where i put system.img.ext4 files?
i really don,t care about extracted i need to repack to ext4

Categories

Resources