[SOLVED]Unable to get fastboot working on Ubuntu 16.04 LTS - Moto G4 Plus Questions & Answers

Hey can anyone look into this?
I'm unable to get fastboot working on my laptop (ubuntu 16.04 LTS -everything updated). adb works fine.
I downloaded the platform tools from here: https://dl.google.com/android/repository/platform-tools-latest-linux.zip
After extracting it I even added to the path by adding the following to ~/.profile
Code:
# add Android SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
PATH="$HOME/platform-tools:$PATH"
fi
and then running source ~/.profile
So what I did further after putting my phone in bootloader/fastboot mode is
1. fastboot devices
This returns the following error:
Code:
no permissions (verify udev rules); see [http://developer.android.com/tools/device.html] fastboot
I tried adding the USB IDs in the /etc/udev/rules.d/51-android.rules and running chmod a+r /etc/udev/rules.d/51-android.rules as mentioned on the URL but still nothing. Also it has Motorola, Lenovo, Google and Qualcomm IDs but none worked.
2. fastboot erase cache
This returns
<waiting for any device>View attachment 4071566
I tried rebooting both my system and the phone but nothing works.
I have a Moto G Plus (XT1643)
WHAT SHOULD I DO?

All you need is the following command
sudo apt install android-tools-adb android-tools-fastboot
Then add the sudo word before your fastboot command.
USB debugging has to be on and in some cases, you have to change your USB mode from charging only to file transfer.
Sent from my Moto G4 Plus using Tapatalk

Silesh.Nair said:
All you need is the following command
sudo apt install android-tools-adb android-tools-fastboot
Then add the sudo word before your fastboot command.
USB debugging has to be on and in some cases, you have to change your USB mode from charging only to file transfer.
Sent from my Moto G4 Plus using Tapatalk
Click to expand...
Click to collapse
Woah... I was totally unaware of this. #beginner Thanks alot. works well.
 @Silesh.Nair I also found another solution:
Code:
$ wget -S -O - http://source.android.com/source/51-android.rules | sed "s/<username>/$USER/" | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules

Thread owner has found what he wants and fixed.
THREAD CLOSED on owner's request

Related

[solved/info] - adb with ubuntu

I am running ubuntu 9.04. I have eclipse and the Android s.d.k. set up and running perfectly. But I cannot figure out how to setup a.d.b.
I apologize for the new post, but I promise I have searched for hours on this forum and Google. All I found was info on installing on Windows, and fixing a.d.b that used to work but won't work now after updating to 9.04. Anybody have a tutorial or a fix that I might have missed? Thanks in advance.
there is nothing to set up just make shure it has execute permissions, thats what had me stumped LOL
#chmod +x adb
then just plug in the g1 (no drivers required) and
#adb whatever you want
but i was using arch :O
to make it easier copy the adb executable to /usr/bin and you can execute from any directory withoud using cd /directory
Code:
sudo cp /androidsdk/tools/adb /usr/bin
sudo chmod +x /usr/bin/adb
that's how i use mine on my 8.10 and 9.04
Thanks guys, pretty sure it's working, just need to figure out how to connect to device. I will try your suggestions.
Done. Then I tried
#adb logcat
and i get
- waiting for device -
should I
#cd /bin
#adb logcat
?
I am following tutorials for windows, so it is kind of confusing. I don't think I can connect. I get
Code:
[email protected]:~$ adb start-server
[email protected]:~$ adb devices
List of devices attached
[email protected]:~$
Here is me trying all kinds of stuff
Code:
[email protected]:~$ adb start-server
[email protected]:~$ adb devices
List of devices attached
[email protected]:~$ adb kill-server
[email protected]:~$ adb
Android Debug Bridge version 1.0.20
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb root - restarts adb with root permissions
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PDP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
[email protected]:~$ adb get-state
* daemon not running. starting it now *
* daemon started successfully *
unknown
[email protected]:~$ devices
bash: devices: command not found
[email protected]:~$ adb devices
List of devices attached
[email protected]:~$ adb remount
error: device not found
[email protected]:~$ adb start-server
[email protected]:~$ adb remount
error: device not found
[email protected]:~$ adb get-serialno
unknown
[email protected]:~$
tried another usb cable, different usb port. Same stuff
Code:
[email protected]:~$ adb shell
error: device not found
[email protected]:~$ adb start-server
[email protected]:~$ adb shell
error: device not found
[email protected]:~$ ls
adb examples.desktop Templates
android-sdk-linux_x86-1.5_r2 Firefox_wallpaper.png Videos
Desktop Music workspace
Documents Pictures World of Warcraft Trial
eclipse Public
[email protected]:~$ cd /
[email protected]:/$ ls
bin dev initrd.img media proc selinux tmp vmlinuz
boot etc lib mnt root srv usr
cdrom home lost+found opt sbin sys var
[email protected]:/$ adb shell
error: device not found
[email protected]:/$ adb start-server
[email protected]:/$ adb shell
error: device not found
[email protected]:/$ ls
bin dev initrd.img media proc selinux tmp vmlinuz
boot etc lib mnt root srv usr
cdrom home lost+found opt sbin sys var
[email protected]:/$ adb start-server
[email protected]:/$ adb shell
error: device not found
[email protected]:/$ adb kill-server
[email protected]:/$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
[email protected]:/$ adb shell
error: device not found
[email protected]:/$
Any ideas?
I am using the Rogers v3 Rom with jf1.42 bootloader and the 2005 s.p.l
Would any of that matter.
CBowley said:
I am using the Rogers v3 Rom with jf1.42 bootloader and the 2005 s.p.l
Would any of that matter.
Click to expand...
Click to collapse
Doubtful. I too am looking to get ADB running on my Ubuntu laptop, as it would save a bunch of time for me being able to use it instead of my slow windows computer (ADB is corrupted driver-wise on my main rig).
Anyone have any reasonable tutorials for lower-level linux users on Ubuntu 9.04 32-bit?
I have Ubuntu + SDK and I don't have any issue.
Are you sure you installed your SDk the correct way == you followed exaclty the android.com howto ?
it should work with ubuntu 9.04. Just follow this instructions to setup connection to your phone. mainly create rule for you device in udev.
http://developer.android.com/guide/developing/device.html
If you're developing on Ubuntu Linux, you need to add a rules file:
1. Login as root and create this file: /etc/udev/rules.d/50-android.rules.
For Gusty/Hardy, edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
For Dapper, edit the file to read:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
2. Now execute:
chmod a+rx /etc/udev/rules.d/50-android.rules
reboot, then if you are still having problem after this, one more thing to try to start server swith sudo.
adb kill-server
sudo adb start-server
knaries2000 said:
it should work with ubuntu 9.04. Just follow this instructions to setup connection to your phone. mainly create rule for you device in udev.
http://developer.android.com/guide/developing/device.html
If you're developing on Ubuntu Linux, you need to add a rules file:
1. Login as root and create this file: /etc/udev/rules.d/50-android.rules.
For Gusty/Hardy, edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
For Dapper, edit the file to read:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
2. Now execute:
chmod a+rx /etc/udev/rules.d/50-android.rules
reboot, then if you are still having problem after this, one more thing to try to start server swith sudo.
adb kill-server
sudo adb start-server
Click to expand...
Click to collapse
I think I did this part, I will double check. I did try sudo adb start-server, that didn't work. I will double check the rest. Thank you.
Oh that's why I never did it, I cannot find a rule for jaunty, only hardy, dapper, and gutsy.. I'll do more searching. Thanks for the idea.
Okay it works now. This is what I get
Code:
[email protected]:~$ adb start-server
* daemon not running. starting it now *
* daemon started successfully *
[email protected]:~$ adb devices
List of devices attached
HT845GZ28769 device
[email protected]:~$ adb shell
# ls
cache init.goldfish.rc sbin
data init.rc sdcard
default.prop init.trout.rc sqlite_stmt_journals
dev proc sys
etc root system
init runme.sh
#
THIS IS WHAT I DID:
created 2 files on my desktop named:
50-android.rules
51-android.rules
Then I edited both files to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Then I opened terminal and did this
Code:
[email protected]:~$sudo mv /home/chris/desktop/50-android.rules /etc/udev/rules.d
[email protected]:~$sudo mv /home/chris/desktop/51-android.rules /etc/udev/rules.d
Then I rebooted and It all worked. I am runnung ubuntu 9.04 jaunty jakelope(sp?)
Thanks for everyones help. Hope this helps someone else.
CBowley said:
Okay it works now. This is what I get-------
Thanks for everyones help. Hope this helps someone else.
Click to expand...
Click to collapse
Thank you so much, this works perfectly. Bump for someone else finding this who needs it.
Yes it has to be rule 51, not 50 with Jaunty. Google doc is not up to date yet.
see this thread :
http://groups.google.com/group/andr...read/thread/ab6e89c4b51cd905/a05c2a749cd55b88
> this was in /etc/udev/rules.d/50-android.rules
> But it seems to also work like this : (method for Ubuntu 9.04 :
> http://www.frandroid.com/2371/ubuntu-904-et-android/ )
> -> in /etc/udev/rules.d/51-android.rules :
> SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4", MODE=”0666"
Ubuntu 9.04 already has a rules/50-something file so you need to make
sure that the android rule is > 50. Otherwise whatever you define gets
reset. We should update the doc to just state rule/51-android.rules
which will work right now till the base configuration changes once
again
> Also take care if you copy/paste this rule : looks like double quotes
> (") may be wrongly copied from html page, and then it did not work for
> me before I retyped them.
Hmm thanks for the info. That's a new one.
Edit
Ok sorry a little OT, but I responded to this because I did not see an answer posted. I Seem to be having problems with posts showing up when I am logged in... but not when I am logged out... really weird. After I logged out at least another dozen posts showed up in this thread.
you need to change the rule from 50 to 51 on ubuntu 9.4
didnt realise the answer was posted sorry. but its def the right answer
CBowley said:
I am running ubuntu 9.04. I have eclipse and the Android s.d.k. set up and running perfectly. But I cannot figure out how to setup a.d.b.
I apologize for the new post, but I promise I have searched for hours on this forum and Google. All I found was info on installing on Windows, and fixing a.d.b that used to work but won't work now after updating to 9.04. Anybody have a tutorial or a fix that I might have missed? Thanks in advance.
Click to expand...
Click to collapse
sudo bash -c "echo SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"0bb4\", MODE=\"0666\" > /etc/udev/rules.d/51-android.rules"
sudo /etc/init.d/udev restart
killall adb
adb shell

Adb installation instructions for Ubuntu

The Absent-Minded Professor and I just installed adb on Ubuntu; here is how to set up adb on Ubuntu Linux, Gutsy through Maverick.
Our port of the BX theme to CM6 stable is forthcoming.
first command after installing and updating sdk and extracting the tgz file to your home directory is== sudo gedit /etc/udev/rules.d/70-android.rules
NOTE: In the above file replace ## with the number 50 if you are running Gusty/Hardy/Dapper (50-android.rules) or with the number 70 if you are running Karmic Koala/Lucid Lynx(70-android.rules
after the window pops write this in the file==SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″ then save and close
the follwing commands is== sudo chmod a+rx /etc/udev/rules.d/70-android.rules
Then reboot.
Open a terminal and type== sudo gedit .bashrc
The file contents should be as follows== export PATH=${PATH}:~/home/user/android-sdk-linux_86/tools
Save and close.
Run the command== adb devices
If you see a serial number like this:
List of devices attached
HT99PHF02521 device
then you are done.
If you get error messages such as "no such command," cd to /home/user/android-sdk-linux_x86/tools and use the adb commands in this way:
./adb devices
./adb shell
etc.
If you get an error message here referencing insufficient device permissions, do the following:
./adb kill-server
sudo ./adb start-server
Now ./adb devices should work.
Courtesy of laie1472 and The Absent Minded Professor
Thanks to Esau Silva (http://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/) and Tobias Eisentrager (http://www.mail-archive.com/[email protected]/msg14211.html).

[Guide] USB Connect in Fedora 15

Hi everyone, yesterday i finally found a way to connect my PC with Fedora 15 and the Acer Iconia A500. Now I am able to transfer file directly from my PC to Acer, and vice versa.
With Android Honeycom to connect tablet with PC i need MPT (media transfer protocol) support, I surfed on internet and I found this two post:
[Guide] Mount Internal Storage in Ubuntu: wrote for Motorola Xoom;
zen vision m 60gb (mtpfs, libmtp, amarok, gnomad2): wrote for zen vision m 60gb
and I decided to write a guide to connect Acer Iconia to Fedora 15
First of all, we need to install all the dependencies with:
Code:
sudo yum install gcc-c++ gcc
sudo yum install libmtp libmtp-devel libnjb libnjb-devel
sudo yum install libid3tag libid3tag-devel glib2 glib2-devel fuse fuse-libs fuse-devel libmad libmad-devel
Now download mtpfs_0.9.orig.tar.gz from www.adebenham.com/mtpfs/, on internet there's Fedora package but it did't work for me.
Now we have to unpack it with:
Code:
tar -xzf mtpfs_0.9.orig.tar.gz
move into directory:
Code:
cd mtpfs-0.9.orig
lauch this commands:
Code:
./configure
make
sudo make install
Now we have to create a directory where we will mount acer's internal disk:
Code:
sudo mkdir /mnt/acerIconia
sudo chown user:user /mnt/acerIconia
replace user:user with your user. Create a file called acerIconiaMount in /usr/bin and put the line:
Code:
mtpfs -o allow_other /mnt/acerIconia
now we have to give it execute permission:
Code:
sudo chmod a+x acerIconiaMount
Now we have to reboot. When Fedora boot open terminal and launch:
Code:
/usr/bin/acerIconiaMount
and we can access to Acer's internal disk from /mnt/acerIconia. To unmount the Acer's internal disk we have to launch:
Code:
fusermount -u /mnt/acerIconia
Quite simple, isn't it? ;-)
Bye Alberto

[Q] Linux (Ubuntu) & Honeycomb 3.2 usb

Lots of instructions both here and on the Ubuntu forums.
Nothing seems to work for me. I want to connect my Acer A500 to
a pc running linux. Things work fine on Windows XP with the Acer Driver.
added mtp support to ubuntu and a host gmtp I haven't tried usb rule setup
Should the Tablet be in USB debug mode or not?
Any help appreciated. Things seem to have change since May when most of the posts appeared.
Bob
I tested this way with 3.2 a couple of hours ago. Works fine.
1. Install mtpfs
Code:
sudo apt-get install mtpfs
2. In the tablet, go to Settings->Applications->Development and turn USB Debugging on (check the box).
3. Plug your USB cable into the tablet and your Ubuntu machine.
4. Press Ctrl+Alt+t to open console
5. execute lsusb
Code:
lsusb
6. In the result find the line
Code:
Bus 001 Device 005: ID 0502:3325 Acer, Inc.
It tells you that your vendor id is 0502
7. Disconnect the USB cable
8. Edit the file /etc/udev/rules.d/51-android.rules
Code:
sudo nano /etc/udev/rules.d/51-android.rules
you need to add this line (Note, the vendor id is one that has been got on step 6):
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
Click to expand...
Click to collapse
9. Create a mount point as root and set your user as its owner
Code:
sudo mkdir /media/a500
sudo chown [B]username:groupname[/B] /media/a500
username:groupname is your username and his primary group name
for me it was deo:users
10. Change your fstab:
Code:
sudo nano /etc/fstab
to the very end add
# mount point for Acer A500
mtpfs /media/a500 fuse user,noauto,allow_other 0 0
Click to expand...
Click to collapse
11. change fuse.conf:
Code:
sudo nano /etc/fuse.conf
here you need to uncomment the line
#user_allow_other
Click to expand...
Click to collapse
should become
user_allow_other
Click to expand...
Click to collapse
12. Add yourself to the fuse group
Code:
sudo usermod -a -G fuse [B]username[/B]
username is your username
13. Reboot.
Mountpoint appears in Nautilus (and on Desktop as well)
don't forget to unmount the device before unplugging the cable

[GUIDE] How to build firefoxOS from source with Ubuntu 12.10/13.04 x64

I have yet to see a good, COMPLETE, step by step tutorial for building firefoxOS, so since I figured it out thought I would document the steps I took and get a good guide going for us.
**This guide is written with Samsung Nexus S 4G (crespo4G) specifically in mind, but it can easily be adapted to any officially supported device
what you will need:
a nexus s 4g (or other officially supported device)
a pc capable of compiling android from source (ie: minimum 2x core cpu, 4gb ram)
ubuntu 12.10 or 13.04 64-bit (google it, it's open source!)
broadband internet (trust me, you want a minimum of 10mbit/sec)
a basic understanding of terminal command, adb and fastboot
ok, let's get started!!
I'll assume you've already installed ubuntu and gotten the network set up. If not, do so now.
First, set up the build environment....
Install java:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Code:
$ sudo apt-get update
Code:
$ sudo apt-get install sun-java6-jdk
If you have multiple java installations you need to change the version your system is using
Code:
$ wget http://webupd8.googlecode.com/files/update-java-0.5b
Code:
$ chmod +x update-java-0.5b
Code:
$ sudo ./update-java-0.5b
(it says java 0.5, but it's java 6 don't worry)
choose any java 6 installation and save.
Install android sdk:
download the sdk from android dev site
http://developer.android.com/sdk/index.html
extract it to ~/android/sdk/.....
Code:
$ cd ~/android/sdk/tools
Code:
$ ./android update sdk
update all packages
Install adb & fastboot:
Code:
$ sudo add-apt-repository ppa:nilarimogard/webupd8
Code:
$ sudo apt-get update
Code:
$ sudo apt-get install android-tools-adb android-tools-fastboot
test it!!!
Code:
$ adb devices
Install dependancies:
ubuntu 12.10+ dependancies
Code:
$ sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev libgl1-mesa-dev libx11-dev make
64 bit dependancies
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Clone the repo:
Code:
$ git clone git://github.com/mozilla-b2g/B2G.git
Code:
$ cd ~/B2G
Download the source:
Plug in your device, ensure ICS or newer is installed, then enable usb debugging
Code:
$ ./config.sh nexus-s-4g
This is where you can change the guide to work with any supported device. The proper syntax is as follows
Code:
$ ./config.sh (device name)
where (device name) is one of the following:
- galaxy-s2
- galaxy-nexus
- nexus-s
- nexus-s-4g
- otoro
- unagi
- pandaboard
- emulator
- emulator-x86
This takes about an hour
When the source is done downloading, create a file called .userconfig with gedit containing the following two lines of code then save and drop it in ~/B2G
export CC=gcc-4.6
export CXX=g++-4.6
Building from source:
if you're not already there
Code:
$ cd ~/B2G
Code:
$ ./build.sh
*if you get build errors, use a -j option. -j1 option tells your pc to use only one cpu core. -j2 tells it to use 2, and so on...
Using less cpu cores can lead to a more stable build environment and reduce errors
If you use a -j1 option, the syntax is as follows:
Code:
$ ./build.sh -j1
This takes HOURS (probably 4-5)
Flashing b2g:
when it's done, find the .img files in ~/B2G/out/product/target/crespo4g
Code:
$ cd ~/B2G/out/product/target/crespo4g
Boot your device to the bootloader
Code:
$ sudo fastboot flash boot boot.img
Code:
$ sudo fastboot flash system system.img
Code:
$ sudo fastboot flash userdata userdata.img
To create a flashable zip:
plug in your device and enable usb debugging
Code:
$ sudo adb pull /system ~/Documents/crespo4g/b2g
Code:
$ sudo adb pull /data ~/Documents/crespo4g/b2g
add the meta-inf from another nexus s 4g flashable zip
create a .zip with the 3 directories (meta-inf, system and data) and the boot.img you just created
flash in recovery after a FULL wipe (system, boot, data, cache, dalvik)
reserved
Reserved again
Thanks ! Will try this !
Sent from my Nexus s using xda app-developers app
Big Thx Good Guide

Categories

Resources