How to write a script - Captivate General

I am wanting to write a script to change my UV without using Voltage Control, but I have no idea how. Could someone point me to instructions, or possibly write it for me? Thanks in advance.

sixstringsg said:
I am wanting to write a script to change my UV without using Voltage Control, but I have no idea how. Could someone point me to instructions, or possibly write it for me? Thanks in advance.
Click to expand...
Click to collapse
voltage control will write the scrpit and put it in the /system/etc/init.d directory but you need to set that directory to read/write, i use root explorer for this. you can view the script in a text editor via root explorer and you will see what it is doing if you want to mimic it.

Dani897 said:
voltage control will write the scrpit and put it in the /system/etc/init.d directory but you need to set that directory to read/write, i use root explorer for this. you can view the script in a text editor via root explorer and you will see what it is doing if you want to mimic it.
Click to expand...
Click to collapse
But isn't that just the boot settings? Or are the apply now settings there too? I'm trying to change it with tasker.

sixstringsg said:
But isn't that just the boot settings? Or are the apply now settings there too? I'm trying to change it with tasker.
Click to expand...
Click to collapse
oh, mis understood. ok then what is wrong with using voltage control?
ill look into it. not sure off the top of my head,
edit: wait what am i saying i know this. the script is the same. putting it in init.d just is a place to make the phone run it on boot. you can copy that script anywhere and edit it for alternate setting and execute it yourself.

Dani897 said:
oh, mis understood. ok then what is wrong with using voltage control?
ill look into it. not sure off the top of my head,
edit: wait what am i saying i know this. the script is the same. putting it in init.d just is a place to make the phone run it on boot. you can copy that script anywhere and edit it for alternate setting and execute it yourself.
Click to expand...
Click to collapse
Ok sweet. I want it in tasker because I cant UV as much when its plugged in without CD, so I then could lower the UV when it's plugged in, then raise when unplugged. Thank you!
Sent from my CM7 powered captivate

Well I have the script done, but now I don't know how to make tasker run it as root...
Sent from my CM7 powered captivate

there is or used to be an application called sl4a (scripting layer for android) i dont know where to get it but there is a market app called scripter that is essencially the same. if you put the script on the sd card and import it into scripter and it will give you the ability to shortcut to it, you can use taster to open the shortcut automatically under whatever situation you are changing settings or just put the shortcut on the desktop and open it like an application. you should be able to give scripter su permissions to run it. scripter is nice to have because it also adds a support for all file extensions to android. any file extension that doesnt run in another app will just be tagged as a scripter file so you can download any file type in the stock browser of send and recieve them in mms and email with the stock apps.
also i dont know much about scripting, im still learning. i understand the commands and this one is simple just echos some numbers into configuration files, but im not sure of what can be used within the script. it may be possible to add an su command at the start of the script or start each command "sudo". not sure though, if this doesn't work then scripter is definately the way to go.
after years of windows i am more comfortable with a gui that a terminal window, but i get by.

I don't see a way to create a shortcut to my script in scripter....

oh sorry i was mistaken. you can do it in launcher pro activities i thought it shows in shortcuts but i was wrong. im not sure if tasker can use launcher pro activities. let me see if there is an alternate way. did you try putting su in the script and see if that works?

Dani897 said:
oh sorry i was mistaken. you can do it in launcher pro activities i thought it shows in shortcuts but i was wrong. im not sure if tasker can use launcher pro activities. let me see if there is an alternate way. did you try putting su in the script and see if that works?
Click to expand...
Click to collapse
When I tried launcher pro activities, it force closed anyway. And I tried su once, but ill try again.
Edit: yeah, su doesnt work. And tasker doesn't return errors when something fails. I have to check voltage control to see if it worked.
Sent from my CM7 powered captivate

sorry. about that, search google for sl4a. that is what tasker expects you to have when you launch scripts anyway. that is why it wants you to have the script in /sdcard/sl4a/scripts
i would assume sl4a would work better in combinations with tasker. hope that it works! ill try to find it.
running the script from the stock file manager or some other meathods will run scripter and ask for su permissions but i have been trying it as well to see what trouble you are having and for some reason when the script is started by tasker scripter doesn't get launched. i assumed it would work because in most situations scripter acts just like sl4a but in this case i was wrong.
edit: here is sl4a http://code.google.com/p/android-scripting/
trying it now

Dani897 said:
sorry. about that, search google for sl4a. that is what tasker expects you to have when you launch scripts anyway. that is why it wants you to have the script in /sdcard/sl4a/scripts
i would assume sl4a would work better in combinations with tasker. hope that it works! ill try to find it.
running the script from the stock file manager or some other meathods will run scripter and ask for su permissions but i have been trying it as well to see what trouble you are having and for some reason when the script is started by tasker scripter doesn't get launched. i assumed it would work because in most situations scripter acts just like sl4a but in this case i was wrong.
Click to expand...
Click to collapse
Yeah, I found that app. Thanks for all the help! We'll get it eventually.
Sent from my CM7 powered captivate

not working for me. sl4a force closes. i dont know how to get it to use super user, it may need something in the script or maybe there is a super user version, or maybe it is just out dated and doesn't work in froyo. im not really sure. im about to talk to my brother who knows all about bash scripts in linux and sh scripts are similar. maybe he has an idea. unfortunately he doesn't have an android phone but if he did he would be the person to ask.

Yeah, it keeps fcing on me too... I don't know.
Sent from my CM7 powered captivate

It is working for me. I had to wait a while at first for a permission request for anonymous user data... also it could be that you already have a folder made. it gave me an error saying that it could not gain permission to add the folder to my sdcard. I think this might be because I have sdext and a2ext... maybe...
Sent from my HTC Vision using XDA Premium App

TheNewGuy said:
It is working for me. I had to wait a while at first for a permission request for anonymous user data... also it could be that you already have a folder made. it gave me an error saying that it could not gain permission to add the folder to my sdcard. I think this might be because I have sdext and a2ext... maybe...
Sent from my HTC Vision using XDA Premium App
Click to expand...
Click to collapse
Is it working for you with tasker? And I already accepted the anonymous user data prompt.
Sent from my CM7 powered captivate

No clever scripter/tasker people know how?
Sent from my CM7 powered captivate

sixstringsg said:
No clever scripter/tasker people know how?
Sent from my CM7 powered captivate
Click to expand...
Click to collapse
In case anyone was wondering, you can use the script locale plugin and it works wonderfully.
Sent from my CM7 powered captivate

Related

[Q] I need help on zipalign.

What is zipalign, what are the benefits of zipalign and how do i do this?
Thank you
60 views but 0 replies
Someone help me please
just use the search option
EdisDee said:
just use the search option
Click to expand...
Click to collapse
I find just one thread with the same question and that thread also has only 2 posts and the person who made the thread posted saying he found the answer but never mentions what the answer is.
I found something about placing a file in the init.d folder but the file was not specified so if anyone has the file in their init.d folder could they copy it to their sd card, upload it to dropbox or any other file share website and share it with me please.
Help please
I know this is bloody perfect forum but sometimes you just need to jump out for a while. It's easier.
"The Android SDK includes a tool called zipalign that optimizes the way an application is packaged. Running zipalign against your application enables Android to interact it more efficiently at run time and thus has the potential to make it and the overall system run faster. We strongly encourage you to use zipalign on both..."
source: http://developer.android.com/resources/articles/zipalign.html
Enable? Nor sure. Kyrillos has it by default. I don't remember about others...
EDIT: Remove ".TXT" and place in /etc/init.d (or /system/etc/init.d). I belive it should be enoguh but can't say for sure. I only hope Kyrillos will not mind, it is from his 8.1 rom. Or hillbeast who edited it to work with hybrid.
mrvek said:
I know this is bloody perfect forum but sometimes you just need to jump out for a while. It's easier.
"The Android SDK includes a tool called zipalign that optimizes the way an application is packaged. Running zipalign against your application enables Android to interact it more efficiently at run time and thus has the potential to make it and the overall system run faster. We strongly encourage you to use zipalign on both..."
source: http://developer.android.com/resources/articles/zipalign.html
Enable? Nor sure. Kyrillos has it by default. I don't remember about others...
EDIT: Remove ".TXT" and place in /etc/init.d (or /system/etc/init.d). I belive it should be enoguh but can't say for sure. I only hope Kyrillos will not mind, it is from his 8.1 rom. Or hillbeast who edited it to work with hybrid.
Click to expand...
Click to collapse
I did what you said. I am rebooting the phone now and hopefully your help is sufficient
Smonic said:
What is zipalign, what are the benefits of zipalign and how do i do this?
Thank you
Click to expand...
Click to collapse
Download "ADB Mask Controller"
install it, connect your phone with USB debugging enabled.
Make sure the connection is detected by the application, click on the refresh button beside SEARCH Option in the program.
in the first screen, you will find option "Push Zipalign" Do that.
Go to the screen titled "Zipalign"
select the optioin you want to use zipalign for user app or system app or both.
Caution : Use this tool judiciously, it has many advanced features used by ROM developers mainly. Like pushing an app to system, removing bloatware, Sql LIte, and many many more.....A wrong step may force you to reflash your ROM.
Hope it helped.
umangsagar said:
Download "ADB Mask Controller"
install it, connect your phone with USB debugging enabled.
Make sure the connection is detected by the application, click on the refresh button beside SEARCH Option in the program.
in the first screen, you will find option "Push Zipalign" Do that.
Go to the screen titled "Zipalign"
select the optioin you want to use zipalign for user app or system app or both.
Caution : Use this tool judiciously, it has many advanced features used by ROM developers mainly. Like pushing an app to system, removing bloatware, Sql LIte, and many many more.....A wrong step may force you to reflash your ROM.
Hope it helped.
Click to expand...
Click to collapse
I clicked on 'push zipalign' a number of times and then clicked on zipalign data/app but nothing happens. It says zipalign not found. Push zipalign and try again or sth like that. I've rebooted my phone and i'm trying now,
Check if you have /system/bin/zipalign. If not try to put it there manually.
ADB controller might have problems mounting your /system r/w and it is read-only. Maybe you can mount it r/w and then try with controller (just guessing, though).
And you'll need to have the S03_zipalign made by kyrillos and hillbeast in /system/etc/init.d (or just /etc/init.d) posted earlier. For what I can tell it zipalign's all apps from /system/app and /data/app.
mrvek said:
Check if you have /system/bin/zipalign. If not try to put it there manually.
ADB controller might have problems mounting your /system r/w and it is read-only. Maybe you can mount it r/w and then try with controller (just guessing, though).
And you'll need to have the S03_zipalign made by kyrillos and hillbeast in /system/etc/init.d (or just /etc/init.d) posted earlier. For what I can tell it zipalign's all apps from /system/app and /data/app.
Click to expand...
Click to collapse
I second that esp rw option, its already there in ADB Controller. U can manually browse as instructed above. Its not that difficult, I am sure u will be able to do it well, reply here if u still get probs even after taking all steps as directed in my previous post and the post i quote above.
umangsagar said:
I second that esp rw option, its already there in ADB Controller. U can manually browse as instructed above. Its not that difficult, I am sure u will be able to do it well, reply here if u still get probs even after taking all steps as directed in my previous post and the post i quote above.
Click to expand...
Click to collapse
Thanks for the help. I'll go back and thank the posts
Anyway i decided not to do any tweaks because i always end up flashing a different ROM anyway, I'm weak when it comes to flashing ROMS
It's like an addiction
Smonic said:
Thanks for the help. I'll go back and thank the posts
Anyway i decided not to do any tweaks because i always end up flashing a different ROM anyway, I'm weak when it comes to flashing ROMS
It's like an addiction
Click to expand...
Click to collapse
hahhahahha...this tweak is not that difficult to implement..and i guess pretty safe...agree totally to the last line
I thought I'd give this a go. I've moved the first file on the previous page to system/etc/init.d and the second file on the top of this page to system/bin. Is this sufficient?
you mean to say you have s03_zipalign in /system/etc/ini.d and zipalign file posted above as /system/bin/zipalign ??
i guess this should do for you .. awaiting to hear if u succeeded.
umangsagar said:
you mean to say you have s03_zipalign in /system/etc/ini.d and zipalign file posted above as /system/bin/zipalign ??
i guess this should do for you .. awaiting to hear if u succeeded.
Click to expand...
Click to collapse
It's working fine. The apps load up fast and i'm happy Thanks!

[How to] Disable CarrierIQ on the Atrix 2

I am posting this in the Developer forum, because it is still a little more than a In-experienced user can handle at the moment, and the potential to get into a bootloop is a little higher if you are not familiar with what you are doing here.
If you are at all new / uncomfortable with Android, UNIX/LINUX, this phone, or adb, then: PLEASE DON'T TRY THIS AT HOME.
If you get into a bootloop I am not responsible for this, nor is this the place to complain if that happens. You can ask for support here though if this process has caused that.
If you do get into a bootloop, then try and help me out, with providing as much info as possible with what happened (any output or screen prints are VERY helpful). I am also posting the original /system/etc/init.goldfish.sh file here AT THE BOTTOM OF THIS POST. That way if it does all go wrong it is here to grab. So don't go asking for it someplace else, or even asking here for it.
You have been warned!
Now with that out of the way, on to the good stuff.
1) Go grab some kind of bloat freeze program, from the market. I have used bloat freezer from the market with great success.
Just download and install it, don't run it just yet, if you already have, and frozen the "Device Health Application", then unfreeze it, and reboot, before doing the next step.
It is VERY important that it is done in EXACTLY this order. The reason is, if the Device Health program is frozen when you let the init script run, it will not work exactly as it should and these services will restart, since part of it is frozen when it first runs, and it all has to be disabled in the proper way, so that it can not be restarted remotely, or we will HAVE to use cron to run checks. Cron is an elaborate hack, I don't want to have to do, unless we HAVE to. If you do it in the exact order noted here, cron will not be needed and this will not restart.
2) Go get the init.goldfish.sh file from http://dl.dropbox.com/u/45576654/init.goldfish.sh.tar
push this tarball to your phone:
Code:
adb push init.goldfish.sh.tar /data/local/
End code
Now is the command line part of this hack.
Code:
adb shell
su
mount -o remount, rw /system
cd /data/local
tar -xvf init.goldfish.sh.tar
cp /system/etc/init.goldfish.sh /sdcard/init.goldfish.sh
cp ./init.goldfish.sh /system/etc/init.goldfish.sh
chown root /system/etc/init.goldfish.sh
chmod 550 /system/etc/init.goldfish.sh
mount -o remount, ro /system
reboot
End code
Now when your phone comes back up:
3) Open your bloat freezer program and freeze the "Device Health Application"
Your phone will freak out, and tell you that Device Health has stopped and it will keep asking you to FC, all you can do is pull the battery.
Put the battery back in the phone an boot it up.
Now CarrierIQ should be 100% disabled on your Atrix 2.
As promissed, here is the Original /system/etc/init.goldfish.sh file in a tarball, just use the same code above to put this back in place.
DON'T USE ROOT EXPLORER TO COPY THESE FILES INTO PLACE!!!
Original /system/etc/init.goldfish.sh file:
http://dl.dropbox.com/u/45576654/init.goldfish.sh-orig.tar
The Jedi Master strikes again!
The force is strong in this one. Seriously Jim you absolutely amaze me. You are the Linux guru.
Sent from my MB865
Train us, he will.
Sent from my MB865 using Tapatalk
LOL....
Hopefully I have not scared everyone from trying this.... I just want to let all the newbies who just got this as thier first android phone yesterday, and rooted it today, and now think that this is a good hack to try, that this is not the best thing for them just yet. It can and will bootloop the phone if you get too excited and don't follow the directions exactly... I got mine in a bootloop testing this all out, and finding the exact steps, but it was not hard to get out of, because it gets into android enough to let you adb in, if you screw up...
quick question: Why would rooting followed by freezing not work for that application? I think I did that when I got the phone. I don't see anything called Device Health in my running or installed applications.
Is carrierIQ still running on my phone? Have you got a string I can look for in the 'ps' output in the Terminal to confirm? There are 100000 processes running on these phones these days, most with cryptic names.... I miss the G1 days....
devsk said:
quick question: Why would rooting followed by freezing not work for that application? I think I did that when I got the phone. I don't see anything called Device Health in my running or installed applications.
Is carrierIQ still running on my phone? Have you got a string I can look for in the 'ps' output in the Terminal to confirm? There are 100000 processes running on these phones these days, most with cryptic names.... I miss the G1 days....
Click to expand...
Click to collapse
No just freezing the device health app just stops the collection process.
The part where you run the commands to stop the services in android are where the data can and will be sent to CIQ or AT&T, there are other things collected that att does not care much about (ATT only wants what is collected with the dev health app), and that goes straight to CIQ, so the services at the OS level are VERY important to stop. There is really not a way to see them running, but I have found that these can and will restart if my instructions are not followed 100%. To find out if CIQ is doing anything take a look on youtube there is a video that explains how to look at the system logs and see what is being collected if anything, and what is being sent out. After a lot of trial and error, I found this is the ONLY way to stop it 100%.
Hey Jim. sorry I've been out of the forums for so long on this. I was going to dig around my atrix2 and see what I could find wrt carrieriq. I got stuck on missing shell tools and you gave me some advice wrt paths and such. I was wondering if you could point me in the right direction for fixing up my env when I shell in? I also don't seem to have grep anywhere... odd.
YOu mentioned doing some of the destructive work in an emulator, and I would like to try the same thing, but I've no idea how to get the atrix2 ROM into an emulator. How did you accomplish this?
I followed the instructions above precisely and verified that my init.goldfish.sh is indeed modified correctly with the carrieriq stuff, and have suffered no ill effects. I have not, however, attempted to determine if carrieriq processes have stopped running. I did notice that after having frozen and unfrozen device.health.monitor a few times, it doesn't ever register as a running app... wonder what's up with that.
thanks for the help.
I was wondering....could this be made into a handy dandy flashable zip?
Then after flashing just freeze the app?
Sent from my MB865 using XDA App
tylercarter said:
I was wondering....could this be made into a handy dandy flashable zip?
Then after flashing just freeze the app?
Sent from my MB865 using XDA App
Click to expand...
Click to collapse
Yep, working on it, should have it up for download tomorrow.... It will also be in my rom.
Jim
Sent from my MB865 using xda premium
jimbridgman said:
Yep, working on it, should have it up for download tomorrow.... It will also be in my rom.
Jim
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
Sent from my MB865 using xda premium
jimbridgman said:
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
NICE! you really are a jedi master!
Who wants to be the first to try this out? I have created a flashable zip to disable CIQ on every boot, all you have to do is grab the file below:
http://dl.dropbox.com/u/45576654/NoCIQ.zip
Then with CWM, flash it, don't wipe anything, except maybe dalvic cache, but nothing else. This will only flash one file to your phone.
You will still have to freeze the device health app as in the OP.
This is just a test right now, once someone other than me tests this, and reports back, that all is great, then I will update the OP, to this method.
jimbridgman said:
Who wants to be the first to try this out? I have created a flashable zip to disable CIQ on every boot, all you have to do is grab the file below:
http://dl.dropbox.com/u/45576654/NoCIQ.zip
Then with CWM, flash it, don't wipe anything, except maybe dalvic cache, but nothing else. This will only flash one file to your phone.
You will still have to freeze the device health app as in the OP.
This is just a test right now, once someone other than me tests this, and reports back, that all is great, then I will update the OP, to this method.
Click to expand...
Click to collapse
It said switch to edify scripting. Installation aborted. Something about gingerbread cwm 3. Not sure. Never see this before. I checked the zip and it has 2 updater scripts. One just has a ~ at the end. I know nothing of code but just trying to help.
Sent from my MB865 using XDA App
jimbridgman said:
Who wants to be the first to try this out? I have created a flashable zip to disable CIQ on every boot, all you have to do is grab the file below:
http://dl.dropbox.com/u/45576654/NoCIQ.zip
Then with CWM, flash it, don't wipe anything, except maybe dalvic cache, but nothing else. This will only flash one file to your phone.
You will still have to freeze the device health app as in the OP.
This is just a test right now, once someone other than me tests this, and reports back, that all is great, then I will update the OP, to this method.
Click to expand...
Click to collapse
Tried this. No go. Here is the error in CWM.
Installing Update...
Amend Scripting (update0script) is no longer supported.
Amend Scripting was deprecated by Google in Android 1.5.
It was necessary to remove it when upgrading to the ClockworkMod 3.0 Gingerbread based recover.
Please switch to Edify scripting (updater-script and update-binary) to create working update zip packages.
Installation Aborted.
There ya go. Hope this helps.
holeshot77 said:
Tried this. No go. Here is the error in CWM.
Installing Update...
Amend Scripting (update0script) is no longer supported.
Amend Scripting was deprecated by Google in Android 1.5.
It was necessary to remove it when upgrading to the ClockworkMod 3.0 Gingerbread based recover.
Please switch to Edify scripting (updater-script and update-binary) to create working update zip packages.
Installation Aborted.
There ya go. Hope this helps.
Click to expand...
Click to collapse
hes working on it. wont be much longer
Why not use the app by TrevE?
Sent from my MB865 using xda premium
1.18.12 said:
Why not use the app by TrevE?
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
That does not perform the hack, only detects if it is running. The voodoo ciq detection app works much better though.
Jim
Sent from my MB865 using xda premium
I just rooted my phone, applied the hack and used Titanium Backup to freeze the Device Health App but I didn't see any FC.
Although when I opened Ti Backup, it told me that my su right are wrong. They are 4755 instead of 6755 or something like that and TiBu told me that it will fix it. I fixed it then froze the app and no FC or nothing. Phone is running fine but not sure if it worked.
Is it really necessary for the app to FC in order to show that it worked?
Should I try it all over again?
Thank you.
noobsquared said:
I just rooted my phone, applied the hack and used Titanium Backup to freeze the Device Health App but I didn't see any FC.
Although when I opened Ti Backup, it told me that my su right are wrong. They are 4755 instead of 6755 or something like that and TiBu told me that it will fix it. I fixed it then froze the app and no FC or nothing. Phone is running fine but not sure if it worked.
Is it really necessary for the app to FC in order to show that it worked?
Should I try it all over again?
Thank you.
Click to expand...
Click to collapse
Go download and install this, and it will show you if it (CarrierIQ) is active or not.
https://market.android.com/details?id=org.projectvoodoo.simplecarrieriqdetector&hl=en

[Guide] SQLite3: Dramatically Improve Entire Phone

So I've used the sqlite vacuum/re-index feature of V6 SuperCharger blindly without knowing what it does getting a placebo effect sort of thing, and I started doing some research on it and realized that this feature has started getting stripped out of a lot of stock roms and what not on android devices and that basically it makes it wayyyy easier for the system to index and sort out system/app files a lot of it was over the top for me but I figured there could be no negative effects to this at all.
So long story short I downloaded SQLite Installer from the market
Restarted and everything on my phone has been quick and painless it's been up for 6 hours now since the restart and have yet to have any lag/problems.
here's my set up:
Tweaked 2.0
0504 PBJ Kernel
OC'd to 1.2ghz (SIO i/o and Interactive governor)
don't know if it is placebo affect once again and I'd love to get some more veteran knowledge on this but I LOVE MY PHONE NOW
As I am a new member here I cannot post links but go to my thread at rootzwiki[dot]com/topic/25072-sqlite3-phone-is-snappier-than-ever/ and read the instructions there and download the easily flashable .zip file with the included detailing script.
happy flashing
p2kmafia
I just flashed so ill report if results are the same for me
Sent from my SCH-I510 using XDA
good lookin. there were positive results in my rootzwiki thread.
RFS or EXT4?
and is this the app: https://play.google.com/store/apps/details?id=ptSoft.util.sqlite3forroot
It would be fairly easy to run before and after database benchmarks in an app such as AnTuTu Benchmark. That would show if there are any real gains to be had.
Looking at the script, it essentially just re-writes all of the databases on the phone (via a VACUUM/REINDEX combo). Logic would state that if you have badly fragmented databases, which would manifest as things like degredation of performance over time, then this should make your phone a bit snappier.
[edit: I ran before and after tests (average of 3 tests). There was no appreciable difference between the tests. Now, the test results may not reflect real world results for two reasons: 1. I have no idea how the database I/O test in AnTuTu actually tests (what database, etc) and 2. I received errors when the script was attempting to vacuum databases ("error: unable to open file"), though the re-indexing worked fine.
End result? The test essentially means nothing and all we can go off of is anecdotal evidence. However, whether it's a placebo effect or not, this process simply can't harmfully impact your phone. As such, results should be anything from no change in response to some response increase.
Yeah, I know. A whole lot of typing that essentially says nothing. Sorry!]
jco23 said:
RFS or EXT4?
and is this the app: play.google[DOT]com/store/apps/details?id=ptSoft.util.sqlite3forroot
Click to expand...
Click to collapse
yes that's the app but check out my rootzwiki thread the flashable zip file adds the detailing script to your sd card that you'll need if you feel your device slowing down.
Cilraaz: thanks for testing this out. the error opening files might have to do with a bad install. keep the detailing script and try the app in the playstore for the install or reflash the zip
p2kmafia said:
Cilraaz: thanks for testing this out. the error opening files might have to do with a bad install. keep the detailing script and try the app in the playstore for the install or reflash the zip
Click to expand...
Click to collapse
I re-installed from Play and have tested my copy of sqlite3. It is a working copy. I also didn't flash the zip. I downloaded the zip, extracted the shell script, and manually placed it on my SD card. I've run the vacuum command manually as well, and received the same error.
I don't know what to tell you. I just re-ran the detailing script and I don't receive those errors, but if you know it is installed correctly/is vacuuming it shouldn't be a problem. I wish I knew more about this software to help out. I just discovered it helps a lot haha.
Cilraaz said:
I re-installed from Play and have tested my copy of sqlite3. It is a working copy. I also didn't flash the zip. I downloaded the zip, extracted the shell script, and manually placed it on my SD card. I've run the vacuum command manually as well, and received the same error.
Click to expand...
Click to collapse
Are you using script manager to run the script? And if so are you running with root privileges?
Sent from my SCH-I510 using xda premium
Endless2232 said:
Are you using script manager to run the script? And if so are you running with root privileges?
Sent from my SCH-I510 using xda premium
Click to expand...
Click to collapse
Script manager as root. Command line as root. The entire script and individual manual vacuums. Same result on all. Maybe I'll boot into CWM and run a fix permissions to see if that does anything.
Check the permissions of sqlite3 in system/xbin using root explorer. Read and execute should have all three checkboxes checked and write should have owner checked.
Sent from my SCH-I510 using xda premium
Endless2232 said:
Check the permissions of sqlite3 in system/xbin using root explorer. Read and execute should have all three checkboxes checked and write should have owner checked.
Sent from my SCH-I510 using xda premium
Click to expand...
Click to collapse
hey endless I just checked my sqlite3 and it has all 9 checks across the board. should I change them as well even though i'm not experiencing any problems?
p2kmafia said:
hey endless I just checked my sqlite3 and it has all 9 checks across the board. should I change them as well even though i'm not experiencing any problems?
Click to expand...
Click to collapse
No, you're fine.
So i did everything in the instructions and i have one little question. Do i keep the script running in the background?
Sent from my SCH-I510 using xda premium
Crap7126 said:
So i did everything in the instructions and i have one little question. Do i keep the script running in the background?
Sent from my SCH-I510 using xda premium
Click to expand...
Click to collapse
No. Once you've flashed/installed SQLite3 it runs by itself it's not a script. the detailing script is a run once kind of thing that you run if you feel your phone slowing down/lagging. I usually run it anywhere from once every 2 days to once every 3 or 4.
I also have an auto cache clearing app that I use that helps with lag so you don't get the two mixed up.
p2kmafia said:
No. Once you've flashed/installed SQLite3 it runs by itself it's not a script. the detailing script is a run once kind of thing that you run if you feel your phone slowing down/lagging. I usually run it anywhere from once every 2 days to once every 3 or 4.
I also have an auto cache clearing app that I use that helps with lag so you don't get the two mixed up.
Click to expand...
Click to collapse
Failed for me.
Sent from my SCH-I510 using xda premium
deafptl4ever said:
Failed for me.
Sent from my SCH-I510 using xda premium
Click to expand...
Click to collapse
what failed for you? i'd love to help out but need a little more information
Endless2232 said:
Check the permissions of sqlite3 in system/xbin using root explorer. Read and execute should have all three checkboxes checked and write should have owner checked.
Click to expand...
Click to collapse
If this was in regard to my issue, it's of no consequence. The sqlite3 executable was running fine, as evidenced by the fact that there were no errors in executing sqlite3 (the REINDEX command ran without problem). The permission issue would be with the database files themselves, though root should have no permission issues on r/w partitions like data and dbdata, or wherever sqlite3 is trying to write the temporary database during the VACUUM process. The VACUUM process actually reads data out of the database file, stores it in a temporary file, and then overwrites the original file with data from the temporary file. This eliminates "blank" data and fragmentation within the database files, which is why you see a slight performance increase and smaller database footprint.
Does anyone know where that temporary db file is stored by sqlite3?
Cilraaz said:
Does anyone know where that temporary db file is stored by sqlite3?
Click to expand...
Click to collapse
Unfortunately my expertise stops at how it works/why it works I just found out that it helps my phone and that's it
This def made my phone much snappier. My only question is, when i run the script i get a constant error, "error mountind database". Not really sure whato do (if anything) since it has made the phone quicker regardless.
Sent from my SCH-I510 using XDA

[Q] Keyboard Dropping/Missing Keystrokes?

Since I've gotten my Sidekick, I've noticed on most ROMs a horrible tendency to not register key-presses on the physical keyboard. There was one ROM early on that didn't do this (or very little) and one of the versions of RAGE was very good. I'm running GOV3.2 Bulky right now and it's not horrible, but it's noticeable. Does anyone have an idea of what might cause this? Thanks.
ged92781 said:
Since I've gotten my Sidekick, I've noticed on most ROMs a horrible tendency to not register key-presses on the physical keyboard. There was one ROM early on that didn't do this (or very little) and one of the versions of RAGE was very good. I'm running GOV3.2 Bulky right now and it's not horrible, but it's noticeable. Does anyone have an idea of what might cause this? Thanks.
Click to expand...
Click to collapse
I thought my keyboard was going bad or i just did not press the key all the way, now im on stock and i have not had that issue, hope someone finds the rom
ultraprimeomega said:
I thought my keyboard was going bad or i just did not press the key all the way, now im on stock and i have not had that issue, hope someone finds the rom
Click to expand...
Click to collapse
I wonder what the issue is that's causing it to show up on custom ROMs. Though, I've had it on the stock ROMs as well.
Have you tried this version of the kernel? Along with the removal of the keystroke logger, it also contains a patch that allows you to lower the keystroke timer delays... If you are experiencing dropped keystrokes, this could help, as the patch was designed for tht very issue.
http://forum.xda-developers.com/showthread.php?t=1663622
yogi2010 said:
Have you tried this version of the kernel? Along with the removal of the keystroke logger, it also contains a patch that allows you to lower the keystroke timer delays... If you are experiencing dropped keystrokes, this could help, as the patch was designed for tht very issue.
http://forum.xda-developers.com/showthread.php?t=1663622
Click to expand...
Click to collapse
Thank you!!!!!!!! I went ahead and dug into that thread. I do have that kernel already on my phone. I looked at the thread linked in that thread that gives a patch to adjust the timer delay and column delay in the kernel. HOWEVER, I'm not knowledgeable enough to apply that patch to my phone as it's given. Elsewhere in that thread, someone gave the commands to edit the settings manually through a terminal which I did through Android Commander on my PC and it worked wonders! Being the suspicious type, I guessed that the settings might not keep after a reboot. Unfortunately, that is the case and I had to reapply the settings after my phone finished restarting. So, I'll have to play with this a bit more to get it to keep, but thank you for showing me this!
You're welcome! That patch was made just for this issue. And yeah, it doesn't stick after a reboot, so we could either compile the kernel with chosen settings added in, or make a simple init.d script. I never did either one lol, was too lazy to try editing and building the kernel from source, and was on the stock ROM so I thought maybe it had no init.d support. You could probably create a file with those same commands used in Terminal, and throw it in your init.d folder to change the settings at boot.
yogi2010 said:
You're welcome! That patch was made just for this issue. And yeah, it doesn't stick after a reboot, so we could either compile the kernel with chosen settings added in, or make a simple init.d script. I never did either one lol, was too lazy to try editing and building the kernel from source, and was on the stock ROM so I thought maybe it had no init.d support. You could probably create a file with those same commands used in Terminal, and throw it in your init.d folder to change the settings at boot.
Click to expand...
Click to collapse
I set my column delay to 30 and my timer delay to 1 and it now feels like I'm typing on a Sidekick again! I wouldn't know how to correctly compile the kernel myself with these settings changed. So, are there any devs out there willing to make a zip that can be flashed in CWM so these settings will become permanent?
ged92781 said:
I set my column delay to 30 and my timer delay to 1 and it now feels like I'm typing on a Sidekick again! I wouldn't know how to correctly compile the kernel myself with these settings changed. So, are there any devs out there willing to make a zip that can be flashed in CWM so these settings will become permanent?
Click to expand...
Click to collapse
+1
I've noticed this problem and thought it was just me :$
I've had this happen as well as my screen thinking I was pressing it in one location when I wasn't even touching the phone. :s Had me at my wits end.
Sent from my SGH-T839 using xda premium
To those interested in the commands I used to fix the keyboard, see below. If you reboot your phone, these settings will go away and you will need to input these commands again. For a permanent fix, someone will need to add them to a kernel that can be flashed. To use these commands, your phone must be rooted. I've successfully used Android Commander to enter these commands from my PC while my phone is connected via USB.
The current timer delay may be read with:
cat /sys/devices/platform/s3c-keypad/timer_delay
The default is 5 if I remember correctly.
A new timer delay may be set with:
echo 1 > /sys/devices/platform/s3c-keypad/timer_delay
The default 300 µs column delay value may be read with:
cat /sys/devices/platform/s3c-keypad/column_delay
A new delay may be set with:
echo 30 > /sys/devices/platform/s3c-keypad/column_delay
In either command, you may experiment with different values by changing the 1 or the 30 in either command to what you want. I believe the lowest is 1 and the max is 256 for the timer delay. If you damage your phone running these commands, that's on you. I'm just telling you what I did and feel worked for me. YMMV. Also, if you don't want to connect your rooted phone to your PC and want to use Terminal Emulator from the Play store, that will work too. You need to enter 'su' prior to running the above commands and grant the terminal super user permissions for the commands to take.
ged92781 said:
I set my column delay to 30 and my timer delay to 1 and it now feels like I'm typing on a Sidekick again! I wouldn't know how to correctly compile the kernel myself with these settings changed. So, are there any devs out there willing to make a zip that can be flashed in CWM so these settings will become permanent?
Click to expand...
Click to collapse
I'll work on it for the next releases of the Bi-Winning roms and also try to attach flashable zips.
RicAndroid said:
I'll work on it for the next releases of the Bi-Winning roms and also try to attach flashable zips.
Click to expand...
Click to collapse
Thank you!
ged92781 said:
Thank you!
Click to expand...
Click to collapse
You are very welcome! All done, BTW. Posting my updates now.
Permanent Fix(Manual way)
Taking the timer_delay and column_delay tricks shown above...I was able to make an init.d script(pretty easy, tbh) but don't feel it merits an update.zip since it's so easy. What I did was:
1. go to /etc/init.d
2. find the last script(In GOV3.3 it's 18complete) and rename it - adding one to the sequence(In my case I renamed it to 19complete)
3. make a new file name 18keyboardfix(The number depends on your rom, really...like if you renamed the above file to some thing like 33complete, you'd call this 32keyboardfix. Easy? right?)
4. Open the file you just created and put:
Code:
!#/system/bin/sh
echo 1 > /sys/devices/platform/s3c-keypad/timer_delay
echo 30 > /sys/devices/platform/s3c-keypad/column_delay
5. Set the permissions to rwxr-xr-x or whatever the numeric equivalent is. (0755, iirc)
6. Reboot
7. (Optional) Recheck the values with the following commands:
Code:
cat /sys/devices/platform/s3c-keypad/timer_delay
Code:
cat /sys/devices/platform/s3c-keypad/column_delay
I take no credit for this fix. Really, it was all ged92781 for providing the commands. All I did was find a way to make it permanent(Well, it's just reset when the devices is turned off and the init.d scripts set it back to you desired values, but that's debatable on whether it's permanent or not...either way...it works and is a simple fix)
SammaelAkuma said:
Taking the timer_delay and column_delay tricks shown above...I was able to make an init.d script(pretty easy, tbh) but don't feel it merits an update.zip since it's so easy. What I did was:
1. go to /etc/init.d
2. find the last script(In GOV3.3 it's 18complete) and rename it - adding one to the sequence(In my case I renamed it to 19complete)
3. make a new file name 18keyboardfix(The number depends on your rom, really...like if you renamed the above file to some thing like 33complete, you'd call this 32keyboardfix. Easy? right?)
4. Open the file you just created and put:
Code:
!#/system/bin/sh
echo 1 > /sys/devices/platform/s3c-keypad/timer_delay
echo 30 > /sys/devices/platform/s3c-keypad/column_delay
5. Set the permissions to rwxr-xr-x or whatever the numeric equivalent is. (0755, iirc)
6. Reboot
7. (Optional) Recheck the values with the following commands:
Code:
cat /sys/devices/platform/s3c-keypad/timer_delay
Code:
cat /sys/devices/platform/s3c-keypad/column_delay
I take no credit for this fix. Really, it was all ged92781 for providing the commands. All I did was find a way to make it permanent(Well, it's just reset when the devices is turned off and the init.d scripts set it back to you desired values, but that's debatable on whether it's permanent or not...either way...it works and is a simple fix)
Click to expand...
Click to collapse
Uh, oh....I used echo "number" /proc/sys/devices/platform/s3c-keypad in my script. Will I have to change it?
RicAndroid said:
Uh, oh....I used echo "number" /proc/sys/devices/platform/s3c-keypad in my script. Will I have to change it?
Click to expand...
Click to collapse
Idk, honestly. Try and see if your script works first, if not, then use the one I made using the commands ged92781 provided. Now...to find a way to fix the spaztic touch screen...that'll be tricky.
SammaelAkuma said:
Idk, honestly. Try and see if your script works first, if not, then use the one I made using the commands ged92781 provided. Now...to find a way to fix the spaztic touch screen...that'll be tricky.
Click to expand...
Click to collapse
I'm using your commands, dude. I'm very into details....so thanks!
RicAndroid said:
I'm using your commands, dude. I'm very into details....so thanks!
Click to expand...
Click to collapse
Lol. No problem. And good luck with the custom rom cooking.

Minfree settings in CM12 Roms

As there are again and again discussions concerning the minfree settings in CM12 roms, I decided to open this thread. If a moderator thinks, this is the wrong place for this thread, just move it, to where it belongs.
Obviously, since the last builds of CM12, the settings for minfrees cause some trouble. After a clean install of any rom, the minfree settings in trickstermod and in fauxclock are completely empty. In fauxclock the settings for OOM (out of memory) Score as well. Some people entered them manually, but I'm afraid, this won't help.
To really solve this, you have to do the following steps: open your file explorer, go to sys/module/lowmemorykiller/parameters. There you will find 5 files. Two of them do not have correct permissions. The first one, called adj, is for the OOM Scores. The other one, called minfree, is, you won't guess it, for the minfrees. :fingers-crossed:
As you see, both of them have only write permissions, but no read permissions. So I guess, the system will ignore these settings completely. I checked this, using cool tool from play store, very nice tool to show for example the actual free ram in your status bar. And in deed, the ram went down to 25MB, after I had opened a handful apps, and then my phone stopped working. I only could do a reboot.
Now the solution, which is quite easy: change the permissions into rw-rw-rw (666), and maybe change the group under owners into root (I'm not sure, if this is necessary, but it does make no problems, so why not).
Et voilà - if you now open trickstermod or fauxclock again, you will see the preset parameters. As you can see also, the minfrees there are really high. In another thread, there have been suggested the following settings, which are a good standard:
trickstermod 48/60/72/84/96/120
fauxclock 12288/15360/18432/21504/24576/30720
Important: In fauxclock, the minfree settings are not made in MB. You have to enter the so called "pages" for minfrees, which I can't explain exactly, what this is. In general, if you want to change minfrees in fauxclock, just take the settings in MB, you want to, and multiply by 256. This will give you the correct values.
BTW I don't think, it's a good idea, to change the OOM Scores, as long as you do not know exactly, what you're doing.
So, hopefully I could help a bit and clear some things up. But the final question to the CM devs remains:
is this a bug or is this a feature?
With me, those files were already chmod 666, owner root. I use latest liquidsmooth rom. What i did, prior reading your post, was that i set minfree in trickster, from my presets, than immedatly switched to faux, parameters were there, pressed apply, switched set on boot and rebooted. After that minfree r sticking in faux and trickster. Guess that my actions leaded to what you have described. Anyway, your way is much more convinient - at least one app less to use
I don't get it... The directory you mentioned is empty on my one s as well as on my nexus 10 both with cm12.
However my settings stick since I use fauxclock.
One more thing I don't get is in fauxclock. It says "kilobyte" explicitly in the minfree settings although you said (and it stems to be) this strange pages value....
mariachi62 said:
I don't get it... The directory you mentioned is empty on my one s as well as on my nexus 10 both with cm12.
However my settings stick since I use fauxclock.
One more thing I don't get is in fauxclock. It says "kilobyte" explicitly in the minfree settings although you said (and it stems to be) this strange pages value....
Click to expand...
Click to collapse
You have to use your file manager with root permissions. Depending on which file manager you use, this can be done differently. The inbuilt CM12 file manager can be given root permissions in settings, in Root explorer for example you have to mount the directory as r/w.
An yes, you are right, fauxclock says, the settings are in kilobyte, but this is not correct. If you succeed to open the minfree file with your file manager, you will find there exactly the values, you have entered in fauxclock.
Damnit, you're right. Solid explorer doesn't show the content of the directory.... I use it a long time and always had the feeling solid explorer shows me all files...
Cm file manager works, thanks!
mariachi62 said:
Damnit, you're right. Solid explorer doesn't show the content of the directory.... I use it a long time and always had the feeling solid explorer shows me all files...
Cm file manager works, thanks!
Click to expand...
Click to collapse
It does work with solid explorer as well. The point is, there is no option, to set root permissions manually in solid explorer. So the trick is to create a situation, where solid explorer will ask for root access. For example: long press any folder in your system root, tap properties, tap change (attributes) and now press OK, without changing anything. You will be asked for root access.
Now everything should be fine!
got a problem.
parameter file is empty.
using unofficial cm12 on htc one s with icecode kernel
waver1967 said:
got a problem.
parameter file is empty.
using unofficial cm12 on htc one s with icecode kernel
Click to expand...
Click to collapse
problem solved
For solid explorer, just try to open /data and it will ask for root permissions. I do it every time I flash my phone.
Thanks a lot man! I wasn't aware of the skewed minfree files. Was setting them in Trickster and wondering why the apps keep shutting down on me when multitasking. Great work
oll0 said:
Thanks a lot man! I wasn't aware of the skewed minfree files. Was setting them in Trickster and wondering why the apps keep shutting down on me when multitasking. Great work
Click to expand...
Click to collapse
They will still close even so...just not so obvious
Rapier said:
They will still close even so...just not so obvious
Click to expand...
Click to collapse
Uh yes obviously. However they were actually closing the instant i opened another app. Couldnt even keep two apps open at the same time, that was pretty bad.
oll0 said:
Uh yes obviously. However they were actually closing the instant i opened another app. Couldnt even keep two apps open at the same time, that was pretty bad.
Click to expand...
Click to collapse
Yes, I know what you mean. Was the same for me. Having better minfree settings that stick after a reboot helped but didn't solved the issue completely. But at least now phone is usable. I put my hopes in that Google patch they'll release with 5.0.3
Sent from nowhere over the air...
deleted
Thanks for this thread, I changed the permission with "chmod 666" using adb shell, but after a reboot, the files were back to write-only mode, is it normal ? How do you make it permanent ?
Sylvain_44 said:
Thanks for this thread, I changed the permission with "chmod 666" using adb shell, but after a reboot, the files were back to write-only mode, is it normal ? How do you make it permanent ?
Click to expand...
Click to collapse
If it's reverting, I guess the only way would be through an script that runs at boot time. But it's strange, the permissions should stick once set...
Sylvain_44 said:
Thanks for this thread, I changed the permission with "chmod 666" using adb shell, but after a reboot, the files were back to write-only mode, is it normal ? How do you make it permanent ?
Click to expand...
Click to collapse
I used a file explorer with root permissions like root explorer or ES file explorer. My permissions are actually rw-rw-rw, both for adj and minfree file. I guess, this is 666? And they stick after a reboot. But honestly I am not quite sure, if I changed something else. IIRC, I might have changed the permissions for system/etc/init.d/90userinit to rwxr-xr-x. Maybe you want to check this, too.
Well, they don't stick because init.rc sets them to chmod 0220 on boot. That makes me wonder if maybe it was supposed to be like this? I wanted to change it but I don't want to screw anything up. There is a dedicated section for low memory killer in init.rc and only things there are chmod 0220 for those two files and chown for them - so basically the things that we are fixing in this thread. A bug or a feature?
jakubmi9 said:
Well, they don't stick because init.rc sets them to chmod 0220 on boot. That makes me wonder if maybe it was supposed to be like this? I wanted to change it but I don't want to screw anything up. There is a dedicated section for low memory killer in init.rc and only things there are chmod 0220 for those two files and chown for them - so basically the things that we are fixing in this thread. A bug or a feature?
Click to expand...
Click to collapse
Thanks for this hint! Indeed, this might be the other thing, that I had changed. In CM11 roms, the described permissions in init.rc are 664 - both for adj and minfree file. I am not quite sure, if this helps, but it's worth an attempt. You can change the permissions in init.rc to 644, reboot and see, if the permissions for adj and minfree are sticky now. I just did this ,and everything is fine -so you can try without risk, I guess. But I must say, I hadn't the problem before, that the permissions for adj and minfree were reset after reboot. Could be related to the changes in init.rc, but I am not sure.
A weird thing: I made a backup and tried anyway yesterday but after a reboot my init.rc restores itself to normal. I tried another time: Modified the values and saved. After reopening it's still there and it stays there but only until I reboot the phone. After reboot the permissions are not set correctly and init.rc restores itself to original state. Is there something I do not know about modifying init.rc? Because that is the first time I try to do something with it.

Categories

Resources