How to adb shell on Amlogic S905x - Android Stick & Console AMLogic based Computers

Hi,
I'm using Ubuntu 16.04.1 LTS I'm trying to do a adb shell on a leelbox S1 Android 6.0.1 marshmallow which is containing a chip Amlogic S905x combining a 64bit quad core Cortex A-53.
Code:
X555UF:~$ adb version
Android Debug Bridge version 1.0.32
Revision debian
When the android box is starting I can see the vendor and product number as :
Code:
Bus 001 Device 024: ID 1b8e:c003 Amlogic, Inc.
but it's gone after 3 minutes and I can not try any connection like I got :
Code:
adb shell
error: device '(null)' not found
However, I set the new udev rules in /etc/udev/rules.d/51-android.rules
Code:
.../..
#LeelBox
SUBSYSTEM=="usb", ATTR{idVendor}=="1b8e", MODE="0666", GROUP="plugdev"
.../...
Also I restarted the udev daemon and no issue
Thank for help

Hello,
I found a issue through the TCP IP
I shared my WIFI on my Linux with a SSID. I connected my Leelbox on this SSID and in a terminal I did a this command :
Code:
arp -i wlan0 -a
For know which IP Address is connected to the shared WIFI.
Also you can use adb connect to the IP Address like this :
Code:
:~$ adb kill-server
:~$ adb connect 192.168.10.1
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 192.168.10.1:5555
:~$ adb shell
[email protected]:/ #
That's working with the wired interface if you put a little dhcp server listening on this last one.

hi please help i flashed wrong twrp recovery i think now my amlogic smartbox failed to boot in recovery mode and the main problem is my smartbox Encryption Unsuccessful Factory reset, when i click factory reset nothing happend please guide how to solve this
Sent from my SM-N910G using Tapatalk

Related

Starting adb ?!

Hi all!
I was using Modaco 2.9 before and it was amazing stable.
Later on I tryied [email protected] worked well, but not as stable as the modaco, so I thought lets change to the 3.0. Since that I have al lot system crashes, so I thought I need to do "deldalv and/or ext_wipe" with the RA-recovery-1.2.3
Figured out that it didnt work, it says I should use "adb deldalv"
I couldnt get the adb to run on my ubuntu linux, so I tried to find an update for the RA-recovery.
And there is RA-recovery-1.5.1 and I can just install it (cause I have a previous version) via adb.
Now My Question:
How does it work?!?
Code:
[email protected]:~$ adb usb
error: insufficient permissions for device
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
[email protected]:~$ adb kill-server
[email protected]:~$ adb start-server
* daemon not running. starting it now *
* daemon started successfully *
[email protected]:~$ adb usb
error: insufficient permissions for device
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
Code:
[email protected]:~$ cat /etc/udev/rules.d/50-android.rules
#Bus 001 Device 005: ID 0bb4:0c02
SUBSYSTEM=="usb", SYSFS(idVendor)=="0bb4",MODE="0666"
How do I connect the device then, if not like that?
How can I test if everything works?
Thanks in advance
Unicate said:
How do I connect the device then, if not like that?
How can I test if everything works?
Thanks in advance
Click to expand...
Click to collapse
afaik this looks good, try starting adb as root. this is what adb devices says for me:
Code:
[email protected]:~$ adb devices
List of devices attached
HT98XXXX427 device
Code:
./adb start-server
./adb shell
works for me (with root ofcourse )
I set up my system so that the adb deamon starts at boot.
Created a script in the /etc/init.d directory called adb:
Code:
#! /bin/sh
case "$1" in
start)
/home/joeblow/AndroidSDK/tools/adb start-server
;;
stop)
/home/joeblow/AndroidSDK/tools/adb kill-server
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
Created a link to it in /etc/rc2.d:
Code:
lrwxrwxrwx 1 root root 13 2010-01-09 19:17 S10adb -> ../init.d/adb
Off Topic...
Am sorry to be a little off topic.. I just got my Hero and was trying to figure out all the stuff about it here on XDA.. Can anybody tell me what is ADB ??.. Whats it used for ??.. As far as I have understood, I think its some sorta software to connect hero to the computer to transfer files and stuff.. Is it right ??.. If yes.. Then what is the difference between this and HTC SYNC ??.. Thanks in advance.. Cheers !!!
if You want only transfer files, You don't need ADB.
htc sync is for synchronizing phone (contacts, calendar, etc) with PC (i guess, i don't use it ) and for upgrading SW.

native adb

Does anyone know how to connect your phone, to its own native adb. If your running 4.0 or better like the new 4.0.1 sense on evo 4g lte you have the native adb, in the terminal you can start it by typing adb start-server, but I cannot connect the phone to it.
This is nice to use to connect to other phones and use it as a debug station, but does anyone know how to connect to the phones adb server from the terminal on its own phone. When I start the server it says its listening on 5083 I have tried adb forward tcp:5555 tcp:55, tried adb tcpip 5555, but none of the forwarding ports seems to work. I have started adb on the phone and adb over wifi but still do not see the ip in adb.
Some help on this would be nice, I will keep thinking, but any help would be nice.
Some ideas might be to start a wifi server using the phones wifi tether, or hotspot to connect to itself
ip addr add 192.168.1.10/24 dev eth0
ip addr add 192.168.1.10/24 dev wlan0
maybe we can manually add and connect the devices threw wifi hotspot or tether with this. someone want to take this on and get back to me
Screen shot..
https://www.dropbox.com/sc/69v6co2l4nrd8qg/0PQqlpzI1M
I got the sdk runing natively following this..... http://fieldefect.info/w/NativeCompileAPK
he uses qemu-user-static and an i386 chroot to run the SDK, done natively on arm debian chroot.
I prefer to use multistrap over debootstrap, also I modify his run-i386 scripts to work with x86_64 chroot.
I connect adb to adbd like so,
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb connect 127.0.0.1
then try
adb shell
or
adb devices
to confirm.
My screenshot has some output from netstat which may answer your questions about ips/ports. you can see localhost
is listening on both 5038 and 5037. port 5037 belongs to adbd. adb will connect to 127.0.0.1:5037 but only gives errors.
PM me if you have questions ill gladly help.
Yea I have a chrooted ubuntu 10.04 img that I have mounted, I was going to do it that way install the sdk and use the localhost. but I was hoping to keep the chroot out of it. At least it works that way very nice. Only reason I didnt want to use a chroot is its gonna be alot of switching between terminals, was hoping for easy way to use 1 terminal. I suppose i can use 2 windows on the one terminal.
Thanks for the post.
as root
Code:
[email protected]:/ adb kill-server
[email protected]:/ adb start-server
[email protected]:/ adb connect 192.168.1.3
unable to connect to 192.168.1.3:5555
[email protected]:/ adb connect 192.168.1.3:5083
unable to connect to 192.168.1.3:5083
[email protected]:/ adb connect 127.0.0.1
unable to connect to 127.0.0.1:5555
[COLOR="Red"][email protected]:/ adb connect 127.0.0.1:5038
connected to 127.0.0.1:5038[/COLOR]
[email protected]:/ adb devices
list of attached devices
234234234234 offline
I got the adb to start and connect, but the phone still says offline. This is all native not with any chroot or anything else. any ideas?
try port 5037
email me about the other thing [email protected]
I connected using the second post like this
terminal #:
#adb kill-server
#stop adbd
#setprop service.adb.tcp.port 5555
#setprop service.adb.tcp.port 5083
#adb connect 127.0.0.1:5083
#adb devices:
127.0.0.1:5083 device

[Q] Rockchip and ADB on linux

Hello,
do you use rockchip based Android device with linux?
I've just bought Rockchip rk3066 based AllFine Fine10 tablet, and have trouble setting it up to work with adb on my linux instalation.
I presume problem is with udev rules, I use some giant package of udev rules but it does not contain rule for my tablet.
I have tried to manually define udev rule by inputing device ID listed by lsusb utility.
lsub: Bus 002 Device 004: ID 2207:0010
Click to expand...
Click to collapse
Thus creating:
# AllFine
ATTR{idVendor}=="2207", ATTR{idProduct}=="0010", SYMLINK+="android_adb"
Click to expand...
Click to collapse
But still device is not recognized by adb.
I could use some assistance, thank you.
from http://linux-rockchip.info/mw/index.php?title=ADB_shell_with_RK3066
You need to add those Udev rules in order to obtain an ADB shell on your RK3066/RK3188 device:
In terminal run "lsusb", you should see a device with a device ID starting by "2207", the USB VendorID of Rockchip:
$ lsusb
Bus 002 Device 023: ID 2207:0010
In this case, the description of the device was left empty.
Download and install the Android SDK or, just download adb from an Ubuntu Linux with this command:
sudo apt-get install android-tools-adb
Run "sudo gedit /etc/udev/rules.d/51-android.rules" from the terminal and add this to the file and save:
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666", GROUP="plugdev"
Then restart udev with "sudo udevadm control --reload-rules"
Run (not using sudo) "gedit ~/.android/adb_usb.ini", add 0x2207 at the end of the file
Restart the adb server with "adb kill-server; adb start-server" from terminal, you should be able to list your device with "adb devices"
Enable "USB Debugging" on your device and adb should be fine now.

[fix]how-to-fix-adb-errors-in-ubuntu

Hello guys.................
This is "GOPINADH"
TODAY I'am going show you how fix adb error in ubuntu...........
This happens to me sometimes with certain devices.
This is the error i get
input
Code:
adb devices
output
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
So here is the solution for this
Step 1: Find the Vendor ID
You can do this by typing
Code:
lsusb
. My output is something like this:
Code:
Bus 001 Device 006: ID 1782:4012 Spreadtrum Communications Inc.
In this case, 1782 is the Vendor ID.
Step 2: Create an adb_usb.ini file
Run the following
Code:
echo "0x<your device's Vendor ID>" > ~/.android/adb_usb.ini
Step 3: Restart adb
Code:
adb kill-server
Code:
adb start-server
Since doing that, my devices have all shown up in adb devices.
now input
Code:
adb devices
output
Code:
List of devices attached
06320984656459 device
press thanks if helped:good:
Hi, how about the error in 16.04 with adb freezing the system (i apologize if im in the wrong place) kind of desperate now
Unfortunately it does not work for me with the same vendor "1782".
The output of
Code:
adb devices
remained empty.

bricked android 11 guana moto g play 2022, deleted os trying to load g apps and lineage os help cant sideload anything how do i reset adb keys

i have acess to fastboot menu and twrp recovery menu but it says my adb in unauthorized iso i cnt sideload anything
Spoiler
C:\ADBKit v33.0.1>adb shell "echo 'boot-recovery ' > /cache/recovery/command"
adb.exe: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
C:\ADBKit v33.0.1>adb kill-server
C:\ADBKit v33.0.1>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
G0K0H40463960BE0 unauthorized
C:\ADBKit v33.0.1>adb devices
List of devices attached
G0K0H40463960BE0 unauthorized
C:\ADBKit v33.0.1>cat /data/.android/adbkey.pub
'cat' is not recognized as an internal or external command,
operable program or batch file.
C:\ADBKit v33.0.1>adb kill-server
C:\ADBKit v33.0.1>cat /data/.android/adbkey.pub
'cat' is not recognized as an internal or external command,
operable program or batch file.
C:\ADBKit v33.0.1>cat /data/.android/adbkey.pub
'cat' is not recognized as an internal or external command,
operable program or batch file.
C:\ADBKit v33.0.1>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
C:\ADBKit v33.0.1>adb devies
adb.exe: unknown command devies
C:\ADBKit v33.0.1>adb devices
List of devices attached
C:\ADBKit v33.0.1>adb shell\mount system
adb.exe: unknown command shell\mount
C:\ADBKit v33.0.1>adb shell mount system
adb.exe: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
C:\ADBKit v33.0.1>$adb_vendor_keys
'$adb_vendor_keys' is not recognized as an internal or external command,
operable program or batch file.
C:\ADBKit v33.0.1>adb
Android Debug Bridge version 1.0.41
Version 33.0.1-8253317
Installed as C:\ADBKit v33.0.1\adb.exe
global options:
-a listen on all network interfaces, not just localhost
-d use USB device (error if multiple devices connected)
-e use TCP/IP device (error if multiple TCP/IP devices available)
-s SERIAL use device with given serial (overrides $ANDROID_SERIAL)
-t ID use device with given transport id
-H name of adb server host [default=localhost]
-P port of adb server [default=5037]
-L SOCKET listen on given socket for adb server [default=tcp:localhost:5037]
--one-device SERIAL|USB only allowed with 'start-server' or 'server nodaemon', server will only connect to one USB device, specified by a serial number or USB device address.
general commands:
devices [-l] list connected devices (-l for long output)
help show this help message
version show version num
networking:
connect HOST[ORT] connect to a device via TCP/IP [default port=5555]
disconnect [HOST[ORT]]
disconnect from given TCP/IP device [default port=5555], or all
pair HOST[ORT] [PAIRING CODE]
pair with a device for secure TCP/IP communication
forward --list list all forward socket connections
forward [--no-rebind] LOCAL REMOTE
forward socket connection using:
tcp:<port> (<local> may be "tcp:0" to pick any open port)
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
jdwp:<process pid> (remote only)
vsock:<CID>:<port> (remote only)
acceptfd:<fd> (listen only)
forward --remove LOCAL remove specific forward socket connection
forward --remove-all remove all forward socket connections
ppp TTY [PARAMETER...] run PPP over USB
reverse --list list all reverse socket connections from device
reverse [--no-rebind] REMOTE LOCAL
reverse socket connection using:
tcp:<port> (<remote> may be "tcp:0" to pick any open port)
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
reverse --remove REMOTE remove specific reverse socket connection
reverse --remove-all remove all reverse socket connections from device
mdns check check if mdns discovery is available
mdns services list all discovered services
file transfer:
push [--sync] [-z ALGORITHM] [-Z] LOCAL... REMOTE
copy local files/directories to device
--sync: only push files that are newer on the host than the device
-n: dry run: push files to device without storing to the filesystem
-z: enable compression with a specified algorithm (any/none/brotli/lz4/zstd)
-Z: disable compression
pull [-a] [-z ALGORITHM] [-Z] REMOTE... LOCAL
copy files/dirs from device
-a: preserve file timestamp and mode
-z: enable compression with a specified algorithm (any/none/brotli/lz4/zstd)
-Z: disable compression
sync [-l] [-z ALGORITHM] [-Z] [all|data|odm|oem|product|system|system_ext|vendor]
sync a local build from $ANDROID_PRODUCT_OUT to the device (default all)
-n: dry run: push files to device without storing to the filesystem
-l: list files that would be copied, but don't copy them
-z: enable compression with a specified algorithm (any/none/brotli/lz4/zstd)
-Z: disable compression
shell:
shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]
run remote shell command (interactive shell if no command given)
-e: choose escape character, or "none"; default '~'
-n: don't read from stdin
-T: disable pty allocation
-t: allocate a pty if on a tty (-tt: force pty allocation)
-x: disable remote exit codes and stdout/stderr separation
emu COMMAND run emulator console command
app installation (see also `adb shell cmd package help`):
install [-lrtsdg] [--instant] PACKAGE
push a single package to the device and install it
install-multiple [-lrtsdpg] [--instant] PACKAGE...
push multiple APKs to the device for a single package and install them
install-multi-package [-lrtsdpg] [--instant] PACKAGE...
push one or more packages to the device and install them atomically
-r: replace existing application
-t: allow test packages
-d: allow version code downgrade (debuggable packages only)
-p: partial application install (install-multiple only)
-g: grant all runtime permissions
--abi ABI: override platform's default ABI
--instant: cause the app to be installed as an ephemeral install app
--no-streaming: always push APK to device and invoke Package Manager as separate steps
--streaming: force streaming APK directly into Package Manager
--fastdeploy: use fast deploy
--no-fastdeploy: prevent use of fast deploy
--force-agent: force update of deployment agent when using fast deploy
--date-check-agent: update deployment agent when local version is newer and using fast deploy
--version-check-agent: update deployment agent when local version has different version code and using fast deploy
(See also `adb shell pm help` for more options.)
uninstall [-k] PACKAGE
remove this app package from the device
'-k': keep the data and cache directories
debugging:
bugreport [PATH]
write bugreport to given PATH [default=bugreport.zip];
if PATH is a directory, the bug report is saved in that directory.
devices that don't support zipped bug reports output to stdout.
jdwp list pids of processes hosting a JDWP transport
logcat show device log (logcat --help for more)
security:
disable-verity disable dm-verity checking on userdebug builds
enable-verity re-enable dm-verity checking on userdebug builds
keygen FILE
generate adb public/private key; private key stored in FILE,
scripting:
wait-for[-TRANSPORT]-STATE...
wait for device to be in a given state
STATE: device, recovery, rescue, sideload, bootloader, or disconnect
TRANSPORT: usb, local, or any [default=any]
get-state print offline | bootloader | device
get-serialno print <serial-number>
get-devpath print <device-path>
remount [-R]
remount partitions read-write. if a reboot is required, -R will
will automatically reboot the device.
reboot [bootloader|recovery|sideload|sideload-auto-reboot]
reboot the device; defaults to booting system image but
supports bootloader and recovery too. sideload reboots
into recovery and automatically starts sideload mode,
sideload-auto-reboot is the same but reboots after sideloading.
sideload OTAPACKAGE sideload the given full OTA package
root restart adbd with root permissions
unroot restart adbd without root permissions
usb restart adbd listening on USB
tcpip PORT restart adbd listening on TCP on PORT
internal debugging:
start-server ensure that there is a server running
kill-server kill the server if it is running
reconnect kick connection from host side to force reconnect
reconnect device kick connection from device side to force reconnect
reconnect offline reset offline/unauthorized devices to force reconnect
usb:
attach attach a detached USB device
detach detach from a USB device to allow use by other processes
environment variables:
$ADB_TRACE
comma-separated list of debug info to log:
all,adb,sockets,packets,rwx,usb,sync,sysdeps,transport,jdwp
$ADB_VENDOR_KEYS colon-separated list of keys (files or directories)
$ANDROID_SERIAL serial number to connect to (see -s)
$ANDROID_LOG_TAGS tags to be used by logcat (see logcat --help)
$ADB_LOCAL_TRANSPORT_MAX_PORT max emulator scan port (default 5585, 16 emus)
$ADB_MDNS_AUTO_CONNECT comma-separated list of mdns services to allow auto-connect (default adb-tls-connect)
C:\ADBKit v33.0.1>adb push "C:\Users\19166\Desktop\moto g play 2021 Guamna (1).rar"
adb.exe: push requires an argument
C:\ADBKit v33.0.1>adb devices
List of devices attached
C:\ADBKit v33.0.1>adb devices
List of devices attached
C:\ADBKit v33.0.1>adb devices
List of devices attached
C:\ADBKit v33.0.1>adb devices
List of devices attached
C:\ADBKit v33.0.1>adb devices
List of devices attached
C:\ADBKit v33.0.1>adb kill-sweerver
adb.exe: unknown command kill-sweerver
C:\ADBKit v33.0.1>adb kill-server
C:\ADBKit v33.0.1>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
C:\ADBKit v33.0.1>
looks like unofficial TWRP where maintainer simply forgot ro.adb.secure=0 to disable $ADB_VENDOR_KEYS
(note: another required property is ro.secure=0 to get root shell)

Categories

Resources