[Q] openssh-server on Ubuntu Touch - Ubuntu Touch Q&A, Help & Troubleshooting

Dear all,
I installed Unbuntu Touch on my Nexus 4 yesterday (18.09.2013, with the build 20130917.1). It is working more or less, as expected :silly:
One of the problem I am facing is that the ssh server is not working. I could install (and --reinstall) it without problem (apt-get install openssh-server ssh), but if I check with "ps -ef|grep ssh") I only see the ssh-agent and the connection from another computer is not working.
Any idea?
Best regards,
Pierre
[email protected]:/# apt-get install --reinstall openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/231 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 38659 files and directories currently installed.)
Preparing to replace openssh-server 1:6.2p2-6 (using .../openssh-server_1%3a6.2p2-6_armhf.deb) ...
Unpacking replacement openssh-server ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
WARN: / is world writable!
WARN: / is group writable!
Setting up openssh-server (1:6.2p2-6) ...
[email protected]:/#
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.69 port 22: No route to host
[email protected]:/home/phablet/Downloads# ps -ef | grep ssh
phablet 739 711 0 09:11 ? 00:00:00 ssh-agent

I just noticed that I have the same problem...
If I had time I would look at it, too, but right now I have other things to do...

To98 said:
I just noticed that I have the same problem...
If I had time I would look at it, too, but right now I have other things to do...
Click to expand...
Click to collapse
Same problem here. ssh to another device is possible, but no acces to phablet.

Same In GNex
try
sudo service ssh start
(if you are root or not you must use sudo)
but it does not automatically start when reboot

Still not wokring
[email protected]:/# service ssh start
ssh start/running, process 5890
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.69 port 22: No route to host
[email protected]:~$ ps -ef|grep 5890
vmalep 12613 12544 0 13:00 pts/4 00:00:00 grep --color=auto 5890

chaoskernel said:
try
sudo service ssh start
(if you are root or not you must use sudo)
but it does not automatically start when reboot
Click to expand...
Click to collapse
thank you! installed version 57 and used
sudo service ssh start
work fine!

Related

[Q] Second Camera?

Good day...
Im wanting to connect a USB camera to my ViewSonic G Tablet... I have 3 different USB models. When I plug them in (individually,) I get the /dev/video0 device but I don't seem to be able to use the device...
Why a second camera? I'm thinking I can use my G Tab in my car with a USB camera connected for a Baby Cam (since the baby faces the other way so I can't see and most of my traveling is at night so the normal mirror won't work unless I blind the poor child...) -- In theory, it could be used as a backup camera as well. (Same effect)
The internal camera works, but I don't need to see myself, I'd rather see something behind me.
Ideas?
I've scoured the Forums in more detail... Several ask the questions and someone made it work on the Nook, but it looked Nook specific. =/
Is there a more appropriate place to ask? This would affect all Android Devices that have a USB Host Port...
Now, the G Tablet, VEGAn mod at least... has the UVC Driver for WebCams. When I plug a camera in I get the /dev/video0 device (which doesn't exist until I plug in a camera.) - could it be permissions or is the driver not fully implemented?
The mplayer app that was released sets the root path to /sdcard so I can't point it at /dev/video0... I've tried to use the stream part, but it just exits the video - no error that I can see...
adamsoutherland said:
Now, the G Tablet, VEGAn mod at least... has the UVC Driver for WebCams. When I plug a camera in I get the /dev/video0 device (which doesn't exist until I plug in a camera.) - could it be permissions or is the driver not fully implemented?
Click to expand...
Click to collapse
The device appearing is a good first sign. Can you get me a dmesg output after you've plugged the webcam in? Run a Terminal Emulator app, then type in the window:
Code:
$ [B]dmesg > /mnt/sdcard/dmesg.txt[/B]
The mplayer app that was released sets the root path to /sdcard so I can't point it at /dev/video0... I've tried to use the stream part, but it just exits the video - no error that I can see...
Click to expand...
Click to collapse
Is this app an Android port of the standard mplayer for Linux? If yes, then it will use the V4L (Video 4 Linux) API to grab video frames, and if you can start it on the command line (or supply an input file name), then you can try "tv://" as the input file name.
Run this command first, though, to give everybody read-write access to /dev/video0:
Code:
$ [B]su[/B]
# [B]chmod 666 /dev/video0[/B]
I'm attaching a dmesg prior to plugging in the camera, and one after... I'm also inserting the text of the "diff" in the post...
Code:
[ 189.574313] usb 1-1.1: new high speed USB device using tegra-ehci and address 3
[ 189.657223] usb 1-1.1: New USB device found, idVendor=18ec, idProduct=3299
[ 189.664506] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 189.671944] usb 1-1.1: Product: USB2.0 PC CAMERA
[ 189.677125] usb 1-1.1: Manufacturer: ARKMICRO
[ 189.685907] usb 1-1.1: configuration #1 chosen from 1 choice
[ 189.695760] uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:3299)
[ 189.708989] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[ 189.732392] input: USB2.0 PC CAMERA as /devices/platform/tegra-ehci.2/usb1/1-1/1-1.1/1-1.1:1.0/input/input7
[ 190.318832] SO340010: gpio_val=0xc0a50000, button_val = 0xdbaf0002
[ 190.445387] SO340010: gpio_val=0xc0a50000, button_val = 0xdbaf0000
and this:
Code:
/data/data/berserker.android.apps.sshdroid/home # ls -lh /dev/vid*
crw-rw---- 1 0 1006 81, 0 Sep 2 18:22 /dev/video0
I've also done this:
Code:
/data/data/berserker.android.apps.sshdroid/home # chmod 666 /dev/video0
/data/data/berserker.android.apps.sshdroid/home # cat /dev/video0 /mnt/sdcard/test.mpg
cat: read error: No such device
/data/data/berserker.android.apps.sshdroid/home # ls -lh /dev/vid*
crw-rw-rw- 1 0 1006 81, 0 Sep 2 18:22 /dev/video0
/data/data/berserker.android.apps.sshdroid/home #
The mplayer was an APK from someone on the forums... I've opened it up only to find a "mplayer.so" as I thought it might contain the mplayer binary... (I don't have a machine (with sufficient space) to load the Android SDK at the moment...) (It's on my todo list.)
Am I right to try "cat /dev/video0" before I find the proper mplayer or event ffmpeg binary? (It generally works in linux when I do it...)
PS - I have 3 WebCams, I can give you a dmesg of each one if you need it... They all appear to do the same thing (they are by different manufacturers... iMicro, Sabrent and Agama.) -- also note that these 3 web cams work in Linux (each slightly different, but they work.)
adamsoutherland said:
The mplayer was an APK from someone on the forums... I've opened it up only to find a "mplayer.so" as I thought it might contain the mplayer binary... (I don't have a machine (with sufficient space) to load the Android SDK at the moment...) (It's on my todo list.)
Click to expand...
Click to collapse
Attach the APK so I can have a look at it.
Am I right to try "cat /dev/video0" before I find the proper mplayer or event ffmpeg binary? (It generally works in linux when I do it...)
Click to expand...
Click to collapse
I'm surprised that that works even on standard Linux! You have to setup the frame capture parameters first using ioctl()s before you can start reading data from /dev/video0. Even after that, you get raw frame data, and not mpeg video from the device.
PS - I have 3 WebCams, I can give you a dmesg of each one if you need it... They all appear to do the same thing (they are by different manufacturers... iMicro, Sabrent and Agama.) -- also note that these 3 web cams work in Linux (each slightly different, but they work.)
Click to expand...
Click to collapse
Attach all the 3 webcams to your desktop machine, check that each one works and get me a dmesg and a lsmod command output for each one. I want to see what drivers are loaded for each one. We'll have to load the same drivers on the gTablet too after compiling them.
Code:
[I]Attach Camera1 and make sure its working, then,[/I]
desktop$ [B]dmesg > dmesg1.txt[/B]
desktop$ [B]lsmod > lsmod1.txt[/B]
[I]Attach Camera2 and make sure its working, then,[/I]
desktop$ [B]dmesg > dmesg2.txt[/B]
desktop$ [B]lsmod > lsmod2.txt[/B]
[I]Attach Camera3 and make sure its working, then,[/I]
desktop$ [B]dmesg > dmesg3.txt[/B]
desktop$ [B]lsmod > lsmod3.txt[/B]
Caveats: Even if we get all the drivers to load on the gTablet (the V4L drivers, the main camera driver, and, possibly, its support drivers), we still have the problem of displaying the video stream on Android. While I'm happy to write whatever systems code is required, writing the Java UI code for the Android app is beyond my ken. We'll have to ask someone else (try in the main Android development forums on XDA, or, ask user herbert1 here who's helped out before with custom Java apps) once we've checked that we can read data from the V4L device (I'll send you a test prog which'll output .jpg files once every second once we have the drivers sorted out).
It would be great if someone has already ported mplayer for Android.
I'm attaching the APK I found...
Side note:
After looking deeper at 'cat /dev/video0'; it does not work with these webcams... I think this works on my TV Cards that natively displayed mpeg2 video (it's been a while).
See the attached dmesg-*.txt and lsmod-*.txt. Each is named after the company logo on the camera. (I can get the model numbers if the dmesg isn't enough.) Between each dmesg I rebooted the linux box for clarity. (They can all work at once, but I get confused on what is doing what.)
The command I used to test:
Code:
ffmpeg -f alsa -i hw:0,0 -f video4linux2 -s 320x240 -i /dev/video0 test-agama.mpg
(Each of these cameras has audio - The audio is not important for what I am attempting to do...)
About the UI... I've been avoiding this but it maybe time to start work on this =P -- I just realized that the box I'm testing the cameras on has space... I may have to reload linux for 64bit but then I can install the Android SDK and get to UI Development.
All three webcams seem to depend on only 3 kernel modules: uvcvideo, videodev and v4l1_compat.
If all 3 drivers are loaded on the gTablet too, then we should be able to get the video frames from /dev/video0 (or whatever the device).
I'll send you a test program this evening. In the mean time...:
That .apk file contains the application too--the classes.dex file contains the Dalvik executable bytecode. Just install the .apk, then run the app and provide a file name as input. Try "tv://" as the file name once all 3 drivers have been loaded. Do the "chmod 666 /dev/video0" before running the app.
Try the webcam test program in the attachment. The program reads from a user-specified V4L device and outputs JPEG images until you stop it with CTRL-C. Run as:
Code:
$ [B]su[/B] [I]Become superuser[/I]
# [B]mkdir /mnt/sdcard/tmp[/B] [I]Make a tmp dir. for storing imgs[/I]
# [B]./webcam -o /mnt/sdcard/tmp[/B] [I]Capture webcam images until stopped with CTRL-C[/I]
Get usage instructions with "./webcam --help".
EDIT: I actually didn't test the program out because I couldn't locate my webcam. Report if you encounter any bugs.
Quick Update:
I will be trying this tonight... I've been busy trying to get things done. (Little one is going to be born tomorrow!)
Sorry I haven't been able to respond sooner...
rajeevvp said:
Try the webcam test program in the attachment. The program reads from a user-specified V4L device and outputs JPEG images until you stop it with CTRL-C. Run as:
Code:
$ [B]su[/B] [I]Become superuser[/I]
# [B]mkdir /mnt/sdcard/tmp[/B] [I]Make a tmp dir. for storing imgs[/I]
# [B]./webcam -o /mnt/sdcard/tmp[/B] [I]Capture webcam images until stopped with CTRL-C[/I]
Get usage instructions with "./webcam --help".
EDIT: I actually didn't test the program out because I couldn't locate my webcam. Report if you encounter any bugs.
Click to expand...
Click to collapse
I copied it to /mnt/asec (because I can execute things there without remount)
When I run it, i get:
Code:
/mnt/asec # ./webcam -o /mnt/asec/tmp -d /dev/video0
./webcam: error getting video channel info. Invalid argument
I tried without the -d /dev/video0 and got the same result.
(Sorry for the LOOONG delay... Turns out a newborn takes more time and energy than I expected. I'm just now figuring that out... =P It's worth it though.)
Try this simple USB Webcam test app in the attachment which works on VEGAn-Tab 7.1 and GtabComb* (which have the pershoot kernel).
1. Plug the USB webcam in.
Assuming the kernel you're running has the correct USB webcam drivers compiled in--and, most of them do seem to have the V4L subsystem and the UVC camera drivers (which supports a lot of the common USB webcams) built into the kernel--you should see a new /dev/video0 device file pop up.
2. Run these commands to set correct permissions and owners on the device file (some ROMs--eg. GtabCombOver--don't need it):
Code:
$ [B]su[/B]
# [B]chown system.camera /dev/video0[/B]
# [B]chmod 660 /dev/video0[/B]
(Note that if you unplug and replug the webcam, you'll have to re-run the commands on ROMs which don't set the correct permissions and owners.)
3. Now install and run the SimpleWebCam app.
If, for some reason, no /dev/video0 device is created, then your webcam may need different device drivers, which have not been compiled in (or not been written!), in which case you'll have to compile a new kernel with the correct drivers either built-in or as loadable modules. Nothing else described in this post will need change.
adamsoutherland said:
When I run it, i get:
Code:
/mnt/asec # ./webcam -o /mnt/asec/tmp -d /dev/video0
./webcam: error getting video channel info. Invalid argument
I tried without the -d /dev/video0 and got the same result.
Click to expand...
Click to collapse
Looks like I'll have to update the code to make the program use the V4L2 API instead.
Nexus 7
Just tested this on my Google Nexus 7 tablet and it worked fine, I didn't have to modify the permissions either,
PS, it is rooted, of sure if that makes much difference, will test it on my friends stock nexus 7 tomorrow
USB Camera App
I was able to get the app working on my rooted Nexus 7 4.2 and an unrooted Galaxy SIII . How hard would it be to add a video record function to the app?
droidoso said:
How hard would it be to add a video record function to the app?
Click to expand...
Click to collapse
If you want to do that, then it's better to compile a custom native camera-interface library which makes the USB webcam appear as a standard camera (--the rear one, usually). Then, you can use the standard apps to record videos.
See this thread for a precompiled binary and for the source.

[Q] Apple Mac OSX & Support for MTP

I have spent many hours traulling the net, scanning through forums across multiple websites and found no information on how to make my device which in its current software incarnation currently seems to only allow MTP as the option for transferring data via the USB cable to and from my Mac running OSX 1.7.3.
Please note, that that google app for file transfers DOES NOT WORK (for me). I cannot get it to work no matter which god I've prayed to or what kinda dance I did. So I looked for alternatives.
ADB worked, but I got tired of ADB to push files across (which is effective, but not what I would call fun). I came across MacPort, giving us ports of Linux/Unix stuff in the world of OSX. YAY!
Found that the various libraries for MTP and MTP-FS was ported! YAY!
After installing the hell out of macport (found: www macports org) and runing the updates.
Drop to the command line and then run these commands once:
Code:
sudo port install libmtp
sudo port install mtpfs
Every time you load your device:
Code:
sudo mtpfs
Awesome! Progress, plug in the device and run mtpfs. But then I get this:
Code:
bergenmacbook:Applications bergenlarsen$ sudo mtpfs
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1/S2/GT-N7000/Galaxy Nexus.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1/S2/GT-N7000/Galaxy Nexus (04e8:6860) @ bus 250, dev 6
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): Operation timed out
outep: usb_get_endpoint_status(): Operation timed out
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device -208647360
I'm running MIUI v4 (2.4.13) with Siyah Kernel (currently 3.1RC5).
Help?
BergenLarsen said:
I have spent many hours traulling the net, scanning through forums across multiple websites and found no information on how to make my device which in its current software incarnation currently seems to only allow MTP as the option for transferring data via the USB cable to and from my Mac running OSX 1.7.3.
Please note, that that google app for file transfers DOES NOT WORK (for me). I cannot get it to work no matter which god I've prayed to or what kinda dance I did. So I looked for alternatives.
ADB worked, but I got tired of ADB to push files across (which is effective, but not what I would call fun). I came across MacPort, giving us ports of Linux/Unix stuff in the world of OSX. YAY!
Found that the various libraries for MTP and MTP-FS was ported! YAY!
After installing the hell out of macport (found: www macports org) and runing the updates.
Drop to the command line and then run these commands once:
Code:
sudo port install libmtp
sudo port install mtpfs
Every time you load your device:
Code:
sudo mtpfs
Awesome! Progress, plug in the device and run mtpfs. But then I get this:
Code:
bergenmacbook:Applications bergenlarsen$ sudo mtpfs
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1/S2/GT-N7000/Galaxy Nexus.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1/S2/GT-N7000/Galaxy Nexus (04e8:6860) @ bus 250, dev 6
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): Operation timed out
outep: usb_get_endpoint_status(): Operation timed out
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device -208647360
I'm running MIUI v4 (2.4.13) with Siyah Kernel (currently 3.1RC5).
Help?
Click to expand...
Click to collapse
Tried installing gvfs-gphoto2 and nautilus?
Read more here:
How To: Fix Samsung Galaxy Nexus MTP File Transfer for Ubuntu GNU/Linux 11.10

commandline tips ?

hi, i installed sshdroid on my galaxy s2 so i am wondering if there is any way to mess around with anything like start a fone call or send a text message from the terminal ?
i am looking for programs like netcat, sshfs, aplay, ... but none can be found.
i also notice this (not sure why):
Code:
/data/data/berserker.android.apps.sshdroid # ps auxw | grep tv
2594 system 0:59 /system/bin/tvoutserver
has anybody done anything cool from the android command line ?
is there someway i can run com.cooliris.media from the commandline ?
schneidz said:
hi, i installed sshdroid on my galaxy s2 so i am wondering if there is any way to mess around with anything like start a fone call or send a text message from the terminal ?
i am looking for programs like netcat, sshfs, aplay, ... but none can be found.
i also notice this (not sure why):
Code:
/data/data/berserker.android.apps.sshdroid # ps auxw | grep tv
2594 system 0:59 /system/bin/tvoutserver
has anybody done anything cool from the android command line ?
is there someway i can run com.cooliris.media from the commandline ?
Click to expand...
Click to collapse
I don't know what sshdroid does, but for sure you can use terminal emulator or adb shell to launch apps.
The "am" command can be used to launch applications.
The example below is to open Email app:
Code:
su
Code:
am start com.android.email
to dig in more:
http://forum.xda-developers.com/showpost.php?p=30175170&postcount=3
easy for sms less easy to make a direct call:
Code:
su
Code:
service call phone 2 s16 "123456789"
where 123456789 is the number you want to call
fyi, sshdroid turns your fone into an ssh server so i can log into my fone via wifi from my fedora machine and use an actual keyboard to issue commands instead of an on-screen keyboard.
its also useful for things like scp/sftp... i can mount the fones harddrive/sd-card with sshfs on my pc but i cant mount my pc's harddrive to the fone with sshfs. is there a solution for this yet (i think the problem is that there is no fuse module for android yet) ?
this is weird:
Code:
~ # am start com.cooliris.media
sh: am: not found
~ # which am
/system/bin/am
~ # /system/bin/am start com.cooliris.media
sh: /system/bin/am: not found
~ # whoami
root
~ # service call phone 2 s16 "0151234567"
Result: Parcel(
0x00000000: ffffffff 00000022 006e004f 0079006c '...."...O.n.l.y.'
0x00000010: 00530020 0061006d 00740072 00610063 ' .S.m.a.r.t.c.a.'
0x00000020: 00640072 00410020 00490050 006d0020 'r.d. .A.P.I. .m.'
0x00000030: 00790061 00610020 00630063 00730065 'a.y. .a.c.c.e.s.'
0x00000040: 00200073 00490055 00430043 00000000 's. .U.I.C.C.....')
made a little bit more progress:
Code:
/system/bin/am start com.cooliris.media
Starting: Intent { act=android.intent.action.VIEW dat=com.cooliris.media }
Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=com.cooliris.media flg=0x10000000 }
schneidz said:
fyi, sshdroid turns your fone into an ssh server so i can log into my fone via wifi from my fedora machine and use an actual keyboard to issue commands instead of an on-screen keyboard.
its also useful for things like scp/sftp... i can mount the fones harddrive/sd-card with sshfs on my pc but i cant mount my pc's harddrive to the fone with sshfs. is there a solution for this yet (i think the problem is that there is no fuse module for android yet) ?
this is weird:
Code:
~ # am start com.cooliris.media
sh: am: not found
~ # which am
/system/bin/am
~ # /system/bin/am start com.cooliris.media
sh: /system/bin/am: not found
~ # whoami
root
~ # service call phone 2 s16 "0151234567"
Result: Parcel(
0x00000000: ffffffff 00000022 006e004f 0079006c '...."...O.n.l.y.'
0x00000010: 00530020 0061006d 00740072 00610063 ' .S.m.a.r.t.c.a.'
0x00000020: 00640072 00410020 00490050 006d0020 'r.d. .A.P.I. .m.'
0x00000030: 00790061 00610020 00630063 00730065 'a.y. .a.c.c.e.s.'
0x00000040: 00200073 00490055 00430043 00000000 's. .U.I.C.C.....')
Click to expand...
Click to collapse
Informative.. thanks!!

[Q] HELP: Android USB debug mode works in Windows not in Ubuntu

The Android device in question is a Micromax A87(a relatively unknown brand in global market but I hope that should'nt matter).
In Ubuntu, I have double checked the udev rules. They all look perfect. (I cross checked using another phone too). The USB debug mode doesn't show up no matter what. And I have the adb_usb.ini in the right place. I have tried running all possible combinations of running
adb, adb start-server as root. But
Code:
adb devices
shows no devices at all.
However, with the USB debugging option enabled on phone, it worked on Win7 after windows installed a Common handset driver.
Now the interesting part.
If I go back to Ubuntu without disconnecting the cable and do
Code:
$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
[B]1234567890ABCDEF[/B] device
The product id is 1234567890ABCDEF and I am able to see it and everthing works fine!!
But the moment I disconnect the USB cable, its gone.
So I guess it's not the development machine that is at fault. The device seems to be setting a property while in Windows which stays latched till the usb connection goes off.
What could be a way to get this to work? (Besides developing on Windows :silly: )
Btw the
Code:
/data/property/persist.service.adb.enable
is 1 too.
What is your computer setup? Are you using a Windows machine, with Ubuntu in a vm? Dual-boot? Other?
My setup:
Dual boot.
Ubuntu 12.04 and Windows 7.
Ok, how about if you plug in the USB with the computer's power off, then boot into Ubuntu?
i have the clone of this phone. mine is Mito A78.
lsusb command shows it as 1c9e:9e08
so idVendor =1c9e and idProduct = 9e08
for now, what you say (plugin to windows and reboot to ubuntu without unplug the phone) is the solution.
i will see if lsusb output still the same.
okay, have checked on windows pc, it should be switched to idVendor =1c9e and idProduct = 9e18
anyway, what you say is a clue that the solution may be around usb_modeswitch and modem manager
further search on usb_modeswitch 1c9e 9e08 found the solution here: http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=1351
have tried, but not yet switched to idVendor =1c9e and idProduct = 9e18
have to find the correct rules on /etc/usb_modeswitch.d/1c9e:9e08
Code:
########################################################
# Mito A78
DefaultVendor=0x1c9e
DefaultProduct=0x9e08
TargetVendor=0x1c9e
TargetProduct=0x9e18
SierraMode=1
CheckSuccess=20
NoDriverLoading=1
found it.
after writing the rules, insert
Code:
# Mito A78
ATTR{idVendor}=="1c9e", ATTR{idProduct}=="9e08", RUN+="usb_modeswitch '%b/%k'"
to /lib/udev/rules.d/40-usb_modeswitch.rules
i than have to run
Code:
sudo usb_modeswitch -v 0x1c9e -p 0x9e08 -S -R -W
and then the phone switched to idVendor =1c9e and idProduct = 9e18 and adb can access the phone.
:good: :good: :good:
I-mobile IQ 5.1 has same issue, but adb still can't see device
The usb_modeswitch is exactly the same for this phone (same usb vid/pid). However adb still doesn't find the phone under Windows and Ubuntu. lsusb shows the product id switch did work and it all looks right.
Under windows it spins up a cdrom device from the phone so you can install the windows drivers (this lives as an *.iso file under /system); after the driver install, you get the adb device in device manager and two com ports,with all devices having a pid of 9e18 (original 9e08). However adb does not see the device!
I recon there is something wrong on the phone side. This is a very new phone (only release about 5 days ago), so I suspect this is one of the early release bugs...
Since I don't even have a custom recovery for it (CWM, etc) I can even backup my phone and try and do a factory reset.
Looks like a low level USB issue
Switched on tracing on adbd on the phone side. Looks like a phone/usb low level issue:
Code:
--- adb starting (pid 14270) ---
system/core/adb/adb.c::main():Handling main()
system/core/adb/adb.c::adb_main():Local port disabled
system/core/adb/usb_linux_client.c::usb_init():failed to open /dev/android_adb_enable
system/core/adb/usb_linux_client.c::usb_init():[ usb_init - starting thread ]
system/core/adb/adb.c::adb_main():adb_main(): pre init_jdwp()
system/core/adb/jdwp_service.c::jdwp_control_init():jdwp control socket started (5)
system/core/adb/adb.c::adb_main():adb_main(): post init_jdwp()
system/core/adb/adb.c::adb_main():Event loop starting
system/core/adb/usb_linux_client.c::usb_open_thread():[ usb_thread - opening device ]
system/core/adb/usb_linux_client.c::usb_open_thread():[ opening device succeeded ]
system/core/adb/usb_linux_client.c::usb_open_thread():[ usb_thread - registering device ]
system/core/adb/transport.c::register_usb_transport():transport: 0x11364a0 init'ing for usb_handle 0x1136410 (sn='')
system/core/adb/transport_usb.c::init_usb_transport():transport: usb
system/core/adb/transport.c::register_transport():transport: (null) registered
system/core/adb/transport.c::transport_registration_func():transport: (null) (10,11) starting
system/core/adb/transport.c::output_thread():(null): starting transport output thread on fd 11, SYNC online (2)
system/core/adb/transport.c::dump_packet():fd=11: to remote: [SYNC] arg0=1 arg1=2 (len=0)
system/core/adb/transport.c::transport_socket_events():transport_socket_events(fd=10, events=0001,...)
system/core/adb/transport.c::dump_packet():fd=10: from remote: [SYNC] arg0=1 arg1=2 (len=0)
system/core/adb/adb.c::handle_packet():handle_packet() SYNC
system/core/adb/transport.c::dump_packet():fd=10: to remote: [SYNC] arg0=1 arg1=2 (len=0)
system/core/adb/transport.c::output_thread():(null): data pump started
system/core/adb/usb_linux_client.c::usb_read():about to read (fd=9, len=24)
system/core/adb/transport.c::input_thread():(null): starting transport input thread, reading from fd 11
system/core/adb/transport.c::dump_packet():fd=11: from remote: [SYNC] arg0=1 arg1=2 (len=0)
system/core/adb/transport.c::input_thread():(null): transport SYNC online
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 11279 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 11325 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 11818 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 13994 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 13951 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 13913 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 13856 to jdwp process list
system/core/adb/usb_linux_client.c::usb_read():ERROR: fd = 9, n = -1, errno = 5 (I/O error)
system/core/adb/transport_usb.c::remote_read():remote usb: read terminated (message)
system/core/adb/transport.c::output_thread():(null): remote read failed for transport
system/core/adb/transport.c::output_thread():(null): SYNC offline for transport
system/core/adb/transport.c::dump_packet():fd=11: to remote: [SYNC] arg0=0 arg1=0 (len=0)
system/core/adb/transport.c::output_thread():(null): transport output thread is exiting
system/core/adb/usb_linux_client.c::usb_kick():usb_kick
---------- Post added at 04:31 AM ---------- Previous post was at 04:27 AM ----------
I also tried the Chainfire adbd insecure and its exactly the same in the debugging.
Now working on win7 64!
Followed this link and managed to get it working. The PID value was set to 9e18. In essence the andriod usb driver was missing (install via the andriod.bat andriod package manager).
Also works in virtualbox winxp vm on Linux (ubuntu 12.10; actually Mint 14). Just mapped in my win7 64 partition to get access to the andriod sdk/usb driver.
Now that I know its not a handset issue, can return to trying to get the Linux side working.
Now working under Linux!
You need the vendor id in adb_usb.ini:
Code:
cat ~/.android/adb_usb.ini
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x1c9e
If you will run adb as root, make sure you also create the file for root too.
Tip: You will be logged into the phone as the 'shell' user. Try and 'su -' to get root access, and then click on your su dialog on the phone to grant access.
Final issue is that plugging in the device should do the switch automatically; I will update you on that when I have that fixed.
udev sorted on ubuntu
Ok, we are rocking on udev on ubuntu 12.10. Seems like udev doesn't like ATTR keywords, although ATTRS makes everything burst into life (man page says ATTR is useable). Steps that worked for me:
Code:
# cp /lib/udev/rules.d/40-usb_modeswitch.rules /etc/udev/rules.d/usb_modeswitch.rules
# vi /etc/udev/rules.d/usb_modeswitch.rules
Add the following entry near the bottom under the last entry:
Code:
# I-Mobile IQ5.1
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e08", RUN+="usb_modeswitch '%b/%k'"
Create /etc/usb_modeswitch.d/1c9e:9e08 as described earlier by jurban.
Unplug the phone. Plug it in. Do an lsusb. Firstly shows up as dev 1c9e:9e08. Enter lsusb again. Shows up as 1c9e:9e18. Now adb will show the device as jurban shows above. All good to go!

[Q] MySQL on Webtop

Hi
I tried to install AMP(apache, mysql, php5) since I was interested on using Atrix as a web server.
Apache was success, but MySQL was failure. No MySQL, No PHP5(of course)
I tried force installing Busybox using dpkg expecting to be updated(version stayed same), removing and making directories that makes the problem, No luck.
I think it's related to my outdated Busybox(readlink?) There's too many problems here.
Lot of people just say "it's impossible" but why not? At least I want to know why it fails.
I have terminal log below. Sorry for bad, bad english.
Thanks
[email protected]:/$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
obconf leafpad lxde-common linux-libc-dev lxrandr pcmanfm lxde-core lxappearance gpicview libc6-dev lxpanel
lxde-settings-daemon xarchiver
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 120 not upgraded.
3 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up mysql-server-5.0 (5.1.30really5.0.75-0ubuntu10.5) ...
* Stopping MySQL database server mysqld [ OK ]
mkdir: cannot create directory `/var/log/mysql': No such file or directory
dpkg: error processing mysql-server-5.0 (--configure):
subprocess post-installation script returned error exit status 1
Setting up libapache2-mod-php5 (5.2.6.dfsg.1-3ubuntu4.6) ...
readlink: invalid option -- 'q'
BusyBox v1.10.2 (Ubuntu 1:1.10.2-2ubuntu7) multi-call binary
Usage: readlink [-f] FILE
Display the value of a symlink
Options:
-f Canonicalize by following all symlinks
ucf: Unable to determine The new file
dpkg: error processing libapache2-mod-php5 (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5-mysql:
php5-mysql depends on phpapi-20060613+lfs; however:
Package phpapi-20060613+lfs is not installed.
Package libapache2-mod-php5 which provides phpapi-20060613+lfs is not configured yet.
dpkg: error processing php5-mysql (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.0
libapache2-mod-php5
php5-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
Click to expand...
Click to collapse
vctshim said:
Hi
I tried to install AMP(apache, mysql, php5) since I was interested on using Atrix as a web server.
Apache was success, but MySQL was failure. No MySQL, No PHP5(of course)
I tried force installing Busybox using dpkg expecting to be updated(version stayed same), removing and making directories that makes the problem, No luck.
I think it's related to my outdated Busybox(readlink?) There's too many problems here.
Lot of people just say "it's impossible" but why not? At least I want to know why it fails.
I have terminal log below. Sorry for bad, bad english.
Thanks
Click to expand...
Click to collapse
Hi, could you solve the issue? I wan to install it too, for my work.
Thanks!
douglasroos said:
Hi, could you solve the issue? I wan to install it too, for my work.
Thanks!
Click to expand...
Click to collapse
I found out it is impossible. Many repos are dead and crucially Ubuntu in this is outdated (without LTS)
I sold the Atrix and bought ARM-based Open PCs (e.g. Raspberry Pi, Cubieboard, Beaglebone Black, Udoo, etc..)
If you want low-power web server, this might be the way to go
(Ubuntu Phone might work but I'm not sure YET)

Categories

Resources