NyanBlade / BeatSaberQuestInstaller

GUI for custom songs in Beat Saber for Oculus Quest - NyanBlade#7754
178 stars 13 forks source link

Errors, unable to install #10

Closed joshn closed 5 years ago

joshn commented 5 years ago

I'm having a similar problem to some others, but with some different errors. I've let this continue and had to re-download Beat Saber a few times, and I get similar failures with v3. There are a few different errors here, I'm not sure if they're related to a single root cause:

Attempting to pull Beat Saber from your device...
[ 13%] /data/app/com.beatgames.beatsaber-1/base.apk
Overwrite .\backup\base.apk? (Yes/No/All): n
        0 file(s) copied.
Attempting to pull your scores...
adb: error: failed to get feature set: no devices/emulators found
The system cannot find the file specified.
I: Using Apktool 2.4.0 on base.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: zip END header not found
        at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:307)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:103)
        at brut.apktool.Main.cmdDecode(Main.java:167)
        at brut.apktool.Main.main(Main.java:76)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: zip END header not found
        at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
        at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
        at brut.directory.ExtFile.getDirectory(ExtFile.java:52)
        at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:305)
        ... 3 more
Caused by: java.util.zip.ZipException: zip END header not found
        at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1529)
        at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1430)
        at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1437)
        at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1268)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1231)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:726)
        at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:843)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:246)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:176)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:190)
        at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
        ... 6 more
The system cannot find the path specified.
Attempting to convert your songs for Quest...
2019/05/31 21:07:33 Converting "ToConvert\Gangnam Style"
Changing names of songs and covers
Changed name off song.ogg toGangnam Style.ogg
Changed name off cover.jpg toGangnam Style.jpg
Binary file to patch doesn't exist!
Found 1 custom songs to inject:
Couldn't find sharedassets17.assets(.split0) in the assetsFolder.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
.\assets\*.*
The system cannot find the file specified.
        0 file(s) copied.
I: Using Apktool 2.4.0
brut.directory.PathNotExist: apktool.yml
jarsigner: unable to open jar file: .\apk\base\dist\base.apk
if everything didn't go perfectly in the steps above, ctrl-c now before beatsaber gets uninstalled...
Press any key to continue . . .
joshn commented 5 years ago

Digging a little deeper and trying to run these steps via the command line, the initial problem seems to be accessing the apk via adb:

>.\tools\adb.exe pull /data/app/com.beatgames.beatsaber-1/base.apk
adb: error: remote object '/data/app/com.beatgames.beatsaber-1/base.apk' does not exist

>.\tools\adb.exe shell ls /data
ls: /data: Permission denied

The device is connected, and I've enabled developer mode on my account. I'm assuming this was successful because I now have the option in the headset to disable the guardian. According to the following, adb is running as the shell user:

>.\tools\adb.exe shell whoami
shell

C:\Users\josh\Documents\Beatsaber\QuestSongsInstaller\dist>.\tools\adb.exe shell ls -l
ls: ./cache: Permission denied
ls: ./default.prop: Permission denied
ls: ./file_contexts.bin: Permission denied
<snip>
total 160
dr-xr-xr-x  23 root   root       0 1970-01-06 11:18 acct
drwxr-xr-x   2 root   root    4096 2009-01-01 03:00 bt_firmware
lrw-r--r--   1 root   root      50 2009-01-01 03:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
lrw-r--r--   1 root   root      13 2009-01-01 03:00 charger -> /sbin/healthd
drwxr-xr-x   4 root   root       0 1969-12-31 19:00 config
lrw-r--r--   1 root   root      17 2009-01-01 03:00 d -> /sys/kernel/debug
drwxrwx--x  38 system system  4096 1969-12-31 23:26 data
<snip>

...but the data directory is owned by system. Is there some step I'm missing here?

joshn commented 5 years ago

Solved! Try a different USB port if you're seeing this problem.

After a full device reset, I noticed that the first step, pulling the apk, was not exactly failing. It was running somewhere between 6-12%, then stopping without an error. At the same time, windows would remount the headset. Digging into adb discussions, it looks like some USB3 ports exhibit this problem. I switched to a USB2 port, and everything worked perfectly.