amo13 / Anarchy-Droid

One-Click Android Rom Installation Assistant
https://anarchy-droid.com
GNU General Public License v3.0
113 stars 15 forks source link

Anarchy-Droid crashes when Galaxy Nexus is detected and looking for roms #20

Closed rradar closed 2 years ago

rradar commented 2 years ago
Current version 1.2.1 is the latest
Device connection update: android
Reloading available roms...
Finished looking for LineageOS
Finished looking for LineageOSMicroG
Finished looking for e-OS
Finished looking for AospExtended
Finished looking for OpenGapps
Finished looking for CopyPartitions
Finished looking for Carbonrom
Finished looking for DivestOS
ERROR: Error retrieving latest available item from DivestOS: DivestOS gave an unexpected JSON response
ERROR: Error opening https://archive.free-droid.com/maguro : Not Found
panic: runtime error: index out of range [-1]

goroutine 166 [running]:
github.com/amo13/anarchy-droid/get.ArchiveLatestAvailableFileNamesMap({0xc0005faf00, 0x6})
    /home/runner/work/Anarchy-Droid/Anarchy-Droid/get/archive.go:297 +0x35b
github.com/amo13/anarchy-droid/get.ArchiveLatestAvailableHrefMap({0xc0005faf00, 0x6})
    /home/runner/work/Anarchy-Droid/Anarchy-Droid/get/archive.go:45 +0x7a
github.com/amo13/anarchy-droid/get.(*Available).Populate.func10()
    /home/runner/work/Anarchy-Droid/Anarchy-Droid/get/availables.go:224 +0x69
created by github.com/amo13/anarchy-droid/get.(*Available).Populate
    /home/runner/work/Anarchy-Droid/Anarchy-Droid/get/availables.go:221 +0x4d
amo13 commented 2 years ago

Oh damn. This is actually not related to the device itself but to the parsing of rom-server answers. Anyway, this is a bug. Thank you very much for reporting it. I will address it as soon as possible and release an update.

amo13 commented 2 years ago

Thank you again for reporting. This helped me solve two other bugs: one that I did not understand yet and another one that I did not even know of! A updated build is being compiled right now. I'll release it in the minutes to come.

Let me know if the installation on your maguro device works as expected. Anarchy-Droid should probably be able to install DivestOS on it.

rradar commented 2 years ago

Thank's for the fix. Anarchy-Droid doesn't crash anymore...

image

..but:

Unfortunately, Anarchy-Droid does not support your device.

Despite the phone gets detected and recent DivestOS is found (and even pre selected as rom) :eyes:

EDIT: Actually with the right settings:

image

the start button get's functional :tada:

amo13 commented 2 years ago

Thanks for reporting again! What I did not expect is that the detected brand is google. For what I know it should be samsung (and if I test the application with "gt-i9250", I get samsung as brand). Having google as detected brand is what prevents the start button from unlocking because normally, anarchy-droid would reboot your samsung device into download mode, flash the latest version of twrp (no matter if it is already installed) and prompt you to reboot to it with the hardware key combination. For google devices, anarchy-droid does not know how to do this, therefore, it refuses to start. Only if you tick "assume twrp installed" will it unlock the start button and reboot directly to recovery (twrp) when started. I guess the device itself reports being from the google brand instead of samsung. I might be able to override this with some mechanism. This should fix the issue you are showing.

rradar commented 2 years ago

Actually the first Galaxy Nexus was co-developed by Google and Samsung :wink:

I also get two devices to choose from when the device is detected, a Galaxy Nexus (which actually can't be selected) or GT-I9250

amo13 commented 2 years ago

I see. But if I'm not mistaken, it has got a samsung-specific "download-mode" instead of the fastboot mode that other brands have as bootloader, right?

rradar commented 2 years ago

it has got a samsung-specific "download-mode"

That's 100% correct :+1: