Java deobfuscation seems broken
Opened this issue · 0 comments
I have tried using the deobfuscate tool in the java bundle to upload a source map and every time the servers log shows the same error message along the lines of:
ArgumentError: syntax error on line 4, col -1:
children: !ruby/object:Set
hash:
&id1085 !ruby/object:Squash::Java::Package ?
children: !ruby/object:Set
hash:
&id001 !ruby/object:Squash::Java::Package ?
children: !ruby/object:Set
hash: {}
classes: !ruby/object:Set
hash:
!ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash: {}
name: AnimRes
obfuscation: AnimRes
parent: *id001
: true
!ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash: {}
name: AnimatorRes
obfuscation: AnimatorRes
parent: *id001
: true
!ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash: {}
name: AnyRes
obfuscation: AnyRes
parent: *id001
: true
!ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash: {}
name: ArrayRes
obfuscation: ArrayRes
parent: *id001
: true
!ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash: {}
name: AttrRes
obfuscation: AttrRes
parent: *id001
: true
!ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash: {}
name: BinderThread
obfuscation: BinderThread
parent: *id001
: true
!ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash: {}
name: BoolRes
obfuscation: BoolRes
parent: *id001
: true
!ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash: {}
name: CallSuper
obfuscation: CallSuper
parent: *id001
: true
&id023 !ruby/object:Squash::Java::Class ?
classes: []
java_methods: !ruby/object:Set
hash:
!ruby/object:Squash::Java::Method ?
arguments: []
klass: *id023
name: suggest
obfuscation: suggest
return_type: !ruby/object:Squash::Java::Argument
dimensionality: 0
type: &id022 !ruby/object:Squash::Java::Class
classes: []
java_methods: !ruby/object:Set
hash: {}
name: Strin'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/syck-1.0.5/lib/syck.rb:145:in `load'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/syck-1.0.5/lib/syck.rb:145:in `load'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.4/lib/safe_yaml.rb:15:in `load_with_options'
from /home/mvanhorn/squaresquash/app/models/obfuscation_map.rb:65:in `namespace'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activemodel-4.2.5.1/lib/active_model/dirty.rb:219:in `attribute_change'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activemodel-4.2.5.1/lib/active_model/dirty.rb:148:in `block in changes'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activemodel-4.2.5.1/lib/active_model/dirty.rb:148:in `map'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activemodel-4.2.5.1/lib/active_model/dirty.rb:148:in `changes'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/dirty.rb:68:in `block in changes'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/dirty.rb:180:in `cache_changed_attributes'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/dirty.rb:67:in `changes'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activemodel-4.2.5.1/lib/active_model/dirty.rb:198:in `changes_applied'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/dirty.rb:47:in `changes_applied'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/dirty.rb:22:in `save'
from /home/mvanhorn/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/transactions.rb:286:in `block (2 levels) in save'`
I also tried to directly load the source map via the rails console with the following
environment = 'production' build = '400023' api_key = '155268d7-f737-4550-9552-a231aa82e9f6' map = Squash::Java::RenameLog.new("../mapping.txt").parse project = Project.find_by_api_key(api_key) or raise(API::UnknownAPIKeyError) deploy = project.environments.with_name(environment).first!. deploys.find_by_build!(build) deploy.obfuscation_map.try! :destroy deploy.create_obfuscation_map!(namespace: map)
to no avail
How do I go about getting my android app's mapping.txt converted into a form that squash can use and loaded into the database so I can make full use of squash?