googleplay-api icon indicating copy to clipboard operation
googleplay-api copied to clipboard

Incomplete Data

Open rehmatworks opened this issue 6 years ago • 22 comments

The latest details i.e. s.details('com.whatsapp') returned by the API doesn't contain category information. In addition, the details summary of the apps in search results are also not clean. Is this something changed at Google's end or the recent updates made to gpapi resulted in those issues? Does anyone else also face the same issues?

rehmatworks avatar Apr 29 '19 09:04 rehmatworks

Yes category seems removed but it's still available in different protobuf message index number.

IRGC avatar Apr 29 '19 09:04 IRGC

@korangu Thanks for your finding. Do you know the index number? Or can you share the updated proto file if you have got this working?

rehmatworks avatar Apr 29 '19 10:04 rehmatworks

I have same issue. appCategory and appType removed from detail response.

komeilkamal avatar Apr 29 '19 11:04 komeilkamal

Yep, that's missing. Hopefully @NoMore201 will fix the issue as this is a breaking one.

rehmatworks avatar Apr 29 '19 12:04 rehmatworks

message BadgeLinkContainer {
  optional string link = 2;
  optional catInfo catinfo = 7;
}
message catInfo {
  optional catDetails catdetails = 5;  
}
message catDetails {
  optional string category = 4;  
}

@rehmatworks @komeilkamal @NoMore201 may be you could name it better and compile new .proto to generate the googleplay_pb2.py

IRGC avatar Apr 29 '19 15:04 IRGC

I'm also looking forward to this. Thanks in advance for your time!

SeBsZ avatar Apr 30 '19 07:04 SeBsZ

@korangu Thank you for the input but I cannot get this working. I still cannot get category info in DetailsResponse

rehmatworks avatar Apr 30 '19 10:04 rehmatworks

@rehmatworks check under Badge in DetailsResponse

IRGC avatar Apr 30 '19 11:04 IRGC

@korangu thank you so much. BTW parseProtobufObj raises an exception when I try to parse badge. I feel that we should parse the responses manually in utils.py to ensure that the data produced by gpapi always remains consistent.

rehmatworks avatar Apr 30 '19 12:04 rehmatworks

@korangu Thank you for your help so far, can you please help me with appType as well? If you get that info for me as well, that'll solve this issue for now.

rehmatworks avatar Apr 30 '19 13:04 rehmatworks

@rehmatworks check DetailsResponse->DocV2->DocumentDetails->AppDetails->appType

IRGC avatar Apr 30 '19 19:04 IRGC

That contained the info for games only. BTW thank you for your support. I used that as a condition to guess the second type 'Application'. Thank you again.

rehmatworks avatar May 01 '19 03:05 rehmatworks

I'll keep this issue open for @NoMore201 maybe he will consider fixing this issue :)

rehmatworks avatar May 01 '19 03:05 rehmatworks

I'm still wondering if a new version of the protobuf could possible add the old categories back in, @NoMore201? Right now, using the 'Badge' node gives slightly different category names than before. For example, 'FAMILY_ACTION' is now 'Family Friendly', etc.

Your feedback is appreciated. If there is no other way, and the old category is simply gone, then I might need to implement some kind of conversion table.

SeBsZ avatar May 02 '19 10:05 SeBsZ

The project uses protobuf and device definitions from play-store-api. Since I don't have much time to dedicate to this project at this time, and I'm not using it actively, I'll try to update protobuf file this weekend, but if anyone is willing to help me with a PR it would be better :)

NoMore201 avatar May 23 '19 08:05 NoMore201

It would seem that even the 'badge' node has now been completely removed from the Play Store reponse object. At the moment there seems to be no way to get the Play Store category the app belongs to. @NoMore201 have you had time to update the protobuf, do you think that would help? I wouldn't mind updating it and creating a PR myself, but you'd have to provide me with some instructions because I don't know how to do this.

SeBsZ avatar Jul 03 '19 13:07 SeBsZ

@NoMore201 Any updates please?

archon810 avatar Jul 09 '19 06:07 archon810

Looks like @NoMore201 doesn't have time for this. I did some research and found the original author's post that describes how to recover .proto file from Google Play Store app. If anyone of you know the protocol buffers, then it might be an easy job for them to get the .proto file from the latest Play Store app. Here is the post: https://www.segmentationfault.fr/publications/reversing-google-play-and-micro-protobuf-applications/ @SeBsZ

rehmatworks avatar Aug 05 '19 09:08 rehmatworks

@rehmatworks thanks. After a long struggle, I managed to get the script to run on an old Play Store APK. This was time-consuming because I needed to use a 6 year old version of Androguard, as later versions were not compatible due to all sorts of changes.

Unfortunately, all work was for nothing. It only worked on a really old Play Store APK (3.7.15). Newer APKs changed the class structure and even later APKs use obfuscation. I see no way to extract a newer protobuf. If anyone has another idea, let me know.

SeBsZ avatar Oct 04 '19 14:10 SeBsZ

IMO the only way to extract newer protobuf definitions is sniff the traffic between a rooted device using google apps and the google servers, which is what I did when I started improving the original project. This process requires:

  • A rooted device with google apps where you need to install a custom certificate in order to sniff the traffic (I used mitmproxy )
  • Working around some annoying obstacles, like
    • Play Store certificate pinning
    • Installing certificates in /system/etc/security on a rooted device (you need to respect the format of other certificates installed, it requires a bit of work)
  • Time

Since unfortunately I don't have any of the three requirements, I am not able to do it alone. On the other hand I will gladly accept some help by other developers willing to improve this library.

Also the current protobuf definition, taken from play-store-api repository, has some field named "unknown", so it makes me think that also the original author used this method to extract those definitions.

NoMore201 avatar Oct 04 '19 16:10 NoMore201

@SeBsZ Thank you for sharing the outcome and for your hard work. @NoMore201 I hope community will help address this issues. I'll also spend time on this and will see if I succeed in finding any useful solutions.

rehmatworks avatar Oct 04 '19 18:10 rehmatworks

Has anyone had time to figure out how to get the latest updates to the protobuf here?

archon810 avatar May 28 '20 20:05 archon810