** Not sure if this is entirely relevant to SO, it is programming related in nature but if its more suitable to a different forum please let me know and I will remove it **
I have a couple of questions for any Rom developers/experts on here regarding things that can be done with Android ROM's.
1) Is a parser Rom upgrade possible? So is it possible to change a small part of a ROM and then allow users to upgrade their ROM easily?
So can I change a part of a ROM and then a customer can upgrade to the newer ROM without having to be technically savvy and needing to root and flash their devices?
2) Can a change be burnt into a ROM so that when a user selects "Restore Factory Settings" that it doesn't remove the upgrade to the ROM?
3) So essentially I want to know if its possible (with a device manufacturers permission) to add to a ROM some small additional parts and then give this new ROM version as a firmware upgrade to the device so that a user only has to "upgrade" and not go through the process of rooting and flashing there device?
I'm not sure, but I feel that likely what you ask makes no sense: the whole point of rooting is being able to change the ROM.
Maybe if you give more details about what you really mean to do, someone will have a workaround that will satisfy you anyway.
Related
Interested in such a question. Everywhere I read that on android 7 it is programmatically impossible to turn off flight mode. And they write that if there is a root, then everything can be done. And I see that there are programs that allow you to programmatically enable flight mode (Tasker for example).
Question
How the root helps turn on flight mode. Do we have access to new features? Or there is editing files (adding scripts). Describe in the general process, if possible, at least a general idea.
With root, you get access to modify system files. It is usually due to this that many apps do not work if you have a root. Generally speaking, when you have the ability to modify these system files, you or any other app can make any change to your device.
I really suggest that you go visit xda. You will find a massive community that is super interested with this kind of stuff. The community there is very well versed with rooting and custom ROMs which I believe you may find interesting based on your question.
Is it possible to disable or remove the root access programmatically on Android? Thank you
A "user" (vs "userdebug" or "eng") build of official Android sources does not feature any sort of root access as a designed feature.
This is what you normally get on a production end-user device from a name brand vendor. In contrast, it is not uncommon for cheap devices of uncertain origin to ship with one of the other build varieties (though that is not necessarily a bad thing, as such half-finished builds often have flaws you need this capability to fix).
Of course nearly any software project has the potentially to be intentionally exploited, and someone's modified customization of Android could include anything under the sun, but those are different topics and far too broad for Stack Overflow where questions must be specific.
In terms of removing exploits or escalation toolkits installed as part of a custom ROM - to remove them, you would have to ask a question that was specific about what they were and how they worked. It is likely however that you would need to have the capability to make lasting changes to the system partition, something that can be as much about hardware locking and bootloader/recovery capabilities as it is about having root access after a complete boot (root can't make a lasting change if the flash is locked; conversely, if you can write to the flash without booting the normal system, root matters less).
Long story short: How open is Android OS for developers?
A little in depth:
For instance, if I'm willing to write my own text-input interface, would it be possible (like, totally overwrite the built-in-phone one)? Or that's something like core feature and cannot be changed?
And, is there a difference for developers, whether I buy a Google phone, HTC or Samsung etc.?
P.S. If that's all possible, no warranty voids for such changes?
Hope I've made myself clear and thanks in advance!
You can create custom input method. For development the best is Google phone, but in order to work on all hardware, especially a keyboard, you need to test on all the devices you want to be supported (try to borrow them instead of buying all of them :P)
For android you can always do that..you need to download the source code from google repository. make the changes according to your wish for the global component, build the code and flash that to different device.
so you can always add your customized component to open source Android
Does making custom roms involve the same skill set as making apps?
Are they one in the same?
No. Custom ROM's require a VERY good understanding of much lower level programming than making an app. virtually anyone can make a app using CS, or ZDE or Netbeans for that matter but a custom ROM expectes a pretty full understanding of the linux core.
No, they are not at all the same. Custom ROMs are much more involved, and involve creating an entire operating system that will control your phone. You need to create an entire image that will then be flashed on to your phone via the bootloader.
Creating an app requires only writing one set of Java files to design an application, and then copying it to the operating system that is already on your phone.
Making a custom ROM has 2 parts in it.
Making a new custom ROM (from scratch) and
Making a custom ROM for your device from existing source code.
Let me explain this:
If you plan to make your own custom ROM from scratch, definitely it would need lots of skills and efforts.
Making ROM from existing sources is comparatively much easier than the above one. For example, lets say your device is not officially suported by CayanogenMod. Then you can make CyanogenMod for your device. And this does not require in depth knowledge.
To make an android app, you should be knowing the coding part.
So making ROM and apps are totally different areas. They are not same.
Hope this helps!
Custom ROM involves making many things one of them is the app making.
If one wants to make a perfect and usable custom ROM he should have a good programming knowledge and GUI knowledge too.
say for e.g PIE(PA) is an opensource if you want to include it in your rom source is avail but if you are good at programming you can do it easily by applying you mod too.
Is it possible to programmatically restart the phone from a application (service) running on top of the Dalvik VM?
If the SDK does not provide this functionality, then how about using the NDK and calling some functions provided by the kernel? I know this option is not preferred (not stable enough libs), but if it's the only option, I'll have to consider that as well.
Hopefully not. :-)
If it were possible to restart the phone at will, a malicious app could quietly do it at random intervals and make your life unhappy.
The NDK does not provide you with any additional abilities here, because Android relies on process boundaries and Linux access rights for security, rather than a Java-language sandbox.
Why do you want to do this? Maybe there's some other way to accomplish what you're after.
powermanager.reboot is available since api level 8.
requires reboot permission
I found the correct system calls in Linux that would do the trick and after hours of fiddling around with the NDK/JNI paths, I finally managed to call the function. The result was that I need super-user permission for that. I kind of guessed that this would be the case.
Is there anyway to overcome this problem? Other than rooting the phone, which I'm still trying to avoid.
It's still possible to reboot the phone with adb. I guess that communicates with ddmd or some other daemon, so could it be possible to somehow use the same functionality?