Source code of Android Market app is not available.
What I want to do is reversing the network protocol used by the market.
The purpose is to build a tool that can simulate a handset and search for a particular phrase, thus returning the rank of a target application (or maybe the whole list for that particular keyword)
I can connect my Android phone to my home wifi network. Then I need a way to set a "proxy" and a tool like Wireshark. Maybe it would be easier if my phone were rooted, but I don't want to mess with the factory rom. Does anybody have any suggestion? Or maybe has a rooted phone and wants to collaborate with me?
Someone has already done the work, did you look at the android-market-api - they actually have what you want!
Related
In what way could I control an android app from another app that could be on iOS or android?
My use case is I want to be able to control an android tablet that's part of a smart-home product. In this case I don't have direct access to the tablet's screen as it's encased inside the product. So I'd like to control the tablet via another android/ios app.
Specifically:
be able to connect the android tablet to wifi
could I host a server on the android tablet to be able to communicate with it once connected to the wifi?
For part 1 I was thinking I could do something along the lines of have the tablet be in AP mode and use the client app to connect to it, is it possible to update the tablet's wifi once that is done?
If you were writing both pieces of software you could, although I wouldn't recommend it- Android is not meant to be a server OS, the battery optimizations and unreliability of Services make it a poor choice. Plain old Linux would be better. But controlling a 3rd party app remotely? You may be able to make something work, kind of. Something like connecting via wifi debugging, rooting the device, and sending raw touch events via the /dev/ filesystem. But it will be fragile, prone to breaking, and really hard to do. You're better off looking into open source solutions, like OpenHab.
Is it possible to know whether an android phone has OTG support without rooting? If so how? I am asked to check some information before developing an app for android.
Yes, you can download a USB On-The-Go checking application from Google Play.
This one below for instance doesn't require root, although it does require that you follow the exact plugging and unplugging steps.
Before I give you the link thought, I must warn you that this app asks for way too many permissions and can display very intrusive ads that can draw themselves on top of other apps. If you install this, definitely uninstall it and get rid of it as soon as you're done with it.
Another thing you could do is just google for the exact model name. That kind of information is usually included in the specs, in the pdf specs, in wikipedia, or in some tear-down blog. If the specs won't even tell you the usb version number at the very least, then you'll know to keep on looking.
Is it possible to simulate a USB or Bluetooth device connected to Android?
I would like to make an app which is able to simulate an HID device locally. What I mean by this is: the app should make Android believe that an USB/Bluetooth HID device is connected. This would allow my app to inject touch events globally, I hope. Is there anyway to simulate a (virtual) device? Note that I don't really care about the device, I just want to use the built-in support for HID input.
I know a lot of people already asked about touch event injections but this approach seems to be a little bit different. I do not want to use this for testing purpose, so InstrumentationTestCase and the like won't help.
Rooting the device might be an option, although I can also imagine to ask my endusers to install a specifically signed app manually (according to https://stackoverflow.com/a/16737083/2923406 and https://stackoverflow.com/a/22902808/2923406 this works, but it would be device specific).
I am aware of:
Simulate a mouse input on android - This guy seems to do it in his own app, although his questions wasn't answered ;)
http://www.pocketmagic.net/2013/01/programmatically-injecting-events-on-android-part-2/#.U58SqfldVHV - Needs Root. Did anyone succeeded in using this? Also, the solution seems very device-specific again.
Bluetooth + simulating mouse - That's not what I want. The phone itself should not be an HID device, but use the (virtually created) one itself. Same for this:
https://stackoverflow.com/a/8174973/2923406
Note that I do not want to turn my phone into an HID device of any kind.
Simulating is a broad term. When I created my Bluetooth app I "simulated" a Bluetooth connection in two ways.
Way 1: Use a serial port UART converter and hook it up to a Bluetooth module transmitter.
Then you can use a terminal program like CoolTerm, to send your data.
Like so. In this case I coded in a string to send on successful connection with the device however you can make a infinite loop for testing purposes effectively not requiring your phone to be turned into a HID device.
Way 2 (not easy): Use your computers bluetooth in a server/client relashionship model.
This is harder to do. What you can do is convert your pc/mac into a server and the Android phone into a client or vice-versa. For this you will need to write external code which will need to be compiled separately on a jvm(java virtual machine). The procedure to do this can be found here. If you are using a Linux machine you have to separately download the Bluez module. I have not tried this on any other operating sytem other than Ubuntu, and it was a pain to get functional.
Hopefully that helped.
Yes, it's quite easy using the AOA2 protocol check this & this links for details ( you'll need to switch your device to the Accessory mode )
This may be possible (or at least be easier) using the Robolectric library, which simulates a full Android device locally. Although it is intended primarily for testing, the fact that it simulates a whole device locally - including Bluetooth and USB - means adding to it may be an easier approach.
In other words, you may be able to modify the classes it uses to simulate these abilities locally (i.e. in the IDE itself without an emulator or device) in order to simulate them on the device itself. After all, it does provide full simulations of these functions. You could simply change these Bluetooth and USB simulating classes to load onto the device itself rather than onto the local Robolectric test "device."
This is just an idea though - I can't confirm this will work - it just might be a good place for you to start.
I am currently working on a research project which involves people playing games on an Android device. I am hoping to be able to write an android app that records the accelerometer and touch events. I would like my users to be able to play games such as angry birds, whilst I record their touching data.
I understand that this type of data collection is possible from inside the app, but is it possible from outside the app? (perhaps via an app running in the background?)
If this is not possible, are there alternatives? (I believe I could theoretically go into the android OS source code and make this happen?)
I understand that this type of data collection is possible from inside the app, but is it possible from outside the app? (perhaps via an app running in the background?)
For touch events, no, for obvious privacy and security reasons. It used to be possible (research the term "tapjacking"), but current versions of Android finally blocked this behavior.
For accelerometer events, you can record those, because they are the same for all apps simultaneously. Bear in mind that your sampling rate may not exactly match that of the app being used.
I believe I could theoretically go into the android OS source code and make this happen?
Yes, though you would then need to turn that modified Android into a ROM mod and install it on devices.
Apps are not allowed to do this on a secured device (ie, consumer phone/tablet that has not been 'rooted').
However, depending on your needs it may be possible with the development tools connected to a computer. If you can do some moderately annoying setup before each controlled-circumstances trial, I believe you can do it on some stock devices by using the USB cable to switch ADB into wifi mode, then monitoring input events over a wireless ADB session. See
http://source.android.com/tech/input/getevent.html
That document seems to imply that 'su' is needed (which is odd as the official 'su' isn't usable by non-root users), however it works without on many stock devices.
You'd probably also want to be running logcat to figure out what application is in the foreground.
I have an idea for an but I am not sure if it's even possible. I ran into an issue the other day where a phones touch screen was barley working and I needed to get the contacts off of it. I have a cellbrite machine but anyone who has ever used one knows how finicky they can be.
I would love to develop an android app that will connect to any phone via bluetooth and force pull all the contact from it, this would be handy if you have a troublesome screen. My question is this even possible based on the different phone types, and the different level of bluetooth protocols supported on the phones. If anyone has any ideas on how this might be accomplished hat would be great.
Any app with the necessary permission can read a phone's contacts and send them over Bluetooth (or Wi-Fi).
I think the main problem would be that people don't think to install your app until they need it. Then, you can't install your app onto their broken phone unless the phone has a network connection, and if they have a network connection then there isn't really any need to use Bluetooth in the first place.
Actually, one of the basic ideas of Android is that everything on your phone is sync'ed - so you don't have to worry if your phone gets crushed.