[Q] Finding source code for specific functions - Android Q&A, Help & Troubleshooting

Hi,
I'm currently in the process of developing a custom ROM for my Nexus 7, where I'll be editing the HCE functionality to allow me to set my own Application ID.
My main question was, after downloading the Android source onto my machine, I was wondering where I can find the source code for NFC/HCE inside the Android directory?
Any help is appreciated!
Jay

Bump - if anyone has any info i'd appreciate it !

jamesa2991 said:
Hi,
I'm currently in the process of developing a custom ROM for my Nexus 7, where I'll be editing the HCE functionality to allow me to set my own Application ID.
My main question was, after downloading the Android source onto my machine, I was wondering where I can find the source code for NFC/HCE inside the Android directory?
Any help is appreciated!
Jay
Click to expand...
Click to collapse
You need to download the nfc driver from google developer site
Here for your nexus 7 you can find it:
https://developers.google.com/android/nexus/drivers

antonio8297 said:
You need to download the nfc driver from google developer site
Here for your nexus 7 you can find it:
https://developers.google.com/android/nexus/drivers
Click to expand...
Click to collapse
Hi Antonio, thanks for the reply!
So you're saying for the NFC code specifically in the Nexus 7 (I'm using FLO atm) I should go fishing in the driver code, not the base Android code?
Thanks again
Jay

jamesa2991 said:
Hi Antonio, thanks for the reply!
So you're saying for the NFC code specifically in the Nexus 7 (I'm using FLO atm) I should go fishing in the driver code, not the base Android code?
Thanks again
Jay
Click to expand...
Click to collapse
Into the android code there isn't any code device, only if included device config and vendor files(that are into the google sites) and the kernel source

Related

[Q] Building ROM for Samsung Galaxy 5 (I5500)

Hey everyone,
Recently I installed the latest froyo_2.2 firmware for my samsung I5500..and tried to tweak it and started enjoyin it... So I decided to build Custom ROMS for this phone...I got a lot of info from cyanogen and from other posts...Now what I want to ask is that I have the source code for this phone, the android sdk(with gingerbread) and ellipse(with again the SDK and AVD), I want to compile the source code and do it all in windows based machine.. can i do it?? help would be greatly appreciated!! please!!
chaitanyakaul said:
Hey everyone,
Recently I installed the latest froyo_2.2 firmware for my samsung I5500..and tried to tweak it and started enjoyin it... So I decided to build Custom ROMS for this phone...I got a lot of info from cyanogen and from other posts...Now what I want to ask is that I have the source code for this phone, the android sdk(with gingerbread) and ellipse(with again the SDK and AVD), I want to compile the source code and do it all in windows based machine.. can i do it?? help would be greatly appreciated!! please!!
Click to expand...
Click to collapse
Haven't tried it, but all tutorials on the internet about compiling android are for linux. Probably because android is a linux based operation system. I don't think it's possible to compile on windows
Install linux or use the live CD...
well I guess I'll have to install Ubuntu then
Thanks... and any more suggestions would be greatly appreciated..
Where I can find the tutorial for compiling my rom?
hi
i have flashed my Samsung galaxy5 gt-i5503 to samung galaxy i5500L using firmware for usa ...samfirmware link....
now i have a perfectly working Froyo2.2 in my phone...
pls help me out for the best settings on cuptuner app....
alistassio said:
Where I can find the tutorial for compiling my rom?
Click to expand...
Click to collapse
Sorry, it's not quite as simple as that. First set up your Linux install, and all necessary tools (check the Android developers site), and then come back and ask where to begin!
any chance by making an htc sense ui custom rom for it?
Custom ROM
Can I also get the custom ROM for SG 551?
Thanks,
Disha
How to continue with built kernel
nprussell said:
Sorry, it's not quite as simple as that. First set up your Linux install, and all necessary tools (check the Android developers site), and then come back and ask where to begin!
Click to expand...
Click to collapse
nprussell,
I have installed all necessary tools, downloaded froyo from developer site, got I5500XXJPG_Froyo sources from SAMSUNG, compiled the kernel.
Now i have in path kernel/arch/arm/boot: Image, install.sh, Makefile, zImage
How to proceed?
Many thanks for any help!
thanx man real helpful

Galaxy Player 4.2 Developent - Need Help!

Hello fellow users of the SAMSUNG Galaxy Player 4.2!
I just recently received a Galaxy Player 4.2 for free from my brother SerkTheTurk since he got a Moto G, and I am planning to use it as an experimental device for development, since it's not my main device. I've gotten a device tree from SerkTheTurk and I've synced all the repos from CyanogenMod. I just need help on what to do next. I know that Serk made a complete build but it didn't boot. I just need help on what to change on the device tree and kernel files, if anybody can help I will appreciate it a lot. (I'm not super experienced on this topic but I can do work). Thanks! :fingers-crossed:
CenterTurkHD said:
Hello fellow users of the SAMSUNG Galaxy Player 4.2!
I just recently received a Galaxy Player 4.2 for free from my brother SerkTheTurk since he got a Moto G, and I am planning to use it as an experimental device for development, since it's not my main device. I've gotten a device tree from SerkTheTurk and I've synced all the repos from CyanogenMod. I just need help on what to do next. I know that Serk made a complete build but it didn't boot. I just need help on what to change on the device tree and kernel files, if anybody can help I will appreciate it a lot. (I'm not super experienced on this topic but I can do work). Thanks! :fingers-crossed:
Click to expand...
Click to collapse
Hey, you can build cm7 from my repositorys here is the readme how to
hoerwer there a still some bugs like no deep sleep
https://github.com/ChaOS-Development/android_device_samsung_hugo/blob/master/README.txt
CenterTurkHD said:
Hello fellow users of the SAMSUNG Galaxy Player 4.2!
I just recently received a Galaxy Player 4.2 for free from my brother SerkTheTurk since he got a Moto G, and I am planning to use it as an experimental device for development, since it's not my main device. I've gotten a device tree from SerkTheTurk and I've synced all the repos from CyanogenMod. I just need help on what to do next. I know that Serk made a complete build but it didn't boot. I just need help on what to change on the device tree and kernel files, if anybody can help I will appreciate it a lot. (I'm not super experienced on this topic but I can do work). Thanks! :fingers-crossed:
Click to expand...
Click to collapse
Great to some new devs.
I'm actually porting Android 4.4 "KitKat" to the Player 3.6 and with my help you could port KitKat also to the Player 4.2.
At first you need to get familiar with Androud building, so use Google and read something about it.
PM me for more help or information.
Greetings,
Androthan
Sent from my Nexus 7 using XDA Free mobile app
Need Help With building from source
Androthan said:
Great to some new devs.
I'm actually porting Android 4.4 "KitKat" to the Player 3.6 and with my help you could port KitKat also to the Player 4.2.
At first you need to get familiar with Androud building, so use Google and read something about it.
PM me for more help or information.
Greetings,
Androthan
Sent from my Nexus 7 using XDA Free mobile app
Click to expand...
Click to collapse
I'm a noob to developing roms but i decided to build a aokp kitkat rom for the galaxy player 4.2. I need someone to direct me to all the repo files for this device(device,kernal, and vendor repos). Someone please help me out because i would love to be running kitkat on my player 4.2. Thanks.
brewsterj98 said:
I'm a noob to developing roms but i decided to build a aokp kitkat rom for the galaxy player 4.2. I need someone to direct me to all the repo files for this device(device,kernal, and vendor repos). Someone please help me out because i would love to be running kitkat on my player 4.2. Thanks.
Click to expand...
Click to collapse
I think if there had been any full set of repo files that could build KitKat, other devs would've built it and you would've got KitKat earlier. Right now porting (instead of compiling) is the only hope I can see for GP4.2, but who knows
Sent from Google Nexus 4 @ CM11
AndyYan said:
I think if there had been any full set of repo files that could build KitKat, other devs would've built it and you would've got KitKat earlier. Right now porting (instead of compiling) is the only hope I can see for GP4.2, but who knows
Sent from Google Nexus 4 @ CM11
Click to expand...
Click to collapse
I found the repo files but i hit a wall while going to lunch, i get this.
Which would you like? [aosp_arm-eng] 17
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[vendor/aokp/products/bacon.mk]]: "device/oneplus/bacon/full_bacon.mk" does not exist. Stop.
** Don't have a product spec for: 'aokp_bacon'
** Do you have the right repo manifest?
im not sure which option to choose either but i get the same thing with every one. I pm'd some developers about it and hopefully they can tell me somthing.
brewsterj98 said:
I found the repo files but i hit a wall while going to lunch, i get this.
Which would you like? [aosp_arm-eng] 17
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[vendor/aokp/products/bacon.mk]]: "device/oneplus/bacon/full_bacon.mk" does not exist. Stop.
** Don't have a product spec for: 'aokp_bacon'
** Do you have the right repo manifest?
im not sure which option to choose either but i get the same thing with every one. I pm'd some developers about it and hopefully they can tell me somthing.
Click to expand...
Click to collapse
You are using the repo files for the Oneplus ONE...(codename bacon). The galaxy player 4.2's codename is "hugo". There are no 4.4 repo files for the 4.2
Sent from my XT760
so my only hope is to port?
or could i somehow build a repo file for it?
You are going to have to follow the official CM guide to port cm to a new device...to make a device, vendor and kernel tree...then you can use that to try and build AOKP...
EDIT: Here it is... http://wiki.cyanogenmod.org/w/Doc:_porting_intro If you dont find the method difficult, you can also ask Androthan for help as he has ported cm11 to the galaxy player 3.6, which is very similar to the 4.2.
Sent from my XT760
Another Guide
drakonizer said:
You are going to have to follow the official CM guide to port cm to a new device...to make a device, vendor and kernel tree...then you can use that to try and build AOKP...
EDIT: Here it is... http://wiki.cyanogenmod.org/w/Doc:_porting_intro If you dont find the method difficult, you can also ask Androthan for help as he has ported cm11 to the galaxy player 3.6, which is very similar to the 4.2.
Sent from my XT760
Click to expand...
Click to collapse
Can you point me to a guide that explains more and goes more in-depth about the process?
There are a limited number of guides for this process, this being the best imo. You should understand a few things if you're planning to undertake this project.
1. You cannot expect a guide for everything. Use google for any info that you need and ask devs. Search xda for threads that explain a similar problem.
2. If you don't have knowledge about the Android Build Process, some basic C knowledge, and have not even built a ROM that already has /device, /vendor etc. , I'd recommend not doing this, because even the best of devs reach problems while porting ROMs.
Sent from my XT760
drakonizer said:
There are a limited number of guides for this process, this being the best imo. You should understand a few things if you're planning to undertake this project.
1. You cannot expect a guide for everything. Use google for any info that you need and ask devs. Search xda for threads that explain a similar problem.
2. If you don't have knowledge about the Android Build Process, some basic C knowledge, and have not even built a ROM that already has /device, /vendor etc. , I'd recommend not doing this, because even the best of devs reach problems while porting ROMs.
Sent from my XT760
Click to expand...
Click to collapse
No, I have the knowledge(studied a bunch of stuff for hours and already have android build enviroment set up and i have a github account to access the files i need also, I have also ported using the android kitchen and a few other methods too never perfectly but i think porting it the official way would have a better result.) its just that i haven't tried porting through this method. I was following the guide all the way up until it said to get certain stuff from a file we pulled from my device using the terminal but i could never find the file. I know that repos and such go into a working folder or directory its just some stuff i just cant find.
Oh okay great then
Btw, porting with android kitchen and the whole copy paste the files from one ROM to the other to get port a custom ROM is TOTALLY different from what you're trying to do here.
I suggest you fork a repo from Androthan's CM11 for the 3.6 and start renaming it for us (our codename is "hugo", their's is "aalto" but the vendor is the same). If you can mention clearly what file you're not getting, and/or other problems you're facing, you can expect some help from the devs of the Galaxy Player (including all the players) community
Sent from my XT760
drakonizer said:
Oh okay great then
Btw, porting with android kitchen and the whole copy paste the files from one ROM to the other to get port a custom ROM is TOTALLY different from what you're trying to do here.
I suggest you fork a repo from Androthan's CM11 for the 3.6 and start renaming it for us (our codename is "hugo", their's is "aalto" but the vendor is the same). If you can mention clearly what file you're not getting, and/or other problems you're facing, you can expect some help from the devs of the Galaxy Player (including all the players) community
Sent from my XT760
Click to expand...
Click to collapse
ok i have forked the cm11 files for the 3.6 now how should i go about renaming it?(sorry for the noob question)
---------- Post added at 01:39 PM ---------- Previous post was at 01:32 PM ----------
brewsterj98 said:
ok i have forked the cm11 files for the 3.6 now how should i go about renaming it?(sorry for the noob question)
Click to expand...
Click to collapse
and this is where i got lost into the guide.
[So, if you have previously installed adb onto your computer, you can use the following command to pull this file to your computer:
adb pull /system/build.prop
Once you have the file...
Write down the value of the ro.product.manufacturer parameter. This will be your vendor name. The [vendor] is the name of the manufacturer/vendor of the device. CM has established naming conventions for most major vendors, such as samsung, htc, lge, etc. Note that in these directory names, the vendor is always lowercase and contains no spaces.
Write down the value of the ro.product.device parameter. This will be your device codename. The [codename] corresponds to the project code name of the device itself. This is almost never the sales name of the device. If you have built CM before (and again, you better have!), you should be familiar with the concept of a code name for each device. Like the vendor name, the codename is always lowercase and contains no spaces.]
Where does the pulled build.prop go? and are there any specific linux programs i would need to edit this file or any other files throughout the tortorial? I have gedit installed and its met my needs so far but do i need something more advanced to accomplish my goal?
got the repo renamed.
brewsterj98 said:
ok i have forked the cm11 files for the 3.6 now how should i go about renaming it?(sorry for the noob question)
---------- Post added at 01:39 PM ---------- Previous post was at 01:32 PM ----------
and this is where i got lost into the guide.
[So, if you have previously installed adb onto your computer, you can use the following command to pull this file to your computer:
adb pull /system/build.prop
Once you have the file...
Write down the value of the ro.product.manufacturer parameter. This will be your vendor name. The [vendor] is the name of the manufacturer/vendor of the device. CM has established naming conventions for most major vendors, such as samsung, htc, lge, etc. Note that in these directory names, the vendor is always lowercase and contains no spaces.
Write down the value of the ro.product.device parameter. This will be your device codename. The [codename] corresponds to the project code name of the device itself. This is almost never the sales name of the device. If you have built CM before (and again, you better have!), you should be familiar with the concept of a code name for each device. Like the vendor name, the codename is always lowercase and contains no spaces.]
Where does the pulled build.prop go? and are there any specific linux programs i would need to edit this file or any other files throughout the tortorial? I have gedit installed and its met my needs so far but do i need something more advanced to accomplish my goal?
Click to expand...
Click to collapse
The vendor for our device is "samsung" and the codename is "hugo"
Just fyi...when you are in the linux terminal...whichever directory you are in is where the pulled build.prop goes.
Sent from my XT760
I know I tried t post about me rereading the guide and understanding what it meant and that i have moved further into the guide but it never posted on here but i guess this whole thing was just a waste of time.
dude you should try porting from the galaxy sl i9003 because of the similar cpu stats
you would also need to create a boot image and an odin flashable recovery v 6+
Guys, I'll rewrite the stock kernel for you for booting KitKat, just give me 1-2 weeks
has this been done yet. Not to be a stickler, but this is the holdup for advancing this device. I can port the rom, just need an updated kernel with a recovery that supports. Thanks in advance.

[Q] GPS module source code

Hi all,
for my project I need to change the way how gps works. It was told me gps-manager enable/disable gps sensor. Idea would be to recompile my own customized version for gear s and install on the device. I have started by dowloading opensource from samsung site. Inside I have not found anything related to gps module.
Do you have any idea how to do it?
Thank you.
Luke
Device drivers are typically never open sourced.
foxbat121 said:
Device drivers are typically never open sourced.
Click to expand...
Click to collapse
Yes right, samsung confirmed some modules are proprietary code and not available as open source.

Yoga Book Nougat kernel source code petition

Lenovo is the only company to have released an Android Nougat update for an Intel Atom Cherry Trail SoC powered device.
If Lenovo releases the kernel sources for the Android N version created for its Lenovo Yoga Book (Lenovo YB1-X90F/L), developers can start working on Android N upgrades for other devices powered by the Intel Atom Cherry Trail SoCs.
Lenovo has previously released the Android Marshmallow kernel sources for the Yoga Book (https://pcsupport.lenovo.com/us/en/products/tablets/yoga-series/yoga-book/downloads/ds118515 Thus it shouldn't be a problem abiding by the General Public License v2 (GPLv2), which requires Android device makers to publish the kernel source code.
Please consider signing here: https://www.change.org/p/lenovo-kernel-sources-for-lenovo-yoga-book-android-n-7-1-1 . Thank you
True, we really Need to make Lenovo release the source Code, i hope you could edit your Petition by adding that also we Need Infos about how to use the source Code.
Greetings
I'm not sure that it would make a difference, but has anyone tried posting on their support forums or contacting them directly?
It might help our case to note that the device (the Android version, anyway) has been discontinued. I doubt we'll see any further official updates from Lenovo.
Take a look , Hope this will work for you:
https://forum.xda-developers.com/yoga-book/development/sources-yoga-book-nougat-source-code-t3765211
beltani said:
I'm not sure that it would make a difference, but has anyone tried posting on their support forums or contacting them directly?
It might help our case to note that the device (the Android version, anyway) has been discontinued. I doubt we'll see any further official updates from Lenovo.
Click to expand...
Click to collapse
Only via Facebook. Got this answer:
"Thanks for reaching out. Currently, this the only open source http://lnv.gy/2DMoObI we have for Yoga Book. You can keep an eye on the support website as it will be updated if a new open source will be released. Let us know if you have other inquiries."
Feel free to post the link to the petition on the Lenovo forums or even ask them via Facebook/scoial media. The more attention, the greater the chances.
Palm Trees said:
Lenovo is the only company to have released an Android Nougat update for an Intel Atom Cherry Trail SoC powered device.
If Lenovo releases the kernel sources for the Android N version created for its Lenovo Yoga Book (Lenovo YB1-X90F/L), developers can start working on Android N upgrades for other devices powered by the Intel Atom Cherry Trail SoCs.
Lenovo has previously released the Android Marshmallow kernel sources for the Yoga Book (https://pcsupport.lenovo.com/us/en/products/tablets/yoga-series/yoga-book/downloads/ds118515 Thus it shouldn't be a problem abiding by the General Public License v2 (GPLv2), which requires Android device makers to publish the kernel source code.
Please consider signing here: https://www.change.org/p/lenovo-kernel-sources-for-lenovo-yoga-book-android-n-7-1-1 . Thank you
Click to expand...
Click to collapse
THEY UPDATED IT AFTER I CONTACT THEM
CHECK IT OUT https://pcsupport.lenovo.com/us/en/products/tablets/yoga-series/yoga-book/downloads/ds118515
THE MAXIMUM POWER said:
THEY UPDATED IT AFTER I CONTACT THEM
CHECK IT OUT https://pcsupport.lenovo.com/us/en/products/tablets/yoga-series/yoga-book/downloads/ds118515
Click to expand...
Click to collapse
WOW! I've passed this information along. Thanks a lot, this hopefully opens some doors
What did you do exactly?
UPDATE: It's another Marshmallow kernel source code. We need the Android Nougat kernel source code!
Palm Trees said:
WOW! I've passed this information along. Thanks a lot, this hopefully opens some doors
What did you do exactly?
UPDATE: It's another Marshmallow kernel source code. We need the Android Nougat kernel source code!
Click to expand...
Click to collapse
True, i open it and it was another MM sources, i will rewrite to them again, however, i figure it out how to use it, for example specially for yoga Book Windows owners, i tried to install Android distro (Phoenixos, blissos,......) but some Drivers were missing i mean no Sound, no Bluetooth,....... but today i understood how it work, in lib/Firmware we Can add this files in any Android distro to get some or all Drivers work, but im trying to figure out how to copy-paste them inside System.sfs under Windows enviroment :fingers-crossed:
THE MAXIMUM POWER said:
True, i open it and it was another MM sources, i will rewrite to them again, however, i figure it out how to use it, for example specially for yoga Book Windows owners, i tried to install Android distro (Phoenixos, blissos,......) but some Drivers were missing i mean no Sound, no Bluetooth,....... but today i understood how it work, in lib/Firmware we Can add this files in any Android distro to get some or all Drivers work, but im trying to figure out how to copy-paste them inside System.sfs under Windows enviroment :fingers-crossed:
Click to expand...
Click to collapse
Thanks! Hopefully Lenovo releases them - let me know
Get in touch with KonstaT from http://www.modaco.com/forums/forum/445-other-devices/ if you need help with the Android side.
Palm Trees said:
Thanks! Hopefully Lenovo releases them - let me know
Get in touch with KonstaT from http://www.modaco.com/forums/forum/445-other-devices/ if you need help with the Android side.
Click to expand...
Click to collapse
Thanks, i will try to contact him:good:

COmpiling for custom ROM

Hello all,
I have a question regarding compiling the android source. This is mostly a general question that can be applied to any device ; however, the device I will be using is the Ascend Mate 7.
I recently got an old Ascend Mate 7 from a friend that I can do what ever with. So, I figured I would try to build Android from source and then flash it to the device.
I have already downloaded the source code. I am about to build the source for the Ascend Mate 7. Then, I found out that I might need to know the Device tree? There seems to be some conflicting information regarding this. Using google's guide, all I need to know is the code name for the device and there we go. We can compile the source! (Woot!)
On the other hand, other guides state that I need to download the device identity such as the tree, vendor, and kernel and include this in the source. (See this guide on xda website: https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763) In another guide, I need to setup the jack server? (https://www.digitalocean.com/community/tutorials/how-to-build-android-roms-on-ubuntu-16-04)
So which is it? Should I just follow Google's guide or do I really need to know the device identity? If the latter, How do I search for the device tree, vendor, and kernel? More importantly, what are these and how do they work in relation to the Android source?
Also, I believe I will need manufacturer drivers for my phone to operate the peripherals. How do I download this? This might be a stretch but can't I get those files from the Mate 7?
Any thoughts?

Categories

Resources