With root access, how do I access the OS-level notification system? - android

I am using a phone without LED notifications. I would like to dev an app to simulate that, however first, with root, I would like to get access to the notifications system on the OS level (so it can be app-agnostic), to get the notifications.
How can I do so, or where can I read up more about this?
Thank you!

Despite this being old and already having an answer accepted, I want to offer an alternative solution since I think the end goal can be achieved. With all due respect to Mark, I think the direction the question is a little misleading, but the end goal is attainable.
If you are looking for something that would allow you to make an app that listens for notifications and then performs some action based on them regardless of the source app (or could be tailored to specific apps), then I think you can do this without writing firmware or rooting using an Accessibility Service. Accessibility Services would allow access to notifications as they come in, allowing your app to do something with them. You would be able to filter by the source package, get the notification contents, and a lot of other things.
There is a lot I could say on it, but it is still rather new to me, so I'll provide a couple of links to get started.
Accessibility Services page: http://developer.android.com/guide/topics/ui/accessibility/services.html
I would also recommend trying it out for yourself. I came across a small project file that I was able to copy and run on my own as a proof-of-concept. If you run this, you'll be able to see in the log that you really can read notifications: https://gist.github.com/qihnus/1909616
Don't forget to enable the accessibility feature for the app after you install it in your phone's accessibility settings.

You have to write your own firmware. This is not possible from an SDK application, rooted or not.

Related

Analizing accessibility for Android apps without its source code

Please, I need analyze Android apps accessibility behavior for auditing purposes. That is, I don't have source code access so I need external methods to view his response. I tried some tools as Accessibility Insights, but they're clearly insufficient, so I want to try self made tools.
Anybody can tell me where start finding info about? Google Developers only had info about make accessible apps, but I need info about p.e. how Talkback discovers links, buttons, controls and so on.

Android: How to create an unrestricted background service, beyond APK permissions?

I'd like to create a Java/Kotlin background service that is not afflicted by resource management limitations at all.
I know that this is pretty much contradicting Android design principles, and I am pretty sure this is not possible for a normal app.
But having full root permissions, what would be the cleanest way to build/install such a service? I would still like to use Android Studio to develop, and benefit from Java API portability.
Edit: It turned out that my question has been misleading. I am not targetting an existing Android HW Device, where a user has to grant permissions, but rather a custom AOSP installation, which i have full control of. I already figured out that I probably have to write a system service for this. However, I will accept the given answer for the general case as reference for others.
You can try using this approach and ask your user to add your application to the white list. Any app that is there won't be a subject of system resource management regarding the Doze mode; thus, the system won't kill your service while it's in background while you don't break the other limitations such as max amount of available memory.
Or you can just show an alert and ask the user to add your application to the white list manually.

How to built a Android Single App Mode

I want to use a Android Phone as a controlling unit for one of my projects.
In this the Smartphone is fixed on the hardware.
Tasks for the smartphone are:
Communication via Bluetooth
Handling User Input (e.g. PIN-Entry)
Turning on/off vibration, led ,...
So I wrote a App which does all the things I want.
Now I want that the Smartphone can only be used for this application.
Maybe you can give me some Ideas how to manage this.
I heard about 'kiosk-mode', could this be a solution.
Another option would be a custom ROM or is it possible to get a 'basic-android' without a launcher an just one single app.
I just want some ideas and usefull suggestions from you:)
If you are using Android version "L" there is a way to do that. It is called Task Locking, however it needs root access.
There is a lot of tutorials on this site. I just don't want to copy-paste it.
Take a look here: http://www.sureshjoshi.com/mobile/android-kiosk-mode-without-root/
Pretty good article about task locking and device ownership. And unlike Evgeniy said, root is not needed.

How to properly monitor and log Android OS events/activity in the background

I would like to know the correct way to monitor system events and operating system activity in Android. My research so far indicates there are various methods for running Activities, Services, BroadCastReceivers, etc. but I don't have an overall comprehensive answer for everything I want to accomplish yet. I did come across an app today called "Carrier IQ" and was wondering how they do it. I believe their app is built into the kernel or at least the phone's OS image, something I want to avoid doing if at all possible.
I know that the Android SDK offers various ways to obtain
Since my app cannot be allowed to be suspended, should it run as a foreground service? If I do this, will I consume too many resources if I need to poll for various activity? I ask this because I don't think I can get everything through receiving events (i.e., using a BroadCastReceiver). I think I need a combination of polling and events.
I want to log sensors, events, OS activity, etc. for a user study. This is NOT for hacking or phishing purposes!
These are the top three projects that I think may accomplish something similar to what I want to achieve, but I have not yet determined if they are viable solutions:
android-hci-extractor
cellbots data logger
android-os-monitor
Does the Android manifest permissions list contain all of the permissions your app will need?
http://developer.android.com/reference/android/Manifest.permission.html
Then you can just ask for permissions when the app is installed and you should be able to access them.

how can i get all the system notifications that are shown now?

how can i get all the system notifications that are shown now?i want to write a programe that can intercept the notifications that other apps notified.
You cannot interfere with another appliactions notifications so it will not be possible to write such application.
This thread from the Android Beginners Google group answers the question with a solid "No." Quoting a user from the thread:
No, sorry. Intercepting notifications,
in particular, would be quite the
security loophole. In general, on
Android, one application cannot see or
mess with another application's
stuff. So, while your desired features
would be interesting for the OS
itself, they aren't going to be very
practical to implement in an
application written to the SDK.

Categories

Resources