Quadrant & DHD - Desire HD General

Hi there,
as you might know, the SGS has very high quadrant scores.
This is due to people using the lag fix, which effectively disable the fync() called on the quadrant's database write operation and is cheating.
A SGS actually scores around 1800 at quadrant "without cheating" (cheating: http://android.chemlab.org/quadrant-rape.png)
Since all the noob web blogs and so-called journalists all use the quadrant table to show and decide if a phone is faster than the others, it would be interesting to apply the same cheat to the DHD and submit the quadrant score.
I would be interested in the results, both the number, but also the reaction of those various rather stupid blogs (hi engadget etc ;p)
As I have a SGS and no DHD (and do not plan to replace the SGS by one! ha!) here's how to proceed, prolly need a few adjustements to work on the DHD (as root, need a rebooted phone, adb of course)
At your own risk!
- create a big file:
dd if=/dev/zero of=/data/data.ext2 bs=1024 count=1048576
-create the loopmount node:
mknod /dev/loop0 b 7 0
-make it look like a real disk:
losetup /dev/loop0 /data/data.ext2
-format it
mkfs.ext2 /dev/loop0
-shuffle stuff around:
mkdir /data/data1
mount -o rw,noatime,nodiratime /dev/loop0 /data/data1
cp -r /data/data/ /data/data1/
mount -o bind /data/data1/data /data/data
cp -r /data/dalvik-cache/ /data/
mount -o bind /data/data1/dalvik-cache /data/dalvik-cache
If you reboot, it should still work alright without the cheat but you'll lose any new data between the cheat "activation" on the reboot of course.
Once enabled just run quadrant and check the score.
to disable, reboot and delete /data/data1 and /data/data.ext2
Once again, at your own risk, you might brick your phone etc doing this. Still would be interesting/fun to see.

SGs has around 1000 with stock fw...

DANGER
bilboa1 said:
Hi there,
as you might know, the SGS has very high quadrant scores.
This is due to people using the lag fix, which effectively disable the fync() called on the quadrant's database write operation and is cheating.
A SGS actually scores around 1800 at quadrant "without cheating" (cheating: http://android.chemlab.org/quadrant-rape.png)
Since all the noob web blogs and so-called journalists all use the quadrant table to show and decide if a phone is faster than the others, it would be interesting to apply the same cheat to the DHD and submit the quadrant score.
I would be interested in the results, both the number, but also the reaction of those various rather stupid blogs (hi engadget etc ;p)
As I have a SGS and no DHD (and do not plan to replace the SGS by one! ha!) here's how to proceed, prolly need a few adjustements to work on the DHD (as root, need a rebooted phone, adb of course)
At your own risk!
- create a big file:
dd if=/dev/zero of=/data/data.ext2 bs=1024 count=1048576
-create the loopmount node:
mknod /dev/loop0 b 7 0
-make it look like a real disk:
losetup /dev/loop0 /data/data.ext2
-format it
mkfs.ext2 /dev/loop0
-shuffle stuff around:
mkdir /data/data1
mount -o rw,noatime,nodiratime /dev/loop0 /data/data1
cp -r /data/data/ /data/data1/
mount -o bind /data/data1/data /data/data
cp -r /data/dalvik-cache/ /data/
mount -o bind /data/data1/dalvik-cache /data/dalvik-cache
If you reboot, it should still work alright without the cheat but you'll lose any new data between the cheat "activation" on the reboot of course.
Once enabled just run quadrant and check the score.
to disable, reboot and delete /data/data1 and /data/data.ext2
Once again, at your own risk, you might brick your phone etc doing this. Still would be interesting/fun to see.
Click to expand...
Click to collapse
DO NOT CARRY OUT THESE INSTRUCTIONS, YOU WILL MESS UP YOUR DHD.
Please do not post commands if you don't know what you are doing. Fool

bratfink said:
DO NOT CARRY OUT THESE INSTRUCTIONS, YOU WILL MESS UP YOUR DHD.
Please do not post commands if you don't know what you are doing. Fool
Click to expand...
Click to collapse
i think if he's confident in it working he should go ahead. I'd be interested to see if the DHD can achieve scores similar to the SGS.

bratfink said:
DO NOT CARRY OUT THESE INSTRUCTIONS, YOU WILL MESS UP YOUR DHD.
Click to expand...
Click to collapse
After a reboot the only difference will be a huge file /data/data.ext2 wasting space on the internal storage. Apart from that there is no change.

Please note:
- 1700 is without cheating, not "without lagfix". 1700 (in fact sometimes I score 1800) is with ext4 as native filesystem. Using "cheat" which is the most popular lagfix (it's slower than the real fix too...) you get 2000, 2500, 3000 even sometimes
- I did put warnings, that you've to know what you're doing, will robinson but if you do then you know its no big deal and how to recover if you mess things up somehow

Rolly-eyes
Yes i understand exactly what the commands do. But we are using busybox (without a kernel with ext2 support) to create the ext2 partition, thus once the phone has rebooted their will be a 1gb ext2 block in data/data. However as we havnt flashed another kernel that doesnt have ext2 support we cannot recognise ext2 (only yaffs2). And seeing as we dont have Odin like the sgs has without a proper recovery image (and amon_ra doesnt touch interal file formats) then we would not be able to regain the 1gb and bascially will be screwed. So yea do it if you want. And il buy ur HD brick of you for a 10a

bratfink said:
) then we would not be able to regain the 1gb and bascially will be screwed. So yea do it if you want. And il buy ur HD brick of you for a 10a
Click to expand...
Click to collapse
Untrue.
Just reboot and delete the 1 Gb file created with dd.
This is just a regular file that has been loop-mounted.
btw, if you REALLY want to cheat, make a ramdisk and dd the file in there (you can afford a 256/384 Mb file since the DHD sports 768 MB RAM).
How's THAT for speed?
Arrr!
^^
Here's a quick reminder how to achieve just that:
mount -t tmpfs none -o size=390m /data/data1
continue with the instructions from post #1 (but count the blocks for 384 MB, not for 1 Gb)
;]

adwinp said:
Untrue.
Just reboot and delete the 1 Gb file created with dd.
This is just a regular file that has been loop-mounted.
btw, if you REALLY want to cheat, make a ramdisk and dd the file in there (you can afford a 256/384 Mb file since the DHD sports 768 MB RAM).
How's THAT for speed?
Arrr!
^^
Here's a quick reminder how to achieve just that:
mount -t tmpfs none -o size=390m /data/data1
continue with the instructions from post #1 (but count the blocks for 384 MB, not for 1 Gb)
;]
Click to expand...
Click to collapse
'
Epic ramdisk would be epic. People need to realize that taking benchmark numbers at face value is stupid.

jords12 said:
'
Epic ramdisk would be epic. People need to realize that taking benchmark numbers at face value is stupid.
Click to expand...
Click to collapse
I always find this funny.
In any case, there's no way a regular user would be able to FULLY harness the power today's (1 GHz / 512+ MB RAM) smartphones.
Dual cores and + might come in handy if you're running a second OS in the background (for example, debian/ubuntu or gentoo in a chroot), with active services like ftp/ssh etc...

Related

[Q] how can i increase vm heap size in android phone

i am developing an application in android..but i got an issue of getting an error..that is out of memory exception while i am converting my file contents to byte array..i think this the problem of reduced heap size..can u plz tell me how can i increase the vm heap size..i am using eclipse...
That's interesting, I would like to know the answer to this question as well. What type of phone are you using and how big is the file?
HTC desire it has already a 516 mb RAM
file is about 10mb long
broody said:
That's interesting, I would like to know the answer to this question as well. What type of phone are you using and how big is the file?
Click to expand...
Click to collapse
phone is htc desire...file 10 mb
for the moto droid it's in the build.prop. It may be there for other your phone too.
but i canot edit that file.....
i need to install my application on defferent phones....i think i need a change in the application configuration.....is there any way????? plz...reply
VM heap is a system variable so can not be changed on a per-application basis.
Because it is a system variable it can only be changed by a root process.
It is established and maintained in build.prop, it is read at boot into a variable space then can be changed, again by a uid=0 process only, in runtime (e.g. CM6 has a runtime option). The runtime option also edits build.prop.
i need more memory for my application...would you plz tell me a way to increase memory...
how can i increase the memory size for a normal third party application ????
I was under the impression the heap was something like 16mb, is that not the case? What kind of data are you loading?
files like jpeg,mp3,avi etc..
suhas.m said:
i need more memory for my application...would you plz tell me a way to increase memory...
Click to expand...
Click to collapse
Using so much memory (and even more, if you find a way to increase the memory available to your app, which I doubt) is not being very friendly to the other apps concurrently running.
The much better approach would be to reduce your memory requirements, for example by processing the files in small chunks.
Cheers
tadzio
Copy /system/build.prop to the sdcard root and modify 'dalvik.vm.heapsize' to the desired value. Default is 16m. You can safetly to 32m. Use the following commands to move the modified build.prop to the /system directory:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mv /system/build.prop /system/build.prop.bak
cd sdcard
busybox cp -R build.prop /system
chmod 644 /system/build.prop
mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system
sync
reboot
Alternatively, flash the CM6 ROM. Cyanogen has integrated Cyanogen Mods which allows you to modify the davik heap within system settings.
Regards,
Nathan
Edit: I have an Evo 4g. The default VM heap and will differ depending on phone model. The commands above were taken from the discussion at this website: http://www.droidforums.net/forum/droid-hacks/18574-editing-build-prop.html
I've used this procedure successfully for modifying my build.props files.
the default heap size is 16m.but the phone (HTC desire) already have 516m memory.
then would u plz tell me what is the need of that amount memory......?
Actually in my application,i am trying to upload (multi part upload) 5mb,10 mb file.For that i am converting files into bytes.Then writing the byte array into a byte array out putstream.But at the time of writing, it will cause to an out of memory exception.would you plz tell what is the cause...?

Universal Lagfix corrupt badly /system

supercurio has reported:
SpeedMod based (Doc's ROM and others) and every other Universal Lagfix corrupt badly /system
It means that as long as they don't restore a /system with Odin, they're stuck on kernels using broken mount options.
If you want to verify, try to boot a stock Samsung kernel. Depends on how much it is corrupt it will boot, or not, or with unexpected errors
Want proof?
http://bit.ly/bq2oXg
Highlighted line is using wrong and corruption mount points
lack of check=no which causes corruption. Every Samsung mount uses check=no
Second Issue:
Even with NO RFS Config selected... RFS is still used in /system mounts... means phone are slowly Dying of corruption..
please fix linky - I want to know more about this:
That page doesn't exist!
Click to expand...
Click to collapse
thanks !
zacharias.maladroit said:
please fix linky - I want to know more about this:
thanks !
Click to expand...
Click to collapse
Fixed XD Sorry for that
Not 100% sure on this, since I have not used or looked at sztupy's lagfix very much, but that line you are pointing out is not a problem.
If /system is EXT4, then calling mount -t rfs on it will simply return an error message, and not mount it. It will do exactly nothing.
The following line would then mount it correctly.
Basically, this seems to be totally false. More evidence please.
EDIT: Okay, OP was updated with better information. Lack of check=no means that the FAT32 check *may* be running on the /system, which would cause corruption.
Probably a good idea to confirm if the filesystem check is actually happening though!
In case that supercurio is right (I hope he’s not for obvious reasons), I guess that it wont affect to users that are running harcore kernel without any lagfix applied, right?
RyanZA said:
If /system is EXT4, then calling mount -t rfs on it will simply return an error message, and not mount it. It will do exactly nothing.
The following line would then mount it correctly.
Click to expand...
Click to collapse
That is correct, however /system is not EXT4, but RFS.
good catch.
but im sure sztupy can fix this with a small patch, although i agree the priority should be flagged 'critical'...
as always, good work supercurio
NetCopAD said:
That is correct, however /system is not EXT4, but RFS.
Click to expand...
Click to collapse
Thanks, I thought this was referring to a problem when /system is converted, rather than when it isn't. Which means that if you are running sztupy's kernel with one of the settings that convert /system then it should be fine.
In case that supercurio is right (I hope he’s not for obvious reasons), I guess that it wont affect to users that are running harcore kernel without any lagfix applied, right?
Click to expand...
Click to collapse
It would actually affect you in this case, as the problem occurs when the lagfix is NOT applied, rather than when it is applied!
If it even is a problem, and the fat32 check runs rather than the system trying to do fsck.rfs and failing.
RyanZA said:
Thanks, I thought this was referring to a problem when /system is converted, rather than when it isn't. Which means that if you are running sztupy's kernel with one of the settings that convert /system then it should be fine.
It would actually affect you in this case, as the problem occurs when the lagfix is NOT applied, rather than when it is applied!
If it even is a problem, and the fat32 check runs rather than the system trying to do fsck.rfs and failing.
Click to expand...
Click to collapse
Maybe I am wrong but there is no settings in sztupy's kernel which convert /system
Lagfix only convert /data, /cache and /dbdata
Mopral said:
Maybe I am wrong but there is no settings in sztupy's kernel which convert /system
Lagfix only convert /data, /cache and /dbdata
Click to expand...
Click to collapse
Yeah i just looking further system is still mounted as
/sbin/busybox mount -t rfs /dev/block/stl9 /system - Possible corruption happens here without check=no
RyanZA said:
Thanks, I thought this was referring to a problem when /system is converted, rather than when it isn't. Which means that if you are running sztupy's kernel with one of the settings that convert /system then it should be fine.
It would actually affect you in this case, as the problem occurs when the lagfix is NOT applied, rather than when it is applied!
If it even is a problem, and the fat32 check runs rather than the system trying to do fsck.rfs and failing.
Click to expand...
Click to collapse
Yes this would affect the speedmod kernel as well, if it indeed is a problem. ULFK does not change /system in any lagfix scheme. So, its always mounted as rfs, apparently "wrongly".
I am testing an updated speedmod (shall we say, K9-pre) with the changed mount option. At the very least it should do no harm. And trying to get in touch with curio but over at IRC they say he's probably sleeping now after a coding binge!
Hmm and I found a minor 'bug' in the post-init.sh that was not properly setting /system to read-only after its done.... mainly because the logfile is being written to /system!
Method to test if this is a problem:
Replace your fsck_msdos (this is the only fat32 fsck in the filesystem) with a script file. Inside the script put the following:
Code:
echo "$?" > /somewhere
Then reboot your phone a lot of times. If the check is being called, then you will now get a log message instead of the check happening.
Will also affect checking of /sdcard though.
As far as I know though, fsck_msdos is only ever called by vold, and therefore check=no in /system may not have any effect, and this could be a false alarm. Anyway as hardcore says, can't hurt to fix it!
EDIT: Just wanted to add that running fsck_msdos even once on my /system (using the awesome pre-init scripts from z4mod!) made my phone immediately unbootable (damnit!). Not a big sample size, but I believe that if this was really a problem, we would be seeing many many reports of the sztupy kernel breaking devices! Since we don't have these reports, I'm gonna put this myth down as 'likely to be busted soon!'
RyanZA said:
Method to test if this is a problem:
Replace your fsck_msdos (this is the only fat32 fsck in the filesystem) with a script file. Inside the script put the following:
Code:
echo "$?" > /somewhere
Then reboot your phone a lot of times. If the check is being called, then you will now get a log message instead of the check happening.
Will also affect checking of /sdcard though.
As far as I know though, fsck_msdos is only ever called by vold, and therefore check=no in /system may not have any effect, and this could be a false alarm. Anyway as hardcore says, can't hurt to fix it!
Click to expand...
Click to collapse
Well the intention of this post is to show the issue for it to be fixed So let hope it does not do too much damage :S
deathst said:
Well the intention of this post is to show the issue for it to be fixed So let hope it does not do too much damage :S
Click to expand...
Click to collapse
Looks like this may have been a bit too sensationalist!
More checking, less guessing is always good! (And I could learn a lot from that motto myself!! )
RyanZA said:
Looks like this may have been a bit too sensationalist!
More checking, less guessing is always good! (And I could learn a lot from that motto myself!! )
Click to expand...
Click to collapse
Well we could check it by running it on RFS and reboot alot of time and then flashing a original Kernel
RyanZA said:
Looks like this may have been a bit too sensationalist!
More checking, less guessing is always good! (And I could learn a lot from that motto myself!! )
Click to expand...
Click to collapse
yeah when i saw that post my balls shrank.. thinking that by precious phone may be 'slowly dying of corruption'
not like there is a repair file system tool to use
Code:
/dev/block/stl9 /system rfs ro,noatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0
K8, u had a short life... looks like its time for K9
Important thing to note is that this is the way stock kernels mount /system: read-only, and we see the option log_off too.
The thing I noticed this way is that if u do a mount -o remount,rw /system and modify stuff... it may corrupt /system. All modifications to /system should then ideally be done via CWM or update.zip only.
deathst said:
Well we could check it by running it on RFS and reboot alot of time and then flashing a original Kernel
Click to expand...
Click to collapse
Why would flashing an original kernel make a difference? Original kernel will mount /system in exactly the same way, so any corruption in /system would be seen on both the original kernel and on the sztupy kernel before the reflash.
Reflash or not has nothing to do with it.
Only method would be to reboot (or remount) enough times to hit the unclean filesystem check parameter (which rfs might not even have?), or wait long enough for the unclean check time to elapse. Not really sure how you would check what this parameter is - maybe tune2fs could be used? RFS is a bit of a black box!
RyanZA said:
Why would flashing an original kernel make a difference? Original kernel will mount /system in exactly the same way, so any corruption in /system would be seen on both the original kernel and on the sztupy kernel before the reflash.
Reflash or not has nothing to do with it.
Only method would be to reboot (or remount) enough times to hit the unclean filesystem check parameter (which rfs might not even have?), or wait long enough for the unclean check time to elapse. Not really sure how you would check what this parameter is - maybe tune2fs could be used? RFS is a bit of a black box!
Click to expand...
Click to collapse
It may mount correctly with Original Kernel..If it does quite a damage to the /system the phone might report errors even it is will not be able to boot.
deathst said:
It may mount correctly with Original Kernel..If it does quite a damage to the /system the phone might report errors even it is will not be able to boot.
Click to expand...
Click to collapse
No, that doesn't make sense. The difference between stock and sztupy is that sztupy's mount is telling the system to try and check the drive. If /system works fine in the sztupy kernel, it will still work fine in the stock kernel, because the only difference is that the stock kernel DOESN'T check. Well, testing so far seems to be showing that neither check, and the check option does nothing at all.

[HOWTO] Remove Journaling from EXT4 Partitions

Hello Community!
First off, the original thread - http://forum.xda-developers.com/showthread.php?t=851407
I wanted to bring this to everyone's attention. I have seen many requests for converting all partitions to EXT2 as it is faster than EXT4. So far the only way to do this is with Z4 modded kernels. Well Hardcore over in the i9000 forums (<3 their development section) posted a method a achieve the next best thing - EXT4 with no journaling! I have yet to test this out, but I will be doing so tonight and posting results. I plan on trying this with ULF (which has been confirmed to work) and ttabbal's all EXT4 Dragon Rom (TW Beta Section). The process just simply removes journaling from EXT4 partitions, so it's as fast or faster than EXT2 but with all the added benefits of being EXT4.
Thought some people might find this useful... enjoy!
Update - I can confirm this works with ULF. I was able to remove journaling from all three partitions no problem following the instructions below. I had no data loss or FC's upon reboot. Below are Hardcore's instructions from the original thread - link posted at the top. I in no way helped in this, just merely sharing what I found. All props go to Hardcore.
hardcore said:
WARNING: This procedure is risky and may result in loss of data.
This is a follow up to findings made in this thread: http://forum.xda-developers.com/showthread.php?t=819580
Many people have been asking for an ext2 lagfix. You can get something similar but (arguably) better: ext4 with no journaling. Ext4 no-journal performs as fast or faster than ext2 because of performance improvements made in ext4.
Quadrant comparison for ext4 /data-only lagfix:
ext4 scores about 1500, ext4 no-journal scores about 1650.
This should work with existing kernels that support ext4 lagfixes. It's tested on a ULFK kernel (SpeedMod).
WARNING: Turning off journaling makes your data more susceptible to getting corrupted, although the risk is small.
Disclaimer: No promises that this will work for you, or that it won't corrupt your data. Try this at your own risk.
Step 0: You start off by applying an ext4 lagfix. If you are already using an ext4 lagfix, you can skip this step.
For ULFK kernels, this is either:
- "Voodoo" ext4 /data
- No-RFS advanced ext4
After the lagfix has been successfully applied and your phone is up and running properly, then you can proceed to convert the ext4 partitions.
Step 1: Make a backup of your data, using CWM (recommended). If anything goes wrong, you can restore the backup later.
Step 2: Download the tune2fs file attached to this post (works for FROYO roms only), and copy it to /data as /data/tune2fs:
adb push tune2fs /sdcard/
adb shell
# su
# cp /sdcard/tune2fs /data/
Procedure if your kernel has ro.debuggable enabled:
Step 3: If your kernel has ro.debuggable enabled, then boot your phone into recovery mode. Then run adb in root mode:
adb root
(wait for adbd to restart)
adb shell
Copy tune2fs to the /tmp folder.
# cp /data/tune2fs /tmp/
If you don't have ro.debuggable enabled, "adb root" will give you an error. Go to Step 3A in the next section.
Step 4: Now in ADB shell, find out which partitions are ext4:
# mount | grep ext4
mount | grep ext4
/dev/block/mmcblk0p2 on /data type ext4 (rw,noatime,barrier=0,data=writeback,noauto_da_alloc)
/dev/block/stl10 on /dbdata type ext4 (rw,noatime,barrier=0,data=writeback,noauto_da_alloc)
/dev/block/stl11 on /cache type ext4 (rw,noatime,barrier=0,data=writeback,noauto_da_alloc)
In this example, the 3 partitions are:
/dev/block/mmcblk0p2 (/data)
/dev/block/stl10 (/dbdata)
/dev/block/stl11 (/cache)
Repeat Steps 5 to 9 for every partition you want to remove the journal from.
The next steps show the procedure for /dev/block/mmcblk0p2 (/data).
Step 5: Unmount the partition:
umount partition_mount_point
for example:
# umount /data
Step 6: Check if there is a journal:
# /tmp/tune2fs -l /dev/block/mmcblk0p2 | grep features
You should see something like this:
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
You should see "has_journal" in the features. It means this partition has a journal.
Step 7: Fsck the partition:
# e2fsck -f /dev/block/mmcblk0p2
Step 8: Remove the journal:
# /tmp/tune2fs -O ^has_journal /dev/block/mmcblk0p2
(this is a capital "O"!)
Step 9: Check if the journal was removed:
# /tmp/tune2fs -l /dev/block/mmcblk0p2 | grep features
You should see something like this:
Filesystem features: ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
You should see "has_journal" is NOT there.
Done for this partition.
Step 10: After you've remove the journal from all the partitions you wanted to, shutdown the phone by pressing the power button.
DONE. You only need to do this procedure once and it'll "stick" until the next time you re-format the partition.
--------------------------------------------------
Procedure if you don't have ro.debuggable enabled:
Step 3A: If you kernel does not have ro.debuggable enabled, then you can try doing this using normal adb with su while the phone is running. But this is much more risky.
To lower the risk, do this right after booting, wait for the Media Scan to complete.
adb shell
# su
Step 4A: Now in ADB shell, find out which partitions are ext4:
# mount | grep ext4
mount | grep ext4
/dev/block/mmcblk0p2 on /data type ext4 (rw,noatime,barrier=0,data=writeback,noauto_da_alloc)
/dev/block/stl10 on /dbdata type ext4 (rw,noatime,barrier=0,data=writeback,noauto_da_alloc)
/dev/block/stl11 on /cache type ext4 (rw,noatime,barrier=0,data=writeback,noauto_da_alloc)
In this example, the 3 partitions are:
/dev/block/mmcblk0p2 (/data)
/dev/block/stl10 (/dbdata)
/dev/block/stl11 (/cache)
Repeat Steps 5A to 8A for every partition you want to remove the journal from.
The next steps show the procedure for /dev/block/mmcblk0p2 (/data).
Step 5A: Check if there is a journal:
# /data/tune2fs -l /dev/block/mmcblk0p2 | grep features
You should see something like this:
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
You should see "has_journal" in the features. It means this partition has a journal.
Step 6A: Fsck the partition:
# e2fsck -f /dev/block/mmcblk0p2
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
Do you really want to continue (y/n)?
Answer yes.
Step 7A: Remove the journal:
# /data/tune2fs -O ^has_journal /dev/block/mmcblk0p2
(this is a capital "O"!)
Step 8A: Check if the journal was removed:
# /data/tune2fs -l /dev/block/mmcblk0p2 | grep features
You should see something like this:
Filesystem features: ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
You should see "has_journal" is NOT there.
Done for this partition.
Step 9A: After you've remove the journal from all the partitions you wanted to, shutdown the phone by pressing the power button. Reboot the phone and hope everything works.
DONE. You only need to do this procedure once and it'll "stick" until the next time you re-format the partition.
Click to expand...
Click to collapse
This is a lagfix for a lagfix? A metalagfix?
Sent from my SGH-T959 using XDA App
Super saiyan lagfix
grennis said:
This is a lagfix for a lagfix? A metalagfix?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
This simply takes an existing ext4 lagfix and optimizes performance at the slight expense of reliability.
I'm more interested in this magical dragron rom you speak of. I cant seem to find it. Do you have a link?
wildklymr said:
I'm more interested in this magical dragron rom you speak of. I cant seem to find it. Do you have a link?
Click to expand...
Click to collapse
It's listed in the donators section of ~tw~'s forums.
This really sounds like a great idea. Is there any way you, or a dev could possibly turn the whole process into a CWM flashable .zip?
This is probably the best thing that's happened to my phone... Its flying...!!!
How good is this one compared to JFS overkill?
Idk, that seems like a lot of work for someone who's lazy like myself
djquick said:
Idk, that seems like a lot of work for someone who's lazy like myself
Click to expand...
Click to collapse
no it's not that much work and I'm a total newbie... ran into some newbie minor issues (kept typing 'unmount' instead of 'umount' lol and had to use chmod on the file tune2fs) but otherwise quite painless...
and now onto testing it for the day or two until the next rom release ...
djquick said:
Idk, that seems like a lot of work for someone who's lazy like myself
Click to expand...
Click to collapse
Sonnislav said:
no it's not that much work and I'm a total newbie... ran into some newbie minor issues (kept typing 'unmount' instead of 'umount' lol and had to use chmod on the file tune2fs) but otherwise quite painless...
and now onto testing it for the day or two until the next rom release ...
Click to expand...
Click to collapse
It looks like a lot of work but in actuality is quite simple. Many of the steps are just verification steps so you can see that it worked. Been rocking this for 2 full days and I must say the improvement is quite noticeable.
Bignjuicyjc said:
This really sounds like a great idea. Is there any way you, or a dev could possibly turn the whole process into a CWM flashable .zip?
Click to expand...
Click to collapse
I would love to pack this into a zip for everyone, but I'm afraid I don't have much technical "know-how" when it comes to stuff like that. Maybe if this peaks some interest one of these more bonafied devs could provide that for everyone.
So, After doing some reading of the thread in the I9000 Dev forum, I decided to go ahead and give this a try. I removed the journaling from all three Ext4 partitions. The process was rather painless and smooth.
I'll report back a little later after I've had some time to test it out.
I was only able to remove the journaling from /data(/dev/block/mmcblk0p2)... I typed "mount | grep ext4.. It only displayed the /data/ partition.. If the other partitions dont show, does it mean the other partitions dont have journaling?... But wouldnt they still show...? Im on obsidionv5... With eugene b oc 1125 kernel.. Im getting around 1700 in quadrant
Sms vibrant black body glove
Rom-macnutR2 kernel #53
Latest cwm
Black Htc G1
Sparksmod1.7
Latest radio death spl
Oc kernel 617mhz jit enabled ram hack
Are you sure you have an ext4 file system on the other partitions?
diazf09 said:
I was only able to remove the journaling from /data(/dev/block/mmcblk0p2)... I typed "mount | grep ext4.. It only displayed the /data/ partition.. If the other partitions dont show, does it mean the other partitions dont have journaling?... But wouldnt they still show...? Im on obsidionv5... With eugene b oc 1125 kernel.. Im getting around 1700 in quadrant
Click to expand...
Click to collapse
well I am using r12 with 1125 kernel... also I went into the lagix options from the recovery menu and chose the 'No-RFS advanced ext4' ... my procedure was pretty much a mirror of the example... if you only saw /data then it sounds like you chose the 'voodoo' lagfix from ULF...
btw I am not seeing an improvement on battery life after almost a full day... it does seem a bit more responsive...
diazf09 said:
I was only able to remove the journaling from /data(/dev/block/mmcblk0p2)... I typed "mount | grep ext4.. It only displayed the /data/ partition.. If the other partitions dont show, does it mean the other partitions dont have journaling?... But wouldnt they still show...? Im on obsidionv5... With eugene b oc 1125 kernel.. Im getting around 1700 in quadrant
Sms vibrant black body glove
Rom-macnutR2 kernel #53
Latest cwm
Black Htc G1
Sparksmod1.7
Latest radio death spl
Oc kernel 617mhz jit enabled ram hack
Click to expand...
Click to collapse
gawd...i'm prolly gonna get laughed out of the forums for this one. but, umm, what key on the keyboard is the symbol between 'mount' and 'grep'?
Button key above 'enter' using shift...
Sent from my GT-I9000 using XDA App
What's the point / advantage in running unjournaled EXT4 when you can already run EXT2 this way (minus the extra work)?
It is quite stupid to remove journal from FS just for a higher score,
then put your data in danger!

[WEBTOP] GenTop2-20120509 (Beta) - Next Generation Gentoo Webtop Replacement

[size=+1]Introduction[/size]
What is GenTop2?
GenTop2 is a full-fledged Gentoo Linux able to replace the original Motorola Webtop. It is faster, fully-customizable and gives you the power of a complete Linux system on a mobile phone. It is a peek into the future of mobile computing!
Thanks goes to kholk, who did the original GenTop, otherwise I would have long given up.
Why use Gentoo Linux as WebTop?
Programs are fully optimized for the ARMv7a CPU contained in the Atrix.
Thus the whole system is faster and more responsive.
No shackles put around the WebTop by Motorola.
You can install any program (which compiles on ARM).
All software (except X11) is fully up-to-date.
You remember old times with desktop computers having far slower CPUs and less RAM than your phone and you wonder what you can do with this pocket computer.
Why NOT use Gentoo Linux as WebTop?
Gentoo is huge because it must install all development files.
The system and all programs must be compiled on the phone. How crazy is that?
Firefox could not be built. But, there is a smaller replacement.
Why bother using a phone, when you already have a notebook?
Working and Installed Applications
X11 via WebTop or HDMI (with hdmi-hack)
Xfce4 with thunar file manager
midori web browser with Flash player
claws-mail client
audacious
evince (pdf viewer)
ssh daemon
rxvt terminal
aiw Android In-A-Window!
Sound output via Android media system.
All are very light-weight Linux applications perfect for a small system.
Not Working:
webtop-panel (system status bar on top)
non-flash video playback ?
Installable as binary packages:
firefox (renamed to Aurora due to trademark stuff), approx 30 MB.
thunderbird (renamed to Earlybird due to trademark stuff), approx 44 MB.
libreoffice, approx 250 MB.
abiword, pidgin, emacs, texlive,
and many more, drop a note for more wishes here. However KDE is just too large.
[size=+1]Installation Instructions[/size]
Prerequisites:
Motorola Atrix
[size=+2][highlight]BACKUP.[/highlight] This will break your device![/size]
Okay hopefully it won't. A full restore will of course overwrite the webtop.
root privileges.
unlocking is not necessary.
adb and Linux knowledge.
webtop2sd is not supported (!)
CM7 is NOT supported
GenTop2 Space Requirements, Disk Speeds and a Note About WebTop2SD
Gentoo is very large because packages contain all development files. This cannot easily be changed, therefore one must work around the space limitation of the /osh partition in some way.
I did some "disk" performance measurements using bonnie++ (see [1] for full info). Here the through-put results in short: /data (ext3) 20,800 KB/s read and 6,200 KB/s write, /sdcard (fat32) 21,500 KB/s read and 8,000 KB/s write, /sdcard-ext (ext3) 12,300 KB/s read and 4,200 KB/s write, /sdcard/loopback.img (ext3) 16,150 KB/s read and 4,400 KB/s write.
One way to go would be to require webtop2sd, however, GenTop2 does not support webtop2sd because the read/write speed of the internal sdcard is much faster than on the external sdcard. Thus I tried to install as much on the /osh partition as possible and move directories onto other partitions as necessary, leaving symlinks behind. WebTop2SD also requires dpkg for some reason, which Gentoo does not have.
Therefore, it's pretty unavoidable that you do some space management yourself.
I have decided to utilize the /preinstall partition for /var. I'm not fully sure that this partition is unused on every Atrix released, but I guess in most cases it contains only provider specific bloatware that people don't want anyhow. On my Atrix it contained some car racing game, which I find hilarious to play on a mobile phone.
Anyway, the /preinstall partition is 300 MB and perfect for /var if reformatted to support many small files. The /var/db/pkg/ directory contains lots and lots of small files describing the installed packages. See the installation instruction for the mkfs line.
I also decided to require some extra ext3 partition for further program, data and portage files. It is needed anyhow to install further programs, which is what most people want to do. The /data partition would be the obvious choice and for that reason the first GenTop2 put files in /data/osh/. However, /home/ is also on /data by default and it gets pretty annoying when your home directory is full.
The only alternative to /data is either a partition on an external sd-card or a loopback mounted file-partition on /sdcard/, both are not as fast as /data (/cache cannot be used as it must be wipeable). So there really isn't much choice left except for external storage.
The main GenTop2 tarball puts 630 MB in /osh (leaving 145 MB free) and 178 MB in /preinstall (with 150 MB free), which must be mkfs formatted.
The portage GenTop2 tarball puts 1460 MB into /mnt/gentoo/ of which 475 MB are data files from /osh/usr/ and 810 MB are the portage tree.
[size=+1]Steps to install GenTop2:[/size]
There are some complications involved when using faux123's kernel, because it only contains ext4 filesystem modules and explicit mounting of ext3 will fail. The ext4 module will however mount ext3 filesystem without problems.
use adb shell and get root:
Code:
$ su
# cd /osh
# mv etc etcx
# reboot
Reboot. The above will disable the webtop.
Download http://kristallsturm.de/GenTop2/GenTop2-20120509.tar.gz (275MB) and put it onto /sdcard via USB or adb push.
use adb shell to overwrite the existing WebTop:
Code:
(first we delete /osh)
# cd /
# ls bin
bin: No such file or directory
(this tests whether the old webtop is disabled)
# rm -r osh/*
# ls osh
(should be empty)
(next we disable and reformat /preinstall)
# mount -o remount,rw /dev/block/mmcblk0p12 /system
# mv /system/bin/load_pia.sh /system/bin/load_pia.sh.disabled
# umount /preinstall
(depending on your ROM this might fail. ignore this problem if the following format works)
# mke2fs -m 0 -i 2048 -j /dev/block/mmcblk0p17
# mount -t ext3 /dev/block/mmcblk0p17 /preinstall
(for faux kernel: replace ext3 -> ext4 in above line)
(now we unpack the main tarball)
# df
(/osh and /preinstall should be almost empty)
# cd /
# tar xvzf /sdcard/GenTop2-20120509.tar.gz
# sync
(begin extra for faux kernel: we change ext3 -> ext4)
# sed -i s/ext3/ext4/ /osh/ubuntu.sh
(end extra for faux kernel)
# sync
# reboot
Once rebooted you will get an X11 login on the HDMI connection or you can access the phone via ssh.
Account Passwords:
root / atrix
adas / atrix
To make GenTop2 more useful and to compile/install further packages you currently must have an external sd-card (or someone must devise a method to use a loopback device).
I have partitioned my external sdcard using a desktop computer into the following two partitions:
/dev/block/mmcblk1p1 (remainder)
/dev/block/mmcblk1p2 (4.0 GB, formatted ext3)
Advanced: (Actually most of this stuff is advanced.) You can also use the new GenTop to partition the external sd-card. Open a terminal, and use something along the lines of:
Code:
# fdisk /dev/block/mmcblk1
(partition it, see further description of fdisk on the net)
# mkfs.ext3 -m0 /dev/block/mmcblk1p2
The boot-up script /osh/ubuntu.sh will mount /dev/block/mmcblk1p2 to /mnt/gentoo. This place is referenced by /usr/portage, /var/tmp and /preinstall/usr and will enable emerge if you install the second GenTop2-portage-20120509.tar.bz2 tarball.
Download http://kristallsturm.de/GenTop2/GenTop2-20120509-portage.tar.bz2 (124MB) to /sdcard/ using any method.
Use adb shell or a terminal on the desktop
Code:
$ su
# cd /
# tar xvjf /sdcard/GenTop2-20120509-portage.tar.bz2
Note: If you trust your network connection, you can also download and unpack simultaneously (without saving) it using:
Code:
$ su
# cd /
# wget -O - http://kristallsturm.de/GenTop2/GenTop2-20120509-portage.tar.bz2 | tar xvj
[size=+1]Installing further software[/size]
How do I install applications in Gentoo?
- Read http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
- Read http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3
I have set up a portage overlay "atrix-overlay" which unmasks many packages and includes some custom patches required for compilation on arm. It is included in the main tarball and automatically synced alongside "emerge --sync". Most updates will now be performed via this overlay.
See https://github.com/gendol/atrix-overlay for details.
Furthermore, for large binary packages like firefox, thunderbird and libreoffice I have set up a binary package repository with the same USE flags as the atrix-overlay. These are built using cross-compilation on my desktop computer.
See http://kristallsturm.de/GenTop2/packages/
To force installation from binary packages use emerge -G <package>. See the list of "Installable as binary packages" above.
[size=+1]Miscellaneous Questions[/size]
Why no thumb instructions?
- I did a speed test of cryptography functions and thumb instructions were approximately 10% slower than usual ARM code.
Where was GenTop2 compiled?
- Most of the system was fully compiled on my own Atrix. Larger binary packages are compiled on my desktop using cross-compiling.
Why is X11 not up-to-date?
- The only xorg driver I could get working is the one on the original Webtop, and that requires an older version of X11.
Why is udevd not running?
- If you look at logcat there are lots of the following messages, some of which are due to udevd. Disabling udevd reduces (but does not eliminate) these messages and probably also some unnecessary background process that draws battery.
NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UDEV_LOG' not found
NetlinkListener: ignoring non-kernel netlink multicast message
NetlinkListener: ignoring non-kernel netlink multicast message
[size=+1]Reinstalling the old WebTop[/size]
Some people on the forums struggled to reinstall the old webtop for some reason. It shouldn't be that difficult and I created a tarball of the original Webtop WT-1.2.0-133_38. These instructions were not tested by me:
Download http://kristallsturm.de/GenTop2/WT-1.2.0-133_38.tar.gz to /sdcard/ using any method.
Use adb shell or a terminal to disable mounting of webtop:
Code:
$ su
# cd /osh
# mv etc etcx
# reboot
Use adb shell to unpack original tarball into /osh:
Code:
# cd /
# ls bin
bin: No such file or directory
(this tests whether the webtop is disabled)
# rm -r osh/*
# ls osh
(empty)
# cd /
# /sdcard/WT-1.2.0-133_38.tar.gz
# sync
# reboot
[size=+1]Downloads[/size]
http://kristallsturm.de/GenTop2/GenTop2-20120509.tar.gz (275MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120509-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120509-portage.tar.bz2 (124MB portage tree for /mnt/gentoo/, see above)
http://kristallsturm.de/GenTop2/GenTop2-20120509-portage-filelist.txt (Filelist of tarball for your reference)
Old Downloads
http://kristallsturm.de/GenTop2/GenTop2-20120428.tar.gz (369MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120428-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120428-portage.tar.bz2 (44MB portage tree for /mnt/gentoo/, see above)
http://kristallsturm.de/GenTop2/GenTop2-20120424.tar.gz (364MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120424-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120424-portage.tar.bz2 (44MB portage tree for /mnt/gentoo/, see above)
Changelog
From 20120428 to 20120509:
Added atrix-overlay for pulling in updates using layman.
Reorganized /etc/portage/ to symlink into atrix-overlay files.
Removed mplayer from default install.
Added xarchiver, leafpad and some customization for the terminal.
Reorganized directory structure to use /preinstall.
From 20120424 to 20120428:
Readded resolutions to xorg.conf like in original webtop. Nevertheless you can switch using Xfce's settings dialogs.
Installed Flash: copied libflashplayer.so and emerges nss nspr.
Readded lots of the original .desktop files and corresponding icons. These launch Android apps.
[1] http://kristallsturm.de/GenTop2/docs/atrix-bonnie.html
It is a good job. I try this. Thank you.
This is a very agressive aproach. /osh dose have some Moto magic sauce in it. How well can you drive the screnn with a stock X system? Most of the cutesy features from WT I can live w/o, but the "phone"app really is usefull. Seams like this would be worth the effort to figure out.
If I was using a less "pure" setup (spinning up X and the phone app in Motos osh) then bringimng up the desktop in Gentoo, how would that compare to oither the same concept with other distros?
Please post on. I think this is the first time somebidy has run a non /osh X. Would love to see if it really can be done.
exwannabe said:
This is a very agressive aproach. /osh dose have some Moto magic sauce in it. How well can you drive the screnn with a stock X system? Most of the cutesy features from WT I can live w/o, but the "phone"app really is usefull. Seams like this would be worth the effort to figure out.
Click to expand...
Click to collapse
Thanks for pointing that out. Yes, the approach is radical, but not as aggressive as you may think. All the "magic sauce" in /osh lives in /osr/usr/local/ and all of that is retained. The only problem is that some dynamic link libraries are missing, but most of these problems can be fixed.
They actually had to be fixed because the GenTop2 does need to send some magic signals to Moto's PortalApp/DockService to work correctly. This is done using the /usr/local/bin/rmtest tool via the "fbcp" instance of dbus.
Other than /osh/usr/local/, /osh is really just Debian.
With the phone app, you mean the green phone button? I just tested that, it can be added. The phone button is nothing but a .desktop mime file, which calls one of the magic apps /usr/local/bin/androidlauncher. And it popups up in the aiw display.
I even tested the HD Media Center laucher and that too worked without problems. That really should be included in the next GenTop2 tarball.
exwannabe said:
If I was using a less "pure" setup (spinning up X and the phone app in Motos osh) then bringimng up the desktop in Gentoo, how would that compare to oither the same concept with other distros?
Please post on. I think this is the first time somebidy has run a non /osh X. Would love to see if it really can be done.
Click to expand...
Click to collapse
I guess I don't understand what you mean with a non /osh X. GenTop2 does run X11 and you really need to replace the system libaries to get a well-working Gentoo.
Greetings,
Gendol
Great job! Does this work with cm rom's aswell or only with blur based ones? As another fact, we could use distcc or crosscompile distcc to compile most of the stuff, actually even a crosscompile binhost would be doable for several packages. One more thing, we could probably use an .img file on the internal sdcard partition, that would be ext3/4 formatted instead of using the external sdcard (but probably its better and safer to sue the external card, due to the flash wear)
edit: so i tried it on my atrix with nottachtrix rom installed, it starts fine and seems to work rather well, i only saw two to me rather annoying bugs:
1. somehow the X server thinks that my tv (1080p lg) has a virtual size of 1366x768 and will not allow to use the 1920x1080 resolutions that are in the TV's EDID and that the system puts into the xorg.conf file aswell as it shows in the Xorg.0.log
2. the atrix's screen stays on all the time in the "normal mode" and if one uses the mouse on the gentop its moving and functioning on the atrix's screen aswell (ie you can launch apps by accident with the mouse in android)
I do not know if these are issues with nottachtrix or something else, but for me on the "normal webtop" 1080p worked on this same TV.
here the xorg log: http://dl.dropbox.com/u/24268926/Xorg.0.log
Really nice, installing it right now!
Does flash work on Midori?
I don't know about CM7, you'll have to try to replace the Linux system like moto does it.
The X11 screen size defaults to WebTop resolution 1366x768, but you can change that to 1920x1080 by editing /etc/X11/xorg.conf. The first thing to try is to comment out all Modelines and let EDID detection do the work. But for that a monitor must be present, so you need to Zap (Ctrl+Alt+Bckspace) your X, and that brings up the dual input problem.
I also use nottach's ROM. The dual input problem happens when something in motorola's magic communication goes wrong. I have not been able to figure out how in particular moto disables input on the touchscreen. For me it works most of the time. I also have all the Modelines in xorg.conf enabled, because they fit my monitor.
I didnt really focus on Flash, yet. But as it works on the original Webtop, you should just be able to copy the plugin files.
Gendol
Can't get Midori working .. Got network (via ping), but no web browsing
EDIT: Solved by disabling proxy settings inside Midori
i haven't run gentoo in over 10 years but this is tempting!!!!!
Hello! I am a bit newbie in linux and i have 2 questions
1) Could someon please tell me how to install GenTop2-portage-20120424.tar.bz2 tarball?
2) Is there any way to install synaptic so i can install other linux apps?
snik38 said:
Hello! I am a bit newbie in linux and i have 2 questions
1) Could someon please tell me how to install GenTop2-portage-20120424.tar.bz2 tarball?
2) Is there any way to install synaptic so i can install other linux apps?
Click to expand...
Click to collapse
1) use ADB and first post
2) Gentoo Portage - it's command line but very easy
Hmm, anyone using this with webtop over HDMI? I get the login screen, but the webtop touchpad thingie doesn't come up so it's impossible for me to log in.
nalorite said:
Hmm, anyone using this with webtop over HDMI? I get the login screen, but the webtop touchpad thingie doesn't come up so it's impossible for me to log in.
Click to expand...
Click to collapse
you need to use a hd dock, lapdock or a modded powered usb hub with mouse + kb
Vazay said:
1) use ADB and first post
2) Gentoo Portage - it's command line but very easy
Click to expand...
Click to collapse
1) After the reboot i used
adb shell
# tar xvzf /sdcard/GenTop2-portage-20120424.tar.bz2
but it gave me an error, am i using the correct command or i should use something else?
Yes. The touchpad thingy is also an open end. I have no idea why it doesnt come up. The GenTop2 tries to do everything in the same way as the original one, but for some reason that doesnt appear.
I guess the touchpad is some Android program part of DockService or PortalApp, which drive the Webtop switch. But I havent debugged how to activate it.
@snik38
To extract a .tar.bz2 you use tar xvjf ...
Gendol
three items one that caused some grief, but other than that this has lots of cool potential!
I have a stock rom with root.
1. resolution was pretty screwed up. I did try to adjust the resolution, but it was locked into one setting.
2. flash isnt installed on the browser so many websites where disabled.
3. I could not get AIW to start.
I see you answered #1 in a previous post. But I think all three of those items are minimum requirements to replace webtop. BTW great job again! Its seemed much faster than the webtop app.
2. Try to copy the flashplugin from original webtop(not sure if it works with midori)
3. aiw works fine try to reboot the phone
Took me a while to get this all running, but it's great now it is. Have this over Nottachtrix 1.3.1. Everything installed and works fine!
Cheers!
When my phone turns on and gets to the preparing sd, it takes forever. Does this happen to anyone else?
anyone tried to emerge chrome/chromium?

Thread closed.

Thread closed.
Thread closed.
Yank555 said:
Hi,
REMEMBER
FIRST OF ALL, do a Nandroid backup, as well as a backup of your sd-card content !
You're doing this at your very own risk, I'm not to be held responsible if something goes wrong
Now that said, let's get going
In case somebody wants to check it out, here is the swap activation script I wrote (attached) as well as explanations on how to make it all work :
1) Partition your sd-card (Minitool Partition Wizard, 4ext, CWM...)
2) Boot your system with the partitionned sd-card
3) If necessary customize the 99swap script (attached to this post) and then put it onto your sd-card's root folder, you'll need it while executing the commands in step 4.
4) Open a terminal and type the following
NB: Change "mkswap /dev/block/mmcblk0p3" accordingly to point to the swap partition you've created in step 1.
5) Reboot your phone, start a terminal again and type free, you'll need to see something different than 0 in your swap line, look at the attached print-screen
Swappiness will be set to 50 by the script, which is a rather conservative swap use, made sense to me since SD-swap is slower than ram, better not to use it too agressively. Feel free to experiment with the swappiness variable in the script (values between 0 and 100, 0 meaning "try not to swap", 100 meaning "try to swap all the time")
If you want to try and have a question, just let me know !
JP.
PS: You can find the thread for hard swap for the htc Sensation / XE here.
Click to expand...
Click to collapse
Hi JP,
This is a gem of a post! Thanks alot for the script and the detailed breakdown. Before I get into it though, I must warn you that I am more of a beginner with no coding/scripting experience (I don't know how to use adb or anything)...
Here's what I'm trying to do: I'm trying to activate hard-swap on my hd2 (currently) running the ParanoidAndroid by Xylograph. I've created 3 partitions on my 16gb class 6 sd card: first, fat32 (32k cluster), next, 1GB ext2 (default), 500MB swap.
Procedure:
1. I extracted the script and copied it directly to system/etc/init.d folder of the Rom (I looked at the terminal commands you posted and the first few lines looked like copying the file from the sd root to the init.d folder (it was just a guess though), so I figured might as well put it into the rom before I flash it)
2. Flashed the rom
3. To activate it, I typed the following into the terminal:
su
mount -o remount,rw /system
mkswap /dev/block/mmcblk0p3
mount -o remount,ro /system
exit
after the mkswap command, I did get an activation notification that a certain amount was assigned to swap. But my celebrations were cut short after I rebooted and used the free command to check. The entire swap row still read 0.
I was wondering if you can point me in the right direction... thanks!
Also, is there a way to create a cwm flashable version?
bullcrapr said:
Hi JP,
This is a gem of a post! Thanks alot for the script and the detailed breakdown. Before I get into it though, I must warn you that I am more of a beginner with no coding/scripting experience (I don't know how to use adb or anything)...
Here's what I'm trying to do: I'm trying to activate hard-swap on my hd2 (currently) running the ParanoidAndroid by Xylograph. I've created 3 partitions on my 16gb class 6 sd card: first, fat32 (32k cluster), next, 1GB ext2 (default), 500MB swap.
Procedure:
1. I extracted the script and copied it directly to system/etc/init.d folder of the Rom (I looked at the terminal commands you posted and the first few lines looked like copying the file from the sd root to the init.d folder (it was just a guess though), so I figured might as well put it into the rom before I flash it)
2. Flashed the rom
3. To activate it, I typed the following into the terminal:
su
mount -o remount,rw /system
mkswap /dev/block/mmcblk0p3
mount -o remount,ro /system
exit
after the mkswap command, I did get an activation notification that a certain amount was assigned to swap. But my celebrations were cut short after I rebooted and used the free command to check. The entire swap row still read 0.
I was wondering if you can point me in the right direction... thanks!
Also, is there a way to create a cwm flashable version?
Click to expand...
Click to collapse
Thanx
In fact you understood correctly that is was about copying the file to init.d.
By the way, these commands do the following :
mount -o remount,rw /system - Mount system partition in read-write
mount -o remount,ro /system - Mount system partition in read-only
So to format the swap partition "mkswap /dev/block/mmcblk0p3" there was no need for it, but it didn't harm in any way, so you're fine there
I guess what is missing is the "chmod 755 /system/etc/init.d/99swap" command which will set the correct file access to the script so it can get executed at boot.
You might do the following in a terminal :
su
mount -o remount,rw /system
chmod 755 /system/etc/init.d/99swap
mount -o remount,ro /system
exit
It should be fine then.
Alternatively you could set the rights with your file explorer (in root explorer mode), they must be "rwxr-xr-x" (which is Read-Write-Execute, Read-Execute, Read-Execute), most file-manager will allow you to do that as well.
I've been working on the script variant for htc Sensation, it is more advanced, dynamic so it can find the swap partition by itself.
I'll make a CWM flashable as soon as I get to it that will handle everything except partitioning the SD card, obviously, for both devices.
As soon as I'm done I'll post the HD2 version here as well (very little change, between both devices, just the access path to the sd-card partitons to change (=1 line in the script).
JP.
Edit ------------------------------------------------
I just reread your post, if in fact you put it into the ROM zipfile, then file access should be correct !?
Could you post the following file (if it exists) :
/data/swap.0.log ?
JP.
Yank555 said:
Thanx
In fact you understood correctly that is was about copying the file to init.d.
By the way, these commands do the following :
mount -o remount,rw /system - Mount system partition in read-write
mount -o remount,ro /system - Mount system partition in read-only
So to format the swap partition "mkswap /dev/block/mmcblk0p3" there was no need for it, but it didn't harm in any way, so you're fine there
I guess what is missing is the "chmod 755 /system/etc/init.d/99swap" command which will set the correct file access to the script so it can get executed at boot.
You might do the following in a terminal :
su
mount -o remount,rw /system
chmod 755 /system/etc/init.d/99swap
mount -o remount,ro /system
exit
It should be fine then.
Alternatively you could set the rights with your file explorer (in root explorer mode), they must be "rwxr-xr-x" (which is Read-Write-Execute, Read-Execute, Read-Execute), most file-manager will allow you to do that as well.
I've been working on the script variant for htc Sensation, it is more advanced, dynamic so it can find the swap partition by itself.
I'll make a CWM flashable as soon as I get to it that will handle everything except partitioning the SD card, obviously, for both devices.
As soon as I'm done I'll post the HD2 version here as well (very little change, between both devices, just the access path to the sd-card partitons to change (=1 line in the script).
JP.
Edit ------------------------------------------------
I just reread your post, if in fact you put it into the ROM zipfile, then file access should be correct !?
Could you post the following file (if it exists) :
/data/swap.0.log ?
JP.
Click to expand...
Click to collapse
Hi JP
You are incredibly helpful and I appreciate it!
I finally got some time off and tried out what you mentioned... but to no avail. I applied the necessary permissions through the terminal (chmod 755) as well as through the root browser, but it was still the same. After that I even retried the terminal commands, and included the "chown 0:2000...", but that didn't work either...
... and then I saw your post update...
About that, i just typed it into the terminal, and I got "not found".
Was that what I was supposed to do?
bullcrapr said:
Hi JP
You are incredibly helpful and I appreciate it!
I finally got some time off and tried out what you mentioned... but to no avail. I applied the necessary permissions through the terminal (chmod 755) as well as through the root browser, but it was still the same. After that I even retried the terminal commands, and included the "chown 0:2000...", but that didn't work either...
... and then I saw your post update...
About that, i just typed it into the terminal, and I got "not found".
Was that what I was supposed to do?
Click to expand...
Click to collapse
Hi,
You're welcome
The file '/data/swap.0.log' is a text-file containing info on the execution of the script...
If it's not there, then the script didn't run at all...
I should have a little time later today, will try to make the CWM flashable solution for you, should be a no fuss solution, as long as the sd-card has a swap partition
How did you partition the card ? CWM ?
JP.
Sent from my Android Revolution HD 6.6.5 XE / faux kernel 007b3 powered htc Sensation XE using xda premium
I created a 256Gb partition...
Click to expand...
Click to collapse
man thats a helluva sd card ya have there! hehe.
samsamuel said:
man thats a helluva sd card ya have there! hehe.
Click to expand...
Click to collapse
Haha I noticed that too :') I want one of those now
Nigeldg said:
Haha I noticed that too :') I want one of those now
Click to expand...
Click to collapse
Thanx for pointing that out Mb of course, but in a few years that might be possible
My first hdd had 60Mb, and that's not soooo long ago
JP.
Sent from my Android Revolution HD 6.6.5 XE / faux kernel 007b3 powered htc Sensation XE using xda premium
heh, my first was a 20mb HDD mounted on a pcb card and plugged into an ISA slot, took up the full length of the PC, weighed LOADS, could have beaten burglars to death with it.
bullcrapr said:
Hi JP
You are incredibly helpful and I appreciate it!
I finally got some time off and tried out what you mentioned... but to no avail. I applied the necessary permissions through the terminal (chmod 755) as well as through the root browser, but it was still the same. After that I even retried the terminal commands, and included the "chown 0:2000...", but that didn't work either...
... and then I saw your post update...
About that, i just typed it into the terminal, and I got "not found".
Was that what I was supposed to do?
Click to expand...
Click to collapse
+1 with this (also on Paranoid Rom 1.1a) but I think that it's something with the ROM coz on earlier build v1 this method worked verry good I hope that Yank will find a solution coz it reallly helps wit our 576 ram
samsamuel said:
heh, my first was a 20mb HDD mounted on a pcb card and plugged into an ISA slot, took up the full length of the PC, weighed LOADS, could have beaten burglars to death with it.
Click to expand...
Click to collapse
Mine was huge at the time, was on of the first to have such a big one, even partitioned it into 3 since it was just too big And it was an external device, the size of a pizza-box (it was en Atari Megafile 60, I still have it !!).
triggaz said:
+1 with this (also on Paranoid Rom 1.1a) but I think that it's something with the ROM coz on earlier build v1 this method worked verry good I hope that Yank will find a solution coz it reallly helps wit our 576 ram
Click to expand...
Click to collapse
I'm working on the CWM flashable right now, should be done within 1-2 hours at most
Yank555 said:
Hi,
You're welcome
The file '/data/swap.0.log' is a text-file containing info on the execution of the script...
If it's not there, then the script didn't run at all...
I should have a little time later today, will try to make the CWM flashable solution for you, should be a no fuss solution, as long as the sd-card has a swap partition
How did you partition the card ? CWM ?
JP.
Sent from my Android Revolution HD 6.6.5 XE / faux kernel 007b3 powered htc Sensation XE using xda premium
Click to expand...
Click to collapse
Hi JP, once you told me it was the address to the file, i just navigated there using my explorer and lo and behold!, there it was (attached). If you must know, in my earlier post, the idiot in me just typed it in the terminal and the terminal replied not found.
I made my partition using freeware called Minitool partition wizard. Is 500mb too big for swap in your opinion? I was thinking of compensating for zram, and hence the size... thanks for your speedy responses...
edit...
and hey! whadya know? in the meantime, this place is coming alive!!
bullcrapr said:
Hi JP, once you told me it was the address to the file, i just navigated there using my explorer and lo and behold!, there it was (attached). If you must know, in my earlier post, the idiot in me just typed it in the terminal and the terminal replied not found.
I made my partition using freeware called Minitool partition wizard. Is 500mb too big for swap in your opinion? I was thinking of compensating for zram, and hence the size... thanks for your speedy responses...
edit...
and hey! whadya know? in the meantime, this place is coming alive!!
Click to expand...
Click to collapse
Hmm ... strange, the content of the file looks like a logcat ?! Not what I was expecting to see
Give me a little hour, and I think I should be done with the flashable hard-swap and we'll go from there
Minitool is excellent, but did you pay attention to only create "primary" partition ? If it is a logical partition it won't work...
Can you insert your SD card into your card reader, start Minitool an post a print screen of it ?
JP.
EDIT :
About size ... I believe 256Mb is enough, even read somewhere t shouldn't be more than 256, but I think there was no specific reason given.
Yank555 said:
Hmm ... strange, the content of the file looks like a logcat ?! Not what I was expecting to see
Give me a little hour, and I think I should be done with the flashable hard-swap and we'll go from there
Minitool is excellent, but did you pay attention to only create "primary" partition ? If it is a logical partition it won't work...
Can you insert your SD card into your card reader, start Minitool an post a print screen of it ?
JP.
EDIT :
About size ... I believe 256Mb is enough, even read somewhere t shouldn't be more than 256, but I think there was no specific reason given.
Click to expand...
Click to collapse
Here we go...
Minitool image attached... I typically pay attention to the partition type and made sure both of them were primary
About the logcat, I suspect you're right... I was trying to do one from my pc for the first time using adb and tried the only few commands I know (mkswap...), I think that's what you saw then...
Incidentally, do you feel if I reduce the swap size, the script has a better chance at surviving the boot?
bullcrapr said:
Here we go...
Minitool image attached... I typically pay attention to the partition type and made sure both of them were primary
About the logcat, I suspect you're right... I was trying to do one from my pc for the first time using adb and tried the only few commands I know (mkswap...), I think that's what you saw then...
Incidentally, do you feel if I reduce the swap size, the script has a better chance at surviving the boot?
Click to expand...
Click to collapse
Don't bother, I will test 500Mb and let you know if that is the issue
JP.
I have 512mb partition and it worked without problems as I mentioned earlier so I think that opposite to the "size does matter" in this case it doesn't plus I used it with zram from marc1706.
triggaz said:
I have 512mb partition and it worked without problems as I mentioned earlier so I think that opposite to the "size does matter" in this case it doesn't plus I used it with zram from marc1706.
Click to expand...
Click to collapse
Hi triggaz, are you using the built in zram on Para1.1a? Or have you applied a script from elsewhere? I enabled the built-in zram, but get a "not found" reply when i try zram_stats in the terminal. Can you tell me how you got zram working? thanks...
bullcrapr said:
Hi triggaz, are you using the built in zram on Para1.1a? Or have you applied a script from elsewhere? I enabled the built-in zram, but get a "not found" reply when i try zram_stats in the terminal. Can you tell me how you got zram working? thanks...
Click to expand...
Click to collapse
https://www.dropbox.com/s/xr3z102gxiw2f62/marc1706_zram_100MB.zip
all credits to Dorimanx for ZRAM mod and mark1706 for modifications
I flashed this and then used the compcashe options in Paranoid (set to 26%)

Categories

Resources