Root vs system signature - android

What are the differences in priviledges in Android of root access vs system signature?
I'm having trouble uninstalling a system app with system signature, and I read that it can be done via root.
Can someone explain conceptually what the differences are?
In the end I want to know how to programmatically uninstall a system app.

Related

Move system service from AOSP build tree to installable APK?

I am extremely new to Android development. My company supports our own Android build for our devices using the AOSP build tree with some of our needed system services and APK's being build within the AOSP tree.
However, we are planning on moving to a vendor supplied Android build and we want to remove a system service from the AOSP tree and move it into a separately build and installed APK, but still be accessible as a system service to other installed applications.
Being so new to Android development I don't really even know where to begin.
As a first step I find where the APK for the system service is generated/output in the AOSP tree. I installed this APK onto our device. The installation appears to have worked. However, when an application runs that needs to use that system service, Android displays a message about how the system service has stopped.
1. What steps do I need to take to make this work?
2. What other information is needed to diagnose the problem? I'm so new to this I don't know what information I should be providing.
However, we are planning on moving to a vendor supplied Android build and we want to remove a system service from the AOSP tree and move it into a separately build and installed APK, but still be accessible as a system service to other installed applications.
Assuming you have made changes in ServiceManager to add your own system service in AOSP. Yes, it is possible to move your system service to a separate apk. This will reduce your platform dependencies. However, sepolicy changes will be still required(in order to add your service dynamically in ServiceManager). Here is the complete reference to add system service from apk:
https://devarea.com/aosp-creating-a-system-service/#.XOOD9KRS9EY
The installation appears to have worked. However, when an application runs that needs to use that system service, Android displays a message about how the system service has stopped
Please elaborate, what changes you have made, and root cause behind system service crash.
What steps do I need to take to make this work?
Suggest to move you system service to a separate apk. Please refer above link which explains creating system service (from apk).

Android use System app without root to write to file

I am currently developing an AOSP ROM and I need to make a system app which is able to write data to CPU text files. The thing is I am able to do it while I have root access but the ROM needs to be flashed and provided to a non-root phone which should still be able to use that system app.
Could someone with prior experience please provide some guidance ?

Is it possible to have more than one recovery installed in android?If How do i find if what recovery someone is using?

Currently, I am making an Android app which require Root privileges. Basically what it does is that it flashes a zip file via recovery[Custom Recovery's like TWRP,CWM]. The problem is that I don't know whether multiple Recovery's can be set up like Multi Rom on the same device. And if possible how do I find list of Recovery's that is installed on the device.

List of valid users on Android system

I am debugging an application on a rooted B&N Nook Glowlight. The app runs fine on a rooted B&N Nook SimpleTouch but crashes on the Glowlight.
It seems that the paths in use on the Glowlight have the wrong users assigned to them. How can I get a list of valid users on Android? On a standard *NIX I would just cat /etc/passwd but that file does not exist on this Android system.
I suspect that both devices are Android 2.1. If there is a command that will tell me this for sure, please let me know. The both devices are running Linux kernel 2.6.29 (armv71).
Edit: Note that I mean a list of system users, such as root, and app_12. This is how Unix traditionally handles separation of privileges, and I think is where the problem lies. I don't mean a list of Human user accounts. I'm looking for a CLI command, not an Android API call.
That's available via AccountManager.getAccounts(), if your app has the required permissions to view accounts at all.
From your description, it's possible your app is hardcoding a path that is correct for old Android versions, rather than using a newer, more correct way to get a file's path via Context.getFilesDir(). See http://developer.android.com/training/basics/data-storage/files.html .

How to launch a native server application (ELF) on a rooted Android at/after boot?

I have a rooted Android tablet. I've copied my native server application (Linux ARM ELF) to /data/tmp and it runs. There is only one thing missing: I want to launch the server when the tablet boots up. There are several circumstances, which makes the mission easier:
the device is already rooted, I can copy anything to it,
no installer required, the mission is completed, when the autostart is once set up,
my server program requires no settings, no files, no libs, no root right, nothing at all.
I don't wanna play with creating APK package, nor play with NDK. I am searching for the easiest way. It is OK, if there's different solution for different Android distros (I am insterested in current versions, 2.2 and 2.3).
Maybe I should use inittab? Anyway, I prefer "most official" solution, if we can talk "official" in case of a rooted device, let's say I'm looking for solution with "as less hack just as possible".
Update: I found this: http://www.androidenea.com/2009/08/init-process-and-initrc.html - I'll try it and close the question, if it's OK.
The easiest way is an APK. I believe you can create a service that launches on boot and then execute your ELF from there. Your APK can also provide a "configuration" app which lets you install/uninstall the ELF so all files can be cleaned up if the user removes the application APK.

Categories

Resources