[APP][WIP][CONCEPT] Live Boot.img Modification - Android Apps and Games

In the process of writing the Nexus Dual-Boot Builder app, it became necessary to modify the ramdisk of a kernel. The problem with that statement is that this was being designed as an app, not something for the computer.
Using a combination of the original AnyKernel package, some modifications found from various sources, and a homemade busybox it is possible to unpack, modify, and repack a kernel on the device.
This was done as a basic hardcoded modification for uBoot. Find the part that needed changing, change it, pack it back up. I got thinking about the possibilities for other uses and here is what I came up with...
An application that can unpack a ROM's kernel or just an image and provides a list of items that can be edited, a file manager capability to swap, add, remove parts, and a text editor to modify script files. Finish it off with the ability to pack the image back up and even reassemble a ROM.
Now to the part that involves the general public. Would this be something worth developing? What could it be used for? I have the idea and a general layout for the code structure, just no motivation to develop something that will end up unused. That is why I was hoping to obtain some feedback on if this would be worth publishing.
Nexus Dual-Boot Builder and SKU Kernel Remote are both open-source under licenses that allow using the code provided the origin is publicly listed on the final product. This allows it to be used in any other app as long as the about section or something similar has the required verbiage. I would have no issues publishing this source under the same license if it had another use altogether.
Eventually this thread will be where binaries, code, tests, etc are posted but I want to weigh the merit of taking on ANOTHER project first

Related

rom-development with the original ms-tools ?

through msdn(aa) many students and people have all the original ms-development tools, but nowhere i can find the development-packages.
sure, most of the people do it through romkitchens, but does anybody know if there is any resource, how to work with the original tools ?
The ROM "development" you do with a "kitchen" isn't the same sort of development you do with Visual Studio. You're not writing and compiling code, you're assembling (already compiled) bits into a package. Sort of like taking .DLL/.EXE/.SYS files and making "Windows" out of it. In general (or maybe always, I dunno), a "kitchen" is made from a base ROM (or files extracted from one) and tools and packages that are added to the base ROM.
As far as I know, noone but MS has the tools used to build ROMs (if MS even builds them... I bet they don't, not as they arrive on our phones, anyway.
the "org" ms platformbuilder is not availbe to end users only to ms pda making partners
godefroi said:
The ROM "development" you do with a "kitchen" isn't the same sort of development you do with Visual Studio. You're not writing and compiling code, you're assembling (already compiled) bits into a package. Sort of like taking .DLL/.EXE/.SYS files and making "Windows" out of it. In general (or maybe always, I dunno), a "kitchen" is made from a base ROM (or files extracted from one) and tools and packages that are added to the base ROM.
As far as I know, noone but MS has the tools used to build ROMs (if MS even builds them... I bet they don't, not as they arrive on our phones, anyway.
Click to expand...
Click to collapse
you can do this with the msdnaa-packages, believe me..
maybe it is not really for the enduser, but as a "power-user" most of them know how to "get" the software - but it shines noone does.
last year i worked extended with windows embedded - the project run on ice because they wanted to use ce.net and i worked on another project.. but without the platform-package (in form of bootloader-code, drivers etc) you cant do anything - and it shines, nothing leaked or just the "real good informed scene" has that.
on windows embedded you have a tool eg. to get the important facts out of a running system to build your own image. on ce it wont be that easy, but even if, i cant find any information about that.

Please help editing android source apk

I've been searching for about an hour now and haven't found a thing. I think I'm missing something extremely obvious but I'm completely stumped. I'm trying to simply create a new android project in eclipse from an existing source, the Launcher found in the android 2.0 source. It creates the new project with no problems and everything looks like it is supposed to look except I have about 74 errors among various different classes. I've looked through some of the errors and many are variables that haven't been declared and others are references to classes that don't exist. I've tried numerous times with several different app sources with the same problem in every single app. I've even tried downloading the source for separate apks and the same thing happens. What am I missing?!
I'm pretty new to coding android apps but decent with java. My biggest problem is just getting the apps to compile without even making any modifications yet! Any help is appreciated
matt_stang said:
...I'm trying to simply create a new android project in eclipse from an existing source, the Launcher found in the android 2.0 source...except I have about 74 errors among various different classes.
Click to expand...
Click to collapse
The android.jar which is linked in to the project by ADT only exposes the public Android API (as seen in the official documentation.) Launcher, and other "system" apps included with the platform, almost invariably access a number of private APIs which are not exposed in the SDK, and cannot be built with ADT--at least, not easily.
As it turns out, android.jar can be edited to expose all those private APIs, which is something Brut.all has worked on as part of apktool, but he hasn't done this for an entire android.jar.
Your other alternative--and practically speaking, the only current alternative--is to build it the official way, by compiling a complete platform on Linux using the full Android build process, and including your Launcher customizations. After building the whole system once you can build just the desired APK, as I understand.
olearyp said:
The android.jar which is linked in to the project by ADT only exposes the public Android API (as seen in the official documentation.) Launcher, and other "system" apps included with the platform, almost invariably access a number of private APIs which are not exposed in the SDK, and cannot be built with ADT--at least, not easily.
As it turns out, android.jar can be edited to expose all those private APIs, which is something Brut.all has worked on as part of apktool, but he hasn't done this for an entire android.jar.
Your other alternative--and practically speaking, the only current alternative--is to build it the official way, by compiling a complete platform on Linux using the full Android build process, and including your Launcher customizations. After building the whole system once you can build just the desired APK, as I understand.
Click to expand...
Click to collapse
But I already have the whole system built on my mac.. so maybe is it a matter of pointing the project to the right directory for the private APIs? Or importing a android.jar from the built source to the project..? I'm very confused
matt_stang said:
But I already have the whole system built on my mac.. so maybe is it a matter of pointing the project to the right directory for the private APIs? Or importing a android.jar from the built source to the project..? I'm very confused
Click to expand...
Click to collapse
There is no android.jar with what you're looking for. If you already have the entire platform--either http://android.git.kernel.org/ or the CM source repository--just modify that, then build from the command line. AFAIK, you have to build from the command line, though, using `make'.
olearyp said:
There is no android.jar with what you're looking for. If you already have the entire platform--either http://android.git.kernel.org/ or the CM source repository--just modify that, then build from the command line. AFAIK, you have to build from the command line, though, using `make'.
Click to expand...
Click to collapse
That makes a lot more sense. Thanks

[Q] Wanting to start creating homebrew applications.

Ok, so I have no experience of working with any type of coding of development except for Adobe Flash. I don't think that really counts though, nor help me here, but I want to start off by saying that I'm simply a 17 year old.
I want to start development of an app to edit the registry. For example, I got the idea for everytime you click a button on the app, it edits something on the registry. Of course, phones will have to be Interop-Unlocked (Which my Samsung Focus is).
So to get on topic, how may I start creating an app for Windows Phone to edit registry and etc.? As I said before, I really don't have much experience, but I would love to learn and help the community.
Thanks in advance.
Bump up....
Ok, basic first steps: do you have the WP7 SDK? You can get it for free, and you'll need it. It includes the tools to build and deploy apps (compilers and so forth).
The project you're talking about is a bit heavy for a first foray into app development, but you can give it a shot. One of the easier ways (for me, at least) to learn things is to look at what other people did, which in coding usually means looking at open source projects. There are a few open-source apps which access the registry.
For example, my MultiTaskToggle app (linked in my sig) works on Samsung and provides an example of how to read and write a specific registry value.
If you want to browse the registry at all, you'll need something different. This can be done, using COM to call native APIs. Look at the Homebrew library (used by the Webserver projects, among others) or WP7 Advanced Explorer (open source, code is on Codeplex). These types of project have two parts: managed (.NET code, typically in C#) that calls the COM interface, and native (C/C++, written using the Windows Mobile SDK) that implements the COM object.
You may want to do some research online to get started, either here on XDA-Devs (though I think most tutorials here assume at least basic knowledge) or elsewhere (even from MS directly) if you're really starting from scratch.

Question for Development

So is it easy as just editing XML files to Mod? For example media_profiles.xml has a bunch of camera related variables. If I just change those and reboot, is that going to change anything? I know it could screw up my phone, but I am going for tips and tricks on how to mess with Android.
I know how to code, and would like someone to maybe point me to a guide.
Thanks
When I say know how to code. I mean I know xml and SQL....some Java. Was going to see what I could do with Android and maybe help community if I can learn.
Thanks
Depends on what you're trying to do. You can modify the ROM's apk's by deodexing and extracting. Depending on what you want to do, you can either modify whatever xml files or jpegs or whatnot that are inside, or if the task requires it, decompile, mod and recompile the code with smali/baksmali. A program called apk manager is also pretty handy for modifying apks. You can modify certain aspects of the rom with simple shell scripts, like you would on any regular linux installation. And then there's system development that will require you to learn C. If you want to get into that sort of thing, there's a guide on http://developer.android.com that goes over how to grab the android source and compile it. You could try poking around the CM9 code for an example too, even better if you have a device to flash it to.
Actually, there's a pretty decent how-to-get-started guide written by an awesome chap in the Captivate forum:
http://forum.xda-developers.com/showthread.php?t=928955

Custom clib, a bionic/eglibc hybrid, thoughts ?

I am fairly new to the game so this might have been solved before or maybe a project somewhere is already working on it, but I'll ask anyways...
I want to build a version of Android that runs on glibc but also has the Android specific libs to run it's framework, system services, dalvik, etc...
So I have the source for both as well as the sources for gcc 4.8.2, I am thinking I need to eleminate from bionic what exists in the gnu side of things, and then add what is left in bionic and doesn't exist in eglibc or the stdc++ library in gcc to that, or maybe the other way around. And then write an Android.mk file to build it with Cyanogenmod-10.3 in place of bionic.
Thats my game plan and I am sure there are some holes in it, maybe I need to modify the NDK as well, and I am sure I need to change some includes through-out the Android sources, or maybe write some headers that wrap around the eglibc version of the functions, methods, classes, etc.. that are named differently but are basically the same function.
Mabye someone with a bit more experience in the field can shed some light on what they think about the above.
Any guidance, references, quotes, links, articles, insight, or advice?

Categories

Resources