[Q] Build APK from AOSP - Android Q&A, Help & Troubleshooting

Hello,
I am new to Android Dev. I'm following the bitfountain tutorial but am still a long ways away from efficient
I would like to create an app that mimics the PIN lockscreen from AOSP (just the look and feel, it doesn't need to actually lock the device although it would be a plus ).
Could you give me pointers on how to extract what is needed from
android/platform_frameworks_base/tree/master/packages/Keyguard
and get it to work as an apk ?
Thanks a lot

Related

[Q] Combining UI elements of different ROMS

I am looking to combine various UI features of different ROMS together. For example, I like how with Liquid ROM (http://forum.xda-developers.com/showthread.php?t=920804) you can swipe left from the homescreen to access your Recent History of apps, and you can swipe right to access your Media. I want to somehow integrate that into the MIUI ROM, but I have no idea how to start. I just rooted & flashed my first ROM on my HTC Dinc yesterday, so I am very much so a beginner.
Eventually I want to create an awesome ROM that I can share with the community.
Any help would be greatly appreciated.
first you should learn about cooking a rom
so you can get an idea of whats included in a rom
then you should learn how to build aosp roms
thats the best place to start.
it would be almost impossible for anybody to just jump in and start
integrating UIs.
OK thank you.
I've used dsixda's kitchen (http://forum.xda-developers.com/showthread.php?t=633246) to cook my own versions of both the MIUI and Liquid ROMs, basically just moving apps from /system/apps to /data/apps just so I could have the option to uninstall them. I checked around the file system and there is a lot of stuff there, so I would really like to figure out what to look for in each directory. Do you have any resources/links for me to accelerate my learning?

[Q] Follow this tut to make custom ROM???

I'm looking at making a custom ROM for my Desire HD from the stock rom (If i was able to port ICS that would be great but I'm not sure how much more complex that would be) and I'm pretty n00b. I was planning on following this http://forum.xda-developers.com/showthread.php?t=1661770
and was wondering if for someone with basic software knowledge, that this would be a good guide to follow?
I just want to take the official ROM my service provider has, rip out anything i deem as bloatware, add MIUI's skin customiser (or get a tool that converts MIUI skins to something I can use), a traffic monitor, password protect my messages and preinstall some apps.
Please and thank-you in advance.
you cant blindly follow that tutorial all you need for a basic rom good knowledge of softwares and pc.....tools which google can provide...creativity....basic knowledge of what means what and understanding code....if you want more details be more specific sir.....
http://forum.xda-developers.com/showthread.php?t=1414534&page=3
this is for my device it covers up the basic parts adding removing system apps,changing bootanime sound etc.......

Making a custom rom with using android source codes

Hi guys,
I need help. Really I have search on google again again and again but I couldn't find anything about this topic..
My government gave us galaxy (10.1) tablets instead of books. But unfortunately this tablets's OS is not a normal android 3.2; It has been customized and we can't access many applications or other thinks. So I've decided to make a new custom rom for this tablets to offer in a competition of project. I have 2,5 months for this competition and I should make this rom so I need help. I've downloaded the android source (I want to work on 4.1jb) It is 4.2gb on my ubuntu 12.04 and I don't understand anything till see your answer on stackoverflow. I read and have some knowledge about system but It is not enough.. I know c# lang and I know general coding for 4 years.
I should edit the launcher (I said desktop but I don't know how calls It..). It has programs and widgets tabs and I want to put a new tab here. And anyone cannot see programs and widgets tab without any permission. This permission will give students's tablets by teacher ('s tablet). So, students can't play anything in the lesson but when it is over, stundents can play anything what they want.. Teacher will give the permission before leaving class..
This is what I want to do.. Briefly, I want to make a custom rom but directly using android source codes.Because I think I can't make this rom with using kitchen or just editing .apk files..
Thank you for your help..
Go to chef central in XDA forums it's very interesting (read all stickies), build a good kitchen and start building. Take some CM things to build a great ROM.
Sent from my RK29 tab...
I have thought It cannot work, haven't it?
Because I want to make a custom rom with using details. Not just editing .apk packages etc.. I looked for kitchen when I begin to make costum rom but kitchens don't satiate me.
Do you think again I should look kitchens ?
dmrc1143 said:
I have thought It cannot work, haven't it?
Because I want to make a custom rom with using details. Not just editing .apk packages etc.. I looked for kitchen when I begin to make costum rom but kitchens don't satiate me.
Do you think again I should look kitchens ?
Click to expand...
Click to collapse
If you are editing the source code you are doing more than modding apks. What I recommend to you is start building a Android with main features for example low requirements. Then you start deleting all those stuff you don't need building a very small Android. Then you modify system ui like appearance and themes and you start adding those great developer community apps. Those steps are easy for start then you'll modify those great things. And if you have time you should create a project web page in Google developers and start getting support and testers. Also if you post here your Roms you'll gain experienced developer support.
Remember you are building a Android Room not a new OS. Start modding and removing not useful stuff.
If it helps give thanks ! :thumbup:
Edit: I also recommend you if it's possible to don't work with Honeycomb... If you wanna get good results use Jelly Bean or Ice Cream Sandwich.
Sent from my RK29 tab...
SferaDev said:
...Remember you are building a Android Room not a new OS. Start modding and removing not useful stuff.
If it helps give thanks ! :thumbup:
Edit: I also recommend you if it's possible to don't work with Honeycomb... If you wanna get good results use Jelly Bean or Ice Cream Sandwich.
Sent from my RK29 tab...
Click to expand...
Click to collapse
Yes, I'm just editing an android rom not making a new OS. And I'm not working on Honeycomb. I got the source of JB.
Okey, I'll start doing your thinks. But I've an idea and if you know, please help..
Yes, I don't have to edit source code and it seems very hard to do. But I thought making a new tab panel like this panels top of JB. Check it.
http://androidplus.in/wp-content/uploads/2012/08/Jelly-Bean-Apex-theme.jpg
There are apps, downloaded, widgets tab panels on top. If I can add a new panel just with coding a new app. (not editing the source), It would be a solution for me. The panel that I'll add (let's call it education panel) have to open and close with my command (the command that comes from teacher in realty). If the command doesn't let the user of tablet to switch other panels, user can't switch. The education panel is like apps panel and contains some essential tools (like e-book, notepad, some videos about education etc.). Do you have an idea how can I do? or can I do this with just an application?
Please give me knowledge.. (Again I don't have to edit source code (like you've said) if I find this quests answer.)
Ok let's remember how Android it's divided...
I think you must modify for this launcher and systemui, if I'm not wrong. You must deodex the files inside the app package to build the eclipse project.
Good to know you aren't working with Honeycomb
Sent from my RK29 tab...
I was reading out in Android Dev forums and those links are useful to you:
http://forum.xda-developers.com/showthread.php?t=1732635
http://forum.xda-developers.com/showthread.php?t=1814441
Click to expand...
Click to collapse
Sent from my RK29 tab...
Got it. Thank you.
I was (am) busy for this job so I can answer now
dmrc1143 said:
Got it. Thank you.
I was (am) busy for this job so I can answer now
Click to expand...
Click to collapse
For anything you need !
Sent from my RK29 tab...

[Q] New rom (or just launcher)?

The first thing I want to say is that my English is not really good. I hope you understand my questions.
I have an idea for a new Android rom, but I'm faced with a dilemma. I want to have as much as possible supported devices, so I also can just build a launcher apk which can be installed through Google Play. In this way all mobile devices with the minimal platform version can use it. The biggest problem is that I don't only want a replacement for the application launcher but also the notification drawer and everything else. Is it possible to replace them also? I don't think so, so I think I'll work on a custom rom.
The next problem is which base rom I would use if I really build a custom rom. It's most likely to use AOSP as base because it's clean. The question is which version of AOSP: Gingerbread, Ice Cream Sandwich, or the newest version Jelly Bean. You would probably say Jelly Bean because this is the newest version. The problem is the phone support. Gingerbread is supported on most phones. If I build ICS or JB the phones which are supported by Cyanogenmod are easy to support, because I can use their device files. The only problem is that my phone, the Samsung Galaxy Gio is not officially supported and the unofficial port is not really stable. I don't think it's a big problem to use this device files and just wait till the developer makes it more stable, but I don't know for sure.
The last thing I want to know is if it's really that simple to support multiple devices. If I read tutorials about porting existing roms to your device they all say you just have to add your device files to the source and compile it. But they never say something about the kernel. Most devices need another kernel because their hardware is different isn't it? Please explain me how this works.
I'm sorry about this hazy story, but please help me before I make wrong choices. Thanks on purpose.
Wietse
WietsedeVries said:
The biggest problem is that I don't only want a replacement for the application launcher but also the notification drawer and everything else. Is it possible to replace them also? I don't think so, so I think I'll work on a custom rom.
Click to expand...
Click to collapse
These changes you are talking about can be done. They are system changes so not supported by the android app installer.
Eg: Your notification drawer, status bar are part of SystemUI.apk. The source for this is can be found in the AOSP source code under android/frameworks/base/...
You can make your modifications, compile it into an apk and then make a flashable zip to replace the current one (or push it via a rooted adb console).
or you can compile the entire source code into a flashable zip (eg CM7,9 etc..) and use it a replacement ROM with your modifications.
This is the line between an application under the android runtime and the android runtime itself.
these files, under framework are part of the OS. so to provide a customized version of the operating itself is what people like to call ROMs.
Now ROMs (like any OS) are device dependant. Windows has the code to run in a lot of different hardware configs, but android aims to be small. It should have only the minimum required code to efficiently run itself on a device.
Thats the kernel. The kernel communicates with the hardware and so the rest of the hardware can happily talk to a working kernel and expect the hardware to function as advertised. Kernel is a simple program which goes into the RAM on system start and sits there directing the operation of the phone.
Kernel devs work on making sure the hardware and the android runtime work perfectly together. Now, in this imperfect world, not all sources are open, even though they should be. and therein the issue lies.
If you want to compile android from source and make sure it works on your phone, first you need to make sure you have the kernel with all the changes(patches) to it made by the vendor (chap who made the phone and bullied you into buying it) to get it working on your hardware.
If you dont have that, you have to do it yourself. Or wait for someone else to do it.
once you can compile android and get it working on your phone with all the itty bitty hardware working A-OK.. then you can browse through the source, make changes as per your individual requirements and compile it into a ROM.
see the changes to the OS are separate from the changes to the kernel. The kernel changes are for hardware-software interaction so they are phone SPECIFIC.
but changes to your custom android OS (ROM) can be "cherry-picked" from other ROM/gerrit/AOSP/CM/AOKP sources and put inside your own source tree to get included in your build.
so if you have all the device / kernel stuff from a working android distribution, you can take the source of another android distribution and swap the device stuff into it and see if it works.
hope this helps.
wingie6200 said:
These changes you are talking about can be done. They are system changes so not supported by the android app installer.
Eg: Your notification drawer, status bar are part of SystemUI.apk. The source for this is can be found in the AOSP source code under android/frameworks/base/...
You can make your modifications, compile it into an apk and then make a flashable zip to replace the current one (or push it via a rooted adb console).
or you can compile the entire source code into a flashable zip (eg CM7,9 etc..) and use it a replacement ROM with your modifications.
This is the line between an application under the android runtime and the android runtime itself.
these files, under framework are part of the OS. so to provide a customized version of the operating itself is what people like to call ROMs.
Now ROMs (like any OS) are device dependant. Windows has the code to run in a lot of different hardware configs, but android aims to be small. It should have only the minimum required code to efficiently run itself on a device.
Thats the kernel. The kernel communicates with the hardware and so the rest of the hardware can happily talk to a working kernel and expect the hardware to function as advertised. Kernel is a simple program which goes into the RAM on system start and sits there directing the operation of the phone.
Kernel devs work on making sure the hardware and the android runtime work perfectly together. Now, in this imperfect world, not all sources are open, even though they should be. and therein the issue lies.
If you want to compile android from source and make sure it works on your phone, first you need to make sure you have the kernel with all the changes(patches) to it made by the vendor (chap who made the phone and bullied you into buying it) to get it working on your hardware.
If you dont have that, you have to do it yourself. Or wait for someone else to do it.
once you can compile android and get it working on your phone with all the itty bitty hardware working A-OK.. then you can browse through the source, make changes as per your individual requirements and compile it into a ROM.
see the changes to the OS are separate from the changes to the kernel. The kernel changes are for hardware-software interaction so they are phone SPECIFIC.
but changes to your custom android OS (ROM) can be "cherry-picked" from other ROM/gerrit/AOSP/CM/AOKP sources and put inside your own source tree to get included in your build.
so if you have all the device / kernel stuff from a working android distribution, you can take the source of another android distribution and swap the device stuff into it and see if it works.
hope this helps.
Click to expand...
Click to collapse
Thank you very very much for your explanation! It's a pity it's impossible to hit multiple times "Thanks".
I think I'm going to make a modified SystemUI.apk but you didn't tell the application launcher is also in this file. Did you just forget this or is this stored in another file/folder? And the lock screen? And I want also to replace the boot animation if it's possible.
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
WietsedeVries said:
Thank you very very much for your explanation! It's a pity it's impossible to hit multiple times "Thanks".
I think I'm going to make a modified SystemUI.apk but you didn't tell the application launcher is also in this file. Did you just forget this or is this stored in another file/folder? And the lock screen? And I want also to replace the boot animation if it's possible.
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
Click to expand...
Click to collapse
Only way is through exchanging the png files since porting the whole .apk is impossible.
Sent from my Jelly Beaned Ace
Thanks for the answer. And do you also know the answers of the other questions?
Sent from my GT-S5660 using xda app-developers app
WietsedeVries said:
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
Click to expand...
Click to collapse
There are two roads you can go now - one is use apktool to *decompile* apk the apk file that you've taken from your phone, it doesnt convert the app to java source code but java bytecode in .smali files (like an assembly version of the source) but you will have access to the resource files (xml, images etc..) so you can replace them and create some new themes.
http://forum.xda-developers.com/showthread.php?t=1814441
http://forum.xda-developers.com/showthread.php?t=1760133
And no - a GB systemUI.apk will *NOT* work on ICS. It is very probable that any changes you make through any of these methods can brick you phone. So make sure you have CWM and a nandroid backup.
If you want to add/edit functionality within the source code of systemUI.apk, you need to learn how to compile Android from Source. i would suggest getting hold of the CyanogenMod source tree for your device and playing around with it.
Ginger bread is CM7 and ICS is CM9.
http://forum.xda-developers.com/showthread.php?t=1552090
once you have the full source tree, you'll find a folder called android/frameworks/base/core/...something../systemui/..
this will contain the javasource code for your application. Here you can edit stuff to your hearts content!
Note that this cannot be compiled standalone by eclipse. The Android build system must be used to compile this (cuz its a system app).
a nice resource i used when i was doing the same thing :laugh:
http://iserveandroid.blogspot.in/2011/01/how-to-implement-your-own-status-bar.html
cheers and have fun.

[Q] How to port custom apps from CyanogenOS to CyanogenMod

Hi to everyone
I hope that someone can help on this thing. Maybe i be wrong but, i think this should not be a big deal to handle cause the two systems are really similiar to each other.
First of all, here is what i try to accomplish:
Ive got myself a new Aquaris X5 from X5 which come out of the box with CyanogenOS.
With the CyanogenOS-ROM from the X5 comes a custom camera-app from BQ itself (Camerabq.apk).
With this custom Camera-app from BQ you have way more functions and also the Quality of the Pictures is better (i think) in comparison to the camera-app from CyanogenOS (Cameranext.apk).
Because of the "advantages" from CyanogenMod compared to CyanogenOS i want to move permanently to CyanogenMod, and thats why i want to port the bq camera-app from CyanogenOS to CyanogenMod.
Here is what i have tried:
Copied Camerabq.apk from CyanogenOS
Flashed CyanogenMod
Installed Camerabq.apk
Results:
Almos every single feature works exact as in CyanogenOS except the panorama-mode.
As soon as i tried to switch into the panorama-mode the camera-app crashes. After that first crash the app doesnt start up again, crashes at every start. It only starts working again, after i delete the app-data.
Sadly i have no skills in app-development and/or app-porting, thats why i hoped someone can help me to accomplish this task.
Are there any missing files, libs, frameworks etc thats needed to make the panorama-mode work?
If i have all the files together, how do i make a flashable zip-file out of this?
Just to make it clear, i dont want to compile my own custom-rom from CM-sources, i just want to make a flashable zip for the custom bq camera-app for everyone.
A logcat is attached to this post.
Greets
FORC3
If you can decompile the apk and then share the androidmanifest.xml, then maybe I could help you.
TheRoyalSeeker said:
If you can decompile the apk and then share the androidmanifest.xml, then maybe I could help you.
Click to expand...
Click to collapse
Thanks for the quick reply :good:
I managed to get a lib-file which was missing by the help of another user.

Categories

Resources