Giter Site home page Giter Site logo

fax's People

Contributors

hanada31 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fax's Issues

exception "can not write" in new project folder

Hi,

When I try running the tool on an apk, I get the following error after the "Start Test Generation" phase.

android create project --name PlutoTV_5_21_1_apkcombo_com --target android-23 --path Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com --package fax.tv.pluto.android --activity Activity_
java.io.IOException: No such file or directory
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(File.java:1023)
	at utils.IOUtils.write_to_file(IOUtils.java:68)
	at generator.TestGenerator.copySerFiles(TestGenerator.java:225)
	at generator.TestGenerator.createAndroidProject(TestGenerator.java:752)
	at generator.TestGenerationofAll.analyze(TestGenerationofAll.java:80)
	at main.Main.analyzeSingleApk(Main.java:206)
	at main.Main.generateTestCase(Main.java:167)
	at main.Main.analyzeArgs(Main.java:118)
	at main.Main.main(Main.java:54)
java.io.FileNotFoundException: Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/src/fax/tv/pluto/android/MySerializable.java (No such file or directory)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileWriter.<init>(FileWriter.java:107)
	at utils.IOUtils.write_to_file(IOUtils.java:75)
	at generator.TestGenerator.copySerFiles(TestGenerator.java:225)
	at generator.TestGenerator.createAndroidProject(TestGenerator.java:752)
	at generator.TestGenerationofAll.analyze(TestGenerationofAll.java:80)
	at main.Main.analyzeSingleApk(Main.java:206)
	at main.Main.generateTestCase(Main.java:167)
	at main.Main.analyzeArgs(Main.java:118)
	at main.Main.main(Main.java:54)
can not write

The "generatedApp" folder only contains res/layout/main.xml. Do you have any idea what could be causing this problem?

ant build exception

Hi,

When I try running the tool on an APK, after the decompilation step, there seems to be some issue with the ant build afterwards and no APK is outputted:

java.io.FileNotFoundException: Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/bin/PlutoTV_5_21_1_apkcombo_com-debug.apk (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at com.google.common.io.Files$FileByteSource.openStream(Files.java:125)
at com.google.common.io.Files$FileByteSource.openStream(Files.java:115)
at com.google.common.io.ByteSource.copyTo(ByteSource.java:239)
at com.google.common.io.Files.copy(Files.java:305)
at com.google.common.io.Files.move(Files.java:490)
at utils.Utils.moveFile(Utils.java:186)
at generator.TestGenerator.moveGeratedAPK(TestGenerator.java:122)
at generator.TestGenerator.buildProject(TestGenerator.java:785)
at generator.TestGenerationofAll.analyze(TestGenerationofAll.java:110)
at main.Main.analyzeSingleApk(Main.java:206)
at main.Main.generateTestCase(Main.java:167)
at main.Main.analyzeArgs(Main.java:118)
at main.Main.main(Main.java:54)
TestGeneration Finish...

I tried running the ant command directly from the terminal, I obtained this error message:

ant debug -buildfile Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/build.xml
Buildfile: /data/Faridah/exploration-tools/Fax/Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 25.2.2
[checkenv] Installed at /data/Faridah/android

-setup:
[echo] Project Name: PlutoTV_5_21_1_apkcombo_com
[gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 32.0.0
[echo] Resolving Build Target for PlutoTV_5_21_1_apkcombo_com...
[gettarget] Project Target: Android 7.1.1
[gettarget] API level: 25
[gettarget] WARNING: No minSdkVersion value set. Application will install on all Android versions.
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /data/Faridah/exploration-tools/Fax/Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/bin/rsObj
[mkdir] Created dir: /data/Faridah/exploration-tools/Fax/Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/bin/rsLibs
[echo] ----------
[echo] Resolving Dependencies for PlutoTV_5_21_1_apkcombo_com...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
[javac] Compiling 21 source files to /data/Faridah/exploration-tools/Fax/Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/bin/classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] /data/Faridah/exploration-tools/Fax/Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/src/fax/tv/pluto/android/Activity_1.java:45: error: cannot find symbol
[javac] Button button1=(Button)findViewById(R.id.button1);
[javac] ^
[javac] symbol: variable id
[javac] location: class R
[javac] /data/Faridah/exploration-tools/Fax/Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/src/fax/tv/pluto/android/Activity_10.java:43: error: cannot find symbol
[javac] Button button1=(Button)findViewById(R.id.button1);
[javac] ^
[javac] symbol: variable id
[javac] location: class R
[javac] /data/Faridah/exploration-tools/Fax/Result_testGen/testcases/PlutoTV_5.21.1_apkcombo.com/generatedApp/PlutoTV_5_21_1_apkcombo_com/src/fax/tv/pluto/android/Activity_11.java:42: error: cannot find symbol
[javac] Button button1=(Button)findViewById(R.id.button1);
[javac] ^
[javac] symbol: variable id
[javac] location: class R

...
[javac] 17 errors
[javac] 3 warnings

BUILD FAILED
/data/Faridah/android/tools/ant/build.xml:716: The following error occurred while executing this line:
/data/Faridah/android/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.

Extra Values not generated

Is there a problem with Fax's capability to identify Intent extra values or am I not running Fax correctly? On my end, I can use Fax to identify Intent action but just not any of the Intent extra values.

For example, the following code:
Intent dis = getIntent();
if (dis.getStringExtra("str_extraa").startsWith("che")) {
System.out.println("hello2");
initView(dis);
}

The following Intent attributes is generated:
null;;null;;null;;null;;String->str_extraa->999999999999999999999999999999999999999999999999999

And I noticed that 999999999999999999999999999999999999999999999999999 is the default value Fax uses (i.e., it does not come from Z3's output)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.