sm not found - General Questions and Answers

I connected to my car stereo (marshmallow)
so on the stereo in terminal i
su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
on the pc i
PS C:\users\jmread\desktop\platform-tools> adb connect 192.168.1.35:5555
already connected to 192.168.1.35:5555
PS C:\users\jmread\desktop\platform-tools> adb shell
[email protected]_tb_c_kk:/ $ sm list-disks
/system/bin/sh: sm: not found
127|[email protected]_tb_c_kk:/ $
???
i look in system/bin
cant see sm , or is it under sh - anyway it doesn't work - how do i install sm ?
device is rooted and has busybox installed.
any help please ?

Related

adb not working with N1 rooted?

hi,
two days ago i rooted my Nexus One FRF91-Vodafone with these two methods ( forum.xda-developers.com/showthread.php?p=7548842 and forum.xda-developers.com/showthread.php?t=736271). Still some commands of adb don't work and i can't find a solution.
Code:
C:\>cd android/tools
C:\android\tools>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT05EP800252 device
C:\android\tools>adb shell
$ su
su
# id
id
uid=0(root) gid=0(root)
# exit
exit
$ exit
exit
C:\android\tools>adb remount
remount failed: Operation not permitted
C:\android\tools>adb root
adbd cannot run as root in production builds
C:\android\tools>
as you can see the device is connected in debug mode and i am rooted but the commands "adb remount" and "adb root" don't work (and maybe some other commands? i don't know). does it happen because the bootloader is still locked? if so, is there a way to have those commands working without unlocking it? if not, what could it be?
sorry for my english
thanks a lot

[Q] TV BOX B351 android B351 rk31sdk

Hi can anyone please help with this Tv Box Quad-Core-Android-4-2-Rockchip-RK3188-Mini-PC-Smart- tv box works great the problem is some software need this box to be rooted i no how to connect to a pc shows up as a drive with folders here is the spec
* Android Device Brand rk31sdk
* Android Device Name PC Smart TV BOX Media Player
* Android Device Model B351 rk31sdk
* Android Version 4.2
* Build Number rk31sdk-eng 4.22 JDQ39/eng.linking.20140114.142223eng/test-keys
This is to help anyone with a similar device and I'll be brief;
First Install The Windows Drivers (you know, so you can actually talk to it)
i.e. from here... http://www.cnx-software.com/2013/11/08/simplified-method-to-install-rockchip-usb-drivers-in-windows-xp78/
If you have two Micro USB ports, work out which one is the power only v's the switchable USB guest / host one.
In setting, enable USB debug & then enable USB "connect to PC"
Windows should now detect and load the drivers for the device.
When the device is rebooted, you'll need to re-enable the "connect to PC" setting each time.
I found this package online that works for root but they left out of the script to copy the Super User App to the device. http://www.cnx-software.com/2013/03/19/how-to-root-rockchip-rk3188-mini-pcs/
The Archive Contains these files you'll need;
binary "su"
binary "SuperSU.apk"
binary "busybox"
binary "RootExplorer.apk"
It also contains the standard adb application
"TPSparkyRoot.bat" [modified] should contain;
Code:
@echo off
CD /D "%~dp0"
echo *---* VonDroid.com N101 II Root Tool based on work by sunnydavid *---*
echo --- Plug in your device, make sure debugging is enabled in Developer Options
echo --- This script will now copy files over to your N101 II
echo.
adb shell mv /data/local/tmp /data/local/tmp.bak
adb shell ln -s /data /data/local/tmp
adb reboot
echo --- Reboot 1/3 - Press Space Bar once the device has rebooted
pause
adb shell rm /data/local.prop > nul
adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
adb reboot
echo --- Reboot 2/3 - Press Space Bar once the device has rebooted
pause
adb shell id
echo --- If the ID shows as 0/root then continue, otherwise CTRL+C to cancel and start over
pause
adb remount
adb push su /system/bin/su
adb shell chown root.shell /system/bin/su
adb shell chmod 6755 /system/bin/su
adb push busybox /system/bin/busybox
adb shell chown root.shell /system/bin/busybox
adb shell chmod 0755 /system/bin/busybox
echo --- Installing SuperSU
adb push SuperSU.apk /system/app/SuperSU.apk
adb shell chown root.root /system/app/SuperSU.apk
adb shell chmod 0644 /system/app/SuperSU.apk
adb push RootExplorer.apk /system/app/RootExplorer.apk
adb shell chown root.root /system/app/RootExplorer.apk
adb shell chmod 0644 /system/app/RootExplorer.apk
echo Completing Root
adb shell rm /data/local.prop
adb shell rm /data/local/tmp
adb shell mv /data/local/tmp.bak /data/local/tmp
adb reboot
echo echo --- Reboot 3/3 - Your N101 II should now be rooted
pause
echo on
aboxy said:
Hi can anyone please help with this Tv Box Quad-Core-Android-4-2-Rockchip-RK3188-Mini-PC-Smart- tv box works great the problem is some software need this box to be rooted i no how to connect to a pc shows up as a drive with folders here is the spec
* Android Device Brand rk31sdk
* Android Device Name PC Smart TV BOX Media Player
* Android Device Model B351 rk31sdk
* Android Version 4.2
* Build Number rk31sdk-eng 4.22 JDQ39/eng.linking.20140114.142223eng/test-keys
Click to expand...
Click to collapse
Did you find rom for this version ? searching for Build Number rk31sdk-eng 4.22 JDQ39
Gonna try this now have the exact same model no.
Sent from my GT-I9505 using XDA Free mobile app

Recovering mmssms.db via ADB on Xperia with broken screen

Hi Guys,
My phone's screen has broken and I can't see anything, although the touch still works. I have been able to connect it to the PC to take my music and photos off the internal storage, and my contacts are backed up to Google, but my texts are not and I'd like to recover them.
I've read that they normally reside in /data/data/com.android.providers.telephony/databases/mmssms.db and I should be able to pull this via ADB.
When the phone is booted to the OS it is not detected by ADB at all with 'error: device not found'. I thought USB debugging was on, but obviously not. I can boot to recovery (custom CWM) and now adb will connect to the device. However, when I try to pull the sms db I get 'No such file or directory'
Code:
[email protected] ~ $ sudo adb start-server
[sudo] password for james:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected] ~ $ adb shell
error: device not found
[email protected] ~ $ adb devices
List of devices attached
[email protected] ~ $ adb devices
List of devices attached
CB5122TH5B device
[email protected] ~ $ adb shell
~ # mkdir /mnt/sdcard/tmp
~ # cat /data/data/com.android.providers.telephony/databases/mmssms.db > /mnt/sdcard/tmp/mmssms.db
cat: can't open '/data/data/com.android.providers.telephony/databases/mmssms.db': No such file or directory
~ # su cat /data/data/com.android.providers.telephony/databases/mmssms.db > /mnt/sdcard/tmp/mmssms.db
cat: can't open '/data/data/com.android.providers.telephony/databases/mmssms.db': No such file or directory
/sbin/sh: su: not found
~ # exit
[email protected] ~ $ adb pull su /data/data/com.android.providers.telephony/databases/mmssms.db
remote object 'su' does not exist
~ # ls /data
~ #
It would appear the directory /data is empty but I bet that's because I don't have permissions to view the contents. I'm guessing this is also why su is not found.
Can anyone help me to get over this hurdle? Please bear in mind I'm not familiar with ADB and not great in a Linux shell either; the above commands took a bit of reading to find, but I do understand what they're trying to do.
My phone is a Sony Xperia T LT30p and is rooted running Xperiment 3.5 and Clockworkmod recovery 6.0.4.6 and I'm running ABD on Linux.
Any help would be appreciated! Cheers :good:

busybox ls --color and many other commands "Working"

have you got bored of your one Text colored terminal ?
when you look at the results you always are confused ?
well .. you came into the right thread
I'm here today to show you how to make every busybox command fully functional
I was trying to make this command work but no success
Code:
#ls --color=always
then i ended up making busybox fully functional
Note: you must have rooted device and custom recovery and SDK tools " incase you don't have adb.rar "and your phone developer mode and USB debugging checked .
go to your SDK tools press sheft and right mouse click and open cmd here
________________________________________________________________________
now .. lets get to it shall we ?
1 - reboot into recovery and connect your device in your PC
2 - type in these commands in your PC command prompt you opened in order :
Code:
# adb shell
# mount system
# cp /system/bin/sh /sdcard/Download/sh
#adb reboot
3 - reboot your device
4 - download this busybox app and start it
jrummy.busybox.installer
5 - you'll see in the app's INSTALLER icon a location /system/xbin
change it to /system/bin
6 - open app's settings "upper right corner beside the three dot's" and check all what's in the installer settings
7 - press back and click install " your phone will boot into recovery and install the busybox "
8 - after finishing the process your device will reboot normally but wait a minute !!! SU is not working anymore :crying:
9 - reboot your device again into recovery !! " I'll try to fix it for you "
10 - type in these commands in order :
Code:
#adb shell
#mount system
#cp /sdcard/Download/sh /system/bin/sh
#chmod 755 /system/bin/sh
#adb reboot
and we are done
look at the attachment below this is how your terminal will look like and error free
I'm sorry about this post
apparently I was kinda mistaken
I think what happens that lead to this is
when you write down the applet's name in terminal the device start to search inside bin file first .. if the applet was not found in bin .
the device will start to search on xbin file and maybe the whole storage for that command
so .. since there are some applets in bin are the same one in busybox and I was able to locate them "took me like an hour to do so"
and these applets are :
Code:
[COLOR="blue"]blkid
brctl
cat
chmod
chown
clear
cmp
cp
date
dd
df
dmesg
du
grep
gzip
hd
id
ifconfig
insmod
ionice
ip
kill
ln
ls
lsmod
lsof
mkdir
mke2fs
mknod
mkswap
mount
mv
netstat
nohup
ping
ping6
printenv
ps
readlink
reboot
renice
rm
rmdir
rmmod
route
sh
sleep
swapoff
swapon
sync
top
touch
tune2fs
umount
uptime[/COLOR]
there are a lot of difference in results between the factory applets and the busybox applets
if you want to see the difference install busybox in /system/xbin and in terminal type one of these applets above like this :
for busybox applets result :
Code:
busybox [I][COLOR="blue"]applet[/COLOR][/I]
for system applets result :
Code:
[I][COLOR="Blue"]applet[/COLOR][/I]
it might not be a new thing but for me it is
I just wanted to share that info for the ones who doesn't know
Edit : there is also one applet in system/xbin which is " nc "
thanks .

Permission denied [cat /proc/partitions]

Dear all,
The Redmi S2 is
- rooted;
- bootloader unlocked;
- oem unlocked;
- on PTP default (Photo transfer).
In ADB debugging,
C:\platform-tools>adb shell
ysl:/ $ cat /proc/partitions
cat: /proc/partitions: Permission denied
How to solve it?
Thanks in advance.
Regards,
Run cmd in Android shell's root mode
Code:
adb shell 'su -c "cat /proc/partitions"'
xXx yYy said:
Run cmd in Android shell's root mode
Code:
adb shell 'su -c "cat /proc/partitions"'
Click to expand...
Click to collapse
Thanks for the reply.
After "adb root", it prompts "adbd cannot run as root in production builds".
And installation of an app "adbd insecure" as below, it produced the same result.
[2014.11.10][ROOT] adbd Insecure v2.00
adbd Insecure lets you run adbd in root mode if your device is rooted. (Note that if you are running a custom kernel, it is likely that it already implements this functionality) If you are running a stock (made by the phone manufacturer) kernel...
forum.xda-developers.com
But "adb shell" apparently works.
On production builds the ADBD server on phone doesn't use root permission. You can't change this.
Simply try what suggested by me.
xXx yYy said:
On production builds the ADBD server on phone doesn't use root permission. You can't change this.
Simply try what suggested by me.
Click to expand...
Click to collapse
I just tried your code in CMD. It returns as follows:
C:\platform-tools>adb shell 'su -c "cat /proc/partitions"'
/system/bin/sh: su -c cat /proc/partitions: not found
That's a complete other issue.
Under "adb shell su", after granting the super privilege, AND then "cat /proc/partitions", I was able to view the partitions.
Thanks.

Categories

Resources