Android Root Files after Unroot? - android

I rooted my phone and unrooted it. However several apps show me that i have a rooted phone. The warranty bit is 0x0 and the flash counter also.
Could there be any files which were not deleted?

Agree on the comment about this question being off-topic, but on the development part of it, root detection is done by heuristics detecting specific files commonly used for this purpose and not present in stock Android versions. So, in your case, that's probably what's happening.
For example, you can read this article for an overview of such techniques: https://blog.netspi.com/android-root-detection-techniques/

Related

What is difference between Android and Android Rom?

I am new to AOSP anybody tell me what is difference between Android & Android Rom
I have found when i am googled but I did not understand the exact difference
Android is the open-source operating system used for smartphones.
Android ROM is the Android operating system. It is composed of a Linux kernel and various add-ons to achieve specific functionality.
As far as I know:
ROM
Literally it stands for Read Only Memory. When people talking about ROM it`s referring to the phone's internal memory. The memory where your firmware/apps are stored. When people say, falshing a new ROM, it means they are flashing a new version of the firmware onto their phone.
Android
In this case they are referring to the OS or to the product of Google.
Brace your self, Obvious link coming:
https://en.wikipedia.org/wiki/Android_(operating_system)
ROM is in fact "Read Only Memory." But for your purposes that has nothing to do with the use case here. Early on with some hardware the operating system was stored on a specific chip, a ROM chip. What you flashed onto that chip is called "the ROM image." It had to be written with special purpose hardware, or it had to be written to in a special boot sequence (like with a DOS bootdisk).
With Android, we distribute images which usually overwrite a file system without formatting it or partitioning it. That's more of a sloppy and crappy install and it's likely to go away at some point in time when someone clever does it the same way a desktop runs. So an "Android ROM" is usually just like a zip archive that gets unzipped to /. That's a bad way to upgrade a computer, but it's how it's done for now. It's also more acceptable to do it in such a bad way because on phones upgrades are done so seldom. You may get an OTA upgrade once a month, or every other month. And, you likely upgrade your phone fewer than 10 times.

apps can't be installed on rooted device

I have brought one plus one and tried to install an app. But then it says your phone it's rooted.. Finally it didn't install. I'm aware that if a phone is rooted, then there are two disadvantage . One your phone warranty will not work if the phone is damaged while rooting. And two.. You will get support user acces .
My question is what is the problem from an application perspective, if a phone is rooted.? Why few apps are blocked to get installed on rooted phon . ?
Functions of some apps require root access to the operating system. For example, they might require tuning the kernel options, writing to a raw device or accessing privileged resources.
Android apps typically run in a closed "jail" to protect the system and other apps from contamination of a malicious or poorly written app.
By rooting your phone, you take the risk of this contamination on yourself. It is why carriers will often not honor the warranty after rooting.
That being said, there are often methods of flashing back to a non-rooted version if you do need to claim a warranty. It really depends on your skill level and patience. If you are interested in rooting, there are many resources out there. If it sounds scary, it probably isn't for you, and the app that requires root probably isn't something you should mess with.

How to modifiy the system apps running on my phone

I want to modify the system apps running on my specific phone. I am stumped about some important steps on how to do that - see my questions further below.
N.B.: I am not interested in deploying these modifications to other phones. Instead I want to play with the original code and improve it. Hence "create your own system app" is no sufficient answer.
Background
I am just starting to get into Android development (have sufficient Java knowledge, though). There are plenty of great tutorials out there (e.g. here and here) but they all seem to cover user application development. I'm more interested in getting (a little) "closer to the metal". Unfortunately I am unable to find good sources teaching how to do that.
Example
As an example let's say I want to modify how the built-in brightness control works (e.g. changing the minimum) or want to add features to the call screen (e.g. "Send SMS instead" when the line is busy).
Specific Questions
I obviously need these things to get started...
Sources
The sources for (parts of?) the OS running on my phone. This is the part that confuses me the most. Can I just download the official sources or is it likely that my vendor made modifications?
In my specific scenario (I use a Fairphone), could those modifications be contained in any of these sources:
some core apps deployed by the vendor
the image binaries (some way down the page)
sources for the Linux kernel and some other libraries
Tools
I really hope to stay in Java-land. But either case I need a development (I hope to use Android Studio or Eclipse ADT) and a debugging environment (I hope the Android Virtual Devices suffice).
Is it a valid assumption that I can use those tools for system apps or are they usually implemented in C?
Process
Assuming I can download the official sources and get started with, e.g. Android Studio. As opposed to developing a user app, do I have to do anything special to emulate the modified system app on AVD?
I'm asking because I assume that AVD already runs an unmodified version of that very app.
I am just starting to get into Android development (have sufficient Java knowledge, though). ... I'm more interested in getting (a little) "closer to the metal".
You can of course follow your own bliss, but you may find it pretty frustrating to learn Android development by hacking on the OS itself. You'll find yourself doing a lot of OS debugging and working with harder-to-use tools than normal.
Example
As an example let's say I want to modify how the built-in brightness control works (e.g. changing the minimum)
I realize this is just an example, but this could be a tough one, because there are a lot of things that contribute to brightness control -- there's the app with the UI that sets it, but that talks to the framework and ultimately the driver for the hardware that actually deals with brightness curves for the display, in coordination with the ambient light sensor.
or want to add features to the call screen (e.g. "Send SMS instead" when the line is busy).
There's a dialer app, but implementing a feature like that will be...difficult, provided it's even feasible. I don't know offhand whether that sort of call state is available to the API.
Specific Questions
I obviously need these things to get started...
Sources
The sources for (parts of?) the OS running on my phone. This is the part that confuses me the most. Can I just download the official sources or is it likely that my vendor made modifications?
If you're replacing system apps, you'll need to run an OS signed with debug keys; you don't have access to the signing keys for the installed system apps on a retail build of the OS that would enable you to replace them. That will mean either getting a debug-keys installation or building it yourself from source, and flashing it to your phone. I would most strongly discourage you from using your daily phone for this sort of work -- you don't want it to be bricked when you need to receive an important call.
If you're not running a Nexus phone, then yes, your vendor has made modifications. The system apps are probably modified, and you almost certainly won't have access to the closed source of those apps. Also, there will be closed-source device drivers that are essential to the operation of the OS that you won't have access to. If you're trying to get AOSP Android up and running on such a device, as an individual hacker it's at best very, very difficult. If you're willing to use something like CyanogenMod, you could look to see if (and to what extent) they support your hardware.
If you are running a Nexus phone, then it's a goal of the AOSP project to try to have the OS bootable on select Nexus devices, though you won't necessarily enjoy the fullest functionality of the retail OS build, depending on the state of drivers -- even Nexus phones can have closed-source drivers and bits that make life more, um, exciting for building with AOSP.
In my specific scenario (I use a Fairphone), could those modifications be contained in any of these sources:
some core apps deployed by the vendor
Almost certainly
the image binaries (some way down the page)
Not sure what you mean by that
sources for the Linux kernel and some other libraries
It's unlikely there are significant modifications to the kernel itself, though vendors sometimes do...interesting...things with system configuration. I already mentioned device drivers. Vendors also have custom implementations/modifications of some framework APIs.
Tools
Vendor-specific tools are rare.
I really hope to stay in Java-land. But either case I need a development (I hope to use Android Studio or Eclipse ADT) and a debugging environment (I hope the Android Virtual Devices suffice).
Much of what you want to do can probably be implemented in Java, though it depends on how close you're getting to the hardware which can be difficult to know.
Is it a valid assumption that I can use those tools for system apps or are they usually implemented in C?
The "system apps" are implemented in Java, but again, you sort of have to know where the dividing line is.
Process
Assuming I can download the official sources and get started with, e.g. Android Studio. As opposed to developing a user app, do I have to do anything special to emulate the modified system app on AVD?
That's actually different, because you're dealing with an emulator system image instead of a phone image. The emulator system images are completely open source, and you can build them from AOSP.
I'm asking because I assume that AVD already runs an unmodified version of that very app.
That's correct.
To come back to my initial point, if you read between the lines of what I'm saying, I won't tell you it's impossible, but the difficulty ranges from freakin' tough on the easy end to spend-years-of-your-life on the hard end. If you really want to proceed, your best bet may be to buy the phone that's best supported by CyanogenMod and work that angle; there's a more active developer community there to help you. I know you're more excited about trying to customize the OS than you are in making a user-space app, but you'll experience less frustration with the latter than the former.

Android FileObserver for monitoring other apps?

I suspect that I already know the answer to this question, but I wanted to ask the experts anyway.
Would it be possible to use the FileObserver class to monitor changes to files belonging to other apps (i.e. things in the /data directory that don't belong to the app implementing the FileObserver)?
It seems that even if I had a rooted device, there isn't a way to have my monitoring application run as root.
The only possible (and unappealing) solution I've come up with, is having a rooted device, and changing the privileges on all the files on the device so that they would be accessible by the monitoring app.
Thanks,
Jarabek
This would almost certainly have to be done in native code, and would only work on rooted devices.
You should look into inotify.

Selective USB UMS-Mode

is there a way to regulate the UMS-mode? I would like to implement a feature, that lets the user select which files he wants to share with a pc. Say you only want the pc see the picture subfolder, but not all the other folders on your sd. I am not sure if this is possible and most likely I will require root access when possible.
I know this will bring no real security, because you can always remove the sd card and read all the files on it. I thought of this feature mainly because of my crappy car radio. It can read mp3 files from a usb stick. But the many different folders and strange files on a android sd card seems to kill it. Furthermore I think there are a lot of other situation when you would prefer only to show a smaller part of your sd memory to a pc.
Can you imagine any other way to simulate the described behaviour? Can I generate completely new usb modes and implement my own UMS?
Every idea is welcome.
Sincerely Erik
is there a way to regulate the UMS-mode?
Not from an SDK application. Also, bear in mind that UMS mode is being deprecated in favor of MTP.
I am not sure if this is possible and most likely I will require root access when possible.
No, you will need to write your own custom firmware.
Can I generate completely new usb modes and implement my own UMS?
By writing your own firmware, presumably, yes.

Categories

Resources