Scripts are small programs written for a command interpreter or another scripting language.

learn more… | top users | synonyms

36
votes
3answers
81k views

How can I run a script on boot?

I'm accustomed to running scripts on boot in Linux, but I'm not sure how to do this in Android. I'd like to start my SSH daemon on start, so I'll always be able to connect. How can I run an arbitrary ...
13
votes
1answer
6k views

Start an Android application via a shell script?

Is it possible to start an actual Android application from the command line in Android? For example, say I'd simply like to start/bring to the front my calendar. Is there a way that I can do this like:...
9
votes
2answers
11k views

On Android can I write scripts (similar to Win .bat files) to combine several command line commands?

On Windows, I can run two commands using a .bat file. How can I achieve the same thing on Android For example: update my podcasts by calling pcastclient /updateALL force sync of my pictures ...
4
votes
2answers
6k views

Is there no way to get scripts to run in Android?

Since Android is Linux at its base, I logically think it should be possible to run a script on Android, like a Python script or PHP script (with executable bit obviously). If not conventionally, is ...
4
votes
4answers
5k views

how can I randomize my MAC address every time my WiFi is turned on?

Given the increased prevalence of systems which track people's movements by their Mac addresses I'd like to obscure mine. I have a rooted galaxy note 2 with busybox installed. I can change my MAC ...
4
votes
0answers
735 views

How can I change preferred network type through a script (or terminal command)

I'm currently attempting to create a workaround for a problem that is plaguing a ROM that I'm using. While my phone and ROM are capable of using LTE, and use it perfectly fine, the "preferred network ...
3
votes
1answer
430 views

How does a update.zip file update files

I have been searching online on multiple sites and could not find one answer to this question, only found one question online but with no answer How does the android recovery update files from a ...
3
votes
1answer
568 views

init.d doesn't get executed

i am using samsung s2 and a custom rom, external sd card is mounted to /emmc but i want it to mount to /mnt/sdcard/external_sd, how could i mount it using init.d? i made a file called "99mount" with ...
3
votes
1answer
611 views

Can't run any Python script on my Android phone

I have an Acer Liquid Metal, Gingerbread... I've tried installing Python on Android (and s4la: http://code.google.com/p/android-scripting/) but when I run the hello world script I get: dlopen ...
3
votes
3answers
2k views

Shell script to kill custom apps, run another app then restart killed apps?

Is it possible to make a shell script that would run using Smanager, for example, to do the following: Kill a list of custom apps loaded from a file Run one custom app loaded from the same file When ...
2
votes
2answers
1k views

How can I execute a script on the SD card and be able to pass arguments to it?

I tried executing a script on the sdcard as is because on FAT, everything is 777. ./.profile ./.profile: permission denied I added this as the initial command for the Android shell and it executes ...
2
votes
0answers
34 views

Is it possible to have the system/kernel reverse x-axis touch input?

I have a galaxy S6 G920F. I have this problem with my touchscreen. The x-axis input is reversed. When I touch it on the left part it registers the touch on the right etc.. Is there a way to just ...
2
votes
0answers
343 views

Running your own .sh script at vold.decrypt=trigger_shutdown_framework via init.rc (android 5.0)

I want to workaround a vendor bug in an Android 5.0 phone (chinese, MTK, no proper source) Problem is due to a bug in some binary, /data is not properly released on vold.decrypt=...
2
votes
0answers
171 views

ifup/ifdown scripts

I am fiddeling with some network related things and want to try them on Android too. In Ubuntu it was quite easy to run some commands if an interface (eth0 or wlan0) goes up or down by simply adding ...
2
votes
1answer
46 views

Share text via HTTP request

I'd like to add an item in the system "Share" menu that sends links and other small text via HTTP POST requests. On my PC i'm using curl + a shellscript.
2
votes
1answer
4k views

How can I successfully run this script on a emulated terminal on Android?

Background I am trying to install Ubuntu onto my Acer Iconia A500 using VNC and this application called Complete Linux Installer. My tablet is rooted and I have found several sources saying they have ...
1
vote
1answer
136 views

Acquire Android image using flash drive OTG

In Linux, the dd command is used to pull the image from the smartphone to computer. And of course, the smartphone need to be rooted before the dd command launched. Is there any specific command or ...
1
vote
3answers
655 views

Home screen icon for terminal program?

I'm using terminal-ide http://code.google.com/p/terminal-ide/ which is basically a terminal for android with all sorts of utilities. One is able to create bash scripts for example. Is there a way to ...
1
vote
1answer
123 views

How can a shell script get the number of an incoming/outgoing call?

new user here from Montréal, Canada! So i have a shell script that runs when a call comes in, and another one that runs when i make a call. How can this script get the phone number of the caller / of ...
1
vote
1answer
122 views

How to run 2 shell scripts from ramdisk?

I am attempting to setup my ramdisk to fire off 2 sets of scripts. 1 is ramdisk /sbin only, the others are user allowed scripts # Check Properties on property:dp.early_init.done=1 chmod 0777 /...
1
vote
1answer
370 views

mount in /data/local/userinit.sh is not working

I want to map /sdcard/DCIM to /storage/sdcard1/DCIM using CM 12.1 on a I9100 I wrote those few lines to /data/local/userinit.sh: #!/system/bin/sh log -p i -t userinit "userinit start"; mount -o bind ...
1
vote
0answers
377 views

How can I run a shell script when some WiFi is connected?

I have a really simple shell script, that just adds a route to my internal development machine. This is useful, as that machine has some LXC containers inside, so I can reach all my containers from my ...
1
vote
1answer
1k views

is there a way to run *.sh file by just touching it in a file manager?

I mean like it is when user opens an image file a pane opens where user can select app for given type. But when I'm clicking on *.sh file the first option that shows up is to open as text/audio/video/...
1
vote
2answers
1k views

How can I manage “desktop” icons

I want to remove all the icons on the desktop, (and also in the bottom bar) and place new ones via ADB. My script already removes all the apps, but icons/shortcuts remanin there! Is there any command ...
1
vote
0answers
616 views

Help with this ADB REVERSE Tethering Script?

I added the functionality to automatically turn on reverse tethering after many fails: Now i only enter t into terminal alias t='r && sz $tether && r && sz $n' tether='am ...
0
votes
4answers
7k views

How do I script my phone?

What I mostly want to do, is quickly alter settings, add alarms etc. It is perhaps called something else? This is from a Windows PC. Language is not important, but I know Python and UNIX scripting. ...
0
votes
3answers
6k views

How to create an update.zip file that can copy & rename a file?

Here's exactly what I'm looking for - I need an 'update.zip' file that can copy a file (example): /system/framework/file-to-copy.apk to another folder: /system/ and then it would rename the 'file-...
0
votes
1answer
878 views

Where are binaries installed?

I just recently rooted my phone so I could install SL4A. I want to execute some commands via a Python script, specifically turn Google voice off for all calls, make the call and then turn it back on. ...
0
votes
1answer
3k views

Run shell script in background process no matter what activity in foreground? [closed]

I have a shell script that looks does the following: # /mnt/sdcard/touch.sh sleep 10 while [ 1 ]; do input swipe 700 380 1020 600 1000 input tap 960 540 input swipe 1220 700 900 480 1000 ...
0
votes
1answer
494 views

Can I run scripts on startup on rooted Galaxy Note 3?

I want to be able to run a shell command (e.g. mount) on startup on my Galaxy Note 3 (stock rooted Android 4.3) Typically on Linux that'd be done using /etc/init.d but I don't have that directory on ...
0
votes
1answer
2k views

regularly refresh Chrome tab

I have a Transformer Prime TF201 which I sit next to my main pc to display a webpage that shows stats about the systems I work on. However this page is a bit rubbish for updating and will time out ...
0
votes
1answer
135 views

How do i root Android x86_64?

I installed android x86_64 and now I want to root it but all the root scripts are for 32-bit versions of Android. I am using console os lollipop that is not rooted. What are my options? Thanks
0
votes
1answer
342 views

Automating adb commands

is there a way to run adb shell commands via windows? I would like to run a batch script such as this adb shell mount -o rw,remount /system exit Currently when i run the batch script it only ...
0
votes
3answers
3k views

How can I change my pictures' and videos' date on my phone by their filenames?

Yesterday, I moved a bunch of old pictures and videos to my phone, using a FTP server I installed on my phone. Everything went fine, but today I discovered that the date of all the copied photos and ...
0
votes
1answer
195 views

start app on startup and click coordinate

I want the tethering app to start whenever I start my phone, when the tethering app starts there is a big button on the center of the screen which has to be pressed so the phone would start to tether. ...
0
votes
3answers
6k views

(ROOT apps, tweaks, roms, scripts, hacks) cydia like app for android? [closed]

i was wondering if there was an app for android that is like cydia. i want an app that has a huge collection of tweaks, hacks, roms, scrips, apps, themes; just like how cydia (for ios) has. im not ...
0
votes
0answers
36 views

CWM recovery Nandroid Backup

Is there any way to create a Nandroid backup inside CWM recovery, by using the /cache/recovery/extendedcommand file? (This file supports all the commands a normal updater-script file supports inside ...
0
votes
0answers
51 views

Automatically scroll down using the UI?

I have an app with a window/UI that is extremely high/long. I have been scrolling down manually for several minutes without reaching the end. Is there a way to script Android to scroll down? On my Mac ...
0
votes
0answers
191 views

How to remount /system from host shell script?

I am trying to remount the /system partition from a shell, and tried both commands suggested in this post, but it does not work. Here are the script commands I am issuing: adb shell mount | grep -e "...
0
votes
0answers
68 views

Wanted: A shell script to automate upgrades

I have a rooted Nexus 5, but this question would apply, I think, to any rooted device running Android 5.x and higher. Note also this is a question about a script to run on a osx/linux to manipulate ...
0
votes
0answers
46 views

How to store list of installed (paid and unpaid) apps to a log file?

I would like to store a list of all paid and unpaid apps in a log file (which I would then upload to Google Drive or FTP to some other server). This way if my phone is lost, stolen, or breaks, I will ...
0
votes
0answers
76 views

How to run a startup script on android mk808b plus?

I'm using an authentication app called 'Proxy droid' to authenticate mk808 device on our network. Every time device get restarted I've to manually switch on the app and then switch on the ...
0
votes
0answers
75 views

Any way to disable/enable mobile/cellular data via a binary executable?

I want to create a script that involves disabling and enabling mobile/cellular data, but I can't find a binary for it anywhere. Am I missing something? (I have CM12.1 if there's something that it has ...
0
votes
1answer
375 views

How to display Python script output on screen, similarly to Conky

I use Conky as a desktop monitoring software. I also use it to monitor stock prices and portfolio net worth through a Python script. Basically, I fetch the stock prices from Yahoo Finance using curl....
0
votes
0answers
298 views

Mounting USB in android 4.1.2

I am trying to mount USB pen drive in my old Xperia phone running andorid 4.1.2 When I connect OTG device to my phone I get an USB power consumption error. After little search I found a command to ...
0
votes
1answer
2k views

Terminal emulator permission denied on complex commands

I'm porting a script that runs well on android 4.0.4 to android 4.4.2 Simplified it does this: ls *.a | ./busybox xargs ./busybox rm -f I'm using a busybox binary in mi app's folder. The error I'...
0
votes
0answers
124 views

How to automate post install setup

I've noticed recently that i spend quite a bit of time setting up various settings after a clean ROM install. I was wondering how could i automate this post install hassle. Specificly im talking ...
0
votes
1answer
283 views

How can I detect if a shell script is running on Android?

What is the most reliable way to detect if a script is running on Android (instead of a regular Linux build)? To run scripts, I'm using bash, the Terminal app, and BusyBox.
0
votes
0answers
532 views

sound alarm from terminal emulator

For my purposes, I want to create a simple bash script, that will notify me when appropriate conditions will meet. Is there a way to make a sound alert from Android Terminal Emulator? I'm running ...
0
votes
1answer
131 views

Handeling android emulator via command line

I installed default android emualator in windows xp . Is there a way to launch android browser with a specific url open on it with help of command line . Basically I use emulator for testing my ...