Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Broken Pipe Error #2

Closed
akbaloch opened this issue Feb 21, 2015 · 8 comments
Closed

Broken Pipe Error #2

akbaloch opened this issue Feb 21, 2015 · 8 comments

Comments

@akbaloch
Copy link

During the following steps of installation:

You then need to install application APK-instrumenter on your reference AVD:

Launch your new AVD with: Save to snapshot option checked,
Install the application using adb $ $ANDROID_HOME/platform-tools/adb install APK-instrumenter/bin/ApkInstrumenterActivity-debug.apk

When the application is installed, open substrate app and click Restart System (Soft). You can then close your AVD.

When i click on substrate app the following error appears:
java.io.IOException: write failed: EPIPE (Broken pipe)

Can you plz help me out to avoid this error?

The similar error comes when i trying to run the hooker.
[PoolWorker-3/MainThread/ERROR] 9689369: Cannot stop the AVD.
[PoolWorker-2/MainThread/ERROR] 9689369: Traceback (most recent call last):
File "/home/ahmad/hooker-master/hooker-master/hooker_xp/hooker_xp/AutomaticAnalysis.py", line 74, in executeExperiment
apkToAnalyze = listOfAPKs.get() # 0xFFFF
File "", line 2, in get
File "/home/ahmad/anaconda/lib/python2.7/multiprocessing/managers.py", line 758, in _callmethod
conn.send((self._id, methodname, args, kwds))
IOError: [Errno 32] Broken pipe
[PoolWorker-3/MainThread/ERROR] 9689369: Exception while executing an experiment : [Errno 32] Broken pipe

@Tibap
Copy link
Contributor

Tibap commented Feb 23, 2015

It sounds like your Substrate application doesn't work properly. You have to be careful to have a clean emulator. Can you provide which version of Android you have, how you rooted your phone, etc.?

FYI, the hooker won't work if Substrate is not correctly working.

@akbaloch
Copy link
Author

Below is my configuration for emulator.

I am following the same steps as described in Readme.md file.

Available Android Virtual Devices:
Name: Hooker
Device: Nexus One (Google)
Path: /home/ahmad/.android/avd/Hooker.avd
Target: Android 4.1.2 (API level 16)
Tag/ABI: default/armeabi-v7a
Skin: WVGA800
Sdcard: 500M

Snapshot: true

Kindly help me in this regard i am facing the same problem. thanks

@akbaloch
Copy link
Author

I have removed all the configuration and start all steps from scratch on Ubuntu 12.04 LTS 64-Bit (using root login)

  1. I have created reference AVD successfully with the following steps:
    Build your reference Android Virtual Device (AVD)
    Create a new AVD from scratch. If you want to fit our experience, please choose the following parameters:
    Nexus One,
    Target: Android 4.1.2,
    Memory option: 512 Mb,
    Internal Storage: 500 Mb,
    SDCard: 500 Mb (you must have an SDcard storage if you want Hooker to work properly),
    Enable snapshot,
    Launch your new AVD with: Save to snapshot,
    Run script tools/emulatorCreator/prepareEmulator.sh to install and prepare your emulator,
    In your android system:
    disable the lockscreen security: Menu > System Settings > Security > Screen lock > None,
    open superuser app, validate Okay and quit,
    open substrate app, click Link Substrate Files, allow substrate, and reclick on Link substrate Files. Then click Restart System (Soft),
    Wait for system to start properly and close the emulator,
    Your reference AVD is now ready!

(successful)

  1. ./install.sh (successfully build)

3. The error comes with the following line of configuration.

You then need to install application APK-instrumenter on your reference AVD:

Launch your new AVD with: Save to snapshot option checked,
Install the application using adb $ $ANDROID_HOME/platform-tools/adb install APK-instrumenter/bin/ApkInstrumenterActivity-debug.apk
When the application is installed, open substrate app and click Restart System (Soft). You can then close your AVD.

After installing "ApkInstrumenterActivity-debug.apk", during these steps, when i click on substrate app, at first time the following error appears


Shell Status 1:
su: uid 10045 not allowed to su


when i click "retry" button, this error disappear and "broken pipe" error appears continuoulsy.

Kindly help me in this regard
I shall be thankful to you.

@Tibap
Copy link
Contributor

Tibap commented Feb 24, 2015

OK, thanks for these detailed explanations. Just to be sure, can you please validate these 2 questions:

  • Do you have modified the script tools/emulatorCreator/prepareEmulator.sh before running it? If no, you have to edit it to specify your Android SDK path ;
  • When you first run Substrate application, do you have a SuperUser popup asking to grant permission for Substrate, and if yes, what did you select?

@akbaloch
Copy link
Author

1) Below is the output of prepareEmulator.sh script

adb has been found.
Installing application Superuser
pkg: /data/local/tmp/Superuser.apk
Success
rm failed for -f, Read-only file system
Pushing /system/xbin/su binary
Installing Substrate application
pkg: /data/local/tmp/com.saurik.substrate_0.9.4010.apk
Success
rm failed for -f, Read-only file system
Initiating system properties
Check if this properties are ok:

[gsm.version.ril-impl]: [reference-ril 1.0]

[rild.libargs]: [-d /dev/ttyS0]

[ro.build.date]: [Tue Oct 9 20:03:51 UTC 2012]
[ro.build.description]: [sdk-eng 4.1.2 MASTER 495790 test-keys]
[ro.build.display.id]: [sdk-eng 4.1.2 MASTER 495790 test-keys]

[ro.product.model]: [Nexus One]

  1. At first when i run Substrate application directly after running prepareEmulator.sh script, it shows the following error:
    permission_denied

But if i first open the Superuser application then after pressing "OKay" button then if i open substrate application the following message appears:
permission_message
I am just pressing Allow button with "Remember" checked box.

  1. Right after i insall ApkInstrumenterActivity-debug with the follwoing command
    $ANDROID_HOME/platform-tools/adb install APK-instrumenter/bin/ApkInstrumenterActivity-debug.apk
    This error appears:
    error_substrate

Please help me out to find the solution.
I shall be thankful to you.

@Tibap
Copy link
Contributor

Tibap commented Feb 25, 2015

Can you please execute the following steps:

  • create and run a new AVD as specified in the README (forget your actual AVD, something is apparently broken),
  • Run script tools/emulatorCreator/prepareEmulator.sh. If you have the message rm failed for -f, Read-only file system, something is wrong. If so, you'll have to connect to an adb shell and check your partitions with the mount command. You can then edit the prepareEmulator script in order to adapt it to your filesystem and rerun it.
  • if previous steps have been correctly executed, open the superuser app, validate Okay and quit,
  • open substrate app, click Link Substrate Files, allow substrate in the popup, and reclick on Link substrate Files. If no error appeared, you can click Restart System (Soft) and continue your installation.

Hope this will work.

@akbaloch
Copy link
Author

akbaloch commented Mar 3, 2015

Thanks alot Dear for your help, i have solved all the problems with your kind assistance.

@Tibap Tibap closed this as completed Mar 3, 2015
@lessismoreh
Copy link

Hi, akbaloch. Could you tell something details about how you solve this problem?

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

No branches or pull requests

3 participants