-
Notifications
You must be signed in to change notification settings - Fork 189
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
Launch private activities #2
Comments
Can't launch service mode activities even though my device is rooted. launching with su would have been great. |
Good idea. Would require root access - any free code you can point me to, that I can integrate? |
|
Already done in a fork (or 2). You can get some ideas form there, like how it's implemented, even tho it's based on a super old version build, that doesn't even have the search functionality. Dev. - please read your E-Mail inbox, the one form the app's Play Store page that you provided. BTW - I modded v2.9.2 .apk for myself, making the UI \ theme dark (DeviceDefault), it's actually pretty easy to do. |
@drogga Will look into launching private activities Regarding minSdkVersion: I had issues keeping the code clean and simultaneously supporting old Android versions. If you have a suggestion plz create a PR. |
@drogga if you have code for dark mode support - please share |
@butzist |
@butzist That's unfortunate, I'm very dissapointed to read that...! |
@drogga |
@drogga as per of your increasing bump of minSDKversion is sometimes requires to add options like adding more features if it wasn’t for supporting older versions of android it would have gotten big big visual and functional support and major revamp in design. but keeping up support for older devices is becoming more difficult because some of API's is deciparated by google. |
So I downgraded the minSDKversion back to 14 of the Debug Builds (the PS and F-Droid builds crash on launch, so they doesn't seem to work at all on lower than 4.4 with this method, so thanks god the debug ones do) so I could do some tests on 4.1.2 Tablet and the only issue seems to be the misplaced drop-down \ expand symbol of the activities that shows up over the icons, plus the crash on rotation (as always with every other ver.). So I'm sure that some fixes can definitely be applied and the minSDK lowered-down back to 14. @vaimalaviya1233 I also did the same with your debug build with the Dark Theme and I must admit that I kind of like what you did there (btw - the same issues as described above)... ;) @butzist IDK why you had to replace\change the icon again, as the blue one from 1.9.2 was & looked much better then the new one... |
@drogga it doesn’t seem to crash on my phone(android 10) when rotating so it's issue that occurs on older devices so if you can get crash report. i or someone might be able to fix it because i don’t have phone older than android 6.0 and newer than android 10. glad you liked theme but unfortunately menubar can’t be themed and android pop-up dialogue box so i'm working on new menu bar it will have new icons if you'll want i can upload on github repo to you'll to if those icons are good or bad. and |
---- Jan 23, 2021 12:50:22 PM ---- 01-23 12:48:36.054 14297 14297 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{de.szalkowski.activitylauncher/de.szalkowski.activitylauncher.MainActivity}: androidx.fragment.app.Fragment$e: Unable to instantiate fragment de.szalkowski.activitylauncher.c: could not find Fragment constructor 01-23 12:48:36.054 14297 14297 E AndroidRuntime: Caused by: androidx.fragment.app.Fragment$e: Unable to instantiate fragment de.szalkowski.activitylauncher.c: could not find Fragment constructor 01-23 12:48:36.054 14297 14297 E AndroidRuntime: at de.szalkowski.activitylauncher.MainActivity.onCreate() 01-23 12:48:45.699 2361 3111 I ActivityManager: Process de.szalkowski.activitylauncher (pid 14297) (adj 9) has died. ---- Jan 23, 2021 12:50:22 PM ---- Sure, you can upload non-debug .apk in your git\repo. IDK about 4.4 KK, but here on 4.1.2 JB Tablet - I Am launching in Landscape and I get a crash when rotate, the same if I launch it in Portrait and rotate to Landscape. Help for what ? |
@vaimalaviya1233 The traceback does not look useful. |
I've never mentioned any colors !! |
@drogga @Magissia @jadedgnome @vaimalaviya1233 Can someone validate if this works? I don't have a use case for this. |
@butzist Also IDK on who and what the F-Droid releases depend, since they are outdated. Anyway, I used this https://play.google.com/store/apps/details?id=com.lifesavi.bundle to convert the .aab to .apk on S20 FE {with Android 11} and the good thing is that the orientation {when forced} there no longer crashes A. L., so it can be re-enabled {and android:configChanges="orientation" should probably be added to the manifest for the main activity, if it needs to be configured in future, android:screenOrientation="unspecified" or whatever should be used, instead of how it's implemented currently} and the single standalone non-bundle\split .apk of the latest that is on P.S. v.1.12.3 now works, unlike before with the prev. v.1.11.0 that didn't work, only the splits did. v.1.13.1 {latest Actions workflow build artifact} should also list the disabled\hidden activities, even on unrooted system, but it doesn't, I will later check on rooted and edit this if there's any other change, besides "Launch activity as root" which will probably work there {asking SU grant permission}, but it will still be pointless and I doubt that the hidden\disabled activities will magically show up. The expand \ collapse up\down arrows are barely visible {system's Dark Mode is ON} and for some reason the status bar {notch area} is in blue color and forcing A. L. to FullScreen from the system settings doesn't change anything \ it still doesn't expand to the notch area as it should and as with other apps. Nothing personal to @vaimalaviya1233, but I would've reverted most if not all of the theme \ UI \ layout changes that were contributed {I saw that some were already}. |
The workflows are just for me to automate the release process. Will probably get rid of the debug build, so all binaries are properly signed.
Very well, I can attach the built images as .apk instead
Neighter do I - someone else seems to be managing those
Good point, will try to add that today
I've reverted most of the changes but kept the improvements - now using native theme everywhere. Android API < 21 does not support using the themed color in icons - maybe you want to create an icon with distinct color (grey? red? yellow?) to make sure it's visible with dark and light theme. In API >= 21 the icons will be automatically white/black depending on theme. |
@drogga Here's a new release APK for you: https://github.com/butzist/ActivityLauncher/actions/runs/1634884765 Now we're also listing unexported activities - additionally, I might have fixed the color issue of the icons in dark theme and reverted to having a 300k APK :) |
@drogga @vaimalaviya1233 If you can confirm that everything works fine for you, I will release to production. As a followup, I will investigate whether there are any safe ways of creating shortcuts to private activities. |
If you want, I can show some examples of custom naming the artifacts on build, that can be made not only to include the app name, but also the version and build. That's what I meant by "there's no custom naming of those artifacts files, which is super confusing and honestly a mess". You didn't have to keep restricting the rotation\orientation, I mentioned [android:screenOrientation="unspecified"] just to point out that it can be addressed \ restricted that way in case it's necessary in future, instead of how it was, so there's no need to use "locked" anymore {requires SDK\API 18 = 4.3 JB, we can try downgrading the minSDKversion back to 14 in future, which will also make this a issue}, since it doesn't crash per rotation and "unspecified" should be left just in case, to have it there if it's needed again for some reason or if it turns out that it crashes on older OS versions. As I mentioned in other issue (a recently closed one #74) and here, [android:configChanges="orientation"] should be added, so it will stay where it is when it's rotated (without loosing the expanded ones or the search filter), instead of the list being jumped to top, search filter cleared and everything expanded being collapsed. I tested with those two - it works. Ok, now the private activities are listed, those with flag [exported="false"], but can the private disabled ones too, those with flag [enabled="false"] be listed at the same time and executed as root ? In reality, the drop-down | drop-up expand \ collapse symbols do not respect the theme, with White theme they should be in\with Black color and with Dark theme they should be White, but they aren't, actually it looks like those are not pre-build icons, at least not as .png files, maybe as vector in .xml or .svg, IDK, because I couldn't find them as file. The blue status bar and the fact that it can't be expanded to the notch area honestly makes the app look not great, especially on taller screens with 18.5:9 aspect ratio, I think that in code is called Action Bar, but I'm not sure, so you should probably look for that Being able to also create shortcuts to the private un-exported and disabled activities and execute with root rights would indeed be nice to have ;) I tested the app in rooted environment with SuperUser {"android-x86-4.4-r5.iso" ran by VirtualBox} and thankfully the default launch action by single tap is the "Launch activity as root" one for all the private activities, so it works !, but IDK if the situation will be the same with Magisk, as I can't currently test with it... BTW - it's not necessary to bump the "versionName" with every edit or build, bumping the "versionCode" is enough, it will update over previous versions, no need to worry, Android doesn't care about the versionName much when it comes to installing updates over, only the versionCode matters, as long as it's not with lower numbers then the previous one - it's ok (PlayStore accepts updates submissions with only varsionCode {aka. Build numbers} increased and pushes them). I think @IzzySoft takes care of the F-Droid releases\updates, and can probably help with the missing icon and screenshots there and pushing\listing the updates more frequently... |
It looks like this is revived: https://github.com/sdex/ActivityManager |
Nope, updates/releases happen automatically. But after a quick look at the metadata of this app: If you want graphics, you need to establish Fastlane structures here in your app's repo. Once that's done and tagged (I can give it a quick check before tagging if you like), we need to update metadata on our end to make clear it shall be taken from Fastlane. If we get the timing right (i.e. merging the metadata update at F-Droid before the new tag was pulled and built), the next release should then have the new stuff from your Fastlane structures. |
@drogga Please create a new ticket for you layout issue and screen orientation. The artifact naming I do not consider really urgent to address. You are free to create a PR addressing this. |
@drogga Adressing here only the points related to this ticket
I'm marking activites as "private" that are |
@butzist Back in the day (few years ago) when I had working rooted devices on hand, I used to play\experiment a lot and I believe as far as I can remember I was able to also start the disabled ones too [the ones with flag enabled="false"] via CMD > ADB in root mode and with the Terminal Emulator (su) on the devices themselves. As I mentioned already - those that A. L. now lists are launchable !, the disabled ones are not listed, so I don't have the necessary time to play with Terminal nowadays in order to confirm 100% that they are indeed launchable, so you can eventually "maybe" try to list them. |
Moved my part already to a PR, and will unsubscribe from this issue now. Apologies I simply responded to the ping, but I'm pinged so often that I don't have time to read the entire threads each time but can only concentrate on what I was asked for… Signing off here then, and all the best! |
@drogga I just pushed a new version that allow creation of shortcuts for private activities. Would be happy about feedback. |
Nice, I can test those with root after 2-3 days. In the meantime, I could not notice that you keep mentioning (in code, What's New, changelogs, 1 recent comment, etc.) about the "disabled" private ones, but those are not listed, hence/therefore not currently launchable by this app, so please don't confuse the ones with flag exported="false" (which Are listed and launch-able), with the enabled="false" (aka. "disabled") ones that aren't, as those Are usually "private", not "public", but are disabled and NOT listed by this app, so it can't launch them, except maybe if the class of a "root" shortcut is being altered/edited before the creation to point to the disabled (private/hidden) activity. I found some glitches with the apps and padlock icons - between the re-launches (not cleared from the recents) sometimes the apps icons are being misaligned / off-center (but not on their activities) for the older apps that don't naively have round/adaptive icon, but the system and A. L. shows them with one everywhere, and the padlock icons are shown on regular non-private activities, but fully closing A. L. fixes those glitches. There's basically no point in having a context menu and 3-dots on/next to the app name too (collapsed state), they should be only shown for/on and next to the activities, or at least the 2 "Launch Activity" and "Launch Activity as root" are unnecessary there, the 2 for "Create shortcut" and "Create shortcut as root" just create ones for the main default activity, the one that is executed when clicking/tapping on the app's icon in the app drawer. i installed the Good Lock's MultiStar module/plugin app, and on the bottom there's this last option called/named "The app size stretch to camera hole" with description "Set the app to overlap or not overlap the camera area", so it looks like the default behavior ("Defined by the app") for Activity Launcher actually is "Overlap with the camera area" (that's how A. L. is coded), so when I set it on/to "Not overlap with the camera area", A. L. looks as it probably should - not coloring the StatusBar in Blue color, being in pure black color, the same/just as the app's title bar (where the search and the 3-dots context menu icons/buttons are). |
@drogga Sorry, but will not address layout/style issues in this ticket - please keep topics separated, so others can follow the discussion. Regarding private activities: |
Added root/su detection to the app. Now these options will only appear for rooted OSes. |
I don't like that last part/change. Edit: |
This is pretty much what I implemented. If no root is available, it will still show all activities, but possibly fail starting them. |
What's Shizuku? |
Looks like a bigger change - let's create a separate ticket for it and mark as "need help". Maybe someone creates a PR before I have time to look into it. |
It turns out that now the Search also looks in the icon name path, instead of only activities titles and names, but it shouldn't (Activity Manager {by sdex} and Package Browser {by 4A} do not, which is better). As I mentioned multiple times - the disabled public and/or private activities are still not listed, you can easily check this by installing 4A Package Browser, going to the "Settings" app (by searching there might be few, for me on samsung it's SecSettings.apk) -> Activities... -> filter "Shortcut", I have "public disabled activity com.android.settings.Settings$CreateShortcutActivity" which is missing from A. L.'s activities list of the same <- do you see what I mean ? |
Hey @drogga, since when are you missing those activities? I pushed a new commit that should fix the wrong filter rule added by this PR. Can you plz check? I will immediately start rolling out a hotfix to google play, if this fixes it. Have many angry and not-so-polite Russians complaining about missing Cache clearing activities. |
IDK, since forever, that's why I mentioned numbers of times that not all are listed (like the disabled ones, this "shortcut" one is exactly that, as they don't want users to do something as simple as creating a shortcut to a setting, which wasn't the case years ago, anyway, I gave it just as an example), keep in mind that this is not only my issue. I checked, even did a clean install - nothing's changed, everything seems to be the same. You can re-direct the angry Russians to me, tell them to mention me in GitHub, open a issue here and read the already closed ones, where I mentioned multiple times, even today what's the issue with their devices. |
We could try using the |
It looks like apps like Alliance Shield X on Samsung can start most if not any activity, no matter if it's private, unexported and disabled, it uses device admin, owner and knox privileges, I think the same can be achieved by Shizuku, that's why I suggested it. We know that there are no other ways, besides the 2 above, using ADB commands to launch some, or of course Root to start any of the activities that usually aren't meant to be launched, that's why they are set to / made as private, unexported and disabled, so IDK what the people that complain, want or expect... |
Let's try not to insult anyone - join the Gitter chat for that 😉 |
At the moment, I am not planning to implement more methods for listing and launching activities. If anyone wants to extend the app, send a PR. Closing this issue, because the main goal seems to have been achieved. |
Hello, it would be useful if the application. could use SU to launch private activities
The text was updated successfully, but these errors were encountered: