[Q][Noob] How to build an .apk (Keyguard) from source ? - Android Q&A, Help & Troubleshooting

Hi everyone,
i've downloaded keyguard source from AOSB Github (https://github.com/AOSB/android_frameworks_base/tree/kitkat/packages/Keyguard), and after made all changes i need, i would like to compile/build it as an .apk, but i don't know how to do that
Someone can help me please ?
I'm using Windows.
I will be grateful to people who give me answers

Android Studio ☺

worf_1977 said:
Android Studio ☺
Click to expand...
Click to collapse
Thank you for your help.
But i when i try to build it, i've git an error and it says:
Error:FAILURE: Build failed with an exception.
* What went wrong:
Task 'assemble' not found in root project 'Keyguard'.
* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Click to expand...
Click to collapse
Any idea ? :/
EDIT: I solved it; but after make project, i don't know where is my apk :X
EDIT²: When i try to build it with eclipse, i've got 1271 errors

Bump, any other ideas ? :/

It should be placed into your $OUT folder, whatever would it be...

Related

[Q] Compiling a certain part of the source code

Hello,
Suppose I have a bootmenu source code( from CM7 repo for example ), how can I compile it alone( without having to compile entire CM source code )?
Thanks, Joe.
Try make bootimage
Herpderp Defy.
make bootimage didn't work - no rule for creating bootimage.
Just one more question: If I don't want to download the entire code, just to compile a very small piece of it( which contains Android.mk ), how can I do it?
That piece must have a git behind it.
Try make --help
Greets!
I'm not a fake.
I prefer people to reply to me and give feedback instead of thanking me!
But thanking me does show if you apreciate my works.
It does, for example android_Framework_base
What do I do then?
You can do that, the android build system is tightly integrated, and you cant just build anything indepently
But if you have the full source, u can cd to the dir and use this command "mm"
UNknown command.
Lunched and . Build/envsetup before?
Greets!
I'm not a fake.
I prefer people to reply to me and give feedback instead of thanking me!
But thanking me does show if you apreciate my works.
mDroidd said:
Lunched and . Build/envsetup before?
Greets!
I'm not a fake.
I prefer people to reply to me and give feedback instead of thanking me!
But thanking me does show if you apreciate my works.
Click to expand...
Click to collapse
Yes, but it failed, so no.
GodSlayer said:
Yes, but it failed, so no.
Click to expand...
Click to collapse
Ubuntu 10.04 64-bit?
Greets!
I'm not a fake.
I prefer people to reply to me and give feedback instead of thanking me!
But thanking me does show if you apreciate my works.
mDroidd said:
Ubuntu 10.04 64-bit?
Greets!
I'm not a fake.
I prefer people to reply to me and give feedback instead of thanking me!
But thanking me does show if you apreciate my works.
Click to expand...
Click to collapse
Now, yes. I am still struggling to get it working, the repo sync always fails on me. Isn't there an easier way to download the source code?
GodSlayer said:
Now, yes. I am still struggling to get it working, the repo sync always fails on me. Isn't there an easier way to download the source code?
Click to expand...
Click to collapse
Nope...
Greets!
I'm not a fake.
I prefer people to reply to me and give feedback instead of thanking me!
But thanking me does show if you apreciate my works.
OK, So I've compiled the AOSP. mm is not working.
How can I compile the apps via Eclipse? It gives me thousands of errors.
My bad, was a typo, its mmm
So - do this
cd <source dir>
. build/envsetup.sh
lunch (select your device - or maguro/crespo would be fine)
mmm packages/apps/<app u wanna compile>
It'll compile, when done, check out/target/product/<device>/system/app/<app>.apk
cdesai said:
My bad, was a typo, its mmm
So - do this
cd <source dir>
. build/envsetup.sh
lunch (select your device - or maguro/crespo would be fine)
mmm packages/apps/<app u wanna compile>
It'll compile, when done, check out/target/product/<device>/system/app/<app>.apk
Click to expand...
Click to collapse
Thank you so much! I already figured out how to compile apps( make Settings/etc ), but this works for everything there.
And as for my second question - HOw can I insert a single app into eclipse? I tried to add the classes-full-debug.jar, but I still get some errors like missing classes and things like that.
Any solutioN?

[Q] Trying to download file from Android Git

Hi friends.
I want to modify the stock Launcher 4.2.2 APK to make the search bar look like it was in 4.0.4.
I need to download a file that was between Android versions. It is in Android Git in binary file, but I don't know how to get it.
The link is: https://android.googlesource.com/pl...d6/res/drawable-land-xhdpi/workspace_bg.9.png
Can anyone help me to get it?
Thank you.
To download a git repository put the command on Linux Terminal:
git clone url_to_repository
Or try to use a SVN software on Windows (Like TortoiseSVN)
Thank you friend for your response!
Unfortunately, I get this:
$ git clone https://android.googlesource.com/platform/packages/apps/Launcher2/+
/cc216bf678b05dbe25fd4e5d5c87359ae12658d6/res/drawable-land-xhdpi/workspace_bg.
9.png
Cloning into 'workspace_bg.9.png'...
fatal: remote error: Git repository not found
Click to expand...
Click to collapse
Raikkon35 said:
Thank you friend for your response!
Unfortunately, I get this:
Click to expand...
Click to collapse
That's because there is nothing @ https://android.googlesource.com/platform/packages/apps/Launcher2/+ .... Just put it in a browser and see, you'll get a 404 Not Found Error ... Check the URL and then try again ...
This means the file I want doesn't exists? It's strange, because in the URL that I put in the first post, appears it's size and all.
Thank you!

[Q] Build CyanogenMod 12.1 (Copy proprietary vendor files)

Hey. I am following modpunk tread on CM 12.1 build for Samsung Galaxy Alpha.
I have done almost all the steps in the README.
Now I wonder how I copy proprietary vendor files.
The README only tell me to run "./extract-files.sh", cant find where this hidden file is located.
Here is the steps in the README;
git.cryptomilk.org/projects/android/android_device_samsung_slte.git/tree/README?h=cm-12.1
Thanks in advance.
protruckker said:
Hey. I am following modpunk tread on CM 12.1 build for Samsung Galaxy Alpha.
I have done almost all the steps in the README.
Now I wonder how I copy proprietary vendor files.
The README only tell me to run "./extract-files.sh", cant find where this hidden file is located.
Here is the steps in the README;
git.cryptomilk.org/projects/android/android_device_samsung_slte.git/tree/README?h=cm-12.1
Thanks in advance.
Click to expand...
Click to collapse
http://wiki.cyanogenmod.org/w/Build_for_klte Just one as an example, I'm using klte.
The guide states you can find it under
SOURCECODEFOLDER/device/Samsung/CODENAME
Where SOURCECODEFOLDER is the folder where you downloaded the cyanogenmod source code (repo sync) and CODENAME is the code name for your device.
For Samsung devices, if you are getting any errors related to the building of some system applications like "TimeService.apk", I'd suggest you to use the files hoted at " TheMuppets" github repository.
I have done the "repo sync". After this big download I am going to directory:
"cyanogenmod/system/device/"
In this directory I only have these folders:
Common, Generic, Google, Qcom and Sample
protruckker said:
I have done the "repo sync". After this big download I am going to directory:
"cyanogenmod/system/device/"
In this directory I only have these folders:
Common, Generic, Google, Qcom and Sample
Click to expand...
Click to collapse
Can you put the link of the guide you are trying to follow? It seems like you are missing the step "breakfast", probably because there's no official build for your device. You are trying to port cyanogenmod, right?
Inviato dal mio SM-G900F utilizzando Tapatalk
Ciuffy said:
Can you put the link of the guide you are trying to follow? It seems like you are missing the step "breakfast", probably because there's no official build for your device. You are trying to port cyanogenmod, right?
Inviato dal mio SM-G900F utilizzando Tapatalk
Click to expand...
Click to collapse
yep, I am trying to port it.
Here is the "guide" I am following. Its just a readme with the build steps.
URL:
git.cryptomilk.org/projects/android/android_device_samsung_slte.git/tree/README?h=cm-12.1
protruckker said:
yep, I am trying to port it.
Here is the "guide" I am following. Its just a readme with the build steps.
URL:
git.cryptomilk.org/projects/android/android_device_samsung_slte.git/tree/README?h=cm-12.1
Click to expand...
Click to collapse
Not a definitive answer, but it looks like something has gone wrong with your syncing. As you can see from the readme, the manifest should include "projects/android/android_device_samsung_slte.git" and
"projects/android/android_kernel_samsung_slte.git". By looking at the file tree of the _device_ one, there is actually a file called "extract-files.sh". Use an utility like "locate" or a search bar in your desktop manager to see if you actually have this file, as the repo sync should have cloned the git repository!
Ciuffy said:
Not a definitive answer, but it looks like something has gone wrong with your syncing. As you can see from the readme, the manifest should include "projects/android/android_device_samsung_slte.git" and
"projects/android/android_kernel_samsung_slte.git". By looking at the file tree of the _device_ one, there is actually a file called "extract-files.sh". Use an utility like "locate" or a search bar in your desktop manager to see if you actually have this file, as the repo sync should have cloned the git repository!
Click to expand...
Click to collapse
I think I have found the problem. I did spell a folder name wrong. Think thats it.
protruckker said:
The repo is about 50 Gb so should I try to sync it again?
Click to expand...
Click to collapse
50? You sure? Have you tried using the -c option while syncing? My CM 12.1 source code is working and it's "merely" 25 GBs or less.
Anyway, if you are missing *every* file from that git repo, you definetely should. Make also sure the manifest file that the readme tells you to create includes everything as shown! Check first if you are missing only some files... At the very least, you might just download the missing extract-files from that git repo.
Ciuffy said:
50? You sure? Have you tried using the -c option while syncing? My CM 12.1 source code is working and it's "merely" 25 GBs or less.
Anyway, if you are missing *every* file from that git repo, you definetely should. Make also sure the manifest file that the readme tells you to create includes everything as shown! Check first if you are missing only some files... At the very least, you might just download the missing extract-files from that git repo.
Click to expand...
Click to collapse
The problem was that I spelled the "local_manifests" folder wrong.
Now I have a "Samsung" folder in there.
Thanks
protruckker said:
The problem was that I spelled the "local_manifests" folder wrong.
Now I have a "Samsung" folder in there.
Thanks
Click to expand...
Click to collapse
Great! Have fun with your ported Cyanogenmod. Glad I could help.
We have a button dedicated just to thanks!

How do you merge a mod with the apk?

Hi everyone, I was trying to use this mod ( WAMOD, you can find it in github by Brian Valente ) but in order to use it, I have to merge the mod with the apk, I can decompile the apk but then I dont know how to merge the apk with the mod. Thanks.
pasatmalo said:
Hi everyone, I was trying to use this mod ( WAMOD, you can find it in github by Brian Valente ) but in order to use it, I have to merge the mod with the apk, I can decompile the apk but then I dont know how to merge the apk with the mod. Thanks.
Click to expand...
Click to collapse
Hello and welcome to the XDA Forums!
The WAMOD you are talking about is a mod that seems like a nice concept, so I understand you'd like to get it. Hopefully this can answer your questions regarding on how to merge the apk with the mod since you'll have to understand some parts of smali. You'll also need android studio (Google how to get that) and the java development kit (get it before installing android studio from here) to compile the WAMOD from the source (in this case, github!) so you can decompile and get the smali code.
Hope that helps and leave a thanks if it did
RAZERZDAHACKER said:
Hello and welcome to the XDA Forums!
The WAMOD you are talking about is a mod that seems like a nice concept, so I understand you'd like to get it. Hopefully this can answer your questions regarding on how to merge the apk with the mod since you'll have to understand some parts of smali. You'll also need android studio (Google how to get that) and the java development kit (get it before installing android studio from here) to compile the WAMOD from the source (in this case, github!) so you can decompile and get the smali code.
Hope that helps and leave a thanks if it did
Click to expand...
Click to collapse
Hi, I already have android studio and java development kit. So now what should I do exctly? Thanks.
pasatmalo said:
Hi, I already have android studio and java development kit. So now what should I do exctly? Thanks.
Click to expand...
Click to collapse
Follow the links I refered to in my post .
RAZERZDAHACKER said:
Follow the links I refered to in my post .
Click to expand...
Click to collapse
Ok, I postes It before I read It, I cant Download your tool, anyway to compile It Will do?

Android kernel build error

I get this error when I run make command while compiling Android kernel. Please help me.
kurtulus145 said:
I get this error when I run make command while compiling Android kernel. Please help me.
Click to expand...
Click to collapse
Send a text file containing the entire log right from command execution or .sh file execution. Also which phone and processor are u developing on?
KingRaheel said:
Send a text file containing the entire log right from command execution or .sh file execution. Also which phone and processor are u developing on?
Click to expand...
Click to collapse
I upload on attachments.
Device: Asus Memopad 7 ME176CX
Processor: Intel Atom Z3745
kurtulus145 said:
I upload on attachments.
Device: Asus Memopad 7 ME176CX
Processor: Intel Atom Z3745
Click to expand...
Click to collapse
Did u try compiling again using a fresh copy of source? What exact changes did u make? Did u use menuconfig command? Is your source code on github? You should tell all this when u need help else we may not be able to help u out efficiently.
KingRaheel said:
Did u try compiling again using a fresh copy of source? What exact changes did u make? Did u use menuconfig command? Is your source code on github? You should tell all this when u need help else we may not be able to help u out efficiently.
Click to expand...
Click to collapse
No other source file is available. I have not made any changes to the source code. I have edited some things with menuconfig command. No source code in Github. I downloaded it from Asus's site.
kurtulus145 said:
No other source file is available. I have not made any changes to the source code. I have edited some things with menuconfig command. No source code in Github. I downloaded it from Asus's site.
Click to expand...
Click to collapse
What i meant by fresh copy is the downloaded kernel files from asus website which has no alterations done by youto it. Try compiling it without doing any changes using menuconfig or any other command and see if u get the zImage. If u do then use menuconfig and apply one change at a time,compile and see if it causes issues. From your log its clear that some change has caused instability to most of the kernel modules. Kernel building is not easy.
If u want attention of other developers then upload your source code on github and post link here. Can't assure attention but it may help:good:
KingRaheel said:
What i meant by fresh copy is the downloaded kernel files from asus website which has no alterations done by youto it. Try compiling it without doing any changes using menuconfig or any other command and see if u get the zImage. If u do then use menuconfig and apply one change at a time,compile and see if it causes issues. From your log its clear that some change has caused instability to most of the kernel modules. Kernel building is not easy.
If u want attention of other developers then upload your source code on github and post link here. Can't assure attention but it may help:good:
Click to expand...
Click to collapse
I tried the make command without making any changes with the menuconfig command. I got the same error again. I upload source code on GitHub.
I uploaded github.
Link:https://github.com/kurtulus145/k013_kernel
Help!!!

Categories

Resources