Related
This will NOT work in CM5.0b4 as JIT has been disabled entirely
It seems like a lot of people are constantly pulling/editing/pushing build.conf in order to turn JIT on and off, so I threw together a short script to toggle it on and off.
It's nothing elaborate, but it gets the job done. This is meant to work with the build.prop that comes stock with cyanogenmod 5.0b2 but will most likely work with other build.props that have JIT.
Steps to run the script:
1) Download jit.txt, rename it jit.sh
2) If you downloaded from your computer, run "adb push jit.sh /sdcard" or mount your device and copy to your sdcard.
3) In terminal on Nexus One:
$ su
# sh /sdcard/jit.sh
JIT toggled ON
JIT enabled upon reboot
#
You can also set it up in GScript or GScript Lite so you can add an icon on your homescreen to toggle JIT more easily:
1) From command line: mv /sdcard/jit.sh /sdcard/gscript/jit.sh
2) Open GScript
3) Go to Menu->Add Script
4) Go to "Load file"
5) Select jit.sh
Then to make an icon on your homescreen:
1) Long press homescreen
2) Select Shortcuts
3) Select GScript(Lite)
4) Select jit
You must reboot for the changes to take effect after running the script. If you prefer, simply put "reboot" (without quotes) on it's own line at the end of the script and it will reboot automatically. Only do this after you have confirmed that the script works for you.
If you are using Windows, make sure you use the attached jit.txt rather than copying the code from this post. Copying/pasting the code will not work because of Windows CR/LF line breaks.
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
if grep -q fast /system/build.prop ; then
sed -i s/=int:fast/=int:jit/ /system/build.prop
echo "JIT toggled ON"
echo "JIT enabled upon reboot"
else
sed -i s/=int:jit/=int:fast/ /system/build.prop
echo "JIT toggled OFF"
echo "JIT disabled upon reboot"
fi
exit
mhaedo said:
It seems like a lot of people are constantly pulling/editing/pushing build.conf in order to turn JIT on and off, so I threw together a short script to toggle it on and off.
It's nothing elaborate, but it gets the job done. This is meant to work with the build.prop that comes stock with cyanogenmod 5.0b2.
Simply push the script to your phone (sdcard, or wherever you please) and run it. For example, put the quoted text into a file called jit.sh, push it to the root of your sdcard, and run "sh /sdcard/jit.sh" from a terminal. You can also set it up in GScript or GScript Lite so you can add an icon on your homescreen to toggle JIT more easily.
You must reboot for the changes to take effect.
Click to expand...
Click to collapse
Nice - been looking for just this, thanks. As a bit of a n00b, any idea why this doesn't seem to run in GScript Lite? I get the SU request OK, but then nothing - don't see the echo'd text at all, nowt. Running CM5b2 .29 kernel.
Ive installed pauls modaco patch wil this turn jlt off? its annoying me
Thanks for this script !
I just pull, nano, and push it back.
I don't think It's 100% stable.
push/pull? Shoot, I just use vi on build.prop from betterterminal. Don't have to mess with adb at all
Since you need to reboot anyway, couldn't we just put "reboot" in place of "exit"? I'm assuming that's not part of the script to save, since you have "fi" at the end of it. Personally, what I did is save 2 versions of build.prop to my sdcard and then built gscripts to swap 'em out. lol A little more crude, but just as effective.
when i try to run the jit.sh file in terminal i get:
failed: no such file or directoryk3 on /system : not found
sdcard/jit.sh : 13: syntax error: end of file unexpected (expecting 'then")
am i completely retarded?
trisl said:
Nice - been looking for just this, thanks. As a bit of a n00b, any idea why this doesn't seem to run in GScript Lite? I get the SU request OK, but then nothing - don't see the echo'd text at all, nowt. Running CM5b2 .29 kernel.
Click to expand...
Click to collapse
Yeah, I had the same problem. Remove the su request from superuser.apk. Then, run any script that requires root. Click remember, and allow. It will not work at this point. Back out to the homescreen with the back button, then go back into GScript Lite and run it again. It should work this time.
Guitarfreak26 said:
Ive installed pauls modaco patch wil this turn jlt off? its annoying me
Click to expand...
Click to collapse
Not sure. I would assume so, never seen the build.prop that's used but I don't see why it would be any different.
Mi|enko said:
Since you need to reboot anyway, couldn't we just put "reboot" in place of "exit"? I'm assuming that's not part of the script to save, since you have "fi" at the end of it. Personally, what I did is save 2 versions of build.prop to my sdcard and then built gscripts to swap 'em out. lol A little more crude, but just as effective.
Click to expand...
Click to collapse
That would be more efficient, but I just enjoy clicking my icon a few times and toggling it on and off Don't ask me why.
[email protected] said:
push/pull? Shoot, I just use vi on build.prop from betterterminal. Don't have to mess with adb at all
Click to expand...
Click to collapse
How would I do that? I have betterterminal emulator pro..
Four Fourty Four said:
How would I do that? I have betterterminal emulator pro..
Click to expand...
Click to collapse
$ su
# vi /system/build.prop
Proceed to edit (man vi, google vi). Bit of a pain in the ass though if you switch back and forth frequently.
mhaedo said:
$ su
# vi /system/build.prop
Proceed to edit (man vi, google vi). Bit of a pain in the ass though if you switch back and forth frequently.
Click to expand...
Click to collapse
Don't forget, you need to remount /system as rw also. it is a tiny bit of a pain, but I don't see much of a reason to switch back and forth all the time. Thus far I have yet to have any problems with JIT.
[email protected] said:
Don't forget, you need to remount /system as rw also. it is a tiny bit of a pain, but I don't see much of a reason to switch back and forth all the time. Thus far I have yet to have any problems with JIT.
Click to expand...
Click to collapse
The only time I consistently have problems with JIT is when tethering. Otherwise, I have yet to have any issues. I tether frequently, hence the script.
BTW, thanks for Apps2SD(2) and OpenOverclocker. They were very helpful to me at one point.
blakestimac said:
when i try to run the jit.sh file in terminal i get:
failed: no such file or directoryk3 on /system : not found
sdcard/jit.sh : 13: syntax error: end of file unexpected (expecting 'then")
am i completely retarded?
Click to expand...
Click to collapse
+1
I'm getting this message also.
blakestimac said:
when i try to run the jit.sh file in terminal i get:
failed: no such file or directoryk3 on /system : not found
sdcard/jit.sh : 13: syntax error: end of file unexpected (expecting 'then")
am i completely retarded?
Click to expand...
Click to collapse
Hm, strange. I can't duplicate this error. The steps I take are as follows:
1) Cut/paste the quoted code in the original post and save it in a document called jit.sh
2) On computer, adb push jit.sh /sdcard
3) In terminal on Nexus One:
$ cd sdcard
$ su
# sh jit.sh
JIT toggled ON
JIT enabled upon reboot
#
I'm sorry I can't be more help, but I'm not sure why you'd see that error.
mhaedo said:
Hm, strange. I can't duplicate this error. The steps I take are as follows:
1) Cut/paste the quoted code in the original post and save it in a document called jit.sh
2) On computer, adb push jit.sh /sdcard
3) In terminal on Nexus One:
$ cd sdcard
$ su
# sh jit.sh
JIT toggled ON
JIT enabled upon reboot
#
I'm sorry I can't be more help, but I'm not sure why you'd see that error.
Click to expand...
Click to collapse
Ok, I didn't do the whole adb push thing, I just copied it to my SDcard root from windows. Is that the problem?
BoostedSR20 said:
Ok, I didn't do the whole adb push thing, I just copied it to my SDcard root from windows. Is that the problem?
Click to expand...
Click to collapse
Ah, it's the line breaks. Windows uses a pair of CR and LF characters to terminate lines. Unix based system use an LF character only.
You can get a utility to convert the line breaks to unix style line breaks. I'm sure it will come in handy. I'll also upload the jit.sh with proper line breaks to the original post.
BoostedSR20 said:
Ok, I didn't do the whole adb push thing, I just copied it to my SDcard root from windows. Is that the problem?
Click to expand...
Click to collapse
Just tried pushing it to the sdcard, that went thru ok.
Still cant get it to run, same error. I've tried your command in the OP, and the what you wrote out a couple posts up. Same error on each one.
mhaedo said:
Ah, it's the line breaks. Windows uses a pair of CR and LF characters to terminate lines. Unix based system use an LF character only.
You can get a utility to convert the line breaks to unix style line breaks. I'm sure it will come in handy. I'll also upload the jit.sh with proper line breaks to the original post.
Click to expand...
Click to collapse
Ahhh, so it had to do with me making the file in the Windows Notepad. Got it..
Is this so i can push files through my phone, without having to do it on the computer? How does this work. Anyone have a link? I did a search and came up with nothing. Just wondering, thanks!
It's the same as a Terminal on a unix/linux box or for that matter, command line on a windows box.
Terminal emulator app will give you command line access to your (rooted) phone. You can then go into SU mode, as well.
Yes, you are correct, it will allow you to do things that an ADB shell would allow, from a computer.
You can download it from the market.
im sure that you might have known this already, but when you are using a terminal emulator, and you get root access (su), you really should follow the directions to the letter. if you make a mistake in the typing, it is possible that you could do some damage.
it is also recommended to not enter in terminal commands unless someone with more experience than you (based off their post number) reports success in completing the wanted task. so essentially, use the terminal at your own risk.
(all this is pulled from my previous post which you can find in my signature - "Terminal/adb shell commands")
Adb commands are completely different than terminal commands.
First enter "su" to get substitute user (the # sign)
Then enter "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system" to make the root r/w
to copy files use "cp" command
to move files use "mv" command
to remove files use "rm" command
to change file/dir permissions use "chmod"
to change directories use "cd" - "cd .." will bring you back one directory - "cd //" brings you back to root
to list files in the dir use "ls"
to read/mod/combine a file use "cat"
to edit a value use "echo"
to see running processes use "top"
to kill a process use "kill -9 PID#HERE"
ex) cp /sdcard/download/myapplication.apk /data/app/myapplication.apk
If you know any linux commands then you should know your way around terminal emulator. If you want i can give you more examples just let me know. Hope this helped
What does "cat" mean?
Oh my bad i didn't see it in there, all the times i lookedO sorry.
where could i get this app?
i couldnt find it on market using keyword "terminal", "terminal emulator" or even "adb terminal emulator"
bla.k.offee said:
where could i get this app?
i couldnt find it on market using keyword "terminal", "terminal emulator" or even "adb terminal emulator"
Click to expand...
Click to collapse
https://market.android.com/details?id=jackpal.androidterm&feature=search_result
Terminal Emulator Hell!!!!
I have wiped and restored more times tonight than I can count....HELP!!!! I have a very lean rom. So lean it that it has no file explorer and I don't want to install gapps. All I want to do is install Titanium Backup (the .apk file is on the root of my SD card) with the terminal emulator and I'll be all set. I have had all different error messages, and I'm more confused now then when I started this adventur, 6+ hours ago. Any help would be great.
hockeyfamily737 said:
I have wiped and restored more times tonight than I can count....HELP!!!! I have a very lean rom. So lean it that it has no file explorer and I don't want to install gapps. All I want to do is install Titanium Backup (the .apk file is on the root of my SD card) with the terminal emulator and I'll be all set. I have had all different error messages, and I'm more confused now then when I started this adventur, 6+ hours ago. Any help would be great.
Click to expand...
Click to collapse
I keep TB on the root of my sdcard named TB.apk. Then I go into terminal emulator (it is in most roms already).
su
cp /sdcard/TB.apk /data/app/TB.apk
Then I back out of TE and TB is installed. Any commands you type in TE are case sensitive. All file names are case sensitive and spaces do not work well. So if your TB apk is "Titanium Backup-1.3.3.apk", I would rename it to something without the spaces like Titanium_Backup-1.3.3.apk.
I rename it TB.apk because who wants to type all of that?
kyouko said:
(all this is pulled from my previous post which you can find in my signature - "Terminal/adb shell commands")
Adb commands are completely different than terminal commands.
First enter "su" to get substitute user (the # sign)
Then enter "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system" to make the root r/w
to copy files use "cp" command
to move files use "mv" command
to remove files use "rm" command
to change file/dir permissions use "chmod"
to change directories use "cd" - "cd .." will bring you back one directory - "cd //" brings you back to root
to list files in the dir use "ls"
to read/mod/combine a file use "cat"
to edit a value use "echo"
to see running processes use "top"
to kill a process use "kill -9 PID#HERE"
ex) cp /sdcard/download/myapplication.apk /data/app/myapplication.apk
If you know any linux commands then you should know your way around terminal emulator. If you want i can give you more examples just let me know. Hope this helped
Click to expand...
Click to collapse
Sent you a pm
#Root/Hack_Mod-Always®
Since I was looking to be able to update my phone, I had to remove the WebtopMod. Since the previous instructions required me to root my phone to remove it, which was counterproductive because it would mean loosing the ability to update anyway. I looked through the WebtopMod installation scripts and came up with this guide to remove it:
View attachment WebtopModRemoveGuideNoRoot.txt
Note: I've attached the guide in a separate file, because the forum is stupid and thinks that exe, bak, odex, apk, and dex are valid TLD's and says I can't post external links. If I ever get "approximately eight" posts I'll put it in this post.
If you don't have the original backup files, look in page 3 of the howto post for removing it with root. (Thanks, MotoAtrixFan for posting it and twoeleven99 for alerting me to this)
Happy Updating!
eliplan312 said:
Since I was looking to be able to update my phone, I had to remove the WebtopMod. Since the previous instructions required me to root my phone to remove it, which was counterproductive because it would mean loosing the ability to update anyway. I looked through the WebtopMod installation scripts and came up with this guide to remove it:
View attachment 556542
Note: I've attached the guide in a separate file, because the forum is stupid and thinks that exe, bak, odex, apk, and dex are valid TLD's and says I can't post external links. If I ever get "approximately eight" posts I'll put it in this post.
If you don't have the original backup files, look in page 3 of the howto post for removing it with root. (Thanks, MotoAtrixFan for posting it and twoeleven99 for alerting me to this)
Happy Updating!
Click to expand...
Click to collapse
you can update even if you are rooted you cant update only when you modify the /system or some apps
went step by step through your guide and I still cannot update - the apply_patch_check still fails at DockProvider.apk - aside from reflashing the stock SBF, what do you recommend?
Try this
Try setting the phone to usb mass storage mode and replacing the files in the WebtopModBackup folder on the sd/media area with these: View attachment WebtopModBackup.zip
The files in the archive worked for me, not sure why it wouldn't work. If those don't work for you, please post the console log.
eliplan312 said:
Try setting the phone to usb mass storage mode and replacing the files in the WebtopModBackup folder on the sd/media area with these: View attachment 556596
The files in the archive worked for me, not sure why it wouldn't work. If those don't work for you, please post the console log.
Click to expand...
Click to collapse
Thanks, but something appears to be totally screwed up on my DockProvider and DockService applications on Titanium Backup - they are listed at the bottom with grey slashes through them. The crazy part is.... it works with the webtop hack, but the update doesn't see the correct files, so something is obviously messed up.
Now, by putting the files from the WebtopModBackup on the phone, shouldn't that fix the issue? Then perform the steps in your text doc? I can't believe I'll have to SBF stock in order to fix the stupid DockProvider and DockService!!
What I meant was, replace the files in the WebtopModBackup folder with the stuff in the archive, then re-do the instruction in the text file.
I'm sorry but your instructions aren't working for me. I've followed your instructions very carefully but when I get to the command
cd /mnt/sdcard/WebtopModBackup
I get a directory not found error.
I can change to /mnt/sdcard but when I type 'ls' nothing appears. The directory is empty.
What am I doing wrong?
One thing I've noticed is that when I enter the 'adb.exe shell ./data/local/tmp/psneuter' command, the phone appears to dismount and remount and then when I go into the shell the '/mnt/sdcard' directory is empty.
Yeah I'm also having that problem....I'm trying to push the backup files into the correct folder. However, when I get a read-only error, so from what I read I'm supposed to reboot into recovery mode. When I try to do this the recovery console says e: can't open/cache/recovery/command and I can't connect to my phone. Any help?
To start I want to say Thank you to the OP for posting this. But there are a few errors, so I hope I can help.
To anyone having issues with this, there are a few things that you must have to make this work.
Note this only works for AT&T Atrix as I do not have a Bell Atrix
#1; THE 1st PART DOES NOT WORK if you performed the update. You should be rooted. You can check to see if you updated by pressing menu --> settings --> about phone and your Build version says something like OLYFR_U4_1.5.7 it will not work, you need to skip down to my next post of my coding since you should already be rooted. The 1st part of this uses the method that made rooting possible, since that was removed with the update, it no longer applies. So if you are updated, you should already be rooted and can skip a few steps
#2; You must have a folder called WebTopModBackup with the .bak files in it on the internal memory (not your memory card but the fake internal one). Open the app called Files, select Internal phone storage, select the WebTopModBackup folder and make sure you see the following files, if not you need to get them
Code:
DockProvider.apk.bak
DockProvider.odex.bak
DockService.apk.bak
DockService.odex.bak
PortalApp.apk.bak
PortalApp.odex.bak
#3; Do not mount your sdcard. When you plug in your USB cable to the compter, pull down the drop menu, select the USB connection and make sure None is selected; then press ok. If one of the other options are selected, select None press ok and wait for 30 seconds for the internal and external cards to mount. @Phazoni more than likely this is your issue
#4; USB debugging must be turned on. Press menu --> settings --> applications --> development --> and check USB debugging if not checked
#5; Make sure you have at least 50% battery, just in case
#6; During the steps you mount (make it editable) the /system folder where the files are, if you get a read-only error you did not do step
mount -o rw,remount /dev/block/mmcblk0p12 /system
correctly or your phone is somehow not rooted.
Click to expand...
Click to collapse
Ok now let's look at the code in the OP
Code:
adb.exe push psneuter /data/local/tmp
adb.exe shell chmod 755 /data/local/tmp/psneuter
adb.exe shell ./data/local/tmp/psneuter
adb.exe shell
adb.exe push is the command to copy a file to your phone; so we are making a copy of psneuter and putting it on the phone.
adb.exe shell chmod 755 this gives premission to the phone to use the psneuter file
adb.exe shell ./ this makes the psneuter file run and creates a fake root
adb.exe shell this should really be typed as adb shell but whatever. This takes you into the phone's system to edit the files. While in adb, the line should start with a # if it is a $ then psneuter did not work. Just to try, type su and see if the $ changes to a # if it does continue
Code:
cd /mnt/sdcard/WebtopModBackup
This command takes you to the location of your backup, remeber step 2 & 3, if this folder is empty and you cannot get to it, you have an issue there
Code:
mv DockProvider.apk.bak DockProvider.apk
mv DockProvider.odex.bak DockProvider.odex
mv DockService.apk.bak DockService.apk
mv DockService.odex.bak DockService.odex
mv PortalApp.apk.bak PortalApp.apk
mv PortalApp.odex.bak PortalApp.odex
Personally this is not the best way to do this (rename the files by making copies and then making more copies), but not my code. The mv command moves a file. In this case you are only using it to rename the files removing the .bak from the end. See my code at the bottom
Code:
mount -o rw,remount /dev/block/mmcblk0p12 /system
This mounts the /system folder so you can edit the system files
Code:
cp DockProvider.apk /system/app/
cp DockProvider.odex /system/app/
cp DockService.apk /system/app/
cp DockService.odex /system/app/
cp PortalApp.apk /system/app/
cp PortalApp.odex /system/app/
This code copies the files into the original locations as the correct name. This assumes you are still in the folder where the backups are. If this fails, the /system folder is not mounted, the files are missing or you are in a different folder. This is also missing the chmod /system/app/* coding. I will cover that below
Code:
rm /data/dalvik-cache/[email protected]*.dex
rm /data/dalvik-cache/[email protected]*.dex
rm /data/dalvik-cache/[email protected]*.odex
rm /data/dalvik-cache/[email protected]*.odex
rm is the command to remove/delete a file, running these 4 commands will remove the system cache and will most likely cause your phone to reboot before the next step; that is ok.
Code:
reboot now
This reboots the phone and removes the temp root.
Click to expand...
Click to collapse
See my next post for my coding
AGAIN
Note this only works for AT&T Atrix as I do not have a Bell Atrix
#1; THE 1st PART DOES NOT WORK if you performed the update. You should be rooted. You can check to see if you updated by pressing menu --> settings --> about phone and your Build version says something like OLYFR_U4_1.5.7 it will not work, you need to skip down to my next post of my coding since you should already be rooted. The 1st part of this uses the method that made rooting possible, since that was removed with the update, it no longer applies. So if you are updated, you should already be rooted and can skip a few steps
#2; You must have a folder called WebTopModBackup with the .bak files in it on the internal memory (not your memory card but the fake internal one). Open the app called Files, select Internal phone storage, select the WebTopModBackup folder and make sure you see the following files, if not you need to get them
Code:
DockProvider.apk.bak
DockProvider.odex.bak
DockService.apk.bak
DockService.odex.bak
PortalApp.apk.bak
PortalApp.odex.bak
#3; Do not mount your sdcard. When you plug in your USB cable to the compter, pull down the drop menu, select the USB connection and make sure None is selected; then press ok. If one of the other options are selected, select None press ok and wait for 30 seconds for the internal and external cards to mount. @Phazoni more than likely this is your issue
#4; USB debugging must be turned on. Press menu --> settings --> applications --> development --> and check USB debugging if not checked
#5; Make sure you have at least 50% battery, just in case
#6; During the steps you mount (make it editable) the /system folder where the files are, if you get a read-only error you did not do step
mount -o rw,remount /dev/block/mmcblk0p12 /system
correctly or your phone is somehow not rooted.
Click to expand...
Click to collapse
NOW for my recommended coding
After you follow my 6 steps above do the following
#1. on your compter press start --> run --> Type cmd this will open the command prompt for windows. Then navigate to the folder where the original WebTopMod files are located.
#2a. If are rooted jump down to step 4
#2. If you are not rooted and have not updated your phone type the following letter for letter
Code:
adb push psneuter /data/local/tmp
adb shell
You will now be in the ADB shell.
#3. You should see a $ so type the following
Code:
chmod 755 /data/local/tmp/psneuter
./data/local/tmp/psneuter
#4 This will kick you out of ADB, wait for it and when it does count to 30 for adb to reset. Now type the following:
Code:
adb shell
#5. You should see the # sign, if you see $ type su to change it since you should be rooted either by rooting the phone or using steps 1-3 above for pre-update.
Code:
mount -o rw,remount /dev/block/mmcblk0p12 /system
cp /mnt/sdcard/WebtopModBackupDockProvider.apk.bak /system/app/DockProvider.apk
cp /mnt/sdcard/WebtopModBackupDockProvider.odex.bak /system/app/DockProvider.odex
cp /mnt/sdcard/WebtopModBackupDockService.apk.bak /system/app/DockService.apk
cp /mnt/sdcard/WebtopModBackupDockService.odex.bak /system/app/DockService.odex
cp /mnt/sdcard/WebtopModBackupPortalApp.apk.bak /system/app/PortalApp.apk
cp /mnt/sdcard/WebtopModBackupPortalApp.odex.bak /system/app/PortalApp.odex
chmod 644 /system/app/*
rm /data/dalvik-cache/[email protected]*.dex
rm /data/dalvik-cache/[email protected]*.dex
rm /data/dalvik-cache/[email protected]*.odex
rm /data/dalvik-cache/[email protected]*.odex
reboot now
This
1. mounts the /system folder so you can replace the files then
2. renames nd copies the back-up files to the original locations in one step
3. Then the chmod 644 command sets the correct premissions for the files so they work,
4. clears the cache and
5. reboots the phone.
Click to expand...
Click to collapse
I hope this helps anyone stuck
DISCLAIMER:
I AM NOT RESPONSIBLE FOR YOUR DEVICE OR ANYTHING THAT MIGHT OCCUR WHILE USING THIS TUTORIAL. TRY AT YOUR OWN RISK!
Credits:
[mbm] for teaching me this dd terminal method.
As we all know, for what ever reason, Samsung decided to release the Tab 3 model tablets with 1 GB of ram. I believe this system needs more ram but unfortunately we cannot upgrade the hardware. What we can do is create virtual memory or a "Swap file" that acts like ram to help our Tab 3's out with multitasking and other memory hogging tasks. Below are the steps to:
1. Create a swap file.
2. Create a script file to run at boot from your /system/etc/init.d directory.
3. Create a android system with 1GB of RAM and 1GB of swap file virtual memory.
*Remember whatever device you are using must have a rom with init.d support and be rooted.
STEP 1: TERMINAL COMMANDS PT.1
Download terminal emulator from the play store if you don't already have it.
https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Open terminal emulator and execute these commands in order:
1. "su"
2. "cd /system"
3. "mount -o rw,remount /system"
4. "dd if=/dev/zero of=swapfile bs=1m count=600" (be patient, this step takes about a minute)
5. "mkswap swapfile"
6. "chmod 755 swapfile"
STEP 2: INIT.D SWAP FILE TEXT CREATION
Now to create a script to execute at boot every time you boot your phone. I used the app QuickEdit from the play store.
https://play.google.com/store/apps/details?id=com.rhmsoft.edit
Now open that up and put the text below in the file:
"mount -o rw,remount /system
swapon /system/swapfile"
Now save that to your sdcard (/sdcard) as "swap" (remember do not save with the .txt)
STEP 3: TERMINAL COMMANDS PT.2
Now go back into terminal and execute these commands:
1. mv /sdcard/swap /system/etc/init.d
2. chmod 755 /system/etc/init.d/swap
I kept my previous terminal session open but if you closed it for what ever reason you might have to execute "su" and then "mount -o rw,remount /system" before the two commands in step 3.
STEP 4:
Reboot and win. :laugh::good::laugh:
To verify that the process has worked, after reboot, bring up terminal emulator and type "free -m". You should see that swap has more than 600M! This will stick after reboot. If for whatever reason you want to get rid of your swap file just delete the "swapfile" file and the "swap" script. Enjoy!
ax562 said:
DISCLAIMER:
I AM NOT RESPONSIBLE FOR YOUR DEVICE OR ANYTHING THAT MIGHT OCCUR WHILE USING THIS TUTORIAL. TRY AT YOUR OWN RISK!
Credits:
[mbm] for teaching me this dd terminal method.
As we all know, for what ever reason, Samsung decided to release the Tab 3 model tablets with 1 GB of ram. I believe this system needs more ram but unfortunately we cannot upgrade the hardware. What we can do is create virtual memory or a "Swap file" that acts like ram to help our Tab 3's out with multitasking and other memory hogging tasks. Below are the steps to:
1. Create a swap file.
2. Create a script file to run at boot from your /system/etc/init.d directory.
3. Create a android system with 1GB of RAM and 1GB of swap file virtual memory.
*Remember whatever device you are using must have a rom with init.d support and be rooted.
STEP 1: TERMINAL COMMANDS PT.1
Download terminal emulator from the play store if you don't already have it.
https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Open terminal emulator and execute these commands in order:
1. "su"
2. "cd /system"
3. "mount -o rw,remount /system"
4. "dd if=/dev/zero of=swapfile bs=1M count=1024" (be patient, this step takes about a minute)
5. "mkswap swapfile"
6. "chmod 755 swapfile"
STEP 2: INIT.D SWAP FILE TEXT CREATION
Now to create a script to execute at boot every time you boot your phone. I used the app QuickEdit from the play store.
https://play.google.com/store/apps/details?id=com.rhmsoft.edit
Now open that up and put the text below in the file:
"mount -o rw,remount /system
swapon /system/swapfile"
Now save that to your sdcard (/sdcard) as "swap" (remember do not save with the .txt)
STEP 3: TERMINAL COMMANDS PT.2
Now go back into terminal and execute these commands:
1. mv /sdcard/swap /system/etc/init.d
2. chmod 755 /system/etc/init.d/swap
I kept my previous terminal session open but if you closed it for what ever reason you might have to execute "su" and then "mount -o rw,remount /system" before the two commands in step 3.
STEP 4:
Reboot and win. :laugh::good::laugh:
To verify that the process has worked, after reboot, bring up terminal emulator and type "free". You should see that swap has more than 1,000,000! This will stick after reboot. If for whatever reason you want to get rid of your swap file just delete the "swapfile" file and the "swap" script. Enjoy!
Click to expand...
Click to collapse
My swap =0.
Sent from my SM-T217S using Tapatalk
It works!
"dd if=/dev/zero of=swapfile bs=1M count=1024"
I used this command and it made a 1KB swapfile.
"dd if=/dev/zero of=swapfile bs=1024 count=1024856" - This made a 550mb swapfile.
The tablet has sped up heaps after doing this. Thank you.
Swap using sdcard0 or extsdcard ?
Extsdcard using please version? Make you
Hmmm it doesn't working for me . I have always a Cross Link error...
Matt_13 said:
"dd if=/dev/zero of=swapfile bs=1M count=1024"
I used this command and it made a 1KB swapfile.
"dd if=/dev/zero of=swapfile bs=1024 count=1024856" - This made a 550mb swapfile.
The tablet has sped up heaps after doing this. Thank you.
Click to expand...
Click to collapse
Your welcome. I had adjusted the original post. Maybe you did "bs=1M" and not "bs=1m". Android doesn't like the capital "M". Also, I ended up making the instructions for a smaller swap file of 600m. Glad it helped. I know it helped me a lot !
gr9nole said:
Swap using sdcard0 or extsdcard ?
Extsdcard using please version? Make you
Click to expand...
Click to collapse
you can do it for either or. I did it for internal /sdcard because I ran out of micro sd cards. The instructions would be the same, just replace /sdcard with /ext-sdcard (or whatever your ext sdcard is named), ignore moving to /system, and ignore the permissions step for swapfile ("chmod"). It is safer doing on /ext-sdcard but most likely a little slower.
ax562 said:
you can do it for either or. I did it for internal /sdcard because I ran out of micro sd cards. The instructions would be the same, just replace /sdcard with /ext-sdcard (or whatever your ext sdcard is named), ignore moving to /system, and ignore the permissions step for swapfile ("chmod"). It is safer doing on /ext-sdcard but most likely a little slower.
Click to expand...
Click to collapse
Can you Make extsdcard why
"dd if=/dev/zero of=swapfile bs=1M count=1073741824" for 1GB?
Also, I just want to ask, if this will help enough to let me play Pokemon GO
EDIT: Just to point out, it is possible that there might not be enough space for that much size of the swap file in /system
so i stopped it in between at around 392MB. I hope that wont be an issue... Would it be?
ax562 said:
1. mv /sdcard/swap /system/etc/init.d
Click to expand...
Click to collapse
When executing this command I get an error - "Failed on '/sdcard/swap' - cross device link"
Any idea why I'm getting this error?
UPDATE: According to the Google t's a busybox error that can be fixed a couple ways. Either use the command "cp" instead of "mv" or try the command "busybox" before the string ie:
busybox mv /sdcard/swap /system/etc/init.d
The above command worked for me. Cheers!
I have the same Problem
Gesendet von meinem SM-T210 mit Tapatalk
Uhmm, am I doing it right? I followed all the steps and ended up with a 600mb swapfile, but when I rebooted and typed "free -m" this appears:
total used freeSwap: 358396 48676 309720
Is this ok, or did I do something wrong?
Jidekan said:
Uhmm, am I doing it right? I followed all the steps and ended up with a 600mb swapfile, but when I rebooted and typed "free -m" this appears:
total used free
Swap: 358396 48676 309720
Is this ok, or did I do something wrong?
Click to expand...
Click to collapse
Which ROM and kernel are you using? Looks like you have zram enabled, that's the zram swap size on my tablet as well. I've tried disabling it and running the scripts but can't seem to enable swap on the kernel I'm on. It's either zram or nothing. I'm using werewolf kernel and jasbr lite ROM
djparent said:
Which ROM and kernel are you using? Looks like you have zram enabled, that's the zram swap size on my tablet as well. I've tried disabling it and running the scripts but can't seem to enable swap on the kernel I'm on. It's either zram or nothing. I'm using werewolf kernel and jasbr lite ROM
Click to expand...
Click to collapse
It's basically the same, JASBR lite but with the kernel that came with it, i'll see if I can disable zram
So i'm really new at rooting and flashing stuff, but I followed the original instructions but after reboot and free -m, i get
swap:
total - used - free
349 - 35 - 314
is that the 600mb total its supposed to be? things dont seem to be significantly faster...
i'm using realWelder rom and his kernal.
To use this, you will need Alsa Mixer, Gscript lite, and terminal emulator from Play Store.
TYPE EVERYTHING WITHOUT QUOTES!!
IT WILL BOOST HEADPHONE SOUND ONLY!
IF MUSIC STOPS, YOU SHOULD TOUCH IT AGAIN!
First, open terminal emulator, type "su", it will ask for root acces, allow it.
Then, we should mount the system as RW: "mount -o rw,remount,rw /system"
We made it RW, now don'T close the terminal emulator, just open alsa mixer, set "HISSC_SMT_HSL_GAIN" and "HISSC_SMT_HSR_GAIN" to 15.
Then, go back to terminal emulator, type "alsa_ctl store".
Now, we made the changes to system, so we can mount it to RO again: "mount -o ro,remount,ro /system"
We remounted it as RO, now open Gscript lite, press Add script, give the name you want, and it needs su, so tick it. In the bigger box, type "alsa_ctl restore", press save. Try to run it, it'll ask for root, allow it. Now, we've done with the script, go to your launcher, and add the gscript widget to your homescreen, pick your script, and the next time you launch it from your desktop, it should work.