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 |
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 |
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. |
Can't you upgrade Slackware?
|
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
|
@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
|
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 |
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 :) |
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/ B) Have a seperate /boot partition, just blacklist the kernels in slackpkg? just download the new kernel & source to recompile before my first boot? |
what i did was:
Code:
edit /etc/slackpkg/mirrors to point to which Slackware version and repository you want to use |
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:
Then I'll will give it a whirl ;) Keep those toes crossed. |
But /usr/bin is already part of the PATH
|
First run
Tried both as User & Root ;) Code:
bash-4.2# adb devices Code:
# Add bin to Path variable: |
no space between $PATH: and next path
|
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. |
you should use
Code:
export PATH="$PATH:/new/path:/another/new/path" |
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 Code:
#Acer |
@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.
|
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 Code:
udevadm control --reload-rules Code:
kdesu kate /etc/udev/rules.d/99-android.rules |
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? |
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 Code:
Bus 001 Device 009: ID 18d1:4ee2 Google Inc. Nexus 4 (debug) Code:
jbhansen@craven-moorhead:~$ adb devices |
Neither is present. I broke it. Only thing that shows up under USB is my logitec keyboard & mouse.
|
Code:
#dmesg|tail Code:
bash-4.2# lsusb Code:
art@Wind>$ adb devices |
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?
|
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. |
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. |
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. |
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 |
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? |
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. |
[/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# 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 |
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?
|
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 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? |
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 |
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! |
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. |