Android FileObserver for monitoring other apps? - android

I suspect that I already know the answer to this question, but I wanted to ask the experts anyway.
Would it be possible to use the FileObserver class to monitor changes to files belonging to other apps (i.e. things in the /data directory that don't belong to the app implementing the FileObserver)?
It seems that even if I had a rooted device, there isn't a way to have my monitoring application run as root.
The only possible (and unappealing) solution I've come up with, is having a rooted device, and changing the privileges on all the files on the device so that they would be accessible by the monitoring app.
Thanks,
Jarabek

This would almost certainly have to be done in native code, and would only work on rooted devices.
You should look into inotify.

Related

How to trace system calls in android with not rooted device?

My plan is to make a mobile application that traces system calls of other mobile application like strace. I read some papers but they uses custom kernel or rooted device(emulator). Also I used frida but it requires root privilege.
I want to trace system calls using my mobile application with not rooted device. Is there any way to do this?
There might be a way, but there is no official way.
Each app in Android is run in a Sandbox which it can't escape. The System has its own Sandbox (sometimes multiple), which you can't access.
This is a security measure.
The only thing you can track are broadcasts.
Without root privilegs it is imho impossible to access system calls.
it would be a huge security issue for android systems if applications could do that.

How do I write an app which takes advantage of a rooted phone?

I know I can use "su" to execute commands as root. Android pops up a user-dialogue to ask whether the app should be allowed to use su, and whether is should remember the user's decision for next time.
Are there things an app can do on a rooted phone, that they can't on an unrooted phone.
If so, what are they, and how are they enabled in the manifest?
I want to make the context plain.
I have a supposedly rooted Android device with no access to the Android marketplace.
I have not yet found a way of downloading apks from the play store without putting information about my phone into Chrome extensions which I do not trust.
I need to write a small app to find out if the device is rooted.
Many apps require rooted devices, so if I can write an app that does the same as them, I will know if the device is rooted.
One of the things I would like to do on this rooted device is to shut it down without user interaction.
Are there things an app can do on a rooted phone, that they can't on an unrooted phone.
Yes, in the same way that there are things that a super user can do on a Linux computer that a normal user cannot.
If so, what are they, and how are they enabled in the manifest?
There isn't really a list of things only available to rooted users. The number of things is long, depends on the device, and likely wouldn't really address your real question anyway.
In short, the answer is that you can perform privileged actions that are typically not available to applications or users using the command line.
In practice, this means you can access restricted parts of the filesystem (such as the Android system directory), including data from other applications (such as the normally protected SharedPreferences). This also means that you can access restricted commands/applications, such as sqlite3 (if installed).
If you are looking for a reason to write an application that leverages root access, you are likely going about this the wrong way. Instead, think of what functionality you want and determine if you need root access after that.

Android Root Files after Unroot?

I rooted my phone and unrooted it. However several apps show me that i have a rooted phone. The warranty bit is 0x0 and the flash counter also.
Could there be any files which were not deleted?
Agree on the comment about this question being off-topic, but on the development part of it, root detection is done by heuristics detecting specific files commonly used for this purpose and not present in stock Android versions. So, in your case, that's probably what's happening.
For example, you can read this article for an overview of such techniques: https://blog.netspi.com/android-root-detection-techniques/

apps can't be installed on rooted device

I have brought one plus one and tried to install an app. But then it says your phone it's rooted.. Finally it didn't install. I'm aware that if a phone is rooted, then there are two disadvantage . One your phone warranty will not work if the phone is damaged while rooting. And two.. You will get support user acces .
My question is what is the problem from an application perspective, if a phone is rooted.? Why few apps are blocked to get installed on rooted phon . ?
Functions of some apps require root access to the operating system. For example, they might require tuning the kernel options, writing to a raw device or accessing privileged resources.
Android apps typically run in a closed "jail" to protect the system and other apps from contamination of a malicious or poorly written app.
By rooting your phone, you take the risk of this contamination on yourself. It is why carriers will often not honor the warranty after rooting.
That being said, there are often methods of flashing back to a non-rooted version if you do need to claim a warranty. It really depends on your skill level and patience. If you are interested in rooting, there are many resources out there. If it sounds scary, it probably isn't for you, and the app that requires root probably isn't something you should mess with.

What does rooting of android means?

I am new android development and learning on emulator. What rooting of device means ?? it something like jail break for Iphone. How can i root emulator and why i need root a device ?
Rooting basically is giving the standard user root privileges, so that the normal user can do things that only the super user could normally do. On android devices this means being able to change several things, such as being able to modify the frequency of the processor, being able to install new firmware/ different versions of android that the manufacturer doesn't offer, or execute applications like the ones in here : http://androidforums.com/droid-x-all-things-root/131944-favorite-root-applications.html
It is fairly easy to do and very straightforward process in most of the android devices. You don't need to root the emulator, it is already rooted but you should better not be developing apps that require root access if you want to put them in the market -most of the people do not have a rooted device-.
Yes it is.
Because you perhaps want to use Android 2.3 on a phone where the manufacturer only supports 2.2 so far.
You do not need to root your device to do SDK development with it. You will never need this to build Android applications.
You root a device by exploiting a security hole in order to get a full access to the system. It then allows you to escape security to change system files that should not be modified.
It is a bit like jailbreaking. Rooting can allow you to install modified versions of your OS.
You are always root in the emulator, you do not need to "root it".

Categories

Resources