bmax121/APatch

Magisk like zip installer for flashing through recovery

elisenlebkuch opened this issue · 8 comments

Is your feature request related to a problem?/你的请求是否与某个问题相关?

No.

Describe the solution you'd like/描述你想要的解决方案

With Magisk, you can rename the installer from .apk to .zip and flash it via recovery.

Describe alternatives you've considered/描述您考虑过的备选方案

.

Additional context/其他信息

No response

Yes, we can do that but how to handle SuperKey?

If the SuperKey is too simple, this would be a risk. Instead, too complex makes it too hard to remember. Also, we can’t set SuperKey by inputting customized one during flashing in Recovery. Do you have a good idea about this?

You could set it afterwards in the app and flash it again from there as you now have root priveleges.

Yes, we can do that but how to handle SuperKey?

If the SuperKey is too simple, this would be a risk. Instead, too complex makes it too hard to remember. Also, we can’t set SuperKey by inputting customized one during flashing in Recovery. Do you have a good idea about this?

simply just ask the user to do echo {superkey} >> /dev/superkey or any readable location from recovery and automatically delete it after

You could set it afterwards in the app and flash it again from there as you now have root priveleges.

I thought this maybe a good idea. We can call it as temporarily password. After booting, we should force resetting the password.

Yes, we can do that but how to handle SuperKey?
If the SuperKey is too simple, this would be a risk. Instead, too complex makes it too hard to remember. Also, we can’t set SuperKey by inputting customized one during flashing in Recovery. Do you have a good idea about this?

simply just ask the user to do echo {superkey} >> /dev/superkey or any readable location from recovery and automatically delete it after

Maybe it's too complex for beginners.

However, there is still a risk of unable to boot after patching (even successfully patched) or patching failed. I'm waiting for team's opinion about this.

Generating a random complicated superkey and prompt user to backup the password on app first launch, solves this problem, and also provides a better default than letting user to choose their own one. Because users will likely choose weak passwords which is used only once.

Another way is to set super key by installer zip file name. like Apatch.[supersecret].apk

like Magisk, which run uninstaller script instead of install/update when apk name contains uninstall

https://github.com/topjohnwu/Magisk/blob/21ed09560184abe18e213b890a9b8950181b1d77/scripts/update_binary.sh#L23-L24