Rooted Phone: Apps have root permission - android

I'm developing an app that (I believe) needs root privilege. There are plenty of instructions on the web for rooting a phone. My questions is:
If I root my phone, do all apps get root privelege automatically, e.g. a File Manager or ADB?
(I'm familiar with root privelege on desktops, but Android is a different animal).
A previous answer from "Ali" said to "acesss [the app] in SuperUser". I'm not sure what that means. Do I have to mod my app? Do I launch it differently? or what?

Yes If you access File Manager or ADB in Super User.

even you root your phone.the applications do not have root pemission excepts doing something
special.

Related

Install Apk Silently in Android programatically without ROOT

I want to install app silently in android without using user prompt and without ROOT.
I know this question has lots of answers but i can't find proper answer for same.
i.e is it possible if we make app as device admin or device owner or profile owner ?
Thanks for advance.
It's not possible, the only way for skip user prompt, is to be root and place the apk on the system folder instead of app folder
If the apk is in the system folder you can install it silently easely, but the system folder can only be access with ROOT

How to access root directory (/) in android 5.1

everyone,
I want to build an app scanning all the files in the devices, so I have to access root directory ("/"), but the file.listfile returns NULL. Is there any way to access "/"?
Because you are using the system in a non-root account, whose allowed reading directories are limited. Directory in "/" are only available for root users. However, due to security concerns, root privilege are generally not accessible for third-party installed apps, in case the installed app may modify system level codes to do bad things.
You may get further information from here
That is pretty strange as on an Android 5.1 device it should just do the listing. No root needed.
Also on Android 6 this works on all devices i know.
It only started with Android 7 that "/" is not listable anymore.
Which device is it?

On Rooted phone read /data/data/****/**.db

I'm making an app that read messages from Whatsapp, Viber, mails, etc. and groups it so you can read all that one person said to you in just one App.
To do this I'm trying to read the *.db files each App has on /data/data directory but have encountered two problems.
Since I'm new to programing for rooted phones I don't know how this works and have not found a good tutorial or any documentation. Do you have any that I could read to understand?
Once I know how to access /data/data with root, how can I read the *.db without making a copy. Many other topics say that I should copy the *.db file to a folder and read it there, but wouldn't it be a lot more simple to just read it from where it is?
Apps, regardless of whether the phone is rooted or not, can only ever read files that they themselves own, or that are public (e.g., on a SD card). This is because while the phone may be rooted, the apps themselves do not gain root access.
Instead, on your phone, you have an executable named su lets apps run root commands. However, by default, it refuses to let any app run any root commands. When you root your phone, you replace this executable by a new, modified version that lets approved apps run root commands. It is by using these root commands that you can gain indirect root access to the system.
Now, since you only have indirect root access for your app, you cannot just read any file from the file system. But if you run a root command to copy it to your own, private directory, where you do have permission to read it, your app can directly read it from there.
(Note: you can technically read files without copying them first, by using the su executable, but unless there's a real reason why you can't copy first, and you actually know what you're doing, you probably shouldn't even bother because it's rarely worth the trouble anyways, especially not for sqlite databases.)
For details about how to run root commands with su, see this link (which Gumbo posted in the comments above).

How can I display the folders that require root acess in android?

I am working on a android app and i want the user to be able to view the folders that require root access. I tried looking through the Cyanogenmod file manager code to try and trying the su command in java with the Runtime thing, but I had no luck.
You cannot do this without rooting the device (which simply means gaining required root access level). That's basically the reason for permission system - to keep you away from the places you should not be looking in.

Android root access

I have a Google Nexus 7, and I've been developing on it. Only recently, however, have I become unable to access the /data/ directory using the file browser in eclipse. The device was never rooted, but now since I upgraded it, I believe that I have lost access to this. Is there any way to get eclipse to use the "run-as" command to access my app's data directory? How come I have suddenly lost access to this?
Is the only option left to root the device?
Thanks
Is there any way to get eclipse to use the "run-as" command to access my app's data directory?
There is nothing for you to run "as" that would help here, AFAIK.
How come I have suddenly lost access to this?
You should not have had access to it in the first place. If you did, that was a security flaw in the device, perhaps fixed by a firmware upgrade.
Is the only option left to root the device?
You could not browse the /data/ directory on production hardware. For example, you can browse /data/ on the emulator.
I am able to given root permission by installing apk.
http://gadgets.ndtv.com/mobiles/features/how-to-root-nokia-x-and-get-access-to-google-play-store-and-google-now-508391

Categories

Resources