NTFS write - M.O.J.O. Android Development

Hi,
I added NTFS write support into the kernel and got it compiling easy enough.
I used fastboot to boot the kernel using the MOJO v2 boot ram:
Code:
./fastboot-linux -i 0x0738 boot zImage.gwald initramfs.cpio.gz
I checked the ABOUT MOJO in settings and it's my kernel version.
But when I try to write to NTFS it fails.
I'm assuming it's something in the boot ram or android?
If anyone knows, please let me know.
In the mean time, I see the MOJO kernel has fuse built in, and looks like the easier way
http://forum.xda-developers.com/showthread.php?t=1724078

Related

[Q] Ntfs-3g, rw, fstab and mount options and daemons

This is extremeley far away from howto implementing ntfs read write support in rooted archos gen9 devices.
Everybodey is welcomed to bring on ideas and modifications.
my linux know how is not too much.
Somebody interested to help implement ntfs-3g rw for rooted archos gen9?
First - is it possible?
a) It could be possible with ntfs-3g from tuxera, on their website they say its for android, too.
b) When kernel side ntfs (the read only one) is set - can one use ntfs-3g with fuse instead or does it conflict?
Dont know if ntfs in kernel is set as yes or module. Can somebody confirm something?
Second - Which files are to be transported in which directory and which are to be modificated?
What mechanism (auto)mounts blockdevices (also sticks, flash cards, etc ...)
Is it archos specific or something related to android?
Does somebody know which daemon does this job especially on g9 and what config files it has?
Is it /etc/fstab (only) ?
Downloaded the source code from ntfs-3g and have to look.
attached ntfs-3g latest stable release as source from Tuxeras Website.
had a look in running kernel modules with
adb shell lsmod
Fuse is loaded as kernel module and active.
Therefore, i assume, one could push an arm version of ntfs-3g and ntfsprogs in the directorys in a dirty way and edit some fstab entrys or other config files?
Apropos arm version. Is there somebody who was able to (cross)compile ntfs-3g for arm and attach neccessary files?
NTFS read fine on my kingston 16 GB flash.
Write on flash dont work. How fix dont know, but i'll try to search info =)
Yes, ntfs CAN be read, but we need Write-Support.
On linux no problem, and Android IS Linux. On Arm instead of x86 or a64
Everey x86-linux has Write Support.
Thanks.
gegabit said:
NTFS read fine on my kingston 16 GB flash.
Write on flash dont work. How fix dont know, but i'll try to search info =)
Click to expand...
Click to collapse
However, thank you for your report
Found It
Hi svennimann
I was going to take up this challenge and have a go at compiling it, however this post In the galaxy S2 forum has it covered.
You don't need the worry about the fuse.ko as the archos kernel already has it and It wouldn't have the right magic anyway.
I'll probably have a poke around with integrating it more into the kernel, get it to use ntfs-3g by default.
I'll post an update, if I find anything interesting out.
Wow!
Hadnt found it but who searches on galaxy thread for archos things?
And That should be on general android thread.
We are lucky now.
Okay.
Now it is possible that there are issues with mount points, scripts, and so on, and perhaps one had to change ntfs-3g permissions to 755.
for the case that something doesnt work, i think this could be do the trick if neccesary.
http://forum.xda-developers.com/showpost.php?p=15490573&postcount=49
Apropos what do you mean with right magic of the fuse module?
Yes maybe. I only did a quick root shell test to make sure it mounted and wrote. I'll play around more with it later when I get in.
With regards to magic:
.ko files are compiled against a specific version of the kernel. They contain a vermagicapp string which is checked against the installed kernel when insmod is run. If they don't match the Kernel module won't install.
That's how I understand it.
Sent from my HTC Sensation XE with Beats Audio using xda premium

once CONFIG_VT=y, the kernel will use initramfs(should be off)

I am not booting android, I am tring to boot a debian armhf (a linux distrubution) in mmcblk1p2(not chroot)
Without CONFIG_VT=y,I can't use X(I wonder how android work without tty)
Befote I set it to y,the rootfs will be mounted,and will not use initramfs(I have set nointrd and off initramfs supported in kernel,only give a empty initramfs to abootimg)
this file kern72588354.txt is the kern.log in /var/log ,whose kernel without CONFIG_VT
the other file is the /proc/last_kmsg ,whose kernel with CONFIG_VT
In fact,I use UUID to define the rootfs,it seems,mounted,but initramfs is also loaded,then it won't use the /sbin/init in rootfs,and it will use the init in initramfs(because initramfs is loaded first)
This post had better move to developer part,but i can post there
Shooteru
hizukiayaka said:
I am not booting android, I am tring to boot a debian in mmcbl1p2(not chroot)
Without CONFIG_VT=y,I can't use X(I wonder how android work without tty)
Befote I set it to y,the rootfs will be mounted,and will not use initramfs(I have set nointrd and off initramfs supported in kernel,only give a empty initramfs to abootimg)
this file kern72588354.txt is the kern.log in /var/log ,whose kernel wothout CONFIG_VT
the other file is the /proc/last_kmsg ,whose kernel with CONFIG_VT
In fact,I use UUID to define the rootfs,it seems,mounted,but initramfs is also loaded,then it won't use the /sbin/init in rootfs,and it will use the init in initramfs(because initramfs is loaded first)
This post had better move to developer part,but i can post there
Shooteru
Click to expand...
Click to collapse
What is this?
Sent from my PG86100 using Tapatalk 2
ssojyeti2 said:
What is this?
Sent from my PG86100 using Tapatalk 2
Click to expand...
Click to collapse
I don't know, but this dude sounds like a real developer
yousefak said:
I don't know, but this dude sounds like a real developer
Click to expand...
Click to collapse
He's asking a question pertaining to booting debian (a Linux distro) on his phone. I'm afraid I can't be of any help other than to clarify that though.
Sent from my EVO 3D S using xda premium
I'm not sure if I'm understanding your question correctly, but it's giving you an error about your header there. Have you tried just packing the ramdisk and init files with the zImage?
packing the ramdisk and init files with the zImage?
what is it?
Do you mean that I should use a initramfs(but not android one,a normal linux one made by initramfs-tools)?
In that case,I think I have tried once before,the same result.
I wonder why kernel will load the initramfs in the boot partition,does the bootloader let kernel do that?
I even flash the bootimg to boot partition,no use.
It's possible the bootloader is doing something to it. If you are using 'fastboot boot boot.img' it's usually expecting a specially packed zImage & ramdisk, but I'm not sure if it's the hboot or kernel that expects it.
See: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
I have little experience working with kernels though, so hopefully someone more knowledgeable with them will be able to help more.
I knew it,that is why I use abootimg to make a android img,but maybe there is no error in kernel,only in bootloader.
But I wonder why once set CONFIG_VT=y,then it will happen.
Maybe I should know how android show gui without tty
Maybe I should modify lk_bootloader fisrt(only fbcon part need),let fastboot boot it,then let lk_bootloader boot my kernel.lol,am I all right.

[UTIL] Kexecboot Bootloader for Galaxy Note i717 - Boot Multiple Kernels

Well, it only took 2 years lol!
What is Kexec?
Kexec (kernel-execute) is a function of the Linux kernel that allows it to act as a bootloader to boot other kernels. Unfortunately, the standard implementation of kexec doesn't work quite right on most ARM devices due to poor driver support for hardware resets. The workaround is kexec-hardboot, a patch set that allows a kernel to be staged in RAM before performing an actual hardware reset through the phone's bootloader. Upon reboot the kexec-supporting kernel will check the magic location in RAM to see if a previously stored kernel is available, and if so, it will transfer execution to that kernel instead of booting itself.
Why use Kexec
It's a second-stage bootloader. The standard Android bootloader only allows two kernels to be installed at once - boot and recovery. This means that if you want a working recovery, you're only allowed one real OS kernel. If you want to dual-boot (or tri-boot or more) you're screwed. Kexec provides an answer to this. By replacing the boot kernel, kexec (with the kexecboot GUI) acts as a "second stage bootloader" allowing you to boot any number of kernels from any available storage devices. For instance, you have kexecboot in your boot partition and you can keep a kernel for Android installed in your Android system partition as well as an Ubuntu kernel and root filesystem on your SD card and be able to switch between Android and Ubuntu at boot time.
What is kexecboot
http://imgur.com/4GYomKX
Kexecboot is a graphical front-end for kexec. I have modified it to work with the kexec-hardboot patches. It scans all available storage devices for a boot.cfg file in which you define kernels, ramdisks, and kernel commandlines. You control it using volume up and down to move cursor, power to select.
Download
Get it here: https://mega.co.nz/#F!0ct3EaTD!wHWnGo1M_2smyKdzGMIYmw
The code
Kernel builder: https://github.com/CalcProgrammer1/kernel_quincyatt_kexec
This repository contains all the things you need to build a flashable kexecboot/kexec-hardboot enabled kernel image. It contains the ramdisk with the kexecboot binary and a script to package a flashable zip file. Included as submodules are the kernel source itself (kexec-hardboot branch, required to build the image) and the kexecboot source (optional, not used by default as you must build it using an ARM system, a pre-built binary is included if you don't want to build your own). The kernel source includes a defconfig called kexec_quincyatt_defconfig that sets the required config options for building a kexec-hardboot kernel.
Kexecboot Configuration File
Kexecboot replaces your boot kernel, so when you power up your phone it will go straight to the Kexecboot screen. The issue is now to provide kernels for kexecboot to boot into. This requires some work on your part, as you will have to store the kernel files (zImage and initrd) in a partition and write a configuration file to tell kexecboot where they are. This configuration file may contain multiple kernels, allowing you to have several different kernels available for the same OS or multiple OSes entirely. If you're coming from an Android system that distributes their kernel as a boot.img, you can use the abootimg program to extract it into a separate zImage and initrd.img binary.
The configuration file must be located on the path /boot/boot.cfg. This is relative to whatever partition/disk you are on, so for instance if you're setting up Android to boot from kexecboot, you would put your configuration file in /system/boot/boot.cfg (/data/boot/boot.cfg would work as well). You can also put a boot.cfg file on your SD card as long as you follow the /boot/boot.cfg path. Kexecboot automatically scans all available partitions for a boot.cfg file before it starts and builds a list of all available kernels across all detected boot.cfg files, so you may have Android in your /system partition and Debian on your SD card and both kernel lists will be shown together.
The Kexecboot web site provides a nice tutorial: http://kexecboot.org/documentation/how_to_write_config
The Note i717 bootloader passes a fairly long string of kernel arguments to the boot kernel. Since kexecboot overrides this for the kexec-booted kernel, you must provide this boot string in your boot.cfg file. Additionally, you may edit or add arguments to the command string here (such as setting console=tty0 instead of the default console=null so you can use the framebuffer console).
For example, here is my /system/boot/boot.cfg for CyanogenMod 11 (with kernel and initrd.img, extracted via abootimg, in /system/boot/)
Code:
# kexecboot configuration file
# CM11 default kernel
LABEL=CyanogenMod 11
KERNEL=/boot/zImage
INITRD=/boot/initrd.img
APPEND="androidboot.hardware=qcom usb_id_pin_rework=true no_console_suspend=true zcache [email protected] [email protected] sec_debug.reset_reason=0x1a2b3c00 pmem_sf_addr=0x7a000000 pmem_sf_size=0x6000000 console=null sec_debug.enable=0 sec_debug.enable_user=0 appsbark=0 msm_watchdog.enable=1 msm_watchdog.bark_time=30 msm_watchdog.bite_time=31 vmalloc=512m hw_rev=12 lpj=67702 androidboot.emmc=true androidboot.serialno=32c245ca androidboot.baseband=csfb"
I'm not sure how much of that you actually need, but you do need at least some of it because with an empty APPEND= it does not boot. You also do have to put the quotation marks around it or else parsing of one of the options will fail.
I'll admit limited understanding of what you're accomplishing here, but seems to me that this could lead to dual booting on the Note. Nice work.
Good luck.
Nice work! Thanks for the work you've done thus far. Unfortunately I have no way to help you out other than morale support! :highfive:
lactardjosh said:
I'll admit limited understanding of what you're accomplishing here, but seems to me that this could lead to dual booting on the Note. Nice work.
Good luck.
Click to expand...
Click to collapse
Pretty much what it comes down to, testing kernels and roms without having to flash into nand. I can't wait for dualbooting from Sd on the Note.
I have ORD , please help!!
My main goal here is native Linux, but if kexec works then you can boot custom Android dev kernels, native Linux kernels, other mobile OS'es, etc. The SGSIII team seems to have found some interesting kexec solutions for the Verizon SGSIII due to its locked bootloader. They've posted a good deal of kexec patches which I'm trying to bring to the Note, including a custom kexec-hardboot option that fully reboots the device into the new kernel (apparently to make sure the radio and such are working).
CalcProgrammer1 said:
My main goal here is native Linux, but if kexec works then you can boot custom Android dev kernels, native Linux kernels, other mobile OS'es, etc. The SGSIII team seems to have found some interesting kexec solutions for the Verizon SGSIII due to its locked bootloader. They've posted a good deal of kexec patches which I'm trying to bring to the Note, including a custom kexec-hardboot option that fully reboots the device into the new kernel (apparently to make sure the radio and such are working).
Click to expand...
Click to collapse
Wonderful, wonderful work!!! :thumbup::thumbup::thumbup:
Sent from my SAMSUNG-SGH-I717 using xda premium
Uh...It all sounded like this:
dual kernel (i'm gonna brick) kexec will allow (me to brick my phone).....with native linux applications ('im gonna brick my phone cause i'm stupid)....LOL
while i know what your doing, that in no way means i will ever understand it...LOL
But i will thank you in advance for what sounds like a sick mod for our notes...
Many thanks Dev !!!!
Kexec is actually (if done right) a good way *not* to brick your phone. To run kernels, you usually have to flash them to a restricted boot section of the memory, and if you flash all non-working kernels (to download, recovery, and main) then you have no way to use your phone, as it won't boot up. If you use kexec, your working kernel is safely stored on the boot partition and your development kernels can be wherever, and if it doesn't boot you can just hold down POWER to hard reboot into your good kernel.
The problem is that it doesn't seem to be working, I think I have the kexec support built properly but haven't been able to boot any kernels without it crashing.
CalcProgrammer1 said:
Kexec is actually (if done right) a good way *not* to brick your phone. To run kernels, you usually have to flash them to a restricted boot section of the memory, and if you flash all non-working kernels (to download, recovery, and main) then you have no way to use your phone, as it won't boot up. If you use kexec, your working kernel is safely stored on the boot partition and your development kernels can be wherever, and if it doesn't boot you can just hold down POWER to hard reboot into your good kernel.
The problem is that it doesn't seem to be working, I think I have the kexec support built properly but haven't been able to boot any kernels without it crashing.
Click to expand...
Click to collapse
I know you'll crack it ....
And when you do ....you'll be the galaxy note GOD !!!....LOL
your effort is much appreciated Sir ....even if I'm scared to use it , but will anyway ...lol
So I'm still confused as to why my kexec didn't work. I'm going to build a TouchPad kernel with it enabled and repeat the test on it, since I have a known-good kernel to boot against. I'll let you know how that goes.
Sent from my SAMSUNG-SGH-I717
Ok, so long-time-no-see but I'm reviving this post! Now that my Note 3 is happily running Cyanogenmod I have no urgent need for my Note 1 and can hack on it!
So far I haven't gotten kexec working, but I do have:
1. Kexecboot (graphical kexec frontend) is working, detects OS images appropriately
2. Framebuffer Console (text-mode display, USB OTG keyboard supported for interactive command line)
3. Overriding bootloader command line (to enable the fbconsole you need console=tty1 but the bootloader passes console=null)
4. Framebuffer console rotation (boot up in landscape or portrait, no way to switch without recompiling at the moment)
5. Most of kexec-hardboot ported from the HP TouchPad port, no clue if it's promising or not as so far it just crashes after a while of nothing
6. Ubuntu 13.04 (desktop edition) rootfs installed on SD card in a chroot, also taken from HP TouchPad
What I'm working on:
1. Kexec-hardboot port (needed to use kexec properly and boot kernels)
2. Fixing fbconsole glitching (framebuffer console displays garbled text that slowly clears up, no clue why...reading /dev/fb0 repeatedly clears up the display immediately and is a dirty hack that works well enough for testing)
3. Networking (either USB Ethernet or integrated WiFi, going to try backported brcmfmac driver)
4. Ubuntu (that's the long-term plan here)
5. Note 3 S800 port if I get everything figured out here
CalcProgrammer1 said:
Ok, so long-time-no-see but I'm reviving this post! Now that my Note 3 is happily running Cyanogenmod I have no urgent need for my Note 1 and can hack on it!
So far I haven't gotten kexec working, but I do have:
1. Kexecboot (graphical kexec frontend) is working, detects OS images appropriately
2. Framebuffer Console (text-mode display, USB OTG keyboard supported for interactive command line)
3. Overriding bootloader command line (to enable the fbconsole you need console=tty1 but the bootloader passes console=null)
4. Framebuffer console rotation (boot up in landscape or portrait, no way to switch without recompiling at the moment)
5. Most of kexec-hardboot ported from the HP TouchPad port, no clue if it's promising or not as so far it just crashes after a while of nothing
6. Ubuntu 13.04 (desktop edition) rootfs installed on SD card in a chroot, also taken from HP TouchPad
What I'm working on:
1. Kexec-hardboot port (needed to use kexec properly and boot kernels)
2. Fixing fbconsole glitching (framebuffer console displays garbled text that slowly clears up, no clue why...reading /dev/fb0 repeatedly clears up the display immediately and is a dirty hack that works well enough for testing)
3. Networking (either USB Ethernet or integrated WiFi, going to try backported brcmfmac driver)
4. Ubuntu (that's the long-term plan here)
5. Note 3 S800 port if I get everything figured out here
Click to expand...
Click to collapse
Long time in the making. Glad to see you're still at it. Hope you are able to get it working. Would be pretty cool. Good luck
If you can get this working up to kernel with freedreno I'd be all over working on getting Plasma Active onto this thing. I've missed having a real linux phone since my n900 died.
Got Bluetooth working from the command line!
Code:
# rfkill unblock all
# hciattach /dev/ttyHS0 any
# hcitool scan
It detected my Note 3 which I had set to visible! Hopefully I can pair a BT keyboard with this and lose the USB OTG dependency. Still working on figuring out WiFi, I have the brcmfmac driver from 3.13 backports compiled and loaded but the WiFi chip isn't being detected so the driver never creates an interface for it. The chip is a Broadcom BCM4330 WiFi/Bluetooth chip, and although both WiFi and Bluetooth share the same chip they use different interfaces to the SoC (UART for BT and SDIO for WiFi).
I plan on doing more research into getting the hardware working before I do any more work on kexec. It will be much easier to debug kexec I think knowing how to use WiFi/BT/USB/etc. The only hardware I'm not going to attempt at all is the modem as I don't use this device as a phone anymore and don't have a SIM card in it. That said, all the rmnetX entries that I think are modem interfaces show in ifconfig -a so maybe it is working.
My kernel source is here:
https://github.com/CalcProgrammer1/ubuntu-kernel-quincyatt
The kexec branch will have the kexec hardboot patches once I figure them out. I've also got a folder set up with a script to automatically build the kernel zImage, build the modules, build the backport driver modules, build the ramdisk from a ramdisk root folder, build the boot.img, and then package that up in a flashable .zip. I'll upload parts of this system as I complete them. I also have an Ubuntu rootfs on my external ext4 (or was it 3?) SD card that I ripped straight off my TouchPad. For now I'm just using a busybox shell in my ramdisk, dropping out of kexecboot into ash, setting up a chroot for the SD card, and chrooting into the Ubuntu rootfs that way. It's not ideal since Ubuntu's init process doesn't run but it does allow me to run all the installed utilites from said rootfs.
Edit: Rii Mini Bluetooth Keyboard paired and working! It was a roundabout way of doing so because dbus and upstart don't work in chroot so I had to use an old package called bluez-compat which provides the hidd command. I sideloaded the .deb with a flash drive. The command to pair a keyboard:
Code:
# hcitool scan
Scanning ...
XX:XX:XX:XX:XX:XX Bluetooth device name
# hidd --connect XX:XX:XX:XX:XX:XX &
XX:XX:XX:XX:XX:XX will be a hex value that is your keyboard's address. You find the address with the scan command and enter it on the hidd command to connect. I didn't have to enter any kind of passcode or pairing key, after running hidd it just started working.
http://imgur.com/2sV3TJr
I got it! I finally managed to get kexec hardboot working! I had to rewrite a bit of code in the kexecboot program to support kexec-hardboot better but I now have a bootloader that is working correctly, if slowly. I'll be posting my kernel source soon (it's a branch off of CyanogenMod's msm8660-common kernel) as well as my modifications to kexecboot itself. The kexec-tools binary I took out of the HP TouchPad port unmodified so I don't have the source for that (though it shouldn't be hard to find). I'll be looking into a Note 3 port soon, basically used the Note 1 as the guinea pig for this experiment.
If, somehow, you could adapt this for the ATT Mega 6.3 so as to bypass the locked tight bootloater.....you would be considered a hero!! People would build statues of you....write songs and name their children after you!!!!!?
Sent from my SM-T310 using XDA Premium 4 mobile app
Unfortunately you require an unlocked bootloader to install the kexecboot kernel. This isn't going to be a magic bullet for locked bootloaders. People have tried. For devices with exploitable bootloaders, it may help as you won't have to fake-sign kexec-booted kernels though.
CalcProgrammer1 said:
Unfortunately you require an unlocked bootloader to install the kexecboot kernel. This isn't going to be a magic bullet for locked bootloaders. People have tried. For devices with exploitable bootloaders, it may help as you won't have to fake-sign kexec-booted kernels though.
Click to expand...
Click to collapse
Grasping at straws, My Friend. Hoping that maybe this could be something like SafeStrap and could be d/l and installed as an APK.
Sent from my SAMSUNG-SGH-I527 using XDA Premium 4 mobile app
Got Debian booting! I also figured out how to get WiFi working from a non-Android Linux OS so this is definitely on track towards a full desktop OS!
To-do:
* X server, preferably with Freedreno GPU driver eventually
* Audio (q6.* firmware files and possibly an ALSA config)
* Startup scripts for Bluetooth initialization
* Figure out how to rotate the screen
dparrothead1 said:
If, somehow, you could adapt this for the ATT Mega 6.3 so as to bypass the locked tight bootloater.....you would be considered a hero!! People would build statues of you....write songs and name their children after you!!!!!?
Sent from my SM-T310 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I wont be having anymore children to name, but I can do a dog. He is too stoopid to know the difference. I can say aluminum foil and he will come running.
Sent from my SAMSUNG-SGH-I527 using XDA Free mobile app

New kernel with dual boot

Old method, read post 2
Date 05-11-2012 Huawei s7-105 dual boot kernel
by hal_2000
Hi all, first i like to thank irfanbagus without is help this cound not be possible, look at the
original post: http://forum.xda-developers.com/showthread.php?t=1598803
This is stock kernel 2.6.32-9-ideos plus dual boot features
kernel 2.6.32.9-ideos == android 2.2.2 == froyo
Warnings:
If your kernel different from 2.6.32.9 it will not work
If you dont know what you are doing stop, I'm not responsible if you brick your device
the rom2 must be compatible with kernel 2.6.32
Works on:
my huawei s7-105
huawei s7-10x – possible if kernel = 2.6.32-9
huawei s7-slim – possibly not, because different hardware
How to install:
Follow this steps, if not sure, stop do not go on
1.1-back up your rom, just in case
1.2-must be root, huawei must be rooted to work properly, if not stop
1.3-must have cwm install, if not stop
1.4-in external sdcard make 3 partitions, format it in ext2, in stock kernel ext3 does not work
1st fat32 for your data
2nd ext2 for system
3rd ext2 for cache
4th ext2 for data
if you have already an scard in fat32, resize is a good option
I use a 2gb sdcard, 1gb for fat and 300mb for other partitions, i'm a linux user so I use gparted
to create partitions, windows tools are also available, google for it
1.5-unzip the file in a directory
1.6-connect huawei s7-105 to pc
1.7-boot huawei in fastboot mode, exec “c:\directory\adb reboot bootloader”
1.8-wait, until it blanks the screen, on top in says --fastboot mode--
1.9-exec “c:\directory\fastboot flash boot boot-dual.img”, it will take 20 to 30s
1.10-exec “c:\directory\fastboot reboot”
1.11-thats it, you just install the stock kernel with dual boot
How to test it:
2.1-read the how to install, and install the kernel with dual boot
2.2-back up your rom, if not done in 1.1
2.3-you must have rooted the huawei, if not stop
2.4-you must have cwm install
2.5-boot huawei in cwm = recovery exec “c:\directory\adb shell”, then “#su”, and finally type
“#reboot recovery”
2.6-you have rebooted in cwm, choose install zip from sdcard, then choose apply zip, chose file
stock-test-rom2.zip
this will install the custom rom “stock-test-rom2” to sdcard partions 2,3,4
it will take 4 to 6 minutes, it depends on speed of sdcard
2.7-after install, it will return to menu, click power = get back to menu
2.8-reboot
2.9-huawei will boot in rom1, the one you have already,
2.10-go to file explorer, create a empty file in external sdcard = 1st fat partitions, name it
“bootsdcard”
2.11-reboot
2.12-it will boot the rom2, it will take 4 to 6 minutes, the 1st time, depends on speed of external
sdcard
2.13-to boot the rom1 again, simply delete the file “bootsdcard” in 1st fat partitions
Why have dual boot ???
I have done it just to prove it is possible
No, I did it to improve my huawei s7-105, the people at huawei stop development for this fine
little tablet a long time ago and I want to have gingerbread on it or android 4.01, got tired of waiting, so
this way is easier to test custom rom, and less provable to brick the tablet when in development.
The rom2 must be compatible with kernel 2.6.32, you can not install android 2.1 in rom1 and
android 2.2 in rom2, is not possible
To do next:
– compile better kernel, with ext3 or battery saving options
– compile a better custom rom, maybe gingerbread or ics or cm9
file list in zip:
boot-dual.img = kernel 2.6.32-9 with dual boot
stock-test-rom2.zip = simply custom rom = stock rom test = android 2.2.2
fastboot = fastboot for linux
fastboot-windows = fastboot for windows
adb = adb for linux
adb-windows = adb for windows
problems in install, post it, I will try to help you
link to the zip file: https://www.dropbox.com/s/6x5pcymooopb4z6/s7-105-kernel.zip
Sentence of the week... “,,,dont ask for it, do it...”
multi-boot kernel
New method, multi-boot n roms
With this method we can test new roms faster then the dual-boot, no need to create the partitions, and we can have many rom, as long we have space in external sdcard, for now only 3 rom available, if you need more ask, i will extend to 20
you will need about 500mb of space for each rom
How it work:
Begin by creating the following directories in external sdcard:
/sdcrad2/multiboot/rom2
/sdcrad2/multiboot/rom3
/sdcrad2/multiboot/rom4
inside of rom(x) must be 3 files, system.img, data.img and cache.img
to create files, in linux do:
dd if=/dev/zero of=system.img bs=1000000 count=200
mkfs.ext2 system.img
make it a ext2 file type, the 2.6.32 kernel only accepts ext2 files, for me is better I think because ext3 and ext4 have journaling that implies a lot of reads and writes, reducing the life of the sdcard
then mount the system.img file in linux
mount -t ext2 -o loop system.img /some_dir
copy the files of the rom to /some_dir, adjust the files permissions like you see in updater-script
unmount /some_dir
and copy the 3 files to “/sdcrad2/multiboot/rom2”
create a empty file in external sd card like “/sdcard2/rom2”
install the multi-boot kernel, boot in fastboot (vol up+home+power) then execute in command line
fastboot flash boot boot-multi.img
fastboot reboot
that it,
in the case the rom doesn't boot, remove battery and sdcard, power on and it will boot from rom1 (phone internal memory)
roms that work with this kernel, tested in one S7-105
-- stock rom, Indonesia 2.2.2
-- froyofusion rom, by joelian good rom
-- trizet v03, by tri-zet
to do next:
--maybe port cm7 to S7
questions:
ask, I will reply.
https://www.dropbox.com/s/697ye5exf6386nw/multi-boot.zip
hal_2000
Hi,
do you know if CM9 oder CM10 will function? Which kernel is used by CM9 or CM10?
Hi, i'm not sure but all the cm9 and cm10 roms i have lookup use kernel at least 2.6.35 or 2.6.38, this dual-boot kernel is 2.6.32 so probally will not work, but if you have a more recent kernel for huawei s7, give it to me and i will add that function and see it it works.
Note: i was wrong, last night found a cm10 version in a russian forum that uses kernel 2.6.32-ideos with some add on.
I also want in the future to compile a more recent kernel, but write now i'm learning how i can port roms
Hal_2000
hal_2000 said:
Hi, i'm not sure but all the cm9 and cm10 roms i have lookup use kernel at least 2.6.35 or 2.6.38, this dual-boot kernel is 2.6.32 so probally will not work, but if you have a more recent kernel for huawei s7, give it to me and i will add that function and see it it works.
Note: i was wrong, last night found a cm10 version in a russian forum that uses kernel 2.6.32-ideos with some add on.
I also want in the future to compile a more recent kernel, but write now i'm learning how i can port roms
Hal_2000
Click to expand...
Click to collapse
Hello hal_2000
Would u share ur initramfs source?
Im try to port to my p1000 from original thread (irfanbagus) but not luck.. exec command not running when i add to init.rc
Ps. Thats irfanbagus too give me info that u try to port to tab so i ask to u..
Thanks before
savie
Hi Savie, your kernel for galaxy y works great, thanks for that.
My initram source is the same as irfanbagus (dual-boot) , the multiboot its the same with a few more lines , you can extrat from the boot img file, here is the link
https://www.dropbox.com/s/0cxj05isqvswucp/boot-multi.img
If you need more help, ask.
p.s.
One question about arm toolchain, do you know wicht toolchain comes gcc version 4.4.0 ?
My S7-105 kernel is compile with that version, i have version 4.5.2 when i compile the kernel it boots but then reboot, i guess the modules are not compatible, i need to test with arm toolchain with gcc 4.4.0.
hal_2000
hal_2000 said:
Hi Savie, your kernel for galaxy y works great, thanks for that.
My initram source is the same as irfanbagus (dual-boot) , the multiboot its the same with a few more lines , you can extrat from the boot img file, here is the link
https://www.dropbox.com/s/0cxj05isqvswucp/boot-multi.img
If you need more help, ask.
p.s.
One question about arm toolchain, do you know wicht toolchain comes gcc version 4.4.0 ?
My S7-105 kernel is compile with that version, i have version 4.5.2 when i compile the kernel it boots but then reboot, i guess the modules are not compatible, i need to test with arm toolchain with gcc 4.4.0.
hal_2000
Click to expand...
Click to collapse
Thank you hal_2000 will check later im on phone mode this week..
Thats make me confuse in young only follow irfanbagus and working but when try to gtab p1000 with same procedure its nothing happen..
Still follow samsung source recomended use arm-2009q3-none-linux-gnueabi gcc4.4.1 coz so far only that can make my kernel booting..
I think something not good in my initamfs coz cant execution 'exec' command and i dont know why..
Hi Savie, lets see if i can help you, if exec dont run, check if you have busybox in /sbin, check the version and permission, also check type of cpu, best bet is copy busybox that is working on device, irfanbagus dual-boot as busybox for a arm v6 cpu, my mutlboot as busybox for arm v7 cpu, diferent types of devices uses diferent type of cpu, busybox need to be compatible with type of cpu.
Hope it helps, try to connect to device with adb as soon it boot up, and check what is executed.
good luck, need more help ask.
hal_2000
hal_2000 said:
Hi Savie, lets see if i can help you, if exec dont run, check if you have busybox in /sbin, check the version and permission, also check type of cpu, best bet is copy busybox that is working on device, irfanbagus dual-boot as busybox for a arm v6 cpu, my mutlboot as busybox for arm v7 cpu, diferent types of devices uses diferent type of cpu, busybox need to be compatible with type of cpu.
Hope it helps, try to connect to device with adb as soon it boot up, and check what is executed.
good luck, need more help ask.
hal_2000
Click to expand...
Click to collapse
Mmm i see i use irfanbagus busybox,., thats maybe the problem,., i will try next week coz my laptop still repair,., thank you for ur advice friend,.,

[Q] How does android boot and how to change the init proccess?

I really want to run pure linux on my android based device (please, no chroot, etc. suggestions) and I want to fully understand how my device boots. I'm trying to dig into the recovery and boot partition, without success (I figured out boot.img, but I can't open recovery.img) What do you suggest me to read?
Also, I saw that there is a second kernel inside recovery.img. is that right? If yes, what happens? When the real kernel is loaded? I want to make the android init to mount an img from the sdcard and execute /bin/init in it, in order to boot my linux system. Should I alter the ramdisk (hence the boot partition) or the recovery?
I also posted this to stackexchange [1] but got no helpful response.
Thank you.
bump

Categories

Resources