[KITCHEN] Android Compiler VM - Galaxy S I9000 Android Development

Android Compiler VM 2.0
This is the second reincarnation of the Kernel Compiler VM, now with complete support for building Android binaries too.
The installation is simple.
1. Download the file (around 700MB!)
2. Extract using 7-zip
3. IMPORT the VM into VirtualBox (you have to import it, or else the HDD will be read only!)
4. Enjoy
I made some modifications to the default config, that will now allow one to use putty to connect to the VM without too much hassle. This was done by using two virtual LAN cards, from which one can connect to the internet, and the host computer can connect to the VM using the other one. Usually the IP changes, but it seems if you only have one VM it is: 192.168.56.101. USername/password is still kernel/kernel
The other change was to split the home and sys directories, so one can simple switch the home HDD if it gets full (a complete AOSP build can take a lot of space). To make this easier all compiler applications are now put inside the system partition (codesourcery was inside home in the earlier release).
As ususal the VM supports compiler scripts, using a shared folder you have to put somewhere. I don't know whether anyone made a compiler script for the previous VM besides me (and some patches of course), but the possibility is still there. There are of course compiler scripts for the whole Steam kernel/recovery suite, which can be obtained here

DL link: (large file!) http://android.sztupy.hu/dl/AndroidCompilerVM-2.0.7z

Hi there.
I worked a lot with your first kitchen, and banged my head against wall a couple of time.
I also managed to add a secondary network interface (host mode only) but only to be able to connect over samba on the windows host machine.
The initial box grow so much that at some time I run out of space. At that point I considered switching to an auto-resizeable vdi (no longer vmdk) file.
Also, I've deleted the internal swap partition and created a new vdi file just for swap on /dev/sdb1.
Anyway, the big result result...
Running Eclipse on Windows, I can map files over samba in Virtualbox. Not very sure if I'm clear in my idea, but the source code of the kernel inside the VirtualBox is shared over the host Windows so I can work with the linux kernel inside Eclipse.
The compiling is still done on the inside virtualbox, didn't bothered much, but I guess with some nicely crafted commands over ssh, it is possible to compile the whole kernel/modules/single files right from the Eclipse IDE interface.
Screenshot attached, maybe I'll make a quick and dirty tutorial.

Arise said:
Hi there.
I worked a lot with your first kitchen, and banged my head against wall a couple of time.
I also managed to add a secondary network interface (host mode only) but only to be able to connect over samba on the windows host machine.
The initial box grow so much that at some time I run out of space. At that point I considered switching to an auto-resizeable vdi (no longer vmdk) file.
Also, I've deleted the internal swap partition and created a new vdi file just for swap on /dev/sdb1.
Anyway, the big result result...
Running Eclipse on Windows, I can map files over samba in Virtualbox. Not very sure if I'm clear in my idea, but the source code of the kernel inside the VirtualBox is shared over the host Windows so I can work with the linux kernel inside Eclipse.
The compiling is still done on the inside virtualbox, didn't bothered much, but I guess with some nicely crafted commands over ssh, it is possible to compile the whole kernel/modules/single files right from the Eclipse IDE interface.
Screenshot attached, maybe I'll make a quick and dirty tutorial.
Click to expand...
Click to collapse
I never got around to code in java using this VM, and for C code putty+vim+screen is all I need. Although a tutorial would be great.

This is a VM on windows or linux?

sztupy said:
I never got around to code in java using this VM, and for C code putty+vim+screen is all I need. Although a tutorial would be great.
Click to expand...
Click to collapse
Ok, just done it:
http://forum.xda-developers.com/showthread.php?t=882010
ragin said:
This is a VM on windows or linux?
Click to expand...
Click to collapse
It doesn't matter, the virtualbox VM can run on either host, be it windows or linux.

Awesome work.

V3.0 released here: http://forum.xda-developers.com/showthread.php?t=1022407

Related

need help with .tar file

hello all i need to know is how you make the .zip rom into a .tar are used a program but converting it doesnt work, if u could pls just help me i want to put together my own rom, thank you..
johndoeshmoe said:
hello all i need to know is how you make the .zip rom into a .tar are used a program but converting it doesnt work, if u could pls just help me i want to put together my own rom, thank you..
Click to expand...
Click to collapse
http://gnuwin32.sourceforge.net/packages/gtar.htm
However you may want to consider doing a Linux install. I think most Android hacking is done i Linux. I recommend doing a Wubi install of Ubuntu(google it) if you want to try out Linux without messing with your partitions. Another option is to run Linux from within Virtualbox.
An easy way is to install 7zip. With it you can store files in tar.
The best way of learning how to put together a custom Android build is to start by studying the way that the .tar files are structured, I started by using 7-zip to study and change some of the files, ( you can really mess up your android doing this ).
However you will need to have access to a PC running Linux for some of the more advanced tasks. There are ways of running Linux without disturbing your PC's partitioning, but honestly, a dual-boot is the best way to go, you only need about 10-50GB of hard disc space for a decently set up Linux install, (10GB is enough for a well set up slackware based install like zenwalk).
Good luck on your journey into Android
zenity said:
There are ways of running Linux without disturbing your PC's partitioning, but honestly, a dual-boot is the best way to go, you only need about 10-50GB of hard disc space for a decently set up Linux install...
Click to expand...
Click to collapse
Actually a Wubi install of Ubuntu is a dual boot solution that does not touch your partitioning. There is a small performance penalty for keeping the file system within a large file on your NTFS file system but I doubt most people will notice. Installation is as easy as next-next-finish and uninstallation is easily handled from within Windows.
http://wubi-installer.org/
In fact, it's very similar to doing FAT32 SD-card install of Android except that the performance penalty is much, much less noticable and it's really dual boot so you do not need to boot Windows in order to boot Linux.
A wubi install is pretty good if you like the Ubuntu way of doing things, I don't, just personal taste, I like my Slackware distros too much
But yes, since everyone seems to be on ubuntu/debian based these days, wubi is indeed a good solution to having to partition your HDD.
thank you guys u have been very helpful and also iv had ubuntu before so i know how to install, u guys have been very helpful thank you..

[Q] Mount WP7 in Linux

Hi
There's a couple of threads about the registry hack to mount your WP7 as a mass storage device in Windows. But since I'm running Linux at home I'm interested to find out how to do the same in Linux.
Anyone tried to gain access to the phone file system in Linux?
I'll give it a try when I get back home from work.
Thanks
//Lazze
Wish there were a way to follow a thread without replying, I'm interested in seeing how this works out.
Lazze2k5 said:
There's a couple of threads about the registry hack to mount your WP7 as a mass storage device in Windows.
Click to expand...
Click to collapse
Where u saw it? As I've mentioned here http://forum.xda-developers.com/showthread.php?p=9244306#post9244306 (actually, this is the first mention of this hack based on my experiments at August 2010) WP7 can be "visible" as "Zune device" in Windows explorer (not a mass storage device!).
I don't think MS Zune can run on Linux or zune device drivers exists too...
Has anyone been able to figure anything out with this issue? I run Kubuntu linux on my desktop and I run Windows 7 virtually and Id like to be able to update/sync on this PC. I have installed zune but it doesnt recognize that my HTC arrive is connected. After some digging it looks like there would need to be some kind of linux driver for the arrive for this to work. Is there any other work around that would be possible?
hope that one day this can be possible! Or at least by using some software to syncronize files from local network (SAMBA) or somthing like this.

Some New Information Regarding the KIN 2M Filesystem

I have been following the xda-developer website for awhile now, as I have a KIN 2m of my own and I have been interested in finding a way to root or replace the current OS with a new one. Since I haven't seen anymore progress with the phone itself, I decided to do some digging and see what I could do myself (I am a programmer and IT Specialist). What I found might be helpful.
According to other posts, and what is floating around the internet, the KIN 2m flash memory is based on the Samsung MoviNAND 8G architecture. The chip itself is the Samsung MoviNAND KLM8G4DEDD-B101 which supplies 8GB of flash memory to the phone. Since this is also a Flash based NAND memory, I decided to investigate into the actual filesystem (FS) which makes up the chip and which WindowsCE 6.0 is based.
Apparently, this particular NAND memory is based on the YAFFS2 (Yet Another Flash File System rev2.0) which supports both little- and big-endian (32 and 64-bit architecture and some 16-bit systems), respectively. Also, the operating systems that are built on this particular FS are WindowsCE, Android, Linux, pSOS, eCos, and ThreadX.
Going off what I had found, I discovered that with regard to WindowsCE in particular, there are four different parts to the KIN NAND set-up: A Portable YAFFS "Core", a YAFFS Direct Interface, the WindowsCE wrapper, and then of course the WindowsCE OS itself. For WindowsCE, the WindowsCE wrapper accesses the YAFFS Direct Interface, not the core directly. In order to write instructions to the NAND and the "core", a set of instructions in three different types are necessary. These types are a POSIX Application Interface, an RTOS Integration Interface, and finally Flash Configuration and Access Interface. I have attached (and pasted) below a diagram of the above description and I have attached a document which was provided by yaffs.net which also covers some of these details.
View attachment 1461518
The POSIX Application Interface allows execution of application code to access the filesystem. These commands that are executed are typically open, close, read, write, etc. The RTOS Integration Interface consists of functions which allows for YAFFS to access the RTOS system resources. The commands are things like lock, unlock, initialize, get time, set error, etc.. Finally, we have a Flash Configuration and Access Interface which allows YAFFS to access the NAND directly and it executes commands such as initialize, read chunk, erase block, etc.)
So this is what I have discovered so far, and I am currently working on seeing where I go from here. I am currently trying to mount my KIN and browse it as a YAFFS filesystem on my computer, and once I do that, I am thinking that I might be able to execute instructions to access the ROM and NAND chip. On the YAFFS.net website there are a lot of good documents on how this FS works and how commands are executed. I am currently trying to read all I can and see if there is anything I can do.
And the plus side is, after all of this digging and experimenting...my KIN still works!!
very interesting.
wouldn't instructions be executed on the ARM?
http://en.wikipedia.org/wiki/ARM_architecture#Instruction_set
the trick would just be getting something on there and running...
Edits:
actually we may have already found a way to execute. it involves XNA or Silverlight and its on these forums somewhere. now compiling something...
must note that this could probably end very poorly.
so how we write android to NAND?
http://source.android.com/
BOOM
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0290g/DDI0290G_arm1156t2fs_r0p4_trm.pdf
if we can access a console on the actual kin device we can compile code. now, how exactly we could do that is a mystery to me. the kinOS is running on top of windows CE kernel, so there may be one in there...
that console would be "run23"
http://support.microsoft.com/kb/194302
http://developer.download.nvidia.com/tegra/docs/tegra_250_hw_setup.pdf
check out page 12. to put the kin in recovery mode, you hold u+s+b+power.
also relevant
http://forum.xda-developers.com/showthread.php?t=894130&page=2
BOOM
infocenter.arm.com/help/topic/com.arm.doc.ddi0290g/DDI0290G_arm1156t2fs_r0p4_trm.pdf
if we can access a console on the actual kin device we can compile code. now, how exactly we could do that is a mystery to me. the kinOS is running on top of windows CE kernel, so there may be one in there...
that console would be "run23"
support.microsoft.com/kb/194302
Click to expand...
Click to collapse
That is a good thought. However, according to what I have found, there is no reason to go looking for a console on the device itself with which to compile/execute code. What I have found, to date, is that because the device is a YAFFS filesystem, if we have the correct drivers installed on our host machine (which can be gained from the internet), we can mount the device as a drive and using Command Prompt on the host machine we can compile and execute the code from there. We can use the commands NVFlash, mount, write, flash_eraseall, etc.
Sorry if this doesn't seem to make an sense at the moment...I am trying to multitask, and I believe I am failing miserably. I will hopefully have more information later.
IT_Tech said:
we can mount the device as a drive and using Command Prompt on the host machine we can compile and execute the code from there. We can use the commands NVFlash, mount, write, flash_eraseall, etc.
Click to expand...
Click to collapse
ooh, that's a good one. i think JohnKussak was doing something like that using the NVidia tegra toolkit, but he was not able to connect for some reason.
http://forum.xda-developers.com/showthread.php?t=894130&page=2
now, from what i understand of YAFFS (which is admittedly very little) it's just a partition of the memory right? or is the YAFFS system on a completely separate piece of memory?
i was reading about the MPU (memory protection unit) in the ARM manual and it described the layout of memory. basically it supports up to 16 blocks, all with 32 bit addresses (4294967295 bytes = 4gb). since there's 8 gb of storage on the kin, it can probably be assumed that 2 of those blocks are used for storage. another block is probably for RAM (256mb). now, the YAFFS system has to be accessible to the ARM somehow (maybe), so there are several possibilities.
1) the YAFFS file system is on a partition of the 8gb storage space
2) the YAFFS file system is on a partition of the 256mb RAM (pretty sure this isn't the case)
3) the YAFFS file system has its own block of memory
regardless, the MPU can be disabled. when it's disabled, no permissions are checked (ever) and we can read/write anywhere we please, including the YAFFS, wherever it may be. i'm not totally sure this is necessary, but i know we've had problems accessing system folders in the past. i suspect disabling the MPU could fix that, if we could manage.
i also suspect that the YAFFS is accessible when the phone is in recovery mode (u+s+b+power), we just need the correct drivers to flash a Tegra 2600 APX chip. i believe i read on the tegra thread that somebody couldn't find that particular driver. it may need to be written.
edit:
just found this https://developer.nvidia.com/tegra-2-technical-reference-manual
you have to apply for access and it can take up to a month i guess. i'm working on that right now. the main item of interest is "16.0 NAND Flash Controller". i'm gonna try looking in some shady places and see if i can't dig that up...
double edit:
just realized that tegra 2 is different than tegra APX, NVidia does not offer an APX manual anymore, if they ever did.
triple edit:
ooooookay. http://viewsonic-gtablet-for-dummies.webs.com/nvflash.htm
just grabbed source for drivers. unfortunately, NVflash does not run on 64 bit systems, which is causing a bit of problems for me...
slimeq said:
now, from what i understand of YAFFS (which is admittedly very little) it's just a partition of the memory right? or is the YAFFS system on a completely separate piece of memory?
Click to expand...
Click to collapse
From what I understand, YAFFS is a partitioning system. It does not need to be stored as a separate system on a separate piece of memory. However, it does also have the capabilities to be partially RAM based... Which may end up confounding things. If you get a chance, you may have done this already I don't know, but read up on the YAFFS file system on the yaffs.net website--it has a ton of documents on how the system works and the commands it executes, its architecture, etc.
slimeq said:
i was reading about the MPU (memory protection unit) in the ARM manual and it described the layout of memory. basically it supports up to 16 blocks, all with 32 bit addresses (4294967295 bytes = 4gb). since there's 8 gb of storage on the kin, it can probably be assumed that 2 of those blocks are used for storage. another block is probably for RAM (256mb). now, the YAFFS system has to be accessible to the ARM somehow (maybe), so there are several possibilities.
1) the YAFFS file system is on a partition of the 8gb storage space
2) the YAFFS file system is on a partition of the 256mb RAM (pretty sure this isn't the case)
3) the YAFFS file system has its own block of memory
Click to expand...
Click to collapse
Let me begin here and differentiate between YAFFS types...there are two types of YAFFS formatting--YAFFS1 and YAFFS2. The KIN is formatted using YAFFS2 because it has 8g of space. Yaffs2 is different from Yaffs1 in the fact that it allows for memory sizes greater than 4GB because it supports 4KB pages rather than 512byte pages (Yaffs1). I will spare all the details as they are lengthy, but check out:
yaffs.net/documents/how-yaffs-works and yaffs.net/yaffs-original-specification (paying attention to Yaffs2 and how it relates to it foundation off of Yaffs1). Also, since Yaffs only uses a RAM based system for emulation purposes when the kernel is not being run on a true NAND (or NOR) storage, we can eliminate Option 2. Option 3, may be viable, but I am not sure as to how. Option 1 seems to make the most logical sense (pun intended), because of how the YDI (YAFFS Direct Interface) works with the YAFFS kernel and filesystem, as well as the WindowsCE Wrapper, etc.
Now as for the MPU. Yaffs has a built in code to handle MPU and a way to disable it through a console session on a host machine, but I don't remember where I read it, I believe it was on the yaffs.net website in one of the technical documents... I will work to remember where I found it.
I hope we can get some more people on-board helping with this YAFFS thing. If we could, it might make this go a bit faster, and have more heads working on it. Plus they might see something we don't.
P.S: These are the HARDEST captchas I have ever seen in my entire life!
kin
Hopefully you get access to the filesystem with this IT_Tech :fingers-crossed:
Every once in a while, it's fun to revisit Dev on the Kin
I remember going through the Tegra 2500 APX links on the wayback machine:
http://web.archive.org/web/20100813070722/http://www.nvidia.com/object/product_tegra_apx_us.html
If you click the Specifications tab, you can see that the 2600 and 2500 are virtually identical, aside from some video features.
Also, the ZuneHD is the only other product listed as using the 2500 chip. I don't have one, so I wouldn't know for sure, but I wonder if its drivers could be tweaked to allow access to the Kin, in the same way as the Zune. I remember trying to hack into other Windows Mobile drivers (for other WinMo 6.x devices I have) but never getting anything further, even when in other USB modes on the device.

Linux (Ubuntu) on Android help

I found this albeit old video of it running without needing a unlocked bootloader or custom ROM ,but the img file is larger than 3.5GB.
It can even access Wi-Fi properly and use FireFox!
Can it run the upcoming Linux port of Goat Simulator? (I doubt it,but it might on more modern Androids)
https://www.youtube.com/watch?v=4d_diU7i7Z0
I want to put the img file on my 32GB mass media storage and use it from there.
Mayber there is a newer version of Linux (ubuntu) that runs way faster in comparison with that old 2011 version.
Can someone please help me with this?
Please respond.
I just found out that there is a later version that can be used.
The 13.10 version of Ubuntu Linux.
Page for installing.
www.opensourcegangster.com/run-ubuntu-13-10-on-android/
I always hate it when they tell you to do stuff that is only accessible normally through official stock android!
It is probably easy to do using SQLite on settings provider for Fire TV.
I still need to know if I can use the .img file on my 32GB USB Mass Storage stick via stickmount instead of deleting everything to make room for the file on my internal storage.
I would assume that it works if I simply change the img directory to the stickmount provided USB directory.
While nobody replied to my thread,I have got ubuntu to run on my Fire TV!
The big issue is that I can't get the more important applications like "Web Browser" to open.
I can open the image viewer and access my images and various other applications work as well,just not the web browser.
I also need to know how to properly install apps so I can get other things running.
I can also confirm the large 4GB ubuntu running with the image in usbStorage/sda1/ubuntu.img via stickmount on my 32GB storage.
Small could be good too
If you could do the same with smaller linux distros - like DamnSmallLinux - could that be useful to fix some bricked devices?
[email protected] said:
If you could do the same with smaller linux distros - like DamnSmallLinux - could that be useful to fix some bricked devices?
Click to expand...
Click to collapse
From reading the guide it seems like all it is is Ubuntu in a chroot. So the fire TV needs to be booting properly.
I'm not owning a fire tv at the moment, but i'm looking into buying one.
My goal is to replace my old Rpi which is running a little bit slow for me as I run on it a couple of software:
- XBMC/Kodi
- samba
-Nginx as web server
- VPN server
- FTP, SMB, NFS
- Deluge, Sickrage, couchpotato... and more can not remember all of them right now.
in few words I use it as media center, file server and torrent server..
So I understood that is possible to install Kodi on the fire TV by doing a side loading of the apk file and install it.
That will solve the media center part, but what about the rest?
chroot could be a solution to run the other linux services that I need, basically I don't need GUI in chroot, is enough if I can connect via SSH and run my services there.
And in addition I would need to have a USB HDD plugged in to store the media content which get's downloaded automatically.
Could this setup run on a fire tv in conjunction with chroot ? Any ideas why wouldn't ?

[Q] Help me, please! How to recover deleted photos in windows 8 rt?

Were removed family photos on the tablet ASUS VIVOtab RT (windows 8 rt). History files has been disabled. ONE DRIVE is not working. What should I do?
Were they on internal storage or on a SD card?
Are you running RT 8.0 or 8.1?
EDIT: Fair warning: you probably can't, unless something like OneDrive was backing them up somewhere. RT can't run file recovery software much better than an iPad could.
Were they on internal storage or on a SD card?
Lost files were on the internal storage.
Are you running RT 8.0 or 8.1?
I use RT 8.0.
As the X86 emulator, you can run the program to restore the photos? Installation program X86 is successful, but when I run an error peloader(
Yeah, the x86 emulator probably doesn't support the APIs required for such programs; they're pretty obscure and surely weren't the dev's first priority. I really, really wish that tool's source code would be released so people could continue working on it...
Since you're on 8.0 (and already jailbroken, even) the question becomes "what open-source undelete utilities for Windows are available?" Typing "open source file undelete" into Bing gives http://kickassundelete.sourceforge.net/ as the first hit. What's more, it's entirely written in C#, as far as I can tell, even supports Mono. It might not even need to be recompiled and should be trivial to recompile if needed.
Obligatory reminder: Don't use the tablet (any more than absolutely necessary) until you have a chance to run the undelete tool. There's a pretty fair chance of the data getting overwritten, or even just getting TRIMmed out of the SSD, if you do so.
After the program kichkassundelete warning popup window appears. Even as an administrator program does not see the internal and external storage. What should I do in this case? How to get full access to the device with windows RT?
tank6662005 said:
After the program kichkassundelete warning popup window appears. Even as an administrator program does not see the internal and external storage. What should I do in this case? How to get full access to the device with windows RT?
Click to expand...
Click to collapse
On my Surface RT, this program also cannot detect the internal C: drive. However it can detect and scan USB drives (fat32 & ntfs) if it's run as Administrator (it prompts for this during load). So the program does seem to work to some extent. I have no idea why the C: drive is hidden/blocked.
May need to look for another program then, damn. Post-Vista, the system drive is *slightly* more protected against such access... but it's easy to work around if the developer knows what they're doing. Maybe KAUD only fully works on XP? I'm not sure; I haven't used it.

Categories

Resources