[Q] [DEV]Wifi Monitor Mode successed on SGS2&Nexus! How about SGS3?(with source code) - Galaxy S III Q&A, Help & Troubleshooting

[Q] [DEV]Wifi Monitor Mode successed on SGS2&Nexus! How about SGS3?(with source code)
Finally someone get sysfs injection successed.......
with the hard work, now SGS2 and Nexus is tested fine......
and here is the project site
http://bcmon.blogspot.co.il/
it mentioned that other phones can also compile a .ko from source code and test.........
I am curious if SGS3 can also use it.......
I know now Cyanogen is still not stable for S3, ITS NOT A GOOD CHOICE FOR S3
However I havn't compile a .ko for (siyah for s3), actually I also failed to compile another module for siyah before (nsio.ko)........I stuck with siyah...= =''
seems I got problem for this.......I dont have enough experiment on android dev, but sounds like this monitor mode injection may have chance to work on SGS3?
Anyone also try it?
IF success plz share the ideas......
"ITS JUST THE BIGGEST NEWS HAPPENS THESE DAYS"
these are mentioned in the post:
Other phones
Check out the source from http://code.google.com/p/bcmon/source/checkout
Build the KO for your device (cyanogen wiki should be helpful)
If it works please tell us and send us the compiled version so we can list it here (if it doesn't work contact us)
AirCrack binaries
We bundled useful binary executables for arm:
aircrack-ng suite
tcpdump
iwconfig
FAQ
I get "Can't find wireless tools, exiting."
Solution: Make sure you have 'iwpriv' on your system, just add soft link from 'iwpriv' to 'iwconfig' (actually it is 'iwmulticall')
available on: http://bcmon.googlecode.com/svn/trunk/bundles/utils.zip
Unzip them and run: 'chmod a+x -R aircrack misc'
Update: We added a statically linked version of aircrack-ng suite.
Now you can have fun with commands like: 'airodump-ng -i eth0'
Click to expand...
Click to collapse

ynlinchen said:
Finally someone get sysfs injection successed.......
with the hard work, now SGS2 and Nexus is tested fine......
and here is the project site
http://bcmon.blogspot.co.il/
it mentioned that other phones can also compile a .ko from source code and test.........
I am curious if SGS3 can also use it.......
I know now Cyanogen is still not stable for S3, ITS NOT A GOOD CHOICE FOR S3
However I havn't compile a .ko for (siyah for s3), actually I also failed to compile another module for siyah before (nsio.ko)........I stuck with siyah...= =''
seems I got problem for this.......I dont have enough experiment on android dev, but sounds like this monitor mode injection may have chance to work on SGS3?
Anyone also try it?
IF success plz share the ideas......
"ITS JUST THE BIGGEST NEWS HAPPENS THESE DAYS"
these are mentioned in the post:
Click to expand...
Click to collapse
Sounds promising..
Sent from my GT-I9300 using xda premium

Since galaxy s2 is using broadcom4330,so is s3, we may give a hope on it!

Related

Forking and porting CM7 to an unsupported device? (Gio GT-S5660M)

Hello,
So far, I have:
A working Android build environment (Ubuntu 11.10 x64).
Managed to build, install and boot AOSP on my Nexus S. (I have downloaded but not attempted to build CM7 yet.)
Created a Github account.
Samsung's open source files for my target device, the Galaxy Gio GT-S5660M.
I've read some documentation and forum posts about Github, but I remain unsure as to what I should do to fork in a way that:
I'll be able to keep on syncing the remainder of the code.
My new device directories and modifications could be brought back (pulled?) to the main CM7 code base.
Will avoid needless frustrating re-downloads of the source code.
Thanks in advance,
Darkshado
After some further reading, I'm beginning to grasp some git basics...
I've forked two CM7 repos so far, added them as remotes in the appropriate installations. (Instead of forking and cloning, since I already had repo sync'ed the whole CM7 source. My commits show up on Github like they should, and I should be able to merge in commits to the origin remotes.)
I'm not going to do any pull requests until I've managed to build and boot.
By the way, yesterday I attempted to build AOSP with a bunch of files overwritten by the Samsung sources (that's how they tell you to do it!!) and this failed, as I expected.
Goodbye,
Darkshado
Update: I'm currently trying to port CM7 to the Gio 5660M. Still attempting a first successful build as I'm writing these lines.
My main issue so far has to do with the camera. I get the following error message:
make: *** No rule to make target « out/target/product/gio5660M/obj/lib/libcamera.so », needed by « out/target/product/gio5660M/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so ». Stop.
After toggling off the camera by using the stub, I hit the same error further into the build with this:
make: *** No rule to make target « vendor/samsung/gio5660M/proprietary/wifi/ath6k/AR6003/hw2.0/athtcmd_ram.bin », needed by « out/target/product/gio5660M/system/wifi/ath6k/AR6003/hw2.0/athtcmd_ram.bin ». Stop.
I know this has to do with makefiles, but that's about it...
Thanks in advance for any help,
Darkshado
hi i'm interested too.
hi I found your github because I also interested poriting cyanogemod to galaxy gio korea(SHW-M290K). the device hardware is different from s5660. so I need some modification.
and your libcamera problem is that there is some reason that the make system can't find libcamera.so, so they cannot compile libcamera service. it should be in ./vendor/samsung/gio/proprietary according to your extract-files.sh .
have one cuorisity. I searched gio android device make file. and none of them are relreased source code. how did you make them?
I found this information. it may help you.
http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides
I'll have to update my Github, hadn't been in a rush due to lack of progress, but now my problem lies with libaudio instead.
I got the Samsung sources for the 5660M on their open source website, although I mostly worked with the CM7 ports for similar devices like Tass and Cooper as well as a Gio source provided by Phiexz but it didn't build either.
Thanks for the link, I'll check it out.
proprietary does not help
do you have any progress since last time?
well, I admit that proprietary files does not help.
does your s5660m hardware identical to s5660v?
becasuse galaxy gio in Korea(shw-m290k,shw-m290s) does different hardware.
well in this case, like me, you need to hack into not only android pdk, but also android kenel.
I have seen that phiexz has released kernel with latest cyanogenmod kenel in his github and I am modifing it to shw-m290k. there are some hardware differences i have to apply to.
I suggest you to compare phiexz's kernel and samsung original kernel from samsung opensource homepage.
My problem right now is that I don't have that much spare time to put into this, and that I'm very much learning as I go, so progress is not always that quick. Also, I'd like to get my Touchwiz based ROM updated and working properly before trying to build AOSP or CM again.
Another thing I want to try is building the kernel (probably based on Phiexz's) that will support ext4, and compare performance of the Touchwiz ROM on ext4 versus RFS.
As far as we can tell, GT-S5660 (Europe/Asia) GT-S5660M, L and V are identical except for the radio firmware. People with the 5660M initially encountered issues after flashing 5660 ROMs because they also contained the AMSS image.
my cyanogen kernel is based on samsung open source kernel
because cm-kernel on cyanogenmod github dont support our device, if we wnt use that kernel we must add some hardware pofile & board for galaxy gio
so alternative is make samsung's open source kernel compatible with cyanogenmod
Wouldn't it be much better from a code maintainability standpoint to make the CM kernel work on the Gio? (Also if you ever hope to get official CM team support, that's a given.)
The way I understand repo and git, you could create a github repo for your device and board configs and add those to your repo manifest so the whole CM7 source and your modifications all sync properly.
I've forked the CM7 manifest files off github, added my gio files and removed all those extra devices I didn't need, so my repo syncs are much faster too. (The idea comes from http://slightlymorethanworthless.blogspot.com/2011/05/remove-unwanted-devices-from.html)
hey a quick question...
just starting out here..
i'm on win7 32 bit, going to run ubuntu on virtualbox.
shud i choose ubuntu 32 bit or 64?
sorry for OT.
doesn't really matter
roofrider said:
hey a quick question...
just starting out here..
i'm on win7 32 bit, going to run ubuntu on virtualbox.
shud u choose ubuntu 32 bit or 64?
sorry for OT.
Click to expand...
Click to collapse
doesn't really matter. but compiling process needs much cpu power. so 64x would be better.
Well, im not a dev or a user of gt5660m, but good luck to you, hope u can finally port it
Sent from the GUN in my pants
darkshado, if you have same problem untill now.
http://strazzere.com/blog/?p=220
look this page. and check out koush's proprietary page. especially for samsung cooper(galaxy ace). because many of kernel procedure are same for gio.
https://github.com/coolya/android_device_samsung_cooper.git
https://github.com/koush/proprietary_vendor_samsung
i've upload galaxy gio source + proprietary files for galaxy gio
please see & help to fix some problem
github.com/phiexz
Darkshado said:
Hello,
So far, I have:
A working Android build environment (Ubuntu 11.10 x64).
Managed to build, install and boot AOSP on my Nexus S. (I have downloaded but not attempted to build CM7 yet.)
Created a Github account.
Samsung's open source files for my target device, the Galaxy Gio GT-S5660M.
I've read some documentation and forum posts about Github, but I remain unsure as to what I should do to fork in a way that:
I'll be able to keep on syncing the remainder of the code.
My new device directories and modifications could be brought back (pulled?) to the main CM7 code base.
Will avoid needless frustrating re-downloads of the source code.
Thanks in advance,
Darkshado
Click to expand...
Click to collapse
Really the best kernel for your phone is here:
http://forum.xda-developers.com/showthread.php?t=1991020
BLN enabled, optimized&stable kernel, jelly bean look
Whoa! Zombie thread!
Dude: the ROM you linked was published over a year after my original post in this thread. I'm pretty sure there was NO CM7 build available for the Gio back then. That's what I was trying to work on, but got beat to the punch by Maclaw and a couple others. (Hard-bricking my Gio and having a sluggish laptop to build on didn't help.)
Besides, I got rid of my Gio a long time ago. I enjoy my Note 2 and keep my Nexus S as backup.

[Q] Making a custom Kernel?

I've had a search and a look around but can't see anything specific enough to answer this.
I have read that the SGS2 uses the new BCM4330 chipset for it's WiFi-N support.
It looks to me that for existing kernels they are using either the existing kernel support or possibly the b43 driver.
I need to find out, and while I have compiled custom kernels in nix in the past, I have never done so in Android, so I'm a little out of my comfort zone here.
I want to compile a kernel where the WiFI driver will support monitor mode, ideally it would be the CM7 kernel with just this extra functionality added, however a number of the tools that I would use to identify the existing configuration do not seem to be available in the standard CM7 build (lspci being one).
I don't want to frack around too much without having read up first so could anyone point me at a good guide for creating my own Android Kernel, even better if the guide was specific to the CM7 version.
Lastly I mostly run a Fedora environment, however the bits I have read seem to suggest a number of tools are only available in a Ubuntu guise (heimdall springs to mind and while I'm sure it's possible to recreate it for Fedora I'm trying to reduce the number of dependencies I'll have to recreate as much as possible). Therefore can I get some advice regarding the least complicated way to generate an Android build environment in Linux.
Thanks
For kernel compilation on android, you can check the several repositories there are for the several kernels. Depending on each kernel/repository/user, you can find a predefined .config inside them, so you can get the basic configuration to compile the kernel, don't know if CM7 has it in its repository...
As for the enviorment, I haven't tried compiling a kernel, but I did compile some ROM on Gentoo Linux, so I suppose it could also be done in Fedora without many problems. The main thing about using Ubuntu is that is very extended, so they're using it as main Linux base, but that doesn't mean it can't be done in other linux distros. You can check CM7 wiki for building from source to install the required packages for your enviorment. In my case I cross checked the Ubuntu packages with Gentoo to install gentoo's version of that packages/tools to be able to compile without problems.
Also in the case of building kernels, you need a toolchain to be able to compile, but there are several webs/tutorials with info on how to use that.
EDIT: You have a complete tutorial for CM7 in their wiki with the needed packages for both Debian and Red Hat based distributions...
Very useful, thanks for the info.
Very useful info.
Hi,
I'm interested in compiling a custom kernel to support wifi monitor mode, but I read in a previous post that it can be a hardware limitation which makes it impossible to use monitor mode. Can anyone confirm that? Maybe a statement/answer from Broadcom?
I'm just asking it because I don't want to start playing with kernel compilation and driver hacking if it can't be done because of some missing code on the chipset or something.
Thanks.
kepten said:
Can anyone confirm that? Maybe a statement/answer from Broadcom?
Click to expand...
Click to collapse
I doubt Broadcom will answer that, but you can try to search the chipset info in Broadcom's web and see if its supported. Also you can check kernel modules if they can compile against that version.
AzureusPT said:
I doubt Broadcom will answer that, but you can try to search the chipset info in Broadcom's web and see if its supported. Also you can check kernel modules if they can compile against that version.
Click to expand...
Click to collapse
Well, Broadcom's website says nothing about monitor mode but I've found a driver (https:// github.com/cyanogen/galaxy-2636/blob/ics/drivers/net/wireless/bcm4330/src/include/wlioctl.h#L1153) which at least mentions it. This is for Galaxy Tab 10.1 which has the same chipset so maybe someone with a Tab 10.1 could verify if monitor mode works with that kernel/driver? ??

[Q] Samusung XCOVER/GT-S5690 questions.

Hi all,
i'm a noob to android, but i have nit of experience on other unix based systems.
I was wondering, why there is no custom roms for GT-S5690?
What's the problem?
Is bootloader locked some other way or is it somehow different from example Gio/GT-S5660?
There is a bunch of roms for gio..
I have one xcover, wich has no screen and covers, i thought i could use it for testing.
I think there are too less people who have a xcover, and I was actually pretty disappointed when I say there is a successor to the xcover available only in the US (Rugby Smart / Pro <-- with ICS!).
From the technical side, I don't know. Even the source code of the firmware is available at opensource.samsung.com. The Bootloader seems pretty much unlocked.
For me, the xcover is the best phone ever, it takes so much abuse. Maybe someday someone will port a newer ROM from the Ace/Gio/idk. It's a shame Samsung abandons their old phones :crying:
xkawer said:
I think there are too less people who have a xcover, and I was actually pretty disappointed when I say there is a successor to the xcover available only in the US (Rugby Smart / Pro <-- with ICS!).
From the technical side, I don't know. Even the source code of the firmware is available at opensource.samsung.com. The Bootloader seems pretty much unlocked.
For me, the xcover is the best phone ever, it takes so much abuse. Maybe someday someone will port a newer ROM from the Ace/Gio/idk. It's a shame Samsung abandons their old phones :crying:
Click to expand...
Click to collapse
I didn't were aware of successor models, now i'm very dissappointed.
I'm downloading these source codes at the moment, i'll check these out.
I'm not a developer, atleast YET..
AFAIK, hardware of s5690 is way different from any other samsung phones,
correct me if i'm wrong..
jonezy82 said:
AFAIK, hardware of s5690 is way different from any other samsung phones,
correct me if i'm wrong..
Click to expand...
Click to collapse
Seems like it's the only one with a Marvell MG2.
Let me know if you do anything interesting with the sources
Just flashed my xcover to XXLJ2 yesterday. At least it seems a bit faster now, but I have a weird bug when scrolling. If I give a list (for example settings) momentum, it doesn't stop when I put my finger on it again. But it does stop if I release the finger the second time.
jonezy82 said:
I'm downloading these source codes at the moment, i'll check these out.
Click to expand...
Click to collapse
Did the same. The GT-S5690_Platform.txt says:
Code:
How to build platform
1. Get android open source.
: version info - Android gingerbread 2.3.6
( Download site : http://source.android.com )
2. Remove external\webkit module in android open source which you got.
And then execute "clean build"
2. Copy files and modules to original Gingerbread source tree (overwrite)
3. build
- ./build.sh user
So wouldn't it be possible to download the JB sources, and compile them with the original kernel? Would be so cool.
Edit: It seems you need device specific binaries (drivers) since ICS. see: http://www.freeyourandroid.com/guide/compile-ics
Found a git https://github.com/manakeri/android_device_samsung_xcover, there is a
Code:
cyanogen_xcover.mk
file, this seems interesting. Apparently someone is trying to port it.
Edit2: In this git, there is also a "extract-files.sh"-file, which is neccessary to pull the proprietary files from the phone! With this I think we actually have everything we need to compile ICS/JB, like in the "freeyourandroid" tutorial.
I have never done this before, but someone must try it lol.
Oh look, there are more people who care about it!
http://www.droidevelopers.com/f338/14412-gt-s5690-opensource-kernel-available.html
Someone discovered my link and made a overclock kernel from the sources! This is so cool.
I hope we are going to see more :good:
xkawer said:
Oh look, there are more people who care about it!
http://www.droidevelopers.com/f338/14412-gt-s5690-opensource-kernel-available.html
Someone discovered my link and made a overclock kernel from the sources! This is so cool.
I hope we are going to see more :good:[/QUOTE
I own an xcover too a developer on another forum looked at some files i pulled using adb to try to port clockworkmod but no success. Told me the files i sent weren't standard android img but he would continue to look into it. Apparently the teamhacksungs goal is to port cyanogenmod for every Samsung device surely they can get it done. I've been waiting a long time to see some development for the awesome xcover
Click to expand...
Click to collapse
If its possible on the galaxy mini its got to be possible on xcover!. Ive tried to get involved and learn to port cyanogenmod but when it comes to git, repo, source tree, source code e.t.c e.t.c its a bit behond me for now.
Step in the right direction it seems. Fingers crossed

ZTE Nubia Z7 Mini (NX507J) - ROM porting

This has been started for people interested in porting other ROM's for the Nubia Z7 Mini (NX507J). If you are interested in seeing/using/asking questions about ROM's that currently exist, please use the thread created by @Seyron here. I previously posted the following information on that thread, but feel a new thread will be better so the other can be used for people with questions about existing ones.
I'm not sure what you mean by a good background for going at it; however, I think having a good understanding of computers and even some basic programming is very helpful. As for myself, everything is self-taught. I'm pretty familiar with mac, PC, and linux. Even if you are completely new at it, there is lots of good information out there - I would just encourage you to start by learning from credible and well established sources. I have only tried porting for nubia Z7 mini - no other android. I previously used the iphone (and am frankly glad I now have android).
It really depends on whether you want to do a simple port (that's how I call it - don't know if there's an official way of calling it) or port from source. If you are doing a simple port, you can use any computer (mac, pc, linux); however, if you want to port/build from source it is by far the easiest to do it from Linux. There are many resources out there for building/porting from linux - most of which are using Ubuntu. I personally use Debian (which incidentally Ubuntu was created from; however, they are now each distinct and different), but you could use most any linux distro as long as you are comfortable using the command line. Also, if you are using linux, make sure you have enough hard drive space available (most recommended is at least 30GB) and have enough RAM (I have 16GB - minimum recommended is 8GB). It's also very helpful if you have a large swap set up as it makes building go faster. Once you have everything put together, compiling/building takes 3-5 hours depending on the specs of your computer. I have a 1.7ghz i5 in my computer and it is slow - 4-5 hour range for me.
For the sources list below, please note I have no affiliation with them and do not know them. Use at your own risk, I assume no responsibility for what may happen to your computer or phone.
I think some of the best (and frankly most detailed) information comes from the android source code website and from XDA-University.
https://source.android.com/index.html
XDA-University
For what I call simple porting, can be done on any computer - this was the site I started with and it seemed to work except that I kept getting boot loop issues. There are many other sites out there with nearly identical information. This person uses a PC, but you can adjust it quite simply for doing this on mac or linux too:
http://seekandroid.info/2014/05/porting-android-roms-for-your-phone.html
The following site/instructions are very interesting as they are different than any other site I found out there with porting instructions. I have not done it this way - primarily because I am concerned about "bricking" my phone. The method this person uses is the same; however, the files that they transfer are opposite to most any other site I've found. I have not used these instruction - be very cautious until someone else can confirm.
http://anythingsyouneed.blogspot.com/2014/06/how-to-port-custom-rom-rom-porting.html
This one seems interesting; however, I have not used anything on this website and have not used one of the Kitchen programs.
http://www.littlegreenrobot.co.uk/tutorials/how-to-cook-your-own-android-rom/
Android - excellent and very detailed. Personally I think most helpful to those with intermediate to advanced programming knowledge. Or at least have the ambition and time to learn.
https://source.android.com/source/building-devices.html
XDA-University - Truly amazing wealth of information, approachable for anyone from absolute beginners to advanced programers.
http://xda-university.com/as-a-developer
http://xda-university.com/as-a-developer/porting-aosp-roms-using-source-code
I've been busy and haven't had a chance to use these pages yet, but it's what I'm going to do next to try and solve the boot loop errors.
http://xda-university.com/as-a-user/zip-based-rom-tweaking
http://xda-university.com/as-a-user/how-to-recover-from-a-bootloop
If anyone has anything to add, please do. I'd be interested in seeing what else people use.
I haven't found the required sources to port from source, so I don't know if that's possible. Neither am I experienced in any of that.
In basic porting I do, however so far it has been unsuccesful for the Z7 Mini.
I have tried to port CM11S from the OPO, but it didn't work out, the phone became stuck in a bootloop, and logcat wasn't working to find out what's the problem of not booting. Might be dual-sim related but that should more likely run into a non-working sim/ril or a lot of crashes, not making it not booting at all.
I do wonder how they got the CM11 / Mokee with eng/ch languages to work. Tried using those as base too but that didn't do the trick.
To build completely from source you need to have the kernel source.
ZTE has not yet released it, but I'm hoping it will be released soon.
You can check here.
On Github there's a repo but it's apparently broken.
Anyway you can build cyanogenmod without having the kernel source (http://wiki.cyanogenmod.org/w/Doc:_porting_intro)
As soon as I get my own device I'll try that.
Nice, will follow this thread
I was trying to port the Z7 Max CM11 to the Z7 Mini, still work in progress because i'm new at this...
So, do you have any idea how the existing ROM's were ported then? If they weren't from source, we should be able to port others without getting the boot loop error - in theory. Not finding the kernel source is the main reason (besides finding the time) why I haven't worked on porting others. I also cannot find the vendor tree for the phone - which incidentally, may well be part of the kernel source. If you can port CM without source the others should be equally possible. Personally, I'm not interested in a CM based ROM (although a couple I listed in the other thread that I tried porting were CM based); I'm more interested in an AOSP based ROM. I wonder why ZTE has been so slow to release the kernel? Especially since they've released all the others (albeit not the other Z7's) and they have been so popular.
Also, as I stated in the other thread, I was able to get a couple to boot, but they were stuck in boot loop issues. I forgot to use logcat to see what the issue was.
@voetbalremco I agree with you, how did they get MoKee and MIUI to work? I tried using MoKee as base too - though didn't try MIUI. Does anyone know if it's possible to extract the kernel from the current stock ROM?
pierg75 said:
To build completely from source you need to have the kernel source.
ZTE has not yet released it, but I'm hoping it will be released soon.
You can check here.
On Github there's a repo but it's apparently broken.
Anyway you can build cyanogenmod without having the kernel source (http://wiki.cyanogenmod.org/w/Doc:_porting_intro)
As soon as I get my own device I'll try that.
Click to expand...
Click to collapse
pedrud said:
So, do you have any idea how the existing ROM's were ported then? If they weren't from source, we should be able to port others without getting the boot loop error
Click to expand...
Click to collapse
There are different ways to port a Rom...or you build it from scratch, so you compile everything. And for that you need source for every component.
Or you can use the various kitchens (this one for example) to repack and tweak an existent rom.
pedrud said:
Does anyone know if it's possible to extract the kernel from the current stock ROM?
Click to expand...
Click to collapse
You can do it with the kitchen above or using one of the tools available (like this one for example.
Probably everything can be done with dd (as mentioned in the cyanogenmod guide).
Hopefully my device will be her soon, so I can also try these as well
pierg75 said:
There are different ways to port a Rom...or you build it from scratch, so you compile everything. And for that you need source for every component.
Or you can use the various kitchens (this one for example) to repack and tweak an existent rom.
You can do it with the kitchen above or using one of the tools available (like this one for example.
Probably everything can be done with dd (as mentioned in the cyanogenmod guide).
Hopefully my device will be her soon, so I can also try these as well
Click to expand...
Click to collapse
Thanks for the resources! I think combining those two, plus the info on the CM website, and what's on XDA-University; I should be able to get this figured out. Now all I need to do is find the time.
Today my phone arrived! Tomorrow I'll pick it up and start to do some tests.
Sent from my Nexus 7 using Tapatalk
Here it is Kernel source code for NX507J
github.com/ztemt/Z7Mini_NX507J_H128_kernel
felipebarney said:
Here it is Kernel source code for NX507J
github.com/ztemt/Z7Mini_NX507J_H128_kernel
Click to expand...
Click to collapse
I thought that was the kernel that was either incomplete or broken. Do you know otherwise? I had seen it previously, but had read there were errors with it. If not, that's great! I also wonder if it has the "fixes" that ZTE has made for wifi, BT, etc in the recent updates.
pedrud said:
I thought that was the kernel that was either incomplete or broken. Do you know otherwise? I had seen it previously, but had read there were errors with it. If not, that's great! I also wonder if it has the "fixes" that ZTE has made for wifi, BT, etc in the recent updates.
Click to expand...
Click to collapse
I found on the nubia.cn, but i don't know if this have issues... Anyway last updated was 22 days ago, I hope they have fixed...
felipebarney said:
I found on the nubia.cn, but i don't know if this have issues... Anyway last updated was 22 days ago, I hope they have fixed...
Click to expand...
Click to collapse
Can you post the link where you originally found it? Thanks.
pedrud said:
Can you post the link where you originally found it? Thanks.
Click to expand...
Click to collapse
bbs.nubia.cn/thread-266348-1-1.html
:good:
felipebarney said:
bbs.nubia.cn/thread-266348-1-1.html
:good:
Click to expand...
Click to collapse
Thanks. Although, one person commented on the thread that it is nubia development and isn't open source yet. Won't know for sure and I'm not totally sure how to tell from looking at it. May have to keep waiting - or at least dig a little deeper. Thanks again.
So I started to try to build something with CM-11.
I thought I could put my steps here, in case someone else needs them (or has a better way to do it):
1) Get the repo uility:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2) Initialize the repository:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
3) Sync the repository:
Code:
repo sync
This will take a while (the repo is pretty big).
I've taken some infos from the phone (build.prop, partitioning, kernel, boot.img).
I'll continue as soon as the repo is sync'ed.
Repo sync'ed, now build the environment:
Code:
. build/envsetup.sh
At this point we have to build the structure as explained here
Make sure you have the boot.img extracted (see previous posts about a tool).
Make sure you have the utility "unpackbootimg" installed.
I downloaded from https://github.com/osm0sis/mkbootimg/blob/master/unpackbootimg.c and compiled with:
Code:
gcc -o unpackbootimg unpackbootimg.c
Put it in your $PATH.
Then run the commands to create the directory structure:
Code:
./build/tools/device/mkvendor.sh nubia NX507J ../original/boot.img
"nubia" and "NX507J" come from the build.prop, respectively
Code:
ro.product.manufacturer=nubia
ro.product.device=NX507J
The result from the mkvendor.sh is:
Code:
[...]
Use the following command to set up your build environment:
lunch cm_NX507J-eng
And use the follwowing command to build a recovery:
. build/tools/device/makerecoveries.sh cm_NX507J-eng
...to be continued
pierg75 said:
So I started to try to build something with CM-11.
I thought I could put my steps here, in case someone else needs them (or has a better way to do it):
1) Get the repo uility:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2) Initialize the repository:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
3) Sync the repository:
Code:
repo sync
This will take a while (the repo is pretty big).
I've taken some infos from the phone (build.prop, partitioning, kernel, boot.img).
I'll continue as soon as the repo is sync'ed.
Click to expand...
Click to collapse
This is great! Thanks. Are you using a PC or Linux and what OS? Those are the next steps that I want to take. I'm interested in doing it with carbon, omni, and maybe paranoid.
pedrud said:
This is great! Thanks. Are you using a PC or Linux and what OS? Those are the next steps that I want to take. I'm interested in doing it with carbon, omni, and maybe paranoid.
Click to expand...
Click to collapse
Obviously I'm using Linux
No windows here
Sent from my NX507J using Tapatalk
pierg75 said:
Obviously I'm using Linux
No windows here
Sent from my NX507J using Tapatalk
Click to expand...
Click to collapse
That's what I assumed, but hey, you never know. You know what they say when you make assumptions... What distro are you using?
Fedora and Debian...BTW I added few more steps in the previous message.
pierg75 said:
Fedora and Debian...BTW I added few more steps in the previous message.
Click to expand...
Click to collapse
Did you see the post by yiphoming on the other thread that CM11 already exists? Any other ROM's you're interested in?

Help: Understanding Basics of Building and Compiling?

Hi all,
In short i want to modify Android 4.2.2 on my MK802IIIS to allow me to use an external USB WIFI Adapter. The one i have uses a Ralink (MediaTek) RT5372 chipset.
I'm not a beginner, but by no means an expert. I have compiled firmware for my Linux based routers. But compiling Android, or parts of, seems much more complicated. I only want to add support for a USB adapter. Do i need to build the kernel from scratch, or can i create a module? Do i need to cross compile a module or can it be "made" in Ubunutu and just copied across?
I have searched for a RT5372.ko file online, finding references to RT5370, but i dont think it's the same.
I downloaded the driver from the Mediatek website and proceeded to attempt to create a .ko file by making it in Ubuntu but it only created a RT5372STA.dat file. Does this driver need to be cross compilied for android? Also how do i turn it in to a module that i can just load into my currently installed ROM?
I have been poking around for a while so i havent covered everhything i've tried. I'd really like to understand how building for Android works. If anyone can answer any of these questions for me, it'd help me imensely. Or if there is a resource covering these topics that i have yet to come across please point me at it. I know there are a lot of very detailed How-To's for compliling but i seem to get lost with the amount of detail.
Many thanks
More info regarding my setup:
Building in Ubuntu 14.04, 64bit.
The current ROM appears to have been built using the Linaro 4.6.2 toolchain, so u have downloaded that, currently stored in /home/wriggerz/RK3066/Toolchains
Also downloaded the RK3066 Kernel Source, stored in /home/wriggerz/RK3066/RK3066-Kernel
The RT5372 driver has been extracted to /home/wriggerz/RT5572NEW
I've been mashing bits of different guides and suggestions found on other forums together to try and frankenstien this KO module. From within the drivers folder i ran the two commands below. From what i've read this needs to be done to specify which "Toolchain" and "Compiler" to use.
Code:
export CROSS_COMPILE=~/home/wriggerz/rk3066/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-
export ARCH=arm
Then i ran the make command like below to try and have the driver built for the correct Toolchain with the correct Compiler:
Code:
make ARCH=arm CROSS_COMPILE=arm-eabi-linaro-4.6.2
However i get the following response:
Code:
make -C tools
make[1]: Entering directory `/home/wriggerz/RT5572NEW/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/wriggerz/RT5572NEW/tools'
/home/wriggerz/RT5572NEW/tools/bin2h
cp -f os/linux/Makefile.6 /home/wriggerz/RT5572NEW/os/linux/Makefile
make -C /lib/modules/3.16.0-30-generic/build SUBDIRS=/home/wriggerz/RT5572NEW/os/linux modules
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-30-generic'
Makefile:652: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
make[1]: arm-eabi-linaro-4.6.2-gcc: Command not found
CC [M] /home/wriggerz/RT5572NEW/os/linux/../../common/crypt_md5.o
/bin/sh: 1: arm-eabi-linaro-4.6.2-gcc: not found
make[2]: *** [/home/wriggerz/RT5572NEW/os/linux/../../common/crypt_md5.o] Error 127
make[1]: *** [_module_/home/wriggerz/RT5572NEW/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.16.0-30-generic'
make: *** [LINUX] Error 2
Someone knowledgeable will hopefully look at the steps i have just taken to rip it to shreds...... :fingers-crossed:
If not, is there anyone with any ideas of where i'm going wrong?
I think i've put this in the wrong section....
If anyone has to go out of their way to move it they have my sincere apologies.
J Double You said:
I think i've put this in the wrong section....
If anyone has to go out of their way to move it they have my sincere apologies.
Click to expand...
Click to collapse
First of all, I would suggest to recompile the kernel and the entire source code (like when building CM), it is way better than insmodding modules every time, and you have less errors to solve. I'm currently writing a guide about building Cyanogenmod to support awus036h wireless adapter, maybe I can have a look for yours too, shouldn't be too hard. There are two or there good references around, however I'm trying to out all of them together in this new one I want to publish. Hope this will help you too.
Don't download a .KO from internet, it's not going to work. You would not only need to build for the specific device, but also for the specific kernel, which may vary from build to build, that's why I recommend to compile the whole kernel. Please consider to download a ROM's source code or your device kernel.
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Thanks for the helpful response Ciuffy.
Before i ask any more potetnially stupid questions i will do some research on that approach. I look forward to seeing your guide. For now i may be back for some direction.
Thanks again
I do like the ROM i'm on at the minute. NeoTV CR 2.0 (4.2.2), works really well, snappier than others i;ve tried and the benchmark results are pretty good too, but there are a couple of issues with it:
Busybox isnt installed and doesnt install.
Commands dont seem to work in terminal.
Now it doesnt really matter, as i wont be Insmodding the driver now, but it would be nice to have. How do i stay as cose to my current ROM as possible while re-compiling? Do i need to contact the ROM creator and ask them for the source? Should it be available on the web somewhere? Or can i "rip" it off the device? My main goal is to add driver support to the kernel from the drivers srouce files. But it would be nice to have busybox installed too. Was thinking i might re-comile the whole rom, but that be like trying to run before i can stand..... But, learning is amazing, and i learn best by doing!!
Main question: Whats the easiest way to re-compile my current kernel? Do i need source files from the ROM creator? I have asked but havent had a repsonse yet, but it's only been about 16 hours, not even that.
J Double You said:
I do like the ROM i'm on at the minute. NeoTV CR 2.0 (4.2.2), works really well, snappier than others i;ve tried and the benchmark results are pretty good too, but there are a couple of issues with it:
Busybox isnt installed and doesnt install.
Commands dont seem to work in terminal.
Now it doesnt really matter, as i wont be Insmodding the driver now, but it would be nice to have. How do i stay as cose to my current ROM as possible while re-compiling? Do i need to contact the ROM creator and ask them for the source? Should it be available on the web somewhere? Or can i "rip" it off the device? My main goal is to add driver support to the kernel from the drivers srouce files. But it would be nice to have busybox installed too. Was thinking i might re-comile the whole rom, but that be like trying to run before i can stand..... But, learning is amazing, and i learn best by doing!!
Main question: Whats the easiest way to re-compile my current kernel? Do i need source files from the ROM creator? I have asked but havent had a repsonse yet, but it's only been about 16 hours, not even that.
Click to expand...
Click to collapse
Definetely, you should find the kernel source code, I think you can find it on Github, I'll give a look at it. I honestly don't think you can reverse engineer the kernel and recompile it.
Edit: I can't seem to find it. It is also possibile that the source code was not released.
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Stupid Question: Is the SDK the same thing as the source?
If so i think i found what i need to build from scratch here: http://www.cnx-software.com/2013/08/20/rockchip-rk3066-android-4-2-2-hdmi-tv-stick-sdk-leaked/
If thats right, i need to find a way to add the driver i found to the source so it's included in the compilation.
Boom, think i found my base... And answered my previous question. SDK is not source.
http://freaktab.com/forum/tv-player...73-full-1080p-modded-kit-kat-4-4-2-rk3066-rom
The OP kindly links to the kernel source.
Apologies for spamming my own thread, i like to keep anyone watching up to date with progress so they dont waste their time replying to old stuff.
J Double You said:
Boom, think i found my base... And answered my previous question. SDK is not source.
http://freaktab.com/forum/tv-player...73-full-1080p-modded-kit-kat-4-4-2-rk3066-rom
The OP kindly links to the kernel source.
Apologies for spamming my own thread, i like to keep anyone watching up to date with progress so they dont waste their time replying to old stuff.
Click to expand...
Click to collapse
SDK stands for Software Development Kit, in other words the environment that lets you build applications and related for a specific platform.
So, you found the source you were looking for?
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Sure did, i also now know which compiler i need.... arm-linux-gnueabi-4.7.
Now to find out how to add the driver i have downloaded to the kernel.
From what i've read i need to "make" the driver, cross compiling in the process, then put some of the resulting files in situ within the kernel source. (along these lines: http://stackoverflow.com/questions/11710022/adding-new-driver-code-to-linux-source-code).
J Double You said:
Sure did, i also now know which compiler i need.... arm-linux-gnueabi-4.7.
Now to find out how to add the driver i have downloaded to the kernel.
From what i've read i need to "make" the driver, cross compiling in the process, then put some of the resulting files in situ within the kernel source. (along these lines: http://stackoverflow.com/questions/11710022/adding-new-driver-code-to-linux-source-code).
Click to expand...
Click to collapse
Excuse me, are you then going to compile the enitre kernel? Waiting for your answer, there should be an easier way to do this.
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
I was going to, based on your suggestion to compile from scratch, but i have most likely mis-understood what it was you were getting at.
Also, i have downloaded a bunch of toolchains and i have arm-linux-androideabi-4.7, but is that the same as arm-linux-gnueabi-4.7
Again, i could be barking up the completely wrong tree. Which is a shame, as i thought i was actually getting somewhere..... hahaha!
As always, your continued input is greatly appreciated Ciuffy.
J Double You said:
As always, your continued input is greatly appreciated Ciuffy.
Click to expand...
Click to collapse
Yes, I was in fact suggesting you to build from scratch, thinking you could include modules for your adapter in the kernel configuration. However, I can't find what kernel module is exactly going to do it. I found rt2800usb, however I am not sure. You may try to include support for rt2800 and also build the kernel module from the driver source code, as explained in that link for example.
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Ciuffy said:
Yes, I was in fact suggesting you to build from scratch, thinking you could include modules for your adapter in the kernel configuration. However, I can't find what kernel module is exactly going to do it. I found rt2800usb, however I am not sure. You may try to include support for rt2800 and also build the kernel module from the driver source code, as explained in that link for example.
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Click to expand...
Click to collapse
Ah.... I have downloaded the Linux driver from the MediaTek websitefor the RT5372, but it needs "making". Would cross compiling the driver not give me the modules i need to load in to the kernel?
That link explains how to add the required files, but doesnt explain how they're created. I dont think....
J Double You said:
Ah.... I have downloaded the Linux driver from the MediaTek websitefor the RT5372, but it needs "making". Would cross compiling the driver not give me the modules i need to load in to the kernel?
That link explains how to add the required files, but doesnt explain how they're created. I dont think....
Click to expand...
Click to collapse
If by cross compiling you mean building the kernel module while also compiling the source code and then loading it in the running kernel, yes, as long as you downloaded the drivers compatible with the Linux kernel on your Android.
You can either use the instruction on that link on StackExchange, or follow the "How to build them?" section here:
http://forum.xda-developers.com/showthread.php?t=1455382
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.
Thanks Ciuffy.
Seems i've still got some stuff to get my head around. I'll re-read up and come back.
FAIL!!!
Tried flashing the unit with the ROM i was going to compile a kernel for. Looked to go well, but wouldn't boot past the boot splash screen. And after rebooting wouldnt boot at all. Obviously some fundamental incompatibility, or the fact that it cant handle the overclock....
Problem is i have previously broken the OTG port so i have no way to flash using ADB, not until i get a cable soldered in it's place.
Really just wanted to explain why i may be absent from this topic for a bit. I'm going to make some calls to see if any nearby electronics shops can do the job. Once done i'll be back.
J Double You said:
FAIL!!!
Tried flashing the unit with the ROM i was going to compile a kernel for. Looked to go well, but wouldn't boot past the boot splash screen. And after rebooting wouldnt boot at all. Obviously some fundamental incompatibility, or the fact that it cant handle the overclock....
Problem is i have previously broken the OTG port so i have no way to flash using ADB, not until i get a cable soldered in it's place.
Really just wanted to explain why i may be absent from this topic for a bit. I'm going to make some calls to see if any nearby electronics shops can do the job. Once done i'll be back.
Click to expand...
Click to collapse
In case you misunderstood: I just wanted to point out that once compiled the kernel modules along with the kernel, you don't keed to flash the kernel, only insmod the modules.
Hope you can solve the OTG problem, waiting for your response.
Ciuffy's SM-G900F CM 12.1 spirit hath marked this way. Thank if helped your soul.

Categories

Resources