What are MIUIOP? - Android Q&A, Help & Troubleshooting

If anyone knows descriptions to miuiop please share, I'm curious what they do.

What App Ops does is allow a user to revoke an individual permission for an app. When the app then starts and tries to make an Android system call to access something that the user has now forbidden then Android will return an error and won’t grant access to that data or functionality.

As you can see there are several numbers starting with 100xx. These are the app IDs (UID = user IDs) the system is dealing with. Every app has a corresponding UID which is needed for file permission rights. Example: If only a certain app (UID 10666) has the permission to open a certain folder, the folder will be restricted to u0_a666 (=user 0, that's you, + app UID 10666)
Usually the first UID slots 10001, 10002, ... are system apps since they get started first upon an initial boot of your device. I assume that MIUIOP belongs to the MIUI optimization, but not sure about that. But you can figure it out with the help of the UIDs:
Apk Analyzer - Apps on Google Play
Detailed reports of the applications on your device. 📱
play.google.com
Selecting an app shows you its UID. Unfortunately it doesn't show you the UID in the app's list directly.

So the uid number could be different across different miui versions… unlike standard appops which are the same regardless of device?

Posting a list of the apps just because:
10008 com.miui.core.internal.editor.services
10017 - com.miui.systemui.overlay.devices.android
10020 - com.android.theme.font.notoserifsource (Noto Serif / Source Sans Pro)
10026 - com.android.internal.systemui.onehanded.gestural (One Handed Mode)
10033 - com.android.overlay.gmstelephony
10036 - com.android.systemui.gesture.line.overlay
10037 - com.miui.systemui.carriers.overlay

The app UIDs are assigned ongoing by your system on first boot (for system apps) or after installation (for user apps). Example: The first app you install on your device gets the UID 10201 then the second one gets 10202 and so on. It doesn't depend on your MIUI version or sth like this.

Related

[Q] How UID of an app determined during install in Android?

The following link gives a brief description about package installation process in android.
java,dzone,com/articles/depth-android-package-manager
I'm curious to know how the UID of an app is determined during its installation based on set the permissions present in its manifest file.
Also there is the platform.xml (in /frameworks/base/data/etc directory for 4.0 ICS Source code)file which contains list of permissions with gid associated with them. The description says
The following tags are associating low-level group IDs with permission names. By specifying such a mapping, you are saying that any application process granted the given permission will also be running with the given group ID attached to its process, so it can perform any filesystem (read, write, execute) operations allowed for that group.
In a similar way there is a list of high level permissions assigned to specific uid's as well.
My question is when an app is installed with permissions X,Y, Z how does its access specified is it from the mapping from this platform.xml
Also everytime the app is run does the mapping take place at every instant (that doesn't seem right from the initial design of android where the app permissions cannot be changed unless there is an update). So if that is the case where does it store saying this app should run with such and such access or such and such uid.
I hope I made my question clear, let me know if you need more information. I'm just trying to learn more on how the internals of the Android OS work.
Thanks

Generate touch events Android (other apps)

Hello Team,
I am really in need. I have made an app for generating touch events in android. But it works only in my app; when i minimize app, it shows "Error: requires INJECT_EVENTS permission. I have placed this permission, tried to sign my app with OS signature file, moved app to /system/app/, chaned permissions as per system apps; but unfortunately none of them worked.
It would be very thankful to anyone who can guide me.
Wishing to hear soon.
Regards.
My Code:
Instrumentation m_Instrumentation = new Instrumentation();
m_Instrumentation.sendPointerSync(MotionEvent.obtain(
SystemClock.uptimeMillis(), SystemClock.uptimeMillis(),
MotionEvent.ACTION_DOWN, 300, 300, 10000));
m_Instrumentation.sendPointerSync(MotionEvent.obtain(
SystemClock.uptimeMillis(), SystemClock.uptimeMillis(),
MotionEvent.ACTION_UP, 25 * 4 / 5, 50, 10000));
And this is not working out of my app.

Monitor system file changes (root) ?

Checked posts / searched for an existing answer... didn't see anything (please move this post if it is in the wrong section)
So I have a app, when I open it asks me what Google ID to uses (preferred ID) but after selecting a Google ID I can not change to a different ID
- If I clear the App Cache the selected ID persists
- If I clear the App Data the selected ID clears and the app returns to the select ID option
- I keyword searched for the App name on my device (Nexus 5x)with Root Explorer (12 different file locations, with subfolders and a bunch of empty folders)
Clearing App Data is a working interim solution, the downside is that every time I clear the App Data the app "downloads assets" (40mb+ ~40 times per day - 1.6Gb!)
What I am hoping to find is a app / script / terminal / log solution that will tell me what file is being modified when I select the Google ID, so I can delete that file re-open the app and change Google Logon
(I contacted the app developer, they said they may be able to fix the problem on the next patch eta 12-24 months)
So I have tried these apps:
https://play.google.com/store/apps/details?id=file.observer
https://play.google.com/store/apps/details?id=scd.lcex
https://play.google.com/store/apps/details?id=eu.thedarken.sdm
But I didn't see system changes (root level) or I didn't know what to look for in LogCat
Any help or suggestions are appreciate!
- I do not have a computer with me (ADB) will be about 7 days before I can try that
- I have been experimenting with deleting files / folders and testing to see if I get lucky (probably not the best method)
- I am not a developer
My current process (as of today) - I clear the app data, then restore the app data with TB (just restoring doesn't clear the sign in status)
As long as my TB backup is "always" in the signed out state, then the "app assets" restore with no issues (and I don't have to keep downloading them)
I am looking for a way to get these (2) operations into a single script / file / shortcut, but it is working for now
I did try the terminal with cp -a (copy the assets - app had a error on library permissions when the files were restored) chmod, chown, and find (try and locate the file) but had minimal success

What Do Mobile App Installation Result Codes on Huawei Devices Mean and How to Resolve Them?

You may have encountered app installation failures during app development. Lets take a look at some of the most often reported errors on Huawei devices, what they mean and how you as a developer can fix them!
The app package is invalid, incomplete, or incompatible with the operating system (result code: -2).
Cause analysis: An invalid package is uploaded for a third-party app.
Solution: Upload a valid app package.
Insufficient storage space (result code: -4).
Cause analysis: The storage space is insufficient for installing an app.
Solution: Open Optimizer and tap Cleanup to free up some storage space on your phone.
An app with the same package name has already been installed on the device (result code: -5).
Cause analysis: The app cannot be installed as the package name already exists.
Solution: Change the package name to a new one.
Incompatible update (result code: -7).
Cause analysis: The package name of the later version is the same as that of the earlier version currently installed, but their signatures are different.
Solution: Change the signature of the later version to that of the earlier one.
Incompatible app that supports ShareUid (result code: -8).
Cause analysis: The installation failed because the signature of the to-be-installed app that supports ShareUid is different from that of the installed app that supports ShareUid.
Solution: Ensure that the signature is the same as that of the installed app that supports ShareUid.
The shared library is lost (result code: -9).
Cause analysis: The Google Maps library that the app depends on does not exist. As a result, the app installation failed.
Solution: It is recommended that you integrate HMS Core into your app to avoid such dependency issues.
An element name of the to-be-installed app is the same as that of an installed app (result code: -13).
Cause analysis: The ContentProvider defined in the app is the same as that of an installed app.
Perform the following steps to find the conflict:
View logs and check the installation failure callback information.
Run the adb command to obtain all ContentProvider definitions on the device, and find the app that caused the conflict. adb shell dumpsys package providers >d:/temp/provider.txt Solution:Uninstall the conflicting app or resolve the conflict.
The app is incompatible with the CPU of the device (result code: -113 or -16).
Cause analysis: Adaptations for specific CPU versions were not performed when the app was packaged.
Solution: Adapt the app for the CPU version of the device in question.
App verification timed out (result code: -21), and app verification failed (result code: -22).
Cause analysis: When the app was being automatically verified by Google Play, the network connection timed out. Usually, the preceding process is not triggered unless Google Play has been updated by the user or by a downloaded app, which leads to verification timeout.
Solution: On the device, go to Settings > Apps > Google Play Services and tap DISABLE on the App info page, or go to Settings > Apps > Google Play Services Updater and tap Uninstall updates in the upper right corner. Then click FORCE STOP (if available) to deactivate the app if it is still displayed in the app list.
On the device, ensure that Google Play Protect is disabled.
The app package failed to be installed because a later version has been installed (result code: -25).
Cause analysis: Android devices allow for the creation of multiple user accounts. A non-owner account may have downloaded and installed a later version of the app in PrivateSpace for testing purposes. If so, the installation will fail.
Solution: Check whether a later version of the app is installed in PrivateSpace by a non-owner account. If so, uninstall the app and install it again.
Parsing failed (result code: -102).
Cause analysis: An error occurred when generating the package, causing parsing to fail.
Solution: Contact the technical support of the corresponding channel to check logs to locate the download path, download the APK again using a browser, and then install the APK in ADB mode to check whether the error occurs again.
The app package does not contain any certificates (result code: -103).
Cause analysis: The app package is for Early Access targeting specific users and does not contain any certificates.
Solution: Add a certificate to the app package.
Unknown error (result code: -111).
Cause analysis: The device is a TD Tech dual-system policing terminal and is customized to limit app installation.
Solution: Instruct users to contact TD Tech for assistance.

[DEV][AAOS][GAS] Google Services on Android Automotive OS build

Hello, I'm looking for a way to use Google Automotive Services in my custom ROM.
My aim is to develop an application using privilage/system permissions (android.car.permission.CAR_INFO, android.permission.SYSTEM_ALERT_WINDOW, etc.) and Google API, but I can't see a way to install it on the official emulator.
For a start - I've downloaded 12.1 sources, built an SDK image and created an emulator. Then I've downloaded AAOS 12.1 emulator image with a Play Store.
Side note: I'd like to do the same with AAOS 13, but there is no official AAOS 13 emulator image with GAS so far.
Then I've found all apk packages present in the emulator system img file and absent in my image, sign them all with my platform key and install with adb install with "-g" switch.
The emulator starts but it just pretends to work.
Google Maps starts, but it can't read the GPS signal (I'm in the middle of the ocean )
I still see "The device isn't Play Protect certified" message, even when registered at https://www.google.com/android/uncertified/.
When trying to log into a Google Account, I can see "addAccount(com.google): java.lang.SecurityException: Cannot delegate to Service with different signature." exception thrown.
There are a lot of security-related errors in logs:
GooglePlayServices not available due to error 9
com.google.android.carassistant requires Google Play services, but their signature is invalid
java.lang.SecurityException: UID 10157 is not associated with a first party app!
File error accessing recents directory,
Tried to access the API:ViewConfiguration which needs to have proper configuration from a non-UI Context:[email protected]
Package com.android.car.activityresolver is not installed for any user, java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib64/libbluetooth_jni.so" needed or dlopened by "/apex/com.android.art/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
java.lang.SecurityException: Caller com.google.android.gms needs to hold android.permission.SCHEDULE_EXACT_ALARM to set exact alarms.
and a lot more....
Side note: I've tried an another way - to install my app as a system one in the official emulator, but repacking those super images beat me .
What else should I do? Is there an easy way, like Open GApps for Automotive or how can I create my own GApps package?

Categories

Resources