pperle / PoGoIV_xposed

Xposed module that displays pokémon IV's
MIT License
42 stars 14 forks source link

Does not work with Pokémon GO 0.37.0 #23

Closed pperle closed 7 years ago

pperle commented 7 years ago

In Pokémon GO 0.37.0 the NiaNet class has changed. "doSyncRequest" & "readDataSteam" are no longer available.

package com.nianticlabs.nia.network;

import java.nio.ByteBuffer;

public class NiaNet {
    private static final int CHUNK_SIZE = 32768;
    static ThreadLocal<ByteBuffer> readBuffer = new ThreadLocal() {
        protected ByteBuffer initialValue() {
            return ByteBuffer.allocateDirect(CHUNK_SIZE);
        }
    };
    private static final ThreadLocal<byte[]> threadChunk = new ThreadLocal() {
        protected byte[] initialValue() {
            return new byte[CHUNK_SIZE];
        }
    };
}
ELynx commented 7 years ago

All I can recommend is still try to beat HttpURLConnection. See my module for what I did, MITMing on IO streams. I used doSyncRequest and readDataStream to determine if thread is NiaNet thread or not, so may be now you have to try to parse every package, and see which of them are PoGo game related and which are not.

dneal12 commented 7 years ago

I am anxiously awaiting a fix to this as well. I have systemless root so the app and exposed seem to be working fine but both this module and Pokemon go IV checker seem to not work.... Yet.

pperle commented 7 years ago

I had a look thorugh the hole com.nianticlabs.nia package and couldn't find any connections.

This is watch it used to look https://github.com/applidium/PokemonGo_Android_RE/blob/master/android/app/src/main/java/com/nianticlabs/nia/network/NiaNet.java .

hirenshah commented 7 years ago

Would be good to see this working again :-)

ELynx commented 7 years ago

@chuparCh0pper I usually examined never versions, including 0.35.0, myself. Smali looks far worse than Java OFC, but keeping that as reference, it is pretty understandable, especially when calls to libraries are made.

HttpURLConnection is in Java library for platform. Look at Injector from my module, I hook getOutputStream and getInputStream. Does something like this works?

I managed to install Andy 5.0 and systemless root on my Sams Note 3, looking for XPosed now. Looks like Sams "tweaked" 5.0 so hard that regular and systemless XPosed are not working at all.

HexDestroyer commented 7 years ago

@ELynx Hey! I loved your work. I managed to get systemless xposed working on my OnePlus 3 with magisk and phh's su. It seems the modules are loading but because of "doSyncRequest" & "readDataSteam" removal they are no longer working. I am not an experienced programmer, but I will try to tweak your Injector to make things work again.

Also I am sorry for your problems. Have you looked into installing cyanogen on your Note?

ELynx commented 7 years ago

@HexDestroyer Great news, with modules loading you can do research again. In hooks to stream getters, just remove checks for niaRequest and niaResponse, enable MitM streams always. This way you will dump all content that goes via HttpURLConnection. Not sure that else may use it.

Dump it into file may be, or mirror to wireshark. I had heard that protocol is changed too, so decoders may fail.

I looked through CM12 and CM13 ROMs. They either have RIL but lack something else, or have a lot of features but have faulty RIL (or just have faulty everything and WIP). Since I have only one phone I can't afford to lose functions. May be I will make systemless XPosed for Sams now, for all that may be.

HexDestroyer commented 7 years ago

@ELynx Long story short, it works! It seems protocol changed just for authentication. I haven't really analyzed anything, but I've came across this reddit post referencing in the comments this image. So yeah, I just now had the time to recompile with the suggested changes. I've removed the hooks to doSyncRequest and readDataSteam (made the module crash as it didn't find them), and I've removed checks for niaRequest and niaResponse. I didn't analyze the traffic or anything, but I had made changes to dump to a file the pokémon's IV and the WildPokémon responses and those still work!

I am very sorry for your phone. I hope you will find a solution.

andrerdxd commented 7 years ago

Any news?

sloppycoffee commented 7 years ago

@HexDestroyer That is awesome news! Can't wait to see this module back up and running.. Having that instant success or escape is so nice!

ELynx commented 7 years ago

@HexDestroyer Great news! I am sure community will find a way to tackle this problem. I suggest to look for any possibilities to determine responses and requests going from/to NiaNet (or whatnot it is now). Make a github fork, publish your code, I am sure that if you want, you can handle this.

Geckohazard commented 7 years ago

Just here to show support. I love this module and can't wait to see it back. Those of us who can't make something like this are all rooting for you.

riththerift commented 7 years ago

Here to show support as well. I missed this module so much! Everything I load up Pokémon Go, it makes me sad seeing no IV information.

GeoWebDevCom commented 7 years ago

Any update on this :)

xomikronx commented 7 years ago

Still nothing guys? Is there a thread where this is being actively discussed that I can follow? I tried the discord chats, but nothing.

HexDestroyer commented 7 years ago

I'm sorry. I am in the process of moving at the moment and will be without internet for a while. Will work on it as soon as I can get back on my feet.

sloppycoffee commented 7 years ago

I actually just rolled back to 0.35 and the module still works.

On Fri, Sep 23, 2016, 8:48 AM HexDestroyer notifications@github.com wrote:

I'm sorry. I am in the processo of moving at the moment and will be without internet for a while. Will work on it as soon as I can get back on my feet

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chuparCh0pper/PoGoIV_xposed/issues/23#issuecomment-249228970, or mute the thread https://github.com/notifications/unsubscribe-auth/AATDjMHUi-HdRZIL7tyeP526w6Ou_B1Vks5qs_S1gaJpZM4J59ix .

FreedomMercenary commented 7 years ago

I'll see if I can take a look at this when I get some time or if my work on the IV checker from @ELynx is helpful. I don't know if he published the changes to the Xposed repository, but he did merge them into his release (right-now) branch. That work is at FreedomMercenary/pokemon-go-xposed-mitm/PoGo-0.37-Fix

ELynx commented 7 years ago

@FreedomMercenary Hi, yes, I merged your fix into repo. I can add you as developer to the module, so you can publish your version there. Just write that it is under your control. Strange you didn't see my reply here. I will also need to send you signing keys for the app. PM me at xda-devs, nick is EduardLynx.

riththerift commented 7 years ago

If you guys aren't able to get Pokémon Go 0.37 to work with Xposed, you may want to check out xda thread: http://forum.xda-developers.com/showthread.php?t=3388268. See post 2117, 2120 & 2283.

Right now, I have Xposed and root active and able to play Pokémon Go 0.37.

xomikronx commented 7 years ago

I've got xposed working with magisk working since the .37 update. PoGoIV and Pokemon GO IV checker both do not work due to the API changes though. Am I misunderstanding or is it working for you you @xstahsie ?

@xstahsie Do those steps work on .39.1?

xomikronx commented 7 years ago

Niantic is forcing .39 now. No more IV Checker. :(

taririk commented 7 years ago

Since we can successfully hook into the Input/OutputStream methods (refer to @FreedomMercenary's commit on ELynx repo), I am trying to inject directly the actual doSyncRequest" & "readDataSteam" methods (taken from 0.35) into it. But since I am a total noob with java, I don't know how to make it work... or if it would actually work. Any thoughts on that approach?

pperle commented 7 years ago

Big shoutout to @igoticecream and his xposed modul https://github.com/igoticecream/Snorlax/ . I just installed it and notification when you encounter and toast when catching pokémon works. I encourage everybody to download his module.

sloppycoffee commented 7 years ago

Nice. Downloaded and giving it a shot. Does the original magisk workaround still work for 0.39?

On Mon, Sep 26, 2016 at 1:48 PM chuparCh0pper notifications@github.com wrote:

Big shoutout to @igoticecream https://github.com/igoticecream and his xposed modul https://github.com/igoticecream/Snorlax/ . I just installed it and notification when you encounter and toast when catching pokémon works. I encourage everybody to download his module http://repo.xposed.info/module/com.icecream.snorlax.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chuparCh0pper/PoGoIV_xposed/issues/23#issuecomment-249692976, or mute the thread https://github.com/notifications/unsubscribe-auth/AATDjFx2ONIFIOo_K_oLjpV51zHJ3HNLks5quC-ggaJpZM4J59ix .

pperle commented 7 years ago

@slayorktc I think you have to switch to suhide & systemless v86.2 https://www.reddit.com/r/pokemongodev/comments/53ood1/migrate_from_magisk_phhs_superuser_xposed/

sloppycoffee commented 7 years ago

Thanks for the link. Ill get on it.

On Mon, Sep 26, 2016 at 2:05 PM chuparCh0pper notifications@github.com wrote:

@slayorktc https://github.com/slayorktc I think you have to switch to suhide & systemless v86.2

https://www.reddit.com/r/pokemongodev/comments/53ood1/migrate_from_magisk_phhs_superuser_xposed/

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/chuparCh0pper/PoGoIV_xposed/issues/23#issuecomment-249697410, or mute the thread https://github.com/notifications/unsubscribe-auth/AATDjCoHmQgQPoiejvMNKrQX7SwIzv6Hks5quDOrgaJpZM4J59ix .

sloppycoffee commented 7 years ago

That link worked perfect. Up and running again with the latest version. The snorlax module showed the escape/sucess toast message but the IV notification didn't seem to roll in. I only tested it with one pokemon. Will test it more when more come around.

On Mon, Sep 26, 2016 at 2:06 PM Kelly C slayorktc@gmail.com wrote:

Thanks for the link. Ill get on it.

On Mon, Sep 26, 2016 at 2:05 PM chuparCh0pper notifications@github.com wrote:

@slayorktc https://github.com/slayorktc I think you have to switch to suhide & systemless v86.2

https://www.reddit.com/r/pokemongodev/comments/53ood1/migrate_from_magisk_phhs_superuser_xposed/

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/chuparCh0pper/PoGoIV_xposed/issues/23#issuecomment-249697410, or mute the thread https://github.com/notifications/unsubscribe-auth/AATDjCoHmQgQPoiejvMNKrQX7SwIzv6Hks5quDOrgaJpZM4J59ix .

xomikronx commented 7 years ago

Snorlax module worked perfectly. Shows IV, ATK, DEF, STA, Level, Attack types and percentages for pokeball.

riththerift commented 7 years ago

The Snorlax module doesn't seem to work on my Nexus 6p. Am I doing something wrong?

xomikronx commented 7 years ago

@xstahsie what are your exact steps?

wjoshua1984 commented 7 years ago

@xstahsie I had to reboot a few times, not sure why, maybe because I just switched to suhide

riththerift commented 7 years ago

@xomikronk I downloaded the module, enabled it in Xposed, rebooted my phone, and start Pokémon Go.

I have a stock 6.0.1 ROM with suhide, Xposed framework 86.2 systemless, and magisk v6. My other modules work just fine (e.g RecentApp clear and NeoPower menu).

xomikronx commented 7 years ago

These were my exact steps:

uninstall xposed systemless v86.5 reboot uninstall magisk reboot reflash magisk v6 flash supersu v2.76(magisk version) from terminal: echo "SYSTEMLESS=true > /data/.supersu flash supersu v2.78 reboot flash xposed systemless v86.2 reboot flash suhide 0.53 reboot system

I might have over rebooted, but it worked.

xomikronx commented 7 years ago

Anyone know a GPS spoofer that works on .39 yet?

mazzod commented 7 years ago

@xomikronx I think FlyGPS or GPS Joystick are working good

mazzod commented 7 years ago

I have a question guys. I moved from phh's superuser and xposed systemless 86.5 to superSU systemless and xposed 86.2. For my curiosity I've installed magisk Manager and I see that the root toogle is always unchecked and if I try to enable it, it go back to unchecked. It's normal? Back to OT, I installed the Snorlax module and all works fine, I can't wait a new update with new content! :smiley:

taririk commented 7 years ago

Great implementation @igoticecream. Works like a charm! I been trying to hook that HttpURL call but cant make it work. Yours does it perfectly. Starred!

riththerift commented 7 years ago

@xomikronk that's exactly what I did.

@igoticecream would you know why your module is not working on a Nexus 6P with a stock 6.0.1 ROM? Other modules I have downloaded works fine.

sloppycoffee commented 7 years ago

I uninstalled the magisk manager. Don't think it's needed anymore.

On Mon, Sep 26, 2016, 5:57 PM itchywasabi notifications@github.com wrote:

Great implementation @igoticecream https://github.com/igoticecream. Works like a charm! I been trying to hook that HttpURL call but cant make it work. Yours does it perfectly. Starred!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chuparCh0pper/PoGoIV_xposed/issues/23#issuecomment-249739465, or mute the thread https://github.com/notifications/unsubscribe-auth/AATDjHAnIbHtB2d_OYWckLkzEiI7Tc2eks5quGoJgaJpZM4J59ix .

igoticecream commented 7 years ago

@xstahsie if you use suhide, ensure pokemon go id is not listed (otherwise, it wont load the module). Happened with other module im developing, i added snapchat to suhide and it stopped loading the module.

riththerift commented 7 years ago

@igoticecream thanks! That was it. It worked after removing the Pokémon Go ID from suhide and rebooting the phone. I want to thank everyone here for making this possible.

xomikronx commented 7 years ago

Only thing left that is missing for me is the Pokemon IV checker. (seeing this information in the pokemon inventory) As far as I know, there isn't a working module yet?

riththerift commented 7 years ago

@xomikronx that would be awesome to be able to see IV info in the inventory. Perhaps @igoticecream is working on something like that. Who knows.

igoticecream commented 7 years ago

Hello @xstahsie.

Yes is coming, in fact @chuparCh0pper is already working in that feature.

riththerift commented 7 years ago

@igoticecream @chuparCh0pper that's wonderful news! Keep up the good work guys.

xomikronx commented 7 years ago

@igoticecream @chuparCh0pper are you making it a part of Snorlax or a separate module?

igoticecream commented 7 years ago

@xomikronx that feature is being developed here

https://github.com/chuparCh0pper/Snorlax

xomikronx commented 7 years ago

thanks!

riththerift commented 7 years ago

Thanks!