puntorigen / ti_recover

Appcelerator Titanium APK source code recovery tool
20 stars 6 forks source link

I have generated a similarity of the environment you describe in Docker #11

Open eliasruizhgo opened 3 years ago

eliasruizhgo commented 3 years ago

I share the Dockerfile and the error, I am working with compatible versions

FROM centos:7 USER root WORKDIR /app RUN yum install epel-release -y RUN yum install dnf -y RUN dnf install java-1.8.0-openjdk-devel -y RUN yum install git -y RUN yum install -y python RUN yum groupinstall 'Development Tools' -y RUN curl -sL https://rpm.nodesource.com/setup_4.x | bash - RUN yum install nodejs -y RUN npm config set unsafe-perm true RUN npm install -g puntorigen/ti_recover COPY ./MyApp.apk ./App.apk CMD [ "ti_recover", "./App.apk", "./AppDecoder" ]

It throws the following error:

` Appcelerator Titanium - APK Source Code Recovery Tool

/usr/lib/node_modules/ti_recover/node_modules/apk_unpack/apk_unpack.js:67

var _res = decoder.getResTableSync();

^

Error: Error running instance method

java.lang.NullPointerException

at brut.androlib.res.data.value.ResValueFactory.factory(ResValueFactory.java:74)

at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:315)

at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:241)

at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:226)

at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:156)

at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:118)

at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:80)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)

at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:559)

at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:72)

at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:64)

at brut.androlib.Androlib.getResTable(Androlib.java:72)

at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:230)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at Error (native)

at Object.extractAPK [as extract] (/usr/lib/node_modules/ti_recover/node_modules/apk_unpack/apk_unpack.js:67:22)

at Object.init (/usr/lib/node_modules/ti_recover/ti_recover.js:41:7)

at Object. (/usr/lib/node_modules/ti_recover/cli:25:10)

at Module._compile (module.js:409:26)

at Object.Module._extensions..js (module.js:416:10)

at Module.load (module.js:343:32)

at Function.Module._load (module.js:300:12)

at Function.Module.runMain (module.js:441:10)

at startup (node.js:140:18) `

0xjams commented 2 years ago

Did you ever figure it out? I've been pulling my hair but still haven't been able to run this, I've tried countless versions of Node and Python.

puntorigen commented 2 years ago

Sorry @jorgejams88 , I haven't found the time to update the project. You could try to execute Android APKTool within your enviroment (https://github.com/iBotPeaches/Apktool). The issue seems to be related to that Java class. Also take into account that this repo requires you to have Java JDK 1.8 installed on your system. Maybe that's what you're missing.