[Guide] Building AOSP & Adding Features - Nexus 9 General

First off I'd like to apologize if this is in the wrong place or if it is perceived as advertising, I simply want to contribute to the dev community and this site, and in particular the Nexus 9 forum that has been the centre of my learning as I took up the hobby of AOSP.
I have been back and forth with AOSP, I've contributed a little bit here and there on the Android development forums but would like to properly document how to build AOSP and more importantly (because it is even less well documented) how to add features, change existing features and generally customize the operating system to your liking. I am by no means an expert but I feel I have enough knowledge that I can share it with others who may be in the position I was a number of months ago. I always found it very difficult to find a centralized location for the information I needed.
To this end I have started a site to do just that. I am using a Nexus 9 for my AOSP development but most (if not all) of the tutorials and information should be applicable to basically any AOSP/Nexus device. I have started things off by creating a tutorial on how to build AOSP from 'scratch' so to speak and a tutorial on how to add items to the power menu such as 'reboot', 'airplane mode' etc.
If anybody would like certain topics covered or just have any feedback or comments please reply here or leave them on the articles themselves. I'll do my best to accommodate / respond.
The link is: http://littlelostandroid.wordpress.com
From tomorrow the following (nicer) link should also work: www.alittlelostandroid.com
I should also add that the blog will be ongoing about all things android device but this initial series will be about also and implementing features.

wow this is a real good guide/blog u put together please do continue

Dreamlogix said:
wow this is a real good guide/blog u put together please do continue
Click to expand...
Click to collapse
Thanks! The next post should be up in a day or two, its been a busy week.

New post up about flashing the build to a device!
www.alittlelostandroid.com

This is a great website. Lol i'm gonna have to learn to use ubuntu(was gonna do it anyway on my old computer but motherboard died and i got lazy). Can you make this in chronological order? or better add each section to a sitemap? Just a suggestion:cyclops:

whowatchlist said:
This is a great website. Lol i'm gonna have to learn to use ubuntu(was gonna do it anyway on my old computer but motherboard died and i got lazy). Can you make this in chronological order? or better add each section to a sitemap? Just a suggestion:cyclops:
Click to expand...
Click to collapse
So I changed the theme so that you can see the most recent posts on the side and work from that. I'm still getting to grips with WordPress to be honest but hopefully that's better now.

Another post about setting up and storing your code on GIT repos:
https://littlelostandroid.wordpress...-open-source-project-part-4-git-repositories/

Thanks for this
Do you have any insight to share on your site about building the LTE variants at all?

THX for your work !
There are plans to continue this great guide?

scoobydu said:
Thanks for this
Do you have any insight to share on your site about building the LTE variants at all?
Click to expand...
Click to collapse
Sadly I won't be able to do any work around the LTE version as I don't have the hardware to test it on. I don't want to release advice I haven't tested and potentially end up inadvertently damaging someones tablet for example
Topse said:
THX for your work !
There are plans to continue this great guide?
Click to expand...
Click to collapse
Sorry for the late reply, I don't get any emails when someone posts on this thread, I need to subscribe to it. I do plan on doing more, in fact I think I may have some written already, just a matter of getting time to do it. I'll get to work on the next section of the tutorials and post here when it's up. Is there anything in particular you would like covered?

seanashmore said:
Sadly I won't be able to do any work around the LTE version as I don't have the hardware to test it on. I don't want to release advice I haven't tested and potentially end up inadvertently damaging someones tablet for example
Sorry for the late reply, I don't get any emails when someone posts on this thread, I need to subscribe to it. I do plan on doing more, in fact I think I may have some written already, just a matter of getting time to do it. I'll get to work on the next section of the tutorials and post here when it's up. Is there anything in particular you would like covered?
Click to expand...
Click to collapse
I m actually try to make my own little aosp rom.
I have some probs with gapps flashing.
Wrong api level error.
I tried different commits.
With pure nexus gapps it works .I need to flash it twice.
I do "make otapackage", this is different to your guide.
When I flash a custom kernel I don't have this gapps problems.?
Next thing I will integrate is that reboot option.
But with reboot recovery.
Once after flashing I was surprised with stock recovery..
How can I disable that?
At the moment I build only for my bullhead.
But if that recovery and gapps problem is solved.
I will try for my flounder and shamu too.
Actually I use n7 r 15 as source. But will will switch to 7.1*
When it is evaluable.

Topse said:
I m actually try to make my own little aosp rom.
I have some probs with gapps flashing.
Wrong api level error.
I tried different commits.
With pure nexus gapps it works .I need to flash it twice.
I do "make otapackage", this is different to your guide.
When I flash a custom kernel I don't have this gapps problems.?
Next thing I will integrate is that reboot option.
But with reboot recovery.
Once after flashing I was surprised with stock recovery..
How can I disable that?
At the moment I build only for my bullhead.
But if that recovery and gapps problem is solved.
I will try for my flounder and shamu too.
Actually I use n7 r 15 as source. But will will switch to 7.1*
When it is evaluable.
Click to expand...
Click to collapse
I'm not 100% sure about the GAPPS issue, maybe try http://opengapps.org/, it lets you choose your android version, architecture etc.
In terms of the recovery; You'll see in my tutorials that I am using the stock Google factory images as a base. In that image is a recovery.img file; You should be able to replace this file with TWRP or any other custom recovery and flash it as part of your ROM.
Hope this helps.

seanashmore said:
I'm not 100% sure about the GAPPS issue, maybe try http://opengapps.org/, it lets you choose your android version, architecture etc.
In terms of the recovery; You'll see in my tutorials that I am using the stock Google factory images as a base. In that image is a recovery.img file; You should be able to replace this file with TWRP or any other custom recovery and flash it as part of your ROM.
Hope this helps.
Click to expand...
Click to collapse
I tried opengapps. But i run in an error. Opengapps say my ROM has the wrong api level.
I tried this commit (and other like that)
https://github.com/Cardinal-AOSP/frameworks_base/commit/6c8322f3ad221ea2092e82b99ece537b85ec996f
And with pure nexus dynamic gapps . it works when I flash the gapps two times. First I get the error and the second try works.
Change recovery to twrp sounds good. But with more devices its a dangers thing. Cause ever device needs special twrp.
I think there is a way to disable this flashing recovery.
But till now I didn't find it.

Topse said:
I tried opengapps. But i run in an error. Opengapps say my ROM has the wrong api level.
I tried this commit (and other like that)
https://github.com/Cardinal-AOSP/frameworks_base/commit/6c8322f3ad221ea2092e82b99ece537b85ec996f
And with pure nexus dynamic gapps . it works when I flash the gapps two times. First I get the error and the second try works.
Change recovery to twrp sounds good. But with more devices its a dangers thing. Cause ever device needs special twrp.
I think there is a way to disable this flashing recovery.
But till now I didn't find it.
Click to expand...
Click to collapse
If it's just the case of not flashing the recovery img then just remove that line/command from the script. However you will have to assume that the device already has a recovery img (which to be honest is a fairly safe assumption).

[/STRIKE]
seanashmore said:
If it's just the case of not flashing the recovery img then just remove that line/command from the script. However you will have to assume that the device already has a recovery img (which to be honest is a fairly safe assumption).
Click to expand...
Click to collapse
I try this for recovery https://github.com/peteralfonso/platform_build/commit/9b3a020058b84fb1f9cfba600f4a958572a805c3
edit: i think this is to old...

seanashmore said:
I'm not 100% sure about the GAPPS issue, maybe try http://opengapps.org/, it lets you choose your android version, architecture etc.
In terms of the recovery; You'll see in my tutorials that I am using the stock Google factory images as a base. In that image is a recovery.img file; You should be able to replace this file with TWRP or any other custom recovery and flash it as part of your ROM.
Hope this helps.
Click to expand...
Click to collapse
I use this way to build:
cd ~/aosp/kernel/lge/bullhead
make clean
export ARCH=arm64
export CROSS_COMPILE=~/aosp/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export USE_CCACHE=1
make bullhead_defconfig
make -j6
cd ~/aosp
mkdir ~/aosp/device/lge/bullhead-kernel
rm ~/aosp/device/lge/bullhead-kernel/Image.gz-dtb
cp ~/aosp/kernel/lge/bullhead/arch/arm64/boot/Image.gz-dtb ~/aosp/device/lge/bullhead-kernel
source build/envsetup.sh
make clobber
lunch aosp_bullhead-userdebug
export USE_CCACHE=1
make -j6 otapackage

Topse said:
I use this way to build:
cd ~/aosp/kernel/lge/bullhead
make clean
export ARCH=arm64
export CROSS_COMPILE=~/aosp/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export USE_CCACHE=1
make bullhead_defconfig
make -j6
cd ~/aosp
mkdir ~/aosp/device/lge/bullhead-kernel
rm ~/aosp/device/lge/bullhead-kernel/Image.gz-dtb
cp ~/aosp/kernel/lge/bullhead/arch/arm64/boot/Image.gz-dtb ~/aosp/device/lge/bullhead-kernel
source build/envsetup.sh
make clobber
lunch aosp_bullhead-userdebug
export USE_CCACHE=1
make -j6 otapackage
Click to expand...
Click to collapse
Ah ok, see the way I build gives me separate .img files, and I write a script similar to the flash-all script you get with the factory images. This allows me to pretty easily change what i want to do and what i want to flash or not.

seanashmore said:
Ah ok, see the way I build gives me separate .img files, and I write a script similar to the flash-all script you get with the factory images. This allows me to pretty easily change what i want to do and what i want to flash or not.
Click to expand...
Click to collapse
Year , but zip is easier to use/share.

Topse said:
Year , but zip is easier to use/share.
Click to expand...
Click to collapse
Definitely, though you can always put your script and .img files inside a zip just like the factory images. so users would download your zip, unzip it and run your script. Its all down to personal taste i guess, there are many ways to skin a cat.

seanashmore said:
Definitely, though you can always put your script and .img files inside a zip just like the factory images. so users would download your zip, unzip it and run your script. Its all down to personal taste i guess, there are many ways to skin a cat.
Click to expand...
Click to collapse
:good:
I like it to try different ways.Good for learning and deeper understanding.
For my personal use is this way no problem.
But for sharing with other people is a flashable zip file the most used way.

Related

[Q] A call out to the Galaxy S ROM delevopers, help needed!

Well hello everyone.
I am an application development student from Belgium.
I am proficient in Java, VB.NET, some c/c++ and also PHP/JS/HTML/CSS
Anyways, my recent interest has been going out to creating custom roms for the galaxy S!
The problem now is though, I was able to find some guides and such, but most were incomplete, and for HTC(and other) devices.
I have no idea what is different between making a ROM for galaxy S or a ROM for an HTC device.
If anyone would like to link me to some good resources that can help me on my way, or would like to collaborate (and in the meanwhile teach me a bit) I would be more than happy! (I am open for collaboration as I am pretty proficient in Java and I'm always happy to code and learn more about coding!)
I think the question is really want you want to do!
Custom ROMs for Android are as simple as using recovery console to replace files on the system with your own versions.
ie. Replace the framework.apk which contains all theme images with your own modified one, which you can use to skin the device. Same for replacing other system apps.
Unfortunately, most of these apps are closed source, so modifying them is difficult. The stock android system has open source versions of most of them though, and you can modify those and build them, and then replace the ones on the device. I'm not entirely sure how to build them up though, but it probably isn't too hard.
Then there are custom kernels, which let you actually change the underlying linux system underneath android - Samsung has an open source version of the kernel available that you can compile, and then flash to your phone using Odin or other tools. Compiling the kernel is pretty tricky though.
Well i'm really talking about stuff like SamSet, MoDaCo, Doc's ROM and others.
I'm not saying I want to create a pro ROM in a day or anything, but i'd really love to learn more to get better (always looking for more stuff to put on the resume, I guess?!)
Thanks a lot,
Kenny
Bump for some help
(sorry for the double post but i'm really eager to learn)
I don't have time to give a detailed response right now. However you will want to read up on yaffs (file system) and odexing/deodexing ROMs.
Thank you I will definately do that,
I am following a guide now to start out creating custom ROMs for android, however it was written for Motorola Droid and I have no idea what you have to do different for a samsung galaxy s.
I am a good coder, even though I say so myself, with a lot of experience. I also have a lot of linux experience, you name it
Only the problem is the old, and much known "where do I get started?"
So if anyone can point me out in the right direction on that, tell me how/where you started out, I would appreciate it greatly!
Thanks!
Very sorry to bump again
I set up my environment in ubuntu today to get started (just gotta fix a few errors, didn't know android wouldn't compile on java 1.6, only on 1.5)
Anyways, still need some help here! thanks!
Again I am awefully sorry for the bump here but i'd really like some help.
Note that i'm not a newbie at coding whatsoever and i'm not unfamiliar with some hardcore java, c/c++ and other languages, I'm just having trouble getting started when it comes to modding an existing android release (there are tutorials on HTC and other devices but some methods do not apply to the galaxy S)
If you're trying to create a ROM from scratch then unfortunately you're out of luck at the moment. No one has really managed to do so yet. By "from scratch" I mean the Android Open Source Project (i.e. official Android git repository).
What you can do is grab an existing firmware. Extract the contents, de-odex the apks, modify them or add new apks, optionally you can also compile a custom SGS kernel using Samsung's kernel source. Then you can re-odex the ROM, pack it back up and distribute it.
There's no real "starting place" as such and you won't yet find any tutorials about how to create SGS ROMs. Just give it a go and see where you get.
Yes, I do mean creating a ROM from stock samsung firmware, of course.
So my next logical question would be now:
How do I go over extracting contents from the existing samsung firmware, de-odexing and so on?
Any links/guides/tips are greatly appreciated, as long as they are applicable to this cell phone and not totally crap, thanks!
Samsung uses rfs, I think you should know. There is a thread somewhere in this forum regarding extracting .rfs file. Understood you need Debian though.
For some readup, go search for a famous guy named JesusFreke. Tons of materials...
Hope that from here onwards, this can lead you on, and to find out more. Google is your friend too...
I'm afraid my biggest problems already occur in setting up the environment, so it's really the very beginning that gets me stuck, i'm sure coding would be a bikeride compared to setting up the environment for me (i'm no hero in linux,not at all, i'm afraid)
How the hell do I get from point A (being downloading the full source) to point B (starting to create a custom ROM?)
thanks
of course if anyone has the time, and wants to, you can PM me your msn or something, if anyone is up to it
Raykoid666 said:
I'm afraid my biggest problems already occur in setting up the environment, so it's really the very beginning that gets me stuck, i'm sure coding would be a bikeride compared to setting up the environment for me (i'm no hero in linux,not at all, i'm afraid)
How the hell do I get from point A (being downloading the full source) to point B (starting to create a custom ROM?)
thanks
of course if anyone has the time, and wants to, you can PM me your msn or something, if anyone is up to it
Click to expand...
Click to collapse
Agreed completely! Getting a full cross-compilation to Samsung's Android going is seriously difficult! There have been some promises for tutorials and guides for setting things up though, but none have appeared yet. Probably because it's hard!
Well thank you for agreeing with me on that.
I am really hoping for anyone that can help me out here, either on here or in private, and give some detailed instructions on how to get started.
Hell there is enough information on creating roms alread, deodexing, adding/removing apps etc etc etc... The real problem lies in setting everything up properly.
I think I have gotten to the point where I'm compiling the android source (without samsung specific files)
note i'm saying "i think i am compiling" because i'm hoping it won't error out on me again after an hour of compiling!
But once that is done... I have no idea where to go next, where to get the samsung specific files, or what to do with them whatsoever once i have them
thanks!
Android generic source won't actually help you much. Samsung has made a huge number of changes to it, and while it is all open source, backporting their changes to get your stock source running on the phone is a major undertaking. I believe cyanogenmod was actually working on this, but it seems without much success so far.
What the other rom makers you see are doing is taking a snapshot of a running rom, copying over all of the APKs and the files on a running device, and then tweaking those. ie. Opening up framework-res.apk and changing the image files inside.
The update.zip roms that are what most people are doing are really just using the Android recovery to replace files on the phone with their own versions. Since the underlying system is linux, and everything is a file, this actually works pretty well.
The kernel development effort is completely separate from the rest of the system though, and Samsung has provided the entire source tree that just has to be compiled. I'm a bit stumped myself on all the details of setting it up, but I have seen some threads on this forum about it, and it didn't seem too bad to set up. Apparently you shouldn't use the codesourcery toolchain though, or something. Not too clued up on it, sorry. Hopefully someone with the details can chime in, or give us a link to the old post on it (I'm failing to find it using the search function! )
Alright sounds good!
So these recovery files you are talking about (the contents of /system) how do i retrieve those from a base ROM such as JM7 or the likes after a clean flash?)
Raykoid666 said:
Alright sounds good!
So these recovery files you are talking about (the contents of /system) how do i retrieve those from a base ROM such as JM7 or the likes after a clean flash?)
Click to expand...
Click to collapse
Root your phone, zip them up onto the sdcard, and then copy them off.
There are probably better methods, but this works fine.
Also, with credits to Unhelpful, he has told me that the correct toolchain to be using is 'uClibc or eglibc toolchain with ct-ng'. I have no idea what to do with that yet, but it's a start.
RyanZA said:
Root your phone, zip them up onto the sdcard, and then copy them off.
There are probably better methods, but this works fine.
Also, with credits to Unhelpful, he has told me that the correct toolchain to be using is 'uClibc or eglibc toolchain with ct-ng'. I have no idea what to do with that yet, but it's a start.
Click to expand...
Click to collapse
You don't even need to root your phone to pull /system Ryan
adb pull /system <random folder>
is all you need ^^
Alright thank you, I managed to get all the /system files using abd pull /system
now next thing up would be de-odexing right, before I go editing stuff?
Now before I go de-odexing. Can anyone tell me what exactly de-odexing is and why I need it?
and what do I need to do to create an update.zip again?
thanks a lot all!
Tayutama said:
You don't even need to root your phone to pull /system Ryan
adb pull /system <random folder>
is all you need ^^
Click to expand...
Click to collapse
Haha cool, didn't know you could pull whole folders!
Raykoid666 said:
Alright thank you, I managed to get all the /system files using abd pull /system
now next thing up would be de-odexing right, before I go editing stuff?
Now before I go de-odexing. Can anyone tell me what exactly de-odexing is and why I need it?
and what do I need to do to create an update.zip again?
thanks a lot all!
Click to expand...
Click to collapse
The apk files in Android are odexed - that means they have a special index applied for dalvik that speeds them up somehow! I don't know how, I haven't checked how it actually works.
The important point is though:
odexed is faster, but you can't edit it because of signatures or something technical
deodexed means you can change it however you want
More useful info can be found from google - lots of it!
update.zip is easy - it's a zip file in a special format that can be understood by Android's recovery console. The easiest way to do it is to grab an existing update.zip and modify it as needed. Tayutama has millions of em around, so use his!
Then you need to sign it once you're finished with it so that the SGS will accept it. Samsung made a boo-boo and didn't disable the test keys for the 2.1 SGS firmwares. That makes it easy!
http://www.londatiga.net/it/how-to-sign-apk-zip-files/
Just use the test keys to sign it, and then copy it to /sdcard/update.zip and reboot into recovery and it'll work.

Anyone know if we are able to use CWM?

Has CWM been ported to this device yet? Or something like the Droid X recovery?
If so, I'd like to start making a pseudo-ROM of sorts.
If not, I'll start working on making some batch files
PixoNova said:
Has CWM been ported to this device yet? Or something like the Droid X recovery?
If so, I'd like to start making a pseudo-ROM of sorts.
If not, I'll start working on making some batch files
Click to expand...
Click to collapse
To make a long story short I find if you use Fedya/bootstrapped_recovery, HERE: https://github.com/fedya/bootstrapped_recovery. And you substitute Dexter_nlb's "mot_boot_mode.p2.sh" file from his recovery, HERE: http://forum.xda-developers.com/showthread.php?t=942160. You have a recovery you can do things with. Just had problems with mounting usb for file transfers, and one or two unmount options. CAUTION... if like me you have a second partition on your sdcard to work with link2sd, it will wipe your second partition. And you'll find that Nandroid works and will backup your second partition but will NOT restore it. But it's progress... I used ubuntu to extract Dexter_nlb's apk. Let me upload the recovery I threw together and I'll post a link. Naturally credit goes to the authors, I did nothing but swap files and pull what's left of my hair out trying to fix what I ultimately couldn't . The link is on the way...
Here's the Link: http://www.mediafire.com/?618nl545za0b6ax
Just install like Fedya specified on Github: https://github.com/fedya/bootstrapped_recovery
Nice! Thanks so much!
Sent from my MB508 using XDA Premium App
I think we will be able to soon!
Working on it
I am in talks with the people at CyanogenMod forums, and they are giving me pointers and lessons on how to build a custom ROM from their source tree. Hopefully I will begin this weekend (and won't brick my wifes phone more than 10 times). I will let you guys know what I come up with when I have something.
Yay that's exciting....i'm in talks with a guy at those forums too and he said he's almost done building a custom recovery

LolBoot xD SGS2 dualboot - NEW 12.12.11: Easy-Setup App v2.51

(I wasn't really sure if this might fit into "Development", so I put it here, maybe a mod will move it, if it's a dev topic )
Anyways, here we go, I DUALBOOTED two different, independant ROMs on the S2
Video of dualboot in action: http://www.youtube.com/watch?v=l9-V_6Ua_D0
** THIS IS NOT (YET) COMPATIBLE **
** WITH ICS (ANDROID 4.0.x) ROMS! **
-- this goes for custom ROMs as well as stock ROMs --
Icey Sammich compatibility will be added once Sammy released their ICS kernel sources.​
!!! There now is an app for more convinient and easy setup of the dualboot !!!
(04.11.2011) DualBoot setup app v2.00: http://forum.xda-developers.com/showpost.php?p=19049047&postcount=94
(12.12.2011) App has been updated to 2.51, lot's of good new stuff! >> Free Version -- Donate Version <<
Click to expand...
Click to collapse
First off:
This is only a little experiment I did like "c'mon, has to be possible" - this is NOT (at least yet) tweaked for usability and anything the like, just a humble experiment.
That said, don't flame me if things are rather complexicated to do this ATM.
Maybe I'll come up with a more userfriendly way of setting this up, maybe someone else does, maybe no one does.
Also now that I found a base on what to do, there might be different ways (more easy ones maybe) to set this up, I'll keep toying around with it.
But let's cut to the chase, shall we
So, how was this set up? I'll give a brief rundown of what I did:
I edited a few .rc files in the initramfs of the kernel to make it actually perform a full boot when recovery mode was triggered and to fire up recovery mode when in battery-charging mode.
I also edited a few mounts in the boot .rc for the 2nd OS (in "recovery" mode) to use different partitions for /system and /data, so that we'd end up with really independant installs.
What partitions did I missuse for that:
partition 12 (mostly unused, only when installing a stock ROM AFAIK) for /system - that's a neat choice IMO as p12 is 512MB in size, just as p9 where /system usually sits on
partition 7 (which is usually /cache) for /data
gives us only 100MB of user data space, but for now that's OK, as said, it's only an experiment on how such a thing could be done.
with the original partition for /cache "gone", I mounted a tmpfs for it.
So the OS still has a usable /cache
Then I set up the two OSes:
(dualboot kernel not yet flashed)
Launchprep part 1:
I made a CWM backup of my normal installation I was running (stock XXKG6 at the time).
I installed DevNull-Test AOSP as to it's instructions
Some su'ed voodoo via a terminal while having the 2nd OS (the DevNull AOSP one, in this case) installed - best done in recovery mode via ADB:
rm -Rf /cache/*
cp -Rp /data/* /cache/
dd if=/dev/block/mmcblk0p9 of=/dev/block/mmcblk0p12 bs=4096
That did "set up" the 2nd OS to where it's supposed to go.
Launchprep part 2:
Then, "advanced restore" of the backup made a few minutes earlier:
- boot
- system
- data
Reboot
At this point OS #1 is running again and OS #2 is sitting in hiding, prepared to roll - so, let's roll:
Flashed the modified "dualboot kernel" (via an App or Odin or magic, doesn't matter).
---> DONE <---
reached the point to where everything works as shown in the video.
As said above already, yes it needs some manual work to set it up, yes there's a lot of things that might not work, yes there are other/better ways to set it up.
It's only a humble experiment - lot's of space for improvement.
Maybe you like it - for those who do, I wanted to share this
Attached to this post you find the modified kernel I used, it's based on my v1.20 custom kernel (see sig) but with the above mentioned changes.
I've seen the video m8, this is totally different approach, ur giving this device a new dimension. love u "in a straight way" hahaa
there currently an app called Bootmanager which also handle up to quadruple booting. But sadly currently only support HTC phones.
http://www.appbrain.com/app/bootmanager/com.drx2.bootmanager
well, one can hope!
Thanks OP this is an awesome concept! Very happy to see you posted it with a video! and nice boot animation!
sunwee said:
there currently an app called Bootmanager which also handle up to quadruple booting. But sadly currently only support HTC phones.
Click to expand...
Click to collapse
Yeah, that's the thing.... that app is HTC only.... but we have Samsung S-II and want dualboot as well.
I'm already brainstorming on how to enhance the actual usability of this, i.e. flashing a 2nd OS directely to it's place instead of first installing it to the main system partition. But there is problems when /data is not mounted to the original partition, at least stock doesn't like it on initial boot.... well, well....
That is great. Going to use this for sure. This should be in development for sure.
Congratulations already.
Sent from my GT-I9100 using Tapatalk
This is impressive bro sure will use it
but i want to ask one thing
SD card needed for this or not ?
That would be really cool (and definitely should goes to original development). Does it work with CM7/MIUI + custom rom?
vikas776 said:
SD card needed for this or not ?
Click to expand...
Click to collapse
No, so far this completely works with all internal storage.
But I have a few ideas I have yet to try to get mounted from other places - like images in /sdcard for example (I *so* hope that'll work.... )
Hi
Does this kernel include any of the Hellcat kernel tweaks or are they work in progress.
Sent from my GT-I9100 using Tapatalk
Tricky103 said:
Does this kernel include any of the Hellcat kernel tweaks or are they work in progress.
Click to expand...
Click to collapse
I made this build based on my v1.20 custom kernel, so it has everthing that one has - plus the touchfix already
exactly what i was hoping for.
great job - pls continue your work
Hi i tried this with instanity rom last night. When I use the three buttons to boot it just sits there not booting. My guess is the kernel is not compatible. Unless I made a mistake somewhere.
Sent from my GT-I9100 using Tapatalk
Hm, yah, might be that the kernel isn't fully compatible with that ROM, what kernel does the ROM usually use?
Did you boot it up fully at least once before copying /data to /cache ?
Yes I did fully boot up. But his kernel didn't have advanced activated in recovery so I flashed your kernel and moved the cache okay. But it said /data not found when I ran the 2nd command line.
I will flash aosp later. I like that rom.
I am not sure what kernel nitr8 uses. I think it is his own, Insane.tar would you like it to see if they can work together.
Sent from my GT-I9100 using Tapatalk
Tricky103 said:
But it said /data not found when I ran the 2nd command line.
Click to expand...
Click to collapse
Hm, yeah, that sounds like something didn't work.... make sure you run those commands as root, i.e. "su" as very first command (I'll add that to the first post).
Give me a direct link to the ROM and I'll try it.
Make take a few days though as I'm away from my computer a lot because of work the next two days, but I'll try once time permits.
Well yeah, and this still is in highly experimental stage, if I (or someone else) should ever get this to more stable and reliable state, I'll make an easy to use installer/setup tool
But I got a few other ideas on setting it up I have to try first....
http://goo.gl/2uZCh
This is the complete rom. Only 47mb. I thought you would like the whole rom
Tricky103 said:
Hi
Does this kernel include any of the Hellcat kernel tweaks or are they work in progress.
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
May be someday WINDOWS Mo 7 and Android on our sweet beast
Hi
I tried again with Aosp Dev-null. I still get this error "cp: can't stat '/data/*': No such file or directory "
after running this command line " cp -Rp /data/* /cache/ "
Any Ideas ?
It still doesn't boot if I press 3 button it brings up the boot logo and then black screens until it boots to the 1st partition.
Thanks for the link, will download and try as soon as time permits.
Also, try this command sequence, I got an idea what the issue maybe might be, give it a shot:
Code:
su
rm -Rf /cache/*
busybox cp -Rp /data/* /cache/
dd if=/dev/block/mmcblk0p9 of=/dev/block/mmcblk0p12 bs=4096
(use "busybox cp" instead of plain "cp", maybe it helps)
And some update on my ongoing thoughts for those interested:
- got an idea on how to make a more easy to use App for prepping and setting up the dualboot environment
- managed to do a neat thing I didn't really think it would work: issued a "mount" command and the OS thought it was mounting a partition of the internal flash (/dev/block/mmcblk0p12 in this test, but was testing for later on actually doing it with p9 - you might see where I'm headed here ) but instead of the partition it actually mounted from an .img file! (loopback)
i.e. "mount /dev/block/mmcblk0p12 /somedir" actually mounted "/somepath/someimage.img" to "/somedir" instead of the partition from /dev/block/... (you just gotta love Linux and it's flexible way of handling things....)
NOW, imagine /dev/block/mmcblk0p9 (the partition carrying the system) and p10 (data) being (kinda) transparently mounted from an IMAGE FILE
I "only" have to find a way to sneak this in before init starts mounting stuff.
If there's a way to do THAT.... unlimited multiboot from OS images, anyone?
(so far this is kinda dreaming, but would be cool to get it working )

[Q]My made custom ROM did not install correctly

I tried to make a ROM, and it is not installing properly.:crying:
I data-resetted everything and formatted system, but this ROM is not installing correctly because I had removed some system apps and also added a few of them. But after a reboot I saw the system apps which I removed.
Please help me.
Thanks in advance
Noobwithabrickedsgy said:
I tried to make a ROM, and it is not installing properly.:crying:
I data-resetted everything and formatted system, but this ROM is not installing correctly because I had removed some system apps and also added a few of them. But after a reboot I saw the system apps which I removed.
Please help me.
Thanks in advance
Click to expand...
Click to collapse
Can you post updater script you are using under [ hide ] tags?
Was your /system mounted before you flashed your rom?
A Hero Can Be Anyone
Noobwithabrickedsgy said:
I tried to make a ROM, and it is not installing properly.:crying:
I data-resetted everything and formatted system, but this ROM is not installing correctly because I had removed some system apps and also added a few of them. But after a reboot I saw the system apps which I removed.
Please help me.
Thanks in advance
Click to expand...
Click to collapse
How did u make a rom??
Give the uodater scriot...
.................I Walk In Shadows...!..................
sanny5 said:
How did u make a rom??
Give the uodater scriot...
.................I Walk In Shadows...!..................
Click to expand...
Click to collapse
I made it without kitchen . I used a sample updater script given by hell_lock/prototype U.
Its attached.
I guess its some prob with my sd card cuz i could not install the same hyperion 7 which used to work before.
Could anyone test it???????
Here is my ROM-http://www.mediafire.com/download.php?3pk413hrcq1ze27
Here is my updater script-http://www.mediafire.com/download.php?paknyyfkebb6ybw
Noobwithabrickedsgy said:
I made it without kitchen . I used a sample updater script given by hell_lock/prototype U.
Its attached.
I guess its some prob with my sd card cuz i could not install the same hyperion 7 which used to work before.
Could anyone test it???????
Here is my ROM-http://www.mediafire.com/download.php?3pk413hrcq1ze27
Here is my updater script-http://www.mediafire.com/download.php?paknyyfkebb6ybw
Click to expand...
Click to collapse
first question, how did u make ur rom?
how did u make the zip file?
how are the files placed inside ur zip?
I think he just grab someone else's ROM and edited it as much as he wanted and then grab the Updater-script from Hell-lock and thinking "hey, this must be works!" and now, look the result. No one has success to make a Custom ROM without a kitchen (Editing the .zip).
If i helped you, Press the thanks button. don't say it
GermanyGSG said:
I think he just grab someone else's ROM and edited it as much as he wanted and then grab the Updater-script from Hell-lock and thinking "hey, this must be works!" and now, look the result. No one has success to make a Custom ROM without a kitchen (Editing the .zip).
If i helped you, Press the thanks button. don't say it
Click to expand...
Click to collapse
to be honest,
i never used kitchen to make my rom,
i had to code the updater script manually,
@OP.
you need to study the codes first and know what you are doing,
you can't build a house without proper procedures, same with ROM building,
you must learn to research and be patient when you fail,
it happens all the time,
in most instances the phone won't boot and what i always do is to go back and think over what went wrong and what must i do to resolve the issue,
we can help you as much as you can but please try to help yourself understand the situation a bit more.
deathnotice01 said:
to be honest,
i never used kitchen to make my rom,
i had to code the updater script manually,
@OP.
you need to study the codes first and know what you are doing,
you can't build a house without proper procedures, same with ROM building,
you must learn to research and be patient when you fail,
it happens all the time,
in most instances the phone won't boot and what i always do is to go back and think over what went wrong and what must i do to resolve the issue,
we can help you as much as you can but please try to help yourself understand the situation a bit more.
Click to expand...
Click to collapse
Thanks for motivating me. I know what is the problem now. I did not mount /system before flashing?. Added that to my script... All working fine now.
@GermanyGSG-
How the heck could you create ROMs before kitchen was made .. Eh? Its a matter of bash and edify... No kitchen needed.
Sent from my Nexus 7 using Tapatalk

[SUPPORT] Ouya Boot Menu Support Thread

Hello everyone,
This thread previously was a discussion area for the Ouya Boot Menu feature during its early development.
It's now being transitioned to a support area. The new project description/download page is at:
http://forum.xda-developers.com/showthread.php?t=2499673.
Thanks!
CWM Bootloop
Hal9k+1 said:
Hello everyone, attached is the ZIP of an updated CWM Recovery IMG file.
This image is based on the latest stock Ouya kernel in GitHub. The kernel contains some newer HDMI code, which will hopefully increase the chance of getting the CWM graphics showing up properly. I also turned off HDMI’s HDCP in the compile (not needed for a utility partition such as this), and grabbed a patch from Kulve’s Ouya kernel fork to really ensure HDCP bypass.
More importantly, the image contains Tasssadar’s excellent work involving KExec-HardBoot. This technology should allow for the implementation of a “fastboot boot”-related capability from a running ROM, enabling kernel chain loading. The recovery image in particular will be a place to practice with KExec-HardBoot, and come up with a booting method that could eventually be flashed to the boot/kernel partition.
It is fine (and recommended) to fastboot to this image as a quick verification of things. However, it will be necessary to flash to the Recovery (“SOS”) partition for proper testing of KExec-HardBoot, since there’s an embedded reboot (to Recovery in this case) in there. Do *NOT* flash this to the Boot.
A simple chain load test can be done by extracting “zImage” from this image, and “initramfs.cpio.gz” from your current ROM kernel. (Included is “unmkbootimg” that can help here - runs on Linux.) Push these to /tmp on the Ouya while it is running this image. Then enter the Ouya shell and do:
kexec --load-hardboot zImage --initrd initramfs.cpio.gz --mem-min=0xA0000000 --command-line=”$(cat /proc/cmdline)”
kexec -e
It should come up with this new kernel under your current ROM’s environment. As verification, you should see kexec files under /sys/kernel.
I’m looking to implement a basic chain loading application. It would come up before the Recovery and ADB services, and do the following:
% Pause for a bit, to allow any Alt-SysRq keyboard action (jump to Recovery or Bootloader) that may be needed.
% Check for any attached USB mass-storage devices (e.g., thumb drive), and look for the file “kernel.img”. Pull it in and boot it if present.
% If that failed, then look to “/system/kernel.img” on the Ouya itself, and boot it.
% And if that didn’t pan out, then exit and allow Recovery/ADB services to come up.
I hope all of this will be of help to others along the way!
Click to expand...
Click to collapse
Will this help with the problem I have?..
New update today it downloads automatically and then reboot to CWM and it fail verification...reboot system and it does all over again?...Any ideas Plz
View2Askew said:
Will this help with the problem I have?..
New update today it downloads automatically and then reboot to CWM and it fail verification...reboot system and it does all over again?...Any ideas Plz
Click to expand...
Click to collapse
Sorry, I'm not sure I understand. It sounds like the new stock firmware update is failing to go in, perhaps because of consistent download corruption. Whether you're actually being dropped in to the recovery partition is unclear. You might try the download again with the other networking type (Ethernet vs WiFi). You might also just disconnect from the network for the time being, and see if you remain in the firmware without interruption. From there you can consider setting up ADB to see if you can administer the Ouya from a PC.
My post is more for the developers at heart, just in case my investigation piqued anyone's interest. Ideally the post would go in the Development section, but I evidently need a few more posts here to unlock that area.
Best of luck!
Dual booting
Yes, please do enable dual/multi booting
Is there something I can do to help in that regard?
kulve said:
Yes, please do enable dual/multi booting
Is there something I can do to help in that regard?
Click to expand...
Click to collapse
Thanks kulve, and thank you for the kernel patch set. I need to get familiar with the offerings there.
I don't see any blockages in my plan so far; I just need to start in and see what comes up. At least it's a better feeling than the dead-ends encountered with the U-Boot and regular KExec investigations.
Someone more enterprising could possibly port in the MultiROM project, but I'll stick with this. Will let you know if I get stuck.
My findings so far...
- I've finally decided that shutting off HDCP in the build does nothing to help avoid the funky pink/purple squeezed screen that sometimes appears when CWM comes up. With my Asus monitor, I see the issue when the monitor was in sleep mode. Likewise, if I can switch the monitor to HDMI input at the same time as starting Recovery, then it's fine. It may be possible to hack in a fix by somehow starting and closing an HDMI session shortly before CWM itself starts. (I don't want to fight this too hard but would be nice to resolve.)
- I see how to pull the kernel and ramdisk out of an Android image (on the Ouya itself), so that they could be passed to KExec-HardBoot. I've done it with a script as a test but it may end up in an executable.
- I tried out a USB thumb drive. It's detected but no block device is made available under /dev -- I've finally decided that support is likely in a kernel module, which does not exist on the Recovery image. I'm probably not going to sweat this due to the next item.
- I notice that the CWM application can read the Ouya power button as something comparable to a keyboard key press. Borrowing this capability may allow us to count the button presses in a limited time range, and thus boot an appropriate image. (Would be easier than dealing with the pairing of the controller, but at least still wouldn't require a keyboard.) With this line of thought, I'm thinking the main image could sit in /system while any alternates could be in /sdcard or /data.
So in general, studying the code of the CWM application appears to be the next direction. Thanks - feel free to send any ideas.
Hal9k+1 said:
- I've finally decided that shutting off HDCP in the build does nothing to help avoid the funky pink/purple squeezed screen that sometimes appears when CWM comes up. With my Asus monitor, I see the issue when the monitor was in sleep mode. Likewise, if I can switch the monitor to HDMI input at the same time as starting Recovery, then it's fine. It may be possible to hack in a fix by somehow starting and closing an HDMI session shortly before CWM itself starts. (I don't want to fight this too hard but would be nice to resolve.)
Click to expand...
Click to collapse
What does the rendering in CWM? Is it Android or something lower level? I think my kernel has better HDMI support but for that the software needs to use that explicitly instead of the default one as there is not internal LCD panel (/dev/graphics/fb0 vs. fb1).
kulve said:
What does the rendering in CWM? Is it Android or something lower level? I think my kernel has better HDMI support but for that the software needs to use that explicitly instead of the default one as there is not internal LCD panel (/dev/graphics/fb0 vs. fb1).
Click to expand...
Click to collapse
It does look to be low-level, as CWM directly opens /dev/graphics/fb0 and uses ioctl() on it. I've decided to try my own compile of CWM as it does look to be a nice base for the booting effort. Will definitely look to your patches for the improved HDMI when I'm all ready -- thanks!
Hal9k+1 said:
It does look to be low-level, as CWM directly opens /dev/graphics/fb0 and uses ioctl() on it. I've decided to try my own compile of CWM as it does look to be a nice base for the booting effort. Will definitely look to your patches for the improved HDMI when I'm all ready -- thanks!
Click to expand...
Click to collapse
I noticed your comments related to this on the "Ouya CWM Recovery" thread but I'm not allowed to post there, so I'll post here.
Or actually repost as I'm mostly repeating myself. I had all kinds of issues in getting output using /dev/graphics/fb0 in Linux with the stock Ouya kernel but after some fixes the fb1 seems to work quite reliable. I get the output even if I don't have HDMI plugged in during the boot and it chooses the right resolution both for my TV (1080p) and for my monitor (1680x1050).
To all: I have updated the attachment that's present on the first post. I've synced to the latest Ouya kernel and pulled in the next HDMI patch set from Kulve. My HDMI issue now appears to be fully resolved.
Kulve: Thanks so much for refocusing me! I should have grabbed the patch from day 1, but that summary description had me a bit spooked. Note that I kept the HDMI/PRIMARY symbol enabled, so there's still only the fb0 device on this kernel.
With this handled and due to my thinking in general, I'm going to back away from trying to compile CWM itself -- I don't want to invest in CM10.1's environment at this time. Instead I will borrow CWM's UI and input technology to build an independent front-end with this Ubuntu/glibc environment I have working. My idea is to release another Recovery image when that's ready so we'll have a chance to practice/debug before moving to the Boot image.
Hal9k+1 said:
Kulve: Thanks so much for refocusing me! I should have grabbed the patch from day 1, but that summary description had me a bit spooked. Note that I kept the HDMI/PRIMARY symbol enabled, so there's still only the fb0 device on this kernel.
Click to expand...
Click to collapse
Hit the Thanks button
Anyway, do you have your kernel source code somewhere? Being able to use multiple resolutions on HDMI while keeping it as primary might be something that many Ouya Android gamers want as they might be able to play at 720p then.
ooo nice, ill try it out and see what happens
kulve said:
Hit the Thanks button
Anyway, do you have your kernel source code somewhere? Being able to use multiple resolutions on HDMI while keeping it as primary might be something that many Ouya Android gamers want as they might be able to play at 720p then.
Click to expand...
Click to collapse
Done! :laugh:
My modified files were tarred up and placed in the ZIP; let me know of any possible issue. I'm not planning on a GIT account, but anyone may feel free to pull anything back to their project. Also I understand that sticking with HDMI/PRIMARY may reduce some of the capability/flexibility you're seeing, but I wanted to stay honored to the Android/CM layout expectation if possible.
Hal9k+1 said:
Done! :laugh:
My modified files were tarred up and placed in the ZIP; let me know of any possible issue. I'm not planning on a GIT account, but anyone may feel free to pull anything back to their project. Also I understand that sticking with HDMI/PRIMARY may reduce some of the capability/flexibility you're seeing, but I wanted to stay honored to the Android/CM layout expectation if possible.
Click to expand...
Click to collapse
Any chance of getting some concise installation instructions?
zondajag said:
Any chance of getting some concise installation instructions?
Click to expand...
Click to collapse
Here's a quick executive summary until I can update the 1st post.
I'm reminded there's another XDA project (Ouya Safe Recovery) with a very similar goal as this, and works by reversing the Boot and Recovery concepts. However it's completely incompatible with us, and those users should not be doing any flashing -- at least not until we have a Boot image ready.
First step is to get rcvy092613.img to the Ouya in its /tmp directory. This may be done with an "adb push rcvy092613.img /tmp" command, or can by done through Secure Copy if an appropriate SSH server is set up.
Next step is to access the Ouya shell, either running from the main ROM or from a Recovery ROM. Be sure to become root (ensure "#" in the prompt) as needed.
Run the following to back up the old image:
cd /dev/block/platform/sdhci-tegra.3/by-name/
dd if=SOS of=/sdcard/old_rcvy.img
Make sure the new image is correct - should see "2a882d1ba8c2d543503cacb49ab0d397":
md5sum /tmp/rcvy092613.img
On to flashing Recovery:
dd if=/tmp/rcvy092613.img of=SOS
Now wait at least a full minute in case there is any internal flushing still taking place. And to finish up:
sync
reboot recovery
Aye....never enough time to tinker it seems, especially with getting over this flu.
At this point I have my own compiled code splitting the boot image file, as well as counting the power button clicks.
I want to see if I can make a welcome/instruction screen, probably by getting CWM's minui down to its core essence. From there it will hopefully just be normal integration work to achieve a new Recovery for testing.
Everyone, a new boot menu is ready for testing. Please read through the first post to see if you'd like to try it out. Apologies once again for the delay in getting this ready.
Hal9k+1 said:
Everyone, a new boot menu is ready for testing. Please read through the first post to see if you'd like to try it out. Apologies once again for the delay in getting this ready.
Click to expand...
Click to collapse
Did I read correctly that the image support multibooting?
kulve said:
Did I read correctly that the image support multibooting?
Click to expand...
Click to collapse
Hi again Kulve. It supports three Android boot images - the main + two alternates: kernel.img, kernelA1.img, & kernelA2.img. It prefers to see the selected image in /sdcard, but will shift to /system as needed.
So, it is multi-booting, but you should keep in mind that there is still only the single /system partition. So installing two normal ROMs together probably won't work out, due to that common storage area. However, one of the ROMs could be based out of /system, while any others could use some form of external/networked storage. Note that the Android image format contains both the kernel and the initial ramdisk, so I feel that a multi-boot arrangement could be done.
Hal9k+1 said:
Hi again Kulve. It supports three Android boot images - the main + two alternates: kernel.img, kernelA1.img, & kernelA2.img. It prefers to see the selected image in /sdcard, but will shift to /system as needed.
So, it is multi-booting, but you should keep in mind that there is still only the single /system partition. So installing two normal ROMs together probably won't work out, due to that common storage area. However, one of the ROMs could be based out of /system, while any others could use some form of external/networked storage. Note that the Android image format contains both the kernel and the initial ramdisk, so I feel that a multi-boot arrangement could be done.
Click to expand...
Click to collapse
My kernel is hard coded to mount the Debian (or whatever) rootfs from /dev/sdaX so Ouya's internal partitioning doesn't matter. It would be really cool to be able to put kernelA1.im to /sdcard, an USB flash drive to the USB port and boot to Debian without tinkering with adb/fastboot/etc. on a PC.
I'm not currently using any initrd-images but adding something simple should be straightforward.

Categories

Resources