{"id":16525627,"url":"https://github.com/camdavidsonpilon/sms_terminal","last_synced_at":"2025-07-05T06:06:04.034Z","repository":{"id":4258612,"uuid":"5385139","full_name":"CamDavidsonPilon/SMS_Terminal","owner":"CamDavidsonPilon","description":"Turn your Android into a SMS-based terminal line using Python!","archived":false,"fork":false,"pushed_at":"2012-09-02T14:30:43.000Z","size":103,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T12:51:14.359Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CamDavidsonPilon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-12T01:57:12.000Z","updated_at":"2023-09-08T16:34:46.000Z","dependencies_parsed_at":"2022-08-06T15:16:47.697Z","dependency_job_id":null,"html_url":"https://github.com/CamDavidsonPilon/SMS_Terminal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamDavidsonPilon%2FSMS_Terminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamDavidsonPilon%2FSMS_Terminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamDavidsonPilon%2FSMS_Terminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamDavidsonPilon%2FSMS_Terminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CamDavidsonPilon","download_url":"https://codeload.github.com/CamDavidsonPilon/SMS_Terminal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238623009,"owners_count":19502963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T17:04:21.032Z","updated_at":"2025-02-13T08:31:22.569Z","avatar_url":"https://github.com/CamDavidsonPilon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Turn your Android into a SMS-Based Terminal\n===========================================\n\nSee [this intro] (http://camdp.com/blogs/turn-your-android-phone-sms-based-command-line) for a description of \nwhat can be accomplished.\n\nTL;DR\n------\nBasically, send your Android device SMS messages containing commands and your device will run said commands. Useful if\nyour phone is not on you (it is charging, lost etc.) and you hate that feeling. Ex:\nIf I text (from my friend's phone) my Android \n\n    root -h\n    \nI receive\n\n    -h #help \u003cbr/\u003e\n    -s #all scripts available\n    -d [script] #doc for [script]\n    -r [script] #run [script]\n    -l #location\n    -u [pass] #unread messages\n\nwhich I can use to send more commands to my phone. \n\nInstallation Guide\n----------------\n\nFirst, you need two apps: [SL4A](http://code.google.com/p/android-scripting/) and [Tasker](http://tasker.dinglisch.net/). Tasker is paid, yes, but if you have an Android you're gunna want Tasker. \n\nInstall SL4A and the Python package.\n\nIn the script that initalizes your SMSTerminal object, called receiver_script.py above, specify a *root word* and a *password*. The root word, *root* in my \nexample above, keeps just anyone from running commands. It can shared with friends as you wish. If things get unruley, just\nchange the root word.\n\nThe password is for more sensitive commands, like returning all unread msgs.\n\n\nSMSTerminal.py contains some default commands like the ones above, and you can create your own. The main structure should look like:\n\n    def _x(self, [optinal args], [optinal defaults] )\n        try:\n            \"\"\"Do fun stuff here. If everything goes well, return MSG to text back.\"\"\"\n            return (MSG, True)\n        except:\n            \"\"\"Oh uh, something went wrong. Let MSG be some error message.\"\"\"\n            return (MSG, False)\n\nFor example:\n\n    def _r(self, script):\n        #r: runs a script on the phone and returns the result. Usage:\n        #-r \u003cscript\u003e\n        try:\n            script = self._removeTrailingPy( script ) \n            execfile('/sdcard/sl4a/scripts/' + script + '.py' )\n            return (\"%s ran successfully.\"%script, True)\n        except:\n            return (\"No script called %s exists in /sdcard/sl4a/scripts/\"%script, False)\n        \n        \n        \n\nFinally, create a Tasker profile to run whenever a text is received. The task should be to run the script reciever_script.py (which\nshould be in the same folder as SMSTerminal.py). \n\nThat should be it!\n\nLastly\n-----------------\nemail me at cam.davidson.pilon@gmail.com and visit me at [camdp.com](http://www.camdp.com) and follow me at [cmrn_dp](http://twitter/cmrn_dp)\n            \n        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamdavidsonpilon%2Fsms_terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamdavidsonpilon%2Fsms_terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamdavidsonpilon%2Fsms_terminal/lists"}