Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

GET DEVICE INFO FAILS - Object reference not set to an instance of an object #3

Open
bentomo opened this issue Mar 12, 2020 · 15 comments
Labels
bug Something isn't working

Comments

@bentomo
Copy link

bentomo commented Mar 12, 2020

Issue

When attempting to get device info an error message pops up saying

Unable to get Device Information. Please try again. Error: Object reference not set to an instance of an object (see image)

When attempting to restore the PGP firmware the software complains that the device is not registered in the history of devices. I'm not sure if this is a separate issue. The PGP is now stuck in a patched state and cannot connect to pokemon go. (Good thing it's an old unused one ;) )

The battery was new and the PGP connected to Pokemon Go fine after a PGP reset.

Steps to Reproduce

Follow steps described in Running section of README.md
Ran through to step 10.
Failed to get device info

Versions

  1. apk and patch were taken from the release page of the repository.
  2. AT&T Samsung Galaxy S9 (G960U)
  3. Pokemon Go: 0.169.0-G

image

@bentomo
Copy link
Author

bentomo commented Mar 12, 2020

I immediately found this post on reddit describing the same issue and a workaround. I will try this later today.

image

@Jesus805
Copy link
Owner

Thanks for the report.

I've known about this issue but unfortunately I haven't had the time to look into it. This workaround should solve your problem in the meantime.

@bentomo
Copy link
Author

bentomo commented Mar 13, 2020

Thanks for responding so quickly. It looks like your suggestions worked perfectly. Use nRF I was able to pair with the PGP with custom firmware running and save away the key for later. I was then able to write the valid flag using the characteristic mentioned above and it appeared to function like it used to.

One question I have however, if we're only adjusting the valid flag to switch to one of the real PGP images, isn't the custom SUOTA firmware still on the PGP?

@Jesus805
Copy link
Owner

Jesus805 commented Mar 13, 2020

Writing to the restore characteristic does more than adjust the valid flag. It literally restores the device to its pre-tamper state. There are two copies of the stock PGP firmware on any device, restoring will erase the block that the custom firmware is on, then write the untouched copy on said block.

If you're interested the following link contains user_custs1_restore_wr_handler which is the restore function
https://github.com/Jesus805/Suota-Go-Plus/blob/master/Firmware/user_custs1_impl.c

@gameofyou
Copy link

Hi I also had this problem I wonder if it is something to do with newer versions of android as it failed on my moto G6 as above, however it ran successfully with on a old sampsung S5mini

@Jesus805
Copy link
Owner

Jesus805 commented Apr 21, 2020

I am working in rewriting the entire client (v2.0). I am hoping this issue will go away when I have a cleaner interface. Keep an eye out in the 2.0 branch if you're interested

@Jesus805 Jesus805 added the bug Something isn't working label Apr 21, 2020
@esauvisky
Copy link

Guess it's android related because it happened to me as well using Android 10 on a Google Pixel 1 but didn't last year when the same device was using Android 9. Not sure if my PGP is a clone, but I'm almost sure it's not.

After some struggling, was able to both extract the key and write the flag to restore it as well 🎉.
If you're a dummy like myself, I had to power-cycle my PGP and then make sure you Connect to it on nRF, usually helps... 🙄

@Pinni3
Copy link

Pinni3 commented May 20, 2021

Had the same issue:
This is related to Android version Running on the phone.

Android 11 gives this message on the PGP Keyextractor firmware -> read out Key and restore PGP function.
without thinkering gone to my other phone Android 10 same app i could do both functions correctly.

So need to be rewritten for Android 11 support ;-)

Phones used =
One Plus 8 Pro - Android 11(working FW flash - Not working keyreading and pgp recovery) getting this message
Xiaomi REDMI 9 - Android 10 (ALL WORKING)

Hopes this helps someone

@i-am-bigmike
Copy link

Same message error here with:
P8 lite 2017 - Android 8
Honor 7x - Android 9.1

Fortunately, using nRf (I had to remove and reinsert the battery from the PGP before nRf was able to find it) I was able to save the keys and restore the PGP to the normal state.

@Jesus805
Copy link
Owner

Jesus805 commented Oct 1, 2021

I've been really busy with work so I haven't had time to work on this issue. It probably won't be fixed in the foreseeable future.

@i-am-bigmike
Copy link

I've been really busy with work so I haven't had time to work on this issue. It probably won't be fixed in the foreseeable future.

I understand you perfectly, sometimes (often) I'm in the same situation at work.

If I could give you a suggestion: you could add a warning before the steps to follow, so people is prepared to use nRf in case they receive the error message and don't think the PGP is bricked.

Thanks for your amazing work and the detailed explanations published in you blog.

@norill
Copy link

norill commented Nov 6, 2022

i can confirm that bluetooth characteristics can't be read correctly on newer android devices. i had to use an old android 6 phone, because on android 9 it was impossible to read the key and blob or revert the firmware. there should be a failsafe that reverts the original firmware after an hour or after restart, so that people with no access to older phones dont end up with bricked devices

@andywgarcia
Copy link

andywgarcia commented Nov 10, 2022

i can confirm that bluetooth characteristics can't be read correctly on newer android devices. i had to use an old android 6 phone, because on android 9 it was impossible to read the key and blob or revert the firmware. there should be a failsafe that reverts the original firmware after an hour or after restart, so that people with no access to older phones dont end up with bricked devices

I was able to successfully get my key and blob, but I am not able to revert the firmware. The characteristic UUIDs are very different than what I am seeing in the reddit thread, so I can't even manually seem to write 0x01 to any characteristic in order to restore my device

Edit: It was a Pixel 3 on Android 12

Here is what I am seeing. The first image I think is the service that has the characteristics that would need the restore flag written to, but writing 0x01 to any of them still doesn't restore my go plus
InkedScreenshot_20221109-211650
InkedScreenshot_20221109-211608
InkedScreenshot_20221109-211633

@andywgarcia
Copy link

Looking a bit more about what the custom patch was supposed to write, I don't think the firmware on my go plus is the original firmware of a pokemon go plus, or it is a partial patch, which may mean my device is bricked.

If anyone knows how I could reset this with some soldering and breadboarding, I'm all ears

@norill
Copy link

norill commented Nov 10, 2022

I was able to successfully get my key and blob, but I am not able to revert the firmware. The characteristic UUIDs are very different than what I am seeing in the reddit thread, so I can't even manually seem to write 0x01 to any characteristic in order to restore my device

i had the same UUIDs when using android 9 phone. and i was unable to restore the device in any way using that phone, had to try an older one

If anyone knows how I could reset this with some soldering and breadboarding, I'm all ears

i recommend using an old android phone, it's not worth the effort of going through soldering and all that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants