PhoneProfilesPlus

Search This thread

Yaelede

Senior Member
Apr 25, 2014
63
16
I cannot grant G1 permission. What do I do wrong?

d:\Android\platform-tools>adb shell pm grant sk.heinrichg.phoneprofilesplus android.permission.WRITE_SECURE_SETTINGS

Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: sk.heinrichg.phoneprofilesplus
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1391)
at com.android.server.pm.permission.PermissionManagerService.access$900(PermissionManagerService.java:89)
at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.grantRuntimePermission(PermissionManagerService.java:2093)
at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:5496)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1730)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:217)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21448)
at android.os.Binder.shellCommand(Binder.java:634)
at android.os.Binder.onTransact(Binder.java:532)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2821)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3922)
at android.os.Binder.execTransact(Binder.java:731)
 

henrichg

Senior Member
Aug 18, 2009
114
16
54
Bratislava
Not "adb shell pm grant sk.heinrichg.phoneprofilesplus" but "adb shell pm grant sk.henrichg.phoneprofilesplus"
"henrichg", not "heinrichg". :-D
 
  • Like
Reactions: Yaelede

trumpet-t1

Member
Nov 7, 2016
26
1
Hi all, I'm using this command but in command prompt I'm getting such response:
Code:
/sbin/sh: pm: not found
Any ideas how to solve this?
 

trumpet-t1

Member
Nov 7, 2016
26
1
1. You must call command in PC, not mobile. Mobile must be connected to PC with USB.
2. Check if mobile is connected with command (in PC) "adb devices".
3. You must, in mobile, enable "Developer options " and in it "USB debuging".

Read this: https://github.com/henrichg/PhoneProfilesPlus/blob/master/docs/grant_g1_permission.md
1. I did it from PC and mobile was connected via USB (device in recovery mode)
2. I checked that exactly in this way (mobile was listed in CMD Prompt)
3. have been done
 
Apr 16, 2011
48
6
I have issue with the location sensor, I set some locations for shifting profiles, but the sensor not working most of the time, I try to reposition but there is no map showing during the process.

One more thing, I would like to see if it is possible to have the roaming be a factor of profile changing, since I move between China and Hong Kong weekly.
 

henrichg

Senior Member
Aug 18, 2009
114
16
54
Bratislava
I have issue with the location sensor, I set some locations for shifting profiles, but the sensor not working most of the time, I try to reposition but there is no map showing during the process.

One more thing, I would like to see if it is possible to have the roaming be a factor of profile changing, since I move between China and Hong Kong weekly.

"I have issue with the location sensor, I set some locations for shifting profiles, but the sensor not working most of the time, I try to reposition but there is no map showing during the process.":

Since PPP version 4.3, used is Android Location API, not Google Play services.
Latest PPP version is 5.1.3. If your version is not latest, upgrade: For this read:

1. Location permission must be granted for PPP.
2. Battery optimization must be set to "Not optimized" for PPP.
3. Location must be enabled in device Settings.
4. Enable W-Fi, mobile data in device. Location in Android uses it, when GPS is not detected (especially for indoor location). But maybe is problem in China, Hong Kong. Maybe loaction is not associated with Wi-Fi SSID, mobile data cells.
5. Location scanning in PPP Settings must be enabled. Location sensor uses this scanning.
6. If in your actual location is not Wi-Fi, mobile data (or location is not associated, look point 4), then use GPS. In PPP Location scanning settings enable "Use GPS when not in Power save mode". But usage of GPS consume battery. :-(

---

"One more thing, I would like to see if it is possible to have the roaming be a factor of profile changing, since I move between China and Hong Kong weekly."

This is not implemented. I can looking on it. Maybe it is possible:

Please send me e-mail (henrich.gron@gmail.com) if you want.
 
Last edited:

dhrv

Member
Dec 23, 2011
42
11
Henrich, thank you so much for your continued development and open source on this app, which is a great alternative to the deprecated apps Llama and Automagic! :)
I use PPP mainly for sound/volume profiles and quite often I quickly have to activate a profile via the Activator but without the need to set a duration. When not setting a duration in the Activator, the OK button is disabled. In this case I use the Seconds slider, set it to a few seconds and tap OK. Is this unusual or is there a better way to quickly activate a profile without worrying about the duration?
Maybe I could use the Restart button, but I guess then I would have to cover all conditional cases so that the right profile gets activated, and I think this is hardly possible (e.g. I ride my bike to work and I expect an important call so I activate the Loud profile but I don't want to specify a duration because I don't know how many minutes I'm on my bike, and then when I arrive at work, my Wi-Fi based work profile should kick in).
So if there is no other way than using the Seconds slider, would it be possible to enable the OK button, even if no duration is specified? Or to add configurable fixed duration buttons to the Activator, e.g. for often used durations like 1 second (my use case above), 7 hours (Mute profile duration during sleep)?
 

henrichg

Senior Member
Aug 18, 2009
114
16
54
Bratislava
If in profile is configured "Ask for duration", profile activation opens dialog "Duration - Profile: profile". And in this dialog is possible to activate profile without set duration. For this exists, at bottom left, button "Without duration", in standard dialog button section (PPP version 6.0.1) (used is "neutral" button type for this). In older versions this button was at bottom center of dialog, above of standard dialog buttons.
 

dhrv

Member
Dec 23, 2011
42
11
Thanks for the quick response, Henrich :) Yes, the in the profile I can disable "ask for duration", but then it is always disabled, and sometimes I want the profiles to stay enabled for a few hours. Another idea would be to rename the existing "Wthout duration" button to "Infinite duration" and add a new button withn "No duration". But since I'm the only one with that wish, how do others quickly switch their profiles without having to touch the slider? I'm still a fan of configurable duration buttons, because I quite often use 1 second, 7 hours and 24 hours.
 

henrichg

Senior Member
Aug 18, 2009
114
16
54
Bratislava
No, no, no. Do not disable "Ask for duration", keep it enabled and profile activation will ask for duration. And in dialog for ask, is button "Without duration". "Without duration" do not set profile activation duration.
Your "Infinite duration" = button "Without duration". This activate profile with duration = 00:00:00 = without duration.
Each user must set duration (using sliders or write duration, when he click duration value text) when he wants to activate profile with duration.
If "Ask for duration" is disabled, duration must be configured in profile parameters. And without change it in parameters is not possible to change duration = duration is static.
For this reason is added "Ask for duration". This allows to change duration at profile activation = duration is "dynamic".
If you want "duration profiles", (configure several durations and display it in "Ask for duraton" dialog as buttons), then sorry, PPP do not support this.
 

dhrv

Member
Dec 23, 2011
42
11
Ok good, I understand everything you are saying about the different duration settings PPP offers right now. This is why I asked for what you call "duration profiles" (good name). Maybe in some future version this could be implemented (I'm a developer myself, but not for Android apps, so this would be a nice personal project for myself for the winter time :p)
 

henrichg

Senior Member
Aug 18, 2009
114
16
54
Bratislava
Only current solution for you (without "duration profiles") is duplicating profile, in each duplication disable "Ask for duration" and configure duration in its parameters = static duration. And activate profile with duration, which you want.
 
  • Like
Reactions: dhrv

dhrv

Member
Dec 23, 2011
42
11
Duplication is a viable option for now, thanks :) Also for considering an implementation!
 

mms140601

Member
Sep 1, 2016
8
1
Hello,
first of all thank you for this super app.
I have now switched to a Xiaomi 11 Ultra and have the following problem:
I want a profile to change when it is logged into a certain WLAN.
Unfortunately, no WLAN networks are displayed to me, although I am logged in.
Any idea?
 

Attachments

  • WhatsApp Bild 2023-02-01 um 17.46.41.jpg
    WhatsApp Bild 2023-02-01 um 17.46.41.jpg
    37.5 KB · Views: 9

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Note by the dev:

    - PhoneProfilesPlus is maintained, but new version will be never deployed in Google Play. Latest in GPlay is 4.2.0.3.
    All newer versions are in another sources:
    - PhoneProfilesPlus GitHub
    - F-Droid
    - Galaxy Store
    - Huawei AppGallery
    - Amazon app store
    - APKPure
    More info is in: https://github.com/henrichg/PhoneProfilesPlus/blob/master/README.md

    ///

    I have no financial interest in this product and I do not know the dev beyond the support I receive. I am simply sharing a product that I find useful. When I see an exceptional app, along with a responsive dev, I want to provide support. Also, with the sort of people here at XDA who love to tinker with their phones, this app is right up your ally.

    The Plus is an enhanced version.. Donation is optional but well worth it. Again, I like to support devs who make good products and are responsive. Phone Profile Plus is open source, and continues to be refined. Some time ago, I set out to look for an app to manage volumes and other settings based on conditions or manual trigger. I evaluated A LOT of apps. This was the best.

    It is an app that allows you to create profiles that set various volume levels, wifi, BT, display, GPS, and a lot more. Using events (triggers), you can automatically apply the profiles. There are also functions that are root-only. It is very sophisticated and feature rich, but does have a learning curve. Once you figure out how it works, a lot of cool things can be done.

    Among many other automated features, I use it to turn on auto rotation when a certain app is in the foreground, then turn off auto rotation when those apps exit. I do the same for volume levels with specific apps.

    Enjoy..

    Edit: Thread title change and information update per dev of PhoneProfilesPlus.
    2
    In PPP GitHub RADME.md is, how to add repository to F-Droid application:

    Because in PPP is non-opensource library for Samsung Edge panel, used must be F-Droid repository, which allow also applications with non-opensource components.

    Also is more better to add application to this repository, because apk signing key is author key, not F-Droid key. And for this is possible to use also another application stores and sources, apk is compatible across all sources.
    1
    Och sorry, I'm found bug in logging. Media volume value is not logged. :(

    But:
    Profile Home: media volume change is enabled, media volume was changed.
    Profile Outdoor: media volume change is enabled, media volume was changed.

    Not any error is generated for change of media volume.

    I'm noticed in log swith between profiles Home and Outdoor. Why?
    Also one reboot of device. Why?

    For which profile not working change of media volume?
    Profile Home is manually activated? Profile Outdoor is also manually activated? Or used is event for activation of these profiles?
    1
    Yes, profile will be activated manually and end of event will be ignored.
    1
    But, in Editor, battery optimization is not used, by Android documentation, because PPP is in foreground. Maybe in LineageOs is, even when is in foreground.
    I do not own device with LineageOs, then is impossible to test it by me. 😢