Just want to share a simple script to enable/disable fast charge from terminal:
How to install:
1) download fast charge enabler/disabler: http://www.mediafire.com/download.php?3ichwd948oh5tt7
2) extract the files and place in /system/bin/ (do not flash through CWM)
3) change permission of the files to 755
How to use:
1) Open terminal emulator
2) To enable fast charge:
$ su
# fcon
Click to expand...
Click to collapse
3) To disable fast charge:
$ su
# fcoff
Click to expand...
Click to collapse
Tip:
You may want to use use Script Manager to create shortcuts for the scripts in your homescreen.
:good:
Sent from my GT-P5100 using xda premium
Can i know what this actually do?
encik_racun said:
Can i know what this actually do?
Click to expand...
Click to collapse
To enable usb (connection to pc) fast charge through terminal command.
-XDA Rocks-
Lakum said:
To enable usb (connection to pc) fast charge through terminal command.
-XDA Rocks-
Click to expand...
Click to collapse
the only thing it does is a shortcut for a script that does
echo 0 > /sys/kernel/fast_charge/force_fast_charge
to disable
and
echo 1 > /sys/kernel/fast_charge/force_fast_charge
to enable
the rest of the process is done inside the kernel.
Tip:
I use Script Manager to create shortcuts/widgets for this script in my home screen.
So activating/deactivating fastcharge is just a matter of tapping the icons.
Does it work on newest CM10.1 by arco?
Sent from my GT-I8150 using xda premium
skrillex13 said:
Does it work on newest CM10.1 by arco?
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
It should
Working perfectly on my SGS I9000, BB9 with Mackay kernel. Thx amigo
redj12 said:
Working perfectly on my SGS I9000, BB9 with Mackay kernel. Thx amigo
Click to expand...
Click to collapse
:thumbup:
Sent from my GT-I8150 using xda app-developers app
Fast charging the battery?
Sent from my GT-I8150 using xda premium
Fast charge app also can to activing fast charge and so easy to using this app.
---------- Post added at 10:56 PM ---------- Previous post was at 10:54 PM ----------
encik_racun said:
Fast charging the battery?
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
yes, it is. I felt the effects on CM 10 beta 1 which supported fast charge.
encik_racun said:
Fast charging the battery?
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
Aldich13 said:
Fast charge app also can to activing fast charge and so easy to using this app.
---------- Post added at 10:56 PM ---------- Previous post was at 10:54 PM ----------
yes, it is. I felt the effects on CM 10 beta 1 which supported fast charge.
Click to expand...
Click to collapse
increases the rate of charging from a usb port which is normally slower compared to charging from an outlet
klacenas said:
3) change permission of the files to 755
Click to expand...
Click to collapse
i dont understand here. can anyone help me ?
UniQuE_12 said:
i dont understand here. can anyone help me ?
Click to expand...
Click to collapse
using your file manager with root access, locate the 2 files mentioned and change it's permissions to 755
UniQuE_12 said:
i dont understand here. can anyone help me ?
Click to expand...
Click to collapse
Some scripts may say 755 -- this is octal. Others may say -rwxr-xr-x -- this is symbolic. They both are telling you to set the permissions the same exact way:
Read = r = 4
Write = w = 2
Execute = x = 1
There are three types that can get to a file if you allow them to, The Owner, The Group, and Everyone.
So let's assume myfile.cgi requires the owner, to be able to do everything (read it, write to it, and execute it), and requires the group (people/machines with the same access as the owner) to be able to read it and execute it but we do not want them to write to it, and requires the same permissions that the group has given to everyone else.
User = rwx or 7 (since 4 + 2 + 1 = 7)
Group = r-x or 5 (since 4 + 0 + 1 = 5)
All = r-x or 5 (since 4 + 0 + 1 = 5)
danielferratti said:
Some scripts may say 755 -- this is octal. Others may say -rwxr-xr-x -- this is symbolic. They both are telling you to set the permissions the same exact way:
Read = r = 4
Write = w = 2
Execute = x = 1
There are three types that can get to a file if you allow them to, The Owner, The Group, and Everyone.
So let's assume myfile.cgi requires the owner, to be able to do everything (read it, write to it, and execute it), and requires the group (people/machines with the same access as the owner) to be able to read it and execute it but we do not want them to write to it, and requires the same permissions that the group has given to everyone else.
User = rwx or 7 (since 4 + 2 + 1 = 7)
Group = r-x or 5 (since 4 + 0 + 1 = 5)
All = r-x or 5 (since 4 + 0 + 1 = 5)
Click to expand...
Click to collapse
Thank you. It's very helpful post :good:
UniQuE_12 said:
Thank you. It's very helpful post :good:
Click to expand...
Click to collapse
You're Welcome bro!
Does fast charge start on if phone is rebooted?
platinumpresto said:
Does fast charge start on if phone is rebooted?
Click to expand...
Click to collapse
Nope. You have to run the script again to enable fast charge after reboot.
Sent from my GT-I8150 using xda app-developers app
Related
Hello,
I want to run a script on boot. I already read some threads about it, but I can't figure it out.
I have Cm9 from Arco on my phone and I think it's not supporting init.d.
Any ideas how to do it?
P.S. I would like to do it without any apps like script manager
chaoskoch said:
Hello,
I want to run a script on boot. I already read some threads about it, but I can't figure it out.
I have Cm9 from Arco on my phone and I think it's not supporting init.d.
Any ideas how to do it?
P.S. I would like to do it without any apps like script manager
Click to expand...
Click to collapse
CM9 suports init.d scripts. Just put them in system/etc/init.d and set premissions.
chaoskoch said:
Hello,
I want to run a script on boot. I already read some threads about it, but I can't figure it out.
I have Cm9 from Arco on my phone and I think it's not supporting init.d.
Any ideas how to do it?
P.S. I would like to do it without any apps like script manager
Click to expand...
Click to collapse
What would you like to do?
Just curious!
MiguelPT said:
CM9 suports init.d scripts. Just put them in system/etc/init.d and set premissions.
Click to expand...
Click to collapse
Tried this with rwxrwxrwx-permissions but it's not working?
How do you know if scripts work?
Sent from my GT-I8150 using xda premium
chaoskoch said:
Tried this with rwxrwxrwx-permissions but it's not working?
Click to expand...
Click to collapse
Try rwsr-xr-x or 4777.
Oh, one more thing : scripts under init.d must *NOT* have any extension. The name must consist of exclusively digits, letters, underscore, and hyphen.
_____ Galaxy W + Mutant ROM + xda app _____
---------- Post added at 07:18 PM ---------- Previous post was at 07:17 PM ----------
imadiu said:
How do you know if scripts work?
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
Check if you have XXtest (XX = 2 digit number) in init.d. If you have one, usually it causes boot to leave a file in /data/local/tmp
_____ Galaxy W + Mutant ROM + xda app _____
Occurrent:
-A fast and stable rom(eg. Cm7,gaming
rom,etc.)
[Not tested in stock°°°°°°°°]
- root explorer
-Game.
Step 1:if you have already cm7 or other
rom on your sga read from step 2 or install
a valid rom for your phone(find it on xda).
Step 2:with root explorer go on root of
phone (/system) there are a file called
buil.prop long press on file and open with
text editor(enable first r/w on the top),
Scroll at the end and insert the string of
[Is only for phone with gpu]
[»»»debug.sf.hw=1
debug.composite.type=gpu
debug.composite.type=cpu«««]
Exit and save the file(don't remove
build.prop.bak)
Now reboot your phone and after the
boot go on the /system and delete
build.prop.bak you have activated the
hardware acceleration
Step3--0verclock your phone min and
max freq at the max(800 mhz for sga
user),open game bosteer and select ultra
gaming mode now open the game
Step 4: Enjoy!!! U can play all hd games¡¡¡
Press Thank If You Can!!!
Good Guide, but you need to work on your Grammar.
Tested Game====
Agent Dash
Temple run
Assasains creed
More will add soon!!!!
Try n tell your experience by pressing thanx
Press Thank If You Can!!!
ANDROIDCUSTOMIZe said:
Good Guide, but you need to work on your Grammar.
Click to expand...
Click to collapse
Yupp dude i m working on it sorry for bad english
Press Thank If You Can!!!
you mean typ in like this :
[»»»debug.sf.hw=1
debug.composite.type=gpu
debug.composite.type=cpu«««]
or like this
debug.sf.hw=1
debug.composite.type=gpu
debug.composite.type=cpu
How bout Ace-i?
Sent from my GT-S5830i using xda app-developers app
TechNoJerky said:
you mean typ in like this :
[»»»debug.sf.hw=1
debug.composite.type=gpu
debug.composite.type=cpu«««]
or like this
debug.sf.hw=1
debug.composite.type=gpu
debug.composite.type=cpu
Click to expand...
Click to collapse
Like 2nd without qoute
Press Thank If You Can!!!
It work all device wich have any gpu (integrated or external
Press Thank If You Can!!!
Temple Run works without the sudden death bug ??
Curius7 said:
Temple Run works without the sudden death bug ??
Click to expand...
Click to collapse
Well I done this and I can see much lag on agent dash so I don't think temple run works good.
Sent from my GT-S5830 using xda app-developers app
TechNoJerky said:
Well I done this and I can see much lag on agent dash so I don't think temple run works good.
Sent from my GT-S5830 using xda app-developers app
Click to expand...
Click to collapse
Did you activated game booster at ultra gaming mode???
Press Thank If You Can!!!
TechNoJerky said:
Well I done this and I can see much lag on agent dash so I don't think temple run works good.
Sent from my GT-S5830 using xda app-developers app
Click to expand...
Click to collapse
What rom are you using???
Press Thank If You Can!!!
xactor said:
What rom are you using???
Press Thank If You Can!!!
Click to expand...
Click to collapse
MIUI gb
Sent from my GT-S5830 using xda premium
xactor said:
Occurrent:
-A fast and stable rom(eg. Cm7,gaming
rom,etc.)
[Not tested in stock°°°°°°°°]
- root explorer
-Game.
Step 1:if you have already cm7 or other
rom on your sga read from step 2 or install
a valid rom for your phone(find it on xda).
Step 2:with root explorer go on root of
phone (/system) there are a file called
buil.prop long press on file and open with
text editor(enable first r/w on the top),
Scroll at the end and insert the string of
[Is only for phone with gpu]
[»»»debug.sf.hw=1
debug.composite.type=gpu
debug.composite.type=cpu«««]
Exit and save the file(don't remove
build.prop.bak)
Now reboot your phone and after the
boot go on the /system and delete
build.prop.bak you have activated the
hardware acceleration
Step3--0verclock your phone min and
max freq at the max(800 mhz for sga
user),open game bosteer and select ultra
gaming mode now open the game
Step 4: Enjoy!!! U can play all hd games¡¡¡
Press Thank If You Can!!!
Click to expand...
Click to collapse
What game booster are you talking about here??
Here is link
https://play.google.com/store/apps/details?id=com.burakgon.gamebooster
Press Thank If You Can!!!
TechNoJerky said:
MIUI gb
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
If it not based on cm it will not work!
Press Thank If You Can!!!
this can make the battery drain faster?
xactor said:
If it not based on cm it will not work!
Press Thank If You Can!!!
Click to expand...
Click to collapse
lol, it is based on cm and MIUI
Sent from my GT-S5830 using xda app-developers app
TechNoJerky said:
lol, it is based on cm and MIUI
Sent from my GT-S5830 using xda app-developers app
Click to expand...
Click to collapse
I tested it on maxi ace rom at 820 mhz clock speed n yes by this your battery will drain but a little bit more just little
Press Thank If You Can!!!
xactor said:
Occurrent:
-A fast and stable rom(eg. Cm7,gaming
rom,etc.)
[Not tested in stock°°°°°°°°]
- root explorer
-Game.
Step 1:if you have already cm7 or other
rom on your sga read from step 2 or install
a valid rom for your phone(find it on xda).
Step 2:with root explorer go on root of
phone (/system) there are a file called
buil.prop long press on file and open with
text editor(enable first r/w on the top),
Scroll at the end and insert the string of
[Is only for phone with gpu]
[»»»debug.sf.hw=1
debug.composite.type=gpu
debug.composite.type=cpu«««]
Exit and save the file(don't remove
build.prop.bak)
Now reboot your phone and after the
boot go on the /system and delete
build.prop.bak you have activated the
hardware acceleration
Step3--0verclock your phone min and
max freq at the max(800 mhz for sga
user),open game bosteer and select ultra
gaming mode now open the game
Step 4: Enjoy!!! U can play all hd games¡¡¡
Press Thank If You Can!!!
Click to expand...
Click to collapse
every rom have this
Code:
debug.sf.hw=1
by default, sometimes u will see this
Code:
#debug.sf.hw=1
because they commented it out for crt animation sake
every rom have this
Code:
debug.composite.type=mdp
by default too
you can look for the line and either chg the
debug.composite.type=mdp
to
debug.composite.type=gpu #(**render by gpu)
or
debug.composite.type=cpu #(**render by cpu)
**********
You shouldnt add a new line , as there's already one in your build.prop (remember? every rom have tat line by default already)
You have to find the line and change the mdp to gpu or cpu in order to let it to work .
hope you change the tutorial in 1st post, dun mislead other users
---------- Post added at 04:52 PM ---------- Previous post was at 03:56 PM ----------
xactor said:
If it not based on cm it will not work!
Press Thank If You Can!!!
Click to expand...
Click to collapse
miui is based on cm
just asking,is there a way to set the oom value of certain apps using terminal emulator or any other alternative?im using autokiller memory optimizer apps and it kill the messaging apps due to its high value of oom.is there a way to lower it since this app dont hv that function(it does hv but temporarily).already did some research and found a similiar thread in xda but the respondents suggested using other apps to lower the oom(e.g system tuner pro,supercharger,automemomry manager).im curious if lowering the oom can be achieve with just using terminal emulator.thank you in advance
su
echo $new_oom_adj > /proc/$pid_of_process/oom_adj
The problem is finding the $pid_of_process , and that's your homework
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
su
echo $new_oom_adj > /proc/$pid_of_process/oom_adj
The problem is finding the $pid_of_process , and that's your homework
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
thanks..will search for it..btw noticed u upgraded to cm9 rc2.
pepoluan said:
su
echo $new_oom_adj > /proc/$pid_of_process/oom_adj
The problem is finding the $pid_of_process , and that's your homework
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
thanks..will search for it..btw noticed u upgraded to cm9 rc2.
edit:
did the finding,the pid is 2103 but how do i type it?is it like this?(em.dont quite understand when to enter)
su
echo $new_oom_adj > /proc/2103/oom_adj
edit: or should it be like this?
su
echo -8 > /proc/2103/oom_adj
afif_7070 said:
thanks..will search for it..btw noticed u upgraded to cm9 rc2.
Click to expand...
Click to collapse
Yup
@dewadg's Kernel is perfect for me :thumbup:
afif_7070 said:
did the finding,the pid is 2103 but how do i type it?is it like this?(em.dont quite understand when to enter)
su
echo $new_oom_adj > /proc/2103/oom_adj
edit: or should it be like this?
su
echo -8 > /proc/2103/oom_adj
Click to expand...
Click to collapse
The second one.
$new_oom_adj was just a placeholder because I didn't know what value exactly you want to set it to...
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
Yup
@dewadg's Kernel is perfect for me :thumbup:
The second one.
$new_oom_adj was just a placeholder because I didn't know what value exactly you want to set it to...
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
thanks.luckily i rememberd those code that u type in the apk seeder thread..another thing i wanna ask is the pid sometimes changing.so is the oom adj still applied? to be precise if i already set with pid=2103, then i run tm to kill that apps,once i run the apps again n check the pid thru tm the pid changed..(sorry for my bad english)
afif_7070 said:
thanks.luckily i rememberd those code that u type in the apk seeder thread..another thing i wanna ask is the pid sometimes changing.so is the oom adj still applied? to be precise if i already set with pid=2103, then i run tm to kill that apps,once i run the apps again n check the pid thru tm the pid changed..(sorry for my bad english)
Click to expand...
Click to collapse
yes, you have to search for the right PID after every boot.
If you know the exact package name (e.g., com.yadda.yadda.yadda), you can easily pgrep for it. Example script:
Code:
#!/system/bin/sh
targproc=com.yadda.yadda.yadda
targoom=-8
targpid="$(pgrep $targproc)" || exit 1
for p in $targpid; do
echo $targoom > /proc/$p/oom_adj
done
Sent from my GT-I8150 using xda app-developers app
pepoluan said:
yes, you have to search for the right PID after every boot.
If you know the exact package name (e.g., com.yadda.yadda.yadda), you can easily pgrep for it. Example script:
Code:
#!/system/bin/sh
targproc=com.yadda.yadda.yadda
targoom=-8
targpid="$(pgrep $targproc)" || exit 1
for p in $targpid; do
echo $targoom > /proc/$p/oom_adj
done
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
lol.its become more complicated.but thanks alot.
edit:
didnt understand this part,for example: pid=2103
targpid=2103(pgrep com.yada.yada.yada) || exit 1
for p in 2103; do echo -8 > proc/p/oom_adj done
?is it correct?im really sorry coz i dont understand bout doing script.
afif_7070 said:
lol.its become more complicated.but thanks alot.
edit:
didnt understand this part,for example: pid=2103
targpid=2103(pgrep com.yada.yada.yada) || exit 1
for p in 2103; do echo -8 > proc/p/oom_adj done
?is it correct?im really sorry coz i dont understand bout doing script.
Click to expand...
Click to collapse
#!/system/bin/sh
targproc=com.yadda.yadda.yadda
targoom=-8
targpid="$(pgrep $targproc)" || exit 1
for p in $targpid; do
echo $targoom > /proc/$p/oom_adj
done
the thing you need to set there is the targproc and the targoom value. com.yada.yada is only example. the problem we have here is we don't know the pid because it's changing like variable in algebra so the command
Code:
targproc=com.yadda.yadda.yadda
targoom=-8
targpid="$(pgrep $targproc)" || exit 1
is needed to find the pid of the process you want. the real code is
Code:
for p in $targpid; do
echo $targoom > /proc/$p/oom_adj
done
CMIIW
Hey Guys!
Im making a script and its called Lagg Nullififer (Click Me)
Its pretty cool and it speeds up android, but i want to make a temporary mode and a permanent mode (init.d) so i want the .sh script to make files on SDCard/Lagg_Nullifier (or any other folder) and i want the files to have the text in them!
EG:
.sh script makes file in sdcard then copys to system/etc/init.d
Please, Please, Please help as i cant find how to do this ANYWHERE!, Thankz in Advance!
Please write what you really want - just make and copy files is easy, but i think, that it isnt all u want...
Nuck-TH said:
Please write what you really want - just make and copy files is easy, but i think, that it isnt all u want...
Click to expand...
Click to collapse
Its what i really want to do,
I want the .sh script to make a file on the sdcard with information on it, then i want the .sh script to copy it to system/etc/init.d
Why not just make script create file directly in init.d?
Ok, I dunno how to, and how to make that script in init.d have text
Sent from my R800i using xda app-developers app
Pizza_Dox said:
Ok, I dunno how to, and how to make that script in init.d have text
Sent from my R800i using xda app-developers app
Click to expand...
Click to collapse
what about making a flashable zip that contains the script? it will extract directly to init.d
Sent from my Xperia Arc S using xda premium
---------- Post added at 08:43 PM ---------- Previous post was at 08:36 PM ----------
Pizza_Dox said:
Ok, I dunno how to, and how to make that script in init.d have text
Sent from my R800i using xda app-developers app
Click to expand...
Click to collapse
do you have any experience with unix scripting at all? I can help you
Sent from my Xperia Arc S using xda premium
Pizza_Dox said:
Hey Guys!
Im making a script and its called Lagg Nullififer (Click Me)
Its pretty cool and it speeds up android, but i want to make a temporary mode and a permanent mode (init.d) so i want the .sh script to make files on SDCard/Lagg_Nullifier (or any other folder) and i want the files to have the text in them!
EG:
.sh script makes file in sdcard then copys to system/etc/init.d
Please, Please, Please help as i cant find how to do this ANYWHERE!, Thankz in Advance!
Click to expand...
Click to collapse
I'm really confused as to what you want to do, but if I understand correctly, U want to make it temporary so if users reboots the script doesn't stick but if the user wants it to stick it will create a init.d rite??
And ye i would also ask have u any experience in scripting because this is pretty/verry easy
So basically for it to be temporary you just want to run the script, if u want it to stick after reboot you must place it in init.d folder or for lupus Kernels you could also place it in boot.d, dependinfg on wether u want it to run on BOOT or INIT.
wedgess said:
I'm really confused as to what you want to do, but if I understand correctly, U want to make it temporary so if users reboots the script doesn't stick but if the user wants it to stick it will create a init.d rite??
And ye i would also ask have u any experience in scripting because this is pretty/verry easy
So basically for it to be temporary you just want to run the script, if u want it to stick after reboot you must place it in init.d folder or for lupus Kernels you could also place it in boot.d, dependinfg on wether u want it to run on BOOT or INIT.
Click to expand...
Click to collapse
exactly
Sent from my Xperia Arc S using xda premium
I dont want to make a flashable zip, i want it to be like superchrager to make the files in init.d, , Heres what im trying to do for my mod, Thing is its really good, Honestly, Go try it out, If u dont like it just reboot
Here:
http://forum.xda-developers.com/showthread.php?t=2319774
Im trying to get 2 options to come up and say install in init.d or testdrive, testdrive will inject tweaks for current sesion and when u reboot they go away, and init.d will keep those tweaks and things,
Also if u want u can Be my partner in Lagg Nullifier,
wedgess said:
I'm really confused as to what you want to do, but if I understand correctly, U want to make it temporary so if users reboots the script doesn't stick but if the user wants it to stick it will create a init.d rite??
And ye i would also ask have u any experience in scripting because this is pretty/verry easy
So basically for it to be temporary you just want to run the script, if u want it to stick after reboot you must place it in init.d folder or for lupus Kernels you could also place it in boot.d, dependinfg on wether u want it to run on BOOT or INIT.
Click to expand...
Click to collapse
Yes thanks, someone understands,, lol, Yes, thing is i dident Learn, i just read alot of scripts and tested out a TONNE of different things and values i wanted to use in my script which is HERE
And its universal accros all devices so some might not have boot.d but init.d most of them will have, And thats what i want
I want to have 2 options and have one to make init.d files and one for temp (Temporary method is working fine now, )
Pizza_Dox said:
Yes thanks, someone understands,, lol, Yes, thing is i dident Learn, i just read alot of scripts and tested out a TONNE of different things and values i wanted to use in my script which is HERE
And its universal accros all devices so some might not have boot.d but init.d most of them will have, And thats what i want
I want to have 2 options and have one to make init.d files and one for temp (Temporary method is working fine now, )
Click to expand...
Click to collapse
I checked your script a while ago, and it needs a lot of improvements, you should add user privilege check to the script, and add a line to mount system with read/write permission. And also you should make the script a bit more aggressive and give the user some choices to pick. Unfortunately I don't have much time to do it myself, but I'll try to.
Anyway to make the script create another script in init.d with text in it it's really simple, here's an example:
echo #put your first command here# > system/etc/init.d/99LagNullifier
echo #put your second command here# >> system/etc/init.d/99LagNullifier
">" overwrites any old text in the file
">>" adds to the existing file
Sent from my Xperia Arc S using xda premium
Pizza_Dox said:
Yes thanks, someone understands,, lol, Yes, thing is i dident Learn, i just read alot of scripts and tested out a TONNE of different things and values i wanted to use in my script which is HERE
And its universal accros all devices so some might not have boot.d but init.d most of them will have, And thats what i want
I want to have 2 options and have one to make init.d files and one for temp (Temporary method is working fine now, )
Click to expand...
Click to collapse
Oh OK and not being smart but do u know wat each line of your script does. Because I have seen many users creating scripts and although the desired effect works there are parts which are not needed or the creator does not have a clue what they do. They just cram in awhole load of things which look or sound good. IM NOT SAYING THIS IS YOU.
I'm not at a PC rite now so can't look at your script. But seen as u don't want to make it a flashable zip, I would suggest something that maybe u could run via script manager or terminal like lupus menu. With a couple if options like set on every boot. Or run until reboot and say a check to make sure other init.D's do not conflict with yours. Just some suggestions.
Lol @Themike_10452 the below will probably confuse the hell out of him
inspire yourself with this code
clear ##clear the screen
echo ""
##check for root privilege
id=`id`; id=`echo ${id#*=}`; id=`echo ${id%%\(*}`; id=`echo ${id%% *}`
if [ "$id" = "0" ] || [ "$id" = "root" ]; then
echo "Root permission: Yes"
else
echo "Root permission: No"
echo ""
echo Please run the script with SU permission
sleep 3
exit 69
fi
if [ ! "`which busybox`" ]; then ##check for busybox
echo "Busybox found: No!"
sleep 3
exit 70
else
echo "Busybox found: Yes"
fi
echo ""
busybox mount -o remount,rw /system ## mounts system as r/w
#
#
#your actions here#
#
#
line=====================
m1k3="=== Themike10452 ==="
echo $line
echo $m1k3
echo $line
echo ""
echo Done!
echo ""
echo -n "Reboot now? (Y,N)"
read input ##read user input and store it in "input" variable
case $input in
y|Y) echo "" ##if answer is "y" or "Y" then ...
echo Your phone will now reboot
sleep 2
echo ""
echo ========== POOF! =========
sleep 1
reboot ;;
*) echo "" ##any other answer then ...
echo "So reboot manually later "
sleep 2
exit ;;
esac
Sent from my Xperia Arc S using xda premium
Omg, THANKZ alot!, , only problem is I'm not on PC, so I'll continue stuff latter
Sent from my R800i using xda app-developers app
Pizza_Dox said:
Omg, THANKZ alot!, , only problem is I'm not on PC, so I'll continue stuff latter
Sent from my R800i using xda app-developers app
Click to expand...
Click to collapse
alright hit thanks at least
Sent from my Xperia Arc S using xda premium
---------- Post added at 10:37 PM ---------- Previous post was at 10:30 PM ----------
wedgess said:
Lol @Themike_10452 the below will probably confuse the hell out of him
Click to expand...
Click to collapse
I'll try to clarify things as much as I can this is Unix after all
Sent from my Xperia Arc S using xda premium
I can't, got to 8 today, will do tmrw, and again thanks alot and I'll check out the code, I like the input part but the reboot and etc... I mostly knew about,
@wedgess, it diddent really confuse me, , lol
Sent from my R800i using xda app-developers app
Pizza_Dox said:
I can't, got to 8 today, will do tmrw, and again thanks alot and I'll check out the code, I like the input part but the reboot and etc... I mostly knew about,
@wedgess, it diddent really confuse me, , lol
Sent from my R800i using xda app-developers app
Click to expand...
Click to collapse
benefit from it as much as you can, I added some colors to make it look clearer
Sent from my Xperia Arc S using xda premium
Themike_10452 said:
I'll try to clarify things as much as I can this is Unix after all
Sent from my Xperia Arc S using xda premium
Click to expand...
Click to collapse
Oh u came back and edited it much easier for him now
Pizza_Dox said:
I can't, got to 8 today, will do tmrw, and again thanks alot and I'll check out the code, I like the input part but the reboot and etc... I mostly knew about,
@wedgess, it diddent really confuse me, , lol
Sent from my R800i using xda app-developers app
Click to expand...
Click to collapse
Good but I would still however look up some bash so u know exactly what's going on and how to fix it if u run into problems.
Ok I looked through your script quickly there... as mike said there is still alot of work to do. this is not ment as destructive criticism but constructive, to help you make it better, which i'm sure is what you want.
It can be cleaned up quite a bit. It looks like you took alot of other peoples scripts/tweaks and put them together with a lot of sleeps, which certainly will not be good... unless u run them in the background. Because device wont boot for a long time with them all, I think there is 3/4mins where script pauses. It will be fine in boot.d as it wont affect boot time but in init.d seems like a NO NO. also thigs like
Code:
/system/xbin/echo 1 > /proc/sys/vm/oom_kill_allocating_task
can simply be
Code:
echo 1 > /proc/sys/vm/oom_kill_allocating_task
or even better, I think its a good idea to create a variable for busybox say BB. I noticed on LuPuS script at the start certain commands would not work unless I had busybox before each command. I run my kernels busybox from /sbin, So would be
Code:
BB=/sbin/busybox
-- this way
Code:
$BB echo 1 > /proc/sys/vm/oom_kill_allocating_task
As I also mentioned u should place a check so your script will make sure any scripts already in init.d will not conflict. And if they do give the user option to overwrite or keep their current script or back it up.
edit - Crap u said u wanted it to be universal. So maybe better to check for busybox.
Code:
if [ -e /sbin/busybox ]; then
BB=/sbin/busybox
elif [ -e /system/xbin/busybox ]; then
BB=/system/xbin/busybox
elif [ -e /system/bin/busybox ]; then
BB=/system/bin/busybox
else
echo "No busybox found!"
fi
Thanks alot, for all the help guys! I'll get on working and just to clarify I took the base commands from Lenarox, Juwe11 & many others, tested them & modified alot to find the best combo and I added some of my Own Tweaks!,
Also with the whole sleeps thing I already know that it's not Good In init.d and so o was making it to
Just inject all commands
Also in the script their were alot of sleeps because this way it gives each tweak to settle in
Sent from my R800i using xda app-developers app
Ok I tried testing this:
(Thanks mike)
Code:
case $input in
y|Y) echo "Would You Like to Reboot Now?"
echo "Your phone will now reboot"
sleep 2
echo ""
echo "========== POOF! ========="
sleep 1
reboot ;;
*) echo "If You Dident Reboot Then..."
echo "Reboot Manually!"
sleep 2
exit ;;
esac
And it dosent work in smanager... Need some help with it,
I need to use these commands in my kernel, any help? not understand like using those commands :/'m new
Fastcharge/powersaver can be enabled with 1 and disabled with 0
Fast charge:
Code:
/sys/td_framework/fast_charge
Powersaving mode:
Code:
/sys/td_framework/powersave_active
CPU temp monitor (true core temp):
Code:
/sys/td_framework/cpu_temp
kayserxx said:
I need to use these commands in my kernel, any help? not understand like using those commands :/'m new
Fastcharge/powersaver can be enabled with 1 and disabled with 0
Fast charge:
Code:
/sys/td_framework/fast_charge
Powersaving mode:
Code:
/sys/td_framework/powersave_active
CPU temp monitor (true core temp):
Code:
/sys/td_framework/cpu_temp
Click to expand...
Click to collapse
those commands can only be used with a terminal emulator...if you want to keep those things after boot you need a init.d script or an app like smanager to set a script which boots also just from sdcard...if you dont know how to do all you could also use search here on xda or google
One-X-master said:
those commands can only be used with a terminal emulator...if you want to keep those things after boot you need a init.d script or an app like smanager to set a script which boots also just from sdcard...if you dont know how to do all you could also use search here on xda or google
Click to expand...
Click to collapse
you can explain better plz?????
kayserxx said:
you can explain better plz?????
Click to expand...
Click to collapse
Please be so kind..and use his infos for a search ..with the search button you will easy find a tut for such things..not bad meant..but try:beer:
Sent from my HTC One X using xda app-developers app