script to embed in android device? - java

Scenario: I want to embed a script/executable (whatever) into a Android device to control the camera app, take photos open and close the camera app. I have root access to the device.
Question: Is it possible to do by using python/adb? how can I do that?

If you have root access then you can do that easily as you have full access to your device. Using background services and sometimes broadcast receivers you can achieve the scenario explained in the question.

Related

Is there a way to inject audio into a call over ADB or Appium on a Android device?

I have found some older posts which said this can not be done unless you do it via some type of VOIP app. I want to know if this has changed when making a call over the network on a Android phone from adb, appium or another way?
Is there a way to create a call and then have a audio clip played over the phone call?
Thank you

Triggering an Application launch from bluetooth device

I have a Bluetooth device that I can connect to an android phone, and I need to launch a specific application when a certain button is pressed on the Bluetooth Device.
So on press A--> Application A needs to be opened.
As of now, I am attempting to build an android application which can scan for and connect to the bluetooth device, with a set of built-in keymaps (A->Application A, etc), and the application would open up the application corresponding to the keymap, but this approach has its limitations in that I was not able to successively select buttons to transfer between apps.
Would there be a way to directly interact with the android kernal from BlueTooth to try to directly open up desired applications?
There should be a number of ways to get what you want, depending on your circumstances. We can provide more help for specifics if you post some of the code you're currently using to start the apps. It never hurts to review the basics of using Intents to start Activities.
Just guessing, but you may need to bring the requested activity to the foreground if it has already started and something else has focus.

Live-stream video from one android phone to another via bluetooth

I am intended to make an app that stream live videos from one android phone to other one via Bluetooth,i need a simple player and there is no need to save the file,just play it.
My knowledge about stream in java is not enough and I really don't know where to start!
Please help me in finding any solution. Any help will be appreciated.
There is a sample android project to do streaming live video and allows you take photos and record videos from remote phone via bluetooth.
BluetoothCameraAndroid
Android allows you to get frames as byte array using camera, you can use that api to get frames and send it across. But the problem is throttling the sending rate. That also has been handled in that project.
In marshmallow and above devices, you have to give permissions
manually in settings. This project does not include runtime
permissions
Xuggler is a Java opensource library that works with streaming and modifying media on the fly. you can start from it at:
http://www.xuggle.com/xuggler/

Mobile Device Management

Is there a way to control an android device from an admin web interface using a php code? I have tried looking into other MDM platforms however they have a lot of requirements to be installed.
This is possible up to certain limit, like Run a certain app, delete files, create files , taking pictures, play video/audio .. anything that doesn't need users extended permission.
You need to create an app that has ability to perform what ever the task you need.
You can send an action through (SMS/notification) etc to the device.
Your app will take a action and do the necessary changes of the device.

Save as a image which is on android screen

I want to save as an image which is on android mobile screen at 10 sec time interval. Which may be home screen or menu screen or any thing. Can anybody tell me how i can achieve this?
I got success for my own application but its not capturing menu screen as an image.
Unfortunately, on most devices it's not possible to get the snapshot of the device outside your application. This, obviously, for security reasons.
This could be achieved accessing the frame buffer at /dev/graphics/fb0, but normally you don't have the permissions to read that.
You need to have a root access to achieve this. Write a background service and execute "/system/bin/screencap" to get the screenshot. Check this answer to find out how to get screenshot and store in sdcard.
Alternatively you can use Android Screenshot library to get screenshots on a non-rooted phones but it requires your phone to be connected to your desktop using ADB.

Categories

Resources