How to install:
Just unzip to your /sdcard
http://xt720.ru/Files/Patchs/or-147-xt720-fix2.zip
my recovery alrealy support ext2,3,4, nilfs2 (6 month ago)
if you want to add filesystem support edit switch.sh (insmod your modules) and edit to
echo "/dev/block/mmcblk0p2 /sddata auto defaults 0 0" >> /etc/fstab
echo "/dev/block/mmcblk0p2 /sddata auto defaults 0 0" >> /etc/fstab
We already have it in switch.sh.
But thanks! =)
Just curious: what changed in open_rcvr.STR?
fjfalcon said:
echo "/dev/block/mmcblk0p2 /sddata auto defaults 0 0" >> /etc/fstab
We already have it in switch.sh.
But thanks! =)
Click to expand...
Click to collapse
i edit this part
#app2ext partition on sdcard
if [ -b /dev/block/mmcblk0p2 ] ; then
mkdir /sddata
insmod "$MODPATH/jbd.ko"
insmod "$MODPATH/ext3.ko"
insmod "$MODPATH/ext2.ko"
insmod "$MODPATH/crc16.ko"
insmod "$MODPATH/jbd2.ko"
insmod "$MODPATH/mbcache.ko"
insmod "$MODPATH/ext4.ko"
insmod "$MODPATH/nilfs2.ko"
echo "/dev/block/mmcblk0p2 /sddata auto defaults 0 0" >> /etc/fstab
#e2fsck -p /dev/block/mmcblk0p2
fi
i remove e2fsck for nilfs2
#chek linux version
LVER=`uname -r | awk '{split($0,a,"-"); print a[1]}'`
MODPATH="/lib/modules/$LVER"
also i add it
it will auto recognize kernel's version and auto mount current modules
I took your OpenRecovery and added/fixed some things:
'Power Off' menu option
'Toggle Display Brightness' menu option (to reduce battery drain--alternates between bright/dim)
Fixed nandroid backup all (by hiding the partitions that don't work)
Fixed 'Wipe Dalvik Cache'
Renamed 'Applications Menu' to 'Utilities'
Added a symbolic link: /sd-ext -> /sddata
Updated e2fsck to a 1.41.10 (for ext4 support)
Added 'SD Card Utilities'
'Scan FAT partition for errors'
'Scan ext partition for errors'
Can convert ext2->ext3, ext2->ext4, ext3->ext4 (requires ROM support)
'Save diagnostics to /sdcard/sdcard-info.txt' for debugging
Eventually this will also manage the app/link2sd directories
Github: https://github.com/Mioze7Ae/openrecovery_xt720
EDIT: updated with statically-compiled fsck_msdos, tune2fs, e2fsck, and mke2fs from the CM6.3.0 source
Mioze7Ae said:
I took your OpenRecovery and added/fixed some things:
'Power Off' menu option
'Toggle Display Brightness' menu option (to reduce battery drain--alternates between bright/dim)
Fixed nandroid backup all (by hiding the partitions that don't work)
Fixed 'Wipe Dalvik Cache'
Renamed 'Applications Menu' to 'Utilities'
Added a symbolic link: /sd-ext -> /sddata
Updated e2fsck to a 1.41.10 (for ext4 support)
Added 'SD Card Utilities'
'Scan FAT partition for errors'
'Scan ext partition for errors'
Can convert ext2->ext3, ext2->ext4, ext3->ext4 (requires ROM support)
'Save diagnostics to /sdcard/sdcard-info.txt' for debugging
Eventually this will also manage the app/link2sd directories
Github: https://github.com/Mioze7Ae/openrecovery_xt720
Click to expand...
Click to collapse
Awesome nice wok man
The SD Card Utilities aren't working if CM6 isn't installed. I need to find a tune2fs that is statically linked. I thought this one was, but I was wrong.
Edit: fixed now in -fix4
What would it take to incorporate these changes into Androidiani OR?
I compiled static binaries for e2fsprogs and fsck_msdos and updated the zip. I should be working now. http://forum.xda-developers.com/showpost.php?p=16812349&postcount=7
3rdstring said:
What would it take to incorporate these changes into Androidiani OR?
Click to expand...
Click to collapse
Some of these changes are pretty easy. Others are a little more involved. You can look at the diffs in github and port ones that you'd like. Eventually I'd like to merge the functionality of both but I'm focusing on OR for now. You can look at what went into each change by looking at the "Commits" tab at github and then clicking on the commit number on the far right side for a particular change and you'll see what changes were made to which files. For example this is the Toggle Display Brightness change.
I can't get neither one of my sdcards ext4 to mount. I wonder if it might be cause I started with CM6.3? Instead of upgrading from CM6.1 to CM6.3? Just a thought since some of us can and can't mount ext4
LibertyMonger said:
I can't get neither one of my sdcards ext4 to mount. I wonder if it might be cause I started with CM6.3? Instead of upgrading from CM6.1 to CM6.3? Just a thought since some of us can and can't mount ext4
Click to expand...
Click to collapse
Can you install the *-fix4 openrecovery and use
OR > SD Card Utilities > Save diagnostics
And then post the /sdcard/sdcard-info.txt?
Do you have a nandroid of your ext2 partition? If so, try restoring it and the using SD Card Utilities to convert it to ext4.
Sent from my MilestoneXT720 using XDA Premium App
Mioze7Ae said:
Can you install the *-fix4 openrecovery and use
OR > SD Card Utilities > Save diagnostics
And then post the /sdcard/sdcard-info.txt?
Do you have a nandroid of your ext2 partition? If so, try restoring it and the using SD Card Utilities to convert it to ext4.
Sent from my MilestoneXT720 using XDA Premium App
Click to expand...
Click to collapse
Yeah I will post the /sdcard/sdcard-info.txt here but it says the same as what fjfalcon was quoting. And yes I do have a Nandroid of ext2 but never tried to restore it yet. I will try now...
L'enfer c'est les autres...
Mioze7Ae said:
L'enfer c'est les autres...
Click to expand...
Click to collapse
Hell is other people? lol
***Here it is View attachment sdcard-info.txt
Are you referring to the info.txt that fjfalcon posted in the CM6 thread? The commands I gave there weren't correct. In any case the sdcard-info.txt produced by *-fix4 are much expanded and look quite different... I can't find any other post by fjfalcon...
Sent from my MilestoneXT720 using XDA Premium App
Mioze7Ae said:
Are you referring to the info.txt that fjfalcon posted in the CM6 thread? The commands I gave there weren't correct. In any case the sdcard-info.txt produced by *-fix4 are much expanded and look quite different... I can't find any other post by fjfalcon...
Sent from my MilestoneXT720 using XDA Premium App
Click to expand...
Click to collapse
Oh sorry Mz didn't mean to make you look for it, I was talking about when he was saying how some aren't mounting. Anyway I posted it above your last post. I have my ext2 restored. I will try to convert it tomorrow. thanks man.
LibertyMonger said:
***Here it is View attachment 694819
Click to expand...
Click to collapse
Ok, try creating an empty /sd-ext/app|/sddata/app directory and reboot. Then go back to OR and recreate the sdcard-info.txt
Mioze7Ae said:
Ok, try creating an empty /sd-ext/app|/sddata/app directory and reboot. Then go back to OR and recreate the sdcard-info.txt
Click to expand...
Click to collapse
I'm sorry not sure what you mean here "empty /sd-ext/app|/sddata/app directory"
app|?
I think I got it... rebooting...
Related
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!
This is a basic gui I wrote to unlock my encrypted partitions during boot.
I'm running my /data and /sdcard partitions encrypted, and the "luksunlock" binary is launched from init.rc to read the password and unlock the encrypted partitions.
I have included my somewhat modified init.rc for those interested.
For more information about LUKS on Android see this blogpost, written by shawn (Seems I'm not allowed to have urls in the post, but Google for 'android luks' , first hit)
This works good on Wildfire, altough it should work fine on other phones as well. Just remember that you need to set up your partitions as in the luksunlock.c (or change the defines).
Dont forget to backup before you start playing around!
Good luck!
Thanks! i'll give a try!
Hi,
I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:
I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...
Any clue?
Thanks in advance!
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
tusabe said:
Hi,
I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:
I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...
Any clue?
Thanks in advance!
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
Click to expand...
Click to collapse
CM6.1 for wildfire uses a 2.6.32 kernel (see HCDR.jacob's post about his custom kernel for more info)
tusabe said:
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
Click to expand...
Click to collapse
Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
sigkill1337 said:
Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
Click to expand...
Click to collapse
Hi! Yeah, that's what I was afraid of.... ok, but the problem is that i'm running CM6.1 with 2.6.35.9 which has no dm-crypt module neither compiled in kernel... where can i find some kernel with this modules included? Is for an HTC Desire (@Sympnotic )
Thanks in advance!
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.
BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
wow! awesome work!!! Very exciting news. Gonna give this a go on my MyTouch Slide
NathanFreitas said:
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.
BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
Click to expand...
Click to collapse
Seems really nice. I like the secure phone concept.
New Makefile and wiki info up
_hc from the @guardianproject has a new build process up for Crypsetup/LUKS which includes a Makefile compatible with Android NDK r5.
We have new instructions up on our wiki, as well.
I cannot post links under this account, but you can find the info on github if you search "LUKS" or just under our guardianproject account.
How did you create the encrypted partitions? Could you give some pointers for that. I am familiar with using dmcrypt/cryptsetup on desktop linux, I guess this works similar. What are the relevant device names? Did you run into any problems?
Calavera1 said:
How did you create the encrypted partitions? Could you give some pointers for that. I am familiar with using dmcrypt/cryptsetup on desktop linux, I guess this works similar. What are the relevant device names? Did you run into any problems?
Click to expand...
Click to collapse
Hi, sorry for the late answer,
/dev/block/mtdblock5 is the "userdata" partition. I formatted it and mount it to /encrypted-data during init:
mount yaffs2 [email protected] /encrypted-data nosuid nodev
The only file on this partition is "data.encrypted" file, which gets created in init.rc as a loopback device:
exec /system/bin/losetup /dev/block/loop0 /encrypted-data/data.encrypted
I created the "data.encrypted" file on my computer with cryptsetup and losetup, and copied all files from my old unencrypted userdata partition to it and then copied it back as a file to the formated userdata partition.
The sdcard "/dev/block/mmcblk0p2" partition is formated with "cryptsetup luksFormat", I did this also on my computer, saves some time. And then copy everything from the old unencrypted sdcard.
I did run in to one problem recently, my phone hung during boot, about 4 months after I started encrypting my phone.
Had to copy my data.encrypted file to my computer, mount it as a loopback device and do a fsck, and then copy it back to my phone.
I suspect this has to do with the filesystem not being umounted properly. (I have had this on my to do list for a while hehe)
Probably should make a script run during shutdown to cleanly "luksClose" the encrypted partition and then umount them. Not doing this is probably very crazy
I also want to fix it so my "/dev/block/mmcblk0p2" partition gets presented to my computer when i attach my usb cable (as it should do), so i can unlock it in ubuntu and copy images and files. Right now i have to take my memorycard out and put it into the computer.
I hope this post makes sense, it was written in haste =) Good luck!
sigkill1337 said:
Hi, sorry for the late answer,
/dev/block/mtdblock5 is the "userdata" partition. I formatted it and mount it to /encrypted-data during init:
mount yaffs2 [email protected] /encrypted-data nosuid nodev
The only file on this partition is "data.encrypted" file, which gets created in init.rc as a loopback device:
exec /system/bin/losetup /dev/block/loop0 /encrypted-data/data.encrypted
I created the "data.encrypted" file on my computer with cryptsetup and losetup, and copied all files from my old unencrypted userdata partition to it and then copied it back as a file to the formated userdata partition.
The sdcard "/dev/block/mmcblk0p2" partition is formated with "cryptsetup luksFormat", I did this also on my computer, saves some time. And then copy everything from the old unencrypted sdcard.
I did run in to one problem recently, my phone hung during boot, about 4 months after I started encrypting my phone.
Had to copy my data.encrypted file to my computer, mount it as a loopback device and do a fsck, and then copy it back to my phone.
I suspect this has to do with the filesystem not being umounted properly. (I have had this on my to do list for a while hehe)
Probably should make a script run during shutdown to cleanly "luksClose" the encrypted partition and then umount them. Not doing this is probably very crazy
I also want to fix it so my "/dev/block/mmcblk0p2" partition gets presented to my computer when i attach my usb cable (as it should do), so i can unlock it in ubuntu and copy images and files. Right now i have to take my memorycard out and put it into the computer.
I hope this post makes sense, it was written in haste =) Good luck!
Click to expand...
Click to collapse
I figured most of that out without your post and tried it on my desire (I created the luks partitions with adb on the phone though, worked anyway ). Then I couldn't figure out where my regular init.rc is stored (I could only find the one used by Clockwork Recovery), and then I figured I already spent enough time, tried a reboot (which of course didn't work). Then I couldn't even get into recovery (probably because its init.rc tries to mount /data which doesn't work? I didn't investigate any further). Flashed my backup with fastboot and was stuck again with my un-encrypted pre-experiment state
Oddly enough, it was no problem to unlock my encrypted SD-card from my computer (running ubuntu) while in recovery (clockword has an option to present the sd card to a computer connected via usb). Maybe the booted system handles this differently than recovery though? I didn't get a chance to try, as I couldn't boot after my encryption attempt.
I will try again after my algorithm and data structure exam this friday and report back
Is anybody using the UI on another device than the Wildfire? Does it work?
How much is the performance drain when using an encrypted /data partition?
Amazing work!
Did anyone manage to make sigkill1337's luksunlock build from source ?
I would like to change the path of the data/sdcard partitions to match my device but I tried many ways using the NDK and I can't get it to compile properly.
Is there any way to do this ?
I have been trying for days, I am getting literaly insane !
@sigkill1337 : could you give me some pointers ? I would appreciate a lot.
mount manpage said:
The bind mounts.
Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere else. The call is
mount --bind olddir newdir
or shortoption
mount -B olddir newdir
or fstab entry is:
/olddir /newdir none bind
After this call the same contents is accessible in two places. One can also remount a single file (on a single file).
This call attaches only (part of) a single filesystem, not possible submounts. The entire file hierarchy including submounts is attached a second place using
mount --rbind olddir newdir
or shortoption
mount -R olddir newdir
Note that the filesystem mount options will remain the same as those on the original mount point, and cannot be changed by passing the -o option along with --bind/--rbind. The mount options can be changed by a separate remount command, for example:
mount --bind olddir newdir
mount -o remount,ro newdir
Click to expand...
Click to collapse
If nothing helps, you should always be able to bindmount it
I'd rather get sigkill1337's UI to compile...
Lots of nice security tweaks and settings could be done with a pre-boot GUI
Anyway, concerning encryption, I'll use the bind option for now, thanks for the tip.
But if anyone here could give me some pointers about compiling this stuff it would be great.
I managed to compile it by integrating luksunlock in Android source externals and main.mk but when I push it to my phone and modify init.rc to call it, it just does not work...
Other modifications are working (mount, mkdir, etc.) but the GUI won't show up
Sorry for the late reply.. But you could try running it from a shell when the phone is booted, just to verify that the binary starts (thats how I tested it without having to reboot my phone all the time)
My environment for building the source was setup using one of the tutorials online, nothing out of the ordinary
Im still running this on my phone, for almost 8 months now, I havent noticed that much in performance problems, the Wildfire was slow before i started using luks.
When i get a new phone (maybe SE Arc) i will be easier to see if performance is affected
There is an Issue for getting CM support for encrypted filesystems during boot:
Issue 2736: support encrypted filesystem from boot
If you want to get that feature, just "star" it, so it may get more attention.
OK, here is ClockworkMod Recovery for our beloved A500
NOTE:
If you encounter a problem with the filesystem on /data like it has become corrupt, place a blank file called "eraseData" (without the quotes) in the clockworkmod folder on your external sdcard or usb storage. This will revert back to actually formatting /data.
WARNING: by doing this you will lose everything that you have in /data/media.
Installation:
use adb (PC):
adb push recovery-thor2002ro-rev1.*.img /sdcard
adb push itsmagic /data/local
from terminal (TABLET):
su
chmod 755 /data/local/itsmagic
mount -o rw,remount /system
rm /system/etc/install-recovery.sh
mount -o ro,remount /system
dd if=/sdcard/recovery-thor2002ro-rev1.*.img of=/dev/block/mmcblk0p1
./data/local/itsmagic
"recovery-thor2002ro-rev1.*.rar" - is for flashing normally with the normal method...
"update-recovery-thor2002ro-rev1.*.zip" - flashed from recovery and press reboot/power off(v1.1 don't use "Advanced" -> "Reboot Recovery" only buttons in the main menu) after its flashed(don't try to flash from any other recovery other than mine, will not work)
Acer Recovery Installer APP thanks to Euclid's Brother http://forum.xda-developers.com/showpost.php?p=14818316&postcount=109
Video installation guide by cfcoleman
http://www.youtube.com/watch?v=cuf74JP5Jgw
Changelog:
1.1:
skips /data/media in backup/restore/format of /data
integrated "itsmagic"
additional option in advanced to run itsmagic manually
itsmagic is run on every restart/poweroff or recovery as a precautionary measure
ability to use usb storage in recovery for backups and restores...(has a priority system in place if usb stick is present on mount its used as a "sdcard", if not it falls back to microsd card), unmount and mount will also trigger this.
1.2:
flexrom backup & restore
bct + ebt + pt + gp1 backup(basically the first sectors of the flash that sc2k told you to backup when itsmagic got released...)
retrieve uid
itsmagic run at startup
usb keyboard fix
1.3.2:
fixed background disappearing
removed itsmagic from reboot/poweroff, not needed itsmagic is run at startup...
fixed flexrom not being present in advanced restore menu
1.3.3:
fixed back disappearing in Mounts and Storage menu
1.3.4(still in testing...):
added sync before md5 generation
sync and unmount of /sdcard after succesful backup
sync and unmount of /sdcard at reboot/poweroff
Thanks to sc2k for testing this.
Even though this recovery has been tested, I am not liable for any loss of data or any damages done by this recovery.
tnx for this!!
great!!
thor2002ro said:
OK, here is ClockworkMod Recovery for our beloved A500
Includes:
skips /data/media in recovery/restore/format of /data
integrated "itsmagic"
additional option in advanced to run itsmagic manually
itsmagic is run on every restart/poweroff or recovery as a precautionary measure
ability to use usb storage in recovery for backups and restores...(has a priority system in place if usb stick is present on mount its used as a "sdcard") if not it falls back to microsd card), unmount and mount will also trigger this.
NOTE:
If you encounter a problem with the filesystem on /data like it has become corrupt, place a blank file called "eraseData" (without the quotes) in the clockworkmod folder on your external sdcard or usb storage. This will revert back to actually formatting /data.
WARNING: by doing this you will lose everything that you have in /data/media.
Installation:
remove /system/etc/install-recovery.sh if present
dd the image to mmcblk0p1
run itsmagic
TO DO:
flexrom backup & restore
bl + bct backup
retrieve uid
Thanks to sc2k for testing this.
Even though this recovery has been tested, I am not liable for any loss of data or any damages done by this recovery.
Click to expand...
Click to collapse
1.before we dd the image to mmcblk0p1 ,do we have to install itsmagic first
u said u had integrated itsmagic in that recovery,but how do we run that itsmagic,from where?
2. what is the “bl” and “bct” stand for?
3. is “to do……” what we can do or something else ?i cant understand it sorry。
I am all over this but please add more thorough instructions. Thanks
Awesomeness, that is all
Sent from my ADR6400L using XDA Premium App
Yea tend to agree sounds awesome. But if we could have a more clear set of instructions. So people don't brick their tablet.
Sent from my PC36100 using XDA Premium App
to do means things he wants to add to or fix in this release.
What does dd stand for?
ibila said:
to do means things he wants to add to or fix in this release.
What does dd stand for?
Click to expand...
Click to collapse
Well thanks for explaining what to do means...
dd is the termed used to dump this image to a particular block in this case block 0p1
ibila said:
to do means things he wants to add to or fix in this release.
What does dd stand for?
Click to expand...
Click to collapse
o ,I see
"dd" is a command in linux, it can write a img to a partition or block
in this case, we can use that command like this:
dd if=/sdcard/recovery-thor2002ro-rev1.1.img of=/dev/block/mmcblk0p1
thor2002ro said:
Even though this recovery has been tested, I am not liable for any loss of data or any damages done by this recovery.
Click to expand...
Click to collapse
hmm... you could not find a smaller font?
Dexter_nlb said:
hmm... you could not find a smaller font?
Click to expand...
Click to collapse
lol not very nice though.
updated instructions...
anybody know how to do it from Windows? (no DD)
Dan2552 said:
anybody know how to do it from Windows? (no DD)
Click to expand...
Click to collapse
dd is on the tablet not windows...
thor2002ro said:
updated instructions...
Click to expand...
Click to collapse
Where are the "updated instructions"
Crsdr37 said:
Well thanks for explaining what to do means...
dd is the termed used to dump this image to a particular block in this case block 0p1
Click to expand...
Click to collapse
Hmmm there is maybe a tiny one in a million chance that your not the only participator in this thread so who knows...maybe this explanation was not for you but for kimcai.
Sorry if i just burst your bubble
docfreed said:
Where are the "updated instructions"
Click to expand...
Click to collapse
OP
10char
ibila said:
OP
10char
Click to expand...
Click to collapse
Doh! Thanks
Dexter_nlb said:
hmm... you could not find a smaller font?
Click to expand...
Click to collapse
its called "the fine print"
thor2002ro said:
updated instructions...
Click to expand...
Click to collapse
what can we do in your modified recovery?
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%)
linux partition using cwm recovery
&
increasing virtual ram
Perform Following:
1. Remove all Swapper/Swapper2/RamExpander/Ram-Manager or Swap creating any apps that you are using currently
2. Remove swap.swap or any such swap files from sdcard root (if any you find)
3. Now take full Backup of your SDCARD contents-bcoz You are going to format it
4.Install CWMRecovery (if not already having it on your Device)
5. Reboot into CWM Recovery and go to 'advanced'--> "partition your sdcard"
Click to expand...
Click to collapse
Creating CWM partition(Linux Partition):
Choose following parameters while creatig partition:
Partition Size: 1014MB
Swap Size:256MB
Confirm & Execute process. You can parameters according to your understanding as well.
It will wipe all data/partitions on sdcard and will create a new linux (ext3) partition on sdcard with a swap worth 256MB. Reboot Device when process completes.
Click to expand...
Click to collapse
Adding init.d script Support to your ROM (If on stock ROM)
Requirement: You must have busybox installed prior to proceeding for next step
This step is for those who are not on Custom ROMs. All Custom ROM preferably have busybox & init.d support functionality inbuilt and carry init.d folder in /system/etc/<here>
1. Download Installing and activating Uni-init.v1.0.apk will create and activate init.d folder in your /system/etc/<init.d>.
3. init.d folder will carry system tweaks to enhance performance
Click to expand...
Click to collapse
Adding init.d Tweaks Collection:General tweaks and Tweaks related to Linux partition:
1.Now download all init.d Tweaks and copy them into your init.d folder
2.Check whether it has "androidswap' files or not if not download it from 'files' section or somewhere from pinned posts. 'androidswap' carries codes and will create swap on your linux partition.
3.Open androidswap using notepad++ and set swappiness to be created 60(recommended). (You can experiment here settings swappines from 50-100)
Script will looks as below:
#!/system/bin/sh
swapon dev/block/mmcblk0p3
echo 60 > /proc/sys/vm/swappiness
Click to expand...
Click to collapse
4. If you have not edited androidswap then skip above step. If you have increased swappiness count then Move the edited file to your /system/etc/init.d/<here>
5. 'androidswap' and 'fstab' that you find in init.d now will be setting up your CWM partition to work properly.
6. U can check the active swap on sdcard after a reboot using adb shell commands or using Terminal emulator.
Click to expand...
Click to collapse
NOW REBOOT DEVICE to make all the Changes to take effect.
Click to expand...
Click to collapse
Checking Status of Linux (ext3) Partition and Stauts of Swap Created by CWM:
1. You must have rebooted as said earlier to changes to take effect
2. Connect your device with PC and Open Command Prompt
How To enter adb shell command menu:
Code:
[FONT="Arial Black"][SIZE="3"][COLOR="Gray"]
C:\.android>adb devices
List of devices attached
XXXXXXXXX Device
C:\.android>adb root
adbd is already running as root
C:\.android>adb remount rw
remount succeeded
C:\.android>adb shell
sh-4.2# su
su[/COLOR][/SIZE][/FONT]
To check swap partition status use following command:
Code:
[FONT="Arial Black"][SIZE="3"][COLOR="Purple"]sh-4.2# cat /proc/swaps
cat /proc/swaps
Filename Type Size Used Priority
/dev/block/mmcblk0p3 partition 249976 69904 -1[/COLOR][/SIZE][/FONT]
To check swap activity status use following command:
Code:
[FONT="Arial Black"][SIZE="3"][COLOR="Purple"]sh-4.2# free
free
total used free shared buffers
Mem: 168616 166000 2616 0 28
-/+ buffers: 165972 2644
Swap: 249976 69904 180072[/COLOR][/SIZE][/FONT]
[Swap: 249976 69904 180072 ]values shows that your Swap is active and working properly.
Click to expand...
Click to collapse
Note:-
i have tested this whole tutorial on micromax a57 !! everything is working awesome..!!
The EGL patch i have mentioned exists only for Adreno 200 ..!!
follow this tut on adreno200 devices...
Click to expand...
Click to collapse
Enjoy !!!
Have I helped you ??? If Yes !!! Go and find "THANKS" Button
Want to tryy....
via XDA Premium
---------- Post added at 09:18 PM ---------- Previous post was at 09:17 PM ----------
Will seconday partion also support with dis mod?
via XDA Premium
jeswinjv said:
Want to tryy....
via XDA Premium
---------- Post added at 09:18 PM ---------- Previous post was at 09:17 PM ----------
Will seconday partion also support with dis mod?
via XDA Premium
Click to expand...
Click to collapse
Sent from my Nexus 5 using XDA premium app
Well bro i have not tested secondary partition ...
U just try it....
If it works than plz report me...
Nd plz hit thanks if u lyk this tutorial....