No sound in stock/custom - OnePlus 3T Questions & Answers

Ok so this is driving me up the walls.
I got this new secondhand ( ) 3T, which had some ROM issues: on startup of the stock Oreo rom Dirac Control would repeatedly crash forcing the device to factory reset and reboot.
So I figured the issue was a bad flash by the previous owner, however I've went through a zillion roms so far without getting the phone working as it should. That is, everything works except sound and things depending on sound. Seeing this is a phone sound is kinda crucial
My expectation has been so far that it still is somehow a software issue, as an hardware issue that (outwardly) /only/ breaks sound is too odd for me (sound controller is wihtin soc).
Things I've done:
-Went back to nougat following the guides that are on this forum.
-went to lineageOS
-reflashed phone using OEM unbrick tools in Windows (MSM program), twice (both versions that could be had on the web)
-went fully OEM lock stock and flashed all the way up to Oreo using OEM updates
I suspect that somehow audio depends on a special partition which has become botched by flashing done by the previous owner. Are there any partitions that relate to the audio functions where the SOC loads some special firmware from?
Perhaps some of the data on the ESF partitions relates to the audio functions?
Anyone has any ideas or suggestions?
Attached to this post you will find for your debugging pleasures a logcat dump of me turning on the phone and turning it off again. It is quite noisy, so 1,5 meg in size uncompressed.

-update bumb-
Running OOS A3003_28_161027 build the following appears in dmesg:
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-micbias-cfilt1-mv property in node /soc/[email protected]/tasha_codec failed
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-micbias-cfilt2-mv property in node /soc/[email protected]/tasha_codec failed
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-micbias-cfilt3-mv property in node /soc/[email protected]/tasha_codec failed
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-micbias1-cfilt-sel property in node /soc/[email protected]/tasha_codec failed
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-micbias2-cfilt-sel property in node /soc/[email protected]/tasha_codec failed
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-micbias3-cfilt-sel property in node /soc/[email protected]/tasha_codec failed
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-micbias4-cfilt-sel property in node /soc/[email protected]/tasha_codec failed
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-dmic-clk-drv-strength property in node /soc/[email protected]/tasha_codec failed, err = -22
wcd9335-slim tasha-slim-pgd: wcd9xxx_slim_probe: codec type is 2
[ 5.170191]@3 IPC_RTR: ipc_router_create_log_ctx: Unable to create IPC logging for [mpss_IPCRTR]
[ 5.470344]@0 wcd9xxx_slim_probe: failed to get slimbus tasha-slim-pgd logical address: -6
[19700125_14:14:44.584697]@0 init: Unable to open persistent property directory "/data/property": No such file or directory
[19700125_14:14:44.647916]@0 init: cannot find '/system/bin/ptt_socket_app', disabling 'ptt_socket_app'
[19700125_14:14:44.647953]@0 init: cannot find '/system/bin/usb_uicc_client', disabling 'usb_uicc_daemon'
[19700125_14:14:44.654408]@0 init: cannot find '/system/xbin/perfprofd', disabling 'perfprofd'
[19700125_14:14:44.740997]@2 init: cannot find '/system/vendor/bin/seemp_healthd', disabling 'seemp_healthd'
[19700125_14:14:44.760620]@2 init: cannot find '/system/vendor/bin/qvrservice', disabling 'qvrd'
[19700125_14:14:44.760650]@2 init: cannot find '/system/bin/secotad', disabling 'secotad'
[19700125_14:14:44.768017]@2 init: cannot find '/system/bin/dts_configurator', disabling 'dts_configurator'
[19700125_14:14:45.545454]@0 wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-micbias-ldoh-v property in node /soc/[email protected]/tasha_codec failed
wcd9335-slim tasha-slim-pgd: Looking up qcom,cdc-dmic-clk-drv-strength property in node /soc/[email protected]/tasha_codec failed, err = -22
Click to expand...
Click to collapse
So it seems there are a few system bins (and maybe firmware???) missing. Though these might also just normaly not be there. Also it seems the SOC communicates with audio chip using I2C, but does not seem to be able to enumerate the device normally, which would point to either hardware failure or missing firmware/otherbinaryblobs.
I have flashed using the 'official' unbrick tool, so I would assume all data is correctly flashed onto the phone, and by that I would normally exclude missing firmwares and such as a cause of the issues.
Is there anybody here that can shed more light onto this?
-edit-
More information: normally the phone fires some events when jacks get plugged in, these are also absent. I'm planning on dissasembling the phone and cleaning everything out with alcohol, just to be sure.
Though if it is a software issue it would be nicer to keep it closed.

You having flashed with the unbrick tool, and I assume the full update zip (>1.5 GB) to get the "fully stock", would lead me to believe it is a hardware problem. Both of those methods should have properly flashed the firmware.

redpoint73 said:
You having flashed with the unbrick tool, and I assume the full update zip (>1.5 GB) to get the "fully stock", would lead me to believe it is a hardware problem. Both of those methods should have properly flashed the firmware.
Click to expand...
Click to collapse
Yes, either hardware failure or firmware files that are not included in the unbrick tool (like those resting on ESF partitions)
Doing a search on Dirac control service stopped yields quite a few results of people sharing the same problem, and for who also a downgrade to nougat did not solve the issue. They seem to have needed a motherboard swap
So either the Oreo upgrade causes hardware issues in some cases, but not all, or the Oreo update messes up some firmware files in some cases but not all.

Had same problem on my OP3. Only thing which worked was downgrading to android 6.0.1

So the audio is working like a charm on 6.0.1 except the headphone jack, when I plug in headphones i dont get the headphone logo on top and the sound plays through BOTH headphones and the speaker

fizzk11 said:
So the audio is working like a charm on 6.0.1 except the headphone jack, when I plug in headphones i dont get the headphone logo on top and the sound plays through BOTH headphones and the speaker
Click to expand...
Click to collapse
You can workaround that using an app like SoundAbout, which can force playing audio on specific route

Okay so the problem is back after a day. This happened to me in the past, phone works perfectly fine for a while after flashing a rom or factory resetting, then out of the blue, using the microphone crashes the phone and problem is back. Really makes me think this is a software issue

Did the problem fixed? I have same issues. Please help??

Hi guys, same problem here, after repairing this OP3T the phone was working great when suddenly, the sound stopped working, i have no sound through ear, loud speaker, jack 3.5 neither... i replaced the loud speaker module thinking it was broken but nope, the problem persist... I´m on Oxygen OS with nougat.

Hey, I'm sorry to post on such an old thread but did you manage to find a solution? I'm pretty much facing the same issues.

Related

Compass and Accel sensors not working, Please Help!

I seem to be having an odd problem with my new G1.
In any Cupcake build (JF 1.51, TheDude's 1.2, Official ADP) I flash, neither the compass nor the accelerometer sensors work at all. I have flashed between them several times, with an Alt+W each time, so I know it's not a bad flash.
The strange thing is, when I jump back to an official RC29 build, both sensors work fine. I haven't tried RC30 or anything else, but I know the sensors are physically functional.
I have re-flashed the latest radio as well, as it is currently using 2.22.19.26I.
If anyone can help me with this problem, I would greatly appreciate it.
gigawatts said:
I seem to be having an odd problem with my new G1.
In any Cupcake build (JF 1.51, TheDude's 1.2, Official ADP) I flash, neither the compass nor the accelerometer sensors work at all. I have flashed between them several times, with an Alt+W each time, so I know it's not a bad flash.
The strange thing is, when I jump back to an official RC29 build, both sensors work fine. I haven't tried RC30 or anything else, but I know the sensors are physically functional.
I have re-flashed the latest radio as well, as it is currently using 2.22.19.26I.
If anyone can help me with this problem, I would greatly appreciate it.
Click to expand...
Click to collapse
I think your using the pre-cupcake apps. Did u download the apps after you updated or did you install them from a back up?
Best way to check, You should got to settings and then sounds&display and check off orientation. You phone should switch from portrait to landscape when you rotate any program (except homescreen). If that works then nothing is wrong with your phone. If it doesn't then something happened somewhere weird
any apps i have installed have been after i flashed a rom (after a wipe) and not from a backup. Plus, something as simple as Google Maps or the Browser App should just rotate without opening the keyboard.
Best way to check, You should got to settings and then sounds&display and check off orientation.
Click to expand...
Click to collapse
By that I assume you place the check mark (lit green) next to the option, not "check it off" (not lit green). I have tried both checked and unchecked in pre-installed apps like maps and browser, and still nothing.
Small update. I just flashed JF's v1.43_RC33 with root, keeping the same more recent radio, and both sensors work there, as they do in RC29. It seems to be ONLY cupcake based roms where they don't work.
Any other suggestions anyone has for me? I might try a hero build next, to see if they work there, but I'm not sure how stable they are yet.
Any help/suggestions would be greatly appreciated!
Accelerometer fix
http://forum.xda-developers.com/showpost.php?p=4081673&postcount=4885
I tried your suggestion, and it did not work. Unlike the other user reporting that the sensors would work for a short time after reflashing, mine has never worked after a cupcake flash. Only after a pre-cupcake flash.
Although ideas like that are what I am looking for, possible corrupt config files that need to be cleared or maybe a mod probe command of some sort to activate or wake up the sensors.
Upon some more inspection, I get the feeling something is wrong with my akmd process, or whatever executable generates the akmd_set.txt compass and accelerometer calibration data. I tried to follow some instuctions to purge the akmd_set.txt file to clear any bad config, but the file is no where to be found. My phone doesnt seem to generate one at all when it's booting.
The akmd process does remain running in the background, as here is its ps output:
Code:
# ps | grep akmd
compass 77 1 1320 328 c020d268 afe0c45c S /system/bin/akmd
This is the output I get from logcat when I try to manually run the /system/bin/akmd process or when it restarts automatically after being killed:
Code:
D/AKMD ( 362): akmd 1.6.4 START
D/AKMD ( 362): library version: 1.2.1.1129
D/AKMD ( 362): Compass OPEN
D/AKMD ( 362): No calibration data
D/AKMD ( 362): Can not initial compass parameters error: -5
and this is the output I get when I run a program like Orienteer:
Code:
I/ActivityManager( 90): Starting activity: Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x10200000 comp={com.deafcode.android.Orienteer/com.deafcode.android.Orienteer.Orienteer} }
I/ActivityManager( 90): Start proc com.deafcode.android.Orienteer for activity com.deafcode.android.Orienteer/.Orienteer: pid=363 uid=10041 gids={}
D/SensorManager( 363): found sensor: AK8976A 3-axis Accelerometer, handle=0
D/SensorManager( 363): found sensor: AK8976A 3-axis Magnetic field sensor, handle=1
D/SensorManager( 363): found sensor: AK8976A Orientation sensor, handle=2
D/SensorManager( 363): found sensor: AK8976A Temperature sensor, handle=3
D/dalvikvm( 363): GC freed 920 objects / 64320 bytes in 92ms
D/LocationManager( 363): Constructor: service = [email protected]
D/Sensors ( 90): sensors=00000005, real=00000005
D/GpsLocationProvider( 90): setMinTime 2000
W/IInputConnectionWrapper( 145): showStatusIcon on inactive InputConnection
I/ActivityManager( 90): Displayed activity com.deafcode.android.Orienteer/.Orienteer: 1313 ms
D/dalvikvm( 145): GC freed 795 objects / 45896 bytes in 165ms
D/GpsLocationProvider( 90): TTFF: 7203
Maybe this will give someone some more insight as to the problem I am having.
hello,
i me french and i have the same problem.
No akmd_set.txt on my phone.
If you are a solution could you partage it ?
I think it's a driver problem but i'm not sure.
JEEP
Unfortuantly I have still not found a solution, but continue to look for one. I will let you know here if I do manage to solve it.
I am also having the same problem. Wiping does not fix it and the method stated by Cyanogen didn't work either. I don't know if this will be any help, but I do know the accelerometer issue started about 3 or 4 days ago for me. Maybe if I list things I've done to my phone in the last few days, it might help narrow down the cause if others with the same issue compare their experiences to each other.
I have a US T-Mobile G1 and I have been rooted since February. Since that time I have upgraded to (and currently use) the latest radio from HTC, Haykuro's SPL, and a class 6 4gb card. I've also been through more roms than I can count in that time, all without an accelerometer issue till now.
Now that I've got all that out of the way here's the more relevant stuff:
Within the last week I have upgraded to Cyanogen's 1.3.1 recovery boot and installed the latest JAC Hero build. I repartitioned my card into 3 partitions with the directions given in JustAnotherCrowd's thread using parted in the recovery's console.
Code:
#parted /dev/block/mmcblk0
rm 1
rm 2
mkpartfs primary fat32 0 3420
mkpartfs primary ext2 3420 3932
mkpartfs primary linux-swap 3932-3964
This is the first time I've ever used apps to sd. After using that rom for about a day, I switched to Cyanogen's build and wiped my user data without wiping the ext partition of my sd card and I continued to use the swap partition on my Cyanogen build. I'm fairly sure but not 100% certain that the accelerometer was still working at this point. Soon after installing this rom, Cyanogen released an update including the compcache modules to replace the linux-swap setup. I installed the custom userinit.sh script to system/sd to activate compcache. Then Cyanogen released another update (immediate bug fixes) almost as soon as I got this rom working. I flashed the update.zip, but then it started to boot loop. I wiped the phone (not the ext partition), still boot looped. I took out the sd, still boot looped. I put the sd card back in wiped again, reflashed, and then clicked "repair ext file system". STILL BOOT LOOPED! (Don't say I just wasn't giving it enough time to boot because I acctually watched the boot animation flicker in and out for a second and start over.) Next, I used fastboot to restore only the user data from a nandroid backup of an older Cyanogen rom. This time it worked. Next, I installed the audio resources to system/sd/media and linked them using the userinit.sh file. The next day, I realized that the accelerometer was no longer functioning.
I hope this description helps to figure this out.
I'm having the exact same issue.
testing567, can you post the userinit.sh file you are currently using, and possibly you or someone else post their userinit.sh of a phone with a working accelerometer and compass here?
I am thinking that one of my init scripts may not be calling the akmd service properly, as in not with the correct permissions or something, and thus not calibrating itself on boot. I was planning on upgrading to the latest cyanogen update today, as i am running 3.6.5 right now. I was also considering upgrading my SPL to a dev SPL so i can use nandroid to backup (getting a little tired of loosing everything when attempting different roms to fix this issue).
I got my userinit.sh from this post.
http://forum.xda-developers.com/showpost.php?p=4140826&postcount=74
I also decided to take advantage of the media symlinking already in this script and pushed the audio resources to system/sd/media/.
I've always had the same issue when upgrading to a cupcake based rom. Nobody else until recently seemed to share my misfortune (sorry for everyone else). There is an exception though, JF 1.5 (T-Mobile) build the sensors work (although miscalibrated). I haven't found any other solutions or any other way to generate the settings file. My process output appears to be the exact same as you've posted.
I'll keep trying some things but I just want to keep this alive incase anyone else needs a fix and one of us comes up with a solution.
RemoteDJ, I may actually have a solution to your miscalibrated problem. In the process of going through and trying to get my sensors working, I created an empty akmd_set.txt file with chmod 777 permissions (just so it wouldnt ***** about some user permissions when trying to edit it), and then rebooted the phone. Upon looking at the file after reboot, it was filled with calibration data.
Although this has not fixed my problem, it may help you. Also, the application "Bubble" has a calibrate sensors menu option, which may help you too. I may have to try reverting back to JF 1.5 to see if I have better luck there. Was that JF 1.51 you were using? If not, please advise.
Yes it was JF 1.51, it's funny because I just got done making a blank chmod 777 akmd_set.txt lol. Of course i'm on the latest stable cm-3.6.8.1 currently and the sensor doesn't work at all.
Just so we stay up to date with each others findings, I also pulled the akmd app from Haykuro's ION, JF 1.43, JF 1.51, Official RC33 and the current CM build. I have only tried replacing the current one with the ION app (in recovery), so far no change, but I think the only file difference I noticed out of the files I pulled was that the JF 1.43 and Official RC33 seemd to be the same (haven't hashed them to verify) and different then the others which seem to be the same but since I haven't hashed any of them to verify yet I can't say for sure.
I am calling it a night right now but will let you know if I find anything tomorrow.
Just a followup with the hash info.. looks like I was correct:
517a87a4e6caa5e66f0520c68dcb7c0e - Official RC33
517a87a4e6caa5e66f0520c68dcb7c0e - JF 1.43
c3a80124ab072f9bf12cc9e4155a0f9f - JF 1.51
c3a80124ab072f9bf12cc9e4155a0f9f - ION
c3a80124ab072f9bf12cc9e4155a0f9f - CM 3.6.8.1
Another Edit: I am apparently not good at going to sleep.. Good News! (semi).
I left the akmd_set.txt in place (it got filled with data just like yours)
replaced ion/cm akmd with jf 1.43 and now the sensor appears to be working (although still miscalibrated for me, this might be a hardware issue.. lots of drops).
step by step.
copy jf1.43 akmd to sdcard (i just pulled it out of the update zip).
reboot recovery
mount /system
rm /system/bin/akmd
mount /sdcard
cp /sdcard/jf1.43_akmd /system/bin/akmd
then umount (probably not required)
reboot.
It still didn't work, but I deleted the akmd_set.txt via adb and then rebooted and voila!
Let me know if any of that works for you
Edit: I was able to fix my calibration by reverting to the rc30 akmd, I have absolutely no idea why my device is so picky, but it only has ever had correct calibration with accelerometer on the rc29/30 builds (this includes all official t-mobile ota releases). Anyway just wanted to through that out there incase anyone else uses the jf1.43 and is miscalibrated.
RemoteDJ,
Thank you so much for that suggestion! That totally worked for me! I flashed cm-3.6.8.1 tonight and replaced its /system/bin/akmd binary with the one from jf 1.42. After messing around with some permissions (I failed to realize the akmd binary was not set as executable when i moved it over ) i was able to create a blank akmd_set.txt, chmod 777 it, and then restart the akmd service (stop akmd, followed by start akmd).
I can not thank you enough for this suggestion! Guess it just took another similar brain bashing away at the same problem to solve it. I just wonder why this is not a problem for a lot of other people out there. It's the same hardware, so you would think everyone upgrading to cupcake would have an incompatible akmd binary. Strange...
Sweet, I'm really glad it worked for you!
I can't imagine for the life of me why other people don't have similar problems, but then again I've had a few problems that seemed indivualized to my device lol. Its only recently that I discovered a few other people were having problems with the accelerometor.
Oh well, all in all just glad this worked.
Maybe we can get Cyanogen to include this in his FAQ as an alternative for sensor repair for the people like us. I might reply on the latest build thread later, anyway have a good one.
So far I haven't had any luck with this. I'm actually tempted to send my unit back to HTC with the ota 1.5 cupcake on it and see what happens. I'm not sure if it was working when they sent it to me or not. It doeswork with the rc29 though.
I'm having the same issue, no compass apps seem to work, google sky maps doesn't work , the level app doesn't work, all are froze.
How can I fix it?

Open Source CM10.1 for Dell Streak 7 continuation

First you need to have giveen's original port installed: http://goo.im/devs/giveen/jellystreak (via the old thread: http://forum.xda-developers.com/showthread.php?t=2130081). The most important thing this does is installing the TWRP "recovery" bootmenu thingy. You can use it when powering on/restarting the dell streak 7 and then keeping power+volup pressed and then choosing "install update from sdcard" or so.
With AOKP there is one install image that wipes /system and an ota update. I have not tested the ota update.
Download for the AOKP 4.2 build for the Dell Streak 7: http://w3studi.informatik.uni-stuttgart.de/~haagch/aokp/
The non-ota update wipes /system. So you have to reinstall gapps every time too, preferably before rebooting (android deletes settings for apps that are not installed I think).
The "official" gapps package uses neon instructions that don't work on tegra2. You'll see the keyboard, tts, etc. crashing all the time. "tonyp" has created a gapps package that uses "old" libraries that work without neon instructions. So you should use this instead of the official gapps:
Download for non-neon gapps: http://goo.im/devs/tonyp/non-neon-gapps
Gesture typing on the keyboard doesn't seem to work for me, but tts works and it doesn't seem to be crashing.
Known issues for me:
[*]sensors don't work: rotation, accelerometer, gps (I think), magnet field (Sensor driver is sensors.p3.so for now, maybe later giveen gets open source drivers to work)
headphone jack doesn't mute/transfer for some headsets like ones with built in microphones
bluetooth keyboard
Performance problems. Especially when the ram gets full. You can use a ram manager like https://play.google.com/store/apps/details?id=com.jrummy.apps.memory.manager with the Aggressive or Extreme preset to make that problem go away with the cost of background apps being killed very quickly.
Here is the repository: https://github.com/ChristophHaag/android_device_dell_streak7
And here is how to build it on Archlinux:
AOKP: https://gist.github.com/ChristophHaag/6334554
Cyanogenmod: https://gist.github.com/ChristophHaag/6078249
I'm new to android but maybe some other people know something, so I post whatever I come about. Maybe someone else wants to get started too and finds this helpful.
If you want to engage in bug finding and fixing yourself:
Remote debugging c works like this:
On the android device you do
Code:
gdbserver --remote-debug :5039 --attach 1
Which will attach gdbserver to the process with pid 1 and listen on port 5039 on all interfaces.
For a gui debugger I tried nemiver:
For $ANDROID I use the path where the cyanogenmod was checked out.
Code:
nemiver --remote=<STREAK7-IP>:5039 --gdb-binary=$ANDROID/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gdb --solib-prefix=$ANDROID/android/system/out/target/product/streak7/symbols/ $ANDROID/android/system/out/target/product/streak7/symbols/init
And in edit-preferences for sources I added some paths like symbols/, symbols/system/lib and the android/system directory.
There's also a statically compiled gdb that you can use over ssh or so: http://dan.drown.org/android/howto/gdb.html
Obsolete first look into the CyanogenMod adb bug:
I think the problem is in line 1068 in init.c
Code:
if (!action_queue_empty() || cur_action)
timeout = 0;
each time I looked when it comes there the cur_action->name was "property:sys.usb.config=none".
Maybe it is connected with the adb issue. When I googled for the
Code:
E/UsbDebuggingManager( 367): Communication error:
E/UsbDebuggingManager( 367): java.io.IOException: No such file or directory
E/UsbDebuggingManager( 367): at android.net.LocalSocketImpl.connectLocal(Native Method)
E/UsbDebuggingManager( 367): at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:238)
E/UsbDebuggingManager( 367): at android.net.LocalSocket.connect(LocalSocket.java:108)
E/UsbDebuggingManager( 367): at com.android.server.usb.UsbDebuggingManager.listenToSocket(UsbDebuggingManager.java:79)
E/UsbDebuggingManager( 367): at com.android.server.usb.UsbDebuggingManager.run(UsbDebuggingManager.java:115)
E/UsbDebuggingManager( 367): at java.lang.Thread.run(Thread.java:856)
issue I found surprisingly many people having issues with this, but few answers.
But I also found e.g. this: https://gist.github.com/steven676/5...c-remove-obsolete-ro.debuggable-1-trigg.patch
so the problem may be in https://github.com/ChristophHaag/an...lob/master/prebuilts/root/init.streak7.usb.rc
but I didn't have time to really read documentation to that.
I think this file complements $ANDROID/system/core/rootdir/init.usb.rc
I'll either play around with that or I'll add debug output in android.net.LocalSocketImpl.connect(LocalSocketImpl.java:238)
Code:
connectLocal(fd, address.getName(), address.getNamespace().getId());
Then I would at least know what it's trying to do and it would get easier.
Many of the results I saw from googling mentioned that it might have to do with netd.
On the streak 7 I get this:
Code:
cat /dev/socket/netd
cat: can't open '/dev/socket/netd': No such device or address
I'm not sure if this is how it should behave...
An observation is that adbd run from a command line seems to start without an issue and listens on a port specified with
Code:
setprop service.adb.tcp.port 5555
but the access over adb connect <STREAK7-IP> does only say "unauthorized". And "start adbd" does nothing. None of the programs seem to have --help or -h, so I have to look closer into whether they can be started directly.
I'll change "[ro.adb.secure]: [1]" in /default.prop to 0 and see whether that does anything.
In the other thread from giveen I said that I don't see the log spam. This was with debugging in the developer settings disabled. When I enable it, the logspam starts. But whether it is enabled or not, init still eats 100% cpu. The trouble with the debugging is that each time it is enabled and I want to disable it, the streak 7 immediately reboots.
Now that I had logcat via ssh running I caught this when the reboot happened:
Code:
W/dalvikvm( 367): threadid=50: thread exiting with uncaught exception (group=0x40b0e930)
E/AndroidRuntime( 367): *** FATAL EXCEPTION IN SYSTEM PROCESS: UsbDebuggingHandler
E/AndroidRuntime( 367): java.lang.NullPointerException
E/AndroidRuntime( 367): at com.android.server.usb.UsbDebuggingManager.closeSocket(UsbDebuggingManager.java:125)
E/AndroidRuntime( 367): at com.android.server.usb.UsbDebuggingManager.access$200(UsbDebuggingManager.java:46)
E/AndroidRuntime( 367): at com.android.server.usb.UsbDebuggingManager$UsbDebuggingHandler.handleMessage(UsbDebuggingManager.java:177)
E/AndroidRuntime( 367): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 367): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 367): at android.os.HandlerThread.run(HandlerThread.java:60)
Looks bad.
For looking at the android code I just use grep and ls with globbing for the c and config files and for the java part I imported it in eclipse via this method: http://source.android.com/source/using-eclipse.html
This is a build I haven't tested yet: http://w3studi.informatik.uni-stuttgart.de/~haagch/cm-10.1-20130820-UNOFFICIAL-streak7.zip
This is giveen's original nvflash that I am not sure I am allowed to put there as giveen has not put any license information in there: http://w3studi.informatik.uni-stuttgart.de/~haagch/JB_Beta2.1.zip But then it's all apache code and there are no notices in reagards to the apache license or changed files anyway. If not, you can just tell me and I'll remove it.
------------------------------------------------
So the call to connectLocal() that throws the exception has as parameters
fd: FileDescriptor[263]
address namespace: RESERVED with address name space id: 1 and address name: adbd
That doesn't help me much yet, but there are frequent calls with FileDescriptor[263] and namespace RESERVED, id 1, name rild (radio service) that don't throw an exception.
So it's a "valid" file descriptor... But I think the problem is still that adbd is not started by init...
The whole UsbDebuggingManager.run method is
Code:
public void run() {
while (mAdbEnabled) {
try {
listenToSocket();
} catch (Exception e) {
/* Don't loop too fast if adbd dies, before init restarts it */
SystemClock.sleep(1000);
}
}
}
where listeToSocket() is ultimately throwing the exception.
I have also read a bit about how adbd is supposed to work. Apparently in android 4.2.2 they introduced rsa encryption. It looks very similar to ssh. You have your authorized public keys on the device in /data/misc/adb/adb_keys (like ~/ssh/authorized_keys) and on your computer you have your public key in ~/.android/adbkey.pub
So I put my ~/.android/adbkey.pub in /data/misc/adb/adb_keys on the streak 7 and started adbd from the command line on the device. And indeed, when I connect with "adb connect <STREAK7-IP>" I get "<STREAK7-IP>:5555 device product:cm_streak7 model:Streak_7 device:streak7" with "adb devices -l" and adb shell works. It's a bit unrelated, but this applies: https://code.google.com/p/android/issues/detail?id=48126
But the actually important part, the "start adbd" still doesn't do anything.
It really must be somethin with /init.streak7.usb.rc. The stuff in /sys/class/android_usb/android0/ seem to be set all wrong...
------------------------------------------------
I'll just keep posting random things I discover that I find strange or interesting and if anyone knows anything about any of those, they can just chime in.
In /init.streak7.usb.rc there is the line
Code:
write /sys/class/android_usb/android0/iProduct $ro.product.model
"getprop ro.product.model" says "Streak 7" but /sys/class/android_usb/android0/iProduct apparently doesn't seem to be able to take a string with a space because "cat /sys/class/android_usb/android0/iProduct" returns "Streak". You can write directly to it with "cat "Streak 7" > /sys/class/android_usb/android0/iProduct" but it only saves up to the space. I don't think that's really a problem but strange anyway.
I have googled for another tegra 2 device and looked at its usb init rc: https://raw.github.com/CyanogenMod/android_device_samsung_p4-common/ics/init.p3.usb.rc
Adding a section with on property:sys.usb.config=adb did nothing and it seems I haven't been able to google what should be in /sys/class/android_usb/android0/idProduct for the streak 7.
I think I'll just look into how init on android works and how the triggers work. Then it shouldn't be too hard to figure out what exactly it is trying to do and why it is failing.
------------------------------------------------
I was trying to get my head around why "getprop sys.usb.config" would always return "none" and the system wouldn't respond to "setprop sys.usb.config adb,mtp" in any way. So I got to suspect that /init.streak7.usb.rc was not used at all. Then I compared the imports and found that /init.streak7.rc did use a relative path for /init.streak7.usb.rc while all the other init*.rc were using absolute paths.
So I'm not sure if it this is really the thing that fixed it, but it's the latest thing I tested and now init's 100% cpu and adb are fixed: https://github.com/ChristophHaag/an...mmit/eee0625e11cfafd510c3bada6ae67a133766c0f4
Edit: Wait, it happened again. Maybe not. :/
Hm, no, definitely not it. Can't even reproduce it. It worked after adb sideload and wiping the cache and the dalvik cache.
At least it's clear now that init's 100% cpu usage and adb not working and the dalvik crash when disabling debugging are all the same issue.
Good luck. I'll give you a hint as a parting gift. The USB issue is not kernel related.
I really dont care to licenses anything so you are free to do with as you will. Personally, I will continue to develop in private and if there are kernel changes, as per the GPL, I will make those updates available.
[moved to hidden section in first post]
[moved to hidden section in first post]
[moved to hidden section in first post]
If you really want to help, let me know. I'll let you in on my secret.
giveen said:
If you really want to help, let me know. I'll let you in on my secret.
Click to expand...
Click to collapse
Do I want to help? Does this thread look like I don't?
As I've said I'm new to the android code so I'm not really sure what I'm doing yet.
After rebooting with debugging enabled and adb sideloading an image it works for some reason (until you disable debugging in the developer settings, then it loops on sys.usb.config=none again) but it's all clearly not like intended by /init.streak7.usb.rc. /sys/class/android_usb/android0/idVendor is 18d1 and android_usb/android0/idProduct is d002 which is set in init.usb.rc for on property:sys.usb.config=adb...? I just don't get it yet. The init readme says declaring an action or service twice is an error but this is from upstream, so adb is supposed to always be 18d1:d002?
So if you know something I don't I would obviously greatly appreciate it if you told us. In fact you can directly push to the repository now if you wish to do so.
ccxxx said:
Do I want to help? Does this thread look like I don't?
As I've said I'm new to the android code so I'm not really sure what I'm doing yet.
After rebooting with debugging enabled and adb sideloading an image it works for some reason (until you disable debugging in the developer settings, then it loops on sys.usb.config=none again) but it's all clearly not like intended by /init.streak7.usb.rc. /sys/class/android_usb/android0/idVendor is 18d1 and android_usb/android0/idProduct is d002 which is set in init.usb.rc for on property:sys.usb.config=adb...? I just don't get it yet. The init readme says declaring an action or service twice is an error but this is from upstream, so adb is supposed to always be 18d1:d002?
So if you know something I don't I would obviously greatly appreciate it if you told us. In fact you can directly push to the repository now if you wish to do so.
Click to expand...
Click to collapse
The problem is CM.
I switched to AOKP which is close to Google's AOSP, and the problem solved itself. Something in the way USBManager is programmed in CM screwed things.
I got around to download aokp today.
The build system is slightly different, but easy enough to set up. I first just did an "update" to it, but the adb/init problem persisted, acore kept crashing (but deleting data for the contacts app "solved" that).
So I decided to finally make a factory reset. Not really sure what happens there, but that didn't delete the apps in /system/apps I think so I just wiped everything except sdcard etc. with twrp and installed the image again. This time it works better it seems. adb seems ok for now, cpu usage is okay.
The 4.2.2. google apps for that are these: http://goo.im/gapps/gapps-jb-20130812-signed.zip
Now I'm not sure: Would a factory reset/complete reinstall have helped with cyanogenmod too?
aokp is missing a few features cyanogenmod has, most notably the performance settings where you can overclock and set up zram with the gui.
Keyboard still crashes. Not really surprising that illegal instruction hasn't changed.
There doesn't seem to be recent apps when long pressing the home button. Strange.
Not sure how much I like it yet and whether I'd rather use cyanogenmod.
Here it is: http://w3studi.informatik.uni-stuttgart.de/~haagch/aokp_streak7_unofficial_2013-08-23.zip
Thanks, giveen.
No problem. AOSP keyboard burns RAM like nothing else. If you switch to an 3rd party keyboard , you will no longer crash. This problem is common on a lot of low memory devices. ZRAM doesn't really work. I have a script that I want to test out that DJ_Steve had originally wrote. Also, I will send you the sensor files you need to modify to get them to work.
google has this keyboard in the play store https://play.google.com/store/apps/details?id=com.google.android.inputmethod.latin and I got it from http://dl.androidnext.de/com.google.android.inputmethod.latin.apk. Works ok, but has issues like you can't disable the "ducking" blocking of "offensive" words...
The sensors changes you commited work well. Rotation/acceleration/magnet/light seem to react normally.
It's almost usable now.
For people building it from source: If you get a weird error like "ERROR: couldn't find <type 'property'> in build.prop" and can't find anything useful with google... I deleted out/* and did a complete rebuild and then it worked.
Plugging in a headset still doesn't turn off speakers but it seems only like a minor issue since it seems to be detected just fine:
Code:
V/WiredAccessoryManager( 374): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=1, DEVPATH=/devices/virtual/switch/h2w, SEQNUM=2006, ACTION=change, SWITCH_NAME=h2w}
V/WiredAccessoryManager( 374): newName=h2w newState=1 headsetState=1 prev headsetState=0
W/AudioPolicyManagerBase( 103): checkOutputsForDevice(): No output available for device 0004
V/WiredAccessoryManager( 374): device h2w connected
Google tts is crashing like the keyboard (
Code:
F/libc ( 6525): Fatal signal 4 (SIGILL) at 0x5dc80738 (code=1), thread 6525 (gle.android.tts)
) but pico tts seems to work, at least with english.
A Google search gave me this:
http://stackoverflow.com/questions/7102606/sigill-in-android-ndk-code/7104177#7104177
And further this might be worth looking into: http://forum.xda-developers.com/showthread.php?t=2186251
Not sure whether it's simply neon instructions or register usage of 16+ since I haven't looked that close into the build system yet. But probably ILL_ILLOPC means it's a neon instruction.
So sensors work now? I've been at that for months and I wasn't sure if I got it right. If I got it right, that was months of work there that I wasn't even sure was going to work.
Headphones and microphones need to be adjusted in mixer_paths.xml
Months of untested work that just works? Impossible! :good:
I haven't done a really thorough test, but they all seem to be doing something. https://play.google.com/store/apps/details?id=imoblife.androidsensorbox seems to have a little problem with the directions with the rotated screen though. But in general it all does something that seems related to what I do to the device.
The AKM8973. is a chip that is normally found on qualcomm devices. So I had to track down the right HAL and then modify to work with Tegra sword ices. It's a terrible hack/slash, modify and pray it works job. I had Just finished. Does the screen rotate?
giveen said:
The AKM8973. is a chip that is normally found on qualcomm devices. So I had to track down the right HAL and then modify to work with Tegra sword ices. It's a terrible hack/slash, modify and pray it works job. I had Just finished. Does the screen rotate?
Click to expand...
Click to collapse
Yes, the screen rotates. And even more impressively, it rotates correctly!
Good. Now i can focus my energy on the camera.
Hm, having difficulty with my compiles booting. Chris, if you compile and upload the zip, I can give you my goo.im information and you can push it as an auto-update. Don't forget to include your name in there somewhere for credit as well as you are now part of the team.
giveen said:
Hm, having difficulty with my compiles booting. Chris, if you compile and upload the zip, I can give you my goo.im information and you can push it as an auto-update.
Click to expand...
Click to collapse
I have edited my first post.
http://w3studi.informatik.uni-stuttgart.de/~haagch/aokp_streak7_unofficial_2013-08-25.zip
http://w3studi.informatik.uni-stuttgart.de/~haagch/aokp_streak7-ota-eng.c-builder.zip
giveen said:
Don't forget to include your name in there somewhere for credit as well as you are now part of the team.
Click to expand...
Click to collapse
Yea, maybe if I contribute something substantial instead of cosmetic changes.
OH yeah, bluetooth keyboard, I see that as one of your issues. I'll upload a bunch of idc files that should at least address that issue, not sure though.
Are you missing any commits? I noticed your update has sensor working but my build does not.

[Q] Mounting Files with CIFS manager

Hi,
I tried to mount files from my local NAS, but it does not work anymore. I used CIFS Manager in the past and it always worked fine. Now I have a new Phone with Android 4.2.2 ( Stock) and it doesn't work anymore. I am not sure, but it might be a Kernel related problem?
I already tried these .ko modules from post #5
http://forum.xda-developers.com/showthread.php?p=33498303#post33498303
but I think this is beyond my knowlodge. It's not working on my phone.
The error: "Invalid argument" pops up every time it tries to connect.
Is there a way to get this working? I suppose there is no alternative kernel yet than stock?
Cheers
Use AndSMB
Try AndSMB, I had the exact same problem with the invalid argument crap and AndSMB worked immediately and without issue. I dicked around with CifsManager for a while and never had any success.
Hi all, if your goal is simply to play music and video from your NAS to your android device, you can use Kodi (xbmc) that can access cifs path directly!

Viper4Android

So I mainly use my phone as an on-the-go MP3 player and want to use V4A as my audio driver, but I cannot seem to get it to work. I tried when the phone initially came out, but gave up since I figured maybe it was a compatibility issue, but decided to give it another shot tonight.
Upon installation of the latest version (2.5.05), nothing worked. I followed the troubleshooting on the website and have gotten nowhere. When I check the driver status, I get the following log:
Driver Version: 2.5.0.4
NEON Enabled: No
Enabled: No
Status: Abnormal
Audio Format: Unsupported (I'm guessing because nothing it player at the moment)
Processing: No
Sampling Rate: 0
Click to expand...
Click to collapse
I'm not exactly sure where to go from here.
SELinux needed to be in permissive mode for me.
I used SELinuxModeChanger from F-Droid.
MrBrightside1009 said:
So I mainly use my phone as an on-the-go MP3 player and want to use V4A as my audio driver, but I cannot seem to get it to work. I tried when the phone initially came out, but gave up since I figured maybe it was a compatibility issue, but decided to give it another shot tonight.
Upon installation of the latest version (2.5.05), nothing worked. I followed the troubleshooting on the website and have gotten nowhere. When I check the driver status, I get the following log:
I'm not exactly sure where to go from here.
Click to expand...
Click to collapse
Psoulocybe said:
SELinux needed to be in permissive mode for me.
I used SELinuxModeChanger from F-Droid.
Click to expand...
Click to collapse
does not matter for me what SEL mode is either way it just keeps telling me to install/update driver even after doing so and rebooting... rinse, repeat, repeat.... *bang head against wall or desk*

Bluetooth Stops working after first reboot?

I recently downgraded my rog phone 3 from android 12 to android 11 while rooting it with twrp and magisk. After I did this, everything worked fine on my system (besides mms for a moment), once it is flashed, the first reboot afterwards completely stops bluetooth from functioning. No startup, nothing. The drivers are just nonfunctional I guess. Anyone else have this issue/ know how to solve? Not very fluent in this and just looking to fix this asap.
Also here is a logcat error that shows itself when I try to enable bluetooth.
FATAL EXCEPTION: BluetoothDatabaseManager
Process: com.android.bluetooth, PID: 2430
android.database.sqlite.SQLiteCantOpenDatabaseException: Cannot open database '/data/user_de/0/com.android.bluetooth/databases/bluetooth_db': Directory /data/user_de/0/com.android.bluetooth/databases doesn't exist
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:252)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:505)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:206)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:918)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:898)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:762)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:751)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:145)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:106)
at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:476)
at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:281)
at com.android.bluetooth.btservice.storage.MetadataDao_Impl.load(MetadataDao_Impl.java:258)
at com.android.bluetooth.btservice.storage.MetadataDatabase.load(MetadataDatabase.java:95)
at com.android.bluetooth.btservice.storage.DatabaseManager$DatabaseHandler.handleMessage(DatabaseManager.java:124)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:248)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:224)
... 20 more
I really need help with this if anyone could spare the time.
I have dumped the same stock rom I installed and I have noticed it is missing the bluetooth APEX file. Is it even possible to install an APEX file without reinstalling an entire system? I know the format is similar to APK and i have read/write access to my system partition, so is it possible to do?
Try setting selinux to permissive (from a root command line, run "setenforce 0"). I have a similar issue (messed up permissions when downgrading and I'm trying to debug it now. I'm trying to figure out how to fix those permissions without disabling selinux entirely, as disabling it is a massive security hole.

Categories

Resources