Rooted JFv1.3, Engineering Bootloader.... now what? - G1 Android Development

I have been following the Threads since I got my G1 for about 3 weeks now. Two days after receiving it I got the OTA update from T-Mobile before I knew it I was on RC30. After DREAMIMG.nbh and very careful reading I was able to downgrade to RC29, Root - Telnetd, and install RC30 Mod JFv1.2 then JFv1.3. Finally I installed Bootloader and got the skateboarding androids.
After a couple days of reading, I took the plunge. Let me be the first to say that as a Windows XP user, alot of this information is very confusing as I am used to a Dos type system, and all of these commands made it seem a bit more confusing than it really is.
Now that I have root and bootloader I would like to start to change the boot screen and try my hand at some Linux based stuff?
Being that I use Windows XP, it is my understanding that I can run Linux using Slax? I am very computer literate, but haven't tried my hand at programming since the days of Dos and Paschal. Are their any online tutorials that somone would recommend as a starter or is the Android Software so different that it may be better to start from scratch?
Willing to learn any pointers would be appreciated.

I may be misunderstanding you but if your looking to make any modifications to the operating system itself (which is definitely needed), I would suggest having a look at the Android source code at http://android.git.kernel.org. The back-end of the platform (kernel, etc) is all written in C. The userland stuff is written in Google's implementation of Java called Dalvik. Now that you have the dev bootloader, all you really have to do is clone the official android repository, make your changes, build and flash to the device using fastboot.

Thanx Datruesurfer
After all the reading it seemed alot of work was being done in Linux but I don't know anything about that so, I could be completely off base.
At your suggestion I looked at android.git.kernal and it seems they do a good job at explaining some things, but it still makes many references to Linux and Unix.
Would programming of Git be done in linux. I see that Git is gotten using .tar files which is Linux compressed files? So is it best to try to do programming using slax or ubuntu?
Also, are things like the boot screen modified using Linux based .png or can that be done in Windows?
Let me say sorry in advanced, as I am doing this for the first time, please say stop if I am being too n00bish.

Also...I noticed ....
that the commands given in the Git User's Manual look very familiar like the commands that were given while I was reverting my RC30 back to RC29 using the Pterminal/Telnet. Can this programming with Git be done off of the G1 Phone itself?

You're in over your head dude. If you haven't programmed in these object oriented based programming methods and you know nothing of linux, then recompiling the android source like the above poster suggested is too much.
I don't mean to dissapoint or negatively comment, but really save yourself the trouble.
If you really want to though, figure out the basics of C and java programming and start reading the source.

Brutal-Force said:
After all the reading it seemed alot of work was being done in Linux but I don't know anything about that so, I could be completely off base.
At your suggestion I looked at android.git.kernal and it seems they do a good job at explaining some things, but it still makes many references to Linux and Unix.
Would programming of Git be done in linux. I see that Git is gotten using .tar files which is Linux compressed files? So is it best to try to do programming using slax or ubuntu?
Also, are things like the boot screen modified using Linux based .png or can that be done in Windows?
Let me say sorry in advanced, as I am doing this for the first time, please say stop if I am being too n00bish.
Click to expand...
Click to collapse
A Few things...
1. Android and Git are two completely different products. Git is the revision control system used by Android. Whenever one of the developers at Google makes a change to the source code they will upload it to the repository. Then people can go revision by revision to see where modifications have been made and suggest their own if they wish.
2. The part where a Linux box would be handy is actually downloading all of the files in the repository and compiling your own build. As dirr said, you probably should hold off on this until you have a better understanding of the platform itself.
3 As far as the boot image goes, the bootloader will only accept files that have been formatted specifically for it. Once you have the image formatted, you can flash it in the SPL via fastboot (the screen with the skating androids) I believe this can all be done via windows now.
4. I think I better understand where your coming from as far as modification. You should look at http://code.google.com/android to learn about how to code in Dalvik, as that will help you out much more then learning C. Once you have a good understanding of that, you can try to build from source
Hope that helps...

Thanx for the advice.
After reading about the above suggestions, it does seem that to do something simple would only be simple for someone who has all the background programming information of different platforms. This is probably why most tutorials/procedures are written so vaguely here. I appreciate the input and I will hold off and just read up on things other "more experienced" people write about here. I have a basic understanding of what is happening, but the "language" is so complex. Maybe in baby steps I will learn, since it appears that on this forum "Android" is fairly new. And while I am watching what is happening here, I will get java for dummies or bone up on Dalvik and start reading and practicing. Thanx for the help guys, and thans JF, Koush and all the other senior members for the RC30 Mod. At least I have the skateboarding Androis

Related

Sapphire ROM HowTo - request for info

I'm Linux & BSD literate, and used to administering servers, compiling programs and kernels from source. I've also managed to root and flash my Magic, following advice found here. What I'd like to do is gather up some info on how to build ROMs for the Sapphire platform.
I'm already poking around the Android Wiki FAQ and the Dream dev forum on this site. There's quite a bit of info there but some of it is out of date and I've not found much that's Sapphire-specific. I also plan to take apart the .zip files released by Haykuro and others and compare/diff configs to get a feel for things.
My intent is to put together enough info to allow anyone to pull apart a released ROM and replace the dialler, add some language support or some extra apps, maybe make some other simple changes.
What I need is any pointers on:
1. Sapphire-specific info.
2. Any danger of bricking my Magic by messing around with home-made ROMs.
3. Anything else that might be useful.
Hopefully I'll be able to put together a rudimentary HowTo for the wiki, which others can add some fine-tuning and extra info to.
Thanks for any input.
I think this is a very good idea!
It would simplify things if everybody would understand how exactly custom ROMs are created.
1 - Be aware that there are different Magic HW versions...
2 - I don't think you can brick your magic as long as you make backups via nandroid.
3 - A few things I think should be in the wiki :
- how to completely setup a linux environment and which applications you need to be able to build custom ROMs.
- Explain how the android OS is working, explain what boot, hboot, recovery, system is, how the partitions work, etc..
- What are test-keys, what is the difference with and release-keys.
- How to sign.
- How to dump the recovery.img, boot.img without having root access.
- What to change into the recovery.img and boot.img to get root.
- How create an update.zip
- How to make backups with nandroid and how to restore them..
Agreed think this would be a fantastic idea, unfortunately it seems like the people in the know are not willing to share any of their knowledge =o(
Do keep us up to date as to what you find by dissecting the ROMs, had a look the other day briefly but didn't have time to play yet,
Also waiting for info/confirmation that as long as you just flash bad roms its not possible to brick your phone only if you play with SPL's and such
fxn said:
Agreed think this would be a fantastic idea, unfortunately it seems like the people in the know are not willing to share any of their knowledge =o(
Click to expand...
Click to collapse
Oh, I'm sure the knowledge is scattered around the place - sharing is one thing, bothering to document is quite another!
The only thing I don't expect to find openly shared is traceable leaked material, and frankly I can live without that.

Native Linux

I know the linux and android kernel are different, but not much if you can already chroot into ubuntu. My question is, how do I make/compile a kernel that can boot with Ubuntu NATIVELY? Not chroot, but flash to the internel memory (maybe have to cut some bloatware out for it to fit). Or could I even just use a kernel from android?
I have wondered the same thing! I would love to turn my old Evo into a dedicated BT5 device! No need for Android OS as it just slows down BT5. I am interested in looking into that but and not sure exactly atm.
I get the impression this would be a 10x greater effort than a build of Cyanogenmod.
How so? To my understanding, TECHNICALLY we could have cyanogenmod 6, correct? Since we have froyo source...but thats not the point. With a stripped down linux distro (768mb if we could merge data and system partitions together), and a kernel built for the phone (linux kernel, not android) it should be COMPLETELY possible. My question atm is, how could I compile a kernel compatible with linux (or will the android one work)?
You mean something like this?
http://forum.xda-developers.com/showthread.php?t=892877
No, thats the chroot+vnc method. Basically that runs android in a vm, which is not what I am talking about. I mean installing linux to the internal memory, completely removing android. That way linux could use all 512mb of ram, the only downside is losing android.
ugothakd said:
No, thats the chroot+vnc method. Basically that runs android in a vm, which is not what I am talking about. I mean installing linux to the internal memory, completely removing android. That way linux could use all 512mb of ram, the only downside is losing android.
Click to expand...
Click to collapse
I think that would run a heavy risk of bricking the device since you'd have to overwrite the entire memory.
Maybe, but if you just flashed the root file system to the system (256mb), you would still have the bootloader recovery etc. partitions. Or I'm not exactly sure, maybe delete the data and system partitions and create a new 768mb partition. The only problem is I cant find anything to handle the partitions, fastboot is the closest, and fastboot doesn't work/isnt supported.
You're delving into an area that already has been delved in before. Considering the fact nobody has gotten this working ever, I would go so far as to say you're wasting your time. By all mean have at it, but keep in mind you will need a linux kernel modified in such a way that it will completely support this hardware or it would be useless. Good luck to you!
Sent from my SPH-D700 using XDA Premium App
http://blogs.sonyericsson.com/wp/2011/05/06/how-to-build-a-linux-kernel/
^^^That is the type of kernel suitable for a distro like Ubuntu, correct? Building a kernel with the samsung sources using that guide, should give me a kernel that can be used with linux, correct? I don't see why it is so hard... If you can port linux to a device such as the hd2 whats so different about running it on the epic? Linux and android are very close... the only problem I'm having is finding a way to get a .img to the device.
thomasskull666 said:
You're delving into an area that already has been delved in before. Considering the fact nobody has gotten this working ever, I would go so far as to say you're wasting your time. By all mean have at it, but keep in mind you will need a linux kernel modified in such a way that it will completely support this hardware or it would be useless. Good luck to you!
Sent from my SPH-D700 using XDA Premium App
Click to expand...
Click to collapse
not to mention a few of the drivers are closed source and aren't likely to be compatible with any other kernel version be it one of samsung's kernels or one from linux.....that isn't to say it is impossible but definitely a hurdle
ugothakd said:
http://blogs.sonyericsson.com/wp/2011/05/06/how-to-build-a-linux-kernel/
^^^That is the type of kernel suitable for a distro like Ubuntu, correct? Building a kernel with the samsung sources using that guide, should give me a kernel that can be used with linux, correct? I don't see why it is so hard... If you can port linux to a device such as the hd2 whats so different about running it on the epic? Linux and android are very close... the only problem I'm having is finding a way to get a .img to the device.
Click to expand...
Click to collapse
the first line of that article..."Since the launch of the unlock boot loader site, we have received a lot of really great feedback."
we do not have a modified boot loader and our bootloader is a 2 stage process...i believe the first one is efuse protected...which unless exploited cannot be modified...i'm not sure what kind of checking is done to the secondary bootloader..but one mistake with either of these files you have yourself an expensive paperweight that odin will not fix (no download mode)
edit: i see that site goes on to talk about rebuilding the kernel but still important to remember that stuff about our bootloaders
So even if the kernel worked, the drivers were perfect (which wouldn't be, I know that) and I somehow got an image to the phone it wouldn't boot because of the bootloader?
http://forum.xda-developers.com/showthread.php?t=933667
It can be done but it's not an easy task. This guy has Ubuntu natively booting on the Galaxy Tab.
He's been working on it for a long time and I still don't think it's anywhere close to fully functional, it probably never will be.
Ubuntu + Mobile Phones just weren't meant to be. However.. as this shows... if you devote enough hours to something, anything is "sorta" possible.
There's a thread in the fascinate forum that's relevant to this, about building jigs.
The issue is, as you mentioned, the bootloader. Apparently, it is much like the BIOS on a PC, where you have the option to boot up from different sources. However, our bootloader has those options removed (it actually might have been disabled by hardware, but I can't remember), and only includes normal bootup, recovery kernel, and the kernel/partition that handles download mode.
Obviously you know all this. The developer there is working on a solution, and it could end up being either a software or hardware hack. I suggest you search for the thread (I would if I wasn't on my app).
However, this is relevant because his goal is different than yours, but will most likely be your solution. Rather than modifying the bootloader to handle a larger partition or a linux kernel, it would be easier to get the bootloader to do something it was intended to do back at the factory: boot from USB. There are unused pin configurations that were meant for this, and if enabled could allow a lot of possibilities. Booting ubuntu would be just the tip of the iceberg.
The developer actually has gotten as far as getting a boot log from the very first, barebone bootloader (whatever the acronym is), and shows it searching for usb host or whatever. I'm gonna see if I can dig up the link.
EDIT: er, maybe not fascinate forum, I'm having trouble finding it
Sent from my SPH-D700 using XDA Premium App
Try searching for the SGS Ubuntu attempts. I know that someonne in #ubuntu-arm has gotten it to a usable state on his SGS. However, be prepared to lose functionality.
Question is why. There won't be an accelerated X server, and if you are looking to target a embedded linux surely there are better systems out there. You'll also have to deal with the keymappings afaik because that's apparently dealt through system_server via keymaps, and not the kernel.
-- Starfox
Starfox said:
Question is why.
-- Starfox
Click to expand...
Click to collapse
Hacker Mantra: Cause you can
Why climb Mt. Everest? Cause you can.
Why put linux on every device out there? Cause you can.
tyl3rdurden said:
Hacker Mantra: Cause you can
Why climb Mt. Everest? Cause you can.
Why put linux on every device out there? Cause you can.
Click to expand...
Click to collapse
True that, it is pretty damn adaptable that's for sure.
Sent from my SPH-D700 using XDA Premium App
haha found it!
relevant http://forum.xda-developers.com/showthread.php?t=1065318
I own a tegra 2 device that can boot BT natively, I know it's nowhere close to our chipset but perhaps it could lead somebody with the right skillset down this road for the Epic; http://forum.xda-developers.com/showthread.php?t=1075054

How to Port a ROM to Milestone2

As lately some people are asking me about ROM porting I decided to create this new thread where we can share knowledge about this hard task.
Please note this is a Dev talk thread, so DON'T ASK about fixing a particular ROM problem here. Also don't ask questions like "My phone is bricked! please help!". This IS NOT the appropriate place for it. There are plenty of other threads to help you out.
Also note that this is not a step by step guide (and not a guide at all), it's just a point where you can start from. Android is a very complex system and there are many things I don't know yet. So, research and hard work is what you need to learn it deeply. My first tip is Google really works. Don't be afraid to search
Ok, to the basics. Porting a ROM is no simple task. It requires advanced understanding of how android works and how it is organized. Previous Linux/Unix knowledge helps A LOT. As android is based on this O.S. there are many similarities between both. In fact many ppl consider android to be a kind of linux distro.
The very first task to port a ROM is finding a device which is compatible with your own. For example Defy/Milestone2. Then you are going to choose a ROM to port to your device.
As our devices (Milestone2) have a locked bootloader we now need to find a system image that have a compatible kernel with the ROM we are trying to port. This is mainly based on trial and test and takes a long time. You'll be ending flashing your phone several times with RSD Lite. You should learn how to use MotoAndroidDepacker and how to create a fixed SBF.
The basic procedure to try that:
1. Open original ROM update.zip and remove any files/commands that flashes boot/devtree/recovery/anything.
2. Install this new file on your phone via CW Recovery.
3. Boot into bootmenu and enable ADB so you can read logcat while phone boots.
4. Choose Boot/Normal. If your ROM uses 2nd-init you will need to place/edit/adapt bootscripts into bootmenu 2nd-init folder.
5. Check logcat for errors:
- If you're getting HAL errors you're going to need a new kernel;
- If you can start android without getting HAL errors but still getting errors and bootloop on android animation you should try to replace libs with appropriate original ones.
6. Once you are able to boot android you should test it's features to see what needs to be fixed.
This is what I have to say for now. The thread is now open for discussion.
At this week, motorola has just pushed the GB official update for Droid 2 and Droid 2 Global....
Can i try to port this new rom to milestone 2 and after a success boot, fix the radio..??
I was asking that, because some people has success on port CM7 to milestone 1, when it originally maked for droid 1...
tks a lot..!!
jorgebaruchi said:
At this week, motorola has just pushed the GB official update for Droid 2 and Droid 2 Global....
Can i try to port this new rom to milestone 2 and after a success boot, fix the radio..??
I was asking that, because some people has success on port CM7 to milestone 1, when it originally maked for droid 1...
tks a lot..!!
Click to expand...
Click to collapse
It may be possible, but you'll have a hard time fixing the baseband.
You may have to mod the init.rc scripts and find the right radio binaries (rild is one of them) and drivers.
Ask those ms1 people for help, if they are still with the same phone...
Sent from my Milestone 2 XDA App
I don't know if this will be relevant or not.
I wanted to know if to do any of this, having a Linux distro as OS a must or can I try my hands at it on a windows based machine. I mean I'm sure that a Linux distro will give certain advantages (as Android is based on UNIX/Linux) but can we get things to work a 100% on windows.
If yes, then will someone be kind enough to get give the list of all softwares etc. which will be required to do the job on Windows machine as well as a Linux machine.
I do know a few softwares but I'm not sure if I have an exhaustive list. I would like to learn and try and at least be able to modify in bits n pieces to begin with.
I apologize if this wasn't supposed to be asked in this thread.
The only thing i can get from SBF is a bunch of smg files.
But the only ones i can open are
preinstall.smg
CG39.smg
Is there a way to open/see the rest?
2)
Im trying to modify the CM7 rom, what boot does it use? 2nd-init or 2nd-boot?
i guess it is second-init. but not sure
thanks a lot for this !!!
WeeDv2 said:
The only thing i can get from SBF is a bunch of smg files.
But the only ones i can open are
preinstall.smg
CG39.smg
Is there a way to open/see the rest?
2)
Im trying to modify the CM7 rom, what boot does it use? 2nd-init or 2nd-boot?
Click to expand...
Click to collapse
SMG files are disk images of certain partitions of your flash memory.
You can only open CG39.smg and preinstall (CG66.smg) because they are the only images in ext3 format. The rest of images may be on ramdisk format or some proprietary format. For more details on partition codes take a look here:
http://and-developers.com/partitions:cdt
You may be able to open and see contents of other partitions but the only one that matters aside from system and preinstall is the boot partition (CG35.smg), which contains the init scripts we should mod in order to make they work with 2nd-init. Boot partition is in ramdrive format. More details here:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
http://elinux.org/Android_on_OMAP
It is easier to unpack boot image using Dsixda's Kitchen here:
http://forum.xda-developers.com/showthread.php?t=633246
Edit: To see what boot your CM7 uses just go inside /system/bootmenu/config and look for a file called default_bootmode.conf. That should be the boot method used. It's normally 2nd-init.
sahilarora911 said:
I don't know if this will be relevant or not.
I wanted to know if to do any of this, having a Linux distro as OS a must or can I try my hands at it on a windows based machine. I mean I'm sure that a Linux distro will give certain advantages (as Android is based on UNIX/Linux) but can we get things to work a 100% on windows.
If yes, then will someone be kind enough to get give the list of all softwares etc. which will be required to do the job on Windows machine as well as a Linux machine.
I do know a few softwares but I'm not sure if I have an exhaustive list. I would like to learn and try and at least be able to modify in bits n pieces to begin with.
I apologize if this wasn't supposed to be asked in this thread.
Click to expand...
Click to collapse
Don't worry, this is the right place
As for your question: yes you can work in windows if you like, but using at least a Linux VM is more productive. I don't have a full list of applications to give you, as different mods may require different tools, but I advice you to have at least:
- Notepad++ (essential for editing text files and keeping linux end-line format);
- dsixda's Android Kitchen (http://forum.xda-developers.com/showthread.php?t=633246)
- 7zip (or some other compress tool you like)
- Moded putty for ADB as working with windows command prompt really suck (http://forum.xda-developers.com/showthread.php?t=803225)
- Oracle Virtual Box (if you are going to use linux VM).
r2beta0 said:
SMG files are disk images of certain partitions of your flash memory.
You can only open CG39.smg and preinstall (CG66.smg) because they are the only images in ext3 format. The rest of images may be on ramdisk format or some proprietary format. For more details on partition codes take a look here:
http://and-developers.com/partitions:cdt
You may be able to open and see contents of other partitions but the only one that matters aside from system and preinstall is the boot partition (CG35.smg), which contains the init scripts we should mod in order to make they work with 2nd-init. Boot partition is in ramdrive format. More details here:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
http://elinux.org/Android_on_OMAP
It is easier to unpack boot image using Dsixda's Kitchen here:
http://forum.xda-developers.com/showthread.php?t=633246
Edit: To see what boot your CM7 uses just go inside /system/bootmenu/config and look for a file called default_bootmode.conf. That should be the boot method used. It's normally 2nd-init.
Click to expand...
Click to collapse
Thanks again r2beta
thanks r2beta0
- Notepad++ -- got it
- dsixda's Android Kitchen -- downloaded (need some link for a how-to on its usage)
- 7zip -- got it
- Moded putty for ADB -- got it
- Oracle Virtual Box -- can't install Linux on my system as this is a work machine
dunno if I can do without the last option.
sahilarora911 said:
thanks r2beta0
- Notepad++ -- got it
- dsixda's Android Kitchen -- downloaded (need some link for a how-to on its usage)
- 7zip -- got it
- Moded putty for ADB -- got it
- Oracle Virtual Box -- can't install Linux on my system as this is a work machine
dunno if I can do without the last option.
Click to expand...
Click to collapse
Oracle Virtual Box is an application that lets you run an operational system on a virtual machine, in other words, it doesn't install linux on your real computer. It's a very useful tool that I use everyday. Google for it and learn a bit, you won't be disappointed. About kitchen: the link I provided was download + guide. Read it again. If necessary read the full thread.
r2beta0 said:
Oracle Virtual Box is an application that lets you run an operational system on a virtual machine, in other words, it doesn't install linux on your real computer. It's a very useful tool that I use everyday. Google for it and learn a bit, you won't be disappointed. About kitchen: the link I provided was download + guide. Read it again. If necessary read the full thread.
Click to expand...
Click to collapse
I know a bit about virtual box but as I said I'm not allowed to have softwares not approved by the IT team to be present on the system. Though I can get away with small things like notepad++ and 7-zip, having virtual box on my system may raise some eye brows.
I'm trying to arrange an alternative system.
Me neither. I must do almost everything at home, and at this very moment I simply don't have any free time. I'm afraid you're not going to see me here very often anymore (maybe in a few months? a year? well, it might be a bit too late for milestone2...)
hi. Have a question, I want to remove baseband from a flashable zip (lets say, CM7 from Tezet) , is it posible? I dont know where to look for it (baseband). Thanks!!
Baseband is located in \system\etc\motorola\bp_nvm_default\
But don't remove it, just replace it with files from ROM, which have baseband you want.
---UFO--- said:
Baseband is located in \system\etc\motorola\bp_nvm_default\
But don't remove it, just replace it with files from ROM, which have baseband you want.
Click to expand...
Click to collapse
Ok thanks for the info.
Sent from my A953 using XDA
Hi All,
Just a quick question. I have ported Paranoid Android 2.10 to MS2 but the problem I am facing is that Reboot goes through Bootmenu and I have to choose reboot from Bootmenu again.
Any inputs?
Thanks in advance
Megalith27 said:
Hi All,
Just a quick question. I have ported Paranoid Android 2.10 to MS2 but the problem I am facing is that Reboot goes through Bootmenu and I have to choose reboot from Bootmenu again.
Any inputs?
Thanks in advance
Click to expand...
Click to collapse
I meant to get to it last night, but I was tired after work and fell asleep watch tv. Eventually, later tonight, I'll be uploading PA for MS2. Check my Defy PA thread in 12-14 hours cause I'm about to go to work and I'm not gonna feel like making a MS2 PA thread or updating my Bravo PA thread -- but the Defy Thread is always up to date when I put out new roms.
Also, I'm looking to get either a Defy or MS2 -- I've heard that there's 3G issues with AT&T users (which I am) with the MS2 -- Apparently the MS2 has different 3G frequencies than AT&T. Are there any AT&T MS2 users who are knowledgeable about that? While I can deal with no 3G, edge only, calls only -- I need to make sure I can at least do that before I commit to something.
I'd rather have the MS2 because I want a hw keyboard and I don't have the $300+ to try and get a Photon Q LTE from eBay (and I don't have to change up my repos if I get a MS2). If anyone here knows of a phone that's AT&T compatible, Defy code compatible, and has a keyboard, please let me know.
Thanks.
//Normally I'd post the latter half in the Q&A section, but ya'll don't have one so I'm just gonna piggyback
//My Bravo doesn't have a Q&A page either -- it needs one that's not my PM box...Don't PM me on how to root your phone and flash CM7 -- read one of the 5 guides on the first page of both General & Dev...:silly:
Ok devs need some help here.
I am trying to port a rom to our Milestone 2...but it bootloops on rom animation.
I tried to logcat it but I don't think it gets as far as adb server to detect the device.and just keeps saying "waiting for device"...so I end up with no logcat to diagnose the problem.
I can logcat my current working rom but only after the phone boots....am i missing something here? please, help
Any help is very much appretiated.
Thanks a lot in advance

Linux on TF300?

Hi Guys,
I am looking for linux working on TF300T, is there anyone who has anything working? I am planning to start with linux for TF300T, I want to know if anyone has tsarted, how do I collaborate and not reinvent the wheel. I have questions regarding what bootloader to use, lilo / grub / u-boot as Nvidia has a ubuntu distribution for its chip, which uses U-boot. Lot of questions can any dev please reply, so I can think of a place to start.
Thanks
Sent from my ASUS Transformer Pad TF300T using xda premium
So far I'm quite satisfied with my android linux device ( with some chroot debian thrown in for good measure).
I'm wondering about this as well. I've got some experience with linux (servers) but not a clue how the android boot structure works.
I have found this though: http://eeepadhacks.net/transformer-hacks/how-to-install-native-ubuntu-on-eeepad-transformer/
Not to spam, but does anybody have *NIX running on the TF300? I'm very interested since Android is based on the Linux kernel, so I would think that there is some form of *NIX running on this device, since I'm hoping that there is so I could actually use this as a "laptop" for my school work.
I am fairly sure that Android is Linux. However what people are missing is the GNU environment (and tools) that the majority of the Linux distributions have. You can see that Android/Linux is vastly different from GNU/Linux.
Thus, I think the question becomes something like "Is there anyone who has GNU/Linux working on the TF300T?"
There are two methods I know of to get GNU/Linux running on Android: Chroot and Dual boot.
* The chroot method runs the linux services and programs inside Android, but is available for basically most devices.
* The dual boot method works (mostly) with the original transformer (as Citruspers has mentioned)
I myself don't have a tablet yet, but I have been looking to get a TF300T (if I don't buy a TF700T - but that is for another discussion) on the basis I can dual boot Android with a GNU distribution.
Linux = kernel. Android runs a Linux kernel. Android IS Linux.
The two biggest differences between Android and "ordinary" Linux distributions are libc (called bionic in Android) and the lack of a real X server on Android (there is a Java version at https://code.google.com/p/android-xserver/ , but it's wayyyy too slow to get anything done (it's still awesome, though). It needs to be implemented in a lower level language).
/dev/void said:
Linux = kernel. Android runs a Linux kernel. Android IS Linux.
The two biggest differences between Android and "ordinary" Linux distributions are libc (called bionic in Android) and the lack of a real X server on Android (there is a Java version at https://code.google.com/p/android-xserver/ , but it's wayyyy too slow to get anything done (it's still awesome, though). It needs to be implemented in a lower level language).
Click to expand...
Click to collapse
Any chance Wayland will work any better with Android than X? I wouldn't mine tossing a *box or even WindowMaker on my tablet (assuming they play nicely with Wayland).
Edit: Yes, I realize that Wayland barely works with GNU/Linux as it is, and it probably won't be usable even on the desktop until I'm upgrading to a new tablet. I'm not expecting it anytime soon.
Extracted from http://androidroot.mobi/2012/06/17/ubuntu-on-the-transformer-prime-preview/ regarding Ubuntu on Prime 201...
It has been a while since the last post about ubuntu on the Transformer Prime. This post is going to explain a few of the new changes, and show a video preview of the system in action.
There have been a few changes since the last update:
3.1.10 Kernel -- Asus don’t update the kernel while remaining on the same android major release, so they won’t update the kernel until at least Jellybean, but we have worked really hard to bring us up to the latest kernel. This has given us the ability to use the latest Tegra ULP GeForce binary from nvidia and maintain acceleration with the latest releases.
Linux as a bootloader -- With some work to the process we have managed to get kexecboot working to give us a boot menu that will boot not only multiple kernels from eMMC, but also to allow booting from USB, SD, and MicroSD. At this point in time the guest kernel also requires two patches, one for speed (it is really slow to boot without this patch, 30sec-5minutes) and the second to copy ATAGS, this second patch is important so that the new initrd and command line get used.
Ubuntu 12.04 LTS -- The last image was 11.10 which is a little less stable. 12.04 has a new gpower applet which can read the battery levels. 12.04 also includes the mtrack driver allowing the trackpad to work. The biggest change with the new image is the use of armhf over armel.
LVM -- Turning mmcblk0p8 (/data under android) to an lvm volume group has allowed both android and ubuntu to coexist on the eMMC without needing nvflash for reformatting. This however does require a modification to the android initrd to reflect the change and for the lvm binary to be included so it can mount /data. Ubuntu natively supports booting from logical volumes.
Click to expand...
Click to collapse
I know, I know this is TF300 forum, but it seems the TF300 is more similar to the TF201 than the primitive TF101
EndlessDissent said:
Any chance Wayland will work any better with Android than X? I wouldn't mine tossing a *box or even WindowMaker on my tablet (assuming they play nicely with Wayland).
Edit: Yes, I realize that Wayland barely works with GNU/Linux as it is, and it probably won't be usable even on the desktop until I'm upgrading to a new tablet. I'm not expecting it anytime soon.
Click to expand...
Click to collapse
Good call. While we're on the desktop managers, how about KDE's entry in the mobile device space? Aren't they supposed to have a native linux tablet going to retail soon?
My chroot runs smooth but native would be fun! Hope someone get's this working.
I hope once the guys at androidroot.mobi release the installer package for Ubuntu for the Prime, it works on TF300.
I'm looking for the ubuntu on my tf300t too.
Its strange, I know Ubuntu showed off dual booting kernel for android devices like 6 months ago. You basically docked your phone and it became a full Linux desktop with unity. But haven't heard anything since, only a page on Ubuntu's site for hardware manufacturers.
http://www.ubuntu.com/devices/android
(Sorry to revive this old-ish thread, but I didn't think it was any better to start a new one and clutter up the forum)
It seems that no one gave an honest shot into loading linux NATIVELY (not via the "linux on android" project). The original poster mentioned being interested into giving it a shot -- so how things are going on your end aditya?
I am by no means an Android rom developer, hacker, or even linux hacker, but I started my first steps into it, I thought of getting things done by this method:
Instead of wiping the whole recovery partition like the guy on the TF100 did, i'd use a somewhat altered version of a recovery where I launch a recovery-like menu where the user can continue to the "real" recovery, or boot linux
(Basically, I got myself a version of the /sbin/recovery, which has its menus altered to only show "linux" or "recovery". Selecting recovery launches the real /sbin/recovery)
If the user choose to boot linux (which could be automatically selected after a timeout), that's where kexec steps in and boots the right kernel and linux pre-baked image files
I got all that covered (my pre-recovery menu is 90% working, custom kexec'd kernel w/kexec binaries packed into my recovery), but i forgot a small detail: There is no way I could load a full 1Gb Ubuntu image into memory, (in other words, what does happen to the old mount points managed by the first kernel when I load the second kernel via kexec? Gets broken, right?) So I came into realization I would need an initial ramdisk to mount my mmc so I could finally load/mount my main 1 Gb image file.
Honestly, for somebody not into hacking, I am under the impression this is getting out of hand. This could work, but I heard we could have nvflash fully working (read: re-paritioning coming our way, just like for the TF100 where there's linux natively on its own partition).
Is there anybody else trying to do such things like I do? I might also need a reality check on what i'm doing-- altough it seems the right way to me now
Linux and GNU
It's true, Linux is the OS kernel, but with the word Linux you can also mean the GNU/Linux environment with the kernel and all the applications running on top ("The gimp" or "Libre Office" for example).
Should be nice to have a GNU/Linux system running on a tablet device; I read that Canonical (Ubuntu) is working on a project for multi-core devices but I don't know about the development stage.
/dev/void said:
Linux = kernel. Android runs a Linux kernel. Android IS Linux.
The two biggest differences between Android and "ordinary" Linux distributions are libc (called bionic in Android) and the lack of a real X server on Android (there is a Java version at .... , but it's wayyyy too slow to get anything done (it's still awesome, though). It needs to be implemented in a lower level language).
Click to expand...
Click to collapse
Trying to make this work too.
I have a basic changeroot with gentoo and compiled a kernel and initrd. I wanted to try it out using fastboot (fastboot -i 0x0b05 -c real_root=/dev/sdb1 boot kernel-genkernel-arm-3.3.8-gentoo initramfs-genkernel-arm-3.3.8-gentoo) but it doesn't even try to load the kernel. I get an error 0x120000 on the screen of the TF300. I googled a bit and found out that the TF201 has the same problem, you have to flash a boot image.
How can I make a boot image using the gentoo files? I looked into abootimg but it seems it won't work. At least it won't split up the original images, so I fear it uses another format. Has anybody tried mkbootimg?
AEblefisk said:
I have a basic changeroot with gentoo and compiled a kernel and initrd. I wanted to try it out using fastboot (fastboot -i 0x0b05 -c real_root=/dev/sdb1 boot kernel-genkernel-arm-3.3.8-gentoo initramfs-genkernel-arm-3.3.8-gentoo) but it doesn't even try to load the kernel. I get an error 0x120000 on the screen of the TF300. I googled a bit and found out that the TF201 has the same problem, you have to flash a boot image.
Click to expand...
Click to collapse
I only know a part of the story here, but here's my findings so far. I never got "fastboot boot" to work on my TF300, always giving me that 0x120000 error. I am under the impression (I MAY BE WRONG) that "fastboot boot" requires a more devloper friendly device (think HTC G1, GNex, anything Google branded).
That being said, I am curious why you wrote "real_root=/dev/sdb1" as your kernel parameters
AEblefisk said:
How can I make a boot image using the gentoo files? I looked into abootimg but it seems it won't work. At least it won't split up the original images, so I fear it uses another format. Has anybody tried mkbootimg?
Click to expand...
Click to collapse
Personally I was able to look at how a recovery image was used and flashed onto a TF300. Without going into the details, I looked at how xplodwild's recovery was being made, and hacked around that recovery to use my own (basically trivial modifications from his).
To flash my image files, I am using "fastboot flash recovery" with my own recovery, which is basicaly a mkbootimg based image file like you said (you were on the right track), but wrapped around in a BLOB file format (using blobpack / blobunpack, see this xda thread).
So to answer your question, the only way I found so far to boot my custom kernels and init rootdisks is to flash it onto the device outright.
BTW: if you were to look at a pre-baked img file, (or, if you had no idea whats the file contents like), you could load the file into a hex editor (I use 'hexer' on ubuntu/debian, thats a command-line one). If you see "SIGNED-BY-BLOB", thats a blob file (a nvidia tegra and/or asus file format). If you see something else (usually starting with "ANDROID.."), thats usually something you can either mount or unpack using linux natively (most probably with "mount -o loop file /mnt/mountpoint")
EDIT: Slightly off topic, but still for AEblefisk: if you compile your own kernel, i suggest turning on activating the framebuffer tux logo option. More importantly, you could as well try and activate the framebuffer console too, however apparently "fbcon is broken on 2.6.39.4", so says Rayman. But at least, you'd get a hint that your own kernel is loaded and running if you see 4 tuxes on screen (one per core)
Thanks for pointing me in the right direction.
Now I managed to make a blob with the gentoo kernel and ramdisk. It flashes sort of OK with fastboot, sending in 2 seconds, but the write time is 0.016s and it seems nothing is written. I boot into Android when I reboot. (I'm flashing to boot, not recovery). Maybe I'm missing some offset or blocksize parameters?
bilange said:
...
That being said, I am curious why you wrote "real_root=/dev/sdb1" as your kernel parameters
...
EDIT: Slightly off topic, but still for AEblefisk: if you compile your own kernel, i suggest turning on activating the framebuffer tux logo option. More importantly, you could as well try and activate the framebuffer console too, however apparently "fbcon is broken on 2.6.39.4", so says Rayman. But at least, you'd get a hint that your own kernel is loaded and running if you see 4 tuxes on screen (one per core)
Click to expand...
Click to collapse
The real_root is for the gentoo initrd to find the real root filesystem on microSD. I have no idea if it will turn out to be mmcblk1p1, sdb1 or something completely different. I'll probably have to correct that once my initrd boots.
Yes I'm definitely trying to make the framebuffer logos work. Seeing that lineup of 4 tuxes is a goal in itself
I'm using 3.3.8 in gentoo so I hope fbcon is fixed.
AEblefisk said:
Now I managed to make a blob with the gentoo kernel and ramdisk. It flashes sort of OK with fastboot, sending in 2 seconds, but the write time is 0.016s and it seems nothing is written. I boot into Android when I reboot. (I'm flashing to boot, not recovery). Maybe I'm missing some offset or blocksize parameters?
Click to expand...
Click to collapse
I never touched boot so far to tinker around Linux booting, for the simple reason we never use the recovery partition except to flash/nandroid backup (which I rarely do), plus it gave me with Android booting if I dont press the volume button on startup. As far as development went, I think this was a win/win situation, although lilstevie (the guy who did make Ubuntu boot natively on his TF101/200) told me to "never touch recovery, flash boot instead", he was most probably talking about deploying our custom OSes to the world to use.
Now i'm kinda lost as to why the regular Android boot is being shown up. Having 0 experience with the boot partition (which i thought was similar to recovery), i can't really help you. Maybe you should get on freenode into the #asus-transformer and ask around (Don't let the numbers of nicknames scare you, this is a low activity channel, but the most knowledgables people are hanging in there. Just be sure to do your homework (aka Google etc) before asking, you should be fine )
As a sidenote, you should probably use some (most?) of the kernel parameters used in /proc/cmdline from a live Android OS. Most specifically the "tegraboot=sdmmc gpt gpt_sector=..." part. This makes sure your kernel reads the partition table at the right (unusual) location instead of reading where ever it was on a regular system (the first 512 bytes of the drive? don't quote me on this). I suppose this doesn't prevent the kernel from booting, but it will make the SSD partitions visible from your OS.
AEblefisk said:
The real_root is for the gentoo initrd to find the real root filesystem on microSD. I have no idea if it will turn out to be mmcblk1p1, sdb1 or something completely different. I'll probably have to correct that once my initrd boots.
Yes I'm definitely trying to make the framebuffer logos work. Seeing that lineup of 4 tuxes is a goal in itself
I'm using 3.3.8 in gentoo so I hope fbcon is fixed.
Click to expand...
Click to collapse
Would that be a 'vanilla' 3.3.8? I'm asking because, in case you don't know, I think you can't have much success using the regular kernel from kernel.org, and hope it will detect all the devices (specifically touch, sensors, wifi, gps(?), etc). It will maybe boot (your guess is as good as mine), but it will surely lack a few things here and there. That's why there are a ton of devices specific github kernel code base here and there: it's basically a 'stock' kernel source code, with the constructor's additions to make their various devices work, with community enhancements on top of all that. I may be wrong on the following (if there are any veterans reading this, feel free to call me a noob and point me to the right direction), but if you try to compile ASUS' kernel source code for the TF300, funnily enough everything compiles silently UNTIL it gets to the Tegra parts where it gets noisy with over 9000 warnings all along (but it compiles). That led me to believe that 1) NVidia or ASUS are lousy coders and 2) They added (most likely) OR modified a bunch of code to the stock kernel tree to make it 100% functioning on their devices.
All that wall of text only to say that I assume that the broken fbcon issue is most probably due to either ASUS/NVidia additions to the kernel code, or a bug from the 'stock' kernel code, and i'm assuming it was fixed in later versions (which lacks device's constructor modifications then again).
--
Offtopic: it seems ASUS has released the kernel source code for TF300 for their JB update! Compile all the things!! (And hope fbcon as been fixed so I can see something out of the screen)
I'll definitely do my homework now I'm worried I may have flashed some other place than boot, since Android is still booting, so now checking all corners of the tablet is on top of the agenda.
I know some things may not work with a vanilla kernel, but I was hoping enough would work for it to boot. Then I could worry about the rest afterwards. Maybe using the JB kernel source will be easier, but I don't know how much has been changed in android which is used in linux. I suspect Google has worked more on modifying linux for android use than ASUS has worked to make their hardware run in android. Another option is to work on what Nvidia has published.
Now I'm getting more experienced. I hope I get some real progress before I brick it
It turned out I wasn't writing anything to flash. It seems the first blob(un)packing tools mentioned in http://forum.xda-developers.com/showthread.php?t=1697227 aren't working (for me on my tab anyway). But when I tried the BlobTools2 with the blobpack -s option my resulting linux blob was written to flash (using fastboot -i 0x0b05 flash boot boot.img).
Unfortunately my gentoo linux kernel wasn't any good. I never got past the first Asus logo and on top of that CWM recovery couldn't restore Android. CWM went through the motions but nothing booted. I had to flash the stock blob, then I got my Android back.

Question attempt at learning how to compile TWRP for our device.

I am not an experienced dev, and only know enough to be dangerous. that said, i used twrpdtgen from https://github.com/twrpdtgen/twrpdtgen to generate what ought to be the berlna device tree with the necessary board files etc.
what do i have to do, specifically, to clone the twrp source via git/repo? can anybody here explain it like you realize i don't know what i am doing i'll figure git and repo out eventually, but this will go quicker if someone would enlighten me
which android version do i want to build twrp with? apparently 12.1 support isn't finished yet, so i should use 11 with aosp source?
note, for our deivce you need to use the script on upon boot.img as we've a/b format, grab from latest stock rom to gen yourself, or see attached. also, necessary to use WSL on windows with a linux distro, or a linux vm, python on windows will not work.
please feel free to use these if it furthers the cause of compiling twrp before i learn how to use git and repo and compile it.. hehe
I wanted to try my hand at this and start digging into git and repo. I got as far as getting all the files ready, setting up the tree where it needed to be, used ". build/envsetup.sh", then lunched with option 5, which is omni-berlna_eng, which is closest to the twrp minimal manifest build option.
After I lunch, the issue arrives with the fact that omni-berlna_eng uses a depreciated PRODUCT_STATIC_BOOT_CONTROL_HAL, whatever that means. So I tried using lunch option 2, which would be an aosp-arm64_eng, but that just gives me the error "#### failed to build some targets (1 seconds) ####".
As of now, I'm at a loss. I don't have the extra time to spend working on this to make it function, and I only get a few hours at a time to get a crack at it, but nothing seems to work.
Edit:
I should mention, this is my first attempt at anything android development. I got this phone as a secondary carry on and I've dirtyflashed Pixel Experience onto it using a method found for Moto G Power TONGA. Wanted to see if I could get TWRP running since dirty flashing killed my mms and calling services.

Categories

Resources