fcaronte / KingInstaller

Porting of KingInstaller get from GitLab by annexhack
GNU General Public License v3.0
265 stars 8 forks source link

✨ Feature - Root installer + UI rework #3

Closed Rikj000 closed 1 year ago

Rikj000 commented 1 year ago

ChangeLog

fcaronte commented 1 year ago

I'm merged, but now I'm try on my old S7 with root and android 13 lineageos and seem to not work, app is installed using root but is not showing on android auto. I miss something? PS UI is a little bugged with Italian string and we need to set flags to can't be enabled both two together

fcaronte commented 1 year ago

Ps I try using your apk, I hasn't time to test and try from pc

Rikj000 commented 1 year ago

I miss something?

I just uninstalled, to start again from scratch.
Tested with this CarTube .apk (Remove .txt suffix, GitHub didn't allow direct .apk uploads)

Usage description

  1. Downloaded / installed my v1.3 release
  2. Settings => Apps
    • Special app access => All files access => KingInstaller => Check Allow access to manage all files
    • See all apps => KingInstaller => Install unknown apps => Check Allow from this source
  3. KingInstaller
    • Click Select file ... => Select .apk to install
    • Check Enable if you use rooted (LineageOS) phone
    • Click Install as king => Grant root permission
    • Wait for text-field with .apk file-path to clear
  4. Validate if package installed "as Google Play Store"

Proof that it works

Screenshot-AndroidAuto-Settings Screenshot-CarTube-AppInfo

Notes

Make sure to enable Unknown Sources in Android Auto's Developer Settings.

King Installer only installs .apks "as Google Play Store".
So it overcomes only 1 of multiple restrictions put into place by Google.

You might still need to patch your phenotype.db with AA-Tweaker for the apps to show up in Android Auto.

If you're on MicroG, then you likely are still missing the actual phenotype.db + a .pb file,
see my fork of aa4mg for that.

fcaronte commented 1 year ago

Unfortunately you try the wrong app, Croccio app always show icon but probably will not work in the car. Try for example fermata auto or screen2auto for me was installed with root but then won't be available in android auto.

fcaronte commented 1 year ago

I don't try with aatweaker I was thinking is one app only mode and not need for other root apps

Rikj000 commented 1 year ago

Unfortunately you try the wrong app, Croccio app always show icon but probably will not work in the car. Try for example fermata auto or screen2auto for me was installed with root but then won't be available in android auto.

I see those 2, Fermata and Screen2Auto, as exclusions of general / generic 3th party app support.
Since Google has placed additional restrictions, specifically for those 2.. :unamused:

However, for all other general / generic 3th party apps,
the "root" installation option which I've implemented in this PR works, at least in my tests.

fcaronte commented 1 year ago

For me root method should work for every android auto app, so is not working and I think if you try cartube in the car won't work too

fcaronte commented 1 year ago

I'm using custom package name app to avoid Google block

Rikj000 commented 1 year ago

For me root method should work for every app, so is not working and I think if you try cartube in the car won't work too

In my eyes this installer has only 1 use-case, which is "to install as Google Play Store".
So it can work around 1 of many restrictions put into place. The root installer which this method adds, does that just fine for all non-split .apks.

For working around other restrictions, e.g. blacklists in the phenotype.db,
there are better tools available, e.g. AA-Tweaker

However King-Installer is still handy, since you can install single APKs as Google Play,
while AA-Tweaker will re-install all selected apps upon re-patching, which can cause more data-loss then desired.

Rikj000 commented 1 year ago

I'm using custom package name app to avoid Google block

As I said, (only) for S2A the package-rename method is unreliable. And there is no better known method out for S2A at the time of writing.

fcaronte commented 1 year ago

So have you try all this in the real car? Because on AA emulator we always work correctly but in my test on lineageos the only working method is use the lposed method on supported app like fermata auto (can be installed normally)

Rikj000 commented 1 year ago

So have you try all this in the real car? Because on AA emulator we always work correctly but in my test on lineageos the only working method is use the lposed method on supported app like fermata auto (can be installed normally)

Yes I've tested all this in my real car before releasing. But KingInstaller was only one of the tools used to make it all work.

fcaronte commented 1 year ago

So have you try all this in the real car? Because on AA emulator we always work correctly but in my test on lineageos the only working method is use the lposed method on supported app like fermata auto (can be installed normally)

Yes I've tested all this in my real car before releasing. But KingInstaller was only one of the tools used to make it all work.

so if you use the other root method + kinginstaller classic way won't work?

Rikj000 commented 1 year ago

The classic / OnePlus way you implemented didn't work on my phone.

I'm using a OnePlus device, but I flashed LineageOS + MicroG on it.

I believe the issue is that LineageOS ships with a different package installer then stock ROMs.

That's why I implemented this "root installation" method.

fcaronte commented 1 year ago

i fix the checkbox to have only one usable at time and add root check when try to use as root. then yes oppo trick is for stock firmware only, yes 100% sure the problem come one you don't use "com.google.android.packageinstaller" so then explain me step to have working on lineageos with root. i install as playstore with king + root but is not enough. what is the next step? is the missing step can be implemented an do by kininstaller too?

fcaronte commented 1 year ago

i try to use aatweaker + new king but can't get the app working for now i was able only using the lposed way of fermata auto

Rikj000 commented 1 year ago

For all other packages it is enough to be "installed as Google Play", which can be done with KingInstaller or AA-Tweaker.

You might also still need to whitelist the apps you wish to use in your phenotype.db, which can be done with AA-Tweaker.

As mentioned earlier Fermata and S2A are special cases which need additional things to make them work.

fcaronte commented 1 year ago

I'm not agree, fermata + Xposed will work normally without anything else, just tested. Screen2auto I use my one named version but simple install as PlayStore is not enough, you can do this thing simple with ADB with same result. And aatweaker won't help for me, all android Auto app should have a one only method to work yes all packed need to be renamed to avoid Google blacklisted, but for me wasn't working

Rikj000 commented 1 year ago

After installing w root checked, going into App Info, scrolling down.

Does it say installed from "Google Play Store" or "FakeStore"?

Then KingInstaller works as expected, that's all it does.

If it's not showing up in AA look for other tools or expand the functionality of this app yourself.

Currently the only feature of KingInstaller is to " install as Google Play".

KingInstaller helps with getting 3th party app support for AA, but it's not a single solution for all apps.

KingInstaller is simply an handy alternative to the ADB method.

fcaronte commented 1 year ago

Ok now is clear, I was thinking you think that make show as PlayStore is enough. Oh today I discovered that pixel 7 (and some other pixel) start to have problems with classic kinginstaller method and won't be shown anymore (using custom package name too) this is a new problems because usually problem come only to phone without the Google package installer 😬