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

Link Substrate Files failed #1

Closed
DynamicBit opened this Issue Feb 16, 2015 · 8 comments

Comments

Projects
None yet
5 participants
@DynamicBit
Copy link

DynamicBit commented Feb 16, 2015

everytime Iam trying to "Link Substrate Files" in the substrate app Iam getting these error message:

"Shell Status 1: java.lang.SecurityException: Permission Denial: broadcast asks to run as user -1 but is calling from user 0; this requires Android.permission.INTERACT_ACROSS_USERS_FULL or Android.permission.INTERACT_ACROSS_USERS"

any idea how to fix it?

@gbossert

This comment has been minimized.

Copy link
Contributor

gbossert commented Feb 17, 2015

It sounds like a Substrate Issue but can you provide more information on your environment, we may be able to help you:

  • Android SDK Version
  • Emulator Architecture or physical device details
  • Substrate Version
  • How did you root your phone ?
  • Version of the Hooker
  • ...
@DynamicBit

This comment has been minimized.

Copy link
Author

DynamicBit commented Feb 18, 2015

hi,

sdk: android-4.4.4_r1
physical device: x86, linux
substrate: 0.9.4010
hooker: 0.1

steps:
"superuser" app installed
"/System" remounted (adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system)
pushed "su" to "/system/xbin/su"
chmod 06755 "/system/xbin/su"
"substrate" app installed
adb Shell stop and start
opened "superuser" app, validated Okay and quited
opened "substrate" app and click "Link Substrate Files"

now Iam getting the error message

@gbossert

This comment has been minimized.

Copy link
Contributor

gbossert commented Feb 23, 2015

Thanks for these details.
Your issue reminds me of some difficulties I had when rooting an emulator.
I can see that you used an x86 emulator while if i'm not wrong, the superuser application we provide includes an ARM compiled 'su'.
Can you have a try with a different emulator (ARM64-based) ?

Thx

@gbossert

This comment has been minimized.

Copy link
Contributor

gbossert commented Mar 3, 2015

Did you manage to have a try ?

@Tibap Tibap closed this Nov 26, 2015

@Tibap

This comment has been minimized.

Copy link
Contributor

Tibap commented Dec 14, 2015

For the record, this is due to the Substrate application which does not have the system permission INTERACT_ACROSS_USERS_FULL. It is possible to decompile Substrate APK, modify the permissions, rebuild the APK, and sign it so it can be installed again. However, as previously mentioned, this is a system permission which means the apk needs to be on the /system/app folder. Pushing it and rebooting device leads to another error where Substrate tries to access its library which is not correctly copied into /data/data/com.saurik.substrate/lib...
This is definitely related to the Substrate apk which can not be installed on Android version > 4.1.2. I've tried to ping @saurik for an upgrade of his app, but he doesn't seem to be reachable.

@saurik

This comment has been minimized.

Copy link

saurik commented Dec 16, 2015

@Tibap I don't use GitHub much. (I'm paying attention to it sort of right now as I'm filing a number of bugs against the ECMAScript 6 specification.) FWIW, when this was discussed on irc.saurik.com's #substrate (the only support mechanism I believe I list anywhere related to Substrate), the conclusion that both I and the user came to was "the version of su you are using does not work correctly". The user who was reporting the issue ended up getting a fix from #cyanogen-dev on Freenode.

--- Day changed Thu May 16 2013

16:11:54 < shahriyar> Here is the error: “W/ActivityManager( 276): Permission Denial: broadcast asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS
16:11:55 < shahriyar> I/AndroidRuntime( 867): VM exiting with result code 1."
16:13:19 @saurik if you search for that error on google, you find a bunch of people talking about it; have you at least tried to look into it yet?
16:13:47 < shahriyar> absolutely. others have gotten the error, but there is really not much of a solution with those posts.
16:14:31 @saurik well, one of the first hits I saw (and the first one I opened) was effectively "you are trying to use chainsdd superuser, which is largely dead"
16:14:47 < shahriyar> One person recommended adding those 2 permissions ot the apk by decompling, adding the permissions, and recompiling the apk (e.g., substrate apk). but that doesn’t seem correct to me since i am sure others have used substrate with the emulator before.
16:15:04 @saurik and the instructions you are linking to from early 2012 are talking about android 2.2 and are definitely using chainsdd
16:15:13 @saurik this has nothing to do with substrate

22:22:44 < shahriyar> so after lots of searching, i ended up on the cyanogenmod-dev channel. they recommended using the chainfire su which ended up working.
22:23:02 < shahriyar> so now I am able to link substrate which is great :-)

To look at this another way: the error message you have pasted is one Substrate is just forwarding to you from su, and the broadcast message that is being sent is being sent by su, not by Substrate. Maybe adding some permissions to Substrate makes the error go away, but that is an bad workaround: the real problem is that the version of su you are using predates this concept, and needs to be updated. ChainsDD's Superuser is known to cause this problem: use ChainFire's SuperSU.

(Also, I feel the need to point out that in addition to searching IRC logs for information on this permission, I've also looked for your username there, and found nothing. I then continued with a search of my e-mail for INTERACT_ACROSS_USERS, as well as both your shorter and longer usernames, and the only message I'm seeing is one I filtered from GitHub alerting me to this comment you posted here, so I am pretty certain you did not actually "try to ping @saurik" :/.)

@Tibap

This comment has been minimized.

Copy link
Contributor

Tibap commented Dec 16, 2015

Hi @saurik, thanks for this answer. I've just noticed that I've mixed up these two different issues:

  • installing Substrate on Android versions <= 4.4
  • installing Substrate on Android versions > 5.
    For this second point, I've sent you an email at saurik (at) saurik (dot) com as stated (if I remember well) in the error message that appears in the application. In any case, I've never been to IRC for these issues, my mistake.

Regarding the bug, thanks a lot for your explanation, and sorry for my misunderstanding of it.

@Octolus

This comment has been minimized.

Copy link

Octolus commented Feb 12, 2018

I have same issue, running NoxPlayer.

Any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.