Is there any way to update wpa_supplicant conf in Android 9 - Android Software/Hacking General [Developers Only]

Hi All,
My first post here, I am not sure I am posting in the correct section.
I need to update the wpa_supplicant conf of my Andorid 9 phone (an Asus Zenfore Max Pro M1) in order to allow it to connect to a MFP (managed frame protected) network.
I managed to configure my home linux machines to do so but with my Android phone it is a disaster.
From what I know the device needs to be rooted...for this I am just proceding with the proper steps but...I am not sure that the wpa_supplicant.conf to be modified is the one settled in the /etc directory as I ve read that on Android the conf file for the wpa_supplicant service may be different.
Is there any way to understand which configuration files a binary executable is bound with?
What I am trying to do is to set the pmf option in the correct wpa_supplicant.conf file in orded to let the device connect to a MFP network.
Any help will be so much appreciated.
Thanks!

Well...it is nice to discover that Android 9 is not using wpa_supplicant any more and that it will be a nightmare to crosscompile it and configure it as a daemon
This is my last android shxt phone.

A quick search reveals that WifiConfigStore.xml should be the file you want. requirePMF might help, from source for WifiConfiguration.java. I can't find any more documentation than that (opening source files kills my phone browser) but that should be a good start.

Thanks Efreak2004 but have tried that way as well.
Have modified the WifiConfigStore.xml by setting to true the requirePMF option but it did nothing.
My suspect is that the java wrapping useless stuff is not doing anything more than trying to "steer/drive" the native processes preposed to do the job. It has always be this way since the invention of java which was wrapping lib C in any aspect.
I am almost convinced that without the wap_supplicant binary/daemon there is no way to let the java fancy wifi manager do the job by its own.

Related

[NEWB] Installing bash,openSSH,fuse, a file manager and a terminal

Hi,
I am a new owner of an android phone (Nexus One). I am a Linux sysadmin so I had not too much trouble rooting it (with adb directly) and doing some tweaking. But I am now kind of lost when it come to finding applications. I am not interested in custom rom, I just want to customize my own phone and connect it to my ssh vpn to have remote access to my file. Later I plan to use the usb host hack, but not now.
I am not able to find how to install bash, fuse and openSSH. I really want OpenSSH and not any other implementation of SSH2. I don't really want to cross compile them, there most be someone who did it before me! I found 2 or 3 binary on google, but they don't work. Busybox work, but it is a pain, but it show that downloaded binaries can work. Where can I find those things?
I also want to know the best terminal (native terminal, not ssh client) and a good dual panel file manager with drag and drop.
I know that those questions are common, but I can not find any answer. Thanks.
anyone?....
Elv13 said:
anyone?....
Click to expand...
Click to collapse
Evidently not. I came across your post searching for implementations for openSSH and lsyncd in Android.

[Ubuntu Image] 1st really working simple to install Ubuntu on your phone

This is easier than making a cup of coffee.
Pictures below as attachment couldnt figure how to put the pic here edit figured it out now im just lazy.
you dont have to do it the hard way
Everyone (edit: i thought so at the time)will want this "Fully" (note below) funtioning Ubuntu system
or you can make your own here: http://forum.xda-developers.com/showthread.php?t=913622
I will be maintaning and updating as time permits
Phone has to be rooted: http://forum.xda-developers.com/wiki/index.php?title=HTC_Supersonic/Guides_&_Tutorials
NEW IMAGE 3.5 gigibyte
Lucid base image (only added: lxde and tightvncserver): Zip http://www.megaupload.com/?d=GLMYVCMN User: "dad" Passwd:ffffffff
Remove app2sd and settings- applications- manage applications- sdcard "move all apps to phone" or it will not work!
I suggest you install gnome-panel
I use it and i find no speed differance!
trying to get :upstart services" to work im looking into compiling a kernel with "CONFIG_TMPFS enabled, to initiate a workaround, because "upstart" services wont work in a chroot.
Stock Maverick : http://www.megaupload.com/?d=56AT71WD
Karmic Sucks programs stop opening after some short time, so i gave up.
Tested with: CM7 http://mirror.teamdouche.net/get/supersonic/update-cm-7.0.0-RC1-Supersonic-signed.zip
CM6: http://mirror.teamdouche.net/get/supersonic/update-cm-6.1.2-Supersonic-signed.zip
myn-WarmTwoPointTwo-11-05-2010-RLS-3
Unzip
Copy the "ubuntu" folder to your sd card
Go to market download "Terminal" and android VNC Viewer
Open terminal and type: (without the quotes), "su" then "cd /sdcard/ubuntu"
then "sh ./ubuntu.sh"
then "bootubuntu"
then "vncserver :0 -geometry 1024x800"
Thats it, go to android VNC Viewer and use dad for nickname, "ffffffff" for the password, "localhost", for address, 5900 for the port, Use 24bit veiwing settings, then go.
to shutdown you will have to power off phone and power back on.
Enter in your :"Initial Command",in the settings of Android Terminal:
su
cd /sdcard/ubuntu
sh ./ubuntu.sh
bootubuntu
So everytime you want to start ubuntu just open terminal
to start VNC SERVER automaticly you will have to add to the bottom of your /home/.bashrc file this:
cd /
rm -r -f /tmp
mkdir /tmp
vncserver :0 -geometry 1024x800
Thats it, your off ENJOY
Notes: Its as fully funtioning for myself, cant speak for everyone
This is in Beta stages I am an old Visual Basic dabbler as a hobby, and am not very fluent in the lenux operating system. However this "ubuntu on mobile device" has rekindled a lost desire to program.
I will update changes as i get the time
If anyone would like to contribute their lenux expertese to iron out the bugs, i and so many others would appreciate it
Issues to work on:
:no sound
NOTE: A big kernel level problem is the lack of sound. Most of the kernels we use as a base for our ports are designed for Google Android. Android doesn't use the standard Linux sound System ALSA. An ALSA wrapper for the EVO DSP kernel system must be written.
:Setting up users and groups (used kusers but seemed to slow system a bit, needs kde-common) But is very tolorable, I actually use dolphin. (cant get nautilus to create folders or files (destination read only? u got me)).
:hacked /root/.bashrc for easy login help (when using terminal runs .bashrc. dont know anotherway to start hamachi on login and also vncserver tries to restart)
:keyboard mapping (mapping arrow keys to the abc keyboard it has arrow keys, esc,etc...)
: No way to exit or turn off ubuntu. You have to turn off phone, to turn off ubuntu.
nce in a while the programs refuse to open, it has somthing to do with ?. you have to restart ubuntu again.
I suppose a fluent ubuntu/lenux person could help change usernames and such, using the terminal,set proper permissions and such
Im using CyanogenMod Rom its the only one that works with Hamachi
your rom will most likely work, however networking wont!
Tips:
ownload VNC for your computer and modify your ubuntu desktop on your computer screen (that way i dont need my glasses) (use "ifconfig" to find ip address)
:You can even use VNC to view the build while in qemu emulation, after installing lxde and tightvncserver in the emulation. (watch out for seg faults)
:In terminal, preferances-initial command, enter the "cd /sdcard/ubuntu ...etc ," that way its a one click to login .
:Get "abc keyboard" from market it has the esc, arrow keys etc... ( extra keys only good outside chroot, the "terminal", on your android desktop)
:If your not familiar with ubuntu, you use synaptic package manager to install programs
:When u share over himachi or start smbd, programs will stop opening.
.
Trust me everything i want it use it for seems to be pretty zippy, but just give a little xtra time for programs to load the first time. (Firefox may take 90 sec. to load the first time. After that its a snap)
I Would like to check into this
The no sound issue is getting to me, I may wait for that as that is an essential to my all in one device.
THANKS FOR THE HARD WORK. I LOVE UBUNTU
you really have to try it and tell everyone about it cant believe its not one of the hottest topics
I Would like to check into this
any way to delete this post....didn't mean to submit, came back to send like i didn't send it but ending up sending twice
apologies
Sounds pretty cool, I will defiantly have to give this a try. Question though, is this installing over top of the rom I am currently using. Example I am using the MIUI 1.22, if I install this is this like dual booting or will it just uninstall every time I reboot the phone??
Is it still uploading? I really want to try this!
corybucher said:
Sounds pretty cool, I will defiantly have to give this a try. Question though, is this installing over top of the rom I am currently using. Example I am using the MIUI 1.22, if I install this is this like dual booting or will it just uninstall every time I reboot the phone??
Click to expand...
Click to collapse
This will sit on your sdcard and ride side by side with your android system (you can use your phone at the same time)
IT DOES NOT EFFECT YOUR PHONE IN ANY WAY
wasnt shouting just wanted everyone to see
ioos said:
Is it still uploading? I really want to try this!
Click to expand...
Click to collapse
Download away!
This is awesome! I can't wait to get home and give it a try.
This is gonna be a great weekend. Between this and the flashable ROMs that are starting to roll out for my nook color, I might be sprouting antennae by Monday.
So wep cracking soon...? That's about the only thing I want/need Linux for.
Sent from the void...
wuclan48 said:
So wep cracking soon...? That's about the only thing I want/need Linux for.
Sent from the void...
Click to expand...
Click to collapse
How would one go about this "wep cracking thing"
please explain further
Almost* all WEP and some** WPA wireless passwords can be cracked. IMHO its easiest to do this on a Linux machine (please take note I love all OSs equally!)
*I forget how accurate this is but some WEP keys(like crazy long ones) can cause problems l in cracking, thus being protected (though not by design)
**most wpa specifications are not crackable yet and those that are often have a very stringent set of requirements (off the top of my head: most require someone to be legitimately connected to the access point and very simple passwords with low encryption.
On topic, though, this is sweet. Hope I can get something like this on my galaxy tab too!
EDIT: If you really need to know this (please only for testing... not to mooch people's internet) Google "wep cracking on backtrack"
The short simple answer is you sniff packets that the wireless access points send out and manipulate them to decrypt the key.
EDIT 2: I just realized you are also the guy who made this. Let me answer a few questions.
1) For audio you probably need to find a way to register the hardware with a Linux Audio Mixer. I'm guessing Ubuntu uses ALSA? I'd have to look that up
2) For users, kusers is part of the KDE desktop system. Ubuntu uses GNOME. People generally only use one or the other (unless they're trying to show off). That's probably why it either a) won't work or b) not work well and take up lots of extra space
3) It's Linux, not Lenux (but that's fine I can sense English isn't your first language... it's not mine either, but that's fine ^^)
the download has a "zipx" extension.
I did a little googling and it looks like that is winzips new default compression method, and the only way to open the archive is with winzip, bitzipper, pkzip, or a couple of others. none of the compression utilities I typically use (7zip on Windows, unarchiver on mac) seem to support it.
Edit: sorry if I sound unappreciative, I just think its funny to use a proprietary closed format for distribution of software that is all about open software and formats. I'm currently trying to find something that will open this on the mac without being a scummy trial, or ill just do it on a pc.
Sorry i just used the wizard and made a zip file with winzip 12.1
Quote"Almost* all WEP and some** WPA wireless passwords can be cracked. IMHO its easiest to do this on a Linux machine (please take note I love all OSs equally!)
*I forget how accurate this is but some WEP keys(like crazy long ones) can cause problems l in cracking, thus being protected (though not by design)"
Thanks for the info
laydros said:
the download has a "zipx" extension.
I did a little googling and it looks like that is winzips new default compression method, and the only way to open the archive is with winzip, bitzipper, pkzip, or a couple of others. none of the compression utilities I typically use (7zip on Windows, unarchiver on mac) seem to support it.
Edit: sorry if I sound unappreciative, I just think its funny to use a proprietary closed format for distribution of software that is all about open software and formats. I'm currently trying to find something that will open this on the mac without being a scummy trial, or ill just do it on a pc.
Click to expand...
Click to collapse
shame on me .
Your right im a noob and really know too much about it yet i just like having ubuntu on my phone.
Ill do better next time
People talking about cracking WEP and stuff, this probably doesn't have a driver to put the wireless card to put the card in monitor mode.
laydros said:
the download has a "zipx" extension.
I did a little googling and it looks like that is winzips new default compression method, and the only way to open the archive is with winzip, bitzipper, pkzip, or a couple of others. none of the compression utilities I typically use (7zip on Windows, unarchiver on mac) seem to support it.
Edit: sorry if I sound unappreciative, I just think its funny to use a proprietary closed format for distribution of software that is all about open software and formats. I'm currently trying to find something that will open this on the mac without being a scummy trial, or ill just do it on a pc.
Click to expand...
Click to collapse
Have the same problems, did you happen to find anything to open it with? I searched a little on google myself but all I find is software that needs to be purchased.
Homefix said:
Quote"Almost* all WEP and some** WPA wireless passwords can be cracked. IMHO its easiest to do this on a Linux machine (please take note I love all OSs equally!)
*I forget how accurate this is but some WEP keys(like crazy long ones) can cause problems l in cracking, thus being protected (though not by design)"
Thanks for the info
Click to expand...
Click to collapse
AFAIK, WEP can be easily cracked. WPA or WPA2 though, will require bruteforcing, there is no way around it.
corybucher said:
Have the same problems, did you happen to find anything to open it with? I searched a little on google myself but all I find is software that needs to be purchased.
Click to expand...
Click to collapse
I will repackage it, but it might take 3-4 hrs to upload, sorry.
ill get right on it

Ad-Hoc for xoom using v0.6.x wpa_supplicant

I stumbled upon the following thread over in the EVO forum about enabling ad-hoc support for both 0.5.x and 0.6.x wpa_supplicant versions. Following the instructions there, but using a terminal emulator on the xoom I entered:
adb shell wpa_supplicant -v​
and it returned v0.6.10 on my (wifi only) xoom.
Now, the problem i'm running into is that the files provided are to be flashed in a recovery--and since the xoom doesn't have one yet, i instead unziped the update, extracted the file, and used root explorer to mount system/bin and replace the "wpa_supplicant". I did a chmod to change the permissions to 775, then flipped my wifi back on to see if it worked....
The result was wifi turned on, but just scanned indefinitely and didn't pick anything up (not even the access points ). Luckily, i made a backup of the original "wpa_supplicant" and restored it using root explorer and fixing permissions as described above. That at least got my wifi up and going again
My question is, does anyone know how to edit the honeycomb file to work with ad-hoc? I'll attach a link below if anyone wants the original to play around with.
I guess it is worth noting that if someone could get this going, i'd be willing to throw a few bucks their way. I'm just stumped, but it seems like it is so close i can almost taste it!
Thanks for your help!
-amruthwo
Stock wpa_supplicant file from Xoom
(lives in system/bin)
amruthwo said:
I stumbled upon the following thread over in the EVO forum about enabling ad-hoc support for both 0.5.x and 0.6.x wpa_supplicant versions. Following the instructions there, but using a terminal emulator on the xoom I entered:
adb shell wpa_supplicant -v​
and it returned v0.6.10 on my (wifi only) xoom.
Now, the problem i'm running into is that the files provided are to be flashed in a recovery--and since the xoom doesn't have one yet, i instead unziped the update, extracted the file, and used root explorer to mount system/bin and replace the "wpa_supplicant". I did a chmod to change the permissions to 775, then flipped my wifi back on to see if it worked....
The result was wifi turned on, but just scanned indefinitely and didn't pick anything up (not even the access points ). Luckily, i made a backup of the original "wpa_supplicant" and restored it using root explorer and fixing permissions as described above. That at least got my wifi up and going again
My question is, does anyone know how to edit the honeycomb file to work with ad-hoc? I'll attach a link below if anyone wants the original to play around with.
I guess it is worth noting that if someone could get this going, i'd be willing to throw a few bucks their way. I'm just stumped, but it seems like it is so close i can almost taste it!
Thanks for your help!
-amruthwo
Stock wpa_supplicant file from Xoom
(lives in system/bin)
Click to expand...
Click to collapse
ooooh You are close. Imma gonna play with this over the weekend. I want this.
next question...
Ok, i'm drawing a blank here--what can you use to actually view and edit the wpa_supplicant file? I've kind of tried with notepad, but it seems futile with how many of the characters fail to render, basically making my attempts to understand the subtle changes impossible.
Can anyone shed some light on a good program for win/linux that might work better?
amruthwo said:
Ok, i'm drawing a blank here--what can you use to actually view and edit the wpa_supplicant file? I've kind of tried with notepad, but it seems futile with how many of the characters fail to render, basically making my attempts to understand the subtle changes impossible.
Can anyone shed some light on a good program for win/linux that might work better?
Click to expand...
Click to collapse
we cant edit it directly with notepad, we need the source code of HC then add the adhoc code then compile it..
one thing that curious for me is the wpa_supplicant version is the same as in froyo or ginger android, but we can't just put that already adhoc enable compiled wpa_supplicant file to our HC..it will make our wifi can't see any wifi network..
hmm perhaps there is some other file involved..lets dig it..
exactly, i've been rubbing my chin for about a week on this one. I don't see why the froyo/ginger v0.6.10 file doesn't work...
maybe there is another file involved though, i'm going to go digging in the system folder to see if anything looks related i guess.
hopefully source is released soon, it would make this a little easier...
Pretty sure wpa_supplicant is a GPL project so you shouldn't need to wait for HC source for that.
What errors are you seeing in the logcat after replacing it?
i actually didn't record the log, let me do it again and i'll see what the log says. I'll report back.
log file
here is a bit of the log when trying to connect to wifi...
basically, it says wpa supplicant unable to initiate ap scan
Being Android noob, and since I'm trying to get this xoom to see ad-hoc networks for work (this is really important.. spent 600, expecting it to connect it to adhoc.. dang it.), would it be worthwhile to port wpa_supplicant from droid x?
Droid x reports 0.6.10. Unlike EVO, since they are both motorola products, they have something in common??
Or maybe, xoom uses a different driver? I see that droid x has tiwlan0 as its wireless, whereas xoom simply says wlan0.
Reading from here: htt p:/ /sz ym . ne t/2 01 0/1 2/a dh oc - w i fi - in - an d ro i d /
(sorry, being a new user, it doesn't let me post a link... )
someone says that wpa_supplicant needs to be compiled with the correct driver.
Does anyone know how to do this? Or am I just wrong? lol
from what i understand, the wpa_supplicant is part of the gpl, not unique to any phone manufacture. I'm no expert on the subject either though. I have no idea what is different in the xoom, but i have used the v0.6.10 which matches that of the xoom, but no dice. If you want to extract one from the droid x and edit it (assuming you know how) then it is definitely worth a shot!
let us know what you find
lesjaw said:
we cant edit it directly with notepad, we need the source code of HC then add the adhoc code then compile it..
one thing that curious for me is the wpa_supplicant version is the same as in froyo or ginger android, but we can't just put that already adhoc enable compiled wpa_supplicant file to our HC..it will make our wifi can't see any wifi network..
hmm perhaps there is some other file involved..lets dig it..
Click to expand...
Click to collapse
You're right about not being able to edit in notepad, but I opened it in notepad++ to at least view it. I don't have visual studio installed on my laptop at the moment or else I would try with that.
At any rate searching through the file in notepad++ I found two instances where it refers to adhoc that looked interesting.
One line says: WPA: Invalid mode %d (not IBSS/ad-hoc) for WPA-None
and the other line says: skip - IBSS (adhoc) network
That second line looks to tell it to skip adhoc networks when scanning.
Pretty sure wpa_supplicant is a GPL project so you shouldn't need to wait for HC source for that.
Click to expand...
Click to collapse
It is. It even says so within the file.
EDIT: I was able to open it in Visual Studio and it looked much better. I'll see if I can figure something out with what to edit in the file.
Solution found!
hey, someone finally got the binary figured out!
check out the thread here
and, if you're away from your computer, or just hate using adb, my buddy mr_wrong_0 has root explorer instructions here!

making an app for small file transfer to specific device

I tried to make the subject as small as possible while still stating my point.
Basically I work with a device a lot that runs some machinery. There is a file that is sometimes updated to run the machinery better, we usually update the file on the device when some aspects of the equipment are changed. The file is pushed onto the device using software on my laptop. The software on the laptop is written in C++. I want to make a light version to run on my android phone.
My idea is to create a simple program to run on my android phone that will push the file onto the device after it's edited for changes to the equipment. I opened the C++ exe program in a decompiler (rec4) and I started trying to dig through the code, there are soooo many lines of code in this program, and I don't even know what string to look for. I'm trying to find the exact string that pushes the file to the string so I will know how to write the exact thing in an android program language for my phone only to push the file to the device after I plug it in through the USB connection. That way I have a simplified version of the program running on my phone solely for pushing the file to the device, instead of carrying my laptop around all the time to push a little file.
In a nutshell, after I have described why I need this, I'll simplify everything. A program I have is written in C++ and it pushes a simple file to the flash memory of a device that runs some equipment. I want to be able to push the file from my phone instead of my laptop. So I want to know the string to look for that would push a file onto flash memory.
How the program works. If I have the program already running when I plug in the USB, I have to select "file", then "establish connection" so that it connects, The program appears on my laptop to reconfigure it. I search for the new file to replace the old one and send it to the device. By default the program tries over COM1. It has to be changed for my laptop because it's new and doesn't have the com1 connection, I have a USB adapter that I use.
I hope I explained this well enough, it's really not as complicated as I'm making it out to be.
So does anyone know where I can look up the C++ command arguments to push the file onto the device? And also what the command arguments would be for android to push the file onto the device via USB?
Hello,
If you are a developer you might want to look at this link:
http://developer.android.com/reference/android/hardware/usb/package-summary.html
If you aren't, I am afraid this isn't going to be as simple as looking for strings in a decompiled program and translating the code to different languages. You might want to get a developer to make this application for you.
If possible can you also give more info on this device? Is it like you plug in the device to your laptop and you can access it like any USB memory drive? Or the device can only be accessed using that program?
Edit:
The android.hardware.usb was apparently introduced in Android 3.1. So you won't be able to use that to make an application that you described for your phone...
The device basically controls an advanced machine with multiple inputs sensors and output and switches. It has it's own power supply, it just needs updating every now and then to refine/change the cycles and rotations. I contacted the company that makes the device, and they said they haven't made any software to run on android. They couldn't give me any information on how the laptop program communicates with the device. It seems like the file that needs editing is just stored back on the device in flash memory. When the laptop is plugged in and a connection is established, the information that makes up the configuration file appears on the laptop program from the device. I don't know if the program pulls and reads the file, or if the device copies it to the laptop. It's probably the laptop that reads it.
I'm not a developer, I know a little about programming from college, and I have enough patience to sit and read or watch videos until I know how to make something that works. I know a guy that talks a lot about making android programs, maybe I can ask him for pointers.
My android phone has a mini USB port, what's the new thing that's in android 3.1 that's not in my 2.2 regarding USB? Is the USB on the android 2.2 limited in what it can do? I know mine can tether and transfer files, but is that something that the computer does instead of the phone?
I'm trying to find another HTC HD2, I sold mine and I shouldn't have. I've heard a little about people putting android 3.1 on the HD2, I'm not sure if that's true, but I'll look more into it.
If its a file that the device is reading the data from, you'd also have to find out how the data is exactly being stored in the file. I guess this could be figured out through the decompiled program or maybe if you can access the file yourself somehow.
The thing is that the package(android.hardware.usb) that allows you to write applications in which your phone can act as a USB host(I guess this is what you want your phone to behave like in this case) was introduced in Android 3.1 and its not present in Android 2.2.
That doesn't necessarily mean that you cannot have such an application on your phone. It just means that you cannot use the Android Java API to make something like this. I am not too sure how it can be done but I guess it is possible to make an application like the one you want that runs on a rooted phone maybe?
I am sure anyone can learn to write programs/applications but its just that you'd have to put in a lot of time and effort to make something like this. If you are in no rush to have the application ready then its fine if you learn to make it yourself. And since its a custom made application and the people who made it aren't willing to help you by giving info on it just makes it that much harder for you.
yeah, when I get another HD2 it's getting rooted with android, I just have to find one. Since I sold mine they have made it to where you can run android off of internal memory, so I'm itching to get it back.
The laptop program also has the option to save the configuration file locally, I haven't thought about looking through that. I didn't think it would tell me much.
So theoretically, if I were to write a program for the android phone with usb transfer capability to the device in question would it work? It doesn't bother me if I have to root my phone.
If the device is reading data in from the file, and you wish to write a program that creates this file, you will have to take care that the program you are making writes the file in very same format and saves the file back in the same location on the device where it will look for this file later.
If you made this application for an android device that has USB Hosting capabilities, it should work (as far as I know).
The question is: How can you get your phone to have USB Hosting capability? I don't know if rooting your phone would do it. You'll have to find out about this.
I'm not creating the file..I just want to make a program to push the file.

[Q] Custom Device driver / KernelLibrary

Good day,
I am new to the forum so please forgive me if this is not the right place to ask.
I have been reading through some of the threads on the forum and is curious to know if there is a way to load custom kernel libraries or device drivers onto the phone.
If there is a way, is there a correct procedure? For example to load a custom device driver / kernel library, do I also have to have an entry in the registry? Does the dll file have to be in /Windows?
Thanks in advance.
Good questions. There's been only a little research on this so far. I can tell you waht I've found, though:
For a stock ROM, nobody has managed it yet, but it might be possible. You'll need to have your DLL signed, and the certificate added to the Code Integrity store on the phone (just mailing yourself the .cer is insufficient! That will put it in the wrong store). You'll probalby want the DLL to be in \Windows, although I'm not sure it's needed. You almost certainly will need to add registry entries; the current drivers seem to have them.
Good day,
thanks for your reply. And thanks for all the good research you have done.
So at the moment, the software approach is not working but for custom roms, is it possible to include custom device drivers / kernel libraries in them?
Thank you.
mousefish321 said:
Good day,
thanks for your reply. And thanks for all the good research you have done.
So at the moment, the software approach is not working but for custom roms, is it possible to include custom device drivers / kernel libraries in them?
Thank you.
Click to expand...
Click to collapse
Well, it's possible. The HD2 Multitouch driver is an example that its somehow possible. Should be the same for the other devices (espacially HTC first gens)...
But don't know what you're getting at? Why would you need a custom driver?
Good day,
well, I just think that having a driver that acts like HTCUtility would make things convenient.
As for file operations, besides the application that Heathcliff has created (WP7RootTool), are there other applications that can do write operations to the /Windows folder?
What are the things that needs to be done before we can write to that folder?
Thank you.
Any app with Elevated or TCB privileges can write to \Windows, I think. Using HtcRoot project or WP7 Root Tools works (both elevate apps to TCB permissions, though using different methods). Also, using an OEM driver, such as HtcProvisionDrv or HtcFileUtility, works (although those two particular drivers were crippled in the 4.x firmware).
Good day,
thanks for the information. I tried the HtcRoot tool and it works. Thanks for the tool and the source that allows me to know how it works.
Can I assume that I would be able to have write access to the Certificate and Code Integrity store also?
I am also curious as to the workings of HTCFileUtility. A quick search on this turns up little information on its workings.
Furthermore, is there a guide to inserting custom certificates to the root Certificate and Code Integrity store? I have tried downloading the Certificates.zip file in http://forum.xda-developers.com/showthread.php?t=1236027 and test rom files in http://forum.xda-developers.com/showthread.php?t=1248799 hoping that they will shed some light but is unable to download them.
Any help is appreciated. Thank you.
Yes, installing your own cert into Code Integrity is possible (in several ways, actually, but I did it using HtcRoot just as an exercise). The certificates are actually stored in the registry, so any tool that can write to HKLM can add them. I believe that WP7 Root Tools will also let you choose the store for adding a certificate if you "open" the cert from the Root Tools filebrowser.
Although I don't know exactly how HtcFileUtility works, here's the basics. It's a software driver that exposes an interface - probably an IOCTL - which apps can use to perform filesystem operations. Since it runs with TCB permissions (it's probably kernel mode, though I haven't actually checked, but it's definitely in TCB) it can perform any operation that the filesystem supports. Of course, that doesn't mean that it exposes all those operations through the IOCTL... but it exposes enough of them for a pretty solid filebrowser implementation (that's how TouchXplorer and Advanced Explorer worked, although they used an OEM COM DLL that called into the driver rather than doing the IOCTL themselves).
The new version of it has very limited operations permitted; it will only list files in a few folders and so forth. It does still "work" within those limitations - Connection Setup, for example, uses it to check the folder that we use for interop-unlock on HTC - but it isn't useful for a general-purpose browser anymore.
It would be great to even figure out how to roll back the OEM drivers to earlier versions. For example, I've got WP7 Root Tools installed on my HD7, but I don't want to install HTC updates because they'll break my drivers such that if something ever goes wrong I won't be able to re-install Root Tools, or if a new hack is found (or developed; I'm working on some stuff with HtcRoot still) I won't be able to run it on my phone. Being able to use the advantages of the new firmware (Internet Sharing, compass in managed apps, hopefully an end to the damn music player freezing between songs...) while still having hackable OEM drivers would be reallllly nice...
Good day,
thanks for the information.
I noticed in the HTCRoot project thread where you mentioned that "It is not a true handle (no handle table, no handle data) but everything that checks for tokens also checks for this const value, and appears to pretty much skip all remaining permissions checks if it finds it".
Would you mind sharing some of the function names so that I could take a look at the code where the checking occurs?
Thanks.

Categories

Resources