What is the equivalent of batch for windows on android? - android

I want to make a simple script that starts recording and stops recording and sends the record as an E-mail attachment. Is that possible on Android? If not what language should I choose to create some alternative (for example an app)?
If you downvote follow, or at least tell me what's wrong in the comments.
Thank you in advance.

If you want run shell comand in Android app you can use this code:
Process process = Runtime.getRuntime().exec( " your comand here " );
Anyway there is no something like batch scripts. There is only applications.

Related

Flashing/customizing an ELO paypoint Android POS

I realize this is really open ended, but I'd like some pointers on how to get started creating a custom Android installation on this device: https://www.ebay.com/itm/403682194105
I guess I need to replace the current OS/(firmware?) on it with something stock-ish (provided by ELO? Or generically Android? I guess it's got to be from ELO for various device drivers/integration?) to start with - it's currently running something for some POS startup, which I don't have login info for, and wouldn't do what I want anyway
I'd hope to write a custom app that'd run on-boot with some basic touch/animation - maybe eventually reading some serial inputs
I'd appreciate any/all pointers to get started.

How to create bot test in android

I want to create an application that open another application and begins to fill fields type text and select like Xmodes in games . This application is for test my application in real mode
I now i need root my divice to do this
Any help please
I don't know if this is exactly what you are looking for, but it could be helpfull.
ADB has got a command called UI/Application Exerciser Monkey.
With this command the ADB will automatically perform random click, slides, input on one of your application activity.
You can set some parameters too if you want to define which kind of input and operation should the monkeys perform.

How would I stop something that was started by an app for itself without stopping the app?

Note: I'm fairly new to linux/android when it comes to using the shell and commands/scripting, so if I've given some unrelevant information, or I'm trying to do something not possible, please tell me what's not relevant and why something is not possible and explain anything else to help me become better at this.
I'm trying to make a script that stop's Orbot's Tor network automatically when I exit from the Orfox app. So far, I have most of the coding down except for the stopping part for Tor. I believe there is something I can use in a shell script that would stop the Tor network right?
Currently, my script uses the command
# am force-stop org.torproject.android
to stop the app (to stop the Tor network), but I know that can't be the only way...
I know that when I press the Start button (within the Orbot app) or open up Orfox, it starts up the Tor network... When using
# ps | grep torproject
2 times (before and after starting Tor), I found that
u0_a291 11209 1 23092 15712 sys_epoll_ b68ecf18 S /data/data/org.torproject.android/app_bin/tor
shows up only when Tor is on.
I also found that after using
# ps | grep u0_a291
(the same way as the last command) that two shell's are started:
u0_a291 11150 8783 3780 1336 pipe_wait b6d9d0ac S sh
u0_a291 11212 8783 3780 1340 pipe_wait b6dec0ac S sh
only when tor is on.
I'm assuming some of the commands running through one or both of the shell's will give me a hint as to what commands I may need in order to stop the tor network in my script, but I have no idea how to view them or if I can. Is there a way to view them, or maybe I'm going about trying to find out how to stop Tor in the wrong way? So help me out guys, please.
I figured out what it was after all, and I didn't need any of the information that I provided... facepalm
I found out what the service and intent action I needed by looking at the base.apk (in /data/app/org.torproject.android) as an archive. I looked at the AndroidManifest.xml like a text file and found the service and it's intent action to be
.service.TorService
org.torproject.android.intent.action.Start
I concluded my script by using this to stop the tor service... I bet this might help someone else out in the future.
# am stopservice -n org.torproject.android/.service.TorService -a org.torproject.android.intent.action.START

Recording tool for tesing android applications

Is there any application that I can use to record user activity with android applications?
I want to get the user steps when they are testing the application. Is it possible to record their steps (maybe as screenshots)?
You could use the LogCat. At every step you want to record, print something to the LogCat
Log.D("Button Press", "User touched the 'View More' button);
And then using the LogCollectors source code (http://code.google.com/p/android-log-collector/
) you can email it to yourself and conduct your analysis.
Alternatively, you could try to use monkeyrunner (http://developer.android.com/tools/help/monkeyrunner_concepts.html) and create a script that runs and takes screen shots while the user uses the application [not sure if that would work - have never used it].
I would think for the purposes of collecting data, using the logcat would be a smoother and more detailed process.

Can I catch LogCat messages when using the phone normally (not connected to the pc)?

I want to know if there's any way of recording logcat's messages when I'm testing my app with a real phone in a real environment. What I'm trying to achieve is to take my phone elsewhere and if anything goes wrong with my app, trace back why it went wrong. Especially if I give my app to a friend (or a boss) to try it out, they can't give me a lot of feedback on problems.
I could just print all the output to a .txt and then read it, but I'd like something a bit nicer
Any Ideas?
Yep ! Install aLogcat ! Very useful :)
aLogcat app
One way is to create your own Log.java function and then just change the import function to match your Class. In your Log.java you could write all the logs to some buffer and periodically save it to sdcard.
one more way is to
open adb shell
logcat > \sdcard\log.txt &
This will continue to run until restart of phone.

Categories

Resources