Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionsServices: No source files specified error #253

Open
Road-Drum opened this issue Apr 3, 2020 · 27 comments
Open

ActionsServices: No source files specified error #253

Road-Drum opened this issue Apr 3, 2020 · 27 comments

Comments

@Road-Drum
Copy link

Following the Getting Started, during building I got the following error:

[ 88% 573/651] including vendor/opengapps/build/modules/ActionsServices/Android.mk ...
FAILED: 
zipinfo:  cannot find or open , .zip or .ZIP.
tools/tradefederation/core/util-apps/WifiUtil/Android.mk: error: ActionsServices: No source files specified 
build/make/core/prebuilt_internal.mk:37: error: done.
10:04:10 ckati failed with: exit status 1

The build succeeds prior to adding opengapps manifest. What is actually missing in my case? seems that this issue is somewhat identical to #231 but I am building for arm target, not x86

@stefanhh0
Copy link
Contributor

Hello,

Since 05-Nov-2019 you have to use git-lfs, see also the README.md.

To actually fill the directory with the apk-files use the command:
git lfs pull

Best regards,
Stefan

@Road-Drum
Copy link
Author

Thanks, I've added git lfs now and git lfs pull but got this error instead

Error updating the git index: (235/235), 1.1 GB | 12 MB/s                                                                                                                                                     
error: app/com.google.android.gm/21/nodpi/62133988.apk: cannot add to the index - missing --add option?
fatal: Unable to process path app/com.google.android.gm/21/nodpi/62133988.apk
Errors logged to /home/hello/rpi-10/vendor/opengapps/sources/all/.git/lfs/logs/20200403T131053.217603936.log
Use `git lfs logs last` to view the log.

never used git lfs before. sorry about that

@stefanhh0
Copy link
Contributor

stefanhh0 commented Apr 3, 2020

Not so sure why it can't be processed properly.

  • Have you retried?
  • Some file permission problem? Are you owning all the files?
  • If nothing helps, remove the repo completely (also in .repo/projects/vendor/opengapps) and recreate it accordingly.

@Road-Drum
Copy link
Author

* Have you retried?

* Some file permission problem? Are you owning all the files?

* If nothing helps, remove the repo completely (also in `.repo/projects/vendor/opengapps`) and recreate it accordingly.

I've retried on vendor/opengapps/sources/all and vendor/opengapps/sources/arm. the arm passed git lfs pull on first try but not all. tried again on all and the error doesn't pop up anymore.

previous error seems to be solved but another pops out, most likely related to all fails to sync completely.

[ 97% 504/515] including vendor/opengapps/build/modules/TrichromeLibrary/Android.mk ...
FAILED: 
zipinfo:  cannot find or open , .zip or .ZIP.
vendor/opengapps/build/modules/GoogleWebViewOverlay/Android.mk: error: TrichromeLibraryGoogle: No source files specified 
build/make/core/prebuilt_internal.mk:37: error: done.

for some reason git lfs pull after the first encountered error returns empty, as such:

hello@hello:~/rpi-10/vendor/opengapps/sources/all$ git lfs pull
hello@hello:~/rpi-10/vendor/opengapps/sources/all$

I own the files, so should be no problem. also I hope I don't need to recreate opengapps again. does git lfs have something similar to repo sync --force-sync or git reset --hard?

@stefanhh0
Copy link
Contributor

I am also not super familiar with git-lfs, Use man git-lfs or google to learn about it.

You could use aapt dump badging vendor/opengapps/sources/arm64/app/com.google.android.trichromelibrary/29/nodpi/373018658.apk
to check if the blob is available locally.

@stefanhh0
Copy link
Contributor

stefanhh0 commented Apr 3, 2020

Btw. you also have to call the command git lfs pull in:

hello@hello:~/rpi-10/vendor/opengapps/sources/arm$ git lfs pull
hello@hello:~/rpi-10/vendor/opengapps/sources/arm64$ git lfs pull

See as well:
https://github.com/stefanhh0/aosp-10/blob/e3f8e5dd640722d11c9690f1d18de7b56f29c759/build-4.14.sh#L184..L193

@Road-Drum
Copy link
Author

btw git lfs pull opengapps-gitlab manages to pull everything. still, it's strange that TrichromeLibraryGoogle is required since my target is arm while TrichromeLibraryGoogle is arm64, looks mandatory to build GoogleWebViewOverlay though

@Road-Drum
Copy link
Author

wait, it's still failing since TrichromeLibraryGoogle is arm64 only. no TrichromeLibrary for arm, I've verified this too by checking gitlab repo and my locally fetched files

@stefanhh0
Copy link
Contributor

In general TrichromeLibraryGoogle for arm is available:
https://chromium.googlesource.com/chromium/src.git/+/master/docs/android_native_libraries.md#trichrome

From what I know the opengapps project pulls the apk's from googles aosp factory images and there is currently no aosp arm arch factory image available and probably never will be, since arm is outdated. That is likely the reason why opengapps can't provide it. For the factory images see as well here: https://developers.google.com/android/images
I am not completely sure though about what I am saying here. You could open another issue to clarify that and get a confirmation from one of the persons that is more familiar than me with this project.

GoogleWebViewOverlay is not mandatory. That would be a bug in aosp_build.
Which variant of opengapps are you building? Have a look at https://opengapps.org/ the build should work at least up to micro + tvstock.

Make sure that you have not defined something like:

GAPPS_FORCE_WEBVIEW_OVERRIDES := true
GAPPS_FORCE_BROWSER_OVERRIDES := true

@stefanhh0
Copy link
Contributor

There is a bug in aosp_build that was introduced with commit: 85625c1

An exclusion for arm is missing here. That needs to be fixed. As a simple workaround for you locally you could just remove modules/TrichromeLibrary/Android.mk that should "fix" your problem for now.

@stefanhh0
Copy link
Contributor

Are you able to fix the mk file yourself the right way? Then go ahead and open a PR. If not I could give it a try the next days...

@Road-Drum
Copy link
Author

I'm not really familiar with mk files so I'll do it locally. I'm building pico + tvstock packages since tvstock isn't defined. Is GoogleWebView and GoogleWebViewOverlay depends on each other? I've excluded GoogleWebView and the same TrichromeLibrary still pops up

@stefanhh0
Copy link
Contributor

Please try it with this file https://github.com/stefanhh0/aosp_build/blob/master/modules/TrichromeLibrary/Android.mk

Don't build tvstock, only pico and also don't exclude or add anything, just standard pico for now to narrow down the problem.

If that make file is not solving the problem please include the shell output.

@stefanhh0
Copy link
Contributor

stefanhh0 commented Apr 4, 2020

I guess I have it now, the dependency to the TrichromeLibrary defined by GoogleWebView and Chrome as it is done currently is a problem, since the dependency is valid only for arm64 but not for other ARCHs.

Please try it with this commit:
stefanhh0@1a88f0e
and let me know if that fixes your problem.

@stefanhh0
Copy link
Contributor

Well while that commit may fix your build-problem it'll introduces a runtime problem ending up in that you won't have a webview provider at all.

You should stick to the aosp webview rather then trying to build any of the packages that require the trichrome library.

So for arm, following modules from opengapps can not be used and have to be always excluded:

  • Chrome
  • GoogleWebViewOverlay
  • WebViewGoogle

My Fix attempt is invalid and thus won't make a PR for it.

@Road-Drum
Copy link
Author

I've removed modules/TrichromeLibrary in its entirety as per previous comment and also removed GAPPS_PRODUCT_PACKAGES += WebViewGoogle which solves the issue. still, the arm64 filter is much needed imo if I want to add WebViewGoogle.

I just finished building so I probably try your commit if I need WebViewGoogle

@stefanhh0
Copy link
Contributor

stefanhh0 commented Apr 4, 2020

The problem is, that WebViewGoogle depends on Trichrome starting with Android Q (10) see here: https://chromium.googlesource.com/chromium/src.git/+/master/docs/android_native_libraries.md#library.

So even if you get through the build-system, it won't work runtime wise! WebViewGoogle would then fail within Android due to the missing mandatory dependency.

The only way to get WebViewGoogle running on arm is to use as well the arm variant of Trichrome from somewhere.

@stefanhh0
Copy link
Contributor

If I didn't got anything wrong and you can agree with my findings, then you should close this issue.

@MarijnS95
Copy link
Contributor

The problem is, that WebViewGoogle depends on Trichrome starting with Android Q (10) see here: https://chromium.googlesource.com/chromium/src.git/+/master/docs/android_native_libraries.md#library.

So even if you get through the build-system, it won't work runtime wise! WebViewGoogle would then fail within Android due to the missing mandatory dependency.

The only way to get WebVIewGoogle running on arm is to use as well the arm Variant of Trichrome from somewhere.

Finally. That's pretty much what I wanted to comment here after reading 85625c1 to be "bugged". It is indeed extremely unlikely that Trichrome separation does not apply to ARM. It was just a matter of time before someone would build for ARM and notice that no source files have been supplied.

The easiest to go at this is build gapps without Chome/WebView, and instead use what is provided by AOSP/your ROM. Install Chrome/WebView through the play store and extract the libraries there. These can unfortunately not be pulled into the gapps repo due to the new delivery scheme (that serves smaller, more specific apps to devices) of which I forgot the name.

@stefanhh0
Copy link
Contributor

Finally.

Agree, it took a while for me to understand I am really not an uber-dev, lol. But now i really understood because I went that long way :-) Thanks for your patience.

of which I forgot the name.

app bundles, see as well: opengapps/opengapps#808 (comment)

Thanks for commenting on it Marijn :-)

@MarijnS95
Copy link
Contributor

Agree, it took a while for me to understand I am really not an uber-dev, lol. But now i really understood because I went that long way :-) Thanks for your patience.

Oh don't get me wrong, I wasn't commenting on your speed but merely that I was finally able to get to a keyboard and respond, just when you mentioned the same 😁

of which I forgot the name.

app bundles, see as well: opengapps/opengapps#808 (comment)

Yep, thanks for reminding me. Couldn't find it with some random search queries nor in one of the numerous issues/PRs I discussed this in 😅

Here's hoping someone can find an older ARM build that does not suffer from app bundle issues, or opengapps attains proper support for it (however that works, I have not dabbled in the waters of app bundles yet).

@stefanhh0
Copy link
Contributor

@Road-Drum grabbing the trichrome.apk from your phone after you have installed WebView via play store is an excellent idea from Marijn and worked out pretty fine for us in the past.

Here a snippet how you could do it in a shell script:

APK_DIR=${APK_DIR:-~/android/apk}

_put_gapps_apk() {
    local _apk_name=$1
    local _target_dir=$2
    local _version=`aapt dump badging $APK_DIR/$_apk_name |grep versionCode=|sed "s#.*versionCode='\([[:digit:]]*\).*#\1#1"`
    mkdir -p $_target_dir
    rm $_target_dir/*
    cp $APK_DIR/$_apk_name $_target_dir/$_version.apk
}

_put_gapps_apk TrichromeLibraryPlayStore.apk vendor/opengapps/sources/arm/app/com.google.android.trichromelibrary/29/nodpi

Building opengapps including WebViewGoogle should then work out of the box for you.

@MarijnS95
Regarding the app bundles, another question is if the APKs of Chrome and WebView are currently delivered as stripped down app bundles so that those are country, device or whatsoever specific. If not, there is little technical reason to not update those APKs within opengapps gitlab from the play store directly right now. But I am just not familiar enough with all the details about app bundles, e.g. how to figure out if an APK was created from a stripped down app bundle and it might be required to detect it automatically since a delivered APK may change to a stripped down app bundle at any point in time without further notice.

@Road-Drum
Copy link
Author

@stefanhh0 thanks. that script, does it require root? my other device seems to be 64 bit so I don't think I can extract arm version of trichrome apk. I'll keep that script as future reference, plus if I recall chrome webview and chrome is available on play store so as long as I have play store, there should be no problem installing them

I'll be closing the issue soon, since the summary of the issue is that trichrome isn't available within aosp_build and git lfs pull opengapps-gitlab somehow works better than git lfs pull for unknown reason

@stefanhh0
Copy link
Contributor

The script-snippet should be run with the build user.

Here a recipe how to extract the ARM variant from trichrome and how to get it running on your ARM phone:

  • Build Android 10 with opengapps but without the modules Chrome or WebViewGoogle
  • Start your phone with that build
  • Install WebViewGoogle from the play store
  • adb root
  • adb shell to connect to your phone
  • use find /data -name "*.apk" 2>/dev/null | grep -i tri to locate the apk that contains the trichrome library on your ARM phone
  • use find /data -name "*.apk" 2>/dev/null | grep -i web to locate the WebViewGoogle apk.
  • use adb pull to grab the found apks from your phone
  • use the script-snippet to put the apks into the gitlab tree
  • Rebuild android 10 with opengapps including WebViewGoogle

Regarding git lfs, use whatever works best for you.

@Gianmariai
Copy link

Hi all,
following your instructions I gave commands:
git lfs pull
from directory :
android_build/vendor/opengapps/sources/arm64
android_build/vendor/opengapps/sources/arm
android_build/vendor/opengapps/sources/all

but i continue to have errors like this:

note: vendor/opengapps/sources/arm64/app/com.google.android.talk/21/320/26212512.apk may be a plain executable, not an archive
zipinfo: cannot find zipfile directory in one of vendor/opengapps/sources/arm64/app/com.google.android.talk/21/320/26212512.apk or
vendor/opengapps/sources/arm64/app/com.google.android.talk/21/320/26212512.apk.zip, and cannot find vendor/opengapps/sources/arm64/app/com.google.android.talk/21/320/26212512.apk.ZIP, period.
[1050/1085] including vendor/opengapps/build/modules/KoreanIME/Android.mk ...
[1051/1085] including vendor/opengapps/build/modules/LatinImeGoogle/Android.mk ...
[vendor/opengapps/sources/arm64/app/com.google.android.inputmethod.latin/21/nodpi/26920726.apk]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.

What am I doing wrong?

Regards,
gianmaria

@mathew2214
Copy link

as of 2022-JUN-25 this bug still exists

@skoatzone
Copy link

skoatzone commented Oct 20, 2022

Hi,
Since Android 9 and further, I fixed this issue by applying two patch after pulling all the sources.
Here is the full steps :

~/android-x86$ repo sync --no-tags --no-clone-bundle --force-sync -j$( nproc --all )
~/android-x86$ repo forall -c git lfs pull
~/android-x86$ curl https://github.com/cwhuang/aosp_build/commit/384cdac7930e7a2b67fd287cfae943fdaf7e5ca3.patch | git -C vendor/opengapps/build apply -v --index
~/android-x86$ curl https://github.com/cwhuang/aosp_build/commit/3bb6f0804fe5d516b6b0bc68d8a45a2e57f147d5.patch | git -C vendor/opengapps/build apply -v --index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants