Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `unpack' for nil:NilClass #22

Open
ohaleck opened this issue Apr 30, 2018 · 2 comments
Open

undefined method `unpack' for nil:NilClass #22

ohaleck opened this issue Apr 30, 2018 · 2 comments

Comments

@ohaleck
Copy link

ohaleck commented Apr 30, 2018

I've been trying to open the APK file linked below with apktools 0.7.2, and get the following error from the constructor:

> ApkXml.new('/tmp/com.google.android.gms_11.9.51_(248-177350961)-11951248_minAPI21(arm64-v8a,armeabi-v7a)(480dpi)_apkmirror.com.apk')
NoMethodError: undefined method `unpack' for nil:NilClass
	from /Users/ohaleck/.rvm/gems/ruby-2.3.6@updateserver/gems/apktools-0.7.2/lib/apktools/apkresources.rb:399:in `read_string'
	from /Users/ohaleck/.rvm/gems/ruby-2.3.6@updateserver/gems/apktools-0.7.2/lib/apktools/apkresources.rb:447:in `parse_stringpool'
	from /Users/ohaleck/.rvm/gems/ruby-2.3.6@updateserver/gems/apktools-0.7.2/lib/apktools/apkresources.rb:157:in `initialize'
	from /Users/ohaleck/.rvm/gems/ruby-2.3.6@updateserver/gems/apktools-0.7.2/lib/apktools/apkxml.rb:118:in `new'
	from /Users/ohaleck/.rvm/gems/ruby-2.3.6@updateserver/gems/apktools-0.7.2/lib/apktools/apkxml.rb:118:in `initialize'
	from (irb):2:in `new'

Now it seems that, inside read_string, the offset is much higher than the size of data 5412929698 compared to 16357888.

https://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-11-9-51-release/google-play-services-11-9-51-248-177350961-android-apk-download/download/

@oneuptim
Copy link

@ohaleck Did you ever get past this? Facing similar issue years later with v0.7.4

@ohaleck
Copy link
Author

ohaleck commented Apr 27, 2022

@ohaleck Did you ever get past this? Facing similar issue years later with v0.7.4

I don't remember TBH, but I can't check because I changed my job. @irondnb can you help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants