Related
Hello everyone,
I am happy to inform all those folks who waited for a full Linux operating system on the HTC Kaiser PDA that today a little bit modified version of Zubuntu finally booted successfully on my HTC Kaiser.
It is a really in the alpha-state but it works, let's see what do we have:
TouchScreen: works perfectly with calibration
Screen: looks good. but programs doesn't support Kaiser's small resolution. You can fix this by using INTERPOLATION, but this makes picture quality a lot worse. To try it out edit the default.txt, find the mddi.height and mddi.weight values and change to for example 480 and 360.
Keyboard: works exactly as expected, some fine tuning with the keyboard map will be done
ScreenRotating
Not tested/not working:
WiFi (MY #1 ISSUE, TRYING TO FIX): I extracted the wifi section from an Android rootfs, successfully modprobed wlan.ko, dmesg shows that the driver is loaded OK, but:
Code:
iwconfig
tiwlan0: no wireless extensions
ifconfig tiwlan0 up
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
TI's WLAN_LOADER program didn't work either, so now I am moving to the other driver (wl12xx)
Bluetooth (Driver is there, no BT programs installed, couldn't test it)
3G
Cameras
Phone (NO dialer, nothing, however perhaps gsm-libs can help us firing it up)
Many many thanks goes for all these people form the #htc-linux IRC channel: randomblame, Markinus, ali1234, Ondalf and bombenbach for their outstanding support and help!
I would like to say thank you especially to phh for his awesome help and patience with me!
Click on the image for more pictures!
Stay tuned for: hopefully working WiFi, screnshots, YouTube-demonstration.
If you are interested, want to say thank you, want to help, or have an idea how to fix some things please write into this topic.
Also if you like my work, please consider a little a donation for me
After all, I am pretty sure now you want to try this on your own too, so here is the link for the Google-Code website. Download all the files and read the Wiki to know what to do.
http://code.google.com/p/kaiser-buntu/http://code.google.com/p/kaiser-buntu/
Link to RootFS:
http://www.megaupload.com/?d=ANRC94ON
Mirror (thanks to jmcbrother):
http://rapidshare.com/files/371631240/ubuntu_rootfs.rar
Mirror #2 (thanks to hoatienii):
http://www.mediafire.com/?uvytadoykyy
Want to be updated? Check out the project's Twitter page!
http://www.twitter.com/kaiserbuntu
Thank you,
DOMy
RESERVED for future additions
Reserved for future additions
great work . please upload link to test
Sweet that is great news! I can't wait to try it out!
Me wants the alfa link
This is so great!
Maybe we can find a solution at my hackersspace.
Great Work... Luv Linux.... Ported Android on Windows Mobile Device... Eager to port Ubuntu on Kaiser...
can you please share the Linux Beta link ...
Makes me almost wanna install Ubuntu on my PC.
Dukenukemx said:
Makes me almost wanna install Ubuntu on my PC.
Click to expand...
Click to collapse
me 2
oh……thank you……I wanna test……wait ……
Would it be destructive to flash it to nand at this point in the project?
I wouldn't count on it even remotely fitting on the NAND. Besides, you'll probably have to have half the apps on an SD card anyway...
how about a build that will work with the new nomorootfs installers so hose of us like me can try it without going back to winmo, Would like to install to ext2.img files or sdcard partitions.
And is this remotely close to the MER Linux build that progress seems to be halted on I was able to get it to work
working XWindow?
I wouldn't recommend installing it to NAND (it doesn't work so good, for example I didn't have time to test power/suspend).
Xwindows works perfectly (except the resolution issue).
DOMy
resolution issue. can you please explain that? (whats wrong in resolution) before i flash back to ,WM and try it
Michga said:
resolution issue. can you please explain that? (whats wrong in resolution) before i flash back to ,WM and try it
Click to expand...
Click to collapse
The problem is that the rootfs is not for the Kaiser and the Xserver uses some hardcoded resolution (that means there is no config file for it) so circa half of the windows are too big for the screen. It is not a big problem because you can move them around so it is easy to get to one of the corners and resize them so you can see the whole thing at once.
Fixing this is on my To-Do list
sorry for the dumb question but...
will this support phone???
no mention in the OP.
I assume no. (for now anyway)
mnjm9b said:
sorry for the dumb question but...
will this support phone???
no mention in the OP.
I assume no. (for now anyway)
Click to expand...
Click to collapse
Driver support is there, but AFAIK no frontend yet.
DOMy
mod: I found this: http://packages.ubuntu.com/hardy/comm/gsm-utils and this http://manpages.ubuntu.com/manpages/gutsy/man8/gsmctl.8.html perhaps I will try it later (or someone can try it and report)
This intrigues me muchly, but why ubuntu/debian based?
There are other, (and imho simpler), bases to build on, slackware springs to mind, and there are some tiny distros out there, which may also be worth looking at, to say nothing of the likes of Familiar, an interesting candidate for a non-android htc-linux.
Android NBHCREATOR [v0.3] on Ubuntu. FROYO SUPPORT & ADVANCED SETTINGS [July-29-2010]
NBHCreator v 0.3
NBHCreator makes the nbh file for flashing android to nand.
This utility works for Vogue, Polaris and Kaiser.
Currently supporting Donut, Eclair and Froyo
Prerequisites:
1. you need to be running Ubuntu (other Debian distros may work, give it a try) NBHCreator v2.0 will be cross-platform
2. you need to have wine installed ( I am using v1.1.42)
Make sure to "Completely" uninstall previous versions before installing newer versions.
Directions as follows:
a. select the zImage you wish to make an nbh for... try one from here:Working Kaiser GPS!! or here:DZO
b. change parameters to your liking...
c. click on the "compile" button...
d. select output folder.
and Flash Away...
Please Search for how to flash if you don't know how.
that being said...
I welcome any and all criticisms of this program
and I would appreciate any advice, suggestions, questions or comments.
Version 0.3b
-Fixed Window issues.
-For now...do not save output to a FOLDER on the Desktop.
-DOES NOT WORK YET WITH 2.6.32 ZIMAGES
Version 0.3 (07-29-2010)
-Now Supporting Froyo
-New Advanced Settings for things like Clock speed and Memory.
-Added a Date Stamp option for output filename.
-Removed internal Error checking[/B]
-This version has window issues with the xfce desktop environment. fixed in 0.3b
Version 0.2b (07-01-2010)
-Fixed false errors when creating for Vogue and Polaris
Version 0.2 (06-15-2010)
- Added ability to select zImage with name extentions ie... "zImage-12-06-10"
- Output filename now refects device type ie... "VOGUIMG, POLAIMG and KAISIMG"
- Added some error checking to make sure nbh was built correctly
- misc internal code fixes.
-False Error messages are popping up for vogue and polaris. Resulting nbh should still be usable. Fixed in 0.2b.
Version 0.1 (06-09-2010)
- should work for Kaiser, Vogue and Polaris
- Device specific options
- Settings for hw3d (donut/eclair)
- Settings for Resolution 240x320, 320x428, 320x480
- Settings for Panel Type 1, 2, 3
- Settings for Battery Capacity
- Settings for ppp.nostart (Data)
- May not work with loser's editor (let me know...)
- more options to come
- NBHs are all being named KAISIMG.NBH will be fixed in v0.2
Honestly? I think it rocks, since I'm to lazy to build my own NBH's
I see the similarities, and also the differences, and I think you should continue development personally, it's a different approach, and I can see the possibility to add to it by being able to include boot splashes perhaps, or edited initrd/zimage combinations for instance.
So yeah, keep at it
Yep, sounds like a great idea. A nbh editor is good for beginners, but it would be nice to be able to build your own. Could open up a lot of opportunities for customization.
Just make a Windows and a Mac port as well, for the future.
ok....so far progress is going along very well. I have this functioning on my setup
but I still have to work out making it transferable to other computers.
while I work on this, are there any additions that you would like to see added.
I will see if I can squeeze any changes into the beta release.
What language and GUI toolkit are you using?
It would be fairly portable if written in Python with GTK or Tk.
I am using gambas2 in ubuntu.
I am still trying to port my visual basic knowledge to gambas. it doesn't all function the same.
I have minimal experience in Python. but if you know any good tips I am all open for suggestions.
Now available for testing
really???? no feedback at all???
I have to get around to install Ubuntu, and I don't have the hard disk space for it just yet. Been meaning to go buy a terabyte hard drive to dual boot.
got sources or anything like that so I can haz on gentoo?
currently attempting to break open the deb, will fall back to a vm in worst case.
Edit: As I expected, I found the solution right after posting. Run NBHCreator.gambas from /usr/bin
I'm fairly new to Ubuntu and I've never use Wine before so can't work out how to get this running
The package installed, along with it's dependencies. Now what? How do I run it?
Sorry if this is basic stuff...
richard.
Working ok here. Still need to flash it onto my Kaiser - will report back if I find any problems.
Thank - this is a handy little tool
Edit: Hmm, output file only 4.8K so something is not right. Probably down to me so I'll keep playing.
richard_s said:
Edit: As I expected, I found the solution right after posting. Run NBHCreator.gambas from /usr/bin
richard.
Click to expand...
Click to collapse
The install deb should have created a 'start menu' item under /Applications/Other/NBHCreator
that is confirmed under the default Ubuntu window manager 'Gnome'
however I have not tested it in KDE or any other non-gnome window manager.
what window manager are you using?
poly_poly-man said:
got sources or anything like that so I can haz on gentoo?
currently attempting to break open the deb, will fall back to a vm in worst case.
Click to expand...
Click to collapse
let me know if you get it. I don't have the source available at the moment. it's on my wife's computer.
richard_s said:
Working ok here. Still need to flash it onto my Kaiser - will report back if I find any problems.
Thank - this is a handy little tool
Edit: Hmm, output file only 4.8K so something is not right. Probably down to me so I'll keep playing.
Click to expand...
Click to collapse
the resulting nbh must be 3M
DON'T FLASH IF IT ISN'T 3M.
make sure the zImage file is named 'zImage' and not somthing like 'zImage-12-06-10'
I am fixing the next version to allow different names for zImage.
mnjm9b said:
the resulting nbh must be 3M
DON'T FLASH IF IT ISN'T 3M.
make sure the zImage file is named 'zImage' and not somthing like 'zImage-12-06-10'
I am fixing the next version to allow different names for zImage.
Click to expand...
Click to collapse
No - I won't be flashing it! The file name is definitely just 'zImage'. Oh well I'll wait for the next version and try again.
richard_s said:
No - I won't be flashing it! The file name is definitely just 'zImage'. Oh well I'll wait for the next version and try again.
Click to expand...
Click to collapse
I haven't built in a error log into the program but could you run
the NBHCreator.gambas in a terminal and post the output.
what device are you building for and what are your settings?
After restarting Ubuntu your program it is all working as expected. Sorry about that - I should have thought to try that first
yeah, had to throw it into a virtual machine. Nice tool, though.
If someone describes the process in great detail (including the binary formats and all that), I can make a slightly more portable version, if you'd like.
I will be releasing a more cross-platform version after I work out all the bugs.
Keeping it ubuntu for now keeps the distribution of a crappy program to a minimal.
on that note... V0.2 will be out very shortly.
this will address
-input filename variations ie.. 'zImage-12-06-10'
-output filename specific to correct device ie.. 'VOGUIMG,POLAIMG and KAISIMG'
-error checking
-misc fixes
Ok, so...
At first I found a ReactOS offical ARM port.
It is here(delete spaces, forum still prevents me from inserting any link): htt p:/ /ww w. rea cto s.or g/wik i/ARM_ Port
At second I don't understand it at all so if anyone are good in this type of thing, tell us is it possible to have it working UNDER HARET?
And finaly at third If yes, is it will be possible to run any applications excluding a orginals one?
And that's all
P.S. There is already a topic here(ht tp:/ /foru m.xd a-deve lopers.co m/sho wthre ad.php?t =791800 ) but it is quite old and not for our device.
Ew, why would you want React on your phone...?
i'd say ehm.. for the heck of it?
don't really think there is a point tho in rOS, both windows that comes natively and android have a massive userbase and for a 'full OS' there is already someone building linux version of Ubuntu.
beside that, the React OS makes use of 'windows' binaries (from what i read on their website.) which are in x86 format as far as i believe, running them on an ARM processor isn't likely to work.
if i'm incorrect please correct me
Not really, all the binaries were written by ReactOS Team and they are open source... So in practise we can compile it and have it running on ARM processor.
And why? Simply. If all the dll's and files can run exe files we should be able to run normal applications like firefox, flash, etc. Maybe not at maxiumum speed(because of alpha build of ReactOS) but still it can be quite useful.
I didn't managed to build it. As far as I read it is imposible beacause of compiler which doesn't compile it correctly, or at all.
If anyone have any ideas how to do it tell us...
P.S. The full source of ReactOS + additional appliactions included is avaible at ReactOS main page.
Well ReactOS to my knowledge doesn't run that well on x86 machines, so I doubt our tired old phones will run it very well...
Rhodbuntu isn't good enough...? I'd say that's your best hope - in theory it will run FF & flash...
ReactOS of course is not the faster system ever but it it a only(actualy) operation system that is in open source and have a fully rewritten binaries, etc.
And BTW you still can't have a flash and Java(SE) running on armel(rhodbuntu)
mafiu95 said:
ReactOS of course is not the faster system ever but it it a only(actualy) operation system that is in open source and have a fully rewritten binaries, etc.
And BTW you still can't have a flash and Java(SE) running on armel(rhodbuntu)
Click to expand...
Click to collapse
Ah didn't realize. What makes you think it'll work on React? lol
Theres a possibility. But as I test the recent version out, there are problems with it, so I dont think its a good idea to port. There are issues from clicking to how things are displayed to windows sticking & not listening to me when I click close or minimize/maximize.
UPDATE: Still working on a newer version of the webserver, but I've been distrcted by a number of other projects lately (including getting a new job). The most important news is that the Root Webserver works great with WP7 Root Tools; you don't need a full-unlocked ROM or HtcRoot compatibility anymore! Just mark the app as Trusted in the WP7 Root Tools policy pivot, and you're good to go.
Sorry for the long delay, I've been working on many different things. One of them is re-write of a substantial part of this app, to make it more modular and extensible and also to add more features. That re-write is far from done, any may end up being broken into a few smaller pieces once any of the new or re-written features reach release-quality without the whole app being unusably broken.
This project started out as a child of the HtcRoot project. It no longer requires HtcRoot; full-unlock or WP7 Root Tools work fine. It's also a child of the Functional Webserver / WebServer (Mango) projects, and builds on their open-source foundations. Its goal is to allow unfettered access to your phone through the convenience of a web browser.
Fifth release (v2.3.1)
Platform release, minor feature release, minor library update, bugfixes
Should now be compatible with fully unlocked custom ROMs, even if they can't use the HtcRoot project.
This release does not include NativeIO_Mango source, as it was not changed. If you need the source for this library, extract it from the 2.2.0 download.
Homebrew library (v1.6.3)
Better detection and reporting of exceptions due to not being root.
Should be safe to use the HtcRoot functionality on fully-unlocked ROMs.
Please see the changelog in the app for details and history
Note that this app requires a slight update to NativeIO_Mango from @fiinix's version. There were some bugs in the library that were making things difficult, so I fixed them. I also changed the return values of a couple functions (though the signatures are unchanged) to give the ability to return error codes from COM. Source code for both the managed Homebrew and COM NativeIO_Mango libraries is included, along with compiled binaries. Source code for the HtcUtility library can be downloaded from the HtcRoot proect.
Features:
View folder and ROM Module last-modified dates. (NEW 2.3.1)
File attribute info now presented better. (NEW 2.3.1)
Upload files anywhere. (2.2.0)
Create and delete directories anywhere. (2.2.0)
Delete writable files.
Add or Remove readonly attribute from files. (2.2.0)
See file size and attributes for any file.
Browse the entire filesystem.
Download any file (still not ROM modules, though).
Static HTML files in a "Content" folder for easier editing.
Easy link to browse (and add your own files) to Content folder (2.2.0)
All features of previous WebServer versions (IsoStore uploading, authentication, etc.)
Changelog
Bugfixes:
Fixed a case where setting file attributes or uploading a file would fail due to lacking permissions.
Fixed the potential for infinite loops on fully-unlocked ROMs compatibel with the HtcRoot project.
More effort to eliminate RootException / Error 1260.
Upcoming:
Access the registry as well as the filesystem.
Better access to installed application info and folders.
View, edit, move, and rename files.
Rename and move directories.
Server-side commands (process provxml, for example)?
Filesystem/Registry/Application search?
Known Bugs:
App may take several seconds to close; don't re-launch it immediately or weird things may happen.
Touching the screen while the app is in "root" mode appears to cause a crash, and posible resource leak.
Error 1260 (Least Privileged Chamber) may still occasionally appear on first access attempt or two... really wish I knew why.
Requirements:
Developer-unlocked phone (if you remove ID_CAP_INTEROPSERVICES it will work without root access, cutting off most of the filesystem).
For root access, you need *EITHER*
* A fully-unlocked ROM
* An interop-unlocked HTC phone with working HtcUtility driver
If your phone is compatible with the HtcRoot project, you're OK.
Thanks To:
Davux (original author of the "Functional Webserver" app)
Fiinix (Ported the NativeIO library and Webserver app to Mango)
MarysFetus (designed icons and graphics for the webserver app - site http://klaus-widraw.de)
Everybody who helped make the HtcRoot project possible.
Have fun!
Reserved for OP
Also reserved.
pretty neat
I'm not by my HTC HD2 but anybody know if will this work on it under the B.t.t.F ROM?
Awesome work GDTD!
EDIT: Doesn't work on a HTC HD2 on B.t.t.F v2.1 @ 8107 (no SP1) I get the following error when trying to connect from my PC:
Code:
Exception while getting the listing for /!
Homebrew.InteropException: Error listing subdirectories of ! GetLastError: 1260 at Homebrew.IO.DirectoryInfo.GetDirectories(String filter) at Homebrew.IO.DirectoryInfo.GetDirectories() at WebServer.MainPage.handler.BuildDirectoryListing(String dirPath) at WebServer.MainPage.handler.Process(RequestContext context) at HttpServer.Server.ProcessModules(RequestContext context) at HttpServer.Server.HandleRequest(RequestEventArgs e) at HttpServer.Server.OnRequest(Object sender, RequestEventArgs e) at HttpServer.HttpListener.OnRequest(Object sender, RequestEventArgs e) at HttpServer.HttpContext.OnRequest(Object sender, FactoryRequestEventArgs e) at HttpServer.Messages.MessageFactoryContext.OnMessageComplete(Object sender, EventArgs e) at HttpServer.Messages.Parser.HttpParser.OnComplete() at HttpServer.Messages.Parser.HttpParser.GetHeaderName() at HttpServer.Messages.Parser.HttpParser.Parse(Byte[] buffer, Int32 offset, Int32 count) at HttpServer.Messages.MessageFactoryContext.Parse(Byte[] buffer, Int32 offset, Int32 length) at HttpServer.HttpContext.ParseBuffer(Int32 bytesLeft) at HttpServer.HttpContext.OnReceive(Int32 bytesLeft) at HttpServer.HttpContext.b__a() at System.Threading.ThreadHelper.ThreadStartHelper(ThreadHelper t) at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStartHelper()
It is interop unlocked so I don't get the error.
NOOOO I AM CRYING !!! THIS IS WHAT I WANTED AND I CAN'T EVEN TRY IT !!
Kill me now ;_; sigh sob sigh
EDIT : good work and good luck
@voluptuary: If you can run the HtcUtilityTest app successfully (from the HtcRoot page) then yes, this will work.
On that thread, I have the following listed as compatible:
HD2 (BttF [XBmod-Yuki] v2 SP1)
That your ROM?
@Voluptuary:
To quote from the Known Bugs section:
First attempt to access the filesystem will often fail or take too long; hit refresh a couple times and it should work.
I don't know why it does this. I built in some delays and some automatic retries, and that improved things dramatically - it will *almost* always work on the first freresh attempt (or second click on the Filesystem link) now - but didn't eliminate the problem. I'm not sure what it is; on the test app the switch to SYSTEM token is effectively instant. Maybe it has to do with the number of threads or something?
Anyhow, give it another shot and it should work. I contemplated just putting in a 5-second auto-refresh on the error page...
GoodDayToDie said:
@Voluptuary:
To quote from the Known Bugs section:
First attempt to access the filesystem will often fail or take too long; hit refresh a couple times and it should work.
I don't know why it does this. I built in some delays and some automatic retries, and that improved things dramatically - it will *almost* always work on the first freresh attempt (or second click on the Filesystem link) now - but didn't eliminate the problem. I'm not sure what it is; on the test app the switch to SYSTEM token is effectively instant. Maybe it has to do with the number of threads or something?
Anyhow, give it another shot and it should work. I contemplated just putting in a 5-second auto-refresh on the error page...
Click to expand...
Click to collapse
Sorry, I should have read your post better. I hate when people do that to me in my threads, I should know better.
Anyways I got it working, kinda. It still gave the error at the top of the page but then it listed the directories anyways, then navigating to Windows always fails, just times out or stays loading forever. This is over Wifi, I guess it could be a latency problem but everything else on my network runs fine.
I install but it does nothing.It shows serial on usb, softwareloopback interface1,bcmsddhd1
I'm looking into ways to resolve the read error issue. Once it decides to work, I can leave the app running for hours (on USB power, idle detection disabled of course) and browse with no trouble, but when I first open the app it's ornery for a few minutes. Very weird (and annoying). I'm guessing it's due to a threading issue, which would technically be a bug in the HtcRoot library, but I'll need to explore more.
By the way, the Windows folder takes a moment to load (it's huge). It should work pretty reliably though (you can open it for reading without having root at all, actually) and it opens a lot faster on my version than it did on the earlier ones (StringBuilder + half as many FileSystem calls + eliminated one of the slowest calls).
@Ttblondey: Dude, it's a W E B S E R V E R app. It runs a web server on your phone. You browse it through a web browser. I literally don't know what else to tell you, except to go read the threads on the other web server apps.
New version uploaded!
This contains some bigfixes - in particular, the Error 1260 bug (failure to elevate to root before trying to access the filesystem) has been mitigated to the point where it shouldn't be a problem.
It also uses a new version of the Homebrew library, 1.6.0, which incorporates access to the HtcRoot project under the Homebrew.HtcRoot namespace. Previously, the HtcRoot project was tacked onto the webserver directly, which meant the Homebrew library was unaware of its existence.
Requirements and major features have not changes in this update. Source code is included.
Great work you are doing here man! Too bad i don't own a HTC
@Briefcase: Thanks! I wish I could support more phones. Heathcliff74 may be able to enable something for Samsung (gen1 at least) but he hasn't released a library for doing so yet.
FEATURE RELEASE 2.1.0 is out.
Major changes: File attributes information, file deletion.
You should talk with ROM chefs here to include read/write enabled HtcUtility in their roms because all recent ROMs unfortunately doesn't support your findings.
@Pr0xiMUS: That's a good point. This tool is potentially more powerful that TouchXplorer or Registry Editor from TouchXperience, but those are the primarily-targeted apps in custom ROMs.
I wonder if adding registry support will be as straighforward (and simultaneously frustrating, due to bugs) as filesystem support...
New version (2.2.0).
Some bugfixes, more file operations (uploading any file anywhere, adding and removing directories). Add your own files to the Content folder so you can serve them directly, if you want.
If anybody knows of a ready-made and Mango compatible registry COM library (that's open source, thanks a ton @schaps), this would save me some time. If not, I can either ports one from NoDo or write my own well enough.
I am not able to browse the File System getting the following error.
Exception while getting the listing for /!
System.Runtime.InteropServices.COMException (0x8007001F): A device attached to the system is not functioning.
Using DFT V3 rom on Htc 7 Pro (Gold)
@Kr3i0s: Your ROM is not compatible with the HtcRoot project, due to it having a crippled HtcUtility driver. If the ROM is updatable, it might be possible to downgrade the HtcUtility driver using a custom CAB. Otherwise, you'll need to wait for (or switch to) a ROM that has a working HtcUtility driver.
EDIT: Actually, a fully-unlocked ROM can probably use this app even without HtcRoot compatibility. I'll modify the app so that it detects Error 31 and tries to fall back on whatever permissions it already has.
Hi
* Please help keeping the noise level low: Don't ask for ETA (stuff will be anounced), use Thanks buttons to say thx, etc.
* This will work on "fully unlocked" WP7 devices only and is not limited to specific phones
thx, dcordes
HaRET (Handhelds Reverse Engineering Tool) has been used on smartphones and PDAs with previous WinCE (Windows Mobile) versions to
* boot the Linux kernel (=> use Linux based OS like Android)
* obtain information about hardware and software (=> reverse engineering) in order to accordingly modify the Linux kernel (drivers).
Famous HTC devices that are capable of running HaRET are the QSD8250 based HTC HD2 and a wide range of MSM7xxA based phones like the diamond, raphael and touch pro 2.
WP7 is and will be shipped on many devices with quality hardware. In order to be able to run Linux on these, a novel aim is to investigate the use of HaRET on WP7 based devices. WP7 is known to posess several mechanisms to prevent this.
A discussion about the problem has beend started on the official HaRET development mailing list by Jaxbot:
http://lists.linuxtogo.org/pipermail/haret-devel/2012-January/000150.html
You need to send a subscription mail in order to write to the list. The original creators of HaRET as well as many good developers with low level skills (from XDA: Cotulla, NetRipper, cr2) are subscribed to it but maybe not many of them have access to a WP7 device.
HaRET source code repository with history:
http://git.linuxtogo.org/?p=groups/haret/haret.git
Documentation of the HaRET project (publicly accessible wiki):
http://htc-linux.org/wiki/index.php?title=HaRET
See http://htc-linux.org/wiki/index.php?title=HaRET/Documentation#Development for how to compile.
We should discuss the technical possibilites and challenges (if any ) about this project in this thread.
Update: Lots of insight has been gained. Since progress is rapid, uptades are not listed here yet. Please read the full thread for now.
Hi, I and all WP7 users waiting for your result HaRET project.
Thanks for your great work. And I would like to send you a cup of Heiniken beer.
Confirmation number: 0W3951910E743222Y
Hey dcordes,
I did a bit of housecleaning on this thread as I would hate to see this become your old Android-HD2 port thread
I want to see some real discussions going on in here (for a change).
So, HaRET must be, if memory serves me well, developed based on the processor, right? If it worked so well for the HD2, considering that most WP7+ devices from HTC also use Snapdragon's.... it should only take a few tweaks to get it to run (at least compatibility with HW) with most HTC WP7+ devices. The problems will be (I guess):
* Porting over from WM6.5 to WP7+ (may not be as bad as it sounds);
* Making sure that whatever this thing is coded with, it does not have interoplock code running on it (which I think will be kinda difficult considering that several apps that require access to less critical areas of the device require this). if it is interoplocked, then you will run into the issue of multiple versions out there (see Heathcliff's interopunlock thread to see/learn about the HTC variants on the new drivers, etc);
* Drivers, kernels, etc... but I believe that the HW specs between WP7+ devices and the HD2 are not so different, so you may even be able to get the same kernels to work with a few tweaks.
My Titan is already drooling with expectation
Please let me know if this thread needs further cleaning....
Good to see you back.
I feel somewhat obligated to make an appearance, then
Here's what I know, on the WP7 side of things:
A lot of APIs were removed, but the core pieces of CE still remain. I don't know what HaRET does to load Linux into the memory, but I would be shocked if it wasn't possible.
Part of the APIs that were removed were GUI related. This is why HaRET segfaults when you try to load it on a full unlocked device. If these pieces were removed, making it rely only on the command line, the loader might actually work, more or less. A WP7 Silverlight app could easily be built to serve as a launcher for it.
Those pieces aside, it is basically the technical pieces that have yet to be dug into that we are bound to run into. Curious to see what will happen, glad to see this getting some attention Cheers!
for HD2 ok, but for other phone that hasn't SD card?..... i hope however Ubuntu 0.4 will go on magldr, right?
nikola360 said:
for HD2 ok, but for other phone that hasn't SD card?..... i hope however Ubuntu 0.4 will go on magldr, right?
Click to expand...
Click to collapse
Most wp7 phones have the SD built in or in some form of flash storage capability. But you do make a good point, I guess.
Sent from my 4.7" Titan.... My device IS bigger than yours.
It's still Windows CE, there's nothing to emulate but the missing APIs
As the MAGLDR for Samsung focus/omnia7 will be out in around just now , maybe it will be possible to manage smthng
nhathoa egzthunder1, thank you very much for the kind welcome
Jaxbot said:
Here's what I know, on the WP7 side of things:
A lot of APIs were removed, but the core pieces of CE still remain. I don't know what HaRET does to load Linux into the memory, but I would be shocked if it wasn't possible.
Part of the APIs that were removed were GUI related. This is why HaRET segfaults when you try to load it on a full unlocked device. If these pieces were removed, making it rely only on the command line, the loader might actually work, more or less. A WP7 Silverlight app could easily be built to serve as a launcher for it.
Those pieces aside, it is basically the technical pieces that have yet to be dug into that we are bound to run into. Curious to see what will happen, glad to see this getting some attention Cheers!
Click to expand...
Click to collapse
I don't have much insight on how the kernel is loaded either. Obviously it's important for HaRET to have a non-protected memory region it is allowed to write to and then there is something called trampoline that will flush remaining memory and execute the kernel...
GUI: http://htc-linux.org/wiki/index.php?title=HaRET_Documentation#HaRET_commands
"HaRET is fundamentally a command-line driven application."
Can you try to rename your default.txt into startup.txt ? In presence of startup.txt inside the directory of the exectuable, HaRET will automatically run commands inside that file, rather than first showing the GUI. (Maybe it will still crash cause it still depends on the libraries although they won't be used ? See linload below)
Also be sure to create a file named earlyharetlog.txt and check the resulting log in haretlog.txt which would be a good thing to put on the mailing list.
The other way to invoke HaRET commands is through haretconsole (also check doku above). Once the gui shows you can tap a listen button and haret will launch a telnet server. You can then connect remotly from your computer OR (and that might become our replacement gui from a local telnet client on the phone. There is one available in the wp7 software manager: http://www.windowsphone.com/en-GB/apps/333b1e98-4c72-4cf9-a5d0-9d82b6b18213
One possible way to cut through all GUI right now is the linload feature of haret that will burn loader, kernel, startup.txt and initrd into one single exe . Requires local source code and build environment to create. I think it is very likly that this will not depend on any GUI libs so we should really try in case of startup.txt failure!
Beside linload we might create a HaRET stripped from GUI that will be accessible via haretconsole only until we have a new WP7 compatible GUI.
Regarding compiling: http://htc-linux.org/wiki/index.php?title=HaRET_Documentation doesn't have anything on that. But the source code does: http://git.linuxtogo.org/?p=groups/haret/haret.git;a=tree;f=docs
nikola360 said:
for HD2 ok, but for other phone that hasn't SD card?..... i hope however Ubuntu 0.4 will go on magldr, right?
Click to expand...
Click to collapse
Doesn't matter, why would you need SD card ? I guess if a phone lacks SD, it will come with plenty internal storage that can hold at least a minimal rootfs of any Linux distro.
Yes HD2 Ubuntu will work with magldr, I already picked up the work with that but that's offtopic. I will anounce any news via hd2 ubuntu forum section and twitter.
EDIT: If somebody is willing to try, I can create a linload for HD2s that have WP7 flashed. This will be a perfect test setup because we have a known working Linux kernel for the HD2.
dcordes said:
nhathoa egzthunder1, thank you very much for the kind welcome
I don't have much insight on how the kernel is loaded either. Obviously it's important for HaRET to have a non-protected memory region it is allowed to write to and then there is something called trampoline that will flush remaining memory and execute the kernel...
GUI: http://htc-linux.org/wiki/index.php?title=HaRET_Documentation#HaRET_commands
"HaRET is fundamentally a command-line driven application."
Can you try to rename your default.txt into startup.txt ? In presence of startup.txt inside the directory of the exectuable, HaRET will automatically run commands inside that file, rather than first showing the GUI. (Maybe it will still crash cause it still depends on the libraries although they won't be used ? See linload below)
Also be sure to create a file named earlyharetlog.txt and check the resulting log in haretlog.txt which would be a good thing to put on the mailing list.
The other way to invoke HaRET commands is through haretconsole (also check doku above). Once the gui shows you can tap a listen button and haret will launch a telnet server. You can then connect remotly from your computer OR (and that might become our replacement gui from a local telnet client on the phone. There is one available in the wp7 software manager: http://www.windowsphone.com/en-GB/apps/333b1e98-4c72-4cf9-a5d0-9d82b6b18213
One possible way to cut through all GUI right now is the linload feature of haret that will burn loader, kernel, startup.txt and initrd into one single exe . Requires local source code and build environment to create. I think it is very likly that this will not depend on any GUI libs so we should really try in case of startup.txt failure!
Beside linload we might create a HaRET stripped from GUI that will be accessible via haretconsole only until we have a new WP7 compatible GUI.
Regarding compiling: http://htc-linux.org/wiki/index.php?title=HaRET_Documentation doesn't have anything on that. But the source code does: http://git.linuxtogo.org/?p=groups/haret/haret.git;a=tree;f=docs
Doesn't matter, why would you need SD card ? I guess if a phone lacks SD, it will come with plenty internal storage that can hold at least a minimal rootfs of any Linux distro.
Yes HD2 Ubuntu will work with magldr, I already picked up the work with that but that's offtopic. I will anounce any news via hd2 ubuntu forum section and twitter.
EDIT: If somebody is willing to try, I can create a linload for HD2s that have WP7 flashed. This will be a perfect test setup because we have a known working Linux kernel for the HD2.
Click to expand...
Click to collapse
I've tried startup.txt, it still segfaults, won't even print out a log from what I can tell. I'll play around with some stuff and report back, though.
ok. I updated wiki and added compilation info http://htc-linux.org/wiki/index.php?title=HaRET/Documentation
UPDATE: I attached a linload for HD2. Could somebody please run it on their WP7 HD2 and tell us what happens? TIA!
What's this? A special version of HaRET that is solely for booting a Linux kernel that is included inside the exe.
linload source: http://git.linuxtogo.org/?p=groups/haret/haret.git
linux kernel source: http://gitorious.org/linux-on-wince-htc/linux_on_wince_htc
i have a stupid question, what is reason test it on HD2 where you can install android without problem. on native wp7 phones you will not run this app as I know. or maybe I'm wrong? maybe on custom rom?
I have mozart interop unlocked, I can test something if there will be some staff for my phone.
ronalgps said:
I'm going to test this mate
Click to expand...
Click to collapse
Thanks a lot. this is going to be interesting!
Could you create a file called earlyharetlog.txt inside the same directory of linload.exe ? I don't know if this works but see if it will give you a logfile in the same directory after starting linload.exe
I bet it will just crash, just like normal HaRET.exe when using startup.txt
dcordes said:
Thanks a lot. this is going to be interesting!
Could you create a file called earlyharetlog.txt inside the same directory of linload.exe ? I don't know if this works but see if it will give you a logfile in the same directory after starting linload.exe
I bet it will just crash, just like normal HaRET.exe when using startup.txt
Click to expand...
Click to collapse
Tried it with earlyharetlog.txt in the same directory. No log is spit out, and while there is no error code when running the EXE, it crashes before I can even pull the running processes list.
ok does it show anything ? loading screen or so ? it's what I expected. if you compiled haret.exe before, linload takes 2 seconds to build. It might just be the exact haret.exe ...
dcordes said:
ok does it show anything ? loading screen or so ?
Click to expand...
Click to collapse
Nope, no signs that it even loads, except for the fact the Win32 API reports NO_ERROR after shell executing it.
From what I saw, linload.exe cannot run under WP7 because it depends on libgcc_s_sjlj-1.dll, witch cannot be found in WP7. You can try running Haret.exe. All the necessary APIs are there, so no problem about UI related functions. Only one function is missing: SetKmode, witch is used by Haret to take kernel mode privileges, to flush the memory. In WP7 this function is not available and i don't know any workaround about this. We can try to recompile Haret from source, remove SetKmode call from output.cpp and memory.cpp, update functions ordinals in the import table for new Haret.exe to match those from WP7 coredll.dll (i'm not sure about this, maybe can work without matching ordinals) and see if we have a working GUI.
Thanks for this insight, minDark. may I ask how you found out about the missing dependencies?
It's not so nice that the kernel mode function is missing in WP7. How are we going to start the kernel without it?
I did as you proposed and compiled haret.exe without it. I just commented out lines containing setkmode. But I didn't change the ordinals stuff because I have no idea what that is.
no-kmode haret.exe with minDark's proposed kmode patch is attached. Any WP7 device owners welcome to test.
diff to current haret.git HEAD:
Code:
haret$ git diff
diff --git a/src/memory.cpp b/src/memory.cpp
index ccba659..53c0826 100644
--- a/src/memory.cpp
+++ b/src/memory.cpp
@@ -320,7 +320,7 @@ err: VirtualFree (pmWindow, 0, MEM_RELEASE);
if (slot >= PHYS_CACHE_COUNT)
{
// Go into supervisor mode
- SetKMode (TRUE);
+// SetKMode (TRUE);
cli ();
cpuFlushCache ();
@@ -333,7 +333,7 @@ err: VirtualFree (pmWindow, 0, MEM_RELEASE);
// Back to user mode
sti ();
- SetKMode (FALSE);
+// SetKMode (FALSE);
}
// Move least recently used slot to front
@@ -354,12 +354,12 @@ void memPhysReset ()
if (pmInited)
{
// Go into supervisor mode
- SetKMode (TRUE);
+// SetKMode (TRUE);
cpuFlushCache ();
// Restore the page table entries
for (int i = 0; i < 16 * PHYS_CACHE_COUNT; i++)
pmPT [i] = pmOldPT [i];
- SetKMode (FALSE);
+// SetKMode (FALSE);
VirtualFree (pmL2PT, 0, MEM_RELEASE);
VirtualFree (pmWindow, 0, MEM_RELEASE);
diff --git a/src/wince/output.cpp b/src/wince/output.cpp
index cc65d40..e4be7ed 100644
--- a/src/wince/output.cpp
+++ b/src/wince/output.cpp
@@ -276,9 +276,9 @@ prepThread()
// All wince 3.0 and later machines are automatically in "kernel
// mode". We enable kernel mode by default to make older PDAs
// (ce2.x) work.
- Output("Setting KMode to true.");
- int kmode = SetKMode(TRUE);
- Output("Old KMode was %d", kmode);
+// Output("Setting KMode to true.");
+// int kmode = SetKMode(TRUE);
+// Output("Old KMode was %d", kmode);
}
// Initialize the haret application.
I download it through my hd7 but when I try to open it stated this file isn't safe to open in your windows phone.
Ttblondey said:
I download it through my hd7 but when I try to open it stated this file isn't safe to open in your windows phone.
Click to expand...
Click to collapse
You have to deploy it to your phone, then execute it with native code.