Using an Arm-V8a Emulator / QEMU to boot full device firmware - General Questions and Answers

I've come to ask if anyone could give me some more insight on using PC application to emulate the Arm 64-Bit Arch in a way that would allow it to boot a full android firmware package? Namely a Samsung Device, it would entail the pieces of an ODIN firmware package or a normal system dump from the device.
Now I've seen this done. But that usually involves building AOSP from source or using a factory nexus image. I understand I could achieve my goal if I wanted to use a stock AOSP rom, but it should still be achievable using one of Samsung's roms right? Especially since a lot of their devices include init files for goldfish.
But I'd really like to ask for some pointers from some people knowledgeable in the commands of the emulators.

Related

[Q] ROMs vs Kernel Compile and Upgrade

Hello.
I am wondering about the distinct difference between updating Android devices (I have a Samsung Captivate) vs how it is done in linux. It has been a couple of years since my lat linux box, but the process was distinctly different. Specifically, we could get the source to the kernels and all of the modules that we wanted and compile them for added capabilities. Moreover, the file system (data, apps, etc) were all separated from the /boot partition. If a kernel didn't work, it was no problem to boot into the older kernal and try and fix the new one. Never did we have to destroy all of our data to try new kernels, modules, etc.
Why is this so different for Android? Specifically, why do we have to reflash the whole ROM destroying everything else in the process? Is there another way to do this that I am missing or what is the difference that causes this to be necessary?
Thanks so much for the feedback...
would also like to know this one..
Ok, following up on the original inquiry...
Samsung has dropped the 2.2 source for the Galaxy S. Should this source be configurable for any of the Galaxies (i.e. Captivate?) or do we need to wait for specific Captivate source? Also, can the kernel be recompiled and replaced by itself or does the whole ROM need to be flashed? I'm still confised to why this process seems so much more limited than the typical linux cycle...
If i flash a Bad Kernel and my Phone dont boot. ( HTC Desire)
I can flash the old Kernel and it will boot again No need for ROM reflash....

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

[Q] Creating Custom ROM

Hello, I'm new to all this Android stuff (I don't even have a phone yet, but its on it way)
I have been reading up on custom ROM creation but there are some things I don't quite understand.
Let's say I have a phone in Android 2.3. I want to create an Android 4.0 ROM to put on the phone.
Now... to compile Android 4.0 I need the drivers for my phone (which I doubt I will ever have access too since its only a cheap Android with a MediaTek CPU)
So I have a 2.3 ROM that contains all the compiled drivers and the Android 4.0 source code.
Is it possible to compile 4.0 and replace the zImage (if I'm correct) with the 2.3 zImage. From what I have read, that's where all the drivers are stored.
I guess its not that simple since I also think the zImage contains the OS. If so, is it then possible to extract the zImage and replace the invalid driver files in 4.0 with the correct drivers from 2.3?
Also, I think my phone will arrive with an annoying UI, is it possible to just get any 2.3 ROM (that doesn't have an annoying UI and shares the same CPU as my phone) and replace the zImage in that with my phones 2.3 zImage?
Sorry, if my questions are stupid but this is all new to me. I've tryed to read up on this but nothing is straight to the point.
Thanks
Anyone there?
try out some roms first. see what you like and dont like. it'll probably give you a better idea for how you would make your own rom.
I don't think you could just port an entire zimage to ICs and say it will work (it might not even compile i think). It won't work. You could probably take some drivers' code (screen, speaker, etc), modify them a bit so it compiles, and test to so if it works. You more than likely have to modify the ICS code also so it works. And the zimage is just the kernel no? And the kernel really only has to do with low level system processes, drivers, etc. I think UI's and such are more fitted in frameworks and such.
Personally if it was so easy to port ICS by simply replacing the zimage or file with another, ICS would have been ported to many devices, fully working, by now.
Kailkti said:
I don't think you could just port an entire zimage to ICs and say it will work (it might not even compile i think). It won't work. You could probably take some drivers' code (screen, speaker, etc), modify them a bit so it compiles, and test to so if it works. You more than likely have to modify the ICS code also so it works. And the zimage is just the kernel no? And the kernel really only has to do with low level system processes, drivers, etc. I think UI's and such are more fitted in frameworks and such.
Personally if it was so easy to port ICS by simply replacing the zimage or file with another, ICS would have been ported to many devices, fully working, by now.
Click to expand...
Click to collapse
Yeh, but my problem is I don't have the drivers for the phone. I just have the stock ROM that come with it.
Is not that simple. I am 99% sure that you can't do that.
The phone I'm getting has a horrible theme on it. Its running Android 2.3
I have the ROM for a very similar phone (also using Android 2.3), uses the exact same CPU so it should be compiled using the correct platform.
Is it possible to use that phones ROM but replace it with my phones Kernel and .prop (so it has all my phones drivers and settings etc...)?
the hard work required in making a custom rom
I think you can take from the stock rom and compared with existing custom rom
but some sources are not shared freely as an example Tegra
CMIIW
I will mess about with the ROM when I get my phone. Hopefully I wont brick it...
I too am fairly new to android. I spent a couple weeks reading and watching TONS of youtube videos on how to ROOT and Unlock my bootloader. My best advice from one n00b to another would be to do the same. In particular...research how to do it on YOUR phone. Also, Roms are device specific. I recommend you finding the forum here on XDA for your phone and read up on whatever ROMS are available here. This might not be the ONLY place to find ROMS, but this place simply rocks! Once you get your device rooted and if necessary, your bootloader unlocked...you can easily try out any ROM without much fear. Just make a good backup...make sure you also have a factory recovery image too...just in case. For backups...if you install and use Clockwork Mod (CWM) you can use the nandroid backup it offers. I bought Titanium backup from the market and used it to do a full backup before I started...it backs up to dropbox even, which was a nice feature for me. Extra safety so incase I hosed my external SD card which had my backups...I could easily retrieve a backup ANY place that had internet access. Lastly...get ready to have some FUN! Flashing ROMs is VERY addictive!! :-D
Ok, Thanks. I will see what I can do then.

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.

Is sources from the vendor required?

If the vendor (in this case Vodafone) don't provide sources, does it mean I'm unable to create a ROM for it?
Put it another way, is it possible to create a ROM using only a running device?
The Original Leppa said:
If the vendor (in this case Vodafone) don't provide sources, does it mean I'm unable to create a ROM for it?
Put it another way, is it possible to create a ROM using only a running device?
Click to expand...
Click to collapse
Yes, if you want to build a "true" custom ROM you will need the stock source code for your device.
If you can root, you can use adb or Terminal Emulator to do a "ROM dump", or dump just a copy of your system.img, then modify that system.img and then use adb to push the modified system.img to your device. It will be considered a modified stock ROM, it won't be a "custom" ROM but you can modify it quite heavily with things like Xposed, Gravity Box, and a few other good mods and themes.
Or you can get a copy of your stock firmware(not the same as source code), then find other devices with the exact same hardware that have a better version of Android than yours, then use your stock firmware to port the better version to work on your device.
Building a true custom ROM is "possible" without stock source code but it would require VERY extensive programming and developer knowledge to do it because you'd have to do every bit of it from scratch with no resources to work with.
Sent from my SM-S903VL using Tapatalk
So, I'm screwed, in terms of porting?
The Original Leppa said:
So, I'm screwed, in terms of porting?
Click to expand...
Click to collapse
It would help if you had stock firmware for your model then you can find another device with the same hardware architecture(chipset), if they are similar enough you can port it.
It's possible to port between devices that aren't exactly the same chipset but that also requires extensive developer knowledge.
If you aren't experienced then you're pretty much out of luck.
If you want to customize android devices then you need to get less obscure devices. Next time, research the device first to see if there is a known rooting method for it and whether there is custom development available for it before you get it. Or if you get a device that just came out, get a device that you are certain that developers will support, typically a flagship/popular device.
The cheap low-mid range devices usually don't get support from developers and the ones that do get support are not supported by real develoers, they are supported by members that took it on themselves to learn how to build android just so they can update their device but their work usually isn't exactly right due to their lack of experience.
Sent from my SM-S903VL using Tapatalk

Categories

Resources