stupid dev questions - Hero, G2 Touch Android Development

so...i'm behide the curve on on this hero stuff (being a rom cook for the s200 i'm not complete clueless...but thats winmo)
Anyway i'm playing around and would love an answer on these from one of the resident dev's on here
1. i took boot.img from the RUU rom.zip of wwe 2.73.405.61, took the system.img, did the magic to create an update.zip, which seems to flash fine from a recovery rom BUT on reboot it's stuck on the Hero boot screen/logo, any clue as to where to look/debug (yes I did the wipe etc. etc. it must be something about the update.zip / boot.img i'm missing)
2. i assume there is still no way to re-sign the a changed RUU rom.zip ?
Thanks for your time !

1: extract the system with unyaffs
2: zip the contents of the extracted system
3: sign the resulting zip (androsign or whatever)
boot into recovery
4: copy over to sdcard
5: copy over boot.img also to sdcard
6: cat /dev/zero > /dev/mtd/mtd2
or
dd if=/dev/zero of=/dev/mtd/mtd2
whichever you prefer
7: flash_image boot /sdcard/boot.img
8: flash your update.zip or whatever you called it
9: wipe system (format DATA: & CACHE
OR
flash_image system system.img (might not work)

adwinp said:
1: extract the system with unyaffs
2: zip the contents of the extracted system
3: sign the resulting zip (androsign or whatever)
boot into recovery
4: copy over to sdcard
5: copy over boot.img also to sdcard
6: cat /dev/zero > /dev/mtd/mtd2
or
dd if=/dev/zero of=/dev/mtd/mtd2
whichever you prefer
7: flash_image boot /sdcard/boot.img
8: flash your update.zip or whatever you called it
9: wipe system (format DATA: & CACHE
OR
flash_image system system.img (might not work)
Click to expand...
Click to collapse
Thanks, i got that far, but rolling the whole thing (so boot.img + extracted system.img) into update.zip and flashing that from a recovery image is where it goes all tits up and doesn't boot, even tried without any changes and just taking the boot.img and system.img from a offical htc rom and creating an update.zip
so i must be doing something wrong but can't put my finger where it goes wrong.
anycase, i'll keep trying
thx

1: Did you sign your update.zip?
2: An update.zip usually contains an update script; did you write one too?
This is why I suggested you flash manually.

adwinp said:
1: Did you sign your update.zip?
2: An update.zip usually contains an update script; did you write one too?
This is why I suggested you flash manually.
Click to expand...
Click to collapse
both answers yes
still digging, but it could be that "something" in the update script isn't working, however i've copied one from a working rom, with the same results...
going through the script now....i'm sure it's something stupid and i'll smack my head later, but for now no go......thanks for your tips and time !
Edit:
is there something special you need to do with the boot.img if you just copy (unzip thats it) from a rom.zip and put it in the update.zip ??

Jesterz said:
Edit:
is there something special you need to do with the boot.img if you just copy (unzip thats it) from a rom.zip and put it in the update.zip ??
Click to expand...
Click to collapse
Either you push it to sdcard and
#flash_image boot /sdcard/boot.img
or
in the update.zip:
META-INF\com\google\android\update-script
where META-INF is a folder in the root, and update-script is a text file without file extension; its contents should be:
show_progress 0.1 0
write_raw_image PACKAGE:boot.img BOOT:
show_progress 0.1 10
So, the contents should be:
\META-INF\
com\
google\
android\update-script
\boot.img
zip all that into update.zip, and sign the zip.

Related

help! deleted recovery.img

just wondering if anyone can help me out here, i was trying to flash the cyanogen hero recovery image to my phone using fastboot so i erased my stock recovery image, only to get the message "remote: signature verify fail" so im now stuck with no recovery image and dont know how to get it back, can anyone help me out please?
ok so i managed to mount my system as read write in fastboot and put the recovery.img from the wwe version in to system which has gave me my recovery back but when i boot it just stays on the hero screen and says fastboot usb at the top if i have it plugged into my pc. i have no idea how to reset the original files and i didnt back up, can anyone help me pleas?
Well after trying for hours to fix this, I give up. I can't install the system.img from wwe rom posted on here it says verify failed or something similar so I stupidly tried to flash the magic 32a heroski port hoping it would work and still nothing. Is there anyway someone could post there nandroid backup file and help me flash it to see if that works? Or should I just give up. I'm really stuck now lol
you can't flash anything from fastboot because the images need to be signed.
what version of hero do you have?
if you have the wwe hero(it's not needed ) i can send you (later, now i'm at work) my nandroid backup (system,boot,recovery, splash...) so you can restore them
I have the orange hero. I used fastboot to load cyanogens recovery image then flashed the heroski rom hoping it might work lol so I ended up using fastboot to erase system. Question is do you think your nandroid backup would work? I sure hope so it would be a great help!!! Thanks.
i have the unlocked wwe hero. i'm uploading now the system, boot and recovery to rapidshare . it'll be up in a couple of minutes. if you find a orange hero backup you can restore in the same way ;-)
restoring hero wwe
download the backup from(it's better if you verify the md5):
http://rapidshare.com/files/263636068/bkp.rar.html
MD5: BEAE167BCBB1FF6D3D2701FB64604203
Put the contents on sdcard (i'm assuming that you put the images in a folder named bkp on the sdcard)
so:
download the recovery from here: http://rapidshare.com/files/262621147/cm-hero-recovery.img.zip and extract it
put your phone in fastboot mode (with the phone off, press the back key then turn the phone on).
then:
boot with the downloaded recovery
Code:
fastboot boot cm-hero-recovery.img
0) mount the partitions
Code:
adb shell mount /system
adb shell mount /sdcard
1) do a wipe
select the wipe option from the recovery menu
2) restore boot
Code:
adb shell flash_image boot /sdcard/bkp/boot.img
3) restore recovery
Code:
adb shell flash_image recovery /sdcard/bkp/recovery.img
4)restore system
Code:
adb shell
cd /system
rm -rf * (ignore the errors)
unyaffs /sdcard/bkp/system.img
5) unmount the partitions
Code:
umount /system
6) reboot
Code:
reboot
hope it helps
Ok thanks. Have to wait 4 hours to try it as I'm in work lol, what is an md5 for, just out of curiosity?
A MD5sum is a checksum to verifiy that your downloaded file isn't corrupt.
maxisma said:
A MD5sum is a checksum to verifiy that your downloaded file isn't corrupt.
Click to expand...
Click to collapse
Ok dude makes sense thanks.
thanks
enlightener said:
download the backup from(it's better if you verify the md5):
http://rapidshare.com/files/263636068/bkp.rar.html
MD5: BEAE167BCBB1FF6D3D2701FB64604203
Put the contents on sdcard (i'm assuming that you put the images in a folder named bkp on the sdcard)
so:
download the recovery from here: http://rapidshare.com/files/262621147/cm-hero-recovery.img.zip and extract it
put your phone in fastboot mode (with the phone off, press the back key then turn the phone on).
then:
boot with the downloaded recovery
Code:
fastboot boot cm-hero-recovery.img
0) mount the partitions
Code:
adb shell mount /system
adb shell mount /sdcard
1) do a wipe
select the wipe option from the recovery menu
2) restore boot
Code:
adb shell flash_image boot /sdcard/bkp/boot.img
3) restore recovery
Code:
adb shell flash_image recovery /sdcard/bkp/recovery.img
4)restore system
Code:
adb shell
cd /system
rm -rf * (ignore the errors)
unyaffs /sdcard/bkp/system.img
5) unmount the partitions
Code:
umount /system
6) reboot
Code:
reboot
hope it helps
Click to expand...
Click to collapse
ok so i finally got time to fix my phone and just did what you said and can now happily say it worked. thanks enlightener you enlightened me lol. in future i will refrain from doing random terminal stuff without researching first lol.
Bad new : My hero is out of service area
Hello,
Sorry for my english, i'm french
I made a big mistake in my files system ... A too long story
My Hero :
HBOOT-1?76.0004
Radio-6.35.04.25
July, 3 2009
Well, now, my htc hero do not work 'first page, out of service area"... I would like to make your post, but i had error :
First, fastboot Ok, Adb shell mount system and sdcard ok, wipe ok
Second, when i do this code" adb shell flash_image boot /sdcard/bkp/boot.img", my hero "said" : "header is the same, note flashing boot". Same thing for restore recovery
Can you help me ?
pitou21 said:
Hello,
Sorry for my english, i'm french
I made a big mistake in my files system ... A too long story
My Hero :
HBOOT-1?76.0004
Radio-6.35.04.25
July, 3 2009
Well, now, my htc hero do not work 'first page, out of service area"... I would like to make your post, but i had error :
First, fastboot Ok, Adb shell mount system and sdcard ok, wipe ok
Second, when i do this code" adb shell flash_image boot /sdcard/bkp/boot.img", my hero "said" : "header is the same, note flashing boot". Same thing for restore recovery
Can you help me ?
Click to expand...
Click to collapse
in this case, you don't have to restore boot or recovery because they are the same as the images posted here.
proceed with system
Ok thanks, now it's goog !

trying to change my gps.pref file

How can I do this?
Can I somehow extract the whole /system and change the file, make it an img file and fastboot it back to the desire?
deswong said:
How can I do this?
Can I somehow extract the whole /system and change the file, make it an img file and fastboot it back to the desire?
Click to expand...
Click to collapse
if you have root, you can extract the file and push it back through Recovery
adb shell mount /system
adb push gps.pref /system/[place of gps.pref]

ext4 extraction from system.sin issues

Hi,
As you probably know, ext4 image can be extracted from system.sin but cannot be mounted. When trying to mount it, it fails with :
[ 1476.821582] EXT4-fs (loop0): bad geometry: block count 262144 exceeds size of device (144631 blocks)
I open this thread just to share what I did around the issue and maybe have some helpful quotes about it
Here is what I did (under linux)
# First create an zero filled file. Size is system partition size (262144 blocks of 4096 each)
dd if=/dev/zero of=/home/xperia/virtualfs bs=4096 count=262144
# Attach file to loopback
sudo losetup /dev/loop0 /home/xperia/virtualfs
# Format it with same features as system partition on phone
sudo mkfs.ext4 -O has_journal,^ext_attr,^dir_index,^flex_bg,^huge_file,resize_inode,filetype,extent,sparse_super,large_file,^uninit_bg,^dir_nlink,^extra_isize -v /dev/loop0
# Write extracted system.sin.ext4 extracted image to loopback
sudo dd if=system.sin.ext4 of=/dev/loop0
# Mount filesystem
sudo mount /dev/loop0 /mnt
It can be mounted and I can have folder structure but I can't work with files. Editing default.prop gives me a non readable file.
But we can go a step ahead as we can now mount the image.
Still some issues have to be worked out.
The poit is, why we cant mount system.img on ICS but we can on GB?
maybe someone can contact with sony t oask
im extracting the .sin to .img like always but its impossible to mount.. what are you using to extract the .sin to a .ext4?
BTW, thanks for the info, i've been trying to modify system.img since ICS appeared.
EDIT: of, ext4 can be extracte with flashtool ~.~
maybe we need to read something from system.partinfo
Yakandu said:
The poit is, why we cant mount system.img on ICS but we can on GB?
maybe someone can contact with sony t oask
im extracting the .sin to .img like always but its impossible to mount.. what are you using to extract the .sin to a .ext4?
BTW, thanks for the info, i've been trying to modify system.img since ICS appeared.
EDIT: of, ext4 can be extracte with flashtool ~.~
maybe we need to read something from system.partinfo
Click to expand...
Click to collapse
Yes Flashtool can extract image from system.sin.
partinfo is partition information used by loader in flashmode to identify where to flash image on phone. (Something like start nand address of system partition)
so, any ideas why ext4 cant be mounted? maybe its encrypted or something..
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Yakandu said:
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Click to expand...
Click to collapse
This solution is already known
But my goal is to be able to mod a system partition without having to flash it before. And more, understand why extracted system image cannot be mounted and how to work this out
oh, ok xD
i didnt know that solution, its new for me
Yakandu said:
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Click to expand...
Click to collapse
Have you already tried flashing this img on your device? I have already tried this solution twice but didn't succeed (@Spectre51 that's why I haven't replied your PM yet). system.img was succesfully created but I got boot loop when I flashed it on my device.
Hi Androxyde,
I figured it out, basically we have to dig further in sin format as new ext4 sins skips part of the file. See my thread for more details.
PS: Thanks for flashtool, it's a great tool!
LeTama
letama said:
Hi Androxyde,
I figured it out, basically we have to dig further in sin format as new ext4 sins skips part of the file. See my thread for more details.
PS: Thanks for flashtool, it's a great tool!
LeTama
Click to expand...
Click to collapse
:good:

[dev]How to Un/Re/Pack a Boot.blob and unyaff a boot.img

Technically i have to give credit to scott crossler
www.scottsroms.com
for showing me the method
and then i came upon turges
faq
Thanks Turge and Scott and whomever created these blobpacktools
but since i keep getting pms
and im sure you do to
scott
Here are the steps for repacking the boot.img. Some involve running the commands via cygwin, others involve running them via the Windows Command Prompt.
The instructions for installing cygwin, extracting and repacking the boot.img were found here: http://www.freeyourandroid.com/guide...ot-img-windows
Once you have setup cygwin, extract the attached files in a folder under your "home" folder in cygwin.
Also unzip blob tools into the same folder as your boot.blob
1.
Code:
copy boot.blob to the same folder and run the following via
the Windows Command Prompt to extract the boot.img from the boot.blob:
BlobUnpack.exe boot.blob
ren boot.blob.LNX boot.img
which will create boot.img
2.
Code:
From the cygwin bash terminal window,
switch to the same folder and run the following
to extract the ramdisk from the boot.img:
./extractboot boot.img
You now have an out/ramdisk folder
that contains the files you want to edit.
3.
Code:
Once done, repack the ramdisk and kernel into boot_new.img
with the following command (via cygwin once again):
./packboot
4.
Code:
then from the Command Prompt repack boot_new.img
into boot2.blob using the following:
blobpack -s boot2.blob LNX boot_new.img
5.
Code:
You can now flash the boot.blob to the staging
partition via a command in updater-script:
Code:
package_extract_file("/boot.blob", "/dev/block/mmcblk0p4");
or by using adb while in recovery/android:
Code:
dd if=/sdcard/boot2.blob of=/dev/block/mmcblk0p4
Lastly the rundown is like this
if you want to take a ota blob
and extract the contents for a raw base
and a raw kernel
1
take the ota and extract the blob file and place
in your folder with blobtools
2. then run
Code:
blobunpack.exe blob
Which now creates
Blob.APP =System.img (can be renamed system.img and unyaffed in the kitchen)or straight cygwin
Blob.sos=Recovery Img
Blob.Ebt=Bootloader information
Blob.Lnx=kernel (can also just be renamed boot.img and unyaffed in kitchen)
Blob.pt=Partition info
so to repack lets say your custom remade image
and your custom kernel
and a recovery of your choice
run
Code:
blobpack.exe -s blob lnx boot.img sos twrp.blob app system.img
then simply take the blob replace in the ota file
and flash in recovery
and it should flash a rom packed as a blob
Hi!
...also you can flash the new boot.blob via fastboot mode
>fastboot-i 0x0B05 flash boot boot.blob
:good:
Call me stupid, but what does repacking the boot.img do? I never pm'ed you, but what would we gain from this. a lil lost
unpacking a boot.img allows you to take a stock already built kernel
and make specific changes to the ramdisk
more specifically
default.prop
can make kernel insecure
debuggable
bootanimation enabled
blah blah blah
and init.rc
but also
cardhu
and goldfish.rc
and init.trace
and init.usb
then repacked and good to flash
seanzscreams said:
Lastly the rundown is like this
if you want to take a ota blob
and extract the contents for a raw base
and a raw kernel
1
take the ota and extract the blob file and place
in your folder with blobtools
2. then run
Code:
blobunpack.exe blob
Which now creates
Blob.APP =System.img (can be renamed system.img and unyaffed in the kitchen)or straight cygwin
Blob.sos=Recovery Img
Blob.Ebt=Bootloader information
Blob.Lnx=kernel (can also just be renamed boot.img and unyaffed in kitchen)
Blob.pt=Partition info
so to repack lets say your custom remade image
and your custom kernel
and a recovery of your choice
run
Code:
blobpack.exe -s blob lnx boot.img sos twrp.blob app system.img
then simply take the blob replace in the ota file
and flash in recovery
and it should flash a rom packed as a blob
Click to expand...
Click to collapse
Hi!
For a linux (Ubuntu) machine you can easily unpack blob.APP
> sudo mkdir mnt
> sudo mount -o loop blob.APP mnt
- now in your mnt directory , you will have /system ! :good:
Hi,
My TF300tl can't unlock bootloader. so can I use this way to pack custom ROM ( cm11, liplop...) as official ROM to flash for my tablet ?
konnichiwa said:
Hi,
My TF300tl can't unlock bootloader. so can I use this way to pack custom ROM ( cm11, liplop...) as official ROM to flash for my tablet ?
Click to expand...
Click to collapse
I wouldn't think so, as the ROM would have to be signed to be official

[Multi Boot] Boot Menu

Multiboot for Sony Xperia Z1
How to install boot menu
- download bootmenu_honami.rar, extract folder "bootmenu" to the your internal storage
- put boot.img or kernel.elf to the mainrom folder, make sure thats the same kernel like your primary rom (aka main rom)
- download bootmenu.img from attachment, flash bootmenu.img using fastboot commnd: fastboot flash boot bootmenu.img
Since your bootmenu folder not contain settings.ini (you runing bootmenu at a first time) that will be created easily. You need to complete main step aka main rom creation:
1. (mainrom creation) reboot into bootmenu, chose "patch...", navigate to bootmenu, navigate to mainrom, select mainrom.zip package (make sure boot.img or kernel.elf is the same like your current main rom kernel, and make sure boot.img is in folder mainrom), select mainrom.zip and click "yes". Main rom will be added into boot menu entry. Now reboot again into boot menu and you will see new menuentry, chose these menu to boot into your primary rom!
2. (other roms creation - you can do only if you completed main rom step) reboot into bootmenu, chose "patch...", principe is diferent (there is 2 steps):
- step 1: chose rom zip you want to patch, patch them
- step 2: reboot again into boot menu (new rom entry will be displayed), select these rom to boot, on led blinking press to boot into cwm, now you are in cwm of these rom, now navigate to the same folder where is your package, you will find zip with appended name "patched.zip", chose these patched zip to install trought these recovery, you are done!
If something fail, make sure look into bootmenu folder into main script aka "multiboot.sh", try to fix-improve something Enjoy!
WARNING:
- NEVER RENAME FOLDERS OR ZIP ARCHIVES TO HAVE SPACE IN NAME SINCE BOOTMENU WILL NOT WORK!!! INSTEAD OF WRITING SPACE " " WRITE "_" SOMETHING_LIKE_THIS" !
- there is possibility for your partitions of the main rom to get overwriten if multiboot.sh fail to patch these rom you going to patch, just to let you know! Two click solution is in testing stage so there is probably a lot of bugs! I am not responsible if you lost your private data! So guys if you willing to help, I am waiting. Things need to be improved in multiboot.sh !
Here is full source code of the my bootmenu project -> https://github.com/munjeni/bootmenu_z1_and_z1c
Public License for BOOTMENU and for my Auxiliary Work
You can Distribute my source without my Permissions. Distribution should include my XDA name 'munjeni' and Link to this 'BOOTMENU' thread in your Credits sections/About sections and Properly Visible to Human Eyes. If you use our source and have them modified, you need to make them public to everyone!!! If you not propertly use my source and you not give proper credit, and you not share your modified source code which is based on my source code, I will find you and I will report your post!
And... If You Like my BOOTMENU... Remember to Press...Thanks button
Credits
- @abbychauhan first one who helped me in testing boot menu, thanks!
- @krabappel2548 for kernel with kexec! I have used his kexec kernel in our boot menu for Z1, thanks!
- @HypoTurtle for sugestions, thanks!
- @DooMLoRD for opening my eyes since I had a wrong kernel on my local hard drive
- @SafiXS , @Chocolatetrain, @ntmohammad ...sory if I forgot someone, thanks to all for testing!
"Post Updated on 22/06/2014"
MultiBoot Totally Simplified (Noob Friendly)
Whole Multiboot Procedure for better understanding..
We will do this in two parts procedure as Follows -
Part 1 -
First we will do the mainrom creation. "Mainrom" - The ROM which is Currently installed on your phone.
1. First Download bootmenu_honami.rar, extract folder "bootmenu" to your Phone's Internal storage
2. Put boot.img or kernel.elf (Of the ROM which is Currently installed on your phone) to the mainrom folder (its in the bootmenu folder) of extracted rar file,
make sure thats the same kernel i.e, boot.img or kernel.elf like your primary rom of yours which is currently installed
boot.img - you can extract it from the ROM zip file or Custom Kernel zip file eg. ROM.zip or Doomloards Kernel zip
Kernel.elf - U ll have to convert kernel.sin from ROM zip file to kernel.elf via Flashtool (It has got option to do that)
3. Download bootmenu.img from attachment, flash bootmenu.img using fastboot commend: fastboot flash boot bootmenu.img
4. Reboot into bootmenu, choose "patch...", navigate to mainrom folder (it has to be in the internal memory, inside the folder bootmenu),
select mainrom.zip package (make sure boot.img or kernel.elf is the same like your current main rom kernel, and make sure boot.img or kernel.elf is in folder "mainrom" ),
select mainrom.zip and click "yes". Main rom will be added into boot menu entry.
Now reboot again into boot menu and you will see new Entry Mainrom and Mainrom - CWM, choose Mainrom from Multiboot Menu to boot into your primary rom or Choose mainrom - CWM to go into mainrom Recovery
Part 2 -
Other ROMs creation - You can do it only if you completed main rom step)
1. Reboot into bootmenu, chose "patch...",
2. Navigate to Second ROM ZIP file
(Keep it anywhere in External Memory Card Because you wont be able to access Internal Memory of your Phone via another ROM Recovery due to change of Partitions, All ROMs will be installed on Internal Memory),
Choose ROM zip you want to patch, patch them
3. Reboot again into boot menu (new ROM entry will be displayed), go into ROM - CWM to go into Recovery of the particular ROM,
Now you are in Recovery of New ROM, Go to install ZIP (Installation of ROM) and
navigate to the same folder where you kept the ROM ZIP file (on External Card Memory),
you will find a new zip with appended name "patched.zip",
chose these patched zip to install trough the Recovery,
4. Flash C6902 fix, if u have C6902 Device (keep it On External Memory too),
5. Boot into ROM then Do a REBOOT and again go to Secondary ROM - CWM
6. Flash Gapps (keep it On External Memory too)
7. Flash Any Mod or anything if you wanted to flash for Your ROM (keep it On External Memory too)
Except Custom Kernels or Something that will wipe bootmenu.img ( Its WIP you can check out the Conversations on Page 48/49/50 )
8. Do Reboot
9. In Bootmenu Select the Newly installed ROM.
You are done!
Enjoy!
Common Questions -
1. How many ROMs I can Install?
Answ - http://forum.xda-developers.com/showpost.php?p=53236187&postcount=399
2. How to go from One ROM Partation to Another ROM Partation via File Explorer?
Answ - http://forum.xda-developers.com/showpost.php?p=53318812&postcount=476
3. How to get kernel.elf?
Answ - http://forum.xda-developers.com/showpost.php?p=53234909&postcount=384
and http://forum.xda-developers.com/showpost.php?p=53234988&postcount=386
and http://forum.xda-developers.com/showpost.php?p=53235075&postcount=387
4. How to take Screenshot of CWM?
Answ - http://forum.xda-developers.com/showpost.php?p=53229901&postcount=358
and http://forum.xda-developers.com/showpost.php?p=53230193&postcount=362
5. We get ROM updates now and then how do we do it? If we want to remove The Whole Multiboot Thing or a ROM from Bootmenu and to uninstall it completely from our phone then what is the procedure?
Answ - http://forum.xda-developers.com/showpost.php?p=53076327&postcount=277
and http://forum.xda-developers.com/showpost.php?p=53077937&postcount=281
6. Stock Based ROMs ask to flash the Stripped FTF via flashtools in the END, if we keep Stock based ROMs as Secondary ROMs then how will it work then, it will wipe other ROMs Kernal and bootmenu kernal?
Answ - Its Hard but http://forum.xda-developers.com/showpost.php?p=53150024&postcount=325
and http://forum.xda-developers.com/showpost.php?p=53150187&postcount=326
7. Power Off Charging?
Answ - http://forum.xda-developers.com/showpost.php?p=53144286&postcount=322
8. The partition made by Multi Boot for other ROMs is very small, Why is that? Can it be increased?
Answ - http://forum.xda-developers.com/showpost.php?p=53116039&postcount=313
and http://forum.xda-developers.com/showpost.php?p=53118687&postcount=316
and http://forum.xda-developers.com/showpost.php?p=53118722&postcount=317
9. I want to change the name of "mainrom" and Secondary ROM names in boot menu?
Answ - http://forum.xda-developers.com/showpost.php?p=53107296&postcount=307
10. Gapps on Primary ROM?
Answ - http://forum.xda-developers.com/showpost.php?p=53027261&postcount=240
11. Main ROM Update / MainROM Kernal Change?
Answ - http://forum.xda-developers.com/showpost.php?p=53565558&postcount=571
Complicated and not for noobs, but hope some one do it for you if you are confused! Seccond tut will be more complicated since all ramdisks need to be moded specialy for every each android which you going to boot. I will try to explain
munjeni said:
Complicated and not for noobs, but hope some one do it for you if you are confused! Seccond tut will be more complicated since all ramdisks need to be moded specialy for every each android which you going to boot. I will try to explain
Click to expand...
Click to collapse
Ya this thread really need a helpful Dev. Who will answer all questions.. And Of course not for noobs.. I think i ll scratch my head all night..
Sent from my Micromax A110Q using Tapatalk
@munjeni Is this same as XGo Muilti Boot?That is very harder to install.
Sent from my C6903 using XDA Premium 4 mobile app
Awesome work :good:
Could you please give me some instructions on how to add your multiboot to a host kernel when building from source?
I'm working on a kernel for the z1, and I have krabappel's kexec patch implemented.
Androguide.fr said:
Awesome work :good:
Could you please give me some instructions on how to add your multiboot to a host kernel when building from source?
I'm working on a kernel for the z1, and I have krabappel's kexec patch implemented.
Click to expand...
Click to collapse
Simple extract ramdisk and make boot.img with your kernel! I will upload new version now, version v1.1 (support for booting from booth internal and external sdcard)! Since booting from extrernal sdcard sause some lags if sd cards is not "best speed", recomended is booting from internal sdcard since performance is the same like booting from regular boot! Wait a moment, going to upload new version in next 10 minutes! When I get more free time I will give you preconfigured menu entry with installed CM11 into file partitions so you can multiboot them without needs for lookig into our tutorials, you will simple extract them and boot
New version of the bootmenu is out, enjoy!
Changelog:
- support for booting from booth internal or external sdcard
- fixed bug with reboot timer when there is no rom in settings ini or when there is no bootmenu folder
I'll try to release the multiboot I was working on. It is a lot easier for users then all this editing probably
Sent from my C6903 using xda app-developers app
krabappel2548 said:
I'll try to release the multiboot I was working on. It is a lot easier for users then all this editing probably
Sent from my C6903 using xda app-developers app
Click to expand...
Click to collapse
We all will be very thankful to u
Sent from my Xperia Z1 using Tapatalk
krabappel2548 said:
I'll try to release the multiboot I was working on. It is a lot easier for users then all this editing probably
Sent from my C6903 using xda app-developers app
Click to expand...
Click to collapse
How you think to make that simple? Since external partitions is needed, allso since standard flashable zips will allso need to be modified in updater-script, allso since ramdisks need to be modified, all fstabs need to be modified, DTB need to be appended propertly to the zImage in order to boot them with kexec... a lot of other things, I think easy method is not possible definitely! Maybe a am wrong?
I have 2 ideas now for my boot menu:
- create 3 partitions (probably will open a new thread for sharing diferent partitions layout, for example cache 50mb, cache 100mb, cache 150mb, cache 200mb, system 500mb, system 1gb, system 1.6gb, data 500mb, data 1gb, data 2gb...) so after compresing them to rar size of the archive will be ~100mb
- or maybe we can implement on the fly partitions creation by the updter-script
Problem will be kernel and ramdisk since it need modification. Maybe we can ask devs to include ramdisk and kernel for multiboot in his posts.
I am out of ideas, but I think we need to make automated tool for these things. If you guys have idea please comment!
Tool needed:
- tool for extracting boot image and making zImage-dtb
- tool for extracting ramdisk, making changes needed for boot from loop device, compresing modified ramdisk
- tool for partitions creation with defined size and defined path for puting them to defined folder
- tool for entry in settings.ini creation
Partition creation is easy. There is few steps to create file based partition:
1. first of all - how to calculate size of the partition:
Simple using calculator. Formula is: (size * 1024 * 1024) / 4096
Foe example: you want 500mb partition, ok, formula is: (500 * 1024 * 1024) / 4096
So command for making them with adb will be:
adb shell
mkdir /data/media/0/bootmenu/folder_you_want
dd if=/dev/zero of=/data/media/0/bootmenu/folder_you_want/system.ext4 bs=4096 count=count_from_your_calculation
dd if=/dev/zero of=/data/media/0/bootmenu/folder_you_want/data.ext4 bs=4096 count=count_from_your_calculation
dd if=/dev/zero of=/data/media/0/bootmenu/folder_you_want/cache.ext4 bs=4096 count=count_from_your_calculation
Click to expand...
Click to collapse
2. get UUID of the system partition (need for step 3):
blkid /dev/block/platform/msm_sdcc.1/by-name/system
Click to expand...
Click to collapse
3. format created partiton:
losetup /dev/block/loop1 /data/media/0/bootmenu/folder_you_want/system.ext4
losetup /dev/block/loop2 /data/media/0/bootmenu/folder_you_want/data.ext4
losetup /dev/block/loop3 /data/media/0/bootmenu/folder_you_want/cache.ext4
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U paste here your UUID -I 256 /dev/block/loop1
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U paste here your UUID -I 256 /dev/block/loop2
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U paste here your UUID -I 256 /dev/block/loop3
tune2fs -o journal_data_writeback /dev/block/loop2
tune2fs -o journal_data_writeback /dev/block/loop3
losetup -d /dev/block/loop1
losetup -d /dev/block/loop2
losetup -d /dev/block/loop3
Click to expand...
Click to collapse
Partitions created easily
Note:
These things must be done while you are in bootmenu since I am not sure if mke2fs, blkid and tune2fs tool is available while you are on android! So you can done that in bootmenu via adb!
CWM ramdisk modifications
all fstabs need to be modified, for example fstab.qcom:
Code:
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,encryptable=footer,length=-16384
remove line:
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
Click to expand...
Click to collapse
changed:
Code:
/dev/block/loop1 /system ext4 ro,barrier=1 wait
/dev/block/loop3 /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check
/dev/block/loop2 /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,encryptable=footer,length=-16384
In etc you can see another recovery.fstab, change them like you done for qcom.fstab!
init.rc:
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
on boot
ifup lo
hostname localhost
domainname localdomain
Click to expand...
Click to collapse
add:
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
on fs
wait /dev/block/platform/msm_sdcc.1/by-name/userdata
mkdir /sde
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata /sde rw wait
exec /sbin/losetup /dev/block/loop1 /sde/media/0/bootmenu/cm11/system.ext4
exec /sbin/losetup /dev/block/loop2 /sde/media/0/bootmenu/cm11/data.ext4
exec /sbin/losetup /dev/block/loop3 /sde/media/0/bootmenu/cm11/cache.ext4
on boot
ifup lo
hostname localhost
domainname localdomain
Click to expand...
Click to collapse
red line "cm11" mean that you have created cm11 folder in boot menu and use these folder for example for booting into cm11! On these "cm11" folder you have created partitons, ramdisks, kernel...etc!
munjeni said:
Problem will be kernel and ramdisk since it need modification. Maybe we can ask devs to include ramdisk and kernel for multiboot in his posts.
Click to expand...
Click to collapse
Yes that will do some work for the people.. Atleast Custom Kernal Devs can include it.
Sent from my Xperia Z1 using Tapatalk
ROM ramdisk modifications
For example CM11 ramdisk.
when you unpack cm11 boot.img, when you unpack ramdisk you will notice 2 ramdisks, one is rom ramdisk and one is recovery ramdisk (ramdisk.cpio and ramdisk.recovery.cpio). Look into previous post for CWM ramdisk modification.
Modification for ROM ramdisk (ramdisk.cpio):
init.rc file:
look for line "mkdir /system", added one line before these line: "mkdir /sde"
fstab.qcom:
the same like you done on CWM ramdisk!
init.qcom.rc:
look for lines:
on fs
mount_all ./fstab.qcom
setprop ro.crypto.fuse_sdcard true
Click to expand...
Click to collapse
add:
on fs
wait /dev/block/platform/msm_sdcc.1/by-name/userdata
mkdir /sde
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata /sde rw wait
exec /sbin/losetup /dev/block/loop1 /sde/media/0/bootmenu/cm11/system.ext4
exec /sbin/losetup /dev/block/loop2 /sde/media/0/bootmenu/cm11/data.ext4
exec /sbin/losetup /dev/block/loop3 /sde/media/0/bootmenu/cm11/cache.ext4
exec /sbin/e2fsck -y /dev/block/loop2
exec /sbin/e2fsck -y /dev/block/loop3
mount_all ./fstab.qcom
setprop ro.crypto.fuse_sdcard true
Click to expand...
Click to collapse
red line "cm11" mean that you have created cm11 folder in boot menu and use these folder for example for booting into cm11! On these "cm11" folder you have created partitons, ramdisks, kernel...etc!
updater script in rom zip modification
For example you want to install cm11 in multiboot, ok, download an rom, for example download CM11 by FXP or one by Cyanogenmod, open zip, find, open and modify updater-script and change all lines:
1. for system:
Code:
.........."/dev/block/platform/msm_sdcc.1/by-name/system"............
change to:
Code:
.............."/dev/block/loop1"..............
2. for userdata:
Code:
............."/dev/block/platform/msm_sdcc.1/by-name/userdata"............
change to:
Code:
..........."/dev/block/loop2"................
3. for cache:
Code:
........"/dev/block/platform/msm_sdcc.1/by-name/cache"..........
change to:
Code:
..........."/dev/block/loop3"...........
4. for boot:
Code:
.........."/dev/block/platform/msm_sdcc.1/by-name/boot".........
change to:
Code:
............"/dev/null"...........
Note:
To understand this step. You doing these modifications since you going to install rom to partitions which you created on your internal sdcard! For example: if you not modify ramdisk, your rom will be installed to your phone partitions instead of one created by you! So to install rom to partitions which you have created, you must modify updater script to point installation to install rom into partitions which you created earlier instead of intalling them to regular partition! If you install rom to regular partitions that mean you will overwrite your main rom and bootmenu, so you will boot into cm11 on reboot instead of buting into multiboot! Hope thing clear?
Creating menuentry for new rom in multiboot (boot menu) settings.ini
Since you created partitions, since you modified ramdsiks, since you created kernel (sorry I removed post entry related to kernel modification... I will instruct you later!), since you modified rom zip which you want to install... you are ready for flashing! Before flashing rom to partitions, you need to add menu entry in settings.ini of the bootmenu!
How to add new rom entry to boot menu:
For example you created all partitons in .../bootmenu/cm11 folder
For example you have system.ext4, data.ext4, cache.ext.4, initrd.gz (modified cm11 ramdisk), and Zimage-dtb (modified CM11 zImage) in cm11 folder
Ok now you can add menuentry to setting.ini:
[rom-1]
menutitle=CM11
kernel=/data/media/0/bootmenu/cm11/zImage-dtb
ramdisk=/data/media/0/bootmenu/cm11/initrd.gz
cmdline=no_need_anymore
Click to expand...
Click to collapse
You are done! Title you have defined in "menutitle" will be displayed in boot menu!
Now you need to boot into cm11. When you boot into cm11 you will get "timing for recovery boot, led light!", if everything is propertly modified in all of the things you will get lucky to see led light where you need to pres volume button to get into recovery! If you enter into cm11 recovery that mean that you are in sucess , Ok now install your modified rom zip package (in these step cm11 will be installed to partitions which you have created earlier) and you are done! Reboot and enjoy cm11 in multiboot! The same steps is for all roms which you want in multi boot! Max roms is 10!
Not for noobs but hope our things is clear now for experienced users?

Categories

Resources