Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intents for a few devices #5

Open
akwizgran opened this issue Nov 9, 2018 · 3 comments

Comments

@akwizgran
Copy link

@akwizgran akwizgran commented Nov 9, 2018

Thanks for maintaining this very useful resource. I'd like to contribute some notes about intents for opening power management apps on a few devices:

Huawei Ascend Y330 (Android 4.2.2, EmotionUI 2.0):

am start com.huawei.systemmanager/.power.HwPowerManagerActivity opens power saving section of system settings/battery section of Phone Manager. From there, "Protected apps" opens list of protected apps and "Bkgd power-intensive apps" opens list of power-intensive apps.

am start com.huawei.systemmanager/.optimize.process.ProtectActivity opens list of protected apps directly.

am start com.huawei.systemmanager/.power.PowerConsumeBackgroundActivity opens list of power-intensive apps directly.

am start com.huawei.systemmanager/.optimize.bootstart.BootStartActivity opens list of apps that can run at system boot.

am start com.huawei.systemmanager/.optimize.ProcessManageActivity opens list of apps currently running in the background. Apps can be selected and killed.

Huawei P8 Lite 2015 (Android 5.0.1, EMUI 3.1):

am start com.huawei.systemmanager/.power.ui.HwPowerManagerActivity opens power saving section of system settings/Phone Manager. From there, "Protected apps" opens list of protected apps and "Power-intensive apps" opens list of power-intensive apps.

am start com.huawei.systemmanager/.optimize.process.ProtectActivity opens list of protected apps directly.

Huawei P8 Lite 2017 (Android 7.0, EMUI 5.0.1):

am start com.huawei.systemmanager/.power.ui.HwPowerManagerActivity opens battery section of system settings/Phone Manager. From there, "Close apps after screen lock" opens lock screen cleanup list, and "Power-intensive apps" opens list of power-intensive apps.

am start com.huawei.systemmanager/.optimize.process.ProtectActivity opens lock screen cleanup list directly. This works the same way as the protected apps list on older versions of EMUI, but it's a blacklist rather than a whitelist.

Samsung Galaxy J3 2016 (Android 5.1.1):

am start com.samsung.android.sm/.ui.battery.BatteryActivity opens battery section of system settings. From there, "App optimisation > Detail" opens list of apps that will be killed after 3 days in the background without being used.

Sony Xperia Z3 Compact (Android 6.0.1):

am start -a android.settings.BATTERY_SAVER_SETTINGS opens battery section of system settings. From there, "Menu > Battery optimisation" opens list of protected apps.

Vivo Y11 (Android 4.4.4, Funtouch OS 2.0):

am start com.iqoo.secure/.MainGuideActivity opens iManager app. From there, "Power manager" opens battery settings and "App manager > Autostart manager" opens list of apps that can auto-start (presumably, run at system boot).

am start com.iqoo.secure/.ui.powersaving.PowerSavingManagerActivity opens battery settings directly.

am start com.iqoo.secure/.ui.phoneoptimize.AddWhiteListActivity opens an app whitelist, which doesn't seem to be reachable through the normal UI. This list protects apps from the iManager app's optimisation button.

@dirkam

This comment has been minimized.

Copy link
Owner

@dirkam dirkam commented Nov 21, 2018

This is great, thank you.

Do you happen to know if these activities can be started from 3rd party apps? Or did you have a chance to test these with adb? In many cases, these activities marked with exported = false, so your intent start will not work.

@akwizgran

This comment has been minimized.

Copy link
Author

@akwizgran akwizgran commented Nov 21, 2018

The activities listed above could all be opened by the shell user via adb shell am start. I don't know if that necessarily means they're available to other apps, or whether shell might have special privileges.

I did run into a lot of activities that I couldn't open; for example com.huawei.systemmanager/.power.PowerConsumeBackgroundActivity exists on all three Huawei devices I tested, but can only be opened by the shell user on the device running EmotionUI 2.0.

I guess details like which activities are exported may vary between models, even within a given major/minor OS version, as each model has its own build of the OS. So my results may not be very portable across models.

If you can tell me how to find out which activities are exported, I'd be happy to update my notes for the devices above. Until now I've just used the trial-and-error method of opening the power management UI manually, running dumpsys activity activities to find out which activity I'm looking at, then closing it and trying to relaunch it with am start. There's probably a better way. :-)

@dirkam

This comment has been minimized.

Copy link
Owner

@dirkam dirkam commented Nov 25, 2018

Thanks!

Would it be possible for you to create a pull request based on the README?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.