[Q] running apps as root - Bravo General

For clarification...
An app has to request root permissions to run as root, you cannot just give it the permissions? Is there a setuid? The "/system" filesystem is ext3 on this phone. "ext3" supports setuid & setgid, are these supported by Android?
In other words, is there any way to give a non-root app root permissions?

nodots said:
For clarification...
An app has to request root permissions to run as root, you cannot just give it the permissions? Is there a setuid? The "/system" filesystem is ext3 on this phone. "ext3" supports setuid & setgid, are these supported by Android?
In other words, is there any way to give a non-root app root permissions?
Click to expand...
Click to collapse
have you "rooted" your bravo using super one click etc?
the su built for rooted android phones has a hook to the superuser.apk so that any app requesting root must be approved by the user. You can set the app to a whitelisted app so it always gets root permissions, so that is what i recommend. this is a much important security feature and i highly recommend you dont circumvent it. that being said, there is a su out there that doesnt require approval and just gives approval so you can find it on xda if you want it but really its not a good idea or recommended

I have a related question: How do pre-installed apps on unrooted phones get root permission? I would expect that there are some that do, although I cannot give any examples.

Related

Need root to access certain files?

I'm doing research on android security, and i realised i can use adb to pull files from /data/data. These files includes SMS databases and sharedpref.
Now I have root on my n1, so I'm wondering if this is possible because of root?
Sent from my Nexus One using Tapatalk
I'm not sure about that specific directory but I do know there are certain system folders/files that can only be modified with root access. Certain apps like Titanium backup use root access to pull apks from root only folders, without root they simply can't function.
It's only possible because of root access. Without root you can't get to the sensitive info like that.
Yep, both /data and /data/data have permissions set to drwxrwx--x, meaning root has read/write/execute permissions, the system group has it too and regular users only have execute permissions.
Thanks all, for your input. Much appreciated!
Sent from my Nexus One using Tapatalk
fubaya said:
Yep, both /data and /data/data have permissions set to drwxrwx--x, meaning root has read/write/execute permissions, the system group has it too and regular users only have execute permissions.
Click to expand...
Click to collapse
To be more accurate, the "drwxrwx--x" (or 771) permission indicates the OWNER's permissions, then the GROUP permissions, and then EVERYONE. root will have the same permissions as the owner.

[Q] Fixwifi (4.010.40) Malicious?

I just updated via OTA to build 4.010.40_COM_GEN1 (from 4.010.24_COM_GEN1). After the update when I rooted the tab and started superuser it is giving a warning:
"Package com.acer.android.fixwifi was found to be requesting permission to respond to Superuser requests. It's likely that this app is malicious and attempting to grant superuser access without your knowledge. It is recommended that you should uninstall it."
There is an app by the name of fixwifi, but it is a system app with no uninstall option. And if it is a system app then why the superuser request? Any help is appreciated.
mznk said:
I just updated via OTA to build 4.010.40_COM_GEN1 (from 4.010.24_COM_GEN1). After the update when I rooted the tab and started superuser it is giving a warning:
"Package com.acer.android.fixwifi was found to be requesting permission to respond to Superuser requests. It's likely that this app is malicious and attempting to grant superuser access without your knowledge. It is recommended that you should uninstall it."
There is an app by the name of fixwifi, but it is a system app with no uninstall option. And if it is a system app then why the superuser request? Any help is appreciated.
Click to expand...
Click to collapse
Interesting. I'm guessing that rather than actually fix the wifi bug, they've written an app that detects when it is occuring and simply deletes the dhcp-wlan0.lease file itself with root permissions... Malicious, probably not, but a potential security risk, possibly.
Is this update prerooted? If not, how can they put an app that asks for superuser privileges? Were they expecting the user to root for the fix to work?
I am not an expert, but I think you need to be cautious with it.
Biologos said:
Is this update prerooted? If not, how can they put an app that asks for superuser privileges? Were they expecting the user to root for the fix to work?
I am not an expert, but I think you need to be cautious with it.
Click to expand...
Click to collapse
No clue about the merit of the app.
But if the user is not rooted they would not see the request to allow or disallow. It would just go.
By the way, the fix wifi apk is located in /flexrom/
There seems other apks located there which is flashed by flashing the flexrom.img
Biologos said:
Is this update prerooted?
Click to expand...
Click to collapse
No, it was an official update therefore not prerooted
ardatdat said:
By the way, the fix wifi apk is located in /flexrom/
Click to expand...
Click to collapse
Yes, it is in /flexrom/app along with Kobo, apkinstaller and checkerlaunch(?). But if it is a system app then shouldn't it work in the background without any superuser request.

Understanding Root

Now I am a very avid linux user (used the terminal a time or two) and I bought an acer a500 yesterday. This is my first android device and the first 2 things I did were update it and root it with iconia-root1.3 (gingerbreak didn't work). Now I have 3.1 and the root checker says that I have root. And the busybox installer says I have busybox installed.
Now this is where I get lost...
The root checker says I have root but not /system/bin/su or /sbin/su. Why would I have root if I don't have the application to switch users? Also it has su in /system/xbin but it won't let me move anything to /system/bin (which I assumed I could do as root??). So is root checker giving a false positive or what? and why can't I move any files above the directory /mnt (I'm using astro)? Do I have to selectively give certain apps root or what?
Also I need someone to explain this to me. Why do we need to root it if all of the applications are already in the android marketplace? Do they allow applications to be uploaded to the marketplace that won't work on non-rooted devices?? That seems like there would be a separate marketplace for rooted-only apps like cydia on iOS.
A quick reply: 'Root' allows you to have read/write access on /system/ . After root, you can add/remove any apps in /system/app, also, after root, you can flash CWM, you can then flash custom rom and kernel ... bla bla bla ~
Root is somehow different from 'jailbreak' in iOS. I think you could find more information on google. Cheers.
ardatdat said:
A quick reply: 'Root' allows you to have read/write access on /system/ . After root, you can add/remove any apps in /system/app, also, after root, you can flash CWM, you can then flash custom rom and kernel ... bla bla bla ~
Root is somehow different from 'jailbreak' in iOS. I think you could find more information on google. Cheers.
Click to expand...
Click to collapse
Root doesn't give you superuser(root user) access? I had always assumed that was the case, which means you can do any damn thing you please. Obviously you can't write to ro filesystems, but you could always remount them.
snowman4839 said:
Now this is where I get lost...
The root checker says I have root but not /system/bin/su or /sbin/su. Why would I have root if I don't have the application to switch users? Also it has su in /system/xbin but it won't let me move anything to /system/bin (which I assumed I could do as root??). So is root checker giving a false positive or what? and why can't I move any files above the directory /mnt (I'm using astro)? Do I have to selectively give certain apps root or what?
Also I need someone to explain this to me. Why do we need to root it if all of the applications are already in the android marketplace? Do they allow applications to be uploaded to the marketplace that won't work on non-rooted devices?? That seems like there would be a separate marketplace for rooted-only apps like cydia on iOS.
Click to expand...
Click to collapse
1.) The root app is in /system/app/ and the binary is in /system/xbin/ so you do have root.
2.) You won't be able to just write to any of those folders. You either have to remount them to be writable and use adb or use an app like root explorer that lets you remount on the fly and edit the files.
The same answer goes for the question why can't you move files to anything above /mnt. And yes to the second question. You'll have to set root permissions selectively.
Root doesn't have any effect on the marketplace or the apps you can download. This is not an iDevice.
Some apps need root to work (usually the ones that change system files) and that's why you have to have root. It's not necessary unless you either change system files or use an app that requires it (screen-shot apps, adfree,some file managers, reboot apps,...).
It's early so apologies for any mistakes I made. I hope that it's a little clearer now.

Run application as root

How can I launch an application to give it root permissions ? Can I possibly edit the apk without writing the program over ?
Sent from my HTC HD2 using Tapatalk
You first need to root your phone. You could use z4root.apk. try searching the forums or google it. Apply permanent or temporary. I applied permanent root. The app will notify if a root is successful. Then you will need to have superuser app installed. Normally all the roms comes preinstalled with superuser. If an app asks for permission for root access just grant it and you're done.
Sent from my HTC Runnymede using XDA App
hairuleff81 said:
You first need to root your phone. You could use z4root.apk. try searching the forums or google it. Apply permanent or temporary. I applied permanent root. The app will notify if a root is successful. Then you will need to have superuser app installed. Normally all the roms comes preinstalled with superuser. If an app asks for permission for root access just grant it and you're done.
Sent from my HTC Runnymede using XDA App
Click to expand...
Click to collapse
?
My device is already rooted with SuperUser added ...... What im trying to do is give an app which was downloaded from the market root permissions . now the only way i personally know how to give an app root permissions is by FIRST programming it with root permissions . Once its compiled i dont thing i can launch an app as root . But i may be wrong . hence the thread
elesbb said:
?
My device is already rooted with SuperUser added ...... What im trying to do is give an app which was downloaded from the market root permissions . now the only way i personally know how to give an app root permissions is by FIRST programming it with root permissions . Once its compiled i dont thing i can launch an app as root . But i may be wrong . hence the thread
Click to expand...
Click to collapse
U can only give Root Permission if the app and for it

[HELP] How to ROOT multi user

Hello
Firstly sorry for my english
I'll tried to explain my problem
I successfull to root my device but only the main user account but I can't obtain access root in others account.
How can I do this ?
Thanks
At the moment you can't until Google updates that feature to allow that. The multiuser is in its infancy. We will just have to wait I guess.
Sent from my Nexus 10 using Tapatalk HD
Thanks for your answer
waiting for this ...
It's actually the su binary which is tied to the primary user only at the moment... not sure how, or if, it can be built otherwise!
Furthermore, it is not even possible to enable developer settings (via build no) for second users, right?
So, without USB-Debugging no adb to backup second user apps (w/ data) using the Toolkit..
Is there any chance to fully backup second user apps? Apart from nand of course, as I would like to backup/restore apps for a switch to CM10.
Superuser 3.3 now supports multi-user root... 3 modes... Owner only, Owner controlled & User controlled... I will post an update zip here once I built su & Superuser tonight!
craigacgomez said:
Superuser 3.3 now supports multi-user root... 3 modes... Owner only, Owner controlled & User controlled... I will post an update zip here once I built su & Superuser tonight!
Click to expand...
Click to collapse
Wow... That would be truly amazing! Sounds like you are mod'ing the apps yourself, or are they updating to include the feature? I'm pumped at this possibility! Thanks craig!
Sent from my Nexus 10 using Tapatalk 2
djd338 said:
Wow... That would be truly amazing! Sounds like you are mod'ing the apps yourself, or are they updating to include the feature? I'm pumped at this possibility! Thanks craig!
Sent from my Nexus 10 using Tapatalk 2
Click to expand...
Click to collapse
Nope... not my mod... official updates to Superuser... I've just built it with the new changes!!
Here you go... Superuser-3.3-arm.zip
Notable Changes (from Superuser 3.2):
1. Android 4.2+ multi-user support [3 mode -> Owner only, Owner controlled & User controlled]
2. Better handling of applications with multiple root (su) requests
Flashing using a custom recovery (TWRP or CWM). I recommend wiping data for the Superuser app and re-granting your root apps su access to avoid any problems.
NOTE: Even though Superuser 3.3 supports multiple users, you root apps may not... so there is no guarantee that all root apps will work fine in multi-user mode. For those app, you will need to wait for the app developers to update their apps to support multiple users.
craigacgomez said:
Nope... not my mod... official updates to Superuser... I've just built it with the new changes!!
Here you go... Superuser-3.3-arm.zip
Notable Changes (from Superuser 3.2):
1. Android 4.2+ multi-user support [3 mode -> Owner only, Owner controlled & User controlled]
2. Better handling of applications with multiple root (su) requests
Flashing using a custom recovery (TWRP or CWM). I recommend wiping data for the Superuser app and re-granting your root apps su access to avoid any problems.
NOTE: Even though Superuser 3.3 supports multiple users, you root apps may not... so there is no guarantee that all root apps will work fine in multi-user mode. For those app, you will need to wait for the app developers to update their apps to support multiple users.
Click to expand...
Click to collapse
So, could I use this updated su to change ROM control settings for multiple users on aokp?
Sent from my Nexus 10 using xda app-developers app
jrod091 said:
So, could I use this updated su to change ROM control settings for multiple users on aokp?
Sent from my Nexus 10 using xda app-developers app
Click to expand...
Click to collapse
I don't know if RC settings are global or user specific... depends of the settings... if the setting is specific to the user context, it will work, otherwise it won't...
drykc said:
Hello
Firstly sorry for my english
I'll tried to explain my problem
I successfull to root my device but only the main user account but I can't obtain access root in others account.
How can I do this ?
Thanks
Click to expand...
Click to collapse
If you are using SuperSu, the dialog asking for root permission shows up on the owner's user account. In SuperSu, only the owner can grant superuser privileges.
Sent from my Nexus 4
Is Superuser 3.3 good for Nexus7? the file says "arm" - Nexus 7 is not an arm processor...
Vlad7777 said:
Is Superuser 3.3 good for Nexus7? the file says "arm" - Nexus 7 is not an arm processor...
Click to expand...
Click to collapse
Should probably ask in the n7 forum...
Sent from my Nexus 10 using xda app-developers app
Vlad7777 said:
Is Superuser 3.3 good for Nexus7? the file says "arm" - Nexus 7 is not an arm processor...
Click to expand...
Click to collapse
The SoC in the Nexus 7 is Tegra 3, which has an ARM processor. You're fine.
Sent from my Nexus 10
Vlad7777 said:
Is Superuser 3.3 good for Nexus7? the file says "arm" - Nexus 7 is not an arm processor...
Click to expand...
Click to collapse
Lol of course n7 has an arm cpu!
For android phones and tablets, there's arm, mips, and x86. Any good android will 98% likely be arm. Motorola released an x86 (Intel) phone, and I'm sure there's a few other ones out there. And if you have mips, you probably got a cheapy Chinese tablet. xP
Swiped from my Nexus 10 using xda-developers app
Sorry for hijacking.
My main reason for root is to restore application data. Will I be able to restore the data on both the primary user and also the secondary user if I have root (either through the main or secondary user)
Did i do something wrong?
I had supersu installt- and need multiuser acsess . So i install Superuser in recovery with the zipfile .
But now no root app will work- with no user.:crying:
notice main user by starting: sorry i cant get root.... this was a try by /system/bin/su .
2 notice by superuser -on screen and in the log: superuser rights of ..app... are denied.
What do i do now ?
Kind regards
gandalf
1234556789 said:
Did i do something wrong?
I had supersu installt- and need multiuser acsess . So i install Superuser in recovery with the zipfile .
But now no root app will work- with no user.:crying:
notice main user by starting: sorry i cant get root.... this was a try by /system/bin/su .
2 notice by superuser -on screen and in the log: superuser rights of ..app... are denied.
What do i do now ?
Kind regards
gandalf
Click to expand...
Click to collapse
It sounds like the zips don't play very well together.
Boot into recovery.
Mount /system
Delete /system/app/Superuser.apk
Delete /system/bin/su (if it exists)
Delete /system/xbin/su (if it exists)
Clear the Dalvik cache to err on the safe side.
You should now be unrooted. (In fact you could boot up, and you should see there is no superuser app installed)
Now, just flash the superuser zip again to root your device.
KlipperKyle said:
It sounds like the zips don't play very well together.
Boot into recovery.
Mount /system
Delete /system/app/Superuser.apk
Delete /system/bin/su (if it exists)
Delete /system/xbin/su (if it exists)
Clear the Dalvik cache to err on the safe side.
You should now be unrooted. (In fact you could boot up, and you should see there is no superuser app installed)
Now, just flash the superuser zip again to root your device.
Click to expand...
Click to collapse
Thanks for it- but how i delete the files? On backup+restore i only can delete backups. Am i blind?
..............................................................................................................
edit: Tried a solution with nexus toolkit 4.2 i root once more, install superuser und install theupdate to 3.3.
get root for the main user- rootapps work-
but only the main user had root- i tried the update fixer -....gaining root acsess...fail.
so what is wrong?- had anybody a solution?
Kind regards
gandalf
1234556789 said:
Thanks for it- but how i delete the files? On backup+restore i only can delete backups. Am i blind?
..............................................................................................................
edit: Tried a solution with nexus toolkit 4.2 i root once more, install superuser und install theupdate to 3.3.
get root for the main user- rootapps work-
but only the main user had root- i tried the update fixer -....gaining root acsess...fail.
so what is wrong?- had anybody a solution?
Kind regards
gandalf
Click to expand...
Click to collapse
It sounds like you have Superuser 3.3 installed and working, right? In order to use Superuser 3.3 with another user account, you need to go to its preferences and change Multi-user Mode to something other than "Owner Only."
"Owner only" means that only the owner can su.
"Owner controlled" means that the owner is the only one who can set and deny root permissions. Any filters are applied to all users.
"User controlled" means that each user can define allow/deny filters. Only use this option if you really trust other users.
Don't update to the version of Superuser on the Play Store. The version on the Play Store is 3.1.3. You already have 3.3 flashed on your system partition. Because you won't need the version on the Play Store, you can also stay away from ChainsDD's Superuser Update Fixer. (The update fixer is for an entirely different issue than the one you have.)
If you have installed these packages, you should uninstall them.
For future reference:
I should have been clearer about deleting files in custom recoveries. If you use TWRP, there is a built-in file manager under the Advanced menu. If you use ClockworkMod, you should use ADB commands: (ADB is a tool found in the Android SDK)
Code:
adb shell
cd /system
ls -al
[I](You should see a bunch of directories. If not, make sure /system is mounted.
This is an option in one of the recovery menus; I can't remember which
one offhand.)[/I]
rm app/Superuser.apk
rm bin/su
rm xbin/su
Then reflash the Superuser zip.

Categories

Resources