I'm trying to connect a Centos 7 operating system to a Moto3G Android phone (running Android v6 - marshmallow)
libmtp is installed
Package libmtp-1.1.6-5.el7.x86_64 already installed and latest version
Nothing to do
Most of the searches on the Internet suggest using mtp-detect but in my case:
bash: mtp-detect: command not found
I can see the phone using dmesg
[ 6446.771306] usb 1-1.2: Product: XT1039
[ 6446.771309] usb 1-1.2: Manufacturer: motorola
I installed jmtpfs (using yum) which gives me the following
jmtpfs
No mtp devices found.
I tried installing go-mtpfs using GO but get the following
$ ./gopath/bin/go-mtpfs bob &
[1] 21633
$ 2017/05/03 13:06:18 detect failed: no MTP devices found
[1]+ Exit 1 ./gopath/bin/go-mtpfs bob
If anyone has any advice or suggestions on progressing this I'd be grateful.
Access Android MTP or Other MTP devices in CentOS 7 Linux OS
Install mtp libs and utilities in CentOS
Login as root and install fuse, jmtpfs, libmtp as following:
$yum install fuse, jmtpfs, libmtp
Steps to Mount/Load MTP formatted devices(e.g android 7 nougat)
Login as root Create a directory to mount MTP device:
$mkdir /media/mtp-device
Connect android device to the USB cable, Unlock the android phone, Swipe down from the top of the phone screen. You
should see a notification "USB ...", Tap that notification. You should
see a menu titled "Use USB to...", select "Transfer files(MTP)" Option...
To list all the available mtp devices(eg.
android 7 nougat), issue command jmtpfs in root session
$jmtpfs -l
each mtp device is listed with busnum, devnum information. Mount
device as below:
$jmtpfs -device=<busnum>,<devnum> /media/mtp-device #If this option not specified, then the first device found isused.
or
$jmtpfs /media/mtp-device #All files will be present in /media/mtp-device location,but it will be accessible to the root only.
2. Access/Copy Data from MTP device
Now you can access files of android devices mounted on
/media/mtp-device folder, but you cannot copy to other folder. To copy
files, you need to allow other user as below:
$jmtpfs -o allow_other ~/my-android7
Now you can copy the data from ~/my-android7 location to your folders.
3. Removing or Un-mounting the Device from Linux System
First un-mount the allow_other location
$fusermount -u ~/my-android7
Finally un-mount the device at root folder.
$fusermount -u /media/mtp-device
Related
I am trying to Interface a BLE module based on Nordic's nrf52840 to a Yocto based SBC, to which all the BlueZ related packages have been added.
I have flashed Zephyr's sample hci_uart program onto the module. The module seems to run perfectly on my Linux PC (BlueZ version 5.48), whereas on the SBC(BlueZ version 5.54) it fails to get inited. Here's the error that comes when I use
root#rb-imx6:~# hciconfig hci0 up
root#rb-imx6:~# Can't init device hci0: Cannot assign requested address (99)
Can anyone please help me out on this?
Thanks in advance.
The error of assigning an address is caused by missing Linux kernel configuration options:
CONFIG_CRYPTO_USER
CONFIG_CRYPTO_USER_API
CONFIG_CRYPTO_USER_API_AEAD
CONFIG_CRYPTO_USER_API_HASH
CONFIG_CRYPTO_AES
CONFIG_CRYPTO_CCM
CONFIG_CRYPTO_AEAD
CONFIG_CRYPTO_CMAC
This is likely to happen with a self-built Buildroot or Yocto Embedded Linux system. If you run into this error, you should enable above options and recompile the kernel.
See the BlueZ requirements here: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/README#n64
To see detailed debug output from BlueZ, run it with -d option:
bluetoothd -d
I am trying to run gym-gazebo on Google Colaboratory.
There is a problem to run gazebo server (gazebo without gui) on Colab.
There was warning on display: Unable to create X window. Rendering will be disabled but I think I fix it.
There also warning about sound card. not sure it related Unable to open audio device,
And there warning about conversion Conversion of sensor type[depth] not supported
Here is an example
Can you help?
In order to run gazebo in a headless mode you need to run gserver executable, instead of gazebo. Not sure which one is used by the gym-gazebo toolkit.
In order to still do rendering in gazebo server (e.g. camera view) you would need to use Xvfb (X Virtual Frame Buffer). It is an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory.
For your specific colab notebook I have changed last cell by adding
get_ipython().system_raw('Xvfb :1 -screen 0 1600x1200x16 &')
in order to create virtual display and added DISPLAY=:1.0 to the beginning of the last line, so it looked as follows
DISPLAY=:1.0 python gym-gazebo/examples/turtlebot/circuit2c_turtlebot_camera_dqn.py
DISPLAY=:1.0 tells X Window client used by gazebo to use virtual display we have created instead of default one :0.
A complete installation of Gazebo on colab and running it in headless server mode with rendering capability can be achieved the following way:
!curl -sSL http://get.gazebosim.org | sh # Install gazebo
!apt-get install -y xvfb # Install X Virtual Frame Buffer
get_ipython().system_raw('Xvfb :1 -screen 0 1600x1200x16 &') # create virtual display with size 1600x1200 and 16 bit color. Color can be changed to 24 or 8
!source /usr/share/gazebo-9/setup.sh && DISPLAY=:1.0 gzserver --verbose # Run gazebo and tell X client to use our virtual DISPLAY :1.0
There is also a way to run full gazebo in simulator with gzweb as a head and link to it using ngrok.io explained here as a fully working notebook. https://colab.research.google.com/drive/1A-miW8cTRKzs7B0m1m4enfiFySzBhsgN
You would need to authenticate to ngrok using your auth token which can be created at ngrok.com in order to connect, because it is lunch as background and doesn't print to cell
!./ngrok authtoken <token>
I am currently working on a project which aims to find out what the system is doing behind a series of user interaction on the android UI. For example, if user click send button in Facebook Messenger, the measured response time for such action is 1.2 seconds. My goal is to figure out what the 1.2 seconds consist of. My friend suggested that I should take a look into 'Systrace'.
However, when I tried systrace on my HTC one M8, I have encountered some problems:
First, error opening /sys/kernel/debug/tracing/options/overwrite - no such file or directory. I solved this problem by building up the support of the kernel following http://opensourceforu.com/2010/11/kernel-tracing-with-ftrace-part-1/ and mount -t debugfs none /sys/kernel/debug. Then I could find the tracing directory. Besides, I set ro.debuggable=1 in file default.prop within Ramdisk and burn the boot.img into my phone.
Now I encounter another problem: when I run - python systrace.py --time=10 -o mynewtrace.html sched gfx view wm, the following error(19) pop up: error truncating /sys/kernel/debug/tracing/set_ftrace_filter: No such device (19). I don't know if the way my building up kernel support for systrace is incorrect or anything is missing.
Could anyone helps me out with this problem, please?
I think I have worked out the solution. My environment is Ubuntu 16.04 + HTC one M8. I will write the steps as followed:
open terminal and enter: $adb shell
(1) $su (2) $mount -t debugfs none /sys/kernel/debug. Now you should be able to see many directories under /sys/kernel/debug/. (You may cd into /sys/kernel/debug to confirm this)
New a new terminal and enter: dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img to generate the boot.img kernel image from your device.
Use AndroidImageKitchen to unpack the boot.img and find the default.prop within Ramdisk folder. Then change ro.debuggable=0 to ro.debuggable=1. Repack the boot.img and flash boot it to your device.
Once the device boot, under terminal, enter: adb root and message like: restarting adbd as root may pop up. Disconnect the USB and connect again.
cd to the systrace folder, e.g. ~/androidSDK/platform-tools/systrace and use:
python systrace.py --time=10 -o mynewtrace.html sched gfx view wm
Now you may able to generate your own systrace files.
I just update Xcode 7.2 to 7.3. My app fetch and store files on icloud drive. If I run app on real device it works fine, if I run in the simulator (logged with my icloud account) the metadataQueryResults returns always 0 files.
Also the system app "iCloud Drive" cannot fetch or save icloud folders and files.
I tried Debug-->Trigger iCloud sync with no luck.
With xcode 7.2 and any simulator running iOS 8.x or greater worked fine.
Is it a xcode 7.3 bug?
Thanks,
Max
The issue is with OS X 10.11.4. Stay at OS X 10.11.3 or use the 10.11.5 beta.
Yes I got the same problem too after getting the latest Xcode 7.2 -> 7.3.
It looks like a problem with Apples background services crashing in the simulator and not telling its client i.e. the iCloud Drive or your app.
Even triggering an iCloud re-sync doesn't sort it so for the time being we have to debug on a real device which is a pain.
Looking in the system log via the simulator (Debug -> Open System Log), I see a lot of Sandbox (bird) access denied messages from the simulator which I guess are related to the issue - there is more info in some e.g.:
Process: bird [597]
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/CloudDocsDaemon.framework/bird
Load Address: 0x1085b8000
Identifier: bird
Version: ??? (???)
Code Type: x86_64 (Native)
Parent Process: launchd_sim [566]
User ID: 501
Date/Time: 2016-04-07 08:28:45.714 +0100
OS Version: Mac OS X 10.11.4 (15E65)
Report Version: 8
Thread 0:
0 libsystem_kernel.dylib 0x000000010aae21fa openbyid_np + 10
1 CloudDocsDaemon 0x00000001086f0664 -[BRCRelativePath _resolveAndKeepOpenMustExist:error:] + 872
etc.
I guess there are some permissions that have not been set on the file system that is used on the Mac backend for the simulator, but I've no idea how or what to change.
Do you get the same errors in your log when trying to use iCloud?
The only other thing I did recently was to install the latest Xamarin Studio, I hope that's not related but I doubt it.
Thanks
Matt
I have been working on this problem for several days and cannot find any other suggestions on-line.
I have an old Lucent server running a proprietary Unixware 2.1.3 that I want to access but do not know any of the passwords. By building a new install of 2.1.3 on a spare disk I have built my emergency boot diskettes and can boot and mount the old hard drive and edit the files. However, when I remove the hash from the /etc/shadow file:
root::10630::::::
daemon:NP:6445::::::
bin:NP:6445:::::: .....
The system still wants a password for root. Just Pressing Enter doesn't work.
I have also tried setting the /etc/passwd file to:
root::0:3:0000-Admin(0000):/:/usr/bin/ksh
daemon:x:1:12:0000-Admin(0000):/:
bin:x:2:2:0000-Admin(0000):/usr/bin:
with the same result.
Experimenting on the new install drive I get the same results, however on the new install I can log in as root and run "passwd -d root" and the system behaves as expected and does not prompt me for a password at login.
If it has any relevance, I notice that the /etc directory contains shadow, oshadow (which appears to be a backup of shadow) and shadow.em that contains entries for root, bin and sys. Ditto with the passed file. I have tried editing these files too, but with no success.
Finally, I tried editing the home directory for root in the passed file on the new install but when I logged in it made no difference. Is it possible that the system is using an alternate to passwd, and if so how do I determine which file it is?
Thank you in advance.
From a tek-tips post: http://www.tek-tips.com/viewthread.cfm?qid=1204328
The boot floppys must match the Intuity software release.
To reset the root password do the following:
MACH 3 & 4
• Bring Intuity up with the emergency boot floppy installed.
• When prompted for keyboard type, type 1
• Screen will then say "If you would like a host bus adapter loaded from a floppy, insert it now and type yes"
• Insert the HBA floppy and type yes .
NOTE: You must type the word yes or no, not y or n
• Screen will again ask for hba diskette- remove diskette and press
• A # Prompt will then appear, type passwd root
• Enter password but do not use the password that you will actually want to use.
• Type exit and press cnt-alt-delete when prompted making sure there are no diskettes in drive.
• After the Intuity is up, log in with new password and you will be immediately prompted to change password.
• Put in password that you actually want.
*NOTE: An ACCX (AYC22) card in the system can cause the floppy to not be read. Remove it and proceed.
MACH 5
• If the system is currently running, bring it down.
• Insert boot floppy #1 into the floppy drive.
• Boot the machine.
• Insert boot floppy #2 into the floppy drive when requested and press
• When the system displays the menu that asks if you want to "load the system, access the shell or reboot", select access the shell .
• At the shell prompt type: SHBOOT
• Navigate the menus that select the hardware (5P, 40P or 100P) and disk configuration (IDE or SCSI) for the machine you are recovering. This process loads the correct device drivers for access to the disk(s) on your machine.
• Mount the root filesystem; type: mount /dev/root /mnt
• Change the password; type: chroot /mnt /usr/bin/passwd root
• Enter the new password
You shouldn't need root though, stick with SA or VM