XDream8 / revanced-creator

Create Revanced apps easily ☠️
MIT License
258 stars 63 forks source link

[ROOT] App not install as package appears to be invalid #2

Closed kamilmirza closed 2 years ago

kamilmirza commented 2 years ago

as per title have installed root version from the shell script what seems to be the problem? image

here's the script output:


revanced_cli_version=2.5.3
revanced_patches_version=2.13.4
revanced_integrations_version=0.24.0
removing olds
Downloading revanced-cli, revanced-patches and revanced-integrations
1) downloading https://github.com/revanced/revanced-cli/releases/download/v2.5.3/revanced-cli-2.5.3-all.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 43.2M  100 43.2M    0     0  2544k      0  0:00:17  0:00:17 --:--:-- 2943k
2) downloading https://github.com/revanced/revanced-patches/releases/download/v2.13.4/revanced-patches-2.13.4.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  345k  100  345k    0     0   143k      0  0:00:02  0:00:02 --:--:--  241k
3) downloading https://github.com/revanced/revanced-integrations/releases/download/v0.24.0/app-release-unsigned.apk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  696k  100  696k    0     0   184k      0  0:00:03  0:00:03 --:--:--  446k
4) downloading https://github.com/XDream8/revanced-creator/releases/download/v0.1/YouTube-17.26.35.apk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  131M  100  131M    0     0  2692k      0  0:00:50  0:00:50 --:--:-- 2818k
patching process started(root)
it may take a while please be patient
INFO: Decoding resources
INFO: Reading dex files
INFO: Merging app-release-unsigned.apk
WARNING: Skipping exclusive-audio-playback: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping codecs-unlock: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping background-play: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping tasteBuilder-remover: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping upgrade-button-remover: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
INFO: Skipping microg-support: Explicitely excluded
INFO: Skipping hdr-auto-brightness: Not explicitly included
INFO: Skipping autorepeat-by-default: Not explicitly included
INFO: Skipping enable-debugging: Not explicitly included
WARNING: Skipping old-quality-layout: Incompatible with version 17.26.35. This patch is only compatible with version com.google.android.youtube: 17.17.34, 17.19.36, 17.20.37, 17.22.36, 17.23.35, 17.23.36, 17.24.34, 17.24.35
INFO: Skipping enable-wide-searchbar: Not explicitly included
INFO: hide-infocard-suggestions succeeded
INFO: video-ads succeeded
INFO: general-ads succeeded
INFO: seekbar-tapping succeeded
INFO: swipe-controls succeeded
INFO: custom-playback-speed succeeded
INFO: hide-cast-button succeeded
INFO: amoled succeeded
INFO: hide-autoplay-button succeeded
INFO: minimized-playback succeeded
INFO: premium-heading succeeded
INFO: custom-branding succeeded
INFO: disable-fullscreen-panels succeeded
INFO: hide-shorts-button succeeded
INFO: disable-create-button succeeded
INFO: hide-watermark succeeded
INFO: Compiling resources
INFO: Writing modified dex files
INFO: Writing dex file classes2.dex
INFO: Writing dex file classes.dex
INFO: Writing dex file classes4.dex
INFO: Writing dex file classes3.dex
INFO: Writing dex file classes6.dex
INFO: Writing dex file classes5.dex
INFO: Writing dex file classes7.dex
INFO: Writing dex file classes8.dex
INFO: Writing resources...
INFO: Finished```
XDream8 commented 2 years ago

Do you already have a version of ReVanced installed? if so just remove the old one and install the new one. this happens when there is a signature change. if this is not the case as it is not about the script you should create a issue in revanced-cli

XDream8 commented 2 years ago

Have you been able to fix it?

updeshxp commented 2 years ago

Even I am getting the same error with root version

XDream8 commented 2 years ago

I can't test it since i dont have any rooted devices but i think i found the problem.

I think you should install not patched youtube first then the revanced apk

You can download youtube here and try

updeshxp commented 2 years ago

Tried that, installing via adb, get below error, I have also asked in ReVanced Support: Performing Streamed Install adb: failed to install revanced-17.26.35-root.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed collecting certificates for /data/app/vmdl991013158.tmp/base.apk: Failed to collect certificates from /data/app/vmdl991013158.tmp/base.apk: File res/mt2.png in manifest does not exist]

XDream8 commented 2 years ago

I think --mount option does not work since we don't specify a adb device with -d

XDream8 commented 2 years ago

if its like what i said we can't build root variant in github-actions nor google colab since it would require adb connection

updeshxp commented 2 years ago

Oh okay. I see.

XDream8 commented 2 years ago

I will update the script soon for rooted users

XDream8 commented 2 years ago

@updeshxp I added adb checks can you try it

kamilmirza commented 2 years ago

still same as reported HERE

here's the log:

./patch.sh
please be sure that your phone is connected to your pc, waiting 5 seconds
adb device_id=192.168.0.111:5555
java version 17 found
getting latest versions info
revanced_cli_version=2.5.3
revanced_patches_version=2.16.1
revanced_integrations_version=0.26.0
youtube version to be patched: 17.27.39
Downloading revanced-cli, revanced-patches and revanced-integrations
1) downloading https://github.com/revanced/revanced-cli/releases/download/v2.5.3/revanced-cli-2.5.3-all.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 43.2M  100 43.2M    0     0  2605k      0  0:00:17  0:00:17 --:--:-- 2952k
2) downloading https://github.com/revanced/revanced-patches/releases/download/v2.16.1/revanced-patches-2.16.1.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  386k  100  386k    0     0   252k      0  0:00:01  0:00:01 --:--:-- 3265k
3) downloading https://github.com/revanced/revanced-integrations/releases/download/v0.26.0/app-release-unsigned.apk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  699k  100  699k    0     0   405k      0  0:00:01  0:00:01 --:--:-- 1159k
4) downloading https://github.com/XDream8/revanced-creator/releases/download/v0.1/YouTube-17.27.39.apk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  131M  100  131M    0     0  2447k      0  0:00:55  0:00:55 --:--:-- 2238k
patching process started(root)
it may take a while please be patient
INFO: Decoding resources
INFO: Reading dex files
INFO: Merging app-release-unsigned.apk
WARNING: Skipping music-video-ads: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping exclusive-audio-playback: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping codecs-unlock: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping background-play: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping tasteBuilder-remover: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
WARNING: Skipping upgrade-button-remover: Incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music
INFO: Skipping microg-support: Explicitely excluded
INFO: Skipping hdr-auto-brightness: Not explicitly included
INFO: Skipping autorepeat-by-default: Not explicitly included
INFO: Skipping enable-debugging: Not explicitly included
INFO: Skipping force-vp9-codec: Not explicitly included
INFO: Skipping enable-wide-searchbar: Not explicitly included
INFO: hide-infocard-suggestions succeeded
INFO: video-ads succeeded
INFO: general-ads succeeded
INFO: seekbar-tapping succeeded
INFO: swipe-controls succeeded
INFO: custom-playback-speed succeeded
INFO: old-quality-layout succeeded
INFO: return-youtube-dislike succeeded
INFO: hide-cast-button succeeded
INFO: amoled succeeded
INFO: hide-autoplay-button succeeded
INFO: minimized-playback succeeded
INFO: premium-heading succeeded
INFO: custom-branding succeeded
INFO: disable-fullscreen-panels succeeded
INFO: hide-shorts-button succeeded
INFO: disable-create-button succeeded
INFO: hide-watermark succeeded
INFO: Compiling resources
INFO: Writing modified dex files
INFO: Writing dex file classes.dex
INFO: Writing resources...
INFO: Installing by mounting
07-17 22:47:51.493 19829 19829 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
07-17 22:47:51.498 19829 19829 I AndroidRuntime: Using default boot image
07-17 22:47:51.498 19829 19829 I AndroidRuntime: Leaving lock profiling enabled
07-17 22:47:51.640 19829 19829 D AndroidRuntime: Calling main entry com.android.commands.content.Content
07-17 22:47:51.648 19829 19829 D AndroidRuntime: Shutting down VM
INFO: Stopped logging because the app was closed
AzzyC commented 2 years ago
> INFO: Installing by mounting
> 07-17 22:47:51.493 19829 19829 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
> 07-17 22:47:51.498 19829 19829 I AndroidRuntime: Using default boot image
> 07-17 22:47:51.498 19829 19829 I AndroidRuntime: Leaving lock profiling enabled
> 07-17 22:47:51.640 19829 19829 D AndroidRuntime: Calling main entry com.android.commands.content.Content
> 07-17 22:47:51.648 19829 19829 D AndroidRuntime: Shutting down VM
> INFO: Stopped logging because the app was closed

Likewise, I am experiencing this I am compiling on Windows 10, using Zulu JDK for the root variant

AzzyC commented 2 years ago

With regards to my above comment, I learned after that I must have the YouTube installed on my device first which I did not have

However, NOT the script but the revanced*.jar kept looping the log that I shared a snippet of above. I'm thinking of trying clean one more time and will report back here by edit

Edit: I sped up the video but you can see Revanced looping at 00:27, after installing However, this is not really a problem as it seems the app is still be functional with the integrations and it is big thanks to your very helpful script!

https://user-images.githubusercontent.com/36119634/179878655-7297c462-c994-413a-99f2-66ca23287191.mp4

XDream8 commented 2 years ago

I was analyzing source code of revanced-cli and i saw this

logger.info("Stopped logging because the app was closed")

It seems like it is supposed to be a "finished" message but instead they preferred this

kamilmirza commented 2 years ago

I learned after that I must have the YouTube installed on my device first which I did not have

didn't know YouTube app was mandatory before the script, this did the trick revanced installation was successful

updeshxp commented 2 years ago

Works Great, although the script stuck at the end and kept looping but I can see the youtube app is now patched and working Good

AzzyC commented 2 years ago

@XDream8 let me know if this little commit suits your thinking also: https://github.com/AzzyC/revanced-creator/commit/784364219f6e495c4cf18971a48d19949c2b4951

to be honest I think having YouTube already installed on the device circumvents keystore issue

XDream8 commented 2 years ago

that commit is actually pretty good. can you create a pr for that?

XDream8 commented 2 years ago

Works Great, although the script stuck at the end and kept looping ...

That is a bug of revanced-cli though i dont know why it happens

AzzyC commented 2 years ago

Would it be too exploitative if we force install the stock YouTube apk via adb if root option is chosen and YouTube isn't already installed?

XDream8 commented 2 years ago

That is a great idea. i will add it when i am free