Build OEM GSIs the easy way using ErfanGSIs and github-actions - Treble-Enabled Device Guides, News, & Discussion

See On Github​
Port OEM ROMs to project treble using github actions and ErfanGSIs then upload to sourceforge.
Requirements
A little understanding on how to use ErfanGSIs tool.
A SourceForge account and project.
A little understanding on how SourceForge works and how to use it with sftp.
How To Use
Fork the repo.
Setup ErfanGSIs configuration in config.env. See ErfanGSIs Configuration.
Setup SourceForge credentials in github secrets. See SourceForge Configuration.
Go to actions tab, enable workflows.
Go to Actions tab again, click and run workflow manually.
It should take around 10 minutes to succesfully build and upload your builds to sourceforge.com.
How to update
Change ErfanGSIs configuration in config.env. See ErfanGSIs Configuration.
Go to actions tab, click and run workflow manually.
It should take around 10 minutes to succesfully build and upload your builds to sourceforge.com.
ErfanGSIs Configuration
All the settings for Erfan's tool is available by editing the config.env file.
Click to expand...
Click to collapse
NameDescriptionTOOL_REPORepository from where to clone ErfanGSIs tool. Only change this if you are using a custom one.URLFirmware download link or path on the repo.FIRMWARE_TYPEFirmware type (eg: Pixel).OUTPUT_TYPEBuild type. Can be: "all" to build AB and AOnly; "ab" to build just AB; "a" to build just AOnly.SOURCEFORGE_DIRThe directory on sourceforge. See: sourceforge.net/p/forge/documentation/SFTP/#for-managing-file-releasesTG_CHAT_IDSList of telegram chat id separated by space where to send info about the latest builds. Set to 0 to disable telegram notifications.SOURCEFORGE_URLUrl to the sourceforge directory where the builds are uploaded. Used if telegram notifications are enabled.EXTRA_ARGSExtra arguments to pass to url2GSI.sh script.
SourceForge Configuration
In order to connect to source forge you need some extra configuration variables in your repo secrets. See docs.github.com/en/actions/reference/encrypted-secrets.
Click to expand...
Click to collapse
NameDescriptionUSERNAMESourceForge username.PASSWORDSourceForge password.TG_BOT_TOKENTelegram Bot Token to send notification messages to. Used only if telegram notifications are enabled.
Donate
Remember that all the credits for the gsi porting tool belong to Erfan so if your GSI booted succesfully all of this is because of him. But if you wish to thank me for creating this github workflow and you find it helpfull you can also help me with a donation.
Click to expand...
Click to collapse
Paypal: paypal.me/marcelalexandrunitan?locale.x=en_US
Revolut: revolut.me/nitanmarcel
BTC: 3HYhqCW95UcK5eyPQVkgYBVdjKF8HXoQ1z

Related

[Q] [HELP] Can't build Cyanogenmod

Hey everyone, hope someone can help
When I run the command "breakfast hlte"
I get:
Syncing repository to retrieve project.
Fetching project CyanogenMod/android_device_samsung_hlte
Repository synced!
Looking for dependencies
Done
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/hlte/cm.mk]]: "device/samsung/msm8960-common/msm8960.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_hlte'
** Do you have the right repo manifest?
[email protected]:~/android/system$
Click to expand...
Click to collapse
Also, if I proceed and try to extract the proprietry blobs with "extract-files.sh" I get:
Extracting /system/etc/firmware/a330_pfp.fw ...
37 KB/s (2212 bytes in 0.058s)
Extracting /system/etc/firmware/a330_pm4.fw ...
91 KB/s (9220 bytes in 0.098s)
Extracting /system/vendor/lib/libmm-color-convertor.so ...
87 KB/s (9308 bytes in 0.103s)
Extracting /system/lib/cdma/libsec-ril.so ...
remote object '/system/lib/cdma/libsec-ril.so' does not exist
Click to expand...
Click to collapse
Any help would be appreciated
EDIT: the line where it fails is pointing the wrong place :/ I found it in root explorer so I'll see what I can do
EDIT: fixed the cdma/libsec-ril.so
but now it's complaining it can't find a gsm version...
Use the blobs from the GitHub repo TheMuppets/proprietary_vendor_samsung/tree/cm-11.0/hlte. Unfortunately I can't post a direct link due to onerous XDA restrictions on new user's posts. I am having the same problem with not being able to extract all the propietary blobs from my Note 3 device.
CW03 said:
Hey everyone, hope someone can help
When I run the command "breakfast hlte"
I get:
Also, if I proceed and try to extract the proprietry blobs with "extract-files.sh" I get:
Any help would be appreciated
EDIT: the line where it fails is pointing the wrong place :/ I found it in root explorer so I'll see what I can do
EDIT: fixed the cdma/libsec-ril.so
but now it's complaining it can't find a gsm version...
Click to expand...
Click to collapse
Did you ever get this figured out? I am trying to build right now and am having the same problem. I got the blobs from that github repository, and am still running into this same error.
[email protected]:~/android/system$ breakfast hlte
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/hlte/cm.mk]]: "device/samsung/msm8960-common/msm8960.mk" does not exist. Stop.
Device hlte not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_samsung_hlte
Default revision: cm-11.0
Checking branch info
CyanogenMod/android_device_samsung_hlte already exists
Syncing repository to retrieve project.
Fetching project CyanogenMod/android_device_samsung_hlte
Repository synced!
Looking for dependencies
Done
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/hlte/cm.mk]]: "device/samsung/msm8960-common/msm8960.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_hlte'
** Do you have the right repo manifest?
[email protected]:~/android/system$
Click to expand...
Click to collapse
iamdanhenry said:
Did you ever get this figured out? I am trying to build right now and am having the same problem. I got the blobs from that github repository, and am still running into this same error.
Click to expand...
Click to collapse
Do you have device/samsung/msm8960-common/msm8960.mk? If you did used "lunch", it should add this repo (and a few others) to your .repo/local_manifests/roomservice.xml. The repos are defined in device/samsung/hlte/cm.dependencies, which should already be there.
If it doesn't fetch the repos automatically, you can do this with "repo sync".
For the proprietary blobs, you only need to add the samsung repo from TheMuppets github to your .repo/local_manifests/whatever.xml and "repo sync" to pull it in. No need to try to extract anything from your device.
jisoo said:
Do you have device/samsung/msm8960-common/msm8960.mk? If you did used "lunch", it should add this repo (and a few others) to your .repo/local_manifests/roomservice.xml. The repos are defined in device/samsung/hlte/cm.dependencies, which should already be there.
If it doesn't fetch the repos automatically, you can do this with "repo sync".
For the proprietary blobs, you only need to add the samsung repo from TheMuppets github to your .repo/local_manifests/whatever.xml and "repo sync" to pull it in. No need to try to extract anything from your device.
Click to expand...
Click to collapse
After I posted I went and downloaded msm8960-common repository and extracted it into the build directory, it then got the same error for some qualcomm libraries that were missing so I downloaded those as well. I then added the proprietary files from the "TheMuppets" repo.
It would appear things are going better now, but still can't build because of some errors with the kernel not being there. I am going to go download the kernel source and try to get it figured out. If I can't I will make a new thread.
Thank you for your help!

[tool] [windows, mac, linux] ADB & Fastboot scripting automation tool

Welcome to the ADB and fast boot scripting and automation tool with easy to use GUI
FEATURES
Supports almost all ADB and fastboot commands with more on the way
Cross-platform
uses .sh format for easy reuse
Free, and open-source
improve the time spent building roms and apps by automating flashes and installs
Click to expand...
Click to collapse
INSTALLATION INSTUCTIONS
rename files as stated in README.md
place files and .jar in a folder
run script with admin privilages
Click to expand...
Click to collapse
CHANGELOG
Version 1.0
Commits available on Github: https://github.com/Melbing/AFSCT/commits/master
Click to expand...
Click to collapse
Download
MEGA: https://mega.co.nz/#!Yd5CUQJQ!Egl5PpV7qUsDU4U_-gKU4R6VH5nZqNYDNH6iQ8t6hzc
devDB: http://forum.xda-developers.com/devdb/project/?id=6753#downloads
source code: https://github.com/Melbing/AFSCT
Click to expand...
Click to collapse
FAQ
Why is it not working? Did you rename the files with names from README.md
Help won't work on my samsung XXXXX, XXXXXX? Samsung devices do not support fastboot, only the adb will work
Can I help out? Yup, its on github: https://github.com/Melbing/AFSCT
It dosen't work in windows? It does but you need to run the .sh with cygwin: https://www.cygwin.com
Can I install apps to /system if I am rooted: Yes
Click to expand...
Click to collapse
XDA:DevDB Information
ADB & Fastboot scripting & automation tool, Tool/Utility for all devices (see above for details)
Contributors
melbing
Version Information
Status: Alpha
Created 2014-11-20
Last Updated 2014-11-19

[GAPPS][DAILY] Open GApps for Android; All Android Versions & Devices

​Questions? Use Q&A!
Please read the FAQ before reporting any bugs or errors!
If you post in the main thread not having read the FAQ or error message itself, not included a debug log when reporting a malfuction or reporting a Force Closure without a logcat, your post will be ignored by the developers!
Not because we are evil, but because the same questions keep popping up over and over again and too often we get a "X doesn't work, plz fix" without any clue what is happening. We don't have telepathic connection to your device and all the time unnecessarily wasted on this can't be spend on development of Open GApps itself.
The Latest builds of Open GApps for Android can easily be downloaded from the:
Open GApps Homepage -> All architectures & download options​
Open GApps App
FAQ @ GitHub
Package comparison @ GitHub
Advanced Features and Options @ GitHub
Development Repository @ GitHub
I work on this project for FREE and putting in a lot of hours into it. While not mandatory, donations encourage me to continue to further pursue this project and I'd deeply appreciate them, if you feel generous.
Donate to The Open GApps Project
Are you a ROM developer and want to hotlink to the latest Open GApps package? Then check this wiki entry for details.
Please don't publicly mirror the prebuilt packages without explicit consent of @MastahF, to ensure that users will always be directed to the very latest version and the source code of the project.
About The Open GApps Project
Open GApps is a Google Apps package completely developed by writing buildscripts which allow for the automated creation of new up-to-date packages automatically.
The development process is completely open-source (GPLv3) and the goal is to have multiple contributors involved, to secure and reinforce the sustainability of Open GApps development.
Builds are generated every (European) night automatically (if there are any changes) and uploaded to GitHub.
Official AROMA Open GApps package is developed in collaboration with long-time LP-AROMA-developer @raulx222 and has a dedicated XDA thread
For any questions about the AROMA installer development, please refer to that thread. Of course, general support questions can also be asked in our own Q&A thread.
Official Open GApps For Stock support is developed in collaboration with @Rapper_skull and has a dedicated XDA thread
For any questions about the GApps for Stock development, please refer to that thread. Of course, general support questions can also be asked in our own Q&A thread.
The x86 package branch of the package is focused on Zenfone support and is maintained by @deadman96385 of the famous Zenfone GApps packages and has its own topic for x86 related questions
For those that cook their own ROM, an AOSP-build mechanism for Open GApps has been developed by @blystad and can be found at GitHub, remember that you should not bundle any pre-packaged Google Apps with any ROMs you want to distribute further though.
To gather all the various APKs that are necessary for the packages our master of the APK Universe @MNBooZe has written a tool called APKCrawler that scrape these from the internet, e.g. from APKMirror, it can be found at GitHub too.
Characteristic of Open GApps:
Some highlights about the characteristics of the Open GApps packages:
All platforms and and all Android versions are supported
DPI-optimized support for all Google packages (unlike other GApps)
Frequently updated Google Apps: The pre-built OpenGApps.org packages are updated every (European) night (if there are any updated Google Apps available)
Strong compression, allowing for relatively small downloads of even the most complete packages
Automatic backup: It is not necessary to re-flash Google Apps when you flash a ROM update. Most ROMs support this (addon.d) function
The installer checks your device’s capabilities, like the system partition size. It will notify you, before making any changes, if it finds any problems
Several package variations, from a Google Super Package (includes all applications that ever shipped on a Google device), to a Stock package that equals the set of applications found on the most current and complete Nexus, to smaller, minimalist packages and an AROMA package that allows graphically selection of what to install
A special ‘for Stock ROM’ installation mode that allows to update the Google Apps on Stock ROMs that conform to the original Google Nexus filesystem structure
All package installations can be customized to your individual preferences using our Advanced Features and Options
The idea behind this project:
I believe a big source of the problem for many GApps packages to stay up-to-date (or not be forfeited) is the lack of time for developers to do labour-intensive repetive every time a new google-app apk is released.
That is why I have taken it upto myself to write some Linux shell scripts to automate the packaging and to share these efforts with the world with the goal to create a team to continue this package together under the name Open GApps.
This project should not be managed by a person, but by a team, so volunteers willing to help are more than welcome!
Team management and projectleader: @[COLOR="blue"]MastahF[/COLOR]
Writing of the scripts: @[COLOR="blue"]MastahF[/COLOR] & @[COLOR="blue"]Rapper_skull[/COLOR] or check the team on GitHub and many other contributors
Updating GApp sources: @[COLOR="blue"]MNBooZe[/COLOR] & @[COLOR="blue"]DJAlik[/COLOR] & @[COLOR="blue"]bgiesing[/COLOR] & @[COLOR="blue"]mc1100[/COLOR] & @[COLOR="blue"]deadman96385[/COLOR] or check the team on GitHub
AROMA installer: @[COLOR="blue"]raulx222[/COLOR] using LibAroma
Custom compiled commandline tools: @[COLOR="blue"]YashdSaraf[/COLOR]
Website: @[COLOR="blue"]raulx222[/COLOR] & @[COLOR="blue"]MastahF[/COLOR] & signalv hosted by GitHub and created with Material Design Lite and JQuery
Artwork: @[COLOR="blue"]Yeti12[/COLOR]: Yeti-Designs website
Documentation: @[COLOR="blue"]Trafalgar-Square[/COLOR] and @[COLOR="blue"]MastahF[/COLOR] and many other contributors.
Open GApps installer uses open source third-party tools, like busybox and xzdec, compiled by @YashdSaraf; See his busybox thread for more info.
Open GApps is originally based on the now discontinued PA GApps package of @TKruzze and @osm0sis
I suggest to @hellowasif and @sir*mez to take a look at this
Hi, @provolinoo suggested me to take a look at this topic.
I made my own GApps, derived from PA GApps by TKruzze and without knowing I solved some problems that the people that were trying to continue the PA GApps are having.
I completely removed the sizes.prop file and now I measure the sizes of the apps on the fly using unzip. I took a look at your scripts and they're really useful, and reminded me that the APKs need to be zipaligned, which I forgot.
Maybe we can join your scripts, my changes, and a fast internet connection to bring PA GApps back to life.
If you're interested here's the link to my topic, please take a look at it: http://forum.xda-developers.com/android/general/alpha-gapps-stock-t3093389
Well i wanted to say thankyou so much for such wonderful work you did, Before this i was maintaining the PA-Gapps Packages PA Gapps 4.4.4 and PA-Gapps 5.X everything was going great and i must say i learned a lot by maintaining these Gapps packages and that was very wonderful experience but i was only updating Gapps and Libs, But than i realized that they weren't as perfect as the original gapps packages because the original Gapps package uses two important files which were size and libs list which the packages uses and they were the most important part of PA-Gapps. I tried to update these two files manually but they were two time consuming so i decided to drop this project due to lack of resources but by these scripts it will very easy to create Gapps Packages so i wanted to say thankyou again
Rapper_skull said:
Hi, @provolinoo suggested me to take a look at this topic.
I made my own GApps, derived from PA GApps by TKruzze and without knowing I solved some problems that the people that were trying to continue the PA GApps are having.
I completely removed the sizes.prop file and now I measure the sizes of the apps on the fly using unzip. I took a look at your scripts and they're really useful, and reminded me that the APKs need to be zipaligned, which I forgot.
Maybe we can join your scripts, my changes, and a fast internet connection to bring PA GApps back to life.
If you're interested here's the link to my topic, please take a look at it: http://forum.xda-developers.com/android/general/alpha-gapps-stock-t3093389
Click to expand...
Click to collapse
Hey, I looked at your work. Some things are indeed good improvements and I will try to incorporate them into my work if you don't mind.
I also looked at your sizes.prop solution, but honestly I don't like it that much, because although the calculation will be very exact, I don't think it is a good idea to unzip large files and pipe all this data through on our small little phones . I prefer to keep the sizes.prop estimations on the generating-side rather than on the execution-side.
I really would like you to be involved in the project, somebody else also already PMed on the forum, wanting to be involved. I described which tasks and roles are very welcome to be fulfilled within a joint team effort.
MastahF said:
Hey, I looked at your work. Some things are indeed good improvements and I will try to incorporate them into my work if you don't mind.
I also looked at your sizes.prop solution, but honestly I don't like it that much, because although the calculation will be very exact, I don't think it is a good idea to unzip large files and pipe all this data through on our small little phones . I prefer to keep the sizes.prop estimations on the generating-side rather than on the execution-side.
I really would like you to be involved in the project, somebody else also already PMed on the forum, wanting to be involved. I described which tasks and roles are very welcome to be fulfilled within a joint team effort.
Click to expand...
Click to collapse
Thank you for your appreciation. The files however are not extracted but I used "unzip -l" that lists the content of the archive with the file sizes. Keep me informed about this project.
hellowasif said:
Well i wanted to say thankyou so much for such wonderful work you did, Before this i was maintaining the PA-Gapps Packages PA Gapps 4.4.4 and PA-Gapps 5.X everything was going great and i must say i learned a lot by maintaining these Gapps packages and that was very wonderful experience but i was only updating Gapps and Libs, But than i realized that they weren't as perfect as the original gapps packages because the original Gapps package uses two important files which were size and libs list which the packages uses and they were the most important part of PA-Gapps. I tried to update these two files manually but they were two time consuming so i decided to drop this project due to lack of resources but by these scripts it will very easy to create Gapps Packages so i wanted to say thankyou again
Click to expand...
Click to collapse
Hi hellowasif,
would you be interested in collaborating then together with other people in a team to bring back PA Gapps using these scripts?
MastahF said:
Hi hellowasif,
would you be interested in collaborating then together with other people in a team to bring back PA Gapps using these scripts?
Click to expand...
Click to collapse
Yes that will be wonderful to work as a team and you count me in. :highfive:
Rapper_skull said:
Thank you for your appreciation. The files however are not extracted but I used "unzip -l" that lists the content of the archive with the file sizes. Keep me informed about this project.
Click to expand...
Click to collapse
Ah, then i misread your code, I will take a look at it then again. Anyhow, since the files in the package are static, I think at moment of generation is a good moment to get the file sizes
I have btw a question for you, a problem I was not able to resolve myself yet, even though trying a lot.
When creating the .zip-package to be signed and afterwards flashed, I am at the moment not using any compression (but use the -Z store flag).
If I use *any* kind of compression, the package refuses to flash at my phone (GT-i9300) with the message error executing update binary error.
I tried a lot of combinations, like using a different zip-application, compressing only the files outside META-INF etcetera, but nothing seems to work.
So my question is: how do you generate and sign your zip file? On which platform? With which application? With which parameters?
MastahF said:
Ah, then i misread your code, I will take a look at it then again. Anyhow, since the files in the package are static, I think at moment of generation is a good moment to get the file sizes
I have btw a question for you, a problem I was not able to resolve myself yet, even though trying a lot.
When creating the .zip-package to be signed and afterwards flashed, I am at the moment not using any compression (but use the -Z store flag).
If I use *any* kind of compression, the package refuses to flash at my phone (GT-i9300) with the message error executing update binary error.
I tried a lot of combinations, like using a different zip-application, compressing only the files outside META-INF etcetera, but nothing seems to work.
So my question is: how do you generate and sign your zip file? On which platform? With which application? With which parameters?
Click to expand...
Click to collapse
You will maybe laugh at my reply, but I simply use WinRAR, on Windows, with maximum compression. I do not yet sign the ZIPs because I wanted to generate my own private key instead of using the generic test-key. What you can try to do is update your recovery (if it's not updated) to see if the problem is solved.
dowloaded your GitHub project and ran through the scripts to create the signed zip file. So far everything is running smoothly. Did a full wipe. Great Job!
Question I have. Do you know why the com.android.vending is still installed in the user space (/data/app) vs system space?
Chrome doesn't seem to be working. It crashes every time I try to run it.
DJAlik said:
dowloaded your GitHub project and ran through the scripts to create the signed zip file. So far everything is running smoothly. Did a full wipe. Great Job!
Question I have. Do you know why the com.android.vending is still installed in the user space (/data/app) vs system space?
Click to expand...
Click to collapse
Thank you for your feedback, at the moment I was extracting the Play Store from a Nexus Image under the cryptic name of Phonesky.
I only found out just now that this Phonesky is the same as android.vending (the Play store) and updated this.
DJAlik said:
Chrome doesn't seem to be working. It crashes every time I try to run it.
Click to expand...
Click to collapse
Also thank you for your feedback. Using your feedback I discovered some nasty typos in my script which were breaking Chrome and Talkback.
I fixed those and will be uploading a new package later today. The fixes are already on github.
hellowasif said:
Yes that will be wonderful to work as a team and you count me in. :highfive:
Click to expand...
Click to collapse
Nice
Very happy to hear that! Tomorrow I will be heading for an island for a week, for holidays, so lucky for me, but unlucky for those interested in updates .
After that holiday I will set-up the basic infrastructure for the team.
I also thought about how to make packages for older android versions and I came up with the following solution that I will be then implementing next week:
*Within the SourceAPKs folder we will put some meta-data or an overlay that specifies the minimal SDK/API version that the package requires
*I will update the scripts in such a way that you can target various android versions, including such a sdk/api version.
*When building for a target, the highest version of the APK that still support that sdk/api version will be selected
*A seperate output directory will be created for each target
*All scripts will be executed from a single Makefile
E.g., the directory structure will look like:
SourceAPKs/18/com.google.android.apps.maps-9.8.1-908101124-minAPI18.apk
SourceAPKs/14/com.google.android.apps.books-3.3.41-30341-minAPI14.apk
Scripts/extract_sources.sh
Output/4.4/pa_unsigned.zip
Output/5.0/pa_unsigned.zip
Output/pa_gapps-4.4-20150504.zip
Output/pa_gapps-5.0-20150504.zip
Makefile
If anybody has any feedback on these ideas, you are welcome!
MastahF said:
Nice
Very happy to hear that! Tomorrow I will be heading for an island for a week, for holidays, so lucky for me, but unlucky for those interested in updates .
After that holiday I will set-up the basic infrastructure for the team.
I also thought about how to make packages for older android versions and I came up with the following solution that I will be then implementing next week:
*Within the SourceAPKs folder we will put some meta-data or an overlay that specifies the minimal SDK/API version that the package requires
*I will update the scripts in such a way that you can target various android versions, including such a sdk/api version.
*When building for a target, the highest version of the APK that still support that sdk/api version will be selected
*A seperate output directory will be created for each target
*All scripts will be executed from a single Makefile
E.g., the directory structure will look like:
SourceAPKs/18/com.google.android.apps.maps-9.8.1-908101124-minAPI18.apk
SourceAPKs/14/com.google.android.apps.books-3.3.41-30341-minAPI14.apk
Scripts/extract_sources.sh
Output/4.4/pa_unsigned.zip
Output/5.0/pa_unsigned.zip
Output/pa_gapps-4.4-20150504.zip
Output/pa_gapps-5.0-20150504.zip
Makefile
If anybody has any feedback on these ideas, you are welcome!
Click to expand...
Click to collapse
The idea of automating all the process is certainly good, but we have to keep in mind that things changes really fast. For example in an update Google can add a library to an application that previously didn't have one. We have to check if there's a lib folder inside the APK instead of assuming that all the APKs that now don't have libs will never have them. Also the idea of various app versions is very good, but also error prone. Maybe we can just put all the APKs in one folder and use the filename to determinate the app name and the minAPI (if we don't want to make a step further and read directly from the AndroidManifest.xml, using aapt).
MastahF said:
Thank you for your feedback, at the moment I was extracting the Play Store from a Nexus Image under the cryptic name of Phonesky.
I only found out just now that this Phonesky is the same as android.vending (the Play store) and updated this.
Also thank you for your feedback. Using your feedback I discovered some nasty typos in my script which were breaking Chrome and Talkback.
I fixed those and will be uploading a new package later today. The fixes are already on github.
Click to expand...
Click to collapse
latest commit:
$ sh make_package.sh
rm: missing operand
DJAlik said:
latest commit:
$ sh make_package.sh
rm: missing operand
Click to expand...
Click to collapse
You can ignore that error-message. I just delete all the temporary files of my text editor (ending with a ~) before packaging using this 'rm' command.
Rapper_skull said:
The idea of automating all the process is certainly good, but we have to keep in mind that things changes really fast. For example in an update Google can add a library to an application that previously didn't have one. We have to check if there's a lib folder inside the APK instead of assuming that all the APKs that now don't have libs will never have them. Also the idea of various app versions is very good, but also error prone. Maybe we can just put all the APKs in one folder and use the filename to determinate the app name and the minAPI (if we don't want to make a step further and read directly from the AndroidManifest.xml, using aapt).
Click to expand...
Click to collapse
Very good comments. I have been looking into the possibility of using aapt. With 'aapt d badging file.apk' I will be able to retrieve the API information and app/packagename from any apk.
Using this information I could make an add-script or an 'add-directory' that would scan any new apks and archives them automatically in a storage. This could help to maintain overview, and to automatically discard older versions of the app if the api-level is not changed. It could also allow for adminstation of x86 and arm64 packages in the tree.
So a 'storage' filetree could become in that case like:
/arm/packagename/api14/maps2.apk
/x86/packagename/api11/maps1.apk
/x86/packagename/api14/maps2.apk
My goal is also to indeed in the future to (more) automatically process the existence of a 'lib' and automatically incorporate into the output process. For this I will have (as within my goals set out for next week) to upgrade the process of generating the output folder. Because at this very moment the scripts still assume availability of (most of the) outputfolders to be there already.
MastahF said:
Very good comments. I have been looking into the possibility of using aapt. With 'aapt d badging file.apk' I will be able to retrieve the API information and app/packagename from any apk.
Using this information I could make an add-script or an 'add-directory' that would scan any new apks and archives them automatically in a storage. This could help to maintain overview, and to automatically discard older versions of the app if the api-level is not changed. It could also allow for adminstation of x86 and arm64 packages in the tree.
So a 'storage' filetree could become in that case like:
/arm/packagename/api14/maps2.apk
/x86/packagename/api11/maps1.apk
/x86/packagename/api14/maps2.apk
My goal is also to indeed in the future to (more) automatically process the existence of a 'lib' and automatically incorporate into the output process. For this I will have (as within my goals set out for next week) to upgrade the process of generating the output folder. Because at this very moment the scripts still assume availability of (most of the) outputfolders to be there already.
Click to expand...
Click to collapse
Exactly, in this way it would be possible to easily maintain arm64 and x86 packages too. The scripting is not complicated, it just requires some time. If you want I can contribute too (I had some experience with shell scripting). If the final scripts are not too long or complicated we can plan a Windows port too, if some future team member is not used to Linux.
We can also try to contact AP to request an RSS feed for new APKs on APKMirror.
EDIT: It seems that adding /feed to any URL will give you the corresponding RSS feed. Good to know.
Rapper_skull said:
Exactly, in this way it would be possible to easily maintain arm64 and x86 packages too. The scripting is not complicated, it just requires some time. If you want I can contribute too (I had some experience with shell scripting). If the final scripts are not too long or complicated we can plan a Windows port too, if some future team member is not used to Linux.
We can also try to contact AP to request an RSS feed for new APKs on APKMirror.
Click to expand...
Click to collapse
I've been using Cygwin on Windows and the scripts work great.

Debian Buster WSL2 Kernel / ROM Builder [replaces VM]

Okay I don't have enough time to update this whole description, no one volunteered to host the VM so now I only have a Debian Buster WSL2 (Windows 10 latest) build environment. You can make kernels and ROMs from it. It has a built in XFCE4 and all the features listed below. It will build kernels for you from source and place them in AnyKernel3 zip files ready for flashing in the ~/ directory. Build scripts are provided for Op8T 5G custom and GPUOC RadioActive Kernels from my GitHub (modded for performance + battery). You can use this guide and get full audio and a GUI and all you need to build.
Try out this build for Debian Buster for WSL2:
First you need to ensure you are on a recent build of Windows, go to windows Updates in settings and download the latest.
Next open a Powershell Command Prompt in Admin mode. Type:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Restart your PC, then get back into an Admin Powershell prompt and type:
wsl --set-default-version 2
Next you can download this tar.gz distribution, it's quite big (6GB zipped -> 14GB unzipped). Apparently you can import a tar.gz directly, so I changed it from a .zip file to .gz: https://mega.nz/file/DkARXIjD#hGu8TjxaA__YrRsfqfWJw9-2ViyyntyK5U8JdClor6A
Easily move WSL distributions between Windows 10 machines with import and export!
wsl --import <DistributionName> <InstallLocation> <Full path to .tar/.tar.gz FileName>
After import, you should type: login: user password: user (also the sudo password) change the Global Git settings to your own email and username.
Open the command line.
Set your username: git config --global user.name "FIRST_NAME LAST_NAME"
Set your email address: git config --global user.email "[email protected]"
Then if you want to set up SSH between your WSL2 instance and NoMachine, download NoMachine here for your host PC: https://www.nomachine.com/download/download&id=8 then follow the steps to generate an SSH key, which will be located at ~/.ssh.
ssh-keygen -m PEM -t rsa -b 4096
Use the directory default ~/.ssh/
Then copy this file: ~/.ssh/id_rsa.pub to ~/.nx/config/authorized.crt
In the NoMachine GUI, you should select Configuration, Use a key based authentication key which you provide, then provide the path to the private key \\wsl$\debian\home\user\.ssh\id_rsa and check the box Import the key to the connection file.
To get to the XFCE4 GUI, you should type login: user password: user, then run /.nomachine.sh
It will post the IPV6 address you need to enter into the configuration into NoMachine on Windows 10. It changes every time you open it (WSL2 problem).
Now you should be able to connect to the GUI and use all the dev tools built in. Or you can just use the command line if you're more comfortable there. You'll probably need to do some more Googling to get everything setup the way you like. There are 2 examples in this file for an Op8T RadioActive modded kernel from my GitHub repos with a ./Build-Clang12.sh script you can use to see how to build a kernel. It it fully automatic. It will generate the zip specified in that file in the ~/ directory which can be flashed to a device via EX Kernel Manager or FK Kernel Manager. Best of luck!
Great job mate. I hope this is the kick off and boost up kernel development on the MI9 ??
Now THAT is what XDA is all about.
I'd like to get in to this type of development but simply don't have the personal time right now.
Hope this helps boost community support a bit.
This must've taken some time. Hats off to you sir.
kickassdave said:
Now THAT is what XDA is all about.
I'd like to get in to this type of development but simply don't have the personal time right now.
Hope this helps boost community support a bit.
This must've taken some time. Hats off to you sir.
Click to expand...
Click to collapse
Thanks Dave - this is the absolute easiest way to build a kernel. Yes it took forever to get working, a lot had to do with bad Xiaomi source code and Android 9 package requirements for building kernels. You can simply download, install, click Goto Build, click on QClang8_Build, copy/paste it's text from Geany into the open terminal, sit back and wait for the build to finish. Then once it completes, you click on Built Kernels and you have your image ready. A few more steps obviously outlined in the post to transfer to the host machine (cp Image-dtb /media/sf_VMxfer) and pack via Android Image Kitchen, copy to the device, and flash via TWRP. Most features require Magisk patching as well to enable altering in a kernel manager. The mentioned repo (mrslezak) has Fsync toggle, 830GPU overclock, and F2FS file system support (Mauro TWRP has just enabled it, so I'm using it now). I should note as well that this kernel has only been tested on MIUI and Xiaomi.eu builds thus far (anything based on Xiaomi MIUI should work - MIUI Global Dev, China Dev, Xiaomi.eu, MiGlobe, RevolutionOS, etc. as long as it is Android Pie).
I'm waiting on others to jump on board!!!! Hopefully it happens
Excellent guide, will work for almost all pie devices!
Great work OP :highfive:
Regards,
acervenky
Hi, @mslezak @acervenky Can you help me to build kernel for Stock Miui 10 for K20/Mi9t . I followed your guide setup all requirement i just changed the device code name from cepheus to davinci everything went well kernel complied and also created the boot.img with AIK but after flash it is through back me to recovery.
Can you Please help me with this.
@acervenky fixed that by applying the patch in the Desktop Mi9_Build_Tools/Required_Patches_to_Compile_Xiaomi_Source/cosmin_kernel-module.c copy that to /kernel/module.c, he can chime in here. Or check out his repo he has one on Github that compiles already QUAX kernel I believe with a bunch of stuff added already over stock.
Good job. Compiled a kernel for mi9t pro (raphael) with your detailed guide.
Can you help with "make modules" command?
I need to make xt_HL.ko module, but it not compiling ((
Not needed anymore, made it successfully.
Can you compile q kernels with this?
asgardpark said:
Can you compile q kernels with this?
Click to expand...
Click to collapse
Yes! Just don't replace .dtsi and module.c files for now.
Regards,
acervenky
New Q build VM coming soon. GCC10 x64 and Arter97 GCC9 x32 toolchain.
Just a notice here I have a VM almost ready to upload that can build Mi9 source. It's a ton of patches to stock code but I'll setup a repo with them already applied.
Can i use anykernel to make a flashable zip? Or do i have to use a diffrent approach?
https://mega.nz/#!voJEGIRC!r4FcV6zUlVbFExcidhL9JmgVZlu3IscYH-S5XlnTUJI Android Q VM - expands to 40gb on your hard drive so you don't run out of space. Builds a GCC10 patched version of Xiaomi Cepheus and Raphael kernels from my repo, forked from Xiaomi and commits outlining every step needed to get it to build. https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10
Yes AnyKernel3 is the easiest
asgardpark said:
Can i use anykernel to make a flashable zip? Or do i have to use a diffrent approach?
Click to expand...
Click to collapse
Sure AnyKernel3 is easy, take someone's kernel zip, insert your Image-gz.dtb or Image-dtb into the root of the zip, delete the other kernel, and you should be able to flash it.
got some compile errors today when i tried your wm
/home/user/toolchains/aarch64-linux-elf/bin/aarch64-linux-elf-ar: kernel/resource.o: No such file or directory
I'd first try a: make clean; and: make mrproper;....
But here's more info:
Double click the GoTo Build icon, a terminal will open in the source directory. Then in the terminal: cp /home/user/Desktop/Build GCC10 Cepheus.sh .; chmod +x "Build GCC10 Cepheus.sh"; ./"Build GCC10 Cepheus.sh"; Once done the kernel will be in /home/user/Cepheus-Raphael-Q-GCC10/out/arch/arm64/boot/Image.gz-dtb. /out9TP/ for Raphael, just substitute the build script you need.
If it then still won't build, you'll have to grab the repo again. Type: git pull
Or the safest is a complete re-download: cd ..; rm -rf Cepheus-Raphael-Q-GCC10; git clone --depth=1 https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10.git and repeat the prior copying of the build script to the source directory.
I tested this last night and it worked. If I tried to just drag the script into a terminal window it failed. There could be some dirty files in there not sure how that happened, but deleting and cloning again definitely works. I built both Cepheus and Raphael kernels last night in the VM off a fresh clone of the repo. I'd update I but it literally takes 6hrs + since the files are huge and take forever to compress and upload to Mega. And I have to delete so much off my VM and SSD just to do it. This way you learn something too
I first drag n dropped the file when i got the error, then i remembered when i compiled kernels for my raspberry pi's it also failed if i draged n dropped my build script so i did it the proper way and it worked
Thanks for your WM it's working great
mslezak said:
https://mega.nz/#!voJEGIRC!r4FcV6zUlVbFExcidhL9JmgVZlu3IscYH-S5XlnTUJI Android Q VM - expands to 40gb on your hard drive so you don't run out of space. Builds a GCC10 patched version of Xiaomi Cepheus and Raphael kernels from my repo, forked from Xiaomi and commits outlining every step needed to get it to build. https://github.com/mrslezak/Cepheus-Raphael-Q-GCC10
Click to expand...
Click to collapse
Could you upload the VM to Google Driver? Thank you!
q659503934 said:
Could you upload the VM to Google Driver? Thank you!
Click to expand...
Click to collapse
Yeah if you buy me Google drive space I'd be more than happy to upload to Google Drive. I'm out of space man. If you run Windows 10 Preview WSL2 I have a 3.2GB build that kills everything else out there.
mslezak said:
Yeah if you buy me Google drive space I'd be more than happy to upload to Google Drive. I'm out of space man. If you run Windows 10 Preview WSL2 I have a 3.2GB build that kills everything else out there.
Click to expand...
Click to collapse
Do you have WSL2 tar file that can build Kernel?

AUTOMATER for ROMs

AUTOMATER​One command automation for most things​
Well, being a ROM developer/maintainer, we spend time in uselessly cloning trees, giving build commands, going through build logs to see where the error is and in the end upload the files and manually get links. And there is no denying that all of this is time consuming. So I made a program to do all of this automagically for you
This program can do:
Trigger the build of your ROM
Send message about the build status
Upload the build and target files to any SFTP client
Send you the direct download links
Send the build log
If the build fails, abort other statements, and send you trimmed build logs
Clean everything and restore the server to the previous state
Can be integrated with Jenkins to provide 1 click builds
Some other miscellanous functionality
Now, moving on to how to use it. This needs you to clone the given source into the scripts folder, which should be located inside the ROM directory. Also, the script assumes that you have clone your ROM sources inside a folder placed in the home directory.
The script is executed by the command :
Code:
devicename="yourdevicebuildname" bash scripts/CI/main.sh
You need to add some stuff in the main.sh file located inside the scripts/CI folder before you can actually use this. They are:
Your telegram CHAT_ID, the place where you will recive all the info
Your BOT API KEY, make a bot through BotFather on Telegram and paste the key
Your SFTP client username, I prefer Sourceforge
Your SFTP client password, once again, I prefer Sourceforge
If you want some other client, you have to alter the rom.py and tgt.py where you can write the client name of your choice.
Also, this script is pre-configured for CygnusOS. So naturally, you will want it for your ROM, to replace the variables, you can just run
Code:
sed -i -e "s/cygnus/your_rom_name/g" $(grep -RI cygnus $(ls)) && sed -i -e "s/Cygnus/Your_rom_name/g" $(grep -RI Cygnus $(ls))
NOTE: CYGNUS GENERATES THE ROM ZIP IN THE ROM DIRECTORY ITSELF INSTEAD OF THE USUAL OUT/TARGET ETC ETC PATH, SO YOU NEED TO CHANGE THE ROM.PY AS FOLLOWS:
Code:
Find the "." and replace it with out/target/product/"+devicename+"/ "
Also, edit the localfilepath to "out/target/product/"+devicename+"/"+name
That's it guys! Now just take a deep breath and leave it all, the script will do everything for you and even remove the generated zip! Yeah, make clean if that's what you wanna hear :laugh:
Hit the thanks button if you find this helpful
Also, if you wanna support me, buy me a cup of coffee
PayPal
XDA:DevDB Information
AUTOMATER for ROMs, Tool/Utility for all devices (see above for details)
Contributors
Dhruvgera
Source Code: [url]https://github.com/Dhruvgera/custom_python_scripts[/URL]
Version Information
Status: Stable
Current Stable Version: v1.0
Stable Release Date: 2020-04-02
Created 2020-04-02
Last Updated 2020-04-02
Congratulations !!!
Great work
Ragy747 said:
Great work
Click to expand...
Click to collapse
:good:
Uwu
PERU
blitzfire3 said:
PERU
Click to expand...
Click to collapse
U Too
great work sir, and thanks.
Peru as heck

Categories

Resources