a2sd + delvik-cache to sd Doesnt really work other than CyanogenMod 7 (Android 2.3.3 - Optimus One, P500, V General

Hi people I am a proude owner of optimus one. but I cannot get app2sd +
work other then CyanogenMod 7 (Android 2.3.3) Beta 4.....I do not know the reason. maybe its gingerbread.
any ways after I installed CyanogenMod 7 (Android 2.3.3) Beta 4 along with darktremor beta 4 there were no problem what so ever regarding app2sdall of the app packege + devik-cache goes to sd card. btw I am using ext4 for this and ext3 for others and ext2 for some other roms.
Ya where was I? Ya rem.... I tried flashing diffrent custome rom like void-echo, prime v2, OptimusX v1, Nessy, LOL etc.....but still nothing, apps are taking quite a bit space in internal memory. example....
After you install Opera Mobile browser (a2sd + delvik-cache to sd already installed and checked by terminal) It will consume 8+mb of internal space. And I cannot get rid of the consumed space.
in CyanogenMod 7 (Android 2.3.3) Beta 4 it does the same but if I move the opera manually to sd it get rid of that consumed 8 mb. but cannot do the same with other rom.
I dont know where m i going wrong. But is there any step i am missing in order to utilize app2sd fully?
can anyone give me any advice to solve this problem with other roms that are bassed on 2.2.......????

go to terminal and type these commands:
Code:
su
a2sd
read thoroughly, press enter to scroll down.

ungaze said:
go to terminal and type these commands:
Code:
su
a2sd
read thoroughly, press enter to scroll down.
Click to expand...
Click to collapse
Please chk this link
http://forum.xda-developers.com/showpost.php?p=12620748&postcount=7
code
after su
a2sd check
Code:
__ _____
| \ |
| | |
|__/ | Darktremor Apps2SD 2.7.5.3 Beta 4a (2011-01-30)
[-] Checkpoint 1: Check for SD Card Fix and Implement.
[-] Checkpoint 2: Run Dalvik Heap Program (if exists).
[-] Checkpoint 3: Run Set Low Memory Killer Program (if exists).
[-] Checkpoint 4: Determine Mount Point.
[-] Checkpoint 5: Set Parameter Variables.
[ ] GetProp Command = /system/bin/toolbox getprop
[ ] SetProp Command = /system/bin/toolbox setprop
[ ] Mount Point = /sd-ext
[-] Checkpoint 6: Insert CyanogenMod patch.
[-] Checkpoint 7: Complete Dalvik Cache Move (if applicable).
[-] Checkpoint 8: Resetting Dalvik Cache Partition
[-] Checkpoint 9: Switching Davlik Cache to Cache Partition (if applicable)
[-] Checkpoint 10: Checking for existence of command parameter
[-] Checkpoint 11: Check for a2sd help command
[-] Checkpoint 12: Check for a2sd check command
[ ] Starting Apps2SD Check Program.
Darktremor 2.7.5.3 Beta 4a Apps2SD Status Report
================================================================================
===
Legend: [*]=Setting is correct
[!]=Setting is correct, but not optimal.
[x]=Setting is incorrect and needs to be fixed or option is not available
ble.
================================================================================
===
Block Device - [*] /dev/block/mmcblk0p2
Mount Point - [*] /sd-ext
Support EXT2? - [*] Yes
Support EXT3? - [*] Yes
Support EXT4? - [*] Yes
Apps - [ ] Linked to SD Card.
[ ] No Apps2SD Flag File not found.
[*] Programs run from SD card
To run from internal storage, type a2sd remove
Private Apps - [ ] Linked to SD Card.
[ ] No Apps2SD Flag File not found.
[*] Private Programs run from SD card
To run from internal storage, type a2sd remove
Dalvik Cache - [ ] Symbolically Linked.
[ ] Dalvik to SD flag file found.
[*] Dalvik runs from SD card
To run from internal storage, type a2sd nocache
To run from /cache partition, type a2sd cachepart
Data - [ ] Program Data on Internal Storage.
Swap - [ ] Partition not present or no swap support.
[*] Swap does not start.
ZipAlign - [*] Not running at boot.
To activate it, type a2sd zipalign
Dalvik Heap(MB) - [*] 32m
Low Memory
Killer Settings - [*] 2048,3072,4096,6144,7168,8192
Note: Values are in pages.
1 page = 4KB memory.
Values represent the following:
1st number = Foreground App
2nd number = Visible App
3rd number = Secondary Server
4th number = Hidden App
5th number = Content Provider
6th number = Empty App
[*] For a list of commands that you can use with Apps2SD
Type: a2sd help
And now tell me what more shound I do??????

[*] For a list of commands that you can use with Apps2SD
Type: a2sd help
I'll jump right in and lay it out for you, when you type "a2sd check" you should get something like this:
Code:
[ ] Apps2SD is launching...
__ _____
| \ |
| | |
|__/ | Darktremor Apps2SD 2.7.5.2 (2010-09-30)
[ ] GetProp Command = /system/bin/toolbox getprop
[ ] SetProp Command = /system/bin/toolbox setprop
[ ] Mount Point = /system/sd
[ ] Starting Apps2SD Check Program.
[ ] Checking for ext partition
Darktremor 2.7.5.2 Apps2SD Status Report
===================================================================================
Legend: [*]=Setting is correct
[!]=Setting is correct, but not optimal.
[X]=Setting is incorrect and needs to be fixed or option is not available.
===================================================================================
[B]Block Device - [*] Found
- [*] /dev/block/mmcblk0p2
EXT Partition - [*] Mounted
Mount Point - [ ] /system/sd
Partition Type - [*] EXT2
Support EXT2? - [*] Yes
Support EXT3? - [*] Yes
Support EXT4? - [*] Yes[/B]
[B]Apps - [ ] Linked to SD Card.
[ ] No Apps2SD Flag File not found.
[*] Programs run from SD card
To run from internal storage, type a2sd remove[/B]
Private Apps - [ ] Linked to SD Card.
[ ] No Apps2SD Flag File not found.
[*] Private Programs run from SD card
To run from internal storage, type a2sd remove
[B]Dalvik Cache - [ ] Symbolically Linked.
[ ] Dalvik to SD flag file found.
[*] Dalvik runs from SD card
To run from internal storage, type a2sd nocache
To run from /cache partition, type a2sd cachepart[/B]
Swap - [ ] Partition not present or no swap support.
[*] Swap does not start.
ZipAlign - [*] Not running at boot.
To activate it, type a2sd zipalign
Dalvik Heap(MB) - [*] 40m
Low Memory
Killer Settings - [*] 1536,2048,4096,4096,5120,15360
Note: Values are in pages.
1 page = 4KB memory.
Values represent the following:
1st number = Foreground App
2nd number = Visible App
3rd number = Secondary Server
4th number = Hidden App
5th number = Content Provider
6th number = Empty App
[⁇] For a list of commands that you can use with Apps2SD
Type: a2sd help
Notice the parts in bold? theres always a tip on the last line, check it out.

ungaze said:
[*] For a list of commands that you can use with Apps2SD
Type: a2sd help
I'll jump right in and lay it out for you, when you type "a2sd check" you should get something like this:
Code:
[ ] Apps2SD is launching...
__ _____
| \ |
| | |
|__/ | Darktremor Apps2SD 2.7.5.2 (2010-09-30)
[ ] GetProp Command = /system/bin/toolbox getprop
[ ] SetProp Command = /system/bin/toolbox setprop
[ ] Mount Point = /system/sd
[ ] Starting Apps2SD Check Program.
[ ] Checking for ext partition
Darktremor 2.7.5.2 Apps2SD Status Report
===================================================================================
Legend: [*]=Setting is correct
[!]=Setting is correct, but not optimal.
[X]=Setting is incorrect and needs to be fixed or option is not available.
===================================================================================
[B]Block Device - [*] Found
- [*] /dev/block/mmcblk0p2
EXT Partition - [*] Mounted
Mount Point - [ ] /system/sd
Partition Type - [*] EXT2
Support EXT2? - [*] Yes
Support EXT3? - [*] Yes
Support EXT4? - [*] Yes[/B]
[B]Apps - [ ] Linked to SD Card.
[ ] No Apps2SD Flag File not found.
[*] Programs run from SD card
To run from internal storage, type a2sd remove[/B]
Private Apps - [ ] Linked to SD Card.
[ ] No Apps2SD Flag File not found.
[*] Private Programs run from SD card
To run from internal storage, type a2sd remove
[B]Dalvik Cache - [ ] Symbolically Linked.
[ ] Dalvik to SD flag file found.
[*] Dalvik runs from SD card
To run from internal storage, type a2sd nocache
To run from /cache partition, type a2sd cachepart[/B]
Swap - [ ] Partition not present or no swap support.
[*] Swap does not start.
ZipAlign - [*] Not running at boot.
To activate it, type a2sd zipalign
Dalvik Heap(MB) - [*] 40m
Low Memory
Killer Settings - [*] 1536,2048,4096,4096,5120,15360
Note: Values are in pages.
1 page = 4KB memory.
Values represent the following:
1st number = Foreground App
2nd number = Visible App
3rd number = Secondary Server
4th number = Hidden App
5th number = Content Provider
6th number = Empty App
[⁇] For a list of commands that you can use with Apps2SD
Type: a2sd help
Notice the parts in bold? theres always a tip on the last line, check it out.
Click to expand...
Click to collapse
I have done this. and show me devik-cache runs from sd..then whats the problem. and why installing opera or updating map eating internal space. Doesn't happen in gingerbread...

Related

[Q] ext2 support

Hi,
I'm trying to get backtrack loaded on galaxy task 10 with pershoot's latest kernel and the script fails while trying to mount the loop device. I have searched all over the place and have found other people with the same or similar problems. I'm pretty sure the problem is that I do not have ext2 support on the kernel.
Does anyone know if one of the extra modules for pershoot's kernel will enable ext2 support?
I have included the error below in case anyone has any other ideas.
Thanks.
Code:
[email protected]:/sdcard/bt # sh installbt.sh [ STEP 1 ]
BackTrack CHroot v0.2 for SGS2
This process does NOT damage Android OS!
based on Xperia X10 Customization by Anant
modded for SGS2 by DooMLoRD
Cleaning up old Chunks . . .
Creating necessary directories
Setting up files
[ STEP 1 COMPLETE ]
BackTrack is now configure!
to Start BackTrack type 'startbt' (without the quotes)
[email protected]:/sdcard/bt # startbt
[ STEP 2 ]
mknod: /dev/block/loop254: File exists
mount: mounting /dev/block/loop254 on /data/local/bt failed: Invalid argument
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
/system/bin/startbt[21]: cannot create /data/local/bt/etc/resolv.conf: No such file or directory
/system/bin/startbt[22]: cannot create /data/local/bt/etc/resolv.conf: No such file or directory
/system/bin/startbt[23]: cannot create /data/local/bt/etc/hosts: No such file or directory
BackTrack Loader by Anant based on ubuntu loader
[ STEP 2 COMPLETE ]
BackTrack is ready just type 'bt' (without the quotes)
[email protected]:/sdcard/bt #
..bump..
Anyone?

[Q] A2SD

I'm using CM 7.2 latest, already done partition of sd card by minitool partition (Ext4)
when i type a2sd data in terminal emulation it shows this error message, please reply me as soon as possible what this problem is all about & how can I solve it..
$ export PATH=/data/local/bin:$PATH
$ a2sd datasd
/system/bin/a2sd: line 61: /data/dta2sd.log: Permission denied
/system/bin/a2sd: line 65: /data/dta2sd.log: Permission denied
/system/bin/a2sd: line 66: /data/dta2sd.log: Permission denied
/system/bin/a2sd: line 67: /data/dta2sd.log: Permission denied
/system/bin/a2sd: line 68: /data/dta2sd.log: Permission denied
/system/bin/a2sd: line 69: /data/dta2sd.log: Permission denied
[ ] GREP: Using ROM Busybox.
[ ] REBOOT: Using ROM Busybox.
[ ] FDISK: Using ROM Busybox.
[ ] CAT: Using ROM Busybox.
[ ] MKDIR: Using ROM Busybox.
[ ] RMDIR: Using ROM Busybox.
[ ] CHMOD: Using ROM Busybox.
[ ] MOUNT: Using ROM Busybox.
[ ] UMOUNT: Using ROM Busybox.
[ ] CP: Using ROM Busybox.
[ ] RM: Using ROM Busybox.
[ ] MV: Using ROM Busybox.
[ ] LN: Using ROM Busybox.
[ ] MORE: Using ROM Busybox.
[ ] MKNOD: Using ROM Busybox.
[ ] AWK: Using ROM Busybox.
[ ] SLEEP: Using ROM Busybox.
[ ] SYNC: Using ROM Busybox.
[ ] TEE: Using ROM Busybox.
grep: /init.rc: Permission denied
/system/bin/launcha2sd: line 296: /data/.lmdefault: Permission denied
/system/bin/launcha2sd: line 297: /data/.lmdefault: Permission denied
tee: /data/dta2sd.log: Permission denied
__ _____
tee: /data/dta2sd.log: Permission denied
| \ |
tee: /data/dta2sd.log: Permission denied
| | |
tee: /data/dta2sd.log: Permission denied
|__/ | Darktremor Apps2SD 2.7.5.3 Beta 4a (2011-01-30)
tee: /data/dta2sd.log: Permission denied
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 1: Check for SD Card Fix and Implement.
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 2: Run Dalvik Heap Program (if exists).
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 3: Run Set Low Memory Killer Program (if exists).
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 4: Determine Mount Point.
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 5: Set Parameter Variables.
/system/bin/launcha2sd: line 373: /data/dta2sd.log: Permission denied
[ ] GetProp Command = /system/bin/toolbox getprop
[ ] SetProp Command = /system/bin/toolbox setprop
[ ] Mount Point = /sd-ext
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 6: Insert CyanogenMod patch.
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 7: Complete Dalvik Cache Move (if applicable).
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 8: Resetting Dalvik Cache Partition
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 9: Switching Davlik Cache to Cache Partition (if applicable)
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 10: Checking for existence of command parameter
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 11: Check for a2sd help command
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 12: Check for a2sd check command
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 13: Display version information.
/system/bin/launcha2sd: line 538: /data/dta2sd.log: Permission denied
[ ] Starting Darktremor Apps2SD Version 2.7.5.3 Beta 4a
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 14: Check for filesystem support.
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 15: Mount partition.
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 16: Reset Dalvik if Flag File is present.
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 17: Mount Swap.
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 18: Display Heap Size.
[ ] Heap Size set to: 48m
tee: /data/dta2sd.log: Permission denied
[-] Checkpoint 19: Check for start parameter and launch start2sd if needed.
tee: /data/dta2sd.log: Permission denied
[ ] Launching Apps2SD Start Program with datasd
/system/bin/launcha2sd: line 820: /data/dta2sd.log: Permission denied
/system/bin/starta2sd: line 18: /data/dta2sd.log: Permission denied
[ ] Starting Darktremor Apps2SD in datasd mode
/system/bin/starta2sd: line 61: /data/dta2sd.log: Permission denied
tee: /data/dta2sd.log: Permission denied
[X] No partition available. Data move not available
/system/bin/starta2sd: line 114: /data/.nodata: Permission denied
tee: /data/dta2sd.log: Permission denied
tee: /data/dta2sd.log: Permission denied
[ ] Setting File System Ready property to 1.
/system/bin/starta2sd: line 1211: /data/dta2sd.log: Permission denied
/system/bin/launcha2sd: line 822: /data/dta2sd.log: Permission denied
/system/bin/a2sd: line 71: /data/dta2sd.log: Permission denied
Did you use the command as su or not?
It should be:
Code:
$su [ENTER]
#a2sd data [ENTER]
That's exactly how it will look in terminal. Obviously don't type the dollar or pound signs and [ENTER] just means hit enter.
Edit: Just noticed the '$' in your command there. You need to run the 'a2sd data' command as su. So follow the steps I typed above and you should be as happy as a monkey with a fresh pile of poo.
Thank for your help....
Dear thank you very very much for your help,
I'm beginner so please guide me some more, I just want to transfer my apps in SD card by using a2sd that's it. I've already partitioned my SD card from fat32 to EXT4 by using "mini tools partition wizard" now I'm having FAT32 partition & EXT4 partition in my sdcard.
I can't see EXT4 partition in my samsung galaxy gio but only can see FAT32(showing 1.2 GB) but rest of 600 MB for EXT4 is not been shown.
AFTER USING YOUR INSTRUCTIONS, I GOT THIS MESSAGE...
$ export PATH=/data/local/bin:$PATH
$ su
# a2sd data
[ ] GREP: Using ROM Busybox.
[ ] REBOOT: Using ROM Busybox.
[ ] FDISK: Using ROM Busybox.
[ ] CAT: Using ROM Busybox.
[ ] MKDIR: Using ROM Busybox.
[ ] RMDIR: Using ROM Busybox.
[ ] CHMOD: Using ROM Busybox.
[ ] MOUNT: Using ROM Busybox.
[ ] UMOUNT: Using ROM Busybox.
[ ] CP: Using ROM Busybox.
[ ] RM: Using ROM Busybox.
[ ] MV: Using ROM Busybox.
[ ] LN: Using ROM Busybox.
[ ] MORE: Using ROM Busybox.
[ ] MKNOD: Using ROM Busybox.
[ ] AWK: Using ROM Busybox.
[ ] SLEEP: Using ROM Busybox.
[ ] SYNC: Using ROM Busybox.
[ ] TEE: Using ROM Busybox.
__ _____
| \ |
| | |
|__/ | Darktremor Apps2SD 2.7.5.3 Beta 4a (2011-01-30)
[-] Checkpoint 1: Check for SD Card Fix and Implement.
[-] Checkpoint 2: Run Dalvik Heap Program (if exists).
[-] Checkpoint 3: Run Set Low Memory Killer Program (if exists).
[-] Checkpoint 4: Determine Mount Point.
[-] Checkpoint 5: Set Parameter Variables.
[ ] GetProp Command = /system/bin/toolbox getprop
[ ] SetProp Command = /system/bin/toolbox setprop
[ ] Mount Point = /sd-ext
[-] Checkpoint 6: Insert CyanogenMod patch.
[-] Checkpoint 7: Complete Dalvik Cache Move (if applicable).
[-] Checkpoint 8: Resetting Dalvik Cache Partition
[-] Checkpoint 9: Switching Davlik Cache to Cache Partition (if applicable)
[-] Checkpoint 10: Checking for existence of command parameter
[-] Checkpoint 11: Check for a2sd help command
[-] Checkpoint 12: Check for a2sd check command
[-] Checkpoint 13: Display version information.
[ ] Starting Darktremor Apps2SD Version 2.7.5.3 Beta 4a
[-] Checkpoint 14: Check for filesystem support.
[-] Checkpoint 15: Mount partition.
[-] Checkpoint 16: Reset Dalvik if Flag File is present.
[-] Checkpoint 17: Mount Swap.
[-] Checkpoint 18: Display Heap Size.
[ ] Heap Size set to: 48m
[-] Checkpoint 19: Check for start parameter and launch start2sd if needed.
[ ] Launching Apps2SD Start Program with data
[ ] Starting Darktremor Apps2SD in data mode
[X] Invalid command: data
[ ] Setting File System Ready property to 1.
#
now tell me what should I do to transfer my apps to SD card EXT4 partition that is hidden even I have tried titanium backup, still can't see my 600 MB
Well your apps data is on the ext partition.
Now try this command:
Code:
$ su [ENTER]
# /system/bin/a2sd reinstall [ENTER]
Your phone should reboot.
Now go back into terminal and type in this:
Code:
$ su [ENTER]
# /system/bin/a2sd cachesd [ENTER]
Again your phone will reboot. You should have a lot more space on your phones internal memory now. You're done.
If you want to check all this and have a GIU to control it with use THIS app.
One thing you'll notice is that it still looks like the apps are on in the internal memory - they're not. You can check that using Titanium Backup or that app I linked you too. You'll notice the internal memory has a lot more free space and the ext partition should be listed.
Waoooo!!!!!
Thank you very very much for your halp....
now I'm having free memory in internal memory, before reading your this comment I watch a video "how to partition sd card" so I partitioned my SDCARD again (don't know CWM partitioned it in EXT3 or EXT4 format as far I know EXT4 is fast) by using Clockworkrecovery to 500MB & there was also an option of SWAP partiton (didn't any idea what it's about) & I partitioned it to 64MB..
after that I got your message, did what you say & it has done well, now a2sdgui showing that apps are in SD card & delvik cache is in sd card as well
but dear tell me one more thing I've check by titanium backup the "google app" like google mail, youtube etc... are still in SD CARD I though this a2sd will transfer all these apps to SD Card's EXT partition??
By the way thank you very very much indeed for helping me
You're welcome!
For those apps go into settings>applications. There should be a tab at the top that will list what apps are on the sdcard. Click on that and check find those apps, make sure they're not check marked or selected. If they are, simply unselect them and they will be moved to the 'internal' memory (your phone thinks the ext partition is part of the internal memory basically). There are 2 types of a2sd, Google's version and the one you're using. They work very differently and those couple apps you mentioned are using Google's version.
Hopefully that helps. PM me if you have any other questions or just post them in this thread.
now I got some idea when you said (your phone think it's internal memory)
thumbs up for you & definitely if there will be any problem, i'll PM you within no time
Thanks for making me happy

[MOD] Increase RAM memory size(without swapper!) (good for gaming)

Hi, here is a good mod specially for gaming and ICS roms which consumes big memory amount!!!
It is basically an .sh script that enables swapping. This makes device use part of sdcard to use it as RAM memory, so it can be increased a lot...
The only requirement is have root, use relatively fast sdcard and have enabled init.d scripts..
WI always have used this mod on my phone so i think it no needs testing
To it follow these steps:
1.- Root your device
2.- Make a swap partition in your sdcard (this step will format your sdcard!)
http://forum.xda-developers.com/wiki/SD_card_partitioning
2.1-In step 3 select "swap partition"
2.2-I recommend to make ~512MB partition because the SO will be going to fill it during you use the phone, but i always had 1GB partition, and no problems You can select 100MB or 50MB, but this is too little
3.- Check if there is a folder called init.d inside /system/etc/
3.1-If its there, follow next steps
3.2-If it is not there, you must activate init.d support, follow this tutorial: http://forum.xda-developers.com/showthread.php?t=1422061
3.- Copy 00userinit file to your device (must remove the .txt extension of the file, because i needed to put it to attatch the file)
4.- With root explorer, xplore, or similar copy it to /system/etc/init.d
5.- Set all permissions: rwxr-xr-x
6.- Reboot device
7.- For checking if it works, download Terminal emulator and type "free". See attatchment.
8.- If "swap" line has no "0" value, it works, congratulations
Click to expand...
Click to collapse
With this, you will:
Have swapping activated in your phone permanently, or until you remove that script or change of ROM.
Have bigger RAM memory amount, depending on your swap partition size
If you use supercharger or any RAM manager program, i should recomend you to activate hard gaming option, because:
-As you have bigger RAM memory, the useless aplications, instead of be closed, they will be stored in your sdcard partition so, you re able to have multitasking and hard gaming option at the same time
Click to expand...
Click to collapse
But this is not all!! You can open and edit this file to adapt it to your requirements:
You can edit this line to set swapiness cuantity, this defines the OS tendency to use swap partition, I not recommend to set it to 100, but 60 is good. Also, if you have slower sdcard, you should set it to 30~40:
-Change 60 value by something you want from 1 to 100 "then echo 60 > /proc/sys/vm/swappiness;"
If you have another sdcard partition like EXT4 or something to APP2SD, you should change the last number of "mmcblk0p2" by the number of the partition, i mean:
-If you have 3 partitions with this order: Fat32(that you use everyday), EXT4, and SWAP you should change it by mmcblk0p3
-If 3 partitions with this order: Fat32, SWAP,and EXT4, you should set it mmcblk0p2
Click to expand...
Click to collapse
I forgot it! To use this, remember that you should:
INSTALL THE LATEST BUSYBOX VERSION!!!
Click to expand...
Click to collapse
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOR THOSE WHO HAVE NOT WORKING, DELETE 00userinit and follow the steps with 01userinit attatched file
Isnt this much like swapfipe/partition?
Sent from my R800i using xda app-developers app
Does it works on locked bootloaders, obviously on gingerbread??????
i already have linux swap partition and use "swapper 2 " with doom kernel
after using swap we should disable ( turn off ) the swapper2 and then mount the SD card to computer ... so , my question is , is your script the same ? or it can disable - enable itself automatically ?
romeo_charly said:
Does it works on locked bootloaders, obviously on gingerbread??????
Click to expand...
Click to collapse
Locked or Unlocked shouldn't make a difference as long as you have Init.d support
Sent from my R800i using XDA APP and NXT2JB
bamsbamx said:
Hi, here is a good mod specially for gaming and ICS roms which consumes big memory amount!!!
It is basically an .sh script that enables swapping. This makes device use part of sdcard to use it as RAM memory, so it can be increased a lot...
The only requirement is have root, use relatively fast sdcard and have enabled init.d scripts..
WI always have used this mod on my phone so i think it no needs testing
To it follow these steps:
With this, you will:
But this is not all!! You can open and edit this file to adapt it to your requirements:
I forgot it! To use this, remember that you should:
Click to expand...
Click to collapse
Will this reck your phone in the long run
extremetempz said:
Will this reck your phone in the long run
Click to expand...
Click to collapse
This can't 'wreck a phone' but it can make the life of the SDCARD shorter.
sewer56lol said:
This can't 'wreck a phone' but it can make the life of the SDCARD shorter.
Click to expand...
Click to collapse
That is what says some people, but i always have used it and no problems...
In addition, sdcard life is sure longer than 10 years, if you use swap constantly it could be reduced to7 or 8...
Then, it makes no sense to say that, because you probably will buy another sdcard in less than 5 years
I tried this without success. I had to change the script that you provided. First I added #!/system/bin/sh to line 1 so it would run as a shell script and then the partition on my device was /dev/block/mmcblk0p3. I had to do the following to figure out which partition on my sdcard was actually set as swap. Once I edited the script with the addition to line 1 and the correct partition everything worked as expected.
Code:
~ # su
[email protected]:/ # fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 3818 30666992 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 3818 3849 250000 83 Linux
/dev/block/mmcblk0p3 3850 3880 249007+ 82 Linux swap
And my 00userinit script looks like:
Code:
#!/system/bin/sh
if [ -n /dev/block/mmcblk0p3 ];
then mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then echo 60 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
I'm running FXP 142 CM9.1.
jimmyvau said:
I tried this without success. I had to change the script that you provided. First I added #!/system/bin/sh to line 1 so it would run as a shell script and then the partition on my device was /dev/block/mmcblk0p3. I had to do the following to figure out which partition on my sdcard was actually set as swap. Once I edited the script with the addition to line 1 and the correct partition everything worked as expected.
Code:
~ # su
[email protected]:/ # fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 3818 30666992 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 3818 3849 250000 83 Linux
/dev/block/mmcblk0p3 3850 3880 249007+ 82 Linux swap
And my 00userinit script looks like:
Code:
#!/system/bin/sh
if [ -n /dev/block/mmcblk0p3 ];
then mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then echo 60 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
I'm running FXP 142 CM9.1.
Click to expand...
Click to collapse
Dont know what happened, the script I provided works for me, maybe you had to add that because you are running CM...
And what you say about partition number, I already stated that in original post.... thanks for reporting
Which is better
Is this MOD better than the ROEHSOFT ram expander
af230 said:
Is this MOD better than the ROEHSOFT ram expander
Click to expand...
Click to collapse
i think its different, i dont know how does it work, but reading its description I think that this app creates a swap file, instead of using swap partition.. I think this is worse method than i have posted, because system compresses all swapped memory into a file,so it could be slower... In addition, you must install an app to make it work, which means a service running in background, less space for other apps, etc,etc...
I dont know, but i think my method is better
in theory should this work on any phone?
evol4g said:
in theory should this work on any phone?
Click to expand...
Click to collapse
Yes, because android is based in linux
Is there a way u could do this without wiping the sd card?
Hello, can you tell us how this interferes with z-ram? I have z ram init.d script activated also. What is your recomandation? Turn it off or keep them both? Thx
CyberScopes said:
Is there a way u could do this without wiping the sd card?
Click to expand...
Click to collapse
Yes. I never partition from my phone. Insert ur card into ur laptop and partition with paragon partition manager (or your choice). If you have some free space on it you could easily resize ur fat32 partition to make it smaller and then use the unpartitioned space to make a linux swap partition or en ext2/3 for link2sd, if u want (I have both).. Did it lots of times. No problem
---------- Post added at 11:11 AM ---------- Previous post was at 11:06 AM ----------
jimmyvau said:
I tried this without success. I had to change the script that you provided. First I added #!/system/bin/sh to line 1 so it would run as a shell script and then the partition on my device was /dev/block/mmcblk0p3. I had to do the following to figure out which partition on my sdcard was actually set as swap. Once I edited the script with the addition to line 1 and the correct partition everything worked as expected.
Code:
~ # su
[email protected]:/ # fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 3818 30666992 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 3818 3849 250000 83 Linux
/dev/block/mmcblk0p3 3850 3880 249007+ 82 Linux swap
And my 00userinit script looks like:
Code:
#!/system/bin/sh
if [ -n /dev/block/mmcblk0p3 ];
then mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then echo 60 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk0p3;
fi;
I'm running FXP 142 CM9.1.
Click to expand...
Click to collapse
I had to add the first line too. Thx for the tip. I'm on stock (NXT 1.3 flavour )
Works
+1 For you good sir
Will this be any good on GB for daily use, I'm always short on RAM on my SGS+
Whether Thise need what memory class 2 best performance?and thise damage on sd or not?
Sent from my R800i using Tapatalk 2

Resize Partitions

Hello,
my phone is an E2303. The only problem for me with this phone is the limited memory.
I have rooted the phone the way explained in http://forum.xda-developers.com/m4-a.../root-t3421932
With Root Explorer, i removed a lot of stuff in /system. Now 1,66 GB are used and 810 MB are free.
usderdata and system partitions ( sgdisk --print /dev/block/mmcblk0 )
Nr Name Start Stop Size type
29 userdata 1449984 10043391 4.1 GIB 8300
30 system 10043392 15269375 2.5 GIB 8300
My idea:
- use TWRP to backup userdata and system partions
- delete both partitions
- create userdata with 4.6 GIB
- create system with 2 GIB
- format both partitions with make_extfs4
- restore both partitions with TWRP
I know that as a consequence, i'm not able to flash updates.
Do you think, that this would work ?
===[ Update 5.12.2016 ]===
Yes !
I've attatched my scripts to this initial post. Howto follows ...
i can tell you that something similar worked on lg g2 mini (d610/d618)
that phone have a cache partition with 1gb of unused storage, so a developer resized to reduce this to 100mb, you can find this on L90 or g2 mini forum
did you try it yet?
try and give info
resize partitions Script
Hello,
i've startet coding a shell script:
------------------------------------------------------------
#!/bin/bash
MMC=/dev/block/mmcblk0
NEW_FREE_SEC=65536 # 32 mbyte in sectors
if [ $(id -u) -ne 0 ]; then
echo "Only root is allowed"
exit
fi
mount | grep "$MMC" > /dev/null
RC=$?
if [ $RC -eq 1 ]; then
echo "system not mounted. mounting now"
mount /system
RC=$?
echo $RC
fi
FREE_MB=$(df -P -m /system/ | grep 'mmcblk0p30' | awk '{print $4}')
FREE_KB=$(df -Pk /system/ | grep 'mmcblk0p30' | awk '{print $4}')
FREE_SEC=$(df -P -B 512 /system/ | grep 'mmcblk0p30' | awk '{print $4}')
echo "Your system partion has $FREE_MB mbyte free ( kbyte = $FREE_KB ; sectors = $FREE_SEC)"
DATA_FS=$(sgdisk --print $MMC | awk ' $1 == "29" { print $2}')
DATA_LS=$(sgdisk --print $MMC | awk ' $1 == "29" { print $3}')
SYS_FS=$(sgdisk --print $MMC | awk ' $1 == "30" { print $2}')
SYS_LS=$(sgdisk --print $MMC | awk ' $1 == "30" { print $3}')
echo "Data partition first sector: $DATA_FS"
echo "Data partition last sector: $DATA_LS"
echo "System partition first sector: $SYS_FS"
echo "System partition last sector: $SYS_LS"
let NEW_DATA_LS=$DATA_LS+$FREE_SEC-$NEW_FREE_SEC
let NEW_SYS_FS=$NEW_DATA_LS+1
echo "Data partion NEW last sector: $NEW_DATA_LS"
echo "System partion NEW first sector: $NEW_SYS_FS"
-------------------------------
Output:
/external_sd # . resize_partions
Your system partion has 839 mbyte free ( kbyte = 859392 ; sectors = 1718784)
Data partition first sector: 1449984
Data partition last sector: 10043391
System partition first sector: 10043392
System partition last sector: 15269375
Data partion NEW last sector: 11696639
System partion NEW first sector: 11696640
-------------------------------
Next things to code would be:
- Backup both partitions to SD-card using "tar" ( tar cpf ...)
- unmount partitions
- delete partitions ( sdisk $MMC --delete 30 )
- create partitions with new sector boundaries ( sgdisk $MMC --new 30:11696640:15269375 )
- change partition type ( sgdisk $MMC -t 30:8300)
- change name ( sgdisk $MMC --change-name 30:"system")
- create ext4 partion ( make_ext4fs -L system /dev/block/mmcblk0p30)
- mount
- restore partions ( tar xpf ..)
Do i need special options for make_ext4fs ?
But the question is: would this work ??? What, if i bootloop my device ?
klarseher said:
Hello,
i've startet coding a shell script:
------------------------------------------------------------
#!/bin/bash
MMC=/dev/block/mmcblk0
NEW_FREE_SEC=65536 # 32 mbyte in sectors
if [ $(id -u) -ne 0 ]; then
echo "Only root is allowed"
exit
fi
mount | grep "$MMC" > /dev/null
RC=$?
if [ $RC -eq 1 ]; then
echo "system not mounted. mounting now"
mount /system
RC=$?
echo $RC
fi
FREE_MB=$(df -P -m /system/ | grep 'mmcblk0p30' | awk '{print $4}')
FREE_KB=$(df -Pk /system/ | grep 'mmcblk0p30' | awk '{print $4}')
FREE_SEC=$(df -P -B 512 /system/ | grep 'mmcblk0p30' | awk '{print $4}')
echo "Your system partion has $FREE_MB mbyte free ( kbyte = $FREE_KB ; sectors = $FREE_SEC)"
DATA_FS=$(sgdisk --print $MMC | awk ' $1 == "29" { print $2}')
DATA_LS=$(sgdisk --print $MMC | awk ' $1 == "29" { print $3}')
SYS_FS=$(sgdisk --print $MMC | awk ' $1 == "30" { print $2}')
SYS_LS=$(sgdisk --print $MMC | awk ' $1 == "30" { print $3}')
echo "Data partition first sector: $DATA_FS"
echo "Data partition last sector: $DATA_LS"
echo "System partition first sector: $SYS_FS"
echo "System partition last sector: $SYS_LS"
let NEW_DATA_LS=$DATA_LS+$FREE_SEC-$NEW_FREE_SEC
let NEW_SYS_FS=$NEW_DATA_LS+1
echo "Data partion NEW last sector: $NEW_DATA_LS"
echo "System partion NEW first sector: $NEW_SYS_FS"
-------------------------------
Output:
/external_sd # . resize_partions
Your system partion has 839 mbyte free ( kbyte = 859392 ; sectors = 1718784)
Data partition first sector: 1449984
Data partition last sector: 10043391
System partition first sector: 10043392
System partition last sector: 15269375
Data partion NEW last sector: 11696639
System partion NEW first sector: 11696640
-------------------------------
Next things to code would be:
- Backup both partitions to SD-card using "tar" ( tar cpf ...)
- unmount partitions
- delete partitions ( sdisk $MMC --delete 30 )
- create partitions with new sector boundaries ( sgdisk $MMC --new 30:11696640:15269375 )
- change partition type ( sgdisk $MMC -t 30:8300)
- change name ( sgdisk $MMC --change-name 30:"system")
- create ext4 partion ( make_ext4fs -L system /dev/block/mmcblk0p30)
- mount
- restore partions ( tar xpf ..)
Do i need special options for make_ext4fs ?
But the question is: would this work ??? What, if i bootloop my device ?
Click to expand...
Click to collapse
try and give info
Flashing stock with Flashtool should restore official partition table.
bootloop now ...
ch3mn3y said:
Flashing stock with Flashtool should restore official partition table.
Click to expand...
Click to collapse
As a first step, I have only risized the system partition. The files were backuped with "tar cpf" and restored with "tar xpf" in the recreated partition.
I could see the files in the partion, but the phone does not startup "normal".
I had to use the hidden off button near the SD-slot to power off the phone. Flashing didn't resolved the problem. There is an error while writing system.sin - probably because the partition is to small.
Maybe i have to downgrade flashtool, as mentioned in http://forum.xda-developers.com/showpost.php?p=62751375&postcount=3 ???
Next step would be to "unbrick" my phone. With original system partition, i will only backup and restore the content, to see, if "tar" is able to do the job. Second try with TWRP Backup.
Hello,
I could be wrong, but I think your bootloop problem would probably comes from some sort of SONY extra protection layer.
This additional security system is called RIC and prevents you from freely modifying the system partition at runtime by blocking r/w mount of the system partition.
There is also a default Android security that checks the system partition against a hardcoded hash on boot, to prevent system partition modification (maybe partition size is part of the check operation...).
So you may try to disable the first protection (look at Z5 tutorial) and/or look for a way to bypass the boot check (not sure if possible).
Regards.
system parttion successfull shrinked
Okay, i finally shrinked my system partition and the phone will boot up normal.
The process is a little bit complicated.
You have to create a TWRP backup of your debloated system partition.
Check, if this backup is working ! So rm -rf everything in system and restore from backup.
Next, delete partition with sgdisk and create smaler one ( my script from 1st post will do the calculation for 1st sector )
Change name of partion to "system".
Create ext4 fileystem on parttion ( TWRP will also format - don't know if realy needed )
Reboot into TWRP an try to restore - maybe reboot some times into TWRP and check parttions
To recover with flashtool in case you didn't manage to get it to work - delete system partition and flash "partition.sin" and "system.sin"
In the next step, i will increase data partition
Code:
/system # df -h .
Filesystem Size Used Available Use% Mounted on
/dev/block/mmcblk0p30
1.6G 1.6G 4.9M 100% /system
/system # sgdisk --print /dev/block/mmcblk0 | tail -10
21 393216 475135 40.0 MiB FFFF FOTAKernel
22 475136 475151 8.0 KiB FFFF ssd
23 475152 475215 32.0 KiB FFFF DDR
24 475216 476239 512.0 KiB FFFF config
25 476240 509007 16.0 MiB 8300 LTALabel
26 516096 532479 8.0 MiB 8300 apps_log
27 532480 1040383 248.0 MiB 8300 oem
28 1040384 1449983 200.0 MiB 8300 cache
29 1449984 10043391 4.1 GiB 8300 userdata
30 11702880 15269375 1.7 GiB 8300 system
/system #
klarseher said:
Okay, i finally shrinked my system partition and the phone will boot up normal.
The process is a little bit complicated.
You have to create a TWRP backup of your debloated system partition.
Check, if this backup is working ! So rm -rf everything in system and restore from backup.
Next, delete partition with sgdisk and create smaler one ( my script from 1st post will do the calculation for 1st sector )
Change name of partion to "system".
Create ext4 fileystem on parttion ( TWRP will also format - don't know if realy needed )
Reboot into TWRP an try to restore - maybe reboot some times into TWRP and check parttions
To recover with flashtool in case you didn't manage to get it to work - delete system partition and flash "partition.sin" and "system.sin"
In the next step, i will increase data partition
Code:
/system # df -h .
Filesystem Size Used Available Use% Mounted on
/dev/block/mmcblk0p30
1.6G 1.6G 4.9M 100% /system
/system # sgdisk --print /dev/block/mmcblk0 | tail -10
21 393216 475135 40.0 MiB FFFF FOTAKernel
22 475136 475151 8.0 KiB FFFF ssd
23 475152 475215 32.0 KiB FFFF DDR
24 475216 476239 512.0 KiB FFFF config
25 476240 509007 16.0 MiB 8300 LTALabel
26 516096 532479 8.0 MiB 8300 apps_log
27 532480 1040383 248.0 MiB 8300 oem
28 1040384 1449983 200.0 MiB 8300 cache
29 1449984 10043391 4.1 GiB 8300 userdata
30 11702880 15269375 1.7 GiB 8300 system
/system #
Click to expand...
Click to collapse
give flashable zip
Increasing userdata worked the same way. Backup userdata with TWRP, delete partition 29, create partition 29 with new last sector. Restore with TWRP.
( I've lost adoptive storage in this step - but this is okay, because adoptive storage is to slow for me )
Now userdata on my phone has 4.9 GIB.
To do the same, you have to read and understand.
There is no flashable zip - you will resize your partitions after removing unused stuff from system partition. You have to deal with sgdisk on the TWRP cmdline ( adb shell)
klarseher said:
Hello,
my phone is an E2303. The only problem for me with this phone is the limited memory.
I have rooted the phone the way explained in http://forum.xda-developers.com/m4-a.../root-t3421932
With Root Explorer, i removed a lot of stuff in /system. Now 1,66 GB are used and 810 MB are free.
usderdata and system partitions ( sgdisk --print /dev/block/mmcblk0 )
Nr Name Start Stop Size type
29 userdata 1449984 10043391 4.1 GIB 8300
30 system 10043392 15269375 2.5 GIB 8300
My idea:
- use TWRP to backup userdata and system partions
- delete both partitions
- create userdata with 4.6 GIB
- create system with 2 GIB
- format both partitions with make_extfs4
- restore both partitions with TWRP
I know that as a consequence, i'm not able to flash updates.
Do you think, that this would work ?
Click to expand...
Click to collapse
When you remove or delete any system app the folder & ink may get deleted but odex file of original stock rom remains in odex folder as squashed this way you can free up at least 200 to 300 mb.
I have tested it on LP.
& As per my assumption the squashed odexes got nothing to do with selinux as it only load images from squashed folder.
rebuild odex.system.sqsh
Hello,
I rebuild odex.system.sqsh - the size has been reduced from 275MByte to 151MByte.
but, my current linux distribution does not support selinux
So, i have to repeat with another linux distribution and replace odex.system.sqsh in /system folder.
maybe next weekend ...
howto
klarseher said:
Hello,
I rebuild odex.system.sqsh - the size has been reduced from 275MByte to 151MByte.
but, my current linux distribution does not support selinux
So, i have to repeat with another linux distribution and replace odex.system.sqsh in /system folder.
maybe next weekend ...
Click to expand...
Click to collapse
The solution:
- install CentOS 7 in VirtualBox
Get odex.system.sqsh from phone ( Phone in TWRP Mode):
adb pull /system/odex.system.sqsh .
Copy odex.system.sqsh to CentOS ( via shared folder)
As root:
- yum install squashfs-tools
- unsquashfs odex.system.sqsh # you got a lot of warnings, because unsquashfs is not allowed to access selinux attributes
- rm -rf squashfs-root # remove for next try
- grep unsquashfs /var/log/audit/audit.log | audit2allow -M mypol
- semodule -i mypol.pp
- unsquashfs odex.system.sqsh
Now, remove unused stuff inside squashfs-root folder
mksquashfs squashfs-root/ odex.system-new.sqsh -comp xz -noI -noF -noX -no-fragments -no-duplicates
---
In TWRP -adb shell:
cd /system
touch dummy
chcon --reference=system.odex.sqsh dummy
rm system.odex.sqsh
# Copy from pc with
adb put odex.system-new.sqh /system/
Back in adb shell:
mv odex.system-new.sqh odex.system.sqh
chcon --reference=dummy system.odex.sqsh
---
The cleanaup in squashfs-root depends on you debloating. I have build my delete script on file lists from /system before and after removing unwanted apps. ( diff before/after | grep '\.odex$')
As a final step, i shrinked my system partion to 1.5 GB ( from original 2.5) and increased /data to 5.1 GB.
Very cool and great job! Maybe try making a step by step tutorial during your free time? Could benefit us all
partitions in DiskInfo
See layout of /data and /system partitions on my phone
klarseher said:
See layout of /data and /system partitions on my phone
Click to expand...
Click to collapse
Very cool and great job!
Please making a step by step tutorial for all !!! Thanks !
manhquyet90 said:
Very cool and great job!
Please making a step by step tutorial for all !!! Thanks !
Click to expand...
Click to collapse
Thanks !
Boot phone into TWRP
1. create a backup of your system partition with TWRP
2. "adb shell" to your phone (still booted in TWRP) and create a filelist from system partion on your SD card ( "mount /system ; find /system -type f > /external_sd/system_filelist.lst" - unsure about path to your SD-card )
( we need filelist later for odex "cleanup" )
3. "debloat" your system partition - there are some threads in this forum about removing stuff from /system - i could not help you with this task !
Boot phone into TWRP
4. "adb shell" to your phone. Come back with the output of "mount /system ; df -k /system" and "sgdisk --print /dev/block/mmcblk0"
( I will calculate the new first sector for the system partition depending on your free space )
Then, we do the next step together !
Kind regards
klarseher said:
Thanks !
Boot phone into TWRP
1. create a backup of your system partition with TWRP
2. "adb shell" to your phone (still booted in TWRP) and create a filelist from system partion on your SD card ( "mount /system ; find /system -type f > /external_sd/system_filelist.lst" - unsure about path to your SD-card )
( we need filelist later for odex "cleanup" )
3. "debloat" your system partition - there are some threads in this forum about removing stuff from /system - i could not help you with this task !
Boot phone into TWRP
4. "adb shell" to your phone. Come back with the output of "mount /system ; df -k /system" and "sgdisk --print /dev/block/mmcblk0"
( I will calculate the new first sector for the system partition depending on your free space )
Then, we do the next step together !
Kind regards
Click to expand...
Click to collapse
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\MQ>adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
YT911B19A1 recovery
C:\Users\MQ>adb shell
~ # ←[6nmount /system
~ # ←[6nfind /system -type f > /external_sd/system_filelist.lst
~ # ←[6nmount /system
mount: mounting /dev/block/mmcblk0p30 on /system failed: Device or resource busy
~ # ←[6ndf -k /system
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/mmcblk0p30
2531076 2448068 66624 97% /system
~ # ←[6nsgdisk --print /dev/block/mmcblk0
CANNOT LINK EXECUTABLE: cannot locate symbol "__register_atfork" referenced by "
sgdisk"...
page record for 0x7f91ab0010 was not found (block_size=64)
~ # ←[6n

How to create a Swap partition of any size for any Android ROM

No need to follow this instructions, but only if you want to learn!
Flash files are available here that will automatically do all this in TWRP Recovery.
https://forum.xda-developers.com/hp-touchpad/general/hp-touchpad-optimize-android-swap-t3901773
Before making this modifications, do this first:​
https://forum.xda-developers.com/hp-touchpad/general/how-to-backup-restore-using-twrp-copy-t3892047​
How to create a Swap partition of any size for any Android ROM
This is only need it to be create one time only and will work with any OS install in the Tablet( Any Android ROM, Any Linux OS, LunesOS, WebOS, Sailfish and many more ).
The following steps will partition the storage to create a swap partition that can be use for all Android ROM ever created for the HP Touchpad.
Also take a look at this link:
https://forum.xda-developers.com/hp-touchpad/general/powerful-feature-hp-touchpad-lvm-t3889068
Code:
[B]For the Experience User this are the simple steps, to get it out of the way and not need to read all the details. [/B]
If you know what you are doing, you can use it inside Android, TWRP using adb shell with root access is up to you.
Have unallocated space after creating all partitions.
(make a partition of whatever free space is available ) or you can specified the size you want, you know how to do it or
read above link)
./lvm.static lvcreate -l 100%FREE -C y -M y --major 254 --minor 0 -n /dev/store/swap
mkswap /dev/store/swap
Add to the fstab in Ramdisk:
/dev/store/swap swap swap defaults swapprio=1, 0 0
This steps are for the learning user, hopefully I am explaining it clearly and correctly!
My comments and Suggestion
Code:
I am making the steps as simple as I can. You can achieve this faster if you have done this before.
Basically is creating all the partitions but have 824MB unallocated free space for swap.
You can assign any size you want.
I recommend the following:
Media at least 1GB, this will be the USB Storage. This partition is the best to shrink if you ever need more space on other partitions.
cm-cache 200MB. If you want to use more you can, but I have not found any issues using 200MB.
cm-system 2048MB. If you ever want to install the FULL google open apps, it will take over 1.5GB. This will ensure, you can install anything and not have an issue.
cm-data (as much as you need to only have unallocated free space for swap )
A size of 500MB will be enough ( WebOS has a swap file size of 400 MB )
The maximum I will recommend is 1GB, but you can make it any size you want. Is all up to what you use your tablet for.
Starting all fresh, from zero. All Data will be erase. Back up your data before proceeding.
THE BEGINNING of the process.
1. Load the ToolBox v42 2015-01-08
2. Complete Data Reset ( If you want to clear all partitions )
3. Resize Android Volumes (Using the ToolBox)
3.A Select Media ( select -1024 ) press home button 28 times
New size 1112
unallocated 28672
Select BACK (on top)
3.B Select cm-cache (select +8 ) press home button 25 times
New size 200
unallocated 28472
Select BACK (on top)
3.C Select cm-system (select +1024) press home button 2 times
New size 2048
unallocated 26424
Select BACK (on top)
3.D Select cm-data (select +1024) press home button 25 times
New size 25600
unallocated 824
Select Back (on top)
4. Select Apply Changes
5. Select Reboot
<<< moboot 0.3.8 >>>
6. Select boot webOS Recovery (connect the TP to computer)
7. Unzip FLINTMAN-TWRP-touch-data_media-SELINUX-f2fs-3.1.0-0-5-09-17.zip
8. Open a terminal in the directory of the unzip file.
9. Copy and paste the following in terminal.
Code:
novacom boot mem:// <uImage.TWRP
At this point The ToolBox already created all the partitions or volumes, but the unallocated space left is the one that we need to manually create
and format as a native Linux partition. This is why we need to use TWRP Recovery and to enter two lines of code, create the partition and format it.!
<<< TWRP >>>
10. Select Mount --->> check BOOT --->> select back (triangle lower left)
11. Entering adb shell :In the open Terminal paste the following
adb shell
Code:
cd /boot/usr/sbin
./lvm.static vgchange -ay
Result: /boot/usr/sbin # ./lvm.static vgchange -ay
4 logical volume(s) in volume group "store" now active
Code:
./lvm.static lvcreate -l 100%FREE -C y -M y --major 254 --minor 0 -n /dev/store/swap
Result: /boot/usr/sbin # ./lvm.static lvcreate -l 100%FREE -C y -M y --major 254 --minor
0 -n /dev/store/swap
ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: mlock failed: Cannot allocate memory
ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: munlock failed: Cannot allocate memory
Logical volume "swap" created
Code:
mkswap /dev/store/swap
Result: /boot/usr/sbin # mkswap /dev/store/swap
Setting up swapspace version 1, size = 864022528 bytes
Code:
./lvm.static vgchange -ay
Result: /boot/usr/sbin # ./lvm.static vgchange -ay
5 logical volume(s) in volume group "store" now active
<<<-- All Done Swap partition created -->>>
12. Copy FLINTMAN-TWRP-touch-data_media-SELINUX-f2fs-3.1.0-0-5-09-17.zip file in the Micro SDCard showing on your Computer.
13. Select Install --->> Up one level --->> external_sd ( the TWRP.zip file should be there ) Install it, Reboot System.
14. TWRP is on the moboot menu. Now you can install any ROM.
But Files in the Ramdisk needs to be modified for Android to mount the swap partition at boot.
I have done all this already, you can use the boot uImages that I posted below for Dirty Unicorns and Evervolv. If you feel like doing it yourself then keep having fun!
15. To modify the Ramdisk, click on this link:
https://forum.xda-developers.com/hp-touchpad/development/make-root-permanet-read-write-to-t3846567
16. The following needs to be added to fstab.tenderloing
/dev/store/swap swap swap defaults swapprio=1, 0 0
The zRAM needs to be disable, by placing # in front of the mount point.
# /dev/block/zram0
The fun has just started and now Android will see the swap partition and start swapping, but changes need to be made on more files in the ramdisk to optimize Android to work on a Tablet with swapping and not be use as a smartphone with zRAM and limited resources like it has been use from all this years.
The system is not optimized and it will not work properly with current settings. I have created modified boot images for the Evervol 7.1.2 and Dirty Unicorns V12.5.3 with all the best optimization possible to use the Touchpad as a tablet and not a smartphone. The links are below, just copy the files into your boot directory.
Before you boot using the new image, disable any optimization apps or changes that you have done because it will override any settings done after boot is completed and make the system very slow.
Dirty Unicorns:
https://forum.xda-developers.com/hp...ty-unicorns-v12-5-3-20181116-0140-rc-t3894042
Everlvolv:
https://forum.xda-developers.com/hp...rvol-7-1-2-skz-kernel-swap-partition-t3892091
Attention: This is extremely easy to deploy by all developers creating any ROM or Kernel for the TP. The regular user does not need to do none of this.
The only thing the user needs to do is left some space available when creating the Android partitions using the ToolBox, which everyone needs to do.
Is up to the user to select how much space they want for their Swap partition.
Then the developer that provides the ROM or Kernel can create an script to run after installation that will create the partition from whatever free space is available and format it. No input is need it by the user to do so. And if the partition is already created, nothing will happen, LVM is smart enough to not recreated.
./lvm.static lvcreate -l 100%FREE -C y -M y --major 254 --minor 0 -n /dev/store/swap
mkswap /dev/store/swap
HP_TOUCHPAD said:
Before making this modifications, do this first:​https://forum.xda-developers.com/hp-touchpad/general/how-to-backup-restore-using-twrp-copy-t3892047​
How to create a Swap partition of any size for any Android ROM
The following steps will partition the storage to create a swap partition that can be use for all Android ROM ever created for the HP Touchpad.
Also take a look at this link:
https://forum.xda-developers.com/hp-touchpad/general/powerful-feature-hp-touchpad-lvm-t3889068
For the Expert is as simple as:
Have unallocated space.
(make a partition of whatever free space is avalaible ) or it can be specified.
Code:
./lvm.static lvcreate -l 100%FREE -C y -M y --major 254 --minor 0 -n /dev/store/swap
Format
Code:
mkswap /dev/store/swap
Where? adb shell? That's where I'm doing it, and I get "unable to create new logical volume with no extents"
Add to the fstab in Ramdisk:
/dev/store/swap swap swap defaults swapprio=1, 0 0
Optimize Swapping settings.
I am making the steps as simple as I can. You can achieve this faster if you have done this before.
Basically is creating all the partitions but have 824MB unallocated free space for swap.
You can assign any size you want.
I recommend the following:
Media at least 1GB, this will be the USB Storage. This partition is the best to shrink if you ever need more space on other partitions.
cm-cache 200MB. If you want to use more you can, but I have not found any issues using 200MB.
cm-system 2048MB. If you ever want to install the FULL google open apps, it will take over 1.5GB. This will ensure, you can install anything and not have an issue.
cm-data (as much as you need to only have unallocated free space for swap )
A size of 500MB will be enough ( WebOS has a swap file size of 400 MB )
The maximum I will recommend is 1GB, but you can make it any size you want. Is all up to what you use your tablet for.
Starting all fresh, from zero. All Data will be erase. Back up your data before proceeding.
Is this where we're supposed to start. Is all the rest above this just commentary?
1. Load the ToolBox v42 2015-01-08
2. Complete Data Reset ( If you want to clear all partitions )
3. Resize Android Volumes (Using the ToolBox)
3.A Select Media ( select -1024 ) press home button 28 times
New size 1112
unallocated 28672
Select BACK (on top)
3.B Select cm-cache (select +8 ) press home button 25 times
New size 200
unallocated 28472
Select BACK (on top)
3.C Select cm-system (select +1024) press home button 2 times
New size 2048
unallocated 26424
Select BACK (on top)
3.D Select cm-data (select +1024) press home button 25 times
New size 25600
unallocated 824
Select Back (on top)
4. Select Apply Changes
5. Select Reboot
<<< moboot 0.3.8 >>>
6. Select boot webOS Recovery (connect the TP to computer)
7. Unzip FLINTMAN-TWRP-touch-data_media-SELINUX-f2fs-3.1.0-0-5-09-17.zip
8. Open a terminal in the directory of the unzip file.
9. Copy and paste the following in terminal.
Code:
novacom boot mem:// <uImage.TWRP
<<< TWRP >>>
10. Select Mount --->> check BOOT --->> select back (triangle lower left)
11. Entering adb shell :In the open Terminal paste the following
Is this actually the place where the lvm volumes are created after we go through TPTB and reinstall TWRP?
adb shell
Code:
cd /boot/usr/sbin
./lvm.static vgchange -ay
Result: /boot/usr/sbin # ./lvm.static vgchange -ay
4 logical volume(s) in volume group "store" now active
Code:
./lvm.static lvcreate -l 100%FREE -C y -M y --major 254 --minor 0 -n /dev/store/swap
Result: /boot/usr/sbin # ./lvm.static lvcreate -l 100%FREE -C y -M y --major 254 --minor
0 -n /dev/store/swap
ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: mlock failed: Cannot allocate memory
ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]: munlock failed: Cannot allocate memory
Logical volume "swap" created
Code:
mkswap /dev/store/swap
Result: /boot/usr/sbin # mkswap /dev/store/swap
Setting up swapspace version 1, size = 864022528 bytes
Code:
./lvm.static vgchange -ay
Result: /boot/usr/sbin # ./lvm.static vgchange -ay
5 logical volume(s) in volume group "store" now active
<<<-- All Done Swap partition created -->>>
12. Copy FLINTMAN-TWRP-touch-data_media-SELINUX-f2fs-3.1.0-0-5-09-17.zip file in the Micro SDCard showing on your Computer.
13. Select Install --->> Up one level --->> external_sd ( the TWRP.zip file should be there ) Install it, Reboot System.
14. TWRP is on the moboot menu. Now you can install any ROM.
But Files in the Ramdisk needs to be modified for Android to mount the swap partition at boot.
15. To modify the Ramdisk, click on this link:
https://forum.xda-developers.com/hp-touchpad/development/make-root-permanet-read-write-to-t3846567
16. The following needs to be added to fstab.tenderloing
/dev/store/swap swap swap defaults swapprio=1, 0 0
The zRAM needs to be disable, by placing # in front of the mount point.
# /dev/block/zram0
The fun has just started and now Android will see the swap partition and start swapping, but changes need to be made on more files in the ramdisk to optimize Android to work on a Tablet with swapping and not be use as a smartphone with zRAM and limited resources like it has been use from all this years.
The system is not optimized and it will not work properly with current settings. I have created modified boot images for the Evervol 7.1.2 and Dirty Unicorns V12.5.3 with all the best optimization possible to use the Touchap as a tablet and not a smartphone. The links are below, just copy the files into your boot directory.
Before you boot using the new image, disable any optimization apps or changes that you have done because it will override any settings done after boot is completed and make the system very slow.
<<--link will be here --->>
Click to expand...
Click to collapse
This may be clear to you, but it isn't to me. See my comments in red above. How about cleaning this up? Anything you want to add that is extraneous to just getting this done should be in a second post.
I kinda get the feeling you are hoping the ROM builders will add this to their Roms but i don't think we have too many programmers left for the touchpad.
I can't even get this far
8. Open a terminal in the directory of the unzip file. ( on windows? with what?)
9. Copy and paste the following in terminal.
Sorry ...i'm trying though...Thanks for your effort
Touchie Pad said:
I kinda get the feeling you are hoping the ROM builders will add this to their Roms but i don't think we have too many programmers left for the touchpad.
I can't even get this far
8. Open a terminal in the directory of the unzip file. ( on windows? with what?)
9. Copy and paste the following in terminal.
Sorry ...i'm trying though...Thanks for your effort
Click to expand...
Click to collapse
The tablet originally came with a swap partition on webOS, is nothing new.
Do not worry about doing this, I already created a zip file that can be install using TWRP Recovery!
Everything will be done in less than two minutes and everything will be created!
Working on getting the files on here...
my touchpads are in twrp and attached to my computer!
Touchie Pad said:
my touchpads are in twrp and attached to my computer!
Click to expand...
Click to collapse
It will be very quick thing to apply, download the zip file. Flash it and in less than 2 minutes is done!
HP_TOUCHPAD said:
It will be very quick thing to apply, download the zip file. Flash it and in less than 2 minutes is done!
Click to expand...
Click to collapse
I did not see the zip available anywhere. Where is the zip file?
Well I was able to create the swap partition by following your instructions in the terminal of the twrp on the touchpad. When i type in #free it does show a swap file with numbers, so i think i got it right. Did it on a DU Rom and a Lineage build. Never could get your optimized settings to boot though. Or get into the ramdisk yet. I used 3ctoolbox to try to mimic your suggested settings. It does seem to be quite a bit improved...especially when watching videos on youtube etc...I still do come across lag at times, if more than a couple things are running at the same time...and some apps are still tough for it to handle, but every bit helps.
Touchie Pad said:
Well I was able to create the swap partition by following your instructions in the terminal of the twrp on the touchpad. When i type in #free it does show a swap file with numbers, so i think i got it right. Did it on a DU Rom and a Linaro build. Never could get your optimized settings to boot though. Or get into the ramdisk yet. I used 3ctoolbox to try to mimic your suggested settings. It does seem to be quite a bit improved...especially when watching videos on youtube etc...I still do come across lag at times, if more than a couple things are running at the same time...and some apps are still tough for it to handle, but every bit helps.
Click to expand...
Click to collapse
Thanks for trying it out!
Today I will upload all the zip files than can be easily flash using TWRP, it will be extremely simple, just touch and install and it will do a complete fresh install of everything, like a brand new Device!
Also the DU optimized Kernel and Evervolv, just touch and Install.
You will see how fast and stable the HP Touchpad really is!
Here are the Flash files to Install ! Thanks to shumash for the help of providing the script binary and for initiating the idea to make it easy!
https://forum.xda-developers.com/hp-touchpad/general/hp-touchpad-optimize-android-swap-t3901773

Categories

Resources