APatch icon indicating copy to clipboard operation
APatch copied to clipboard

Would it be a good idea to consider putting this app on F-Droid

Open d-RealMusic-b opened this issue 1 year ago • 39 comments

Magisk and KernelSU are both up on f-droid for download, so why not APatch? And here is F-Droid's inclusion policy, I think APatch is in line with their policy.

d-RealMusic-b avatar Jan 06 '24 16:01 d-RealMusic-b

KernelSU is not on F-Droid, at least not in the official repo. The Magisk build metadata for F-Droid is maintained by me. If APatch agrees to be included, I can help.

linsui avatar Feb 13 '24 03:02 linsui

KernelSU is not on F-Droid, at least not in the official repo. The Magisk build metadata for F-Droid is maintained by me. If APatch agrees to be included, I can help.

I was mistaken, KernelSU is currently in the lzzyOnDroid F-Droid Repo. Thanks for your work, hopefully we'll see APatch in F-Droid too.

d-RealMusic-b avatar Feb 13 '24 04:02 d-RealMusic-b

I agree, if it doesn't inconvenience you too much.

bmax121 avatar Mar 08 '24 09:03 bmax121

@linsui

bmax121 avatar Mar 08 '24 09:03 bmax121

I'll have a try. Looks like we need to build magisk first for these libs in https://github.com/bmax121/APatch/tree/main/app/libs/arm64-v8a. But it seems libmagiskpolicy.so is from a different version of magisk?

linsui avatar Mar 08 '24 16:03 linsui

I'll have a try. Looks like we need to build magisk first for these libs in https://github.com/bmax121/APatch/tree/main/app/libs/arm64-v8a. But it seems libmagiskpolicy.so is from a different version of magisk?

Yes, it was a modified version, so that magiskpolicy can compatible with APatch

pomelohan avatar Mar 09 '24 12:03 pomelohan

Where is the source code of the modified version?

linsui avatar Mar 09 '24 13:03 linsui

Where is the source code of the modified version?

Wait for @bmax121 upload patiently.

Btw, should the modified magiskpolicy being built together with APatch? If true, we may need hack gradle to do that.

pomelohan avatar Mar 10 '24 23:03 pomelohan

Btw, should the modified magiskpolicy being built together with APatch? If true, we may need hack gradle to do that.

It needs to be built from source. We can build it first then put it in the required location.

linsui avatar Mar 11 '24 06:03 linsui

Btw, should the modified magiskpolicy being built together with APatch? If true, we may need hack gradle to do that.

It needs to be built from source. We can build it first then put it in the required location.

Sorry for the delay and thanks for supporting APatch. We’re currently working on developing these days so didn’t reply on time. We will notify you once we finished that. ;)

pomelohan avatar Mar 14 '24 15:03 pomelohan

The source is at https://github.com/bmax121/Magisk, Mainly changed this file: https://github.com/bmax121/Magisk/blob/master/native/src/sepolicy/rules.cpp

bmax121 avatar Mar 15 '24 02:03 bmax121

Which commit do you use? I didn't see any change on master branch.

linsui avatar Mar 15 '24 04:03 linsui

It's ok now https://github.com/bmax121/Magisk/commit/cc94f7bfda10c9e70e00d6bdaf12362842d6a526

bmax121 avatar Mar 15 '24 14:03 bmax121

IIUC, APatch doesn't use ONDK to build the rust code. Then does it make sense to build the magisk libs with ONDK? I have to rebuild ONDK from source so if it's not needed maybe I can skip that step.

linsui avatar Mar 18 '24 14:03 linsui

What is the downloaded compiler in https://github.com/bmax121/KernelPatch/blob/main/.github/workflows/build.yml used for? Is there any simple way to build those kernel patch binaries?

linsui avatar Mar 18 '24 14:03 linsui

@bmax121 Requested at IzzyOnDroid. According to their scanner report

No offending libs found.


Dangerous flags:
----------------
* usesCleartextTraffic

Permissions:
------------
* android.permission.INTERNET
* android.permission.WRITE_EXTERNAL_STORAGE
* android.permission.READ_EXTERNAL_STORAGE
* android.permission.QUERY_ALL_PACKAGES
* me.bmax.apatch.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION

Need some clarification regarding usesCleartextTraffic and QUERY_ALL_PACKAGES

shuvashish76 avatar May 14 '24 01:05 shuvashish76

@bmax121 Requested at IzzyOnDroid. According to their scanner report

No offending libs found.


Dangerous flags:
----------------
* usesCleartextTraffic

Permissions:
------------
* android.permission.INTERNET
* android.permission.WRITE_EXTERNAL_STORAGE
* android.permission.READ_EXTERNAL_STORAGE
* android.permission.QUERY_ALL_PACKAGES
* me.bmax.apatch.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION

Need some clarification regarding usesCleartextTraffic and QUERY_ALL_PACKAGES

Hey shuvashish76 Thank you for your contribution.

usesCleartextTraffic is for APatch Module WebUI feature and QUERY_ALL_PACKAGES is being used for selecting SuperUsers Applications. Are those enough? Feel free to notify me if you need more clarification ;)

pomelohan avatar May 15 '24 01:05 pomelohan

What is the downloaded compiler in https://github.com/bmax121/KernelPatch/blob/main/.github/workflows/build.yml used for? Is there any simple way to build those kernel patch binaries?

Used for compiling kpimg, no more simple way but use this compiler because other one may lead to kpimg broken.

pomelohan avatar May 15 '24 02:05 pomelohan

@pomelohan Thanks. Please add Fastlane metadata as mentioned here. (Necessary for both F-Droid / IzzyOnDroid)

shuvashish76 avatar May 15 '24 02:05 shuvashish76

Used for compiling kpimg, no more simple way but use this compiler because other one may lead to kpimg broken.

Where is this special gcc from? How can I build it?

linsui avatar May 15 '24 06:05 linsui

usesCleartextTraffic is for APatch Module WebUI feature

usesCleartextTraffic is only used locally on-device (and not to reach out to the internet)? Is that ensured e.g. via a "network security police"?

shuvashish76 avatar May 15 '24 07:05 shuvashish76

Used for compiling kpimg, no more simple way but use this compiler because other one may lead to kpimg broken.

Where is this special gcc from? How can I build it?

Sorry for the delay, busy those days...

Update: No need special gcc, only aarch64-elf gcc is required. But it's better to use the same gcc version as KernelPatch using.

pomelohan avatar May 22 '24 14:05 pomelohan

usesCleartextTraffic is for APatch Module WebUI feature

usesCleartextTraffic is only used locally on-device (and not to reach out to the internet)? Is that ensured e.g. via a "network security police"?

Sorry for the delay, busy those days...

Yes, usesCleartextTraffic is only used locally on-device. (Located on: /data/adb/modules/<module>/webroot, it is providing an interface for a module to control itself). It wouldn't reach out to the internet unless module author do that.

pomelohan avatar May 22 '24 14:05 pomelohan

Update: No need special gcc, only aarch64-elf gcc is required. But it's better to use the same gcc version as KernelPatch using.

Am I understand it correctly that I just need an aarch64-elf gcc for all the build related to kernel patch?

linsui avatar May 22 '24 14:05 linsui

Update: No need special gcc, only aarch64-elf gcc is required. But it's better to use the same gcc version as KernelPatch using.

Am I understand it correctly that I just need an aarch64-elf gcc for all the build related to kernel patch?

Yes, but it is recommended to use the same gcc version as KernelPatch CI using because KernelPatch Project is special, unlike other programs. Newer or old version may lead to issues because of optimizations.

pomelohan avatar May 22 '24 14:05 pomelohan

Thanks! That only leaves the storage permissions then which could use a short explanation, too 😉

@bmax121 @pomelohan

marat2509 avatar May 23 '24 00:05 marat2509

Yes, but it is recommended to use the same gcc version as KernelPatch CI using because KernelPatch Project is special, unlike other programs. Newer or old version may lead to issues because of optimizations.

Can I use this package? Or I should build the aarch64-elf-gcc somehow? I'm not sure what the difference is.

linsui avatar May 23 '24 07:05 linsui

Yes, but it is recommended to use the same gcc version as KernelPatch CI using because KernelPatch Project is special, unlike other programs. Newer or old version may lead to issues because of optimizations.

Can I use this package? Or I should build the aarch64-elf-gcc somehow? I'm not sure what the difference is.

I thought this version maybe too old to make KernelPatch working. KernelPatch CI is using this one: https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf.tar.xz

pomelohan avatar May 23 '24 12:05 pomelohan

I thought both of them are GCC 12.2?

linsui avatar May 23 '24 12:05 linsui

Thanks! That only leaves the storage permissions then which could use a short explanation, too 😉

@bmax121 @pomelohan

storage permissions are used to store patched boot image and module upgrading🌹

pomelohan avatar May 23 '24 12:05 pomelohan