Bug 1175475

Summary: ADB and other Android tools are outdated
Product: [Fedora] Fedora Reporter: Daniel Miranda <danielkza2>
Component: android-toolsAssignee: Ivan Afonichev <ivan.afonichev>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 21CC: hvtaifwkbgefbaei, ivan.afonichev, james, jonathan, zman0900
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: android-tools-20141219git8393e50-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-15 03:20:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1177397    
Bug Blocks:    
Attachments:
Description Flags
Patch to update android-tools to Lollipop 5.0.2 release - apply against Fedora git none

Description Daniel Miranda 2014-12-17 19:36:20 UTC
ADB and the Android platform tools are more than one year out of date in F21. I don't know if there is any particular reason for that but I'm having issues using ADB sideload with Android 5.0 which some people claim is caused by out of date ADB.

If there is a reason for not updating the package so far or in the future, I would like to know it so I can move to a manual installation.

Comment 1 Ivan Afonichev 2014-12-17 20:11:54 UTC
The reason why android-tools are so outdated is that they require android port of libselinux and I don't think it is good idea to ship it within fedora.


I'll doublecheck if things have changed

Comment 2 Daniel Miranda 2014-12-17 20:31:29 UTC
Alright, thanks!

Comment 3 Jonathan Dieter 2014-12-26 18:54:37 UTC
Created attachment 973247 [details]
Patch to update android-tools to Lollipop 5.0.2 release - apply against Fedora git

Here's a patch against android-tools git HEAD that will update it to the Lollipop 5.0.2 release (tag android-5.0.2_r1 in both core and extras).  Obviously, you'll need to regenerate the core and extra tarballs from upstream git.

I have added two patches, one to strip out selinux/android.h which seems to be unused by the code we compile (and therefore allows us to compile using the system selinux library), and the second to add in a missed header in f2fs_ioutils (no idea why it's missing; I'm assuming it has something to do with the difference between the android buildsystem and our own).

I do have a srpm and F21 x86_64 rpm available at http://lesloueizeh.com/jdieter/android-tools and the srpm will have the necessary core and extras git checkouts.

Comment 4 Ivan Afonichev 2014-12-26 23:17:37 UTC
gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic -std=gnu99 -DADB_HOST=1 -DHAVE_FORKEXEC=1 -DHAVE_SYMLINKS -DHAVE_TERMIO_H -D_GNU_SOURCE -D_XOPEN_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_OFF64_T -DHAVE_SYS_UIO_H -I. -I../include -I../libsparse/include -I../mkbootimg -I../../extras/ext4_utils -I../../extras/f2fs_utils  -c -o ext4_sb.o ../../extras/ext4_utils/ext4_sb.c
gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic -std=gnu99 -DADB_HOST=1 -DHAVE_FORKEXEC=1 -DHAVE_SYMLINKS -DHAVE_TERMIO_H -D_GNU_SOURCE -D_XOPEN_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_OFF64_T -DHAVE_SYS_UIO_H -I. -I../include -I../libsparse/include -I../mkbootimg -I../../extras/ext4_utils -I../../extras/f2fs_utils  -c -o f2fs_ioutils.o ../../extras/f2fs_utils/f2fs_ioutils.c
../../extras/f2fs_utils/f2fs_ioutils.c:46:21: fatal error: f2fs_fs.h: No such file or directory
 #include <f2fs_fs.h>
                     ^
compilation terminated.



It seems f2fs-tools-devel package doesn't include f2fs_fs.h
I see it within kernel-devel but not sure how to use it.

Maybe we should fill the bug on f2fs-tools package

Comment 5 Jonathan Dieter 2014-12-26 23:45:48 UTC
Aww, flip.  Yes, I've already rebuilt f2fs-tools to fix that, but then thought it wasn't necessary for f2fs_ioutils.

I've created a new bug report against f2fs-tools at https://bugzilla.redhat.com/show_bug.cgi?id=1177397

Comment 6 Jonathan Dieter 2015-01-08 09:01:53 UTC
Ok, we should be good to build and push this now.

Comment 7 Ivan Afonichev 2015-01-11 16:40:01 UTC
Works well for me even without 0002-Add-missing-headers.patch

Comment 8 Jonathan Dieter 2015-01-11 16:50:41 UTC
Great!  I think the missing headers problem was hit when I was still trying to compile some of the other f2fs*.c files.

Comment 9 Jonathan Dieter 2015-01-17 10:32:10 UTC
Thanks for building for Rawhide.  Would you mind pushing to F21 and F20 as well, please?

Comment 10 Fedora Update System 2015-01-18 22:09:50 UTC
android-tools-20141219git8393e50-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/android-tools-20141219git8393e50-2.fc21

Comment 11 Fedora Update System 2015-01-20 21:05:13 UTC
Package android-tools-20141219git8393e50-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing android-tools-20141219git8393e50-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0938/android-tools-20141219git8393e50-2.fc21
then log in and leave karma (feedback).

Comment 12 Sami Farin 2015-02-10 19:29:21 UTC
Couldn't get adb to work with Motorola Moto G 2014 with current Fedora 21 version, wasted one hour trying to get it working.
Works OK with android-tools-20141219git8393e50-2.fc21.

Comment 13 Jonathan Dieter 2015-02-10 19:37:00 UTC
Ivan, do you mind manually pushing this to stable?  Thanks.

Comment 14 Fedora Update System 2015-02-15 03:20:31 UTC
android-tools-20141219git8393e50-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.