I want to create an application that preserves its APK file with the ROM and is available (fresh installs) after factory reset.
Logic:
I bought a new phone from an e-commerce website and the phone had the e-commerce's application pre-installed on my phone.
I uninstalled the application but the application re-installed after I did a factory reset.
Uninstalling the application showed that it was a non-system application.
Automatically being re-installed shows it is included with the ROM.
How do I achieve this?
Factory reset basically wipes the internal storage and replaces it with a copy. On some models, you can replace that restore image- but you need the device's boot loader to be unlocked to do that. Its not a programming thing, its a matter of replacing the restore image with an image including your apk.
If you want your app to always be included in Device even after factory reset. For that you need to embed your app into that particular ROM, Like all google application comes already embedded in Android ROM.
Also If can develop new ROM from stock one then you can embed your apps too. Like, most of the Chinese and Samsung's TouchWiz ROM comes pre-bundled with their own APPs, instead of that stock one e.g Contacts(System), Messaging(System) and Flipkart(Non-system).
Related
I am working on a project where I am developing mobile app (android) using react native. The development of the app is fine. However, I need to remove all other apps from the existing device (I am using Nexus 7) but except settings and my app (the one that I am developing).
This special requirements is a must have as the device will be giving to the customer for one purpose only. So I need to have only one app installed and disable any option to installed any other apps from the app store.
But I have no idea, how I might be able to do so. So I really need your help. If you could guide me on this, would mean the world to me.
AFAIK you can't remove the standard applications because they are stored in flash memory (OS image) and this memory is readonly. What you can do is to download entire android, build own image stripping all the unnecessary services, applications, etc. And then flash this new image to the device. The process is not sample and straight.
I need to develop a android and ios app for a customer and need to quote how long time it takes to lock the apk file to only install in their devices to be manufactured, but not sure how and the time consuming (hence the cost to do so..) to come up with this request.
Wondering what are the steps to proceed with that, how complex is that process and how long time it takes.
Any information is appreciated.
There is only one manufacturer of iOS devices. In all likelihood, it is not your customer.
On the Android side, what you want is not possible — you cannot, on your own, create an APK that can only be installed on devices from one manufacturer. An APK can be installed on any compatible device.
The manufacturer could make changes to their Android build that you could leverage, such as the manufacturer adding some custom feature string (e.g., com.manufacturer.hardware.this.is.so.fake), which your APK requires via a <uses-feature> element. Since other conventional hardware will not have that feature string, your APK will not be able to be installed on that hardware. Custom ROM developers and people who root their devices could add that custom feature string to their own devices, though, and still install your app. But, again, this sort of thing requires the manufacturer to take certain steps (e.g., add this custom feature string).
In my Android manifest, I have flagged my application as "persistent", so that it automatically restarts if it crashes, is less likely to be killed by the system, etc. I know that normal applications cannot use this setting, but I am working on a custom ROM, and I load my application into the priv-app folder, and so I am able to use it.
This works perfectly well on pre-Lollipop phones. However, when I load my APK onto an Android 5 phone, the "persistent" setting is no longer honoured. I can use 'dumpsys activity' to verify that my app is persistent on Android 4.4.4, but not on Android 5.0.
Is there some additional requirement for persistence in Android 5? I see that some system-supplied apps are still persistent, so it's not as if it's completely impossible. Thanks.
Turns out I misunderstood the nature of the problem. The real problem was that I hadn't given the apk the selinux context permissions. I used chcon to copy the context from another file in priv-app and that sorted it out.
I made a little modification to the default Phone application of Android 4.2.2 from AOSP. I want to replace the stock app with the one i modified. When I try to remove the stock app and place the modified app (and then reboot), the phone app fails. I'm guessing it has got something to do with apk signing. Is there any way to solve this?
My device is rooted and i also have the factory image.
Is it possible in Android, to disable standard features of the phone such as Mail, browser, phone etc?
What I'm asking is, is it possible to create an application that, when launched on startup provides some features to the user, but sits "on top" of android so they only have access to your application and not the underlying features of android itself?
Effectively, the phone still runs android, but the user never gets to see this as they are limited to the functionality that your app provides.
You can replace all of the stock apps that come in the AOSP. browser, dialer, homescreen, etc are all just APK files you could replace them with any other APK file you want, lots of ROMS from the Android mod scene replace the stock apps for more robust versions.