revanced-library icon indicating copy to clipboard operation
revanced-library copied to clipboard

bug: CLI can not install over wi-fi via wireless debugging

Open cyberboh opened this issue 7 months ago • 5 comments

Bug description

So I patching the app with command i to install directly to the phone via wireless debugging. I connected via same wifi (laptop and phone) with IP addr 192.168.0.101:41969 Full cli command like this

adb connect 192.168.0.101:41969
adb shell exit
java -jar revanced-cli-5.0.2-dev.2-all.jar patch -p patches-5.25.0-dev.11.rvp --keystore-entry-alias=******** --keystore-password=******** --keystore-entry-password=******** --keystore=revanced.keystore -e "Custom theme" Apps\com.spotify.music-9.0.46.496-all.apk -o Install\Spotify_9.0.46.496_Premium_ReVanced.apk -i

Patching succeedeed, but error at the end.

Error logs

WARNING: No device serial supplied. Using device with serial 192.168.8.101:41969
INFO: Loading patches
INFO: Decoding app manifest
INFO: "Export all activities" disabled
INFO: "Hide ADB status" disabled
INFO: "Spoof build info" disabled
INFO: "Hide mock location" disabled
INFO: "Spoof SIM country" disabled
INFO: "Spoof Wi-Fi connection" disabled
INFO: "Enable Android debugging" disabled
INFO: "Export internal data documents provider" disabled
INFO: "Hex" disabled
INFO: "Predictive back gesture" disabled
INFO: "Override certificate pinning" disabled
INFO: "Change package name" disabled
INFO: "Remove screen capture restriction" disabled
INFO: "Remove screenshot restriction" disabled
INFO: "Remove share targets" disabled
INFO: "Set target SDK version 34" disabled
INFO: "Change version code" disabled
INFO: "Disable Pairip license check" disabled
INFO: Setting patch options
INFO: Deleting existing temporary files directory
SEVERE: Failed to delete existing temporary files directory
INFO: Decoding resources
INFO: Initializing lookup maps
INFO: Executing patches
INFO: "Custom theme" succeeded
INFO: "Fix Facebook login" succeeded
INFO: "Fix third party launchers widgets" succeeded
INFO: "Sanitize sharing links" succeeded
INFO: "Spoof package info" succeeded
INFO: "Unlock Spotify Premium" succeeded
INFO: Compiling modified resources
INFO: Aligning APK
INFO: Signing APK
INFO: Saved to E:\ANDROID\APPS\ReVanced\Patched\Install\Spotify_9.0.46.496_Premium_ReVanced.apk
java.lang.NumberFormatException: For input string: ""
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
        at java.base/java.lang.Integer.parseInt(Integer.java:678)
        at java.base/java.lang.Integer.parseInt(Integer.java:786)
        at app.revanced.library.installation.installer.AdbInstaller.install$lambda$0(AdbInstaller.kt:35)
        at app.revanced.library.installation.installer.AdbInstaller.runPackageManager(AdbInstaller.kt:52)
        at app.revanced.library.installation.installer.AdbInstaller.install(AdbInstaller.kt:34)
        at app.revanced.cli.command.PatchCommand$run$4$1.invokeSuspend(PatchCommand.kt:366)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:365)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
        at picocli.CommandLine.execute(CommandLine.java:2174)
        at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:12)

Solution

Seems CLI can not parse IP addrr:port it only can be supplied by real device serial number. Maybe add support to read IP addrr:port so CLI can parse it correctly solve the issue.

Additional context

I am using custom CLI built my self. revanced lib 3.2.0-dev.1 patcher 21.1.0-dev.1

Acknowledgements

  • [x] I have checked all open and closed bug reports and this is not a duplicate.
  • [x] I have chosen an appropriate title.
  • [x] All requested information has been provided properly.

cyberboh avatar May 27 '25 14:05 cyberboh

Very unusual use case. Why not patch with CLI (without --install parameter), then install using wireless adb?

LisoUseInAIKyrios avatar May 27 '25 14:05 LisoUseInAIKyrios

Install manually using wireless adb works. But i want simplify installation process, no double jobs. Patching end, then install it automatically. If i manually install with adb (over wifi though), it works but needs another job. Also with -i parameter and install it wirelessly, i found this bug in CLI, and i want to test this new lib function https://github.com/ReVanced/revanced-library/releases/tag/v3.2.0-dev.1 Seems it great

cyberboh avatar May 27 '25 15:05 cyberboh

Run getprop ro.build.version.sdk in your ADB shell, what is the output

oSumAtrIX avatar May 27 '25 17:05 oSumAtrIX

Run getprop ro.build.version.sdk in your ADB shell, what is the output

E:\ANDROID\APPS\ReVanced>adb shell getprop ro.build.version.sdk
35

E:\ANDROID\APPS\ReVanced>

I tested with cable USB debugging too, but error appear:

java -jar revanced-cli-5.0.2-dev.2-all.jar utility install -a Spotify_9.0.46.496_Premium_ReVanced.apk
WARNING: No device serial supplied. Using device with serial 8hozxwlrjjheswzd
SEVERE: java.lang.NumberFormatException: For input string: ""
INFO: Installed the APK file

cyberboh avatar May 28 '25 01:05 cyberboh

I'm not sure why it says empty string because the line outputs 35

oSumAtrIX avatar May 28 '25 06:05 oSumAtrIX