miracle2k / android-autostarts

Tool to manage autostarts (broadcast receivers) on an Android device.
http://elsdoerfer.name/=android-autostarts
GNU General Public License v3.0
207 stars 88 forks source link

[Q] Viable fork? #34

Open ildar opened 4 years ago

ildar commented 4 years ago

anyone wants to volunteer the viable fork of this extremely useful app?

MuntashirAkon commented 3 years ago

I'll be providing a build on my fork until I finally integrate its features with App Manager.

ildar commented 3 years ago

that's great! would you also please add a tag? Then I can ask F-Droid to get it back to the repo. And we can announce the future integration into the App Manager. (you might want to add fastlane meta of your choice)

MuntashirAkon commented 3 years ago

would you also please add a tag?

I've already made a release (with a v2.0.0 tag).

You might want to add fastlane meta of your choice.

Thanks. I'll do that. @IzzySoft may also want to add it in his repo in the mean time. But beware that my fork will be archived once the integration is complete.

IzzySoft commented 3 years ago

@MuntashirAkon does your fork use a different package name? Else later switching will be confusing to users (direct update not possible due to signature mismatch). Or is the goal rather to get into "F-Droid proper", and you referred to that (i.e. use your fork in my repo until the original shows up at F-Droid)? In that case I see no issue, as then that's a known "problem".

ildar commented 3 years ago

appid changed in "add gradle" commit.

IzzySoft commented 3 years ago

Just let me know which app I shall add to my repo, please :wink:

MuntashirAkon commented 3 years ago

Just let me know which app I shall add to my repo, please 😉

https://github.com/MuntashirAkon/android-autostarts/releases/tag/v2.0.0

miracle2k commented 3 years ago

I've never really followed F-Droid, I believe someone else published that? What I am happy to do is merge PRs to this repo, if it is of any help.

MuntashirAkon commented 3 years ago

I've never really followed F-Droid, I believe someone else published that? What I am happy to do is merge PRs to this repo, if it is of any help.

Yes, this could be done (and probably the best way to keep it still alive) if you want as I'm not going to maintain it anyway. But you should know that I've migrated the project to Gradle now and removed the locale folder and copied all the locales at the resources directory. This way, it can be build directly from Gradle without any additional work and could be packaged by F-Droid as well. I've also changed the package name but I can fix it in no time.

Now, do you want me to open a pull request?

IzzySoft commented 3 years ago

@MuntashirAkon Thanks, added. Both of you might be interested in what VT says to the APK – though I'd say that can be ignored. Any maybe you want to update the full_description.txt with a formatted version:

<p>Apps use broadcast receivers to start or wake up automatically when various system events are triggered. Autostarts helps you keep control over your phone by letting you have a look at how an app can start automatically. For example, it shows you which apps run during or after the startup. Root users can disable the unwanted receivers and speed up their device.</p>
<p><b>Note:</b> Root-Access <i>is</i> required to make changes. Otherwise, this application will be read-only.</p>
MuntashirAkon commented 3 years ago

Both of you might be interested in what VT says to the APK – though I'd say that can be ignored.

Interesting. What is it? I've used find, grep and still unable to find anything that matches faketoken.

IzzySoft commented 3 years ago

That's one of the points I meant by "ignore": you cannot tell what they talk of (keeping to cryptic names without explanations). The other is, it's just one out of 60+ engines, and a minor one at that. I'd file it under "false positive" unless at least 3 more engines (including a major one) join in – which is quite unlikely to happen.

Just wanted to let you know, in case the issue pops up.

@miracle2k glad to see your app still being alive! Was one of the first I've used in this context (meanwhile, I use scripts via ADB and rarely check on-device; but I'm also rather settled in my choice of apps, and my devices are Google-free :wink:). Still curious what keeps it from updating at F-Droid… Ah, you've stopped tagging – and auto-update was disabled. Let me know if you start tagging again, so maybe we can get it re-enabled at F-Droid! Currently, it would require a manual MR for each version, and it seems nobody did such one recently – so it's stuck at 1.9.7.

miracle2k commented 3 years ago

So I've added the 1.9.8 tag that I missed to push at the time. Does this now mean F-Droid will auto-build it?

@MuntashirAkon I am ok with the gettext locale system being removed.

MuntashirAkon commented 3 years ago

I think closing this issue will also close #31 and possibly #30 but may need additional changes since the build environment has changed and F-Droid may no longer be able build it.

I've also taken the liberty to update app version to 2.0.0 since this is a new release after a long time.

MuntashirAkon commented 3 years ago

I've also set the minimum sdk version to 21, I think. But you can still set it to whatever you like before making the final release.

IzzySoft commented 3 years ago

So I've added the 1.9.8 tag that I missed to push at the time. Does this now mean F-Droid will auto-build it?

Afraid not, as auto-update was turned off. But with some luck, not for long :wink:

and F-Droid may no longer be able build it

@MuntashirAkon that shouldn't affect the version Michael just tagged, correct? For the next version we can see once they get fetched. Please keep an eye on them then to see whether build fails – if so, we'll need an MR with updated build recipe then.

MuntashirAkon commented 3 years ago

@MuntashirAkon that shouldn't affect the version Michael just tagged, correct?

Yes. 1.9.8 was the last release but didn't have any tag.

miracle2k commented 3 years ago

Ok. Thanks for all your help. I've merged and pushed a 2.0 tag now. Anything else I need to do? Out of curiosity, is there a place to see the FDroid build status?

IzzySoft commented 3 years ago

To feed your curiousity: see my snippet here for the corresponding URLs to watch different F-Droid processes.

According to your app's metadata:

AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 1.9.8
CurrentVersionCode: 32

So the updater bot should detect the new tag and update the last two lines accordingly – which then should cause the build bot to build the new version. If that succeeds, Ciaran will sign the resulting APK, and it should show up in the next index – if not, check the logs (having switched to gradle might require manual adjustments to the first affected build block, and certainly will: I see the last build block lacks the gradle statement). So this one time, we will need another MR then to update the build recipe. I'm no dev nor packager, so I can only vaguely guess from what I see in other metadata files, it's most likely something like:

  - versionName: 1.9.8
    versionCode: 32
    commit: 1.9.8
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/
    target: android-21

  - versionName: 2.0.0
    versionCode: 333
    commit: 2.0.0
    gradle:
      - yes
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/
    target: android-21

@MuntashirAkon should be able to tell if the prebuild is still needed, or needs to be adjusted.

MuntashirAkon commented 3 years ago

@MuntashirAkon should be able to tell if the prebuild is still needed, or needs to be adjusted.

No need for prebuild. Gradle should be able to build the project without any external or explicit dependencies.

IzzySoft commented 3 years ago

Thanks! Then let's wait for the (failed) build. Once that happens, we'll fix the new build block and let it run again. Would you volunteer for that MR then, @MuntashirAkon? If you'd rather not, I'd try raising a packager (but as I've to raise them that often, I'd prefer if you could… :wink:)

MuntashirAkon commented 3 years ago

Would you volunteer for that MR then, @MuntashirAkon?

Ok, I'll try. And if I can't, I'll open an issue instead. Also, do we need to set Description in the yml? We have a fastlane structure now.

IzzySoft commented 3 years ago

Good point. Let's do that in one run then: adjust the new build block, drop summary/description. So on the subsequent run, the build bot should succeed building the APK and then drawing in Fastlane before the next index is built.

MuntashirAkon commented 3 years ago

So, the file should look like this:

Categories:
  - System
License: GPL-3.0-only
WebSite: https://elsdoerfer.name/android-autostarts
SourceCode: https://github.com/miracle2k/android-autostarts
IssueTracker: https://github.com/miracle2k/android-autostarts/issues
Translation: https://www.transifex.com/elsdoerfer/android-autostarts/
Changelog: https://github.com/miracle2k/android-autostarts/blob/HEAD/CHANGES

RepoType: git
Repo: https://github.com/miracle2k/android-autostarts.git

Builds:
  - versionName: 1.7.5
    versionCode: 22
    disable: build fail
    commit: 1.7.5

  - versionName: 1.7.7
    versionCode: 24
    commit: 1.7.7
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/

  - versionName: 1.8.0
    versionCode: 25
    commit: 1.8.0
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/

  - versionName: 1.8.1
    versionCode: 26
    commit: 1.8.1
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/

  - versionName: '1.9'
    versionCode: 27
    commit: 1.9.0
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/
    target: android-21

  - versionName: 1.9.1
    versionCode: 28
    commit: 1.9.1
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/
    target: android-21

  - versionName: 1.9.5
    versionCode: 29
    commit: 1.9.5
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/
    target: android-21

  - versionName: 1.9.6
    versionCode: 30
    commit: 1.9.6
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/
    target: android-21

  - versionName: 1.9.7
    versionCode: 31
    commit: 1.9.7
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/
    target: android-21

  - versionName: 1.9.8
    versionCode: 32
    commit: 1.9.8
    extlibs:
      - android/android-support-v4.jar
    prebuild: mv src-opt/default/src/com/elsdoerfer/android/autostarts/* src/com/elsdoerfer/android/autostarts/
    target: android-21

  - versionName: 2.0.0
    versionCode: 33
    commit: 2.0.0
    extlibs:
      - android/android-support-v4.jar
    target: android-21

AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 2.0.0
CurrentVersionCode: 33

@IzzySoft: Am I right? The original file is located here: https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.elsdoerfer.android.autostarts.yml

IzzySoft commented 3 years ago

Almost:

  - versionName: 2.0.0
    versionCode: 33
    commit: 2.0.0
    gradle:
      - yes
    extlibs:
      - android/android-support-v4.jar
    target: android-21

Unless it's a specific gradle flavor that should be built (then, "yes" must be replaced by the flavor name).

MuntashirAkon commented 3 years ago

It looks like v2.0.0 is now up.

miracle2k commented 3 years ago

Perfect, thanks all around for making this possible!

ghost commented 3 years ago

https://github.com/MuntashirAkon/android-autostarts/releases/tag/v2.0.0

Why disabling an app from starting at boot ('after startup') sometimes affects others? For instance Tor browser takes at least Magisk Manager, Firefox Focus and Firefox beta, Aurora store with it.

Disabling Magisk may presumably prevent the phone from booting. Why some apps seem interconnected?

ghost commented 3 years ago

May I also ask if the v2.0 version in the MuntashirAkon fork and miracle2k's original repo are now the same?

STPKITT commented 3 years ago

I'd like to know the same since it got a bit confusing, although I think the answer is yes.

MuntashirAkon commented 3 years ago

Yes, they're the same.