LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   android-tools fails build error 1 (https://www.linuxquestions.org/questions/slackware-14/android-tools-fails-build-error-1-a-4175542735/)

NightSky 05-16-2015 12:04 AM

android-tools fails build error 1
 
Running slackware64 13.37, kernel 2.6.37, downloaded android-tools from slackbuilds which I placed in /home/user/android-tools and failed to build a pkg. Build output where things went south but I don't understand it. If some could please help me understand what I need to do to build ADB & fastboot tool. So I can to root a OnePlus one phone. Thank you

Code:

cc -o fastboot -I../include -I../libsparse/include -I../mkbootimg -I../../extras/ext4_utils -I../../extras/f2fs_utils/ -I../../libselinux/include -I../../f2fs-tools/include -I../../f2fs-tools/mkfs -DHAVE_OFF64_T=1  -std=gnu99  -c -o label_file.o ../../libselinux/src/label_file.c
../../libselinux/src/label_file.c: In function 'closef':
../../libselinux/src/label_file.c:558:4: warning: implicit declaration of function 'pcre_free_study'
cc -o fastboot -I../include -I../libsparse/include -I../mkbootimg -I../../extras/ext4_utils -I../../extras/f2fs_utils/ -I../../libselinux/include -I../../f2fs-tools/include -I../../f2fs-tools/mkfs -DHAVE_OFF64_T=1 -std=gnu99  bootimg.o engine.o fastboot.o protocol.o usb_linux.o util_linux.o util.o fs.o backed_block.o output_file.o sparse.o sparse_crc32.o sparse_err.o sparse_read.o centraldir.o zipfile.o allocate.o contents.o crc16.o ext4_utils.o ext4_sb.o extent.o indirect.o make_ext4fs.o sha1.o uuid.o wipe.o f2fs_utils.o f2fs_dlutils.o f2fs_ioutils.o callbacks.o check_context.o freecon.o init.o label.o label_android_property.o label_file.o -lz -ldl -lpcre
label_file.o: In function `closef':
label_file.c:(.text+0x1555): undefined reference to `pcre_free_study'
collect2: ld returned 1 exit status
make: *** [fastboot] Error 1
make: Leaving directory `/tmp/SBo/android-tools/core/fastboot'


willysr 05-16-2015 01:17 AM

Did you download slackbuild for 14.1 and try to run it for 13.37?
While some packages might work fine, it doesn't apply to all previous releases because it was tested for spesific version

NightSky 05-16-2015 11:14 AM

Thank you, @Willysr Yes exactly what i did, as I'm desperately trying to get ADB & Fastboot to work on any old computer. Vista is out the window, G4 Laptop OSx 10.4, or this Slackware64-13.37. Downloaded this: https://code.google.com/p/adb-fastboot-install/ last night, will try another:http://www.droidviews.com/a-comprehe...-and-commands/
Considering removing OS X 10.4 from Mac Laptop & installing an easier stable OS with easy access repository, Ubantu? Debian? Linux Mint? OS X is too old & I'm not familiar enough with that OS to update it & keep 10.4 integrity.

moisespedro 05-16-2015 11:47 AM

Can't you upgrade Slackware?

NightSky 05-16-2015 12:16 PM

I should be able use slackpkg to upgrade to Slackware64-14.1? Looking for an easy upgrade process or script as an option to get working ADB & Fastboot tools. Not crazy about changing things around once things are setup & working. lol

NightSky 05-16-2015 12:21 PM

@moisespedro you posted while I was researching that option. Looking for instructions & or upgrading script. Can u point me towards either? Any input is appreciated. Thank you

moisespedro 05-16-2015 01:59 PM

As far as I am aware you would have to upgrade to 14.0 and then to 14.1

Pat himself has instructions for both:

From 13.37 to 14.0
From 14.0 to 14.1

willysr 05-16-2015 02:34 PM

yes, please upgrade from one version to another, don't jump version
i used that method to upgrade one of my server from 12.2 to 14.0 and it worked with a very minimum downtime :)

NightSky 05-16-2015 04:11 PM

Thank you, Printed out the related instructions for the 2 upgrade versions. Reading & re-reading. Not clear on 2 points?
A) Can I Create /root/slackware-64 from my 13.37DVD? Don't have 14.0 or 14.1 CDs or DVDs will the mere directory structure work? Do I have to download all the 14.0 files to my /root/slackware directory first or will slackpkg do that?
Code:

bash-4.1#cp slackware /root/
Is this correct? Everything for Slackware64-14.0 will be downloaded here first?

B) Have a seperate /boot partition, just blacklist the kernels in slackpkg? just download the new kernel & source to recompile before my first boot?

willysr 05-16-2015 07:07 PM

what i did was:
Code:

edit /etc/slackpkg/mirrors to point to which Slackware version and repository you want to use
slackpkg update gpg (grab the latest Slackware GPG key)
slackpkg update (update your local repository metadata)
slackpkg install-new (install new packages introduced in the new Slackware release)
slackpkg upgrade-all (upgrade all existing packages)
slackpkg clean-system (this will remove non Slackware packages such as SBo packages as well)

repeat that for each jump

NightSky 05-18-2015 06:02 PM

LOL... well I am almost back on track. Had to download 14.1 and do a fresh install. SlackBuild of Android-Tools worked this time.
Trying to figure out how to put /usr/bin in my bash terminal path
[email]user@host>$...Is /usr/bin in my Path already?

Quote:

Originally Posted by sgosnell (Post 5289338)
You can either put the executable adb in /usr/bin or in a directory in your /home hierarchy. Putting it in /usr/bin lets you easily call it from anywhere, since it will be in the path. All you really need for working with Android devices as a user are adb and fastboot. You only need the full sdk if you're going to develop Android software.


Then I'll will give it a whirl ;) Keep those toes crossed.

moisespedro 05-18-2015 06:07 PM

But /usr/bin is already part of the PATH

NightSky 05-18-2015 07:29 PM

First run
Tried both as User & Root ;)

Code:

bash-4.2# adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached

bash-4.2# fastboot devices
bash-4.2# adb reboot bootloader
error: device not found
bash-4.2# adb reboot bootloader
error: device not found
bash-4.2# fastboot reboot
< waiting for device >

Any help? I did put the following int0 .bashrc:
Code:

# Add bin to Path variable:
export PATH="$PATH: /sbin:/usr/sbin:$HOME/bin"
#
#export PATH="PATH:$HOME/bin"
#
export PATH=$PATH:/usr/bin/adb adb
#
export PATH=$PATH:/usr/bin/fastboot fastboot
#
export PATH=$PATH:/art/.android-tools/
#
#export PATH=$PATH:/path/to/dir

OnePlus One telephone settings are all properly set. I'm going to reboot PC & Phone then check back here. Do I need to setup the UDEV 50 rules or something I read in anther post.

willysr 05-18-2015 07:54 PM

no space between $PATH: and next path

NightSky 05-18-2015 10:42 PM

Removed the space and apparently redundant PATH=PATH lines from bashrc it didn't fix lack of communication between Phone & PC :( Trying to figureout what lines I need to add to UDEV & how? Phone is just sitting on fastboot mode. Bash freezes waiting for device. How do I back out of frozen bash?
OTA updates are apparently working. Does it make a difference I have no service micro card in the slot? Phone can connect to my WiFi, I disabled it because google is constantly in there messing with software. Even when I turn off the CM Auto Update Option.

willysr 05-18-2015 10:53 PM

you should use
Code:

export PATH="$PATH:/new/path:/another/new/path"

bassmadrigal 05-18-2015 11:24 PM

From your output, adb and fastboot are both working correctly. You just need the "drivers" for your device. Unless I missed you saying you already have them, you need udev rules to tell the system what to do when you plug in your device. The following is a mass of rules for almost all Android devices. Save this something like /etc/udev/rules.d/99-android.rules (this provides all users access... if you don't want that, change the mode to something like 0660). Once you have the new rules in place, make sure the device is unplugged and run the following (not positive it's needed, since I think the rules would be referenced when the device is plugged back in, but better safe than sorry):

Code:

udevadm control --reload-rules
udevadm trigger

/etc/udev/rules.d/99-android.rules

Code:

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Fujitsu & Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="201e", MODE="0666"
#Hisense
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666"
#Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666"


NightSky 05-19-2015 01:30 PM

@bassmadigral Thank you, I tried using the code you posted and putting that list after the code but I did not make a list in /etc/udev/rules.d . Will try again & been googling how to get these rules in place. Appreciate your time.

bassmadrigal 05-19-2015 02:45 PM

You need to create the file, paste the content into it, then save the file before you can run the udevadm commands. You can create/paste/save with your favorite text editor as root. I tend to use pico.

Code:

su
pico /etc/udev/rules.d/99-android.rules

Now, copy the rules above and then paste them into the file, I use Shift+Insert. After that is done, hit Ctrl+O to save (output) the file and Ctrl+X to exit the app. Once that is done, then run the following to have udev read and apply the new rules. After that is done, you should be able to plug in your device and have adb and/or fastboot read it.

Code:

udevadm control --reload-rules
udevadm trigger

If you'd prefer to use a GUI text program instead of pico, you could do something like the following, then after the rules are saved, you can then run the udevadm commands above.

Code:

kdesu kate /etc/udev/rules.d/99-android.rules

NightSky 05-19-2015 04:19 PM

Followed instructions. Does it matter that there are only 72 lines and its named 99-android.rules: lol
Now the device isn't even being detected. You think I broke it?

bassmadrigal 05-19-2015 04:34 PM

The number with the file is just the order things will be run. It just means it will be the last of the list.

Ok, let's try and get a bit more information since adb and fastboot are both installed (otherwise, they wouldn't run).

First, what is the output of dmesg when you plug your device in? Mine is this:

Code:

[1305388.871046] usb 1-4: new high-speed USB device number 8 using ehci-pci
[1305388.991958] usb 1-4: New USB device found, idVendor=18d1, idProduct=4ee2
[1305388.991963] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1305388.991965] usb 1-4: Product: Nexus 6
[1305388.991967] usb 1-4: Manufacturer: motorola
[1305388.991968] usb 1-4: SerialNumber: ZX1G322C77
[1305389.641048] usb 1-8: reset high-speed USB device number 2 using ehci-pci

If something similar shows up, then at least the basics are working. Verify that the idVendor string exists in the rules you added. If it doesn't, we'll need to add it. For mine, it is 18d1, which if you look at the rules, shows this device is a Google device (since it is a Nexus). If your idVendor isn't there, you can add it by copying one of the lines and replacing the idVendor string in the new line. Next, check the output of lsusb and make sure your device is there. Mine is below.

Code:

Bus 001 Device 009: ID 18d1:4ee2 Google Inc. Nexus 4 (debug)
If both of those are there, then adb should start working.

Code:

jbhansen@craven-moorhead:~$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
ZX1G322C77      device

If any of these don't work, post the outputs of the commands I used. Note, only post the relevant information from dmesg, since that is a system log containing a TON of information -- if you need to try and limit what is being shown so you know what to paste, you could use something like watch -n 0.1 "dmesg | tail -n $((LINES-6))" to view any changes to dmesg (like when you plug in your phone), then just paste those changes.

NightSky 05-19-2015 06:04 PM

Neither is present. I broke it. Only thing that shows up under USB is my logitec keyboard & mouse.

NightSky 05-19-2015 07:35 PM

Code:

#dmesg|tail
 20.147289] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  21.794456] sky2 0000:02:00.0 eth0: Link is up at 100 Mbps, full duplex, flow control both
[  21.794458] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  85.843017] usb 2-8: new high-speed USB device number 3 using ehci-pci
[  85.960069] usb 2-8: New USB device found, idVendor=05ac, idProduct=12a0
[  85.960073] usb 2-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  85.960077] usb 2-8: Product: iPhone
[  85.960080] usb 2-8: Manufacturer: Apple Inc.
[  85.960083] usb 2-8: SerialNumber: 9bfd93316d221190abb58c3ba3cde92d0458a9b0
[  147.948225] usb 2-8: USB disconnect, device number 3

After connecting & disconnecting an iphone via usb I got the above with OnePlus one connected to usb.

Code:

bash-4.2# lsusb
Bus 005 Device 002: ID 046d:c50c Logitech, Inc. Cordless Desktop S510
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

With OnePlus One connected to USB.
Code:

art@Wind>$ adb devices
List of devices attached

where is the List of devices attached?

bassmadrigal 05-19-2015 08:22 PM

The computer isn't recognizing you plugging in the phone. If that doesn't happen, adb definitely won't function. Have you verified your usb cable works or have you tried plugging in your phone on a different computer?

NightSky 05-20-2015 02:35 PM

Thank you everyone sooooo much for helping!!!

I put back paths to /usr/bin/adb adb &
/usr/bin/fastboot fastboot

Played around with different micro usb cables. The one I was using was keeping the phone charged fine so I assumed it was working. Same cable worked fine with another ONePlus one phone on Vista using fastboot.
Used cable from nook reader and it worked fine for fastboot on & off. So I have to plug & unplug to get connection w/fastboot but ADB still returns a blank device list.

Question to complete this unlocking, rooting, and custom recovery process.
How do place files from Slackware to pHone file system? It was easy on windowso- phone just mounts and it's directory files become available. How do I do the same with Slackware.

bassmadrigal 05-20-2015 02:47 PM

If you don't enable usb debugging, it may prevent the phone from being recognized with adb. I'm not sure on that, since I always enable usb debugging. You can enable usb debugging under Settings -> Developer Options (at least with stock Android -- if you're running something that changes Android a lot like HTC or Samsung, it might be in a different spot). If you don't have Developer Options, enable it by tapping on Build Number under Settings -> About Phone 7 times.

As far as getting things to and from the phone, you can use the sometimes broken mtp. It seems to work on and off for me (which is pretty similar to how it worked in Windows on my laptop). But, when I would plug in my phone, KDE would pop up a little notification, which would allow me to open the device and view my files. You can also try mtpfs (from slackbuilds.org), which should allow you to mount the phone to a directory much like the mount command.

NightSky 05-20-2015 07:44 PM

USB Debugging is set, as is the Android Debugging option, Auto Update turned off .
I see:
/lib/udev/rules.d/69-libmtp.rules and /lib/udev/mtp-probe, what code do I need to triger them so I can transfer files from PC to Phone?
BTW fastboot oem device info > returns on "...", any idea what this means? < Reason for this error> command syntax error '-' between device-info was missing. Big ooops
Successfully:
1. fastboot oem unlock
2. fastboot flash recovery recovery.img
after renaming TWARP Recovery file for ease of use.
Now howto transfer files from Slackware to Phone?
Will update, You're much appreciated.

bassmadrigal 05-21-2015 07:37 AM

Are you still running Slackware 13.37? That could be the cause of some of your frustration. MTP has had vast improvements since then. You might try updating libmtp. You could probably grab the source from -current and compile it (you'd need the source instead of the package so it is linked to your libraries rather than the libraries of -current). However, I am not sure how well it will integrate with the older versions of KDE's Dolphin, XFCE's Thunar, or other filemanagers.

As far as the files in /lib/udev, you should never need to change those. Any user modifications to udev should be in /etc/udev.

And fastboot oem device info is not a valid command for fastboot (at least not that I'm aware of). But, unfortunately, each OEM (manufacturer) can put in their own commands under fastboot oem. To find out which commands your device supports, run fastboot oem ? with the device plugged in and at the bootloader. If you just want to verify fastboot is working, you do it using fastboot devices just like with adb.

Once you're in TWRP recovery, adb should work. Try running adb devices and see if it shows you your device. If that works, you can use adb to "push" files onto your device using a similar syntax as the one below:

Code:

adb push /location/to/file /sdcard      #/sdcard is a common place to put files on your device, but you can put them in any mounted directory on the device
The other way to move files will be with MTP once the phone is booted up (adb *should* work as well), but that will depend on how well MTP works on 13.37 (I never tried it back when I was running that version). If you continue to run into issues with MTP and/or adb when the phone is booted up, you can either try upgrading Slackware (you'd need to upgrade to 14.0 and then to 14.1, it is not supported to go directly from 13.37 to 14.1) or just transfer files wirelessly. You can get an ftp client app and use FTP, or there are a number of server apps you can install on your device, that will allow you to connect to your device from the computer.

NightSky 05-21-2015 02:11 PM

No I did a fresh install of Slackware64-14.1 just to install Slackbuild's Android-Tools.
This is correct "fastboot oem device-info". Must have the hyphen (-) in place. It works returning info regarding whether or not you successfully unlocked bootloader; which I did.
Now I'm stuck getting ADB to push files over to phone. ADB Starts successfully* error:device not found. Neither as user or root while fastboot will work.
Is there a way for me to copy files to phone using fastboot?

bassmadrigal 05-21-2015 02:32 PM

The fastboot program does not support copying files. The only thing it can transfer is image files (not picture images but filesystem images) to partitions, which will completely overwrite those partitions. Just a note, adb will NOT work in the bootloader, just as fastboot will NOT work in recovery or Android. When you are in a mode that supports adb (I'd do both recovery and Android itself), what is the output of lsusb and the last bit of dmesg showing when you plug the device in? Also, post the output of those commands while in the bootloader so we can compare. Also, what device do you have?

And user vs root should make no difference if you're using the udev rules I listed above. They give full device access to all users.

Finally, it would be beneficial to paste all commands and errors into [code][/code] blocks so we can see the actual commands and the verbiage of the error instead of guessing what the command was and a paraphrasing of the error from you.

NightSky 05-21-2015 06:27 PM

[/CODE]bash-4.2# lsusb
Bus 001 Device 011: ID 05c6:6764 Qualcomm, Inc.
Bus 005 Device 002: ID 046d:c50c Logitech, Inc. Cordless Desktop S510
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
bash-4.2#
[/CODE]

Code:

bash-4.2#
art@Wind>$ su
Password:
bash-4.2# dmesg grep|tail
[  20.904146] sky2 0000:02:00.0 eth0: enabling interface
[  20.905117] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  22.588250] sky2 0000:02:00.0 eth0: Link is up at 100 Mbps, full duplex, flow control both
[  22.588250] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1074.003027] usb 1-8: new high-speed USB device number 3 using ehci-pci
[ 1074.118084] usb 1-8: New USB device found, idVendor=05c6, idProduct=6765
[ 1074.118089] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1074.118092] usb 1-8: Product: A0001
[ 1074.118095] usb 1-8: Manufacturer: OnePlus
[ 1074.118098] usb 1-8: SerialNumber: 4d24f0b8

Look at this! Seems to be working now. lol 
bash-4.2# adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
4d24f0b8        unauthorized

Now my device is listed???

I Don't understand:"Just a note, adb will NOT work in the bootloader, just as fastboot will NOT work in recovery or Android. When you are in a mode that supports adb (I'd do both recovery and Android itself)"

Code:

:$ adb push /home/art/Downloads/Development/opo/cm-12-20150120-ROBBIEL811-SM4.8-bacon.zip /sdcard
error: device not found
#
bash-4.2# push /home/art/Downloads/Development/opo/cm-12-20150120-ROBBIEL811-SM4.8-bacon.zip /sdcard
bash: push: command not found


NightSky 05-21-2015 06:52 PM

bassmadrigal, what path have you set in you bash.rc to your android-tools? Do you have your android-tools installed in /home/user/android-tools? I also have /home/user/.android folder with public & private key?

bassmadrigal 05-21-2015 11:19 PM

I don't have a path set up for adb and fastboot, because they are placed in /usr/bin/ which is already in $PATH. You don't need to worry about paths because the command is working. That's why you get the "error: device not found". If you didn't have your paths right, it would say "bash: adb: command not found". So don't worry about adb and fastboot. They are where they should be. You can verify this by typing which adb, which should spit out the location of the adb executable it uses. And instead of trying to type all that out each time to test whether it is working, you can simply run adb devices. It will either show nothing, or it will show the device (see both examples below).

Code:

jbhansen@craven-moorhead:~/$ adb devices
List of devices attached

jbhansen@craven-moorhead:~/$ adb devices
List of devices attached
ZX1G322C77      device

And with adb, you need to have adb in front of the push command. Otherwise, you'll get the error you did stating that the push command is not found.

As to the sentence you didn't understand, fastboot only works in the bootloader. If you are booted into Android or the recovery (TWRP), fastboot won't work. Just like adb won't work in the bootloader, but it does work in TWRP and Android itself.

Now, from your dmesg output, it looks like the computer is recognizing two different devices. One is listed as OnePlus and the other is listed as Android. These are likely different modes in your phone (ie, bootloader, recovery, and/or Android -- each has a separate idProduct number, but I suppose it's possible they have a different idVendor number, which can cause problems). Unfortunately, you cut off the text for the OnePlus entry, so we can't see it's idVendor number.

Can you boot the phone into each mode (bootloader, recovery, and Android) and plug it into the computer each time so we can see the output?

NightSky 05-22-2015 07:34 PM

bassmadrigal, I've learned from you alot, thanks. I finally got the job done jumping from slackware to dying Vista which I used to place SuperSU, Serpanmod CM12 (Lollipop5.0.2) AK kernel, gapps, & firmware onto internal phone storage.
A0001 is the model number, OnePlus One, OnePlus 2 are product brand model name, under udev rules Qualcom is listed as manufacturer(?), Android is Software. So what is adb using as identifiers?
Now I understand can't be in fastbood mode & use adb as I can't be in android or twarp & use fastboot tool. Don't know what got the tools working. I put the pkgs. I need to push over in tools folder & cd into them but even that wasn't working. adb devices is returning: 4d24f0b8 unauthorized ... whatever that means. Need a little break from this project, I can't even afford a OnePlus one. lol

bassmadrigal 05-23-2015 01:42 PM

Ok, if it says you're unauthorized, that means that you haven't granted your computer access from your phone. This should only be there in Android, and should not be present in TWRP. If you boot into recovery (TWRP), you should be able to use adb without a problem.

To try and get authorization, try removing any previous authorizations (or denails) by going to Settings -> Developer Options -> Revoke USB Debugging Authorizations and selecting OK. Now, plug your phone back into the computer and try to run adb devices. There should be something that pops up on your notification bar asking you to grant authorization to the computer. Once you do this, you should have access to your device using adb. You can verify it with adb devices and it should have your serial number and not have unauthorized listed.

Good luck!

NightSky 05-24-2015 03:57 PM

Thank you bassmadrigal. The OnePlus One got successfully unlocked, rooted, twarp custom recovery app. & installed a great Custom ROM. You were very helpful and I will put this thread in my subscription for future reference.


All times are GMT -5. The time now is 12:28 AM.