Help manually creating owner/group and assigning root privileges to them? - Android Software/Hacking General [Developers Only]

So, Im trying to address a battery readout issue with the Droid X. The system defaults the owner and group of /pds/public/battd to "mot_accy" (as well as /data/battd). This is causing the daemon to not be able to access the offset data and such, resulting in incorrect battery readouts across the scale.
I wanted to try manually adding the owner and group "mot_accy" to my build and setting root privileges to them, but after much searching, I have not been able to find out how.
Anyone have any suggestions?
Thanks in advance.
~Spz0

Related

Give (system) applications more permissions

Hello!
I've been looking for a way to achieve the topic title for a very long time but without result...
So what i'd like to accomplish is to give my application the ability to execute root/su -c commands without the device being actually rooted.
If this has to be done at the compiling of system.img / rom-cooking thats oke..
From what gathered through searching the source is that the init executable in the root of the device starts zygote, and zygote in turn is responsible of starting up each application.
This Zygote also manages what uid each application gets? If so shouldn't it be possible to change that uid to "system" or even "root"?
When you look at running processes on a device the "phone" app has as user radio..once again indicates it's very well possible to change under what user an app is being executed?
Also looking through the source the way an application gets a different uid seems to be because of sharing the same certificate on build, and in the androidmanifest.xml having
Code:
android:sharedUserId="android.uid.phone"
Am i have not yet find out where android.uid.* comes from but should the uid: system and root be there as well?
If anyone could enlighten me whether i am on the completely wrong track or if this makes any sense i'd be greatly appreciated!
Richard
Monday morning bump!
Isn't there any way to have an application start up as system/root user? is another way to do it perhaps via a service? and have that start up as another user?

Possible to Replace a System File without Rooting?

I am a NOOB, but I like myself just fine. The video for NOOBs is funny, but IMHO, should be a bit more serious.
I'm one of those people experiencing issues with GPS and TTFF being excessively long on the MT. Cry.
If I run MyPhoneExplorer, I can see the system file structure, and I believe I can move files to the phone. I believe I can do the same with SwiFTP.
Can one drop replacement GPS libraries for example into the SYSTEM and SYSTEM/HW sub-directories using a program like MPE, or an FTP program like SwiFTP without rooting, and would they be honored on the next reboot?
Would I be mangling some check-sum or other that determines the integrity of the system loaded?
I'm one of those users that doesn't really want to root if not necessary, but I wonder if doing some mod like the above - would doing so lay subsequent update pushes from VMUSA to waste?
Also, I'd really like if possible to flag some programs not to load, unless I explicitly ask them to load via the U.I. with intent. I suppose I'd have to root to do something like that. Perhaps with Ginger-Break? Would doing this make subsequent updates problematic?
Any information regarding my constraints and options to effect both of the above would be very appreciated. Thanks.
There are ways to mount the various partitions from a host machine (e.g. Linux) while it is in the "emergency" flash mode, which would permit what you want to do. Doing this is quite dangerous - at least as much as rooting the device and perhaps more-so.
I appreciate the response.
OK, if I were to root via Gingerbreak and install the files that way, then un-root, would my system then appear to be (to an update provided by Motorola or VMUSA) as something which couldn't be updated?
In other-words would rooting put me on a path to having to use specially modified updates?
Thanks.
Depends on what you change.
In GENERAL no, the update will come through. The major risk is that it crashes on install as some part of what you changed is a dependency but is not reloaded. This is rare, but can happen.
So.... root, install Clockwork, and make an immediate Nandroid backup BEFORE you screw with anything. That SHOULD allow you to un-hose yourself if you get in trouble.

[Q] Debian chroot on phone/networking issue

Hello XDA Developers, I have a Debian subsystem of sorts on my phone which is created by an application called Lil' Debi. For those of you unfamiliar with it, it essentially creates a Debian install on an .iso that can be mounted onto the disk. Once mounted, a user can access a shell to interact with this Debian subsystem by running /debian/shell as root, which will chroot to its own directory system separate system accessible from the Android Terminal.
Within this Debian subsystem I have created a non-root user account for the purpose of running a few networking applications that if compromised for some reason, won't give the attacker root privileges to break everything on my phone. There's only one small problem with this setup: I can't access the internet from a non-root account.
Both my terminal emulator and Lil' Debi have full network access, even when not run as root. I am curious then, why a non-root user account should have an incapability of accessing the network. A sample of wget on my phone using Google's IP address (I use the IP address because it cannot do DNS lookup obviously) gives a Permission Denied error. At the current moment I am not sure whether this problem lies with Android or with Debian. Does the user need to be explicitly granted permissions to use the network through Debian, or is the application somehow only able to access the network if it's root?
Additional information: The ROM used is PAC ROM, so you can assume any settings changes that could be made from Cyanogenmod or Paranoid Android can be made if necessary. The phone itself is a Oneplus One. No I don't have invites, so don't bother asking.
Opinions on the matter?
Also, on an unrelated note, g++ will only run under root. If I launch it as a non-root user, it will tell me that execvp failed because cc1plus doesn't exist. Why?
Thread's fallen onto the third page, so I'm going to bump.
One day has passed, and no help offered. Bump again.
Another bump. I thought XDA was supposed to be the most knowledgeable forum on Android.
Daily bump until this problem is solved...
Still bumping...
I hope people aren't just looking at the number of replies and assuming it's resolved...
Bumping again. At least 100 people have seen this thread, and not a single one has anything to say.
Bump again. It's now been a week since I asked this question.
Bump.

Accessing system folder without root access

Hi all.
I'm after quite specific need but would like to know more general answer / solution if possible at all.
I know that wihtout being rooted there's not much one can do with system folders, but still, there are some ways and tricks to get to them, one of them being Backup option provided by android, using ADB shell.
I'm after specific file, that is /data/data/com.android.mms/shared_prefs/com.android.mms.categoryInfo.xml
Using Htc One M8, stock rom, I've tried to do adb backup of com.android.mms application, but all I got was 1kb (actually 41 bytes) sized file, which contains nothing.
I wonder, is there any other way to get to the specific system app folder, if you're NOT rooted?
Any help would be highly appreciated.
Additional info: I'm after that file because it has stored Secure message box password in Plain text. My phone is about to go to the service due to several issues, including battery getting way overheated when used, and not charging over 25% at all, and the only thing left to make a backup is the secure box storage, which I used as an "Other inbox" folder in order to have the main Inbox a bit more "clean", and I know I've set it to something stupid and short, and I've accessed them not long ago, but for the f's sake I can't get in the folder anymore (and I'm highly betting that after several attempts even the real password is no longer accepted, and that being the reason I can't figure out the pass by trying, but there's nowhere info it thats true, and if so, how long to wait before real one would be accepted etc...)
Big thanks if anyone could help out, if not - not gonna be the end of the world. But would kinda like to store some of the messages that are newer than my latest backup...
Cheers!
cucolino said:
Hi all.
I'm after quite specific need but would like to know more general answer / solution if possible at all.
I know that wihtout being rooted there's not much one can do with system folders, but still, there are some ways and tricks to get to them, one of them being Backup option provided by android, using ADB shell.
I'm after specific file, that is /data/data/com.android.mms/shared_prefs/com.android.mms.categoryInfo.xml
Using Htc One M8, stock rom, I've tried to do adb backup of com.android.mms application, but all I got was 1kb (actually 41 bytes) sized file, which contains nothing.
I wonder, is there any other way to get to the specific system app folder, if you're NOT rooted?
Any help would be highly appreciated.
Additional info: I'm after that file because it has stored Secure message box password in Plain text. My phone is about to go to the service due to several issues, including battery getting way overheated when used, and not charging over 25% at all, and the only thing left to make a backup is the secure box storage, which I used as an "Other inbox" folder in order to have the main Inbox a bit more "clean", and I know I've set it to something stupid and short, and I've accessed them not long ago, but for the f's sake I can't get in the folder anymore (and I'm highly betting that after several attempts even the real password is no longer accepted, and that being the reason I can't figure out the pass by trying, but there's nowhere info it thats true, and if so, how long to wait before real one would be accepted etc...)
Big thanks if anyone could help out, if not - not gonna be the end of the world. But would kinda like to store some of the messages that are newer than my latest backup...
Cheers!
Click to expand...
Click to collapse
Yes and not.
if you don't have root access, you can not copy an application from the system folder, to make this the ADB would need root permissions. but....
You can download the stock rom, and copy/extract/edit the app you need it.
xdedeone said:
Yes and not.
if you don't have root access, you can not copy an application from the system folder, to make this the ADB would need root permissions. but....
You can download the stock rom, and copy/extract/edit the app you need it.
Click to expand...
Click to collapse
Actually no, if the file is user specific, as in my case, the help of stock rom's file is not gonna help.
Anyway, SOLVED now.
As per this post: http://forum.xda-developers.com/showthread.php?t=2054401
The backup of the app was made and got the file. I've done the same thing without success, because on HTC, the messaging app is com.htc.sense.mms and NOT com.android.mms.
Therefore creating backup of the com.htc.sense.mms did result kin getting exactly what I needed.
In the extraction of the tar .ab archive using dd in linux, I got folder app, within there is a folder com.htc.sense.mms, wihtin there's a folder sp, and there is com.htc.sense.mms.categoryInfo.xml which has the secure box password stored in plaintext.
Voila! )

Additional profiles on Quest unable to Cast. Permissions issue?

I'm wondering if there is a command to make the primary files and folder rw for the new accounts (assuming that's the problem), or a command to make the new user have more rights or something.
I also don't have sounds in the game ShadowPoint on the new account, but Beatsaber, Acrons work fine, so again I'm thinking it's some permission issue, but hopefully someone here can come up with some ideas.
Thanks.

Categories

Resources