Skip to content
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

Add an Option to Convert User App To System App #85

Closed
ghost opened this issue Aug 28, 2020 · 10 comments
Closed

Add an Option to Convert User App To System App #85

ghost opened this issue Aug 28, 2020 · 10 comments
Labels
Feature New feature or request Priority: 3

Comments

@ghost
Copy link

ghost commented Aug 28, 2020

Loved your project. Carry on !
Add root installer or turning any user app to system app. It will be a great addition !

@MuntashirAkon MuntashirAkon added Feature New feature or request Priority: 3 labels Aug 28, 2020
@MuntashirAkon MuntashirAkon changed the title [Feature Request] Root Installer/Turn App To System App Root Installer/Turn App To System App Aug 28, 2020
@MuntashirAkon
Copy link
Owner

MuntashirAkon commented Aug 28, 2020

Add root installer

As of v2.5.13, if you have enabled root, apps will be installed using root.

@ghost ghost closed this as completed Aug 28, 2020
@MuntashirAkon MuntashirAkon reopened this Aug 29, 2020
@MuntashirAkon
Copy link
Owner

I think I need to think this through. The typical way of converting an app to system app compromises boot verification and therefore SafetyNet. I think a better option is to convert it via Magisk in which case the system app will be installed systemless-ly.

@Atrate what is your opinion on this?

@MuntashirAkon MuntashirAkon changed the title Root Installer/Turn App To System App Add an Option to Convert User App To System App Aug 29, 2020
@Atrate
Copy link
Contributor

Atrate commented Aug 29, 2020

I am 100% for a systemless approach, these days there's virtually no reason to write to /system directly.

Reference implementation: https://github.com/Magisk-Modules-Repo/terminal_systemizer

If Magisk is unavalable (e.g. someone uses SuperSU (why tho)) an option to write directly to /system could be presented, but with a hefty disclaimer about the possible consequences.

@MuntashirAkon
Copy link
Owner

I am 100% for a systemless approach, these days there's virtually no reason to write to /system directly.

I agree. For now, I'll only stick to the systemless approach. The second option will only be considered if enough people show their interests in it.

@MuntashirAkon
Copy link
Owner

Reference implementation: https://github.com/Magisk-Modules-Repo/terminal_systemizer

Well, that requires some major works, I think. I have to think about the future as well because it could be useful for restoring backups of the system apps (which are not installed anymore).

@ghost ghost closed this as completed Aug 29, 2020
@MuntashirAkon
Copy link
Owner

I know Terminal Systemizer very well. I can also do that on my own. But terminal systemizer is not what I need. Besides, it has so many problems like reverting & there are always something called app permissions.

Well, I need some examples to start my work. I can always fix bugs later. If I were to start from scratch, it would take about a year to do the work that I've done in the last three months.

@MuntashirAkon MuntashirAkon reopened this Sep 19, 2020
@MuntashirAkon
Copy link
Owner

It seems the systemless approach is useful in many respects (for apps only), just not only to escalate the privileges of an app.

  1. Uninstall/debloat. Replacing the directory of the responsible app (with removing updates first) would completely remove the app
  2. Replace The system app can be replaced with an apk of different signature (e.g. webview) in two ways:
    a. Install the app as a system app by replacing the directory at /system/app or wherever the file is located at the system partition and then install the app again after a reboot (this is probably due to the oat file)
    b. Replace the directory of the system app so that the app can be installed as a user app

@ghost
Copy link
Author

ghost commented Oct 10, 2020

  1. Uninstall/debloat. Replacing the directory of the responsible app (with removing updates first) would completely remove the app

I see actually it doesn't delete the complete path but the items of it

@MuntashirAkon
Copy link
Owner

I see actually it doesn't delete the complete path but the items of it

It just mounts an empty directory on top of the existing directory as a result the directory appears to be empty while it's not. Therefore, the app will be removed systemless-ly without touching the system partition. However, Magisk does have problems with OverlayFS (see topjohnwu/Magisk#2359).

@MuntashirAkon
Copy link
Owner

Closed in favour of #150.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Priority: 3
Projects
None yet
Development

No branches or pull requests

2 participants