android kitchen - Android Builders Collective

Hi Guys
I'm trying to create my own update.zip just as a test for android kitchen.
I have the block devices
SYSTEM -> /dev/block/mmcblk0p9 and
BOOT -> /dev/block/mmcblk0p5
which I have dumped to system.img and boot.img using dd if/of and pulled with adb to my machine
I've then run android kitchen and regenerated the update.zip file without customizing anything, so essentially just putting back what I took off the device.
When I update in CWM I get an error in the zip file,no other data or info than that, has anyone else had success with android kitchen?
I have tried with and without signing the zip.
TIA
Xarion

I cooked stockrom for 6.0 (api23) with old standard kitchen but i failed with it on a 5.1 (api22) so i tried Superr kitchen with also less success. ASSAYYED_KITCHEN seems to be "better" (up to date).

Related

[Q][RK2818|Archos 7HTv2] "No Space left on Device" during flash

A little background, I am trying to flash a Honeycomb rom to my Archos 7HTv2. This is a custom rom that I put together. I know that Honeycomb requires much more power than my Archos can give me. I know that it would probably be unusable, but I was curious, and it brought up a problem.
The system.img for the HC rom is ~112mbs, the total update.img is ~123mbs
The system.img for the stock rom is ~51mbs the total update.img is ~54mbs
I first tried to flash it and got a "not enough space" error when flashing the system. I assumed that the stock rom barely fit in the system partition, so I went looking for how to make it bigger.
Flashing on the Archos is by putting an update.img in the SDcard, or by using the "BatchUpgrade" utility from the computer, which copies it to some temp on the device. Then the recovery takes over and installs the rom.
Code:
Writing KERNEL:...
Checking KERNEL:...
Writing BOOT:...
Checking BOOT:...
Writing SYSTEM:...
E:Write failed(No space left on device)
E:Failure at line 16:
write_image PACKAGE:system SYSTEM:
Update failed, please reboot and update again!
Line 16 refers to the update-script file which has the list of Writing & Checking.
When I flash the rom from the computer using "BatchUpgrade" it fails before it can attempt unpacking. It just tells me "FAILURE" and no specifics as to why. Because the img never begins unpacking makes me believe it might be the temp area is not big enough for the .img and the extracted components.
I found this mtd information in the HWDEF file (part of update.img)
Code:
#Format: part_name offset:size
parameter 0x00000000:0x00002000:fh
misc 0x00002000:0x00002000:f
kernel 0x00004000:0x00004000:f
boot 0x00008000:0x00002000:f
recovery 0x0000A000:0x00004000:f
system 0x0000E000:0x00030000:f
backup 0x0003E000:0x0003A000:
cache 0x00078000:0x0003A000:
userdata 0x000B2000:0x00100000:
user 0x001B2000:0xFFFFFFFF:
END
I changed the system and backup partitions to be bigger (the above is stock) but nothing happened. I then found the PARAMETER file which had a similar string of mtd definitions, I updated them as above. Still no luck.
Anyone have any ideas?
Thanks
Do you had any luck?

[Q] How To Modify default.prop?

Hello Everyone,
Thank you in advance for any help on this item.
I have an HTC Sensation phone which is already S-off and has CWM in it.
It also has "su" previleges in it and I was able to modify CID too.
The ROM inside it is stock ROM.
I have been reading and following several guides on how to modify default.prop for other devices. And from what I gather I have to do the following :
1. Unpack boot.img.
2. Modify default.prop.
3. And repack boot.img.
The problem here is that I tried all sorts of things only to end up failing in the "repacking" stage.
I want to modify default.prop to be able to set adb daemon (adbd) to have root previleges and eventually be able to "inject" into HTC sensation my own custom-made versions of framework.jar and other files.
Is modifying default.prop possible?
Is the method I am using correct?
Is it possible to have my own customized framework.jar inside the HTC Sensation?
I hope you guys can point me to some sites and links which can help me in what I intend to do.
Thank you all very much.
Use dsixda kitchen.
Hello Sebastian,
Thanks for your response.
I also tried to use the dsixda kitchen.
What I did was :
1. Downloaded a backup of my phone using ClockworkMod Recovery.
2. I took the boot.img file from the backup generated.
3. Unpacked boot.img using the kitchen.
4. And then repacked it using the kitchen again.
5. I then flashed the generated boot.img into the phone.
6. The phone went into a forever loop in the start up screen.
Did I do it right?
I am rechecking the notes on the kitchen again though. I might have missed something.
Thanks again.
Upload your boot.img, I'll check it. Do you use fastboot.exe to flash boot?
Hello Again,
Thanks once again for the support Sebastian.
"Upload your boot.img, I'll check it. Do you use fastboot.exe to flash boot?"
I use fastboot.exe first and then try to use the ClockworkMod Recovery Advanced option to update the "boot" only part.
I am attaching here my dsixda-kitchen generated boot.img.
This boot .img was generated with the following steps :
1. Unpack htc stock rom boot.img generated by CWM nandroid backup.
2. No changes were made in the ramdisk nor in the kernel part.
3. Repack the ramdisk and kernel using dsixda kitchen.
4. Used fastboot.exe to flash the boot part. "fastboot flash boot boot.img"
5. Wiped the cache partition of the phone.
6. Wiped the /data/dalvik-cache directory.
7. Restarted phone in normal mode.
8. Phone hanged up in startup image.
Many thanks again and more power.

[SCRIPT] Multiboot via loop file, completely rewritten [25/10]

The script is now completely rewritten and a lot easier to use.
This is the general walkthrough for this script, if you have more questions than this answers please ask in this thread.
Download and unpack the script to the root of your sdcard, the easiest way to do this is to download it to the root of the sdcard and do the following:
1. start terminal session
2. cd /sdcard
3. tar xvf MakeLoopROM-Android-V11.tar
===============================================================================================================================
NEW! READ THIS! - The original ROMs and Packages are now stored in /sdcard/MakeLoopROM/original-roms and /sdcard/MakeLoopROM/original-packages. Copy the ROMs and packages
that you want to convert into those folders!
===============================================================================================================================
Ok, once you're done there you're ready to start the script, it's now completely menu driven.
1. start terminal session
2. cd /sdcard/MakeLoopROM
3. sh startup
That will start up the menu, for a new ROM work your way from 1 - 4 to make your first loop ROM, at the end of 4 it will be ready for installation, for upgrades that install into
existing loop files (that you have made once with step 1) start at step 2.
The menu options and how they work:
1. Make system, data or both loop files
This option will allow you to do just what it says, make the system and data images you'll install your ROM into, it's very
straightforward but i'll give a brief summary of how
it works.
"Do you want to make an image file to hold the system for this ROM? (not neccessary if it's an upgrade from a previous ROM) Y
for yes N for no."
Pretty straightforward, if you don't have a system loop file enter y for yes, if you're going to upgrade then running this
step is completely unneccessary but since you have
chosen to run it, press no.
"What do you want to call your system image? (give it a name you'll remember, like cm-7-system for a cm-7 loop install)"
Name the system loop file, call it whatever you want but make it something relevant to the ROM or you'll end up wondering what
that file is for when you stumble upon it at a
later time. it'll be stored under /multiboot/system-loop-files when it's done.
"What size do you want your system image to be (in MB's)? (WARNING: if you make it too small your ROM +other packages like
gapps might not fit, make it 250)"
The size of /system for the loop ROM, read the thread you downloaded the ROM from to find out what size is ok, i just use 250
for everything in case i want to reuse it with full
at a later time.
"Do you want to make an image file to hold the data for this ROM? (not neccessary if it's an upgrade from a previous ROM or
you want to share a data image with another ROM)
Y for yes N for no."
Same as with the system loop file, if you don't have one, you'll want one, if you're upgrading you shouldn't be running this
step but there is another time when you want to say
no to this, when you want to share a loop file with another installation (not with NAND ROMS). Like for example if you want to
share the data partition between CM-10 and PA-JB.
"What do you want to call your data image? (give it a name you'll remember like cm-7-data for a cm-7 loopinstall)"
Same as for the system loop file, just name it something relevant, the name is of no importance to it's function.
"What size do you want your data image to be (in MB's)? (This file will hold all of your data, don't skimp on the size)"
How many apps do you plan to install? 10 - 50 - 500?
Make it a size that you can live with and that will fit on your sdcard, it really depends on how many apps you'll install.
2. Make a Loop ROM
It's exactly what it says, this will make your loop ROM ready for installation.
"Available ROMs:"
just enter the number that's next to the ROM you want to convert, if it's not there it's because you didn't copy it to /sdcard
/MakeLoopROM/original-roms, you can do so now and
hit r to refresh the list.
"You previously created the system loop file [nameofyourfile], do you want to use it for this ROM? (y/n)"
You'll only get this question if you created a system loop file by going through step 1. If you did so and that's the file you
want to use (check the [nameofyourfile]) then
answer y for yes, otherwise you answer n for no and the following question comes up.
"Available system loop files:"
This choice will only come up if you answered no to the previous question or didn't make your system loop file with the script
in step 1 during this session. Anyways, just enter
the number next to the file you want to use as a system loop file.
"You previously created the data loop file [nameofyourfile], do you want to use it for this ROM? (y/n)"
See the system loop file above, this is the same but for the data loop file
"Available data loop files:"
See the system loop file above, this is the same but for the data loop files
Do you want this installation to format the data image used with this ROM?
Answer Y for yes if it's a new installation and N for no if you are upgrading
and want to keep the data on the data image. (Say yes if you would run wipe
data/factory reset in recovery if this was a normal install)
Y if this is a new install or you're reusing an old data loop file that you want to wipe.
when done hit enter to get back to the menu.
3. Make a loop package (such as gapps)
This, like it says, is for converting non-rom packages (not kernel packages though) such as gapps or bravia or what have you.
"Available packages:"
type the number that is next to the package you want to convert, if the package isn't there you didn't copy it to /sdcard
/MakeLoopROM/original-packages
"You previously created the system loop file [nameofyourfile], do you want to use it for this ROM? (y/n)"
You'll only get this question if you created a system loop file by going through step 1. If you did so and that's the file you
want to use (check the [nameofyourfile]) then
answer y for yes, otherwise you answer n for no and the following question comes up.
"Available system loop files:"
This choice will only come up if you answered no to the previous question or didn't make your system loop file with the script
in step 1 during this session. Anyways, just enter
the number next to the file you want to use as a system loop file.
Repeat No. 3 for all your packages
4. Make (or update) NAND boot image.
This will read the information in your boot partition and store it as boot.img under /sdcard/multiboot so you can boot back to
your NAND installed ROM by running step 6 or
flashing nandboot.zip (also stored under /sdcard/multiboot) from cwm.
Run this every time you update your NAND ROM so the boot.img is fresh.
"This script will update your nand boot.img in the multiboot folder to the version of boot.img you're currently running, make
sure you're running the updated ROM and not
a loop ROM before hitting Y for yes here. If you're not sure type N for no."
If you updated your NAND ROM or haven't run this option before you have to say y for yes here, you have to run this option at
least once or you can't boot back to NAND. Just
make sure you've got your NAND ROM booted and not a loop rom because this will take the boot partition content of your
currently running ROM.
5. Remove a loop installation
If you've come this far you know what you're doing in this option. I'm not going to go through all combinations but they are
self-explanatory.
6. Boot an installed ROM.
Exactly what it says, just remember that even non-installed ROMs may be listed here, if you happen to try to boot to one of
those it will hang at boot, in that case, pull the
battery, reboot to recovery (press and hold vol down while you press power) and use the boot zips that have been created for
your roms.
the Boot zips are located in /sdcard/multiboot/nandboot.zip for the NAND and /sdcard/multiboot/loop-roms
/[namofyoursystemloopfile]/[nameofyourROM]boot.zips
I think that's all, if there is any questions, feel free to ask.
Android version: MakeLoopROM-Android-V11.tar
MD5: 1b33ad6c3078711444c01867e436b65a
===============================================DEPRECATED==============================================================
It took a while but i managed to sort out how to boot to loop filesystems stored on the SD-card.
This means that you don't have to partition anything and you can have as many ROMs installed as you can fit on your SD-card.
You don't have to worry about a2sd/S2E/mounts2sd or anything like that (just make your data partition large enough to hold your apps, you can share the data partition between as many loop ROMs as you like) but this doesn't prevent it either, your sd-ext partition will be untouched and mountable by any ROM you install into a loop file (if the ROM supports sd-ext, that is). Swap will work just fine too.
The script is self explanatory but there are a few things it doesn't explain so i'll explain it here.
Here we go:
1a. Download the MakeLoopROM(version).zip and unpack it to any directory of your choice, just remember where you put it, if you're going to do this under cygwin i suggest you put it in a directory that is easily accessible from the cygwin terminal (IE cygwin/home/"yourusername") and if you're using Linux, just unzip it to your home directory.
1b. Download the MakeLoopROM-Android.tar and unpack it to the root of your sdcard or copy the file to the root directory of your sdcard, open up a terminal session and run tar -xvf MakeLoopROM-Android.tar.
2. Copy the rom and gapps and whatever other package you want to convert to the MakeLoopROM directory that was created during the unzipping above.
3a. In Linux, open up a terminal, cd to the MakeLoopROM directory and type sudo ./makelooprom (losetup requires root permissions).
3b. In windows, open up the cygwin terminal, cd to the MakeLoopROM directory and type ./makelooprom-cygwin
3c. On Android, open up a terminal session, type su and hit enter, type cd /sdcard/MakeLoopROM and hit enter and then sh mkrom and hit enter.
4. Follow the instructions, it should be easy enough to understand.
5. If you want to convert a gapps package and/or other packages you repeat step 3 but type ./makeloopgapps instead of ./makelooprom it'll work for any package you want to install into your loop files, root is not needed for this step.
5a. For android you type sh mkgapps to make gapps and other packages.
6. To be able to reboot back to NAND (the ROM on your phones internal storage) you need to copy the boot.img of your current ROM into the multiboot directory.
6a. The android version now copies the running boot.img if you answer yes when you get the question if you want it to so there is no need to copy it in another way.
After you're done converting your ROM and the packages you'll find all important stuff in the multiboot folder within the MakeLoopROM directory, just copy the whole folder to the root of your SD-card (if you are running on android this step is unneccessary, the script will copy the files for you). You'll find your image files under multiboot (if you created them) along with the "nameofyourrom"boot.img and boot"namofyourrom".sh that you'll need to boot into the ROM from another ROM and finally under loop-roms/[nameofyoursysimage] you'll find all your converted ROMs and packages, ready for installation.
Now you're ready to install the loop ROM and the loop packages, it installs like any other ROM/package via your recovery of choice (I recommend my CWM Touch 6.0.1.1, it's what this is tested on but it should work fine on any recovery).
To switch between ROMs you open up a terminal window, type su to get root permissions, cd to the multiboot folder (cd /sdcard/multiboot) and type sh bootnand.sh to switch to your internal ROM or boot"nameofrom".sh (bootcm-7.2.0-blade.sh if you installed cm-7.2.0-blade for example) for any of the loop roms. You can also install script manager and script manager widgets and make widgets for those scripts on your homescreen, that way rebooting to another rom is as easy as pressing the icon on your homescreen.
I'm sure there'll be a lot of questions about things i haven't thought of, but if you should fail or do something wrong then just hit ctrl-c and start over, the script cleans up and restarts the build.
Thanks to:
[email protected] for some ideas.
championswimmer for some scripts from his Kernel Kitchen.
Tilal for suggestions that helped fix running this script on the phone itself as well as the app he's making to make reboots between the different installs much easier and better.
[email protected] for being a very patient tester.
Files:
Linux version: MakeLoopROM-Linux.tar
MD5: 8907e2519276f4abcbb5bab0de168ae5
Windows Cygwin version: MakeLoopROM-Windows.zip
MD5: 096921e7a08eba98329bb7ec486068f0
Android version: MakeLoopROM-Android-V8.tar
MD5: f4ee326faf65bd032a95a1e2b4e8bc9f
25/10:
* Completely rewritten, it's now entirely menu driven with choices so you don't have to type filenames.
* Fixed faulty boot flashing
* Now copies a flashable zip of each loop ROM and NAND ROM boot images to /sdcard/multiboot for NAND and /sdcard/multiboot/loop-roms/[nameofyoursystemloopfile/[nameofyourrom]boot.zip so you can flash it via CWM if you need to.
* Includes a cross compiled version of bash for arm to fix a lot of scripting problems.
12/10:
* Streamlined, a LOT faster now.
* Possible fix for the random faulty boot.img flashing when switching between ROMs, need feedback on this.
* Removed unnecessary file creation (all of it runs within one loop file and questions (if you create the system and data images you won't get the question twice, it checks if your ROM is a JB rom without your interference).
* Added cleanup script, to use it run sh cleanup as su and follow the instructions.
* Lots of other bits and pieces that makes it safer and faster to use.
3/9:
* Fixed the Android version to work with CM7 roms [changed let=size to size=$(expr], thanks to Sulthekk for the heads up on that
* Added a failsafe to the Android version on creation of system loop file if it already exists and on giving the script a name for system and data image that doesn't exist. You get one retry, if you can't get it right after that... It is possible to multitask on android, just open a file manager if you forgot the name of the system or data image.
* Fixed the Linux and Windows versions to work with JellyBean ROMs, thanks to jpeg729 for the heads up on that
* Change the file names to reflect which version is which
1/9:
* Finally fixed the problems with no permissions running the script on some ROMs.
1/9:
* Added the choice to copy your currently running roms boot.img to your multiboot automatically, no user interaction needed for the process.
31/8:
* Changed the android version to a tar to keep file permissions intact.
* Fixed it up so it runs on CM-10 and PA as well as all other roms (i hope).
30/8:
* Release of the Android version, now runs completely on your phone.
28/8:
* Changed the Linux version to tar format to ensure that permissions are correctly set.
* Fixed the Cygwin version so it can make the data and system image files, they will be formatted on install and if it's a new installation you have to choose y to format the data image file or it will not have a filesystem.
* Changed a few misspellings in user interaction texts and tried to make it easier to understand.
Woah. Cwm and Multiboot in a week's time?
When you getting your RD status?
Good work man
Sent from my Ouya
QuantumFoam said:
Woah. Cwm and Multiboot in a week's time?
When you getting your RD status?
Good work man
Sent from my Ouya
Click to expand...
Click to collapse
I've got one third project that i'm about to wrap up and after that i'll just do incremental updates on those three while devoting my time to kernel development which is sorely needed.
Found a util for windows called winDD, i'll check it out and include it in the next version if it's of any use. That will fix the problem with not being able to create the loop files on windows.
I've built makebootfs and makebootimg for android and will include them along with a script that works on android in the next release.
I'll make the next release a tar version along with a zip version for windows users, this is to preserve file permissions.
Any other suggestions are most welcome.
After a lot of issues i finally got the Android version ready, i've tested it and it works fine on my phone, both the makelooprom-android and the makeloopgapps.
I had to cross compile perl and the mkbootfs and mkbootimg files to run on armv6l which took a while because i kept getting errors, both are included with the script.
Then there was a problem with running split-bootimg.pl on the sdcard, fat32 doesn't support symbolic links so i had to make three different loopfiles within the script to use for bootimg-contents ramdisk-contents and output.
Anyway, now it runs just fine, try it out.
New version up and running.
Only for zte blade ?
Sent from my B15Q using XDA Free mobile app

[Q] system.img file extraction

Hello guys,
I am trying to extract the system.img file from the Note 10.1 2014 edition stock ROM. It seems that Samsung had also manipulated the file system again. I used to generate an ext4 img file, so that I can mount it in Linux Reader on Windows. However, this method is not working any more.
The tool I used was sgs2img.jar, but as I said, it gets stuck on 32 bytes.
Any idea??
tweetatoo said:
Hello guys,
I am trying to extract the system.img file from the Note 10.1 2014 edition stock ROM. It seems that Samsung had also manipulated the file system again. I used to generate an ext4 img file, so that I can mount it in Linux Reader on Windows. However, this method is not working any more.
The tool I used was sgs2img.jar, but as I said, it gets stuck on 32 bytes.
Any idea??
Click to expand...
Click to collapse
I managed to extract a previous version of firmware of P600, MID, using first Chainfire's sgs4ext4fs utility - https://github.com/Chainfire/sgs4ext4fs - (compiled for Windows). First I trimmed the img with "sgs4ext4fs --trim system.img systemt.img" then I used sgs2ext4.jar to make the systemt.ext4.img file that could be mounted with Linux Reader.
However, the new MJ6 version doesn't work like that.
Maybe someone else could find out what's changed with the new versions.
I attached the Windows version of sgs4ext4fs utility because the source code must be slightly modified for Windows.
and.. did you extract the system.img ? I cant do it also from MK1 base for P600, and i wanted to make rom for that type

Galaxy 2 (EK-GC200) recovery / backup / restore

Hello all,
I really need, for a commercial project, to flash a great number (>100) of Galaxy Camera 2 (EK-GC200() device, all with the same firmware, rooted and modified as I need.
I have to flash boot.img (modified by me) and system.img (rooted).
I have now to root the camera, then start the system, enable developer options, enable adb debug and at the end flash a new boot.img, and the system.img itself (adb shell, dd ...).
This is time consuming, and error prone.
I'm sure the boot.img & system.img are correct, cause I can flash them without error (and they work fine) with dd from the internal emulated sdcard.
I can see two viable alternatives:
1. A custom recovery, from where I could make a nandroid backup, which I can use later on to update all the rest of the cameras.
But:
I tried to port the EK-GC100 cwm recovery, I've been able to boot it up, but the touchscreen is unusable and I got a lot of error coming from the file system.
Please help me! Any suggestion, half project, everything is really appreciated!
2. To create an Odin package, using the .img files I can optain with dd from a ready camera.
But:
I tried all I can do to build a Odin package, but every time I got an error (Odin Fail) when I try to flash system.img.
I tried to build a package containing recovery.img + boot.img, and that works.
I tried to build a package containing only system.img, and it doesn't work, every time I got a Fail from Odin.
I tried manual compression (tar + md5sum on Linux), and automated scripts you can find on XDA, both under Linux and Windows.
Why is system.img impossible to flash?
What am I missing?
Thank you in advance.
Ciao,
Giovanni

Categories

Resources