All privileges app on Android from IntelliJ - android

I recently switched mobile phone operator and I brought my number with me. However, the number stored in the SIM, which is visible to Android, is incorrect (it is the number that was given to me before the switch over).
Somebody wrote a little app a few years ago that allows changing the number on the SIM:
https://github.com/fommil/MyPhoneNumber/blob/master/src/org/lytsing/myphonenumber/MyPhoneNumber.java
I have no idea how the original author ever got it to compile, I've needed to use reflection (as others have discovered).
But there is an additional problem: apparently this must be run by an app signed with the "system signature key": https://stackoverflow.com/a/6029410/1041691
There is IntelliJ documentation for signing Android apps, but I am failing to interpret/translate the (Eclipse) instructions for dealing with this fabled "system" key: https://stackoverflow.com/a/3651653/1041691
How do I run an app on my Nexus 5 with full access? (which is physically connected by USB)

How do I run an app on my Nexus 5 with full access?
You don't, except perhaps by compiling your own version of the Android OS from source, rolling that into a ROM mod, and installing that ROM mod. Then, the signing key will be your own generated one, and you can sign other SDK apps with that key to grant them access to system-level permissions.
You might be able to install some off-the-shelf ROM, if they publish their signing key, and I have no idea if any of them do. I certainly wouldn't.

Related

Android apps built in Unity fail to update / reinstall on devices with Samsung Knox security

We are building an app in Unity for the Samsung S21 specifically, and we are noticing an interesting bug that resembles the following: https://issuetracker.unity3d.com/issues/android-not-enough-storage-space-to-install-required-resources-error-when-building-app-bundle-with-split-application-binary.
We have isolated it to phones that are "Fully managed" with Samsung Knox, and have noted that this occurs across all apps made with Unity, including major commercial releases on Google Play. This does not appear to be an issue with non-Unity apps.
After a factory reset, our app installs fine, but once it is updated or uninstalled and reinstalled we get the message "Error: Not enough storage space to install required resources." I have noticed that certain folders do not delete after the app is uninstalled--specifically /files/il2cpp and /files/Unity, and I cannot delete these on Knox-protected phones, while I CAN delete these folders on standard devices.
My Knox security settings say "User Deletion: Disallow."
I know that Knox is the issue here, but I am curious if anyone has any explanation what in particular with Unity is causing the problem. My suspicion is that this is because my Knox security settings do not allow me to delete, but it is interesting that this only seems to be the case in Unity apps as apps not developed in Unity (NBA Live is an example) uninstall and install fine. It is also worth noting that this all seems irrespective of the link I put above with the initial bug that claimed it was related to splitting the application binary.
We determined that using the Managed Google Play store only for downloads does not produce the issue. Any downloads from the commercial store--specifically Unity apps--will cause this issue. There is no workaround for this. If the organization with which you are working would like to be able to install a specific app on a phone with an account managed through Knox it must allow the specific app on the Managed Google Play store.

Multiple APK's how does Play decide which to download

I am going to create a tablet APK, which will not have some functionality that my phone APK has.. that's basically the only difference, however since the tablet APK will have less permissions (no phone requirements) how do I make sure folks with PHONES are going to get the PHONE version of the APK?
IE, a table user will only get the version with no phone permissions, since their device doesn't support it, that I get.
But a phone user, could run the APK without the phone requirements, as well as the APK with the phone requirements, so how do I make sure that phone users get the PHONE version of the APK, using the multiple APK setup in Play?
Look at the documentation for the "compatible-screens" tag for the manifest file.

Android device vendor system signature key uniqueness

I'm sure this is a dumb question but Googling got me nowhere.
Does each device vendor do its own Android build? More to the point, does each device vendor sign its build with its (the vendor's) own system signature key, such that we should not expect any two Android devices (at least, devices from different vendors) to utilize the same system signature key?
Example: I know I'm not the first person to want to run an app with sharedUserId="android.uid.phone" and process="com.android.phone". But this requires my app to have been signed with the system signature key. If, by some miracle, I were able to obtain the system singnature key for my Acer device and sign my app with it, would this restrict my app to run on Acer devices (or perhaps just my particular model), since other vendors' devices would have their own Android builds and their own system signature keys?
More to the point, does each device vendor sign its build with its (the vendor's) own system signature key, such that we should not expect any two Android devices (at least, devices from different vendors) to utilize the same system signature key?
Generally, yes. At least, all the serious vendors do.
If, by some miracle, I were able to obtain the system singnature key for my Acer device and sign my app with it, would this restrict my app to run on Acer devices (or perhaps just my particular model), since other vendors' devices would have their own Android builds and their own system signature keys?
Well, your app probably would run on other devices, but it will not be able to obtain that shared user ID.

Android applications from unknown sources

I don't know if this is programming-related (much) but I've recently started playing around with writing my own applications.
My phone is running cupcake/1.5. There is no "unknown sources" option, anywhere, at all. Carrier is AT&T.
Does anyone know how I can overcome this issue?
I you are writing applications, you have installed the SDK... the eclipse debug install mechanism should work, so should 'adb install whatever.apk' Even on AT&T.
If you didn't have the sdk, you could get "sideload wonder machine" which is a packaging of a small part of the SDK capability for non-technical users to enable them to install non-market apps in the way you can with the SDK.
You may have no recourse unless your phone can be rooted; AT&T locks down many of their phones and prevents installing non-Market apps. In their words from their Q&A:
Q. Why can't apps be installed from sources outside of the Android Market?
A. Android Market, managed by Google, is open to all developers. There is no approval process for applications, they are all accepted by default and Google has stated that they place apps in the Android Market within 24 hours of their submission. AT&T selected Android Market as the exclusive source for applications because it forces developers to be accountable for the apps they submit. If the Android community has issues with an app, the app can be flagged and removed. This minimizes the risk of malicious apps harming customers and provides more protection to the customer’s private data stored on the phone.

Build android system from source

I've recently purchased Samsung Galaxy Android phone after using Openmoko phone for 2 years.
One of the reasons for choosing Android was is that it's open sourced.
I don't want to depend on phone maker to provide updates for my phone. I'd like to do it myself.
Right now I'm in research stage if it's worth the time or not. So here are the questions:
I found some tutorials for building ROM images from source. They tell that Android build script will ask for make of the phone before building kernel. Does it mean that all the phone specific stuff is handled by the script or I will have to do some voodoo before I can flash it onto my phone?
Drivers. How are they handled? Are they included in the source as binaries and added automatically (question 1) or will I have to dissect old firmware to get them and put in my build? I realize that would mean some problems with module/kernel versions compatibility.
Is there is something I'm not aware of that would prevent me from building my custom firmware or make it very time-consuming?
I'm not afraid of installing SDK's and toolchains, after all I'm an Openmoko owner.
It's gonna be a little more complicated than that.
On any consumer Android phones I've seen, the user doesn't have root access to the OS. So step one, would be finding an exploit to get root.
Even after you get root, all consumer Android phones "lock" the bootloader to prevent unauthorized OS images from being booted.
The Android OpenSource project only contains device drivers for a small number of phones (Google dev phones, possibly the Nexus One?). For other phones, the drivers are proprietary binaries that the manufacturer loads on the phone. They generally aren't available separately.
Even with all of those obstacles, some enterprising smart guys have managed to create custom "ROM's" that blend the OpenSource release with drivers ripped OEM install on the phone, etc. CyanogenMod is one of the best known and is available for several different Android devices, but unfortunately the Samsung Galaxy does not currently appear to be one of the device supported by Cyanogen.
I found an old link here to a guide to getting root on the Galaxy and loading a custom ROM on it, but unfortunately the ROM they link to doesn't seem to be actively maintained anymore. It might be worth doing some more exhaustive google searches to see if you can find anyone doing active development on the Galaxy.

Categories

Resources