[Guide] Tasker - Automated Fstrim with Email Output - T-Mobile, Samsung Galaxy SIII

Tasker is a great automation tool for Android. There are many ways to do tasks and automation so this is simply my way. Feel free to modify for yourself in any way and comment.
I'm using a T-Mobile Galaxy S3 running Anthem AOKP ROM with Android 4.2.2.
DISCLAIMER: If you don't know what fstrim is or does please do not use this guide until you understand fully.
DO NOT USE THIS WITH ANDROID 4.3. Why? Android 4.3 already includes an automated fstrim so you would be redundantly running this.
Assumptions in this guide:
1. You have ROOT.
2. You have Tasker app from the Play Store.
3. You have Secure Settings app from the Play Store.
4. You have Hacker's Keyboard app from the Play Store. Why?? I have not found a way to simulate a "long press" to create the ability to "paste". As a result, I use this keyboard and the 5 row compact layout that allows Tasker to physically touch the Ctrl key and the V key for pasting.
5. You are using the keyguard only, no PIN or Pattern. Tasker and Secure Settings allow this but you must select other options than Keyguard to make it work.
5a. The above is striked out because I was not having the correct success unlocking the "swipe" to unlock. As a result, this guide so far has only worked with no keyguard at all but I'm sure it will work fine if you substitute PIN and Pattern using Secure Settings.
6. You have fstrim utility.
To check if you have fstrim, open a terminal app and type "busybox". Look for fstrim in the results. If you have it proceed, if not you will need a custom busybox or a ROM that has the utility built into it.​
The next set of steps will create the required task and then the profile to run the task. In the end, we will run fstrim on 3 partitions and email the output of the results to ourselves. I do this for a "Daily Dashboard" of sorts. You don't need to do the email portion if you don't want. You can always just run the task or create it as an app using Tasker functionality.
1. Open your file manager and create a new file on the sdcard or the extsdcard. I will call my file in this guide "maintenance.log" and I will use the location of "/extSdCard/maintenance.log". You may choose whatever path and filename you wish.
2. Tap on the TASKS tab at the top of the app.
3. Tap the + and name it. I named mine Fstrim.
4. Tap Fstrim task and click the +. Select Plugin > Secure Settings > tap Edit > Wake Device > Screen & Keyboard Lights On. Choose a value. 4 seconds is fine because once the screen is on, it defaults to the normal Android timeout value of the lockscreen before it goes black. (freely change as needed)
5. Tap + and choose Plugin > Secure Settings > Keyguard > Off
5a. See the above 5a. strikeout reason. Here is where you could substitute PIN and Pattern.
6. Tap + and choose Script > Run Shell.
In the Command box, type rm /extSdCard/maintenance.log (this is used to delete the log on each run so we only have the output of the last fstrim run. Use whatever directory you wish to store the log file in and whatever filename you wish to use.​7. Tap + and choose Task > Wait > use the up arrow for 5 seconds. (this is built in padding in case of deep sleep issues).
8. Tap + and choose Script > Run Shell > put these 4 commands in the Command field and tick the "Use Root" check box.
date >> /extSdCard/maintenance.log
fstrim -v /data >> /extSdCard/maintenance.log
fstrim -v /system >> /extSdCard/maintenance.log
fstrim -v /cache >> /extSdCard/maintenance.log​9. Tap + and choose Display > System Lock
10. Tap on the TASKS tab at the top of the app.
11. Tap the + and name it. I named mine Maintenance Email.
12. Tap Maintenance Email task and click the +. Select Plugin > Secure Settings > tap Edit > Wake Device > Screen & Keyboard Lights On. Choose a value. 4 seconds is fine because once the screen is on, it defaults to the normal Android timeout value of the lockscreen before it goes black.
13. Tap + and choose Plugin > Secure Settings > Keyguard > Off.
13a. Again, here you can choose PIN and Pattern instead of keyguard.
14. Tap + and choose Task > Wait > use the up arrow for 5 seconds. (this is built in padding in case of deep sleep issues).
15. Tap + and choose File > Read File > put the location and filename in the field. > In "To Var" type %filecontents. (You can choose any variable name you wish).
16. Tap + and choose Misc > Set Clipboard > in the "Text field type %filecontents.
17. Tap + and choose Task > Wait > use the up arrow for 5 seconds. (this is built in padding in case of deep sleep issues).
18. Tap + and choose Net > Compose Email > put the recipient (yourself) and fill out Subject line.
19. Tap + and choose Task > Wait > use the up arrow for 5 seconds. (this is built in padding in case of deep sleep issues).
20. Tap + and choose Script > Run Shell > put these 3 commands in the Command field and tick the "Use Root" check box.
input tap 90 1232
input tap 320 1123
input tap 664 100​21. Tap + and choose Task > Wait > use the up arrow for 5 seconds. (this is built in padding in case of deep sleep issues).
22. Tap on the PROFILES tab at the top of the app.
23. Tap + and choose Time. You only need to set whatever time you want in both "From" and "To" in order to have the task run every 24 hours. You shouldn't need to set the time with minutes in between. For example, I run mine at 4:30 every morning so both "From" and "To" are set to 4:30. Change this accordingly if you feel you need to.
24. Make sure your PROFILE is set to On.
25. Make sure Tasker is running, long press the gear icon at the top left when the app is open. You will see a toast notification that says enabled and when you exit the app, the running icon will be at the top left in your status bar.
26. Enjoy!

***Reserved***

I have edited some of the steps to remove keyguard as it wasn't working right for me on my ROM. Others may have luck but use PIN/Pattern instead.
Also, I was able to use the Input Method switcher in Secure Settings as well so you can add that option to change back to your preferred keyboard if you do not wish to use Hacker's Keyboard all the time.
Mine was done at 4:30AM so while there was minor catch up switching the keyboards, it wasn't an issue by the time I started using my phone in the morning.
Another side point, the specific input tap commands are static locations of where the "send" button for Gmail would be located. If you are using a different email app you would go to your developer options and enable the option to see input touches and grab the appropriate X,Y coordinates. The same is for Hacker's Keyboard as well. They should always appear in the same location so my coordinates should work.
Let me know if it's not clear or you have any other questions.

Related

Map "OK" Button

Does anyone know how to map the "OK" button (the one on the side next to the scroll wheel). I have practically no use for it. Or what about the ok button on the main face?
Its button five. Just go to settings, button and then select a different function for it.
I have SPB Pocket Plus and map that button to ALT TAB
unwired4 said:
Its button five. Just go to settings, button and then select a different function for it.
I have SPB Pocket Plus and map that button to ALT TAB
Click to expand...
Click to collapse
button 5 is the voice button not the OK button.
I too would like to remap this button. I use Wisbar Advance and I could map the Close/Ok command of Wisbar to this button. Right now I have it assigned to the Comm. Manager button. but as the OK button is of little use to Wisbar it would be nice to us it.
Is it possable?
Try using PQzII. I have successfully mapped the ok button with it. The button code is hex 0x75 or decimal 117.
http://www.nicque.com/PQz/PQzII.htm
Just put a line at the Program.ini:
"0","117","\Windows\VJOkButt.exe",""
yeah,
works great.
I used AE-Button before, but the nag screens were really annoying.
It is much easier using WkTask.
If you dont want to edit the Program.ini manually, here's a small tutorial
1. Download Install the appropriate PQzII*.cab file for your device
2. Right-Click(Tap&hold) on the uqly white Square at the Top of you screen and select setup.
if this does not appear for any reason, Start the PQzIISetup right from the Programm directory.
3. In the Setup, select the Program Tab.
4. Check "Use this function"
5. Click "Add"
4. Leave 'none' for the "Key" field, enter '117' in the "Code" field.
5. Enter the path to the programm which minimizes/exits your programms (for me this is \Windows\WkTask.exe"
6. Enter the parameter for the programm (for me this is /c)
(7). If you want to remove the ugly white square select the icon tab and uncheck "use this function"
8. Save Settings with "OK".
9. If you want to startup PzII automatically after device startup, create a shortcut to the exe in \Windows\Startup
Hope this helps you
regards,
Tobias
8. Start

Smaller font in Start Menu

Hi all,
is here anybody who is not using TF3D and do not like the very big font in start menu? I tryied to get it smaller via SKTools, Advanced Config and nothing helped Any ideas?
Thanx a lot
I'm using TF3D so not quite sure. But isn't that Settings > System > Screen > third tab and then slide it to the left?
It smallers only system fonts almost everywhere, but not in startmenu i mean the classic menu what appears after clicking on it...
I'm 100% sure I had this option on my TP and Diamond.
Maybe it's in: Settings > System > Taakbeheer (something as in tasks or so) > 4th tab (1: Active, 2: Exclusive, 3: Button, 4: Other).
Perhaps put the second bullet on "Small Size"?
This option is only for Task Manager, but not for start menu...

No option menu "Complete action using" to use other dialer!

Hello,
I installed MobileVoip and Viber in my HTC One X.
When I call a number from:
- default dialer,
- the contact list
- or Dialer widget
I don't get the option menu "Complete action using" to select Dialer, MobileVoip or Viber. Look at the attached screen-shot (from my previous Galaxy Note). To use MobileVoip or Viber, I have to dial the number in those apps.
I already checked the details of the 3 apps (with a phone icon) in SETTING > APPS > ALL APPS tab. And none has default action, the button "RESET DEFAULT ACTIONS" is deactivated (non click-able).
This menu "Complete action using" appears for other type of action, like opening a .LOG file or a .PDF file.
The missing menu "Complete action using" when dialing:
- Is that a One X bug?
- Do you experiment the same problem?
- If yes, did you find a solution (which one)?
Thanks and regards.
CONFIG: HTC One X. Firmware 1.29.401.11, Android 4.0.3, Not Rooted.
More screen-shots of my HTC1X to illustrate my problem.
- The menu "Complete action using" appear when I open a .PDF file.
- 3 apps (with a phone icon) found in the list SETTING > APPS > ALL APPS tab.
- the detail page of one of those 3 apps showing the "Default action" part.
Thanks and regards.
I found how to get this dialing option menu from the call history (only).
Long press a call item and you get a menu, In this menu select "Edit number before calling" then you get the dialing option menu.
Look at the attached 2 screen-shot.
Are you on the AT&T One X or the International?
Thought this was the fix for the AT&T one to let it pass US customs.

Test my Tasker Profile - Profile Switcher - WIP

I've begun creating a profile scheduler. You can manually change your sound settings using a shortcut added to your home page or add a date and time to allow for automatic changes or by enabling a notification option which adds an icon to the notification bar. This is my first time creating scenes so the GUI isn't all that great yet but it's functional and will change once more complete.
To add it to a home page long click and select to add a Shortcut. Select Task Cut then Profiles. Two automatic profiles are already created (Work and Sleep) so you'll want to change the date and times to suit your own needs. If you add a new timed schedule there are currently 3 tasks you can choose to add (NormalPro, VibratePro, SilentPro). The tasks with Pro at the end are meant to be used only for the automated profiles. If you tap on one of the 3 buttons it will manually enable that setting and disable any automatic times schedules. If you long click one of the 3 buttons it will enable that profile and enable automatic timed schedules (This function will change once I add the individual settings option for each profile). Alternately, you can click the green button to turn on/off the timed profiles.
So far the only 2 settings are available. Close on Select will close the main Profiles window upon selecting one of the 3 profile settings. Notification adds a permanent notification in the notifications bar which launches the main Profiles window when clicked.
It has a boot function so your last setting and profile after boot will be restored.
Installation: Download the attached file to your "sdcard/tasker/projects" folder on your phone, open Tasker and long press on a top Projects tab, and select Import.
Downloads:
Mirror 1: http://db.tt/SCZNA14v
Mirror 2: https://www.box.com/shared/d7hjqzw9fay2cqwfpngv
Future Plans:
Add option for volume adjustment levels for each profile
Add more Profiles like Outdoor which will have higher volume levels by default
Add a whitelist/blacklist
Add option to auto enable profiles based on location
Add option to turn on/off functions like mobile data, wifi, bluetooth

How to create Extreme Power Saver shortcut in home screen for HTC 10/M9/M8

Hello!
I am happy I could create an Extreme Power Saver shortcut in home screen for HTC U11/10/M9/M8 and I would like to share how I accomplished that.
1) Download, install and run application QuickShortcutMaker from Google Play Store.
2) Search for "power" in Activities tab, expand power and click on "ExtremePowerSaverConfirmActivity" as shown in the attachment in this thread.
3) Optionally change label or icon if you like. (One sample icon image is attached below)
4) Then click "Create" (note that "Try" option will not work).
5) Test the new shortcut to set EPS automatically from home screen!
Thanks!
Daniel Liedke

Categories

Resources