package android-tools to "talk" to your Android phone or Tablet via the command line.
Porteus stuff first
###################
As a local user or for those who login as root run this command with a usb data cable connected to your phone.
There is no need at this stage to enable USB debugging on Android. That can be done later.
Code: Select all
lsusb
ID 0bb4:0c02 HTC (High Tech Computer Corp.) Dream / ADP1 / G1 / Magic / Tattoo (Debug)
Maker ID is a lie but lots of Chinese phones use other maker ID so lets move on.
Be careful if you manually type ids. Best to copy and paste, mine is (zero)bb4 not (Oh)bb4.
If you login as root.....skip this next part to add guest to the plugdev group.
Now run this command
Code: Select all
groups
guest disk lp floppy dialout audio video cdrom games power netdev scanner vboxusers users
we need to add ourselves, using root powers, to the plugdev line in /etc/group so it reads
My number 83 may not be the same as yours. Just append guest. Reboot to test groups commandsplugdev83:guest
All users guest or root rejoin here
####################################
Now use root powers to create the udev rule.
I will do this by command as we need to do extra command in a terminal as well.
Code: Select all
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="666", GROUP="plugdev"
' > /etc/udev/rules.d/55-0bb4.rules
Note that we have used a single quote as there are double quotes in the text file we are creating
Change the name of "0bb4" to anything you like but most people have only one phone??
Don't forget to change 0bb4 to your actual maker ID
Now either do a full reboot or try to update that rule live by running as root
Code: Select all
udevadm control --reload-rules
Code: Select all
usm -g android-tools
Now as local or root user do 2 commands please
Code: Select all
adb kill-server
adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions
or
0123456789ABCDEF unauthorized
If you get a serial number and a device, then you are already set up and can skip the next section
lets look at your device
Android
######
First ensure you have USB debugging turned on.
for me, settings -> Developer Options -> Section Debugging -> button for USB debugging.
If you can't find Developer search the internet how to get it, for most devices try this
settings -> about phone -> build number tap this about 7 times
USB debugging MUST I repeat must be turned on.
2) Older devices may not have any extra security but mine is nicer.
so for newer phones you will get a notification to allow a PC with a certain
fingerprint access to your Android. Naturally I choose yes. Note this is Android
notification about your PC.

PC
#####
repeat command
Code: Select all
adb devices
List of devices attached
0123456789ABCDEF device
Its beyond the scope of this tutorial on how to use adb or fastboot but I will just
show one command and result
Code: Select all
adb pull /storage/sdcard0/nfc.txt
8 KB/s (746 bytes in 0.082s)
cat nfc.txt
/storage/emulated/legacy/nfc.txt
/storage/emulated/0/nfc.txt
/mnt/shell/emulated/0/nfc.txt
/system/etc/nfcse.cfg
/system/etc/nfcee_access.xml
/system/etc/nfc.cfg
/system/etc/permissions/com.android.nfc_extras.xml
/system/etc/permissions/android.hardware.nfc.hce.xml
/system/etc/permissions/android.hardware.nfc.xml
/system/lib/libnfc_ndef.so
/system/lib/libmtknfc_dynamic_load_jni.so
/system/lib/libmtknfc.so
/system/lib/libem_nfc_jni.so
/system/lib/libnfc_mt6605_jni.so
/system/framework/com.android.nfc_extras.jar
/system/framework/com.android.nfc_extras.odex
/system/xbin/nfcstackp
/data/misc/nfc_conformance
/data/data/com.mediatek.nfc.dta
/data/data/com.android.nfc
/data/data/com.mediatek.nfc.sysoper
/data/media/0/nfc.txt
/data/nfc_socket