(script) enabling swap by default - Miscellaneous Android Development

Code:
[SIZE="2"]Hi friends[/SIZE]
[COLOR="Red"]I created this tutorial especially for noobs who would like to enable swap in their mobile
#include
/*
* I am not responsible for bricked devices, dead SD cards or
* thermonuclear war.
* do some research if you have any concerns.
* YOU are choosing to make these modifications.
* yes, i copied this disclaimer from FXP because it is cool and i am lazy!
*/[/COLOR]
INSTRUCTION:
1.extract and copy file swap to etc/init.d IMPORTANT: etc/init.d is outside system dont copy the file swap to system/etc/init.d
for example:
copy swap to ------> etc/init.d
dont copy swap to ------> system/etc/init.d
2.reboot phone reboot takes sometime because of enabling swap
3. to check swap is working open terminal type
PHP:
su
then
PHP:
free
if u want to change the swap size open swap file with text editor and change 20 to something
set permission as read and write for the script which we talking about
[CREDITS]: #karthick_most [email protected]_developers

Good Work
This is surely an appreciable piece of work but I have only one question:
"The kernel should have swap support to enable swap by default. Am I correct?"
:good:

#buzz said:
This is surely an appreciable piece of work but I have only one question:
"The kernel should have swap support to enable swap by default. Am I correct?"
:good:
Click to expand...
Click to collapse
it may or may not

karthick mostwanted said:
Code:
[SIZE="2"]Hi friends[/SIZE]
[COLOR="Red"]I created this tutorial especially for noobs who would like to enable swap in their mobile
#include
/*
* I am not responsible for bricked devices, dead SD cards or
* thermonuclear war.
* do some research if you have any concerns.
* YOU are choosing to make these modifications.
* yes, i copied this disclaimer from FXP because it is cool and i am lazy!
*/[/COLOR]
INSTRUCTION:
1.extract and copy file swap to etc/init.d IMPORTANT: etc/init.d is outside system dont copy the file swap to system/etc/init.d
for example:
copy swap to ------> etc/init.d
dont copy swap to ------> system/etc/init.d
2.reboot phone reboot takes sometime because of enabling swap
3. to check swap is working open terminal type
PHP:
su
then
PHP:
free
if u want to change the swap size open swap file with text editor and change 20 to something
[CREDITS]: #karthick_most [email protected]_developers
Click to expand...
Click to collapse
what will be the default size of that partition?

Vaibhav Chauhan said:
what will be the default size of that partition?
Click to expand...
Click to collapse
what do you mean??

karthick mostwanted said:
what do you mean??
Click to expand...
Click to collapse
you said swap size will be 20 and you can change it
so What can i understand about it
20 mb or another?

Related

[TOOL][CWM-ROM]little Kitchen v0.0.2 - Testers needed

little Kitchen
DOS script to easy modify a ROM File (update.zip) with pre-configurated parameters
Compatibility List / BugTracker in second Post!!
Guide (included "readme.txt") in third post!!
Suggestions and feature requests are welcome!
The Script should work with every CWM-ROM File for every Phone!!
Functions:
Code:
* remove Files from ROM.zip
* add Files to ROM.zip
* add additional update.zip's to ROM.zip
To do:
Code:
[B]* testing[/B]
[B]* adding a LOG file for error analysis[/B]
[B]* spelling - HELP NEEDED[/B]
because I'm not a native english speaker I'm sure there are enough mistakes
[B]* readme file - HELP NEEDED[/B]
readme file is a little bit short ATM
[B]* cleaning up the Code[/B]
Changelog:
Code:
[B]* v0.0.2 - 15.12.2011[/B]
+ changed Version Number
[B]* vCM7_0.0.1 - 15.12.2011[/B]
+ first release
Credits:
Code:
* xda-forums (for Guides, Howtos, etc.)
* google for the things I didn't find here :D
and as always....
!!! USE AT OWN RISK !!!
>> DOWNLOAD LATEST <<
>> DOWNLOAD v0.0.2 <<
>> DOWNLOAD vCM7_0.0.1 <<
Compatibility List / BugTracker
Basicly the Script should work for every ROM on every Windows OS, the following entries are approved by Me and Users
OS:
Windows7 x64
(approved by OGrue)
ROMs:
Samsung Galaxy SII (GT-I9100):
CM7 (stable, nightly) (approved by OGrue)
Turkbey gt edition (testet by grgsiocl, thank you)
MIUI (1.12.16) (approved by OGrue)
readme.txt
Code:
===============================================================================
** QuickStart: **************************************************************
===============================================================================
* open "remove.example" and copy the files you want to remove to "remove.ini"
* copy ROM File to /rom/source
* copy flashable ZIP's to /rom/hacks ("gapps.zip for example")
* copy Files to /rom/addons ("system/app/music.apk" for example)
!! ATTENTION !! take care of Directory-Structure !! ATTENTION !!
* run main.cmd
* Script should finish without errors
* copy modified ROM from "rom/" to Phone and Flash it via CWM
===============================================================================
** Folder Structure: ********************************************************
===============================================================================
*/bin Holds the Files needed by the Script
/tmp Temporary Folder for Script
*/roms Folder with Source ROM, Addons and Hacks; modified ROM File
is also placed here
/source Folder for ROM Source (place CMxxx.zip / update.zip here)
/addons Folder for Files which should be added to the ROM ZIP
(files are added to the root of the ZIP, so in almost all
cases you'll nedd at least a "system" Folder)
/hacks Folder for Additional, flashable ZIP files
(for example you can add the flashable google
Apps ZIP in here)
u mean any rom for any phone or just for sgs2. i have a galaxy fascinate i500 i could test for
RTLflat said:
u mean any rom for any phone or just for sgs2. i have a galaxy fascinate i500 i could test for
Click to expand...
Click to collapse
Yes, should work with any CWM ROM for any Phone.
Would be great If you could Test it ;-)
Thanks and this is what i was looking at. I am fed up for removing the apps, whichever i dont want to use and add those apps which i want to use. Started testing but the screen stuck at adding ROM*****name.zip. Waiting to finish!
grgsiocl said:
Thanks and this is what i was looking at. I am fed up for removing the apps, whichever i dont want to use and add those apps which i want to use.
Click to expand...
Click to collapse
Hehe, that's the reason why I created it ;-)
grgsiocl said:
Started testing but the screen stuck at adding ROM*****name.zip. Waiting to finish!
Click to expand...
Click to collapse
Hmmm, shouldn't take too long if the ZIP isn't big.
If it remains stuck, pls add "ECHO ON" after line 163 in main.cmd, so you'll see exactly what the Script is doing.
Code:
cls
ECHO *******************************************************************************
ECHO * adding HACKS to ROM File
ECHO *******************************************************************************
ECHO ON
OGrue said:
Hehe, that's the reason why I created it ;-)
Hmmm, shouldn't take too long if the ZIP isn't big.
If it remains stuck, pls add "ECHO ON" after line 163 in main.cmd, so you'll see exactly what the Script is doing.
Code:
cls
ECHO *******************************************************************************
ECHO * adding HACKS to ROM File
ECHO *******************************************************************************
ECHO ON
Click to expand...
Click to collapse
Thanks my friend and it works. I added some and deleted some and then flashed. I works like a charm! Thanks once again!
grgsiocl said:
Thanks my friend and it works. I added some and deleted some and then flashed. I works like a charm! Thanks once again!
Click to expand...
Click to collapse
Good to know - pls - Post which ROM and which Phone, so I cann add to "testet - it works!" ;-)
ogrue said:
good to know - pls - post which rom and which phone, so i cann add to "testet - it works!" ;-)
Click to expand...
Click to collapse
phone: Samsung galaxy sii
rom: Turkbey gt edition
kernel : Phenomenal
version: Android 2.3.6
modem: Xxkp1

[GUIDE]extract kernel and change bootclasspath[noob friendly][video guide]

Kernel modification GUide​
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
it is a guide for those who want to port roms from devices of another manufactures.....
they port whole rom but sometimes stuck at kernel modification path....
so now guys u dont have to worry becoz i made a guide easy to understand and
also made a video guide which is uploading at a moment
Click to expand...
Click to collapse
SO LEt get STARted​
Things required:-
kitchen files
cygwin
notepad++ (recommned)
a brain:good:
some time
Click to expand...
Click to collapse
Steps​
1. Set up cygwin and kitchen USe Nero young's guide -->>>Guide
2. u need to make 2 folders on ur desktop
(a)base kernel(YOur device kernel)-->> copy ur whole rom files(meta-inf,system,boot-.img) in that folder..
(b)port kernel (Kernel from other device)--->> boot.img of other device....
3.now open cygwin and type :- cd kitchen then ./menu
4. it will now open kitchen
5. now go to c:/cygwin/home/{USER NAME}/kitchen/original update/WORKING_XperiaNeroROM/ copy all things here from base kernel folder..
6. now open kitchen (REMEMBER NEVER CLOSE KITCHEN UNTILL WRITTEN HERE)
7. press 1 and it will set up current working folder press enter whole the way
8. now when your working folder is set up press 0 to go to advance options
9. press 20 to open kernel modification menu...
10. press 'w' it will extract ur kernel to c:/cygwin/home/{USER NAME}/kitchen/Boot-Extracted
11. now for extracting other device boot.img press 'a' on kitchen. it will ask u to place ur boot.img to c:/cygwin/home/{USER NAME}/kitchen/boot-img.xxxxx
12.now for changing bootclasspath.. open boot-img.xxx go to boot-img ramdisk and open init.rc with notepad++
13. copy the whole line 'export bootclasspath x/x/x/'
14. now go to boot-extracted folder find init.rc and replace the boot class path
15. save init.rc of boot-extracted
16. press 'b' on kitchen menu
17. close ur kitchen now
18. your new modified kernel will be in your working folder
​press thanks if i helped you​
Video Guide

[GUIDE]extract kernel and change bootclasspath[noob friendly][video guide]

Kernel modification GUide​
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
it is a guide for those who want to port roms from devices of another manufactures.....
they port whole rom but sometimes stuck at kernel modification path....
so now guys u dont have to worry becoz i made a guide easy to understand and
also made a video guide which is uploading at a moment
Click to expand...
Click to collapse
SO LEt get STARted​
Things required:-
kitchen files
cygwin
notepad++ (recommned)
a brain:good:
some time
Click to expand...
Click to collapse
Steps​
1. Set up cygwin and kitchen USe Nero young's guide -->>>Guide
2. u need to make 2 folders on ur desktop
(a)base kernel(YOur device kernel)-->> copy ur whole rom files(meta-inf,system,boot-.img) in that folder..
(b)port kernel (Kernel from other device)--->> boot.img of other device....
3.now open cygwin and type :- cd kitchen then ./menu
4. it will now open kitchen
5. now go to c:/cygwin/home/{USER NAME}/kitchen/original update/WORKING_XperiaNeroROM/ copy all things here from base kernel folder..
6. now open kitchen (REMEMBER NEVER CLOSE KITCHEN UNTILL WRITTEN HERE)
7. press 1 and it will set up current working folder press enter whole the way
8. now when your working folder is set up press 0 to go to advance options
9. press 20 to open kernel modification menu...
10. press 'w' it will extract ur kernel to c:/cygwin/home/{USER NAME}/kitchen/Boot-Extracted
11. now for extracting other device boot.img press 'a' on kitchen. it will ask u to place ur boot.img to c:/cygwin/home/{USER NAME}/kitchen/boot-img.xxxxx
12.now for changing bootclasspath.. open boot-img.xxx go to boot-img ramdisk and open init.rc with notepad++
13. copy the whole line 'export bootclasspath x/x/x/'
14. now go to boot-extracted folder find init.rc and replace the boot class path
15. save init.rc of boot-extracted
16. press 'b' on kitchen menu
17. close ur kitchen now
18. your new modified kernel will be in your working folder
​Video Guide
press thanks if i helped you​
Akshay Anand said:
Kernel modification GUide​
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
​SO LEt get STARted​
Steps​
1. Set up cygwin and kitchen USe Nero young's guide -->>>Guide
2. u need to make 2 folders on ur desktop
(a)base kernel(YOur device kernel)-->> copy ur whole rom files(meta-inf,system,boot-.img) in that folder..
(b)port kernel (Kernel from other device)--->> boot.img of other device....
3.now open cygwin and type :- cd kitchen then ./menu
4. it will now open kitchen
5. now go to c:/cygwin/home/{USER NAME}/kitchen/original update/WORKING_XperiaNeroROM/ copy all things here from base kernel folder..
6. now open kitchen (REMEMBER NEVER CLOSE KITCHEN UNTILL WRITTEN HERE)
7. press 1 and it will set up current working folder press enter whole the way
8. now when your working folder is set up press 0 to go to advance options
9. press 20 to open kernel modification menu...
10. press 'w' it will extract ur kernel to c:/cygwin/home/{USER NAME}/kitchen/Boot-Extracted
11. now for extracting other device boot.img press 'a' on kitchen. it will ask u to place ur boot.img to c:/cygwin/home/{USER NAME}/kitchen/boot-img.xxxxx
12.now for changing bootclasspath.. open boot-img.xxx go to boot-img ramdisk and open init.rc with notepad++
13. copy the whole line 'export bootclasspath x/x/x/'
14. now go to boot-extracted folder find init.rc and replace the boot class path
15. save init.rc of boot-extracted
16. press 'b' on kitchen menu
17. close ur kitchen now
18. your new modified kernel will be in your working folder
​Video Guide
press thanks if i helped you​
Click to expand...
Click to collapse
I can't see export bootclasspath in init.rc
It is can't be replacable in 4.4.2? :|
FantasticalX said:
I can't see export bootclasspath in init.rc
It is can't be replacable in 4.4.2? :|
Click to expand...
Click to collapse
It's there dude. Just did it the other day.
Sent from my SPH-L710 using XDA Premium 4 mobile app
shakim24 said:
It's there dude. Just did it the other day.
Sent from my SPH-L710 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Got it
Hope it helped u
Sent from my WT19i using XDA Free mobile app
Akshay Anand said:
Hope it helped u
Sent from my WT19i using XDA Free mobile app
Click to expand...
Click to collapse
Yeah this thread helped out a lot. Is there a way to unpack the zImage
Sent from my SPH-L710 using XDA Premium 4 mobile app
@Akshay Anand i am trying your method on my mtk device...i successfully decompiled boot.img to boot-extracted folder
but while recompiling i get this error...
error: mkbootfs not successfully compiled
Does this actually mean kernel porting? Can I just port a kernel with tons of features to my device?Thanks man, just feeling curious~~
Thanks, that was helpful
thnkas
Thanks
Beautifully written guide. One of the best I have come across. I have pressed the button, but thanks still.
I ectract my boot.img and change bootclasspath well but when i use this boot.img for my port rom and it not booting. it bootloop in lg logo but when i used orginal boot.img it bootloop in bootanimation. what i should do now? Plz help
hi
i have no bootclasspath lines in my init.rc file. does this method refer to android <4.x only? i'm trying to port a 5.1 kernel
Please help me.. My system always delete any init.rc files created by kitchen.... 1st time I extract kernel in kitchen I saw the init.rc but emidiately I opened it with note pad++ I got a promt for my toolbar but didn't check... Now kitchen is unable to create init.rc files help on how to fix this
can't find ''export bootclasspath.....'' line in init.rc for samsung kernel ...!
pls i need help !!

[RECOVERY][PORT] PhilzTouch for Samsung Galaxy S2 Plus F2FS

OK mates
I am glad to announce the port of PhilzTouch for our S2vep and s2ve that i will release soon, so why i should have a recovery that's not working as 100%?
by the way here some info to know:
Code:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PhilZ Touch 6 Recovery for Samsung S2 Plus Family
CWM Advanced Edition 6.58.7
Based on ClockworkMod v6.0.5.1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Before to install:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Click to expand...
Click to collapse
Code:
Downloads for S2vep
6v.58.7, click here to download the recovery.img file with F2FS support.
v6.58.7, clickhere to download the archive.
Code:
Downloads for S2ve
v6.58.7, click here to download the recovery.img file with F2FS support.
v6.58.7, click here to download the archive.
Code:
Some Features of PhilzTouch:
Support Dalvik/ART wiping.
Android L buttons.
You can mount sdcar1.
You can mount USB storage.
You can clone rom to update.zip.
And also you can delete, restore or make backup to sdcard0 and sdcard1.
And many more that you can explore by your self.
Code:
Installation Guide:
Make sure your device is rooted.
Download Rashr Flash Tool from Google Play.
Download and extract the recovery.img then copy to sdcard.
Run Rashr Flash Tool and allow root permissions.
Choose Recovery from the main menu.
Click on Other from Storage.
If you have copy the recovery.img file into the root of sdcard just scroll it down and you will see it.
Confirm the action by choosing Yes.
Selece Yes Please to reboot into recovery automatically , enjoy .
Code:
[COLOR="Red"]Important Notice[/COLOR]
Don't flash the archive it's not a flashable one, install it using Flash Tool and follow installation guide
I am not responsible for any bricked device cause by the recovery, so do it at your own risk.
Follow me on GitHub
Now community is stronger with this one mate!
Thanks, cheers!
great work man wanting more from you
Awesome does this one already F2FS support??
OrdinaryNoob
Not yet but I will add
Sent from my GT-I9105P using XDA Free mobile app
Yupp..congrats & i'll wait the f2fs support version..anyway thank you
OrdinaryNoob
SH1M4BD3 said:
Yupp..congrats & i'll wait the f2fs support version..anyway thank you
OrdinaryNoob
Click to expand...
Click to collapse
/deleted
cicibanko101 said:
/deleted
Click to expand...
Click to collapse
Deleted what? by the way i am compiling with F2FS support i think will finished then i will upload into mediafire
haky 86 said:
Deleted what? by the way i am compiling with F2FS support i think will finished then i will upload into mediafire
Click to expand...
Click to collapse
Quote for Shimbade (User above).
Well we are waiting
perfect we have F2FS supprt I will upload to mediafire then compiling one for s2ve
Awrsome that was lightning faaaaast
OrdinaryNoob
Confirmed works perfectly...
OrdinaryNoob
SH1M4BD3 said:
Confirmed works perfectly...
OrdinaryNoob
Click to expand...
Click to collapse
I am glad to hear that
I have some problems to boot th new Ubuntu 14.10, i think is really a suck os, slow and bad so I will continue the modding with other distro like openSUSE or other based debian ..
Elementary,linuxmint recomended ..lighter,fast
OrdinaryNoob
SH1M4BD3 said:
Elementary,linuxmint recomended ..lighter,fast
OrdinaryNoob
Click to expand...
Click to collapse
Are there any way to port Ubuntu native to s2vep from source, thanx
PhilZ Touch is no longer being update by the main dev right?
Can I also use TWRP Manager to install this recovery?
allard1997 said:
PhilZ Touch is no longer being update by the main dev right?
Can I also use TWRP Manager to install this recovery?
Click to expand...
Click to collapse
No, its only for TWRP. U must use rashr flashtool
Well i don't know if main dev has stop the works on it, by the way, i have to confirm, my battery got 3 days without charging since when have wipe dalvik/ART feature work, tested on LiquidSmooth custom rom, so why not .
haky 86 said:
Well i don't know if main dev has stop the works on it, by the way, i have to confirm, my battery got 3 days without charging since when have wipe dalvik/ART feature work, tested on LiquidSmooth custom rom, so why not .
Click to expand...
Click to collapse
Look: http://forum.xda-developers.com/showthread.php?t=2201860
allard1997 said:
Look: http://forum.xda-developers.com/showthread.php?t=2201860
Click to expand...
Click to collapse
hmm ok mate

[DEPRECATED][Guide]Remove 'Device is HD Capable' Notification[athene][ims][VoLTE]

Remove 'Device is HD Capable' Notification on Custom ROMs
THIS GUIDE IS NOW NO LONGER REQUIRED. CHECK post #5
Code:
#include
using xdarules std;
/*
* Your warranty was void as soon as you unlocked your phone.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
DOWNLOADS:
https://www.androidfilehost.com/?fid=673368273298971295
PROCEDURE:
WARNING:
DO NOT INSTALL THE APK PROVIDED. SOME PEOPLE REPORTED MISSING BASEBAND AND IMEI.
MAKE A BACKUP OF YOUR PHONE BEFORE YOU PROCEED. DON'T BLAME ME IF ANYTHING GOES WRONG, YO :/
1. Use any File Manager which can do root tasks and go to this location :
Code:
/vendor/app/ims/
and rename the current/original ims.apk to ims.apk.bak or just move the original ims.apk to a different directory, for example, your sd card.
2. Paste the new ims.apk in this location ( /vendor/app/ims/ ) and make sure it has -rw -r -r permissions (0644).
3. Reboot.
Hopefully, now you might have got rid of that annoying notification, yo.
I can't download the file it says: Oops! Sorry, you do not have permission to access this page. Any other working link?
No Permission
Give another link to that file.
Sonanshu said:
I can't download the file it says: Oops! Sorry, you do not have permission to access this page. Any other working link?
Click to expand...
Click to collapse
faizynadim said:
Give another link to that file.
Click to expand...
Click to collapse
Download here:
https://www.androidfilehost.com/?fid=673368273298971295
Link updated in OP. :good:
Update
So guys you'll no longer see the `Device is HD Capable` Notification on any of the custom ROMs for athene as this new commit has been pushed to the muppets git (where all our vendor blobs are stored), so if you don't see the Device is HD Capable Notification, doesn't necessarily mean that VoLTE isn't working on your device.
https://github.com/TheMuppets/propr...mmit/80a8a5d9b05f3b7febd2369ee01cab1100656fa5

Categories

Resources