Backup/install Wi-Fi device driver? - Android Q&A, Help & Troubleshooting

Is there a way to backup, or transfer the current Wi-Fi device driver from one device to another Rom/firmware?
I'm tinkering with various roms for my android box, and can get everything working but ir remote and Wi-Fi.
Instead of coding it directly into the Rom itself. Yes it comes off as lazy, but thought I would inquire or ask either way.
If it's not possible it's not.. I can accept that and guess I have no choice but to learn how to inject the driver manually. Just need to learn ( any guide you can link to transfer the Wi-Fi/ir settings from one Rom to another would be greatly appreciated )

Related

USB Host Support for Custom Devices

The SGS2 supports USB OTG which means it can play host to certain low-powered USB devices. Unfortunately the kernel is configured with a whitelist that means it will only connect to HIDs, printers, PTP cameras and mass storage devices.
I wanted to begin developing an application using custom (vendor specific) USB hardware and so started experimenting to see if it was possible. There is a full description of how I went about it on my blog. To summarise, one of the ways to enable vendor specific USB devices is to edit the file "drivers/usb/core/sec_whitelist.h" and add the following to both whitelist tables:
Code:
{ USB_DEVICE_INFO(0xff, 0x0, 0x0) }, /* vendor specific USB devices */
There are two reasons for this post, the first is to provide information to help others that may want to do the same thing. The second is to try and encourage kernel modders to include my changes (or disable the whitelists altogether) thereby providing application developers the means with which to communicate with custom hardware.
Regards,
Dan
Nice idea, I may be completely wrong, but if you remove the white list it, will accept other hardware? or is it dependant on it being there?
Sent from my GT-I9100 using Tapatalk
Does you also test Google ADK ??
Do you know if it would work with the S2 ?
@MacaronyMax: As I mentioned in my blog post, it is possible to disable the whitelist entirely via the kernel options which I assume would allow any device to connect, but I have not tested this and so am unsure.
@xlanhackerx: The ADK relies on accessories that have been designed to act as host and use an Android specific protocol, whereas I am interested in the SGS2 acting as host so that I can connect custom third-party slave devices to it. Therefore I have not looked at the ADK at all and I do not have the hardware available to even play with it.
Regards,
Dan
Thank you. Maybe a custom ROM has it built in?
Thank you so much terranim for this discovery, and for posting it.
I have been struggling on that for a week now, not understanding why my driver was apparently not even called.
I was thinking it could exist a ROM that has this whitelist removed... anyone has a clue? (Lite'ning 6.1 / ninphetamin 2.0.5 or .11 have is using sec_whitelist.h)
I don't think that any kernel developers have disabled this whitelist yet! However there is now another major problem: In the latest ROM from Samsung it is reported that they have removed the USB host related libraries in the Android SDK!
My hack to the kernel will still work and allow devices to be connected, but we will no longer be able to communicate with custom USB devices via an Android application (unless we write a C library to talk to the devices directly or via libusb).
Hopefully developers will restore these libraries in their own custom ROMS.
I guess I am not too far from running this whitelist with your new line on a home compiled version of ninphetamine... see http://forum.xda-developers.com/showpost.php?p=18123923&postcount=2828 and http://forum.xda-developers.com/showpost.php?p=18123923&postcount=2833
I just got to to compile completely a minute ago, and will test it on Thursday.
I think I will stick to custom ROMs / kernel now... and possibly some I compile myself.
Did you read about libftdi? That could help you. Also that Samsung removed USB API might not harm as long as you use a serial port created by the serialusb driver.
edit / ps: nice to work in a team
guys,
is there any chance this USB Host mode could work with a headphones USB DAC/Amp like the FiiO E7?
I really envy the iPod/Pad/Phone users and their ability to have pure sound of their devices while on the go. I know we have HDMI/MHL but sadly there are no headphones amps using this link
I would be interested in this as well.
it is correct that Samsung have removed the USB Host API,
As far as I can tell, they never intended to leave it there to begin with, but I do know that the particular API was introduced in API 11 (Honeycomb).
Sent from my GT-I9100 using Tapatalk
What kernel options are required for this and what is needed to test connectivity? I have an older Galaxy S device and I'm trying to reproduce what you've done here. I just got an ADK for christmas and I've been working with Cyanogenmod kernel source in an attempt to get things operating. From what I can see I need a kernel driver. It would appear that it's begining to recognize that *something* is plugged in, but it's not enumerating.
Anything you can show me would be helpful. What do you see in dmesg when ADK or any other device is connected?
Hi. I know this is an old thread but I want to know if there is some patch to enable USB DACs on the S2. I can not find anything that can enable this like the S3. If some one knows some thing please reply.
Thanks

[Q] Wifi Monitor mode, need help for configuration

Hey guys,
I started my last thread about if there are custom wifi drivers to enable monitor mode. But it only need to configure and maybe compile it.
Is there someone that can complete this project and configure this on android to make it automaticly install for users? Or maybe make a tutorial to get it work?
Get source:
Code:
git clone https://android.googlesource.com/platform/hardware/broadcom/wlan
My experince with drivers on linux is very low. That why i asked for help. I hope we can finish this!
My Source about it is possible for monitor mode:
Code:
wireless.kernel.org/en/users/Drivers/brcm80211
Why not just download these apps from play store, there are some available.
kms108 said:
Why not just download these apps from play store, there are some available.
Click to expand...
Click to collapse
Monitor mode has to be enabled in the drivers. Not one app are able to do that because it has to make changes in the system. Like the /etc/wifi directory. You need root to come there. there are standing the basis drivers from android. There are standing the broadcom drivers. Those need to be changed.
Look at:
http:// forum.xda-developers.com/showthread.php?t=1368452
The Driver dont support this yet:
http:// linuxwireless.org/en/users/Drivers/brcm80211#Get_the_code
And even there is support for this Feature in the Android Drivers,you couldnt use it unless you have a new Firmware which will support it:
http: //markmail.org/message/xe4ygjoc5zl3hb4f#query:+page:1+mid:4yrkzxsczivcg6td+state:results
The Conclusion is: You couldnt do it,unless you would reverse engeenere the Broadcom Firmware and make one which would support it.
I have looked it to this a few times and as far as I have found it is just not possible yet. Would be very good if a top dev could get on the case as I would definitely find this very handy.
sent from my SGS3 Using XDA app

Why can't Android be installed similar to how you install an OS on a PC?

So Android has been around for a long time, and it is open source. How come we can't easily buy a cell phone with no OS, and install vanilla Android on it?
For comparison, you can buy a PC with no OS, or build one from scratch. They all have somewhat standardized hardware. I can easily install Windows 7, windows 10, Debian, Ubuntu, Linux Mint, etc. I can even install something like the Debian minimal install that doesn't even start with a Desktop environment, and customize exactly what desktop environment I want. Sure you might need to install some wifi drivers and graphics card drivers but they are readily available.
So why is cell phone hardware and Android so different despite being open source and hardware being so competitive? How come I can't just buy a generic phone with no OS, download a Vanilla Android ISO, and install it? Then simply add whatever radio/sensor/gps drivers might be needed, which should be either generic, or else available from the phone hardware manufacturer, similar to how motherboard drivers are available from the motherboard manufacturer.
I realize there are experienced developers out there who are able to make custom roms, but I'm talking about something a general user can do with similar ease to installing and customizing linux on a PC? Why must we generally have to buy exploitable phones to root, overwrite the recovery, and then hopefully find and trust some community rom that some stranger on the forums made?
Well you make a few mistakes. Android is not open source completely. It is under the Apache license. So any code other fixes anyone does they get to keep and dont have to share. Unlike the kernel which is truly open source.
Next your missing a few things. The bootloader for each device which is different unlike with Windows which has a pretty standard one. Also each device has different hardware so the drivers for everything (which are closed sourced as well) will have to be gotten from the oem which they don't share.
Even if you look at the new pc they have locked bootloader so the only things that have ms certs can be flashed.
Thanks for the reply. So the kernel is open source but parts of android are not? I mean, I know some phone developers might make some custom mods that might not be, but isn't the plain Android AOSP code all open source? Isn't installing the AOSP stuff along with any hardware specific drivers enough?
You mention that different phones have different drivers and some are closed source. But PC's have all different hardware. One may have a different wifi chip for example, or sound chip, and the drivers may be closed source, but the motherboard comes with the drivers for the wifi/sound card. So I don't see what is stopping a manufacturer from releasing a phone and include any drivers, like a PC motherboard manufacturer does.
As far as a bootloader, they could just include one or allow a user to install their own. I'm sure open source bootloaders must exist. I mean on a PC you can install whatever bootloader you want, windows, grub, etc. I haven't personally heard of a motherboard having a locked bootloader before where you can't install grub and linux, but if they do exist, at least most motherboards aren't like this.
wildsquirrelfrenzy said:
Thanks for the reply. So the kernel is open source but parts of android are not? I mean, I know some phone developers might make some custom mods that might not be, but isn't the plain Android AOSP code all open source? Isn't installing the AOSP stuff along with any hardware specific drivers enough?
You mention that different phones have different drivers and some are closed source. But PC's have all different hardware. One may have a different wifi chip for example, or sound chip, and the drivers may be closed source, but the motherboard comes with the drivers for the wifi/sound card. So I don't see what is stopping a manufacturer from releasing a phone and include any drivers, like a PC motherboard manufacturer does.
As far as a bootloader, they could just include one or allow a user to install their own. I'm sure open source bootloaders must exist. I mean on a PC you can install whatever bootloader you want, windows, grub, etc. I haven't personally heard of a motherboard having a locked bootloader before where you can't install grub and linux, but if they do exist, at least most motherboards aren't like this.
Click to expand...
Click to collapse
No, even the aosp code is licensed under the Apache. This is why Google gets away with it pushing things they fixed back to the aosp project. It's never that easy even with a nexus device. There are always things that have to be fixed to make it boot.
The difference is unlike pc each device has the hardware drivers outsourced. So say Samsung doesn't really own the drivers they use for BT, wifi, cell radio and things like that. So they can't really distribute them. That's why when you are learning to build it shows you how to pull the files from the device you are building for. This sometimes happens with pc as well. I have a laptop where there are no open source options for the nic card. So if I only run Linux then I have no Internet connection at all. I have to dual boot so Linux will use the windows drivers.
The bootloaders are built per device. There is no open source option yet. Nor will there likely ever be one.
Here is a link about Windows doing it.
http://www.extremetech.com/extreme/...t-mandatory-locks-out-other-operating-systems
Sure you can still buy blank motherboards and load your own os but that doesn't always work.
What I would do is start looking into just what it takes to build the os for a supported device. Which will be a nexus. Then you can see what it takes to make it work with non supported devices.
Google is even making android less 3rd party rom developer unfriendly. Doing things like making root far more difficult to achieve and things of this nature.
Thanks for the detailed explanation. I still hope one day we can just buy empty phones, and install our choice of OS on them, but I guess it may be a long ways away.
Although I did notice according to the oneplus site, they actually allow you to unlock the bootloader and not even void the warranty, and all it takes is a simple command. So hopefully things will be sooner rather than later.
https://oneplus.net/support/answer/will-rooting-or-unlocking-the-bootloader-void-my-warranty
Guess my best alternative for the near future may be to just keep on rooting and try to learn how to make my own ROMS.

Some Hacking in Yoga Book

Hi folks.
I'm an Android firmware developer (you can see my posts here in xda) that got a yoga book yesterday. For me it works at it should (by now) but my hacker soul speak to me and said: "at least take a look to see what you can get from this device". I don't have many time, so I can't spend time doing roms or fixing things by myself, but I can share with you some info I get and help you with my knowledge if someone is interested in "play" with this device.
First of all, I'm not responsable of anything that you can break following these steps. Almost all of them are tested and with some common sense you will not break anything, and if you break anything I will try to help you to fix it (if you are polite), but this is a work in progress and hacking and the possibility of brick the device is always there.
I only have the Android version without LTE, so I only tested in my Book.
So, here we go:
1) Secret codes:
I get this codes decompiling EngineeringCode.apk with apktool. Be carefull with them:
####0000# - Display version info
####7599# - Display hardware info
####8375# - Display baseband info
####1111# - Factory test
####2222# - Display SN
####7777# - Factory Reset???
####5993# - Display internal frameWork version
####7642# - Cut the power off to reload the PMIC - This command shutdowns the device. Just press the power button to reboot.
####5236# - Display LCD name
####2834# - ES close test
####8899# - open the ums mode default for debug
####3333# - offline log
####3334# - offline modem log
####9527# - Mediaplayer setting
####78646# - RunIn test
####6020# - switch country code
####59930# - Display current country code
####8746# - Enter engineering mode
####4227# - Enter engineer test
####357# - DLP_TEST
To use these codes, open the contacts app, press the search button and enter the code in the search bar.
2) OTA Images
You can get OTA images directly from lenovo servers. Just open your browser and paste this url:
http://fus.lenovomm.com/firmware/3....WW06_BP_ROW&action=querynewfirmware&locale=en
Change device model if needed (LenovoYB1-X90F or LenovoYB1-X90L)
Change curfirmwarever to a valid OLD firmware, this way you will get the next one in age.
Change locale if needed.
With this url you will get a download url at the end of the result page. In this case: http://tabdl.ota.lenovomm.com/dls/v...S000426_1705080316_WW06_BP_ROW_WC80C2A0F2.zip
These images are not full ota images, they are diff versions. This means that we can't use them to mod the image, or recover a bricked device, but this is a first step
3) Custom images
We don't have real sources to build a custom image (the lenovo's open source files are useless), but this doesn't mean that we couldn't modify stock images to take out useless apks or get better performance.
We can get this using an Android Kitchen and a full update image for the device.
As Android kitchen you can use SuperR kitchen (https://forum.xda-developers.com/ap...chen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434)
As full image, I only tested the one here (https://easy-firmware.com/index.php?a=browse&b=category&id=19521) because I can't download any newer one.
I tested uncompressing it, deodexing the apks and doing a new image. But I don't test it in the device because I need to install twrp to flash the new image and I don't have time to test. But this should work, I did it many times so if someone is interested I can give steps to do it and support for testing.
If someone can get the latest full images, send then to me and maybe I can get some time to do some tests.
PD: Probably we could use this as a base to get LineageOS 14.1 working: https://github.com/latte-dev/android_device_xiaomi_latte/tree/cm-14.1
So, if you are interested in some hacking with the Yoga Book, contact me and we could team to get the most of this device.
First of all thank you for your post, it´s really useful
if you could somehow manage to boot windows on this machine it´s by far the greatest war we have right now.
Il promise you a lunch or dinner on Lisbon whenevere you want!
joao1979 said:
First of all thank you for your post, it´s really useful
if you could somehow manage to boot windows on this machine it´s by far the greatest war we have right now.
Il promise you a lunch or dinner on Lisbon whenevere you want!
Click to expand...
Click to collapse
Sorry, my knowledge of Windows is only user level . Install it in personal computer to play games .
But I really don't know why people wants to run Windows there, it will go slowly than Android and its less touch oriented... but I suppose that this is a chat for another thread
corvus said:
Sorry, my knowledge of Windows is only user level . Install it in personal computer to play games .
But I really don't know why people wants to run Windows there, it will go slowly than Android and its less touch oriented... but I suppose that this is a chat for another thread
Click to expand...
Click to collapse
in my particular case, i´l admit that is for football manager the touch version
joao1979 said:
in my particular case, i´l admit that is for football manager the touch version
Click to expand...
Click to collapse
Have you tried running it through Crossover? It may be in its infancy but i have got a few apps running OK with it.
I have the full "YB1-X90F_USR_S000196_1611040312_WW06_BP_ROW" I can upload somewhere if anyone can suggest a good site to do so without signing up? The file is about 2.5gb
It will be great if we could get the latest version, because maybe these older versions have older files that we have updated in our tablets.
Mixing files could give unknown problems
The current TWRP is based on the new Yoga Tab 3
I am starting to think they do not do full roms for this in the same way they do for a lot of their other devices.
We know the otas are available from tabdl.ota.lenovomm.com/dls/v6/ and are named according to the 2 builds that it bridges. As easy-firmware had the december full rom under the file name B1-X90F_USR_S000196_1611040312_WW06_BP_ROW-flashfiles.zip I had hoped that I could work out the file path to pull it down.
There were some interesting ideas here, https://forum.xda-developers.com/android/help/how-download-stock-roms-lenovos-ota-t3109507 but it seems there is a difference between phonedl.ota and tabdl.ota
Queries to full roms that work for phones, don't seem to work for the yoga book.
Anyone with more web knowledge able to pick this up? I am not sure the files are there but I feel they should be.
Good luck
Update: the downloads seem to be hosted via CloudFront. An Amazon service, but I can not find out a way of listing the available files. The latest full rom would be
http://tabdl.ota.lenovomm.com/dls/v6/YB1-X90F_USR_S000426_1705080316_WW06_BP_ROW_WC80C2A0F2.zip
But the Last 8 chars are random and we do not know what they are.
So we have two hopes. First work out the right query to the link from fus.lenovomm.com or two find a way of listing files available in tabdl.ota.lenovomm.com/dls/v6
Not sure I have got much further but ill keep trying when I can.
Hey, I should mention that I have some files that you may find helpful; I got them from the easy firmware website. They're all the .img files for each partition in Android (ie. boot.img, cache.img, config.img, factory.img, recovery.img, system.img) as well as: biosupdate.fv, bootloader, firmware.bin and gpt.bin. However, these of course aren't in the normal "flashable .zip ROM" format. So unless you know how to take apart these .img files they aren't very useful. If you need any more help or have any other questions about how far we've come on our own, feel free to ask. danjac also has great knowledge of our efforts.
Yes, I know how to use them, unpack, modify, etc. But what I want is the latest version, no a old version (I hav these files too). If you have them I can do some changes, debloat, etc.
Anyway, I see little interest in custom roms in this forum ( probably because it's not a device with a lot of users or the users are not the techy kind), so I prefer to help others with info than do a custom rom that only 2 or 3 people will use. Doing custom roms is a time hungry task and probably it doesnt worth the effort. Anyway this device is not full of bloatware like samsung ones, so it useable as it is.
As I said in my first post if anyone is interested I can give some hints and support to modify the full image (but only the latest one).
It's so sad that there are only a few interested owners of this tab - it's such a nice device but i fear the day lenovo decides to end their support for it. There will be no custom roms to switch to and keep the device alive - it will be a soon to be bit of old tech garbage BTW. I still use my Asus Transformer Prime because of the nice community
@NiffStipples I fully agree. This device is so powerful and its a suprise that it is invisible to the "market". In my humple opinion the normal ROMs aren't that bad besides missing updates but I would love to see all the power served through a custom rom. unfortunately programming is not my business
Stefan
Broomfundel said:
Have you tried running it through Crossover? It may be in its infancy but i have got a few apps running OK with it.
Click to expand...
Click to collapse
Interesting - is Crossover good (and does it require factory reset)?
Hi, It works well with some things and not others. Often the why and where are not obvious. It is basically "wine" the layer that allows some windows apps to run on a linux install. Tweeked to work with android. Just an install to put crossover on. Then another install (Within crossover), to put you app on crossover. If it doesn't work out of the box, there windows libraries you can switch out and dependencies you can install. (Eg: directx , .net) Even if your not technical. I would say get on the beta program and give it a try.
Hi! what do you mean by "lenovo's open source files are useless"? do you refer to this packet on lenovo's suppport site? download.lenovo.com/consumer/open_source_code/lenovo_yb1_x90f_l_osc_201608.zip
I've entered the Android YogaBook's BIOS and noticed that VT-X is enabled by default! With Limbo x86 we could get a fully working virtualized Windows or Linux, if it wasn't for... KVM. It seems like it's not enabled in Lenovo's default kernel. Could we get to recompile the kernel with this option on? i'm not a big android/ROM expert but i surfed the open_source_code folder from Lenovo and it seemed, to me, that we could rebuild the Kernel at least.
This could really change things!
morrolinux said:
Hi! what do you mean by "lenovo's open source files are useless"? do you refer to this packet on lenovo's suppport site? download.lenovo.com/consumer/open_source_code/lenovo_yb1_x90f_l_osc_201608.zip
I've entered the Android YogaBook's BIOS and noticed that VT-X is enabled by default! With Limbo x86 we could get a fully working virtualized Windows or Linux, if it wasn't for... KVM. It seems like it's not enabled in Lenovo's default kernel. Could we get to recompile the kernel with this option on? i'm not a big android/ROM expert but i surfed the open_source_code folder from Lenovo and it seemed, to me, that we could rebuild the Kernel at least.
This could really change things!
Click to expand...
Click to collapse
How did you enter the bios? Can you boot from usb?
anyone managed to use swiftkey keyboard?

Some rooting/custom ROM questions

Hey, I hope this is the right place to ask this, as this is a general rooting question that is not relevant for the device
Anyway, I have a few questions I hope you guys could answer me
1. From what I've understood, when I want create my own ROM, downloading the source also includes the actual OS right?
2. Assuming I'm creating a costume ROM, will I be able to:
a. Have a complete control over connections? As in, create an app that will be able to (with out notifying the user) turn off/on any connection? (BT / wifi / GPS / NFC or anything else)?
b. Make an app that will have access to the OS's file system?
c. Make an app that will be able to control the content of the device, as in, add or remove any given app?
d. Will I have access to the OS drivers? As in, will I be able to remove drivers or add costume drivers?
danduson said:
Hey, I hope this is the right place to ask this, as this is a general rooting question that is not relevant for the device
Anyway, I have a few questions I hope you guys could answer me
1. From what I've understood, when I want create my own ROM, downloading the source also includes the actual OS right?
2. Assuming I'm creating a costume ROM, will I be able to:
a. Have a complete control over connections? As in, create an app that will be able to (with out notifying the user) turn off/on any connection? (BT / wifi / GPS / NFC or anything else)?
b. Make an app that will have access to the OS's file system?
c. Make an app that will be able to control the content of the device, as in, add or remove any given app?
d. Will I have access to the OS drivers? As in, will I be able to remove drivers or add costume drivers?
Click to expand...
Click to collapse
1. Yes, you will download the source to build the OS, as well as the Device Tree, Kernel, and Vendor Files.
2.
a. Yes, that is possible, if you know how to make an app.
b. Yes, that is possible, if you know how to make an app.
c. Yes, that is possible, if you know how to make an app.
d. I'm not sure that I understand the question, but yes, you will have access to the BLOBS (Binary Large OBjectS) that are the drivers for your device. You can substitute them or build other ones, depending on your phone or platform.
I recommend that you watch through my video tutorial on how to build Android, and how to make device trees from scratch, as well as other videos about upgrading and making changes to apps that are in your custom rom.
You can find a link to it here:
https://forum.xda-developers.com/android/general/guide-how-to-build-custom-roms-kernel-t3814251
Hope that helps! :good:
AlaskaLinuxUser said:
1. Yes, you will download the source to build the OS, as well as the Device Tree, Kernel, and Vendor Files.
2.
a. Yes, that is possible, if you know how to make an app.
b. Yes, that is possible, if you know how to make an app.
c. Yes, that is possible, if you know how to make an app.
d. I'm not sure that I understand the question, but yes, you will have access to the BLOBS (Binary Large OBjectS) that are the drivers for your device. You can substitute them or build other ones, depending on your phone or platform.
I recommend that you watch through my video tutorial on how to build Android, and how to make device trees from scratch, as well as other videos about upgrading and making changes to apps that are in your custom rom.
You can find a link to it here:
https://forum.xda-developers.com/android/general/guide-how-to-build-custom-roms-kernel-t3814251
Hope that helps! :good:
Click to expand...
Click to collapse
I see, thank you very much for the info
I will watch the tutorial you provided

Categories

Resources