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

Broadcast returned 0 #117

Closed
amabunny opened this issue Jun 10, 2018 · 24 comments
Closed

Broadcast returned 0 #117

amabunny opened this issue Jun 10, 2018 · 24 comments
Labels

Comments

@amabunny
Copy link

amabunny commented Jun 10, 2018

Hello, guys.
Last night i was spend many time to try start gnirehtet service on my ZTE A510 with stock Android 6.0 build. I was followed repo readme but service wont start with this relay server message:
"broadcast completed: result=0".

In adb logcat i've finded that row:
"06-10 00:44:29.751 925 951 W BroadcastQueue: Unable to launch app com.genymobile.gnirehtet/10089 for broadcast Intent { act=com.genymobile.gnirehtet.START flg=0x10 cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver }: process is bad"

It was solved by throwing gnirehtet.apk in /system/app folder. Can u fix it for stock ROMs?

@rom1v
Copy link
Collaborator

rom1v commented Jun 10, 2018

BroadcastQueue: Unable to launch … for broadcast Intent { … }: process is bad

That's very weird.

@amabunny
Copy link
Author

I can upload my full adb logcat as txt if u need.

@rom1v
Copy link
Collaborator

rom1v commented Jun 10, 2018

Does it work normally after a gnirehtet reinstall?

@amabunny
Copy link
Author

amabunny commented Jun 10, 2018

adb can not uninstall package which installed in /system/app but process works normally

C:\adb>gnirehtet reinstall
2018-06-10 23:06:17.287 INFO Main: Uninstalling gnirehtet client...
Failure [DELETE_FAILED_INTERNAL_ERROR]
2018-06-10 23:06:18.966 INFO Main: Installing gnirehtet client...
gnirehtet.apk: 1 file pushed. 4.1 MB/s (21467 bytes in 0.005s)
        pkg: /data/local/tmp/gnirehtet.apk
Success

and it works after

@madmate
Copy link

madmate commented Jun 13, 2018

I get kind of the same error message with my Xiaomi Redmi Note 4 on Android 7.0. I attached the adb logcat as *.txt

markus gnirehtet-rust-linux64 $ ./gnirehtet run
2018-06-14 01:08:17.396 INFO Main: Starting relay server...
2018-06-14 01:08:17.396 INFO Main: Checking gnirehtet client...
2018-06-14 01:08:17.396 INFO Relay: Relay server started
2018-06-14 01:08:17.499 INFO Main: Starting client...
Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver }
Broadcast completed: result=0
^C2018-06-14 01:10:34.402 INFO Main: Interrupted
2018-06-14 01:10:34.402 INFO Main: Stopping client...
Broadcasting: Intent { act=com.genymobile.gnirehtet.STOP cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver }
Broadcast completed: result=0

logcat.txt

@rom1v
Copy link
Collaborator

rom1v commented Jun 14, 2018

Some devices sometimes fail to display the VPN confirmation dialog. I don't know why. Reinstalling or rebooting sometimes solves the problem.

@madmate
Copy link

madmate commented Jun 17, 2018

You are right, on the stock oem rom the vpn confirmation dialog failed to display, now I flashed lineage os 15.1 and everything works fine 👍

@rom1v
Copy link
Collaborator

rom1v commented Jun 18, 2018

Can you see relevant logs in adb logcat when it does not work?

@RMcD94
Copy link

RMcD94 commented Oct 13, 2018

What am I looking for in adb logcat? It posts an enormous amount of detail.

I am using an OS that previously worked fine for me, there have been updates to it since, but it's standard Samsung so I think there would be more complaints if that was the issue.

@rom1v
Copy link
Collaborator

rom1v commented Oct 13, 2018

What am I looking for in adb logcat? It posts an enormous amount of detail.

Execute adb logcat -c to clear the log history. Then start gnirehtet, then adb logcat -d > logcat.txt.

it's standard Samsung so I think there would be more complaints if that was the issue.

The issue between gnirehtet and some roms probably occurs when you send a broadcast for an app that has never been "started" yet, or something like that. This is a very rare use case.

@RMcD94
Copy link

RMcD94 commented Oct 20, 2018

logcat.txt

Here's my logcat results.

@rom1v
Copy link
Collaborator

rom1v commented Oct 21, 2018

It does not contain anything related to gnirehtet 😕

@RMcD94
Copy link

RMcD94 commented Oct 24, 2018

logcat.txt

My bad I must have messed up the logging order.

@rom1v
Copy link
Collaborator

rom1v commented Oct 24, 2018

The relevant log:

MARsPolicyManager: Package: com.genymobile.gnirehtet, userid: 0, hostingType: broadcast is Restricted by policy: autorun(2) caller is: null

@RMcD94
Copy link

RMcD94 commented Oct 25, 2018

Is there a solution? I have tried searching for MARsPolicyManager but at least through the firewall I am unable to find much of any use.

I was using gnirehtet successfully before, so I'm not sure what update it was with gnirehtet or with the OS (for reference my phone is Samsung Galaxy S7 Edge) that ended up causing the issue.

Is rooting my only option?

@rom1v
Copy link
Collaborator

rom1v commented Oct 25, 2018

Is there a solution?

I don't know. I don't really understand what the problem is.

Maybe you could try to reinstall (if you didn't try yet):

./gnirehtet reinstall

@RMcD94
Copy link

RMcD94 commented Oct 26, 2018

Reinstalling did solve the problem, then it occurred again when I tried to run a speedtest (I thought I reinstalled before to no effect but clearly not).

2018-10-26 13:20:06.913 INFO UdpConnection: 10.0.0.2:40959 -> 61.135.202.170:39896 Open
thread 'main' panicked at 'Not an Ipv4 packet, version=0', src/relay/ipv4_packet_buffer.rs:38:13
note: Run with RUST_BACKTRACE=1 for a backtrace.

However uninstalling and reinstalling fixed this so it's basically solved, no idea what causes it but I have to reinstall every time I start the program to avoid the broadcast=0 error.

I foolishly didn't consider that it works as a VPN so I can't use my VPN at the same time. That's a shame.

@rom1v
Copy link
Collaborator

rom1v commented Oct 26, 2018

thread 'main' panicked at 'Not an Ipv4 packet, version=0', src/relay/ipv4_packet_buffer.rs:38:13

Do you use v2.3? (#69)

I foolishly didn't consider that it works as a VPN so I can't use my VPN at the same time. That's a shame.

That's correct, but it uses the connection of your computer, so if you use a VPN on your computer, all connections through gnirehtet will use it.

@amosbird
Copy link

I'm seeing exactly the same issue even after putting gnirehtet under /system/app folder.

11-24 23:17:19.210  1658  4081 E dumpHang: doDump
11-24 23:17:19.210  1658  4081 E dumpHang: java.lang.Exception
11-24 23:17:19.210  1658  4081 E dumpHang:      at android.os.Binder.doDump(Binder.java:408)
11-24 23:17:19.210  1658  4081 E dumpHang:      at android.os.Binder.dump(Binder.java:400)
11-24 23:17:19.210  1658  4081 E dumpHang:      at android.os.Binder.onTransact(Binder.java:351)
11-24 23:17:19.210  1658  4081 E dumpHang:      at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
11-24 23:17:19.210  1658  4081 E dumpHang:      at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3400)
11-24 23:17:19.210  1658  4081 E dumpHang:      at android.os.Binder.execTransact(Binder.java:570)
11-24 23:17:19.727 12190 12190 I Radio-JNI: register_android_hardware_Radio DONE
11-24 23:17:19.744 12190 12198 E SchedPolicy: open of /dev/cpuctl/bg_non_interactive/tasks failed: No such file or directory
11-24 23:17:19.760  1658  3436 W InterceptionReason: reason:2)callee system_app, default as allow, interception = false  details<<runType:broadcast isFgAction:false callerPkg: calleePkg:com.genymobile.gnirehtet processName:com.genymobile.gnirehtet Intent { act=com.genymobile.gnirehtet.START flg=0x10 cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver (has extras) }>>
11-24 23:17:19.761  1658  1706 W InterceptionReason: reason:2)callee system_app, default as allow, interception = false  details<<runType:broadcast isFgAction:true callerPkg:null calleePkg:com.genymobile.gnirehtet processName:com.genymobile.gnirehtet Intent { act=com.genymobile.gnirehtet.START flg=0x10 cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver (has extras) }>>
11-24 23:17:19.762  1658  1706 W BroadcastQueue: Unable to launch app com.genymobile.gnirehtet/10060 for broadcast Intent { act=com.genymobile.gnirehtet.START flg=0x10 cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver (has extras) }: process is bad
11-24 23:17:20.711  2443  7267 I qtaguid : Untagging socket 86 failed errno=-22
11-24 23:17:20.711  2443  7267 W NetworkManagementSocketTagger: untagSocket(86) failed with errno -22

@lakuapik
Copy link

I have reinstall the app using gnirehtet reinstall but it still not working,

Here is my adb logcat:

01-23 10:46:13.005  1535  1550 W BroadcastQueue: Permission Denial: broadcasting Intent { act=com.genymobile.gnirehtet.START flg=0x10 cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver } from null (pid=7376, uid=2000) requires android.permission.WRITE_SECURE_SETTINGS due to receiver com.genymobile.gnirehtet/.GnirehtetControlReceiver
01-23 10:46:13.005  1535  1550 W BroadcastQueue: Skipping deliver ordered [background] BroadcastRecord{ecb43d4 u0 com.genymobile.gnirehtet.START} to null: skipped for the target user

@rom1v
Copy link
Collaborator

rom1v commented Jan 23, 2019

@lakuapik #40 (comment)

@harsh-batheja
Copy link

harsh-batheja commented Aug 27, 2019

Help...

--------- beginning of main
08-27 15:24:09.253  1707  8338 D OsAgent : Action Battery changed
08-27 15:24:09.253  1707  8338 D OsAgent : Battery::Level - 100 Scale - 100Pct - 100
08-27 15:24:09.260   778   778 V LocSvc_HIDL_IzatSubscription: [batteryLevelUpdate][772] [HS] <<<<= [HC]
08-27 15:24:11.149  1068  1082 D         : power_monitor cpu0-gold-usr: open fail -1
08-27 15:24:11.406   778  4284 V LocSvc_HIDL_IzatProvider: [onLocationChanged][70] [HS] =>>>> [HC]
08-27 15:24:11.408  1707  3209 V LocSvc_HIDL_IzatProvider_jni: [onLocationChanged][208] [HC] <<= [HS]
08-27 15:24:11.411  1707  8338 E FastNetworkLocation: location time is older!!
08-27 15:24:11.837  1068  1080 D         : thermal_monitor msm_therm: open fail -1
08-27 15:24:11.837  1068  1080 D         : thermal_monitor gpu0-usr: open fail -1
08-27 15:24:11.838  1068  1080 D         : thermal_monitor cpu0-gold-usr: open fail -1
08-27 15:24:13.141   748  1435 V qcbassboost: 	Effect_command: ctxt 0xe509c480, cmd 8
08-27 15:24:13.141   748  1435 V qcbassboost: 	BassBoost_getParameter(): ctxt 0xe509c480, param 0, 
08-27 15:24:13.143   748  1435 V qcbassboost: 	Effect_command: ctxt 0xe509c480, cmd 5
08-27 15:24:13.143   748  1435 V qcbassboost: 	BassBoost_setParameter(): ctxt 0xe509c480, param 1, value: 800
08-27 15:24:13.144   748  1435 V qcbassboost: 	BassBoost_setParameter() BASSBOOST_PARAM_STRENGTH value is 800
--------- beginning of system
08-27 15:24:17.403  1707  1805 W BroadcastQueue: Permission Denial: broadcasting Intent { act=com.genymobile.gnirehtet.START flg=0x400010 cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver } from null (pid=19377, uid=2000) requires android.permission.WRITE_SECURE_SETTINGS due to receiver com.genymobile.gnirehtet/.GnirehtetControlReceiver
08-27 15:24:18.153 17357 17358 E rutils  : releaseProcess gCount = 1
08-27 15:24:18.505  1707  1805 W BroadcastQueue: Permission Denial: broadcasting Intent { act=com.genymobile.gnirehtet.STOP flg=0x400010 cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver } from null (pid=19381, uid=2000) requires android.permission.WRITE_SECURE_SETTINGS due to receiver com.genymobile.gnirehtet/.GnirehtetControlReceiver
08-27 15:24:21.022  1707  4216 W Watchdog: !@WatchDog_1506
08-27 15:24:23.188   748  1435 V qcbassboost: 	Effect_command: ctxt 0xe509c480, cmd 8
08-27 15:24:23.189   748  1435 V qcbassboost: 	BassBoost_getParameter(): ctxt 0xe509c480, param 0, 
08-27 15:24:23.191   748  1435 V qcbassboost: 	Effect_command: ctxt 0xe509c480, cmd 5
08-27 15:24:23.191   748  1435 V qcbassboost: 	BassBoost_setParameter(): ctxt 0xe509c480, param 1, value: 800
08-27 15:24:23.191   748  1435 V qcbassboost: 	BassBoost_setParameter() BASSBOOST_PARAM_STRENGTH value is 800

@rom1v
Copy link
Collaborator

rom1v commented Aug 27, 2019

requires android.permission.WRITE_SECURE_SETTINGS

Also #40 (comment).

@rom1v
Copy link
Collaborator

rom1v commented Sep 7, 2019

Should be fixed by f868180.

@rom1v rom1v closed this as completed Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants