Strace and debugging commands help - Nexus 6P Q&A, Help & Troubleshooting

I've like to know more in general about how to run strace and debug errors in the general.
Specifically, my device was having issues and I saw errors like these in the logs.
Code:
2016-03-15 02:46:37,ERROR,QC-QMI,com.android.sdm.plugins.diagmon,linux_qmi_qmux _io_wake_unlock: Err in writing wakelock=qmuxd_port_wl_0, error [1: eek: operation not permitted]
I flashed factory images for mhc19i. With my only mods being twrp 3.0.0.1 and su 2.67, I'm seeing a lot of these qmuxd errors.
Code:
03-26 17:37:09.597 512 512 E QC-QMI : qmuxd: RX on fd=16 returned error=0 errno[2:No such file or directory]
03-26 17:37:09.598 512 512 E QC-QMI : QMUX qmux_client_id=4a not found in qmux client list, unable to remove
I'm really curious what is going on with this and I'd like to learn how to dig deeper. I tried running strace on the pid, but it wouldn't find a process using the number from logcat and qmuxd wasn't listed when I ran ps. I tried stop stopping ril-daemon and qmuxd and using strace to run qmuxd as directed in an old post.
Code:
1|[email protected]:/ $ strace -ff -v -o /sdcard/straceqmuxd -s 256 /system/bin/qmuxd
strace: Can't stat '/system/bin/qmuxd': Permission denied
1|[email protected]:/ $ su strace -ff -v -o /sdcard/straceqmuxd -s 256 /system/bin/qmuxd
sush: sush: - : unknown option
Can anyone point out where I'm going wrong or where I can learn how to troubleshoot these things?

Related

Someone have Orbot working?

I'm trying to setup orbot (rooted) but didn't work...
It give me an error: Couldn't start tor process, retrying...
In aLogcat show:
D( 226) setHidden false (KeyguardViewMediator) D( 6828) 10064 org.torproject.android executing 0 /system/bin/sh using shell /system/bin/sh : sh (su) D( 6831) 10064 org.torproject.android executing 0 /system/bin/sh using shell /system/bin/sh : sh (su) D( 6834) 10064 org.torproject.android executing 0 /system/bin/sh using shell /system/bin/sh : sh (su) F( 6838) stack corruption detected: aborted (/data/data/org.torproject.android/app_bin/tor)
and nothing else... that stack corruption detected error show every time that try to run tor.
Ive tried olders version and still... and i saw a guy posting the same error on a moto xoom.
nevermind...
that was a problem with busybox (i had it installed) but somehow wasnt working correctly.
so... busybox update and permission fix will solve it.

[DEV Q] script ain't working

hi,
im new to linux and need little help.
can anyone tell me why this script is not working. If all the lines are executed individually, works fine but when inside the script gives error
# ls -l | grep 'aishu'
ls -l | grep 'aishu'
-rwxrwxrwx root root 279 2011-10-12 02:38 aishuscript.sh
# pwd
pwd
/system/bin
# cat aishuscript.sh
cat aishuscript.sh
#!/system/bin/sh
su
echo "Script has been started"
renice -10 'pidof com.android.phone'
echo "phone done"
renice -10 'pidof com.android.systemui'
echo "ui done"
for pidacore in 'pidof android.process.acore'; do
$pidacore;
renice -10 $pidacore;
done;
echo "script over"#
# sh aishuscript.sh
sh aishuscript.sh
: not found
Script has been started
phone done
ui done
aishuscript.sh: 8: Syntax error: word unexpected
dear moderator
i have searched posts as mush as i could but couldn't find solution, and since this is coding related i think development is appropriate place to post it
well its disappointing 140 views no reply...
as far as i could go... its happening caz the for loop variable is taking "pidof" value as a string instead of integer. the same script is working fine in other shells. fix might be required in shell.
I tried this simpler for and seemed to work:
Code:
for pid in `pidof android.process.acore`; do
renice --10 $pid; done

[ADDON][NDK] Built the Android NDK for Android. Want to port a lot of GNU tools.

Hi,
For description, look here http://my-android-travels.blogspot.com/2012/02/android-build-system-ndk-toolchain.html and here http://my-android-travels.blogspot.com/2012/02/android-build-system-ndk-toolchain_21.html
https://docs.google.com/open?id=0B2qClbkV-4gpYWY5ZTE5NWYtYmU0ZC00MTAzLWIwN2MtNjQ4YTZmNzgyNTZj
Just place it on your sdcard, su, cd /, tar xzf /mnt/sdcard/ndk.tar.gz
When done, you find it in /data/local
I'm searching for people which wants to help me port in the first step the whole tools known as build-essential in debian. In a second step apt. If you are seeing yourself doing that, have the needed knowledge or the will to learn, please pm me
Have Fun
Ralph
I tried your NDK build on a 2.2 device (a Toshiba AC100) but, I run into a weird error when I try to run some of the executables:
Code:
/storage/home/t/data/local/bin $ file ./ar
./ar: symbolic link to `arm-linux-androideabi-ar'
/storage/home/t/data/local/bin $ ls -l ./arm-linux-androideabi-ar
-rwxr-xr-x 2 10035 10035 651482 Feb 20 20:47 ./arm-linux-androideabi-ar
/storage/home/t/data/local/bin $ file ./arm-linux-androideabi-ar
./arm-linux-androideabi-ar: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=0x5ee70e99463cef4692571cb07050ebf3819024ad, not stripped
/storage/home/t/data/local/bin $ strace ./arm-linux-androideabi-ar
execve("./arm-linux-androideabi-ar", ["./arm-linux-androideabi-ar"], [/* 16 vars */]) = -1 ENOENT (No such file or directory)
write(2, "strace: exec: No such file or dir"..., 40) = 40
exit(1) = ?
I cannot figure out why the command fails to run , and I'm hoping that you can help me out here,
try it on an android 4
also be sure that its located on an ext partition. put it into /data/local
Hi Ralph,
I'm running the binaries off an ext4 partition (and tried it from /data/local path(/data is ext4), as per the instructions). However, I don't have the luxury of using ICS. I'm stuck on FroYo as Toshiba no longer provides updates for my device , and doesn't release the sources either .
Could you give me some insight on why the binary will run on ICS, yet fail on FroYo?
Code:
/storage/home $ cd /data/local/bin/
/data/local/bin $ for i in arm-* ; do echo ------$i------- ; $i --help >/dev/null ; done
------arm-linux-androideabi-c++-------
------arm-linux-androideabi-cpp-------
------arm-linux-androideabi-g++-------
------arm-linux-androideabi-gcc-------
------arm-linux-androideabi-gcc-4.4.3-------
------arm-linux-androideabi-gcov-------
------arm-linux-androideabi-gdb-------
Segmentation fault
------arm-linux-androideabi-run-------
Segmentation fault
------arm-linux-androideabi-addr2line-------
sh: arm-linux-androideabi-addr2line: not found
------arm-linux-androideabi-ar-------
sh: arm-linux-androideabi-ar: not found
------arm-linux-androideabi-as-------
sh: arm-linux-androideabi-as: not found
------arm-linux-androideabi-gccbug-------
sh: arm-linux-androideabi-gccbug: not found
------arm-linux-androideabi-gprof-------
sh: arm-linux-androideabi-gprof: not found
------arm-linux-androideabi-ld-------
sh: arm-linux-androideabi-ld: not found
------arm-linux-androideabi-nm-------
sh: arm-linux-androideabi-nm: not found
------arm-linux-androideabi-objcopy-------
sh: arm-linux-androideabi-objcopy: not found
------arm-linux-androideabi-objdump-------
sh: arm-linux-androideabi-objdump: not found
------arm-linux-androideabi-ranlib-------
sh: arm-linux-androideabi-ranlib: not found
------arm-linux-androideabi-readelf-------
sh: arm-linux-androideabi-readelf: not found
------arm-linux-androideabi-size-------
sh: arm-linux-androideabi-size: not found
------arm-linux-androideabi-strings-------
sh: arm-linux-androideabi-strings: not found
------arm-linux-androideabi-strip-------
sh: arm-linux-androideabi-strip: not found
/data/local/bin $ mount |grep data
/dev/block/mmcblk3p5 on /data type ext4 (rw,nosuid,nodev,relatime,barrier=1,data=ordered)

Problem running BT5 on nexus 10

I've been trying to load back track 5 on my nexus 10 and this is the error message that I get when I attempt to run bt5.
[email protected]:/ $
[email protected]:/ $ cd /sdcard/bt5
[email protected]:/sdcard/bt5 $ su
[email protected]:/storage/emulated/legacy/bt5 # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/bt5/backtrack.img
Checking loop device... MISSING
Creating loop device... OK
mount: mounting /storage on /data/local/mnt/external_sd failed: Invalid argument
No user defined mount points
net.ipv4.ip_forward = 1
chroot: can't execute '/root/init.sh': No such file or directory
Shutting down Linux ARM
umount: can't umount /data/local/mnt/external_sd: Invalid argument
1|[email protected]:/storage/emulated/legacy/bt5 #
Can someone please help me with this?
Are you rooted?

Flashfire closes

I am trying to run flashfire. My device is rooted.
Here is some output from the lastlog log file:
Code:
[ERR] rm: can't remove '/sutmp/avb.img': No such file or directory
[ERR] dd: writing '/dev/block/mmcblk0p34': No space left on device
[ERR] 8193+0 records in
[ERR] 8192+0 records out
[ERR] 33554432 bytes (32.0MB) copied, 0.278370 seconds, 115.0MB/s
[ERR] cat: write error: Broken pipe
[ERR] umount: can't umount /su: Invalid argument
[ERR] BusyBox v1.22.1 static (2017-01-21 15:57 +0100) multi-call binary.
[ERR]
[ERR] Usage: losetup [-r] [-o OFS] {-f|LOOPDEV} FILE - associate loop devices
[ERR] losetup -d LOOPDEV - disassociate
[ERR] losetup -a - show status
[ERR] losetup -f - show next free loop device
[ERR]
[ERR] -o OFS Start OFS bytes into FILE
[ERR] -r Read-only
[ERR] -f Show/use next free loop device
[ERR]
[ERR] cat: can't open '/tmp/recovery.log': No such file or directory
[UI] - Done !
[OUT] ui_print
[UI]
[UI] Restoring recovery image backup...

Categories

Resources