[ROOT] FireTV2 - SSH unable to connect - Fire TV Q&A, Help & Troubleshooting

All I've done is root, reboot, disable updates, reboot, install system tools via adbfire, reboot, install ssh, reboot.
So in theory this should affect all who attempt to use it.
Installed SSH via adbFire, started via ADB shell:
ADB Shell:
Code:
[email protected]:/ $ sshstatus
ssh is not running
1|[email protected]:/ $ su
[email protected]:/ # sshstart
[3993] Nov 29 04:11:19 Running in background
Mac:
Code:
$ ssh [email protected]
Warning: Permanently added '10.10.10.117' (RSA) to the list of known hosts.
CANNOT LINK EXECUTABLE DEPENDENCIES: "libc.so" is 32-bit instead of 64-bit
ADB Shell:
Code:
[3995] Nov 29 04:11:22 Child connection from 10.10.10.115:64826
[3995] Nov 29 04:11:23 Pubkey auth succeeded for 'root' with key md5 96:54:9d:f7:95:9e:4e:27:61:b3:7e:9c:fe:57:25:72 from 10.10.10.115:64826
[3995] Nov 29 04:11:23 Exit (root): Disconnect received
Looking at the filesystem you can see that both the 32bit and 64bit library files are there (output trimmed).
Code:
[email protected]:/ # find /|grep libc
/system/lib/libc.so
/system/lib64/libc.so
If I do the crazy thing of renaming the 32bit libc (so that it does not load, forcing usage of 64bit lib) it does allow SSH to work but that is way too risky of a configuration, so I won't use that.

It sounds like there is a linker path problem. The tools probably need to be properly updated for 64-bit support.

zeroepoch said:
It sounds like there is a linker path problem. The tools probably need to be properly updated for 64-bit support.
Click to expand...
Click to collapse
Zeroepoch is exactly correct. adbFire's ssh tools are 32-bit and compiled for the ATV/1. I don't have an eta for an update, sorry.

Related

Openvpn in Android phone to dd-wrt

I am trying to use HTC Desire's openvpn to connect to dd-wrt router with a static key, the following is the config file used:
remote xxx.xxx.xxx
port 2008
dev tap
secret static.key
proto udp
comp-lzo
route-gateway 192.168.1.1
redirect-gateway
I used openvpn setting 0.4.7. the openvpn told me it's connected but when I tried to connect the sites blocked by my carrier, I still cannot open it (I can bypass carrier's blocking if I use PC for the same setting). Anyone advice? Btw, I've use the DNS fix in 0.4.7 and changed dns to 8.8.8.8
redirect-gateway doesn't work for me 2
try to check routing table after connect
if find answer pls share
appears that route is not working, still pointing to my local router ip address 192.168.0.1, my remote router should be 192.168.1.1
any advice?
The following are the commands I executed from terminal and results I got!
cd sdcard/openvpn
openvpn --config abc.ovpn
------------
Thu Jan 6 01:14:04 2011 OpenVPN 2.1.1 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Jul 26 2010
Thu Jan 6 01:14:04 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Jan 6 01:14:04 2011 WARNING: file 'static.key' is group or others accessible
Thu Jan 6 01:14:04 2011 LZO compression initialized
Thu Jan 6 01:14:05 2011 TUN/TAP device tap0 opened
RTNETLINK answers: No such process
Thu Jan 6 01:14:05 2011 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Jan 6 01:14:05 2011 UDPv4 link local (bound): [undef]:2008
Thu Jan 6 01:14:05 2011 UDPv4 link remote: xxx.xxx.xxx.xxx:2008
Thu Jan 6 01:14:32 2011 Peer Connection Initiated with xxx.xxx.xxx.xxx:2008
Thu Jan 6 01:14:32 2011 Initialization Sequence Completed
Does it mean that I don't have tun/tap file installed? How can I find the file? I am using ReflexTSense Rom 1.5.1
anyone can help on this?
cnwatch said:
anyone can help on this?
Click to expand...
Click to collapse
if you installed busybox under /system/xbin, you need to create /system/xbin/bb directory and symlink the ifconfig and route command there:
note: if your desire is not S-OFF you need to do this in recovery
Code:
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
then reinstall openvpn and tell the installation your binaries are under /system/xbin/bb (the default).
Also, make sure to flag the "Fix HTC Routes" in the Advanced options of OpenVPN Settings.
moebius83 said:
if you installed busybox under /system/xbin, you need to create /system/xbin/bb directory and symlink the ifconfig and route command there:
note: if your desire is not S-OFF you need to do this in recovery
Code:
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
then reinstall openvpn and tell the installation your binaries are under /system/xbin/bb (the default).
Also, make sure to flag the "Fix HTC Routes" in the Advanced options of OpenVPN Settings.
Click to expand...
Click to collapse
booted into recovery and add the ln -s /system/xbin/busybox /system/xbin/bb/ifconfig as route is already linked.
then I tried to reinstall the openvpn installer but it says failed and deletes the openvpn file and I have to recover from nandroid backup. pls advise, also, can you share the settings for openvpn settings, my settings as follows:
Tun modules settings
- Load module using : insmod
- path to un module: /system/lib/modules/tun.ko
Path to configurations: /sdcard/openvpn
Path to openvpn binary: /system/xbin/openvpn
Fix HTC Router: Enabled
cnwatch said:
booted into recovery and add the ln -s /system/xbin/busybox /system/xbin/bb/ifconfig as route is already linked.
then I tried to reinstall the openvpn installer but it says failed and deletes the openvpn file and I have to recover from nandroid backup. pls advise, also, can you share the settings for openvpn settings, my settings as follows:
Tun modules settings
- Load module using : insmod
- path to un module: /system/lib/modules/tun.ko
Path to configurations: /sdcard/openvpn
Path to openvpn binary: /system/xbin/openvpn
Fix HTC Router: Enabled
Click to expand...
Click to collapse
same identical config, I'm using stock froyo htc rom

[Solved] Mount a blank.img formated to ext? to bypass permission limitations?

I was wondering if I could mount an empty.img file so that I could add executable into it and chmod 777 them or what ever the number is maybe 666.
Then I would add the location to my $PATH variable in the "/system/etc/mkshrc" file so I could execute those programs from any directory.
What say you?
Has this been done before?
It works!
Well, I wen ahead and tried it out, I figured "What the hell, its not like I have to format my sd card." It worked!
So what I did
1) I changed directories to Downloads. ("cd ~/Downloads")
2) I created a directory for my image in Downloads, and moved into it. (mkdir image && cd ./image)
3) I created an empty 4 gig image called apps.img using dd ("dd if=/dev/zero of=apps.img bs=1MB count=0 seek=4096")
4) I formated it to ext2 ("mke2fs -F apps.img")
5) I used adb to push it to my phone ("adb push ~/Downloads/image/apps.img /storage/sdcard0/Download/")
6) Then on my phone as su I mounted the image ("mount -o loop '/storage/sdcard0/Download/apps.img' '/data/local/mnt' ") {with single quotes around the directories, the double quotes wrap the whole actual command, you don't need them} [EDIT: I used bash on the phone to do this, ie I "su" [enter] ; "bash" [enter] ; "THE ABOVE COMMAND" [enter]
7) To test I used the python interpreter as my executable so I created a folder in /data/local/mnt called apps,(note* I should have made that folder on my pc before I pushed it to my phone to ensure that the foder was actually in the apps.img file.) I created two more folders "bin" and "lib" using "File Manager" on my phone. I then moved what I needed to run python into those folders (though you'll see I forgot something)
8) I added PYTHONHOME PYTHONPATH and added the bin folder I created to $PATH in the /system/etc/bash/bashrc file (Ask and I'll explain). If you don't have bash the mkshrc file is located "/system/etc/mkshrc" on your phone (if its Sprint SGSIII) adding environment variable there will accomplish the same thing, sorta.
9) I connected my phone to pc w/usb, opened up a teminal on pc, started an adb shell
10)........
Code:
[email protected]:~$ adb devices
List of devices attached
xxxxxxxx device
[email protected]:~$ adb shell
[email protected]:/ $ su
[email protected]:/ # bash
void endpwent()(3) is not implemented on Android
localhost / # which python
/data/local/mnt/apps/bin/python
localhost / # python
'import site' failed; use -v for traceback
Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21)
[GCC 4.4.3] on linux-armv7l
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import sys
>>> import math
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named math
>>> import io
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/lib/python2.6/io.py", line 63, in <module>
ImportError: No module named _fileio
>>>
localhost / # exit
[email protected]:/ # ^D
[email protected]:/ $ ^D
[email protected]:~$
I'm thinking that if I can get my mkbootimg tools to work, I would mod an init script to mount the apps.img and then create links for each file in say '/mnt/apps/bin' create a link*in '/system/bin'. this should allow for phones with small or near full system partition install stuff like busybox or your own pprograms. More usefull for a developer.
I wanna try this with pythonforandroid, if I can make python and its modules. accessible during early init or just before the boot process finishes in general, and use it to run python, maybe python can handle boot in a different way, or maybe just one specific. function you might needs.
one big question I have. Does the pythonforandroid interpreter run ontop of the D VM?
Edge-Case said:
I'm thinking that if I can get my mkbootimg tools to work, I would mod an init script to mount the apps.img and then create links for each file in say '/mnt/apps/bin' create a link*in '/system/bin'. this should allow for phones with small or near full system partition install stuff like busybox or your own pprograms. More usefull for a developer.
I wanna try this with pythonforandroid, if I can make python and its modules. accessible during early init or just before the boot process finishes in general, and use it to run python, maybe python can handle boot in a different way, or maybe just one specific. function you might needs.
one big question I have. Does the pythonforandroid interpreter run ontop of the D VM?
Click to expand...
Click to collapse
I don't think so. All command-line programs I know of interface directly with the kernel.
Sent from my S3 on Sense 5 (you jelly?)
CNexus said:
I don't think so. All command-line programs I know of interface directly with the kernel.
Sent from my S3 on Sense 5 (you jelly?)
Click to expand...
Click to collapse
So getting an extended set of Linux (kernel) cli programs working with Android (kernel) is a matter of having the nessissary libraries, kernel prereq., and being compiled for the target processor?
From what I have read, the Android kernel has been cut back so far from the original Linux kernel that its difficult to port "Linux apps" to Android. Something about a slimmed down version of the GNU C/C++ libraries and the Android kernel being designed to run mostly Dalvik.
I haven't tried directly running any "Linux app" (already compiled for arm) on Android yet, but my game plan for that test was to load up an .img file with the nessissary execs, libs, config, etc files (as ext3 this time) and running some scripts that get the paths variables set up and then execute the script, I wrote a short Bash script that sets up python variables and adds others to PATH etc, and it worked, I had python on the img and the img mounted to /mnt/myside and python ran but with some errors, I need to get the variables right, its driving me mad, if its not this its that, last time it was the basic "help()" command not being declaired or something.
Well thats my plan, either these "Linux apps" run on Android without problem or I am going to A) write my own kernel to be compatible with Android/ cli Linux or I am going to get as much source code as I can and practice the art of compiling against Android and/or patching the code when/where nessissary.
We'll see what happens, I've done enough today/night.

[Q] adbd always starts up! How do I have it start up only when required?

Hi,
I have a nexus one running PA-3.99rc2 with the following superuser modifications:
* replaced stock superuser app with SuperSU (system app)
* installed adbtoggle (system app)
* I do have the exposed framework and xprivacy installed, with no restrictions on the settings app, the adbtoggle app and the supersu app.
In the developer options, I have
* "Root Access" set to disabled.
* USB debugging" unchecked
* "select debug app" -> no debug app selected
However, what happens is that whenever I connect a USB cable, I can just run 'adb shell' and get a root prompt.
C:\> adb shell
[email protected]:/
Click to expand...
Click to collapse
This is possible irrespective of the adb toggle setting or the root access setting or the USB debugging setting.
I am simply handed a shell even when USB debugging is turned off, whether I asked for it or not.
I haven't tried it over wifi but I have reason to believe that it would be accessible all the same.
When I toggle ADB using the app or the settings panel, I do see the notification that usb debugging was turned on or off - but in reality it has no effect on the actual state of the debug bridge (which is permanently on.)
I did notice:
[email protected]:/ # cd /
cd /
[email protected]:/ # grep -e 'start adbd' init*
grep -e 'start adbd' init*
init.mahimahi.usb.rc: start adbd
init.mahimahi.usb.rc: start adbd
init.mahimahi.usb.rc: start adbd
init.mahimahi.usb.rc: start adbd
init.mahimahi.usb.rc: start adbd
init.rc: start adbd
init.usb.rc: start adbd
init.usb.rc: start adbd
init.usb.rc: start adbd
init.usb.rc: start adbd
Click to expand...
Click to collapse
All the init scripts in "/" have exec, and are owned by root: "-rwxr-x--- root root", unmodified since the ROM's installation.
Are the init scripts starting up adbd irrespective of my settings? Or am I having/doing something wrong?
Has anyone else observed this behaviour?
Is there any way to fix this behaviour and have adbd run only when asked to?
Thanks in advance,
fruit-salad
===================
[email protected]:/ # uname -a
uname -a
Linux localhost 2.6.38.8-evervolv-02117-g69a13bd #1 PREEMPT Sat Sep 28 03:33:41
PDT 2013 armv7l GNU/Linux
I'm running Paranoid Android 3.99.1-RC2- Release 2 from (d-h.st/BuG)
gApps not installed yet.
boot, system and cache were wiped before install, however I did retain my sd-ext partition.
I don't have any old odex files on the sd-ext, a2sd re-optimized the apps on my sd-ext when enabled.
UPDATE:
========
my default.prop has:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
persist.sys.usb.config=mass_storage,adb
persist.service.adb.enable=1
persist.sys.strictmode.disable=true
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
Click to expand...
Click to collapse
but trying to change
persist.service.adb.enable=1 to persist.service.adb.enable=0
and
persist.sys.usb.config=mass_storage,adb to persist.sys.usb.config=mass_storage
isn't helping. Changes are lost after an update.
According to ?t=2209401 build.prop isn't editable -- is default.prop also not editable?
I did remount / "rw" before editing.
Help?

The Android Shell

The Android Shell
A "shell" is a program that listens to keyboard input from a user and performs actions as directed by the user. Android devices come with a simple shell program. This shell program is mostly undocumented. Since many people are curious about it I thought I'd write up some documentation for it.
Currently this documentation is incomplete, sorry!
Common problems
The built-in shell has very limited error handling. When you type a command name incorrectly it will say "permission denied", even though the real problem is that it couldn't find the command:
$ dir
dir: permission denied <---- this is a misleading error message, should say 'dir: not found'
$ ls
... listing of current directory
The PATH variable
The Android shell will run any program it finds in its PATH. The PATH is a colon (':') seperated list of directories. You can find out what your shell's PATH is set to by using the built-in echo command:
$ echo $PATH
/data/local/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
Depending upon your shell, you may see a different result.
Built in Commands
Every shell has a few built-in commands. Some common built-in commands are:
echo -- prints text to stdout.
set -- sets shell variables
export -- makes shell variables available to command-line programs
cd -- change the current directory.
pwd -- print name of the current directory.
Commands
To find out what commands you have available to you, use the "ls" command on each of the directories in the PATH variable.
Finding documentation for the Android commands.
Many of the Android commands are based on standard Linux (or bsd) commands. If you're curious about a command, you can sometimes learn how it works by using the "man" command on a desktop Linux or OSX (Apple Macintosh) computer. The Linux or OSX version of the command may be different in details, but much of the documentation will still apply to the Android version of the command.
Another source of documentation for people without a Linux or OSX machine handy is to use a web browser and use a web search engine to search for the text: "man Linux command-name".
List of commands
The following is a list of the commands that are present on a Nexus S phone running an Android 2.3.3 "user-debug" build. Many of these commands are not present on a "user" phone. (They are missing from a "user" phone because they are specific to developing or debugging the Android operating system.)
$ ls /data/local/bin
/data/local/bin: No such file or directory
Notice that by default there is no /data/local/bin directory. You can create this directory using the "mkdir" command if you like.
$ ls /sbin
opendir failed, Permission denied
The /sbin directory exists, but you don't have permission to access it. You need root access. If you have a developer phone, or otherwise have root access to your phone you can see what's in this directory.
$ su
# ls /sbin
ueventd
adbd
# exit
$
Notice that the shell prompt changes from a '$' to a '#' to indicate that you have root access.
Notice also that neither of the /sbin commands are useful to the shell -- the adb and ueventd files are 'daemon' programs used to implement the Android Debugger "adb" program that is used by developers.
$ ls /vendor/bin
gpsd
pvrsrvinit
Vendor/bin is where device vendors can put device-specific executables. These files are from a Nexus S.
$ ls /system/sbin
/system/sbin: No such file or directory
This directory does not exist on a Nexus S.
$ ls /system/bin
am
am is the Android Activity Manager. It's used to start and stop Android activities (e.g. applications) from the command line. Type am by itself to get a list of options.
amix
aplay
Command line audio file player.
app_process
applypatch
Used to apply patches to android files.
arec
Command line audio recorder.
audioloop
bluetoothd
BlueTooth daemon
bmgr
Backup manager - type command by itself to get documentation.
bootanimation
Draws the boot animation. You may have to reset your phone to get out of this.
brcm_patchram_plus
bugreport
cat
Copy the contents of a file to standard output.
chmod
Change the mode of a file (e.g. whether it can be read or written.)
chown
Change the owner of a file.
cmp
Compare two files byte-by-byte
dalvikvm
The dalvik virtual machine. (Used to run Android applications.)
date
Prints the current date and time
dbus-daemon
dd
Convert and copy a file. By default copies standard in to standard out.
debuggerd
dexopt
df
Shows how much space is free on different file systems on your device.
dhcpcd
dmesg
dnsmasq
dumpstate
dumpsys
dvz
fsck_msdos
gdbserver
getevent
getprop
gzip
hciattach
hd
id
ifconfig
Shows the current configuration of network interfaces (IP, MAC address etc)
iftop
Shows the current processes using the network interfaces (top, but for networks)
ime
input
insmod
installd
ioctl
ionice
iptables
Manage the firewall
keystore
keystore_cli
kill
Send signals to processes.
linker
ln
Used to set up a file system link.
log
logcat
Prints the Android runtime log.
logwrapper
ls
Lists files.
lsmod
lsof
make_ext4fs
mediaserver
mkdir
Make a directory.
monkey
A program that sends random events, used to test applications. (Like having a monkey playing with the device.)
mount
mtpd
mv
Move a file from one directory to another. (Only on the same file system. Use "cat a > b" to copy a file between file systems.
nandread
ndc
netcfg
netd
netstat
newfs_msdos
notify
omx_tests
pand
ping
pm
pppd
printenv
ps
List active processes.
qemu-props
qemud
racoon
radiooptions
reboot
Reboot the device.
record
renice
rild
rm
Remove a file.
rmdir
Remove a directory.
rmmod
route
rtp_test
run-as
schedtest
schedtop
sdcard
sdptool
sendevent
service
servicemanager
setconsole
setprop
setup_fs
sh
showlease
sleep
smd
stagefright
start
Starts the Android runtime.
stop
Stops the Android runtime.
surfaceflinger
svc
sync
system_server
tc
testid3
toolbox
top
Shows which processes are currently using the most CPU time.
umount
uptime
Prints how long your device has been running since it was last booted.
vdc
vmstat
vold
watchprops
wipe
wpa_cli
wpa_supplicant
$ ls /system/xbin
add-property-tag
btool
check-lost+found
dexdump
dhdutil
hcidump
latencytop
librank
opcontrol
oprofiled
procmem
procrank
rawbu
scp
Secure copy program. (Used to copy files over the network.)
showmap
showslab
sqlite3
Used to administer SQLite databases.
strace
System trace command - use to see what system calls a program makes.
su
Start a shell with root privileges.
Versions of the Android Shell
Android 1.0 used a shell that had no tab completion or history editing.
Android 2.3 added history editing. You can for example use the up/down arrows to edit previous commands.

Run Backtrack 5 On Android Devices (Step By Step)

1. Download terminal emulator,android vnc and arm version of backtrack.
2. Extract the content of img file and transfer it in to memory of android devices.
3. Install BusyBox and start it.
4. Open terminal emulator. use "cd" command to get in backtrack directory where extracted content is saved on memory card of device. In this case command is
cd /sdcard/BT5
5. Type "sh bootbt" and we will be in Backtrack.
commend
su
cd/sdcard/bt5
sh bootbt
startvnc
download from torrent
BackTrack 5 ARM Edition Quick Start
This image has been developed and tested on the you yureka. Your mileage may vary on other devices.
As this image runs in a chroot, you will need to have your device rooted. There are numerous tutorials on the subject online and are not included here.
***Rooting your device will potentially void its warranty and we are not in any way resposible if you brick your device while rooting it.***
### IMPORTANT POINTS ###
1. Since the image runs in a chroot, there is no root password set.
2. There are 2 scripts under /usr/bin/ 'startvnc' and 'stopvnc' that are set to start with the Xoom's default resolution.
3. The current vnc password is set to 'toortoor' and can be changed by running 'vncpasswd'
4. This image is a work in progress and suggestions/tips from the community are always welcome.
### GETTING STARTED ###
1. Once you have downloaded the ARM BT package, save the files in a convenient location. The steps below assume they are in the platform-tools folder of the Android SDK.
2. Go to your platform-tools directory and proceed to make a directory on the device to store BT5:
./adb shell
mkdir /sdcard/BT5
exit
3. Copy over the busybox install files:
./adb push busybox /sdcard/
./adb push installbusybox.sh /sdcard
4. Install busybox on the device:
./adb shell
cd /sdcard/
sh installbusybox.sh
exit
5. Transfer the required BT5 files to the device:
./adb push fsrw /sdcard/BT5/
./adb push mountonly /sdcard/BT5/
./adb push bootbt /sdcard/BT5/
./adb push bt5.img.gz /sdcard/BT5/
./adb push unionfs /sdcard/BT5/
6. Uncompress the image and start BT5:
./adb shell
su
cd /sdcard/BT5
gunzip bt5.img.gz
sh bootbt
If all goes well, you'll be in the BT5 chroot:
# sh bootbt
net.ipv4.ip_forward = 1
[email protected]:/# ls /pentest/
backdoors database exploits passwords scanners stressing voip
cisco enumeration forensics python sniffers tunneling web
[email protected]:/#

Categories

Resources