It is currently Thu Nov 23, 2017 1:54 am

rSAP for Android Forum

Support forum for Android rSAP App

[6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Discussions about running the rSAP app on the LG Nexus 5
 
Posts: 8
Joined: Thu Aug 06, 2015 7:07 am

[6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by FosCo » Mon Dec 28, 2015 2:56 pm

Finally got some time to update my Nexus 5 to the current image with xTraFactory (Stock, but pre-rooted and "optimized") with a SuperSU binary version 2.64 -> "systemless" root.

I assume the "systemless" root method does not change the system partition of the rom and leaves it mounte read only.

After the first failed attempt and a short logcat-review, I mounted the system partition (/system) as read-write, double checked the /system/lib/hw permissions (rwx r-x r-x) and the root access.

The error message within the app was "Failed to install Bluetooth drivers" with Generic and Generic (old) method.
Choosing the "recovery installation" results in a return to the home-screen without further messages, neither popup nor toast.

Uninstalled the installer app, as the logcat told me "no file permission granted, as the app was installed without the permissions before". Reinstalled it and tried again.

Now the error message has no additional "Bluetooth driver installation failed" message, but simply says "Failed".

The logcat indicates a problem linking the patched .so file from the rsap_install cache folder to the /system/lib/hw folder.

Code: Select all
12-28 13:11:18.490 E/InstallCopyTask(13680): java.lang.Exception: cat /data/user/0/com.android_rsap.rsapinstall/cache/bluetooth.patched.so > /system/lib/hw/bluetooth.msm8974.so failed
12-28 13:11:18.490 E/InstallCopyTask(13680):    at com.android_rsap.rsapinstall.at.b(Unknown Source)
12-28 13:11:18.490 E/InstallCopyTask(13680):    at com.android_rsap.rsapinstall.k.d(Unknown Source)
12-28 13:11:18.490 E/InstallCopyTask(13680):    at com.android_rsap.rsapinstall.k.a(Unknown Source)
12-28 13:11:18.490 E/InstallCopyTask(13680):    at com.android_rsap.rsapinstall.k.doInBackground(Unknown Source)

Double checked the permissions of the cache folder with EX File Explorer, it has "rw- --- ---" but no owner or group.

Changing this to "root" leads to an earlier error, as the app now has no permission to access the lib in the cache folder ;)
For testing purpose, changing the permission of the cache file to 777, the old error message is back, as shown in the logcat below.

changing the /system/lib/hw/ folder permissions to 777 is not allowed apparently.

As ES is on a decending path, I chose to buy root explorer and chose mount r/w directly in the /system/lib/ folder -> Installation works!


But now, an old problem is back: "SIM status" is telling me "socket error" in the rSAP app :(

busybox is a fresh install (1.24.1 provided by Stericson), the logcat shows a bunch of "ps output:XXXXX" errors, I assume for any process running, but all logcats categorized within the RSAPUtils part.

just one short example to keep the post small:
Code: Select all
12-28 13:39:52.998 E/RSAPUtils(20553): unexpected ps output: 1233 10011      0:01 {e.process.gapps} com.google.process.gapps
12-28 13:39:52.998 E/RSAPUtils(20553): java.lang.NumberFormatException: Invalid int: "0:01"
12-28 13:39:52.998 E/RSAPUtils(20553):    at java.lang.Integer.invalidInt(Integer.java:138)
12-28 13:39:52.998 E/RSAPUtils(20553):    at java.lang.Integer.parse(Integer.java:410)
12-28 13:39:52.998 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:367)
12-28 13:39:52.998 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:334)
12-28 13:39:52.998 E/RSAPUtils(20553):    at com.android_rsap.rsap.ld.a(ld.java)
12-28 13:39:52.998 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.f(jd.java)
12-28 13:39:52.998 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.c(jd.java)
12-28 13:39:52.998 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.c(tc.java)
12-28 13:39:52.998 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.d(tc.java)
12-28 13:39:52.998 E/RSAPUtils(20553):    at com.android_rsap.rsap.pd.run(pd.java)
12-28 13:39:52.999 E/RSAPUtils(20553): unexpected ps output: 1310 10011      0:10 {gle.android.gms} com.google.android.gms
12-28 13:39:52.999 E/RSAPUtils(20553): java.lang.NumberFormatException: Invalid int: "0:10"
12-28 13:39:52.999 E/RSAPUtils(20553):    at java.lang.Integer.invalidInt(Integer.java:138)
12-28 13:39:52.999 E/RSAPUtils(20553):    at java.lang.Integer.parse(Integer.java:410)
12-28 13:39:52.999 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:367)
12-28 13:39:52.999 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:334)
12-28 13:39:52.999 E/RSAPUtils(20553):    at com.android_rsap.rsap.ld.a(ld.java)
12-28 13:39:52.999 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.f(jd.java)
12-28 13:39:52.999 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.c(jd.java)
12-28 13:39:52.999 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.c(tc.java)
12-28 13:39:52.999 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.d(tc.java)
12-28 13:39:52.999 E/RSAPUtils(20553):    at com.android_rsap.rsap.pd.run(pd.java)

Probably the following is the most interesting for you:
Code: Select all
12-28 13:39:53.008 E/RSAPUtils(20553): unexpected ps output:20553 10088      0:00 {droid_rsap.rsap} com.android_rsap.rsap
12-28 13:39:53.008 E/RSAPUtils(20553): java.lang.NumberFormatException: Invalid int: "0:00"
12-28 13:39:53.008 E/RSAPUtils(20553):    at java.lang.Integer.invalidInt(Integer.java:138)
12-28 13:39:53.008 E/RSAPUtils(20553):    at java.lang.Integer.parse(Integer.java:410)
12-28 13:39:53.008 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:367)
12-28 13:39:53.008 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:334)
12-28 13:39:53.008 E/RSAPUtils(20553):    at com.android_rsap.rsap.ld.a(ld.java)
12-28 13:39:53.008 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.f(jd.java)
12-28 13:39:53.008 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.c(jd.java)
12-28 13:39:53.008 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.c(tc.java)
12-28 13:39:53.008 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.d(tc.java)
12-28 13:39:53.008 E/RSAPUtils(20553):    at com.android_rsap.rsap.pd.run(pd.java)
12-28 13:39:53.009 E/RSAPUtils(20553): unexpected ps output:20572 10088      0:00 su
12-28 13:39:53.009 E/RSAPUtils(20553): java.lang.NumberFormatException: Invalid int: "0:00"
12-28 13:39:53.009 E/RSAPUtils(20553):    at java.lang.Integer.invalidInt(Integer.java:138)
12-28 13:39:53.009 E/RSAPUtils(20553):    at java.lang.Integer.parse(Integer.java:410)
12-28 13:39:53.009 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:367)
12-28 13:39:53.009 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:334)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.ld.a(ld.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.f(jd.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.c(jd.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.c(tc.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.d(tc.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.pd.run(pd.java)
12-28 13:39:53.009 E/RSAPUtils(20553): unexpected ps output:20577 10088      0:00 ps
12-28 13:39:53.009 E/RSAPUtils(20553): java.lang.NumberFormatException: Invalid int: "0:00"
12-28 13:39:53.009 E/RSAPUtils(20553):    at java.lang.Integer.invalidInt(Integer.java:138)
12-28 13:39:53.009 E/RSAPUtils(20553):    at java.lang.Integer.parse(Integer.java:410)
12-28 13:39:53.009 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:367)
12-28 13:39:53.009 E/RSAPUtils(20553):    at java.lang.Integer.parseInt(Integer.java:334)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.ld.a(ld.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.f(jd.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.jd.c(jd.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.c(tc.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.tc.d(tc.java)
12-28 13:39:53.009 E/RSAPUtils(20553):    at com.android_rsap.rsap.pd.run(pd.java)

Did anything change in the "ps" behaviour of current busybox? Or in the Integer Java class?

The logcat tells me the "RSAPBroadcastReceiver" is "##### starting rSAP services ##### but apparently the rSAP app is not able to connect to it because it gets crap from the "ps" command.


If you need help testing a sideloaded fix, just give me short notice, we once had an email discussion about the Google Product forum thread about the removed rsap-interface in the current baseband of LG, which Google ironically marked as "obsolete" during M development and never changed the status back to "open". :?

Edit: Forgot to mention the reboot during testing after the last action and a manually killed rSAP app in between, did not work out either^^

 
Posts: 8
Joined: Thu Aug 06, 2015 7:07 am

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by FosCo » Mon Dec 28, 2015 3:13 pm

Created the log file from within the app, now you and everyone who reads this thread knows about my installed and running apps, but who cares if the problem can be solved with it :-)

Txt files are not allowed, zipped it :rolleyes: ;)
Attachments
20151228_140359.209_main.txt.zip
Full log from rsap folder
(8.83 KiB) Downloaded 68 times

 
Posts: 8
Joined: Thu Aug 06, 2015 7:07 am

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by FosCo » Mon Dec 28, 2015 8:30 pm

Searching a little bit deeper, either the creation of the socket fails or the accessibility of the socket from rSAP is prevented somehow.

Trying to follow advice at https://source.android.com/security/sel ... idate.html, but need some time to identify the correct starting point.
To prove the hypothesis first, I'll try to set SELinux to permissive mode and test a few settings afterwards if permissive mode is working.

Looking into a terminal with su, a "ls" command on /dev/socket/ does not show any rsap, sounds like failed creation, which part of the app creates that?

@admin:
Do you have any hint for further analysis?
Having an "out-of-the-box"-solution for the next (monthly :? ) update would be really great, just give me a note if any support for testing with the Nexus 5 hardware is needed.


Edit: setenforce 0 doesn't change anything :(

 
Posts: 4038
Joined: Wed Mar 23, 2011 4:12 pm

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by admin » Mon Dec 28, 2015 11:56 pm

This looks really weird. Did you ever get the superuser request for installer or rsap app? Did you grant access?

 
Posts: 21
Joined: Mon Sep 24, 2012 3:16 pm

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by spi483 » Tue Dec 29, 2015 8:43 pm

I have a Nexus 5 too with stock Android 6.0.1 and root access. Used rsap app with Android 4.x and 5.x (and downgraded radio firmware) for many years now.

Could install rsap app under 6.0.1 but can't connect to my VW Premium car kit anymore. Happy to help testing. Can try and downgrade to radio firmware from Android prior 4.4.3 again if that helped.

 
Posts: 4038
Joined: Wed Mar 23, 2011 4:12 pm

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by admin » Tue Dec 29, 2015 8:56 pm

You surely have to downgrade the radio software. rSAP doesn't work with the current version.

 
Posts: 21
Joined: Mon Sep 24, 2012 3:16 pm

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by spi483 » Wed Dec 30, 2015 2:16 am

That's what I was thinking. Just wondered if there is anything else we might try to get it working.

 
Posts: 4038
Joined: Wed Mar 23, 2011 4:12 pm

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by admin » Wed Dec 30, 2015 7:22 pm

I'm quite sure that it is configurable. But without the help from some insider or a talented hacker there is no chance to find out how.

 
Posts: 8
Joined: Thu Aug 06, 2015 7:07 am

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by FosCo » Thu Mar 10, 2016 4:17 pm

admin wrote:This looks really weird. Did you ever get the superuser request for installer or rsap app? Did you grant access?

Yes I did.
Just to be sure and because of some updates of the app, I tried the install again, including the recovery path (systemless root=system is mounted read only).

Root access is granted for both apps, system files seem to be installed and the qualcomm fix doesn't work.

Which port/socket does the app try to connect to with SIM access?

 
Posts: 4038
Joined: Wed Mar 23, 2011 4:12 pm

Re: [6.0.1 / Baseband 1.0.25.0.23] Socket Connection Error

Post by admin » Fri Mar 11, 2016 11:12 am

I don't understand your problems. Recently I reflashed my Nexus 5 a thousand times with different firmware versions (including CyanogenMod) and never had any problems like you have. You should simply try to flash the latest official Marshmallow firmware, flash SuperSU "systemless" Beta 2.67. Then run the installer app, install system files and enable rSAP access. Don't use any "optimized" ROMs. I don't think there is much to "optimize" in Android 6. Don't make/keep the system partition read-only, else you won't be able to install the system files (that's why they are called system files).

"Socket error" is caused by missing system files or by SELinux restrictions.

Next

Return to LG/Google Nexus 5

Who is online

Users browsing this forum: No registered users and 1 guest