How to develop an application in android that will block particular website in device without uninstalling it from device?
If Android OS on the phone is not rooted you won't be able to block another application. Os doesn't give rights to do that. Android runs on Linux, Linux provides sandbox system call API and dictates rules.
http://developer.android.com/guide/topics/security/permissions.html
Basically you can do what is allowed to do. Intercept call's, block camera via device admin manager, read data of another apps if they share that data and only what they share, use some common resources, but not more than that. To do what you want to do your app has to be a root, but standard third party apps don't get root privileges. And your solution is to change firmware, bind your app into it with root privileges.
Though some application gives the same functionality. Those apps apparently pre-built with Android firmware. Manufacturers get firmware before it goes to the rest of the world. Make necessary changes to give more privileges to their app and bind it with Android ROM. You cannot uninstall those apps.
The only resolution is could prefer is to have root privileges to block other apps. And you will only get them on a rooted device.
Related
My goal is to write an application for Android (>= 9.0) which basically offers a device-owner-style control like Google's "Android Device Policy".
The following criteria have to be met:
Zero dependency on Google servers or any other 3rd party infrastructure like existing EMM solutions (MobileIron et cetera)
The user should not be able to remove or disable the app
Provisioning methods: QR-Code, NFC, URL, ADB, actually any "local" way ...
Has to work with stock androids on regular consumer devices
In short: I'd like to write an unremovable device manager (including a web-based management UI), put it on a device I own, give that device to someone else, and being able to fully control the device remotely.
Is such a project even possible with the current situation of Android?
No.
Has to work with stock androids on regular consumer devices
Mostly, this is your biggest hurdle to overcome.
What you are asking for is the description of a very powerful MalWare. An app that ca run on any version of Android, that can't be uninstalled, but can do what it wants to "fully control the device".
If you move away from the idea of "stock android on regular consumer device", towards a suite of devices you have some say in distributing:
Here is a list of Google Partners who offer an EMM solution: https://androidenterprisepartners.withgoogle.com/emm/
Here is Samsungs effort at device control:
https://www.samsungknox.com/en
Here is Googles device management:
https://developers.google.com/android/management
You could write your own ROM of Android and be able to control the things you want, but that would require .. building a ROM aka a whole phone OS forked from AOSP.
The user should not be able to remove or disable the app
This is only possible if you have a system app.
Or something extreme (which with any extreme, is always possible to have problems), like having two apps, and they monitor each other for uninstall, and programatically reinstall (vs 1 app that can't do much when it is being uninstalled).
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.
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.
There are many applications in google play that take snapshot, they work without device root.
Am new to Android development, so I dont know much of what can be done and what can not be and how it's done.
Following is the link on which you can find the list of applications working without device root :-
http://www.androidzoom.com/android_applications/screen+capture+no+root
If you read the descriptions of those products, you will see phrases like "Rooting will be required depending on model". That is because you are not supposed to be able to take screenshots programmatically, though rooted device users may be able to pull this off, at least for some devices.
Another technique, that at least one such app uses, is to involve a developer computer in the process, using the mechanisms in Android used by DDMS and such for taking screenshots. In reality, it is the computer, not the device, taking the screenshots.
For the devices that such apps work on without requiring root and without requiring a developer computer, the authors of those apps are exploiting security holes in individual devices, just like a malware author would.
Check this library.
Their page seems to suggest it can take screenshot without root.
Android Screenshot Library (ASL) enables to programmatically capture
screenshots from Android devices without requirement of having root
access privileges. Instead, ASL utilizes a native service running in
the background, started via the Android Debug Bridge (ADB) once per
device boot.
Edit:
there are quite a lot of posts SO regarding this
Programmatic screencapture on mobile device
Screen Capture in android
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".