I am running cyanogen's rom with a fat32 partition and ext3 partition. When i run fdisk on the device /dev/sdb, i get this as a result and it looks ok:
Code:
# fdisk /dev/sdb
Command (m for help): p
Disk /dev/sdb: 8067 MB, 8067743744 bytes
249 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 15438 * 512 = 7904256 bytes
Disk identifier: 0x000eadb7
Device Boot Start End Blocks Id System
/dev/sdb1 1 941 7263548 c W95 FAT32 (LBA)
/dev/sdb2 942 1005 487398 83 Linux
Partition 2 does not end on cylinder boundary.
however, I cant mount my partitions reliably. Sometimes when I plug it in, I get the fat32 partition as /dev/android, and sometimes I get the ext3 partition. but under both circumstances, i NEVER see /dev/sdb1 or /dev/sdb2.
Code:
# ls /dev | grep sd
lrwxrwxrwx 1 root root 4 2009-07-20 15:55 root -> sda3
brw-rw---- 1 root disk 8, 0 2009-07-20 15:55 sda
brw-rw---- 1 root disk 8, 1 2009-07-20 15:55 sda1
brw-rw---- 1 root disk 8, 2 2009-07-20 15:55 sda2
brw-rw---- 1 root disk 8, 3 2009-07-20 15:55 sda3
brw-rw---- 1 root disk 8, 16 2009-07-21 20:43 sdb
however, my dmesg reports this:
Code:
78640.618666] sd 30:0:0:0: [sdb] 15757312 512-byte hardware sectors: (8.06 GB/7.51 GiB)
[78640.620661] sd 30:0:0:0: [sdb] Write Protect is off
[78640.620664] sd 30:0:0:0: [sdb] Mode Sense: 03 00 00 00
[78640.620667] sd 30:0:0:0: [sdb] Assuming drive cache: write through
[78640.624658] sd 30:0:0:0: [sdb] 15757312 512-byte hardware sectors: (8.06 GB/7.51 GiB)
[78640.626659] sd 30:0:0:0: [sdb] Write Protect is off
[78640.626662] sd 30:0:0:0: [sdb] Mode Sense: 03 00 00 00
[78640.626665] sd 30:0:0:0: [sdb] Assuming drive cache: write through
[78640.626669] sdb: sdb1 sdb2
[78640.633034] usb 1-2:1.0: uevent
[78640.633122] usb 1-2: uevent
[78640.899187] usb 1-2:1.0: uevent
[78640.899276] usb 1-2: uevent
[78641.054596] VFS: Can't find ext3 filesystem on dev sdb1.
it takes a bunch of tries of unplugging the usb and plugging it back in until it finally somehow mounts my fat32 partition under /media/disk. Is this some configuration issue? Before I partitioned my sdcard, it was fine mounting just a fat32 partition as the entire card, no problems.
check you hald
/etc/init.d/hald restart
do you have support for udev in you kernel ?
Check this steps and tell us it worked
yes HAL is running and has been running the entire time:
Code:
# rc-update show
alsasound | boot
bootmisc | boot
checkfs | boot
checkroot | boot
clock | boot
consolefont | boot
cupsd | default
dbus | default
hald | default
hostname | boot
keymaps | boot
lm_sensors | default
local | default nonetwork
localmount | boot
modules | boot
net.eth0 | default
net.lo | boot
numlock | default
rdate | default
rmnologin | boot
sshd | default
syslog-ng | default
urandom | boot
xdm | default
Code:
$ ps aux | grep hal
103 3544 0.0 0.0 26956 4032 ? Ss Jul24 0:01 /usr/sbin/hald --use-syslog --verbose=no
root 3545 0.0 0.0 15624 1176 ? S Jul24 0:00 hald-runner
root 3548 0.0 0.0 17748 1124 ? S Jul24 0:00 hald-addon-input: Listening on /dev/input/event1 /dev/input/event0 /dev/input/event3
103 3553 0.0 0.0 16608 968 ? S Jul24 0:00 hald-addon-acpi: listening on acpi kernel interface /proc/acpi/event
root 3558 0.0 0.0 17748 1128 ? S Jul24 0:08 hald-addon-storage: polling /dev/sr0 (every 2 sec)
john5788 4596 0.0 0.0 130688 3120 ? Sl Jul24 0:00 /usr/libexec/gvfs-hal-volume-monitor
root 11452 0.0 0.0 17748 1124 ? S Jul24 0:01 hald-addon-storage: polling /dev/sdb (every 2 sec)
john5788 13851 0.0 0.0 84792 864 pts/1 R+ 10:10 0:00 grep --colour=auto hal
restarting does not help anything.
udevd --version ??
since version 140 those stupids rules messed up with removable devices.
Since I'm lazy I built my kernel with genkernel and it took care of everything about udev.
Code:
# udevd --version
141
so its a rule in udev that is screwin this up?
i'm not using genkernel, I rolled my own kernel out, have been doing it this way for years.
Code:
# uname -a
Linux john5788 2.6.29-gentoo-r5 #1 SMP Fri May 29 16:56:58 PDT 2009 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux
John5788 said:
Code:
# udevd --version
141
so its a rule in udev that is screwin this up?
i'm not using genkernel, I rolled my own kernel out, have been doing it this way for years.
Code:
# uname -a
Linux john5788 2.6.29-gentoo-r5 #1 SMP Fri May 29 16:56:58 PDT 2009 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux
Click to expand...
Click to collapse
Yeah i think ...
what's the output of dmesg |grep EXT3-fs ?
the output has a bunch of instances last night when i was plugging and unplugging the device. like i said, sometimes it recognized my fat32 partition, sometimes ext3.
Code:
# dmesg | grep EXT3-fs
[ 9016.479321] EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
[ 9016.481783] EXT3-fs: mounted filesystem with ordered data mode.
[ 9111.770944] EXT3-fs error (device sdb2): ext3_put_super: Couldn't clean up the journal
[ 9134.532699] EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
[ 9134.534632] EXT3-fs: recovery complete.
[ 9134.536841] EXT3-fs: mounted filesystem with ordered data mode.
[ 9166.843481] EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
[ 9166.849252] EXT3-fs: mounted filesystem with ordered data mode.
[ 9184.778649] EXT3-fs error (device sdb2): ext3_put_super: Couldn't clean up the journal
[ 9243.636550] EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
[ 9243.638973] EXT3-fs: recovery complete.
[ 9243.638976] EXT3-fs: mounted filesystem with ordered data mode.
[ 9305.343298] EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
[ 9305.345249] EXT3-fs: mounted filesystem with ordered data mode.
[ 9328.776678] EXT3-fs error (device sdb2): ext3_put_super: Couldn't clean up the journal
[15048.450805] EXT3-fs: recovery complete.
[15048.452800] EXT3-fs: mounted filesystem with ordered data mode.
[15055.778655] EXT3-fs error (device sdb2): ext3_put_super: Couldn't clean up the journal
ok it seems one of partitions is broken i've looked around the web
try to :
e2fsck -p your /home partitions and
fsck.vfat -p /dev/sdb1 and e2fsck -p /dev/sdb2
I don't use any kind of automation, not even hal, but I have the same issue, without corruption though.
However, I have found that using cfdisk on /dev/sdb makes /dev/sdb{1,2} appear magically, and I can mount them correctly.
That's not really elegant, but it works for me.
I use adb push most of the time anyways, that way I don't have to unmount the SD from the phone and everything is smooth.
Zappletoo said:
I don't use any kind of automation, not even hal, but I have the same issue, without corruption though.
However, I have found that using cfdisk on /dev/sdb makes /dev/sdb{1,2} appear magically, and I can mount them correctly.
That's not really elegant, but it works for me.
I use adb push most of the time anyways, that way I don't have to unmount the SD from the phone and everything is smooth.
Click to expand...
Click to collapse
tht's strange cfdisk should not help mounting the devices but if it work it's worthing give it a try.
it has to be something with hal and rules :
emerge -pv hal dbus
etc-update
should get rid of that problem
PS : Zappletoo what linux distribution are you using ??
Gentoo.
But I don't use HAL, I don't see any good reason to. I'll try to activate it to see if it makes a difference, but I doubt it.
I'm not sure why cfdisk helps, maybe it simply updates the partition table somewhere.
Update : starting hald makes it work. Using partprobe works as well.. So I guess I was right about the partition table part.
what do you mean use cfdisk on it?
did you just select mount from the phone, then run cfdisk /dev/sdb, then immediately quit?
no no run cfdisk on your computer
Edit: yes I misread. That's what he did.
If things goes well your 2 partitions should appear
John5788 said:
what do you mean use cfdisk on it?
did you just select mount from the phone, then run cfdisk /dev/sdb, then immediately quit?
Click to expand...
Click to collapse
Yes, on the computer.
Apparently it does the same as partprobe, which is available in the sys-apps/parted package.
Hald does everything automatically though, but it's bloated.
Never had a problem with gentoo. No Hal...udev 1.41...custom kernel. Somewhere else on this forum however someone pointed out the phone doesn't show up properly in linux without first probing it. i.e. 'fdisk -l /dev/sda'. This has worked for me whenever I choose to mount it (which is almost never cuz i love adb).
I use, HTC desire
HBOOT Alpharev 1.8, BRAVO
Android 2.2
Baseband version
2.6.32.15-gf5a401c
HTC-kerneland18-2
Build number:
2.29.405.5
Make, S-OFF with Alpharev, it's very good install busybox is ready.
But, I like use OPENVPN, with ca, key, files. I copyed from sd card and USE OPENVP INSTALLER,
Binary installed:
/system/xbin/openvpn
/system/bin/openvpn
OPENVPN setting, load the ovpn, config and start the connecting...
-»USR/PASSW-»Auth-»Get Config....
"Cannot allocate TUN/TAP dev dynamically"
I read, diferent forums and, my linux knowledge and try find the error from adb-shell.
test:
$ openvpn --dev tunX
Sun Jan 9 18:32:02 2011 OpenVPN 2.1.1 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Feb 2 2010
Sun Jan 9 18:32:02 2011 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Sun Jan 9 18:32:02 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sun Jan 9 18:32:02 2011 ******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext
Sun Jan 9 18:32:02 2011 Note: Cannot open TUN/TAP dev /dev/tun: No such file or directory (errno=2)
Sun Jan 9 18:32:02 2011 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Sun Jan 9 18:32:02 2011 Cannot allocate TUN/TAP dev dynamically
Sun Jan 9 18:32:02 2011 Exiting
$
Can someone help me ?
Hi (Posting here as I am not yet permitted to in dev section)
I need to get access to the /dev/voc* devices which come from the vocpcm.c code from olher HTC kernel releases.
It looks like it was meant to work with qdsp5 DSP and I am not sure whether I should assume it works
So, I added it to the kernel and once running, I can see the devices
ls -al /dev/voc*
crw-rw-rw- 1 root root 10, 49 Jul 28 21:18 /dev/voc_rx_playback
crw-rw-rw- 1 root root 10, 50 Jul 28 21:18 /dev/voc_rx_record
crw-rw-rw- 1 root root 10, 47 Jul 28 21:18 /dev/voc_tx_playback
crw-rw-rw- 1 root root 10, 48 Jul 28 21:18 /dev/voc_tx_record
But it looks like they really aren't mapping to the DSP as I get no audio from and when i try and tail the file, I get
[email protected]:/dev # tail voc_rx_playback
tail voc_rx_playback
tail: can't open 'voc_rx_playback': No such device
tail: no files
Which is a different result than on my working HTC Tattoo.
Any ideas here as to whether I might need to do something more to get it working with qdsp6 or whether I need a different handset etc
As far as I know, these devices are completely different (and different concept) from the voice uplink and voice downlink that comes with the 2 way recording patch. Is that right ?
cheers
Mark
is there a way to run a bash script on startup. i am trying to check the presence of a running program (that uses excessive cpu and drains my battery) then kill the process-id if it is running:
Code:
$ uname -a -m -p
Linux localhost 2.6.35.7-SPH-D710.EL13-CL806482 #2 SMP PREEMPT Tue D
ec 13 02:56:30 KST 2011 armv7l GNU/Linux
$ crontab -l
crontab: must be suid to work properly
$ su -
# crontab -l
crontab: unknown uid 0
# ls /etc/rc.d
ls: /etc/rc.d: No such file or directory
# ls /etc/rc.local
ls: /etc/rc.local: No such file or directory
the bash script runs fine. i am just tired of having to log into connectbot, navigate to the directory, and run the program each time i restart my fone.
schneidz said:
is there a way to run a bash script on startup. i am trying to check the presence of a running program (that uses excessive cpu and drains my battery) then kill the process-id if it is running:
Code:
$ uname -a -m -p
Linux localhost 2.6.35.7-SPH-D710.EL13-CL806482 #2 SMP PREEMPT Tue D
ec 13 02:56:30 KST 2011 armv7l GNU/Linux
$ crontab -l
crontab: must be suid to work properly
$ su -
# crontab -l
crontab: unknown uid 0
# ls /etc/rc.d
ls: /etc/rc.d: No such file or directory
# ls /etc/rc.local
ls: /etc/rc.local: No such file or directory
the bash script runs fine. i am just tired of having to log into connectbot, navigate to the directory, and run the program each time i restart my fone.
Click to expand...
Click to collapse
Put it in init.d folder to run on every boot, if you mean that.
Sent from my GOCLEVER TERRA L70 using Tapatalk
i created this file:
Code:
-rwxr-x--- 1 root shell 612 Jul 13 20:45 /system/etc/init.d/S80kill-acore.ksh
but it doesnt run on bootup.
Hi there!
I've seen many articles and YouTube videos about installing different kinds of Linux on Android phones. I've been trying for 2 days now to get it working but even though I've tried many different apps, settings, I end up having the same issue.
I downloaded the Linux Deploy app from play store, installed busybox (Stephen/meefik/JRummy) from play store, downloaded VNC viewer too.
I opened the Linux Deploy, tried with many different settings, including only changing Distribution to Kali-Linux, changing architectures, installation path, file system, and desktop environment.
Most of the cases I ended up the Linux Deploy saying everything's fine, VNC running, but when I opened VNC viewer, tried connecting to VNC server under 'localhost', typing in the password 'changeme', I always got only a blank black display with the white square cursor in the middle. I could move the cursor, but no desktop was visible..
Can anyone who feels familiar with these apps help me please?
Thank you!
I am using a Sony xperia z3 (D6603) rooted, UB, RXSW Rom marshmallow edition v4.0, build number 23.5.A.1.151, but also didn't work in simple prerooted 6.0.1.
Screenshots of Linux Deploy settings in the attachment section.
Just let me know if you need any more information!
Running kali
Hi, I got access via ssh - select Enable SSH and set the port to 2222.
Then I accessed via ssh from my computer
Code:
# ssh [email protected] -p2222
[email protected]'s password:
Linux localhost 3.4.0-XenoNKernel #1 SMP PREEMPT Wed Mar 4 17:47:21 IST 2015 armv7l
Kali GNU/Linux Rolling [running via Linux Deploy]
Last login: Fri Jan 27 17:48:40 2017 from 192.168.0.6
[email protected]:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: kali-rolling
Codename: kali-rolling
[email protected]:~$ uname -a
Linux localhost 3.4.0-XenoNKernel #1 SMP PREEMPT Wed Mar 4 17:47:21 IST 2015 armv7l GNU/Linux
[email protected]:~$ lscpu
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0
Off-line CPU(s) list: 1-3
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
CPU max MHz: 1401.6000
CPU min MHz: 300.0000
[email protected]:~$
I installed the tigervnc-common package and changed the password
Code:
[email protected]:~$ sudo su
[email protected]:/home/android# apt-get install tigervnc-common
[email protected]:/home/android# exit
[email protected]:~$ vncpasswd /home/android/.vnc/passwd
Password:
Verify:
Verify that the vncserver is running
Code:
[email protected]:/home/android# ps aux | grep vnc
android 11564 1.5 3.1 44516 27544 pts/0 S 18:03 0:00 /usr/bin/Xtigervnc :2 -desktop localhost:2 (android) -auth /home/android/.Xauthority -geometry 1900x1200 -depth 32 -rfbwait 30000 -rfbauth /home/android/.vnc/passwd -rfbport 5902 -pn -localhost -SecurityTypes VncAuth
android 11566 0.0 0.5 9256 4612 pts/0 S 18:03 0:00 /usr/bin/perl /usr/bin/vncserver
android 11567 0.0 0.0 1856 524 pts/0 S 18:03 0:00 /bin/sh /home/android/.vnc/xstartup
[email protected]:/home/android# netstat -patun | grep vnc
tcp 0 0 127.0.0.1:5902 0.0.0.0:* LISTEN 11564/Xtigervnc
tcp6 0 0 ::1:5902 :::* LISTEN 11564/Xtigervnc
So access vnc in 127.0.0.1, in my case port 5902 with user android.
https://forum.xda-developers.com/picture.php?albumid=13936&pictureid=55028
mfrlinux said:
Hi, I got access via ssh - select Enable SSH and set the port to 2222.
Then I accessed via ssh from my computer
Code:
# ssh [email protected] -p2222
[email protected]'s password:
Linux localhost 3.4.0-XenoNKernel #1 SMP PREEMPT Wed Mar 4 17:47:21 IST 2015 armv7l
Kali GNU/Linux Rolling [running via Linux Deploy]
Last login: Fri Jan 27 17:48:40 2017 from 192.168.0.6
[email protected]:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: kali-rolling
Codename: kali-rolling
[email protected]:~$ uname -a
Linux localhost 3.4.0-XenoNKernel #1 SMP PREEMPT Wed Mar 4 17:47:21 IST 2015 armv7l GNU/Linux
[email protected]:~$ lscpu
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0
Off-line CPU(s) list: 1-3
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
CPU max MHz: 1401.6000
CPU min MHz: 300.0000
[email protected]:~$
I installed the tigervnc-common package and changed the password
Code:
[email protected]:~$ sudo su
[email protected]:/home/android# apt-get install tigervnc-common
[email protected]:/home/android# exit
[email protected]:~$ vncpasswd /home/android/.vnc/passwd
Password:
Verify:
Verify that the vncserver is running
Code:
[email protected]:/home/android# ps aux | grep vnc
android 11564 1.5 3.1 44516 27544 pts/0 S 18:03 0:00 /usr/bin/Xtigervnc :2 -desktop localhost:2 (android) -auth /home/android/.Xauthority -geometry 1900x1200 -depth 32 -rfbwait 30000 -rfbauth /home/android/.vnc/passwd -rfbport 5902 -pn -localhost -SecurityTypes VncAuth
android 11566 0.0 0.5 9256 4612 pts/0 S 18:03 0:00 /usr/bin/perl /usr/bin/vncserver
android 11567 0.0 0.0 1856 524 pts/0 S 18:03 0:00 /bin/sh /home/android/.vnc/xstartup
[email protected]:/home/android# netstat -patun | grep vnc
tcp 0 0 127.0.0.1:5902 0.0.0.0:* LISTEN 11564/Xtigervnc
tcp6 0 0 ::1:5902 :::* LISTEN 11564/Xtigervnc
So access vnc in 127.0.0.1, in my case port 5902 with user android.
https://forum.xda-developers.com/picture.php?albumid=13936&pictureid=55028
Click to expand...
Click to collapse
i'm having the same problem myself except that i have a samsung galaxy note 4 and i need help solving this