[Android] dsixda:
Frequently Asked Questions - Page 2

PLEASE DO NOT DUPLICATE THIS POST UNDER YOUR OWN THREAD

QUESTION: Does the kitchen support ROMs for Device X??

See post #1. If it is not listed there then I have not done anything for it, and I have no idea about it. Keep in mind that this is primarily a kitchen for HTC devices. Most of the ROMs for non-HTC devices that are supported in the kitchen are there because they are easy to support, as their file structure is not much different from that in HTC ROMs. However, certain devices use a completely different ROM file structure, so they are currently not supported in the kitchen. I am also limited by the fact that I only own one or two Android devices at a time, which affects the extent of my testing. Finally, please don't expect me to do every Android known device known to man, as I am a busy guy with mouths to feed, like a lot of you. ;)

QUESTION: Whenever I double-click on the 'menu' file in Linux or Mac OS X, the screen immediately closes or I get an error like "File not found."

No, do not click on the file. You were instructed to type "./menu" from the command prompt. Follow the instructions as they have been given. Please refrain from asking me this question again and again, or from requesting me to fix it - double-clicking is not how shell scripts are meant to be run!!

QUESTION: Whenever I type ./menu to start the kitchen it says "Permission denied."

Your file attributes are somehow missing the 'execute' flag. Type the command chmod 777 menu (or chmod +x menu) and try ./menu again.

QUESTION: In Cygwin whenever I type ./menu it says the 'clear' command (and/or other binaries like 'chmod') is not found.

Read this for possible solutions; however, these instructions only apply if you used the old (2010-2012) method of installing Cygwin for the kitchen.

QUESTION: What versions of the Java JDK are supported with this kitchen?

I have successfully built ROMs using Java 5 JDK and also later versions.

QUESTION: In the Advanced Menu's boot.img tools, why is there only an option to unpack a boot.img but not to re-pack it?

There is an option, you just need to unpack it first! Read this.

QUESTION: When I flash a ROM I get an error with a Status code. What does it mean?

Why don't you read the full error message first so that you understand why it's failing. Next, google the error. Anyways, this is what the status codes should mean:

Status 0 might be two things: 1) You used an update-script (Amend format, which is very old) when you should be using an updater-script (Edify format), or the other way around; OR 2) Your updater-script is using the "MTD" partition type when mounting a partition rather than another type such as EMMC (and thus, you need the device defined under the kitchen's /tools/edify_defs folder).

Status 6 might be two things: 1) You edited your updater-script with a non-Unix-compatible text editor. Don't use Notepad or MS-Word!! You must use something like gVim or Notepad++. OR, 2) There is a syntax error in your updater-script.

Status 7 means your mount points in the updater-script are wrong and/or your update-binary is not the correct type and doesn't support the syntax used for the mount points. Also, ensure your boot.img is using the correct instruction in the updater-script for flashing it.

QUESTION: I flashed a ROM and when it boots, it gets stuck on the splash screen (boot loop) or goes back to recovery menu.

If you are stuck on the splash screen, the first thing to try is to wipe the cache and dalvik-cache from the recovery menu. A full wipe may also be required, although I would not recommend it until you try the suggestions below.

Debug the issue with "logcat" (you need the Android SDK to use it):

Take out the battery so that the phone is turned off.

Then, go to the Android SDK, change to its 'tools' folder, and type "adb logcat". It will tell you that it is waiting for a device to be detected.

the phone into your computer's USB port, then turn it back on and check the logcat output. When the phone gets back to the same problem, check the logcat output for any error messages (e.g. missing files). This should tell you what the true problem is, which can hopefully be fixed.

If you want to direct the logcat output to a file, type instead "adb logcat > c:\logcat.txt".

If you want to share the output, paste it to a site like pastebin.com. If it's not a problem with the kitchen then post it in another thread in the Chef forum, rather than in this thread.

Another thing to do is to grab the "recovery.log" file immediately after you flash the bad ROM (BEFORE the first reboot!!). This shows a log of the activity during the current recovery menu session (i.e. during the flash). This log may also show errors that were not caught when you were flashing the ROM.

In Amon_RA Recovery, you can easily access this file by accessing the menu option "Other->Move recovery.log to SD", which moves it to /sdcard/recovery.log.

Otherwise, you can usually find it under /tmp/recovery.log or /cache/recovery.log or /cache/recovery/last_log with ADB. Try to copy it to a location where you can view it. e.g. Type from your computer: "adb shell", followed by "cat /tmp/recovery.log > /sdcard/recovery.log". Alternatively, from your computer you can do: "adb pull /tmp/recovery.log", which will copy it to your computer.

Open up recovery.log with a text editor, but don't use Notepad, because it will put everything on one line instead of multiple lines.

Check recovery.log for any errors that occurred during the flashing process.

Remember, you must grab the recovery log output immediately after flashing and before you reboot. If you had rebooted afterwards, then the flashing's log information would have been cleared and you will need to flash again to get the log output.

QUESTION: After I flashed a ROM, it doesn't boot but I get 'File not found' and/or 'No such file or directory' (usually in reference to /system/bin/sh) error messages in logcat.

The /system partition was not flashed properly due to an issue on your device. This usually could mean one of the following:

You ported the ROM incorrectly. If you open up the recovery log (see the instructions above) you may see the reason, such as the device running out of space or errors copying to the system partition. Sometimes this is because the ROM is too large to fit into the phone's relatively small system partition in the internal flash. In this case, remove unnecessary apps from the system folder until you manage to fit the ROM into your device.

You ran a script in your updater-script/update-script but it had errors, thus halting the flashing process and leaving you with an incomplete flash.

You added Apps2SD to a device that does not support it. Did you ignore the warnings in the Apps2SD screen of the kitchen? :P

An inspection of your recovery log should help you determine the exact cause.

QUESTION: I get errors in the recovery menu when I flash a ROM.

This may mean your update-script/updater-script has errors or there is an issue with how the kitchen created your ROM. Read the rest of the FAQ for potential solutions, or you may need to inspect the recovery.log to debug the issue (see above).

QUESTION: When I flash my ROM, some of my changes don't appear, e.g. Apps copied to my working folder's /data/app.

Check the recovery.log to debug the issue (see above).

QUESTION: Can you help me port a ROM? Or can you tell me if Device X's ROM can be ported to Device Y?

No, I am not an expert on porting so I cannot help you; however, there is a Porting option in the kitchen. Keep in mind though that it is not the magic solution for all devices and will not work all the time. It uses a very generic set of rules for porting, which can be seen if you open up the appropriate script files. The recovery log and logcat tool should help you debug issues with porting (see instructions above).

QUESTION: What is an update-script or updater-script file?

This is a file found under the META-INF/com/google/android folder, and specifies the operations required for flashing your ROM. It performs various file operations, such as creating file shortcuts (also known as symlinks or symbolic links), adding permissions to files, running scripts and copying files and folders. After flashing your ROM this file is not executed again.

The updateR-script is more advanced than the update-script and supports more devices. When you see someone refer to "Edify" format they are talking about the updateR-script; whereas "Amend" format refers to update-script.

The updateR-script also requires an update-binary file included with it. The update-binary contains all the binaries for the commands that the updater-script uses (e.g. set_perm, symlink, format, mount, etc.). The update-script does not need an update-binary.

Unlike the update-script, the updater-script is supported in newer versions of ClockworkMod Recovery.

QUESTION: Why do I need to convert the ROM's updater-script to an update-script when using the kitchen?

First of all, the kitchen supports updater-scripts. BUT, the problem is that the updater-script in different devices (and by different authors) may use various formatting/alignment styles, mount points, partition types and may also employ different commands for the same functionality, and thus there would be an awful lot of variations to check for every time a kitchen script is using it. Hence at the beginning, the kitchen will convert the updater-script into a

universal format

(e.g. I chose the update-script format) so that all the scripts of the kitchen will work on the ROM without encountering these issues. When the ROM is built, the kitchen converts it back to an updater-script with the correct syntax, and the partition details are fully restored.

If we didn't convert the updater-script then it would take A LOT OF work to overhaul the dozens of scripts to accept updater-scripts, which would really NOT make a difference in the end anyway, and would likely slow down the kitchen due to extra checks made in the updater-script. So please do not request this again and again, there is no gain in doing it. Believe me, I have spent many months and stayed up late many, many nights getting this update-script/updater-script compatibility issue working with the kitchen with all ROMs and numerous HTC and non-HTC devices.

When you build the ROM you have the option of converting it back to an updater-script, or the kitchen will convert it automatically if it decides it's necessary. The conversion back to the original updater-script is near-perfect, as I have already spent months on the implementation to get it right.

If you want to instead convert your updater-script or update-script *before* you build, then use the option found under the Advanced section of the kitchen menu.

QUESTION: I have converted my update-script to an updater-script, but after flashing

I still have the original ROM on the device

.

That means your updater-script did not have the proper mount points defined for the system (and/or data) partition. Refer to this post for more info. EDIT: You can now add your own mount-point definition file to the kitchen's "tools/edify_defs/" folder for when it creates the updater-script for your device.

QUESTION: My device only supports ROMs with the updater-script/update-binary files but not the update-script

If you extract a ROM that contains an updater-script, then the kitchen will ask you if it should convert it to an update-script. You *must* use an update-script while customizing the ROM, as the kitchen is not capable of modifying updater-scripts. When you are ready to build the ROM, though, you will need to convert it back to an updater-script if the device requires it. Use the option in the Advanced menu to convert update-script to updater-script, or else the kitchen will ask you to convert it while building the ROM.

QUESTION: When flashing my ROM I get the error "mount expects 4 args got 3" or similar.

This refers to the fact your mount command takes 4 parameters (e.g. ext4, EMMC, /dev/block/.., /system) and your update-binary file only checks for 3 parameters. You'll have to change the update-binary file to a compatible one, found under the /tools/update_files folder. Just copy the appropriate file and rename to update-binary. e.g. If you're going to be using MTD partitions, copy 'mtd-update-binary' to /META-INF/com/google/android as "update-binary".

QUESTION: How do I get Ubuntu to see my device with ADB?

First, download the Android SDK and copy it to a folder like ~/AndroidSDK/

Then, use the following commands:

cd ~/AndroidSDK/tools
./adb kill-server
sudo ./adb start-server
./adb devices

If you want to try Linux commands on your device, you can use the "./adb shell" command, e.g. ./adb shell reboot

QUESTION: I get the following error when flashing a ROM: E:Board does not support mtd utils.E:Failure atline 77: write_raw_image PACKAGE:boot.img BOOT:

Please see this post for the solution. In some recovery menus the boot.img cannot be flashed straight from the ROM's ZIP, so it needs to be copied first to a temporary area on your device and then flashed from there.

QUESTION: How do I add or port a kernel to my kitchen's working folder?

Follow the instructions here.

QUESTION: I get busybox errors during flashing; e.g. "Can't chown/mod /system/xbin/busybox (No such file or directory)" or "E:Can't symlink busybox ..."

Apparently you need to upgrade your SPL, and it has nothing to do with the kitchen:

http://xdaforums.com/showpost.php?p=5268241&postcount=12

http://androidcommunity.com/forums/276808-post16.html

http://xdaforums.com/showpost.php?p=4247486&postcount=5638

QUESTION: While flashing my ROM, I get an error about 'assert getprop ("ro.product.device")'.

Read about a solution here. You will likely need to modify your build.prop and update-script files in the kitchen and rebuild the ROM.

QUESTION: I created a ROM with root permissions, but whenever I access an app with the superuser prompt, it hangs or force-closes.

Under Settings/Applications, ensure that USB Debugging is enabled. You probably disabled it after flashing your ROM.

QUESTION: When I flash my ROM in the recovery menu, I get an error like "E:Can't open (bad)".

You may need to change your custom recovery menu. For example, see here.

QUESTION: How do I add a theme to my ROM?

I don't know, as I just write the scripts and am not a ROM theming/modding expert. Please ask in the forum but not this thread, as I cannot help you with your question. Sorry.

QUESTION: Can you add APK decompilers and other APK modding tools? Or how about PNG optimizers?

See this answer.

QUESTION: Can you give me an explanation of de-odexing?

De-odexing will take the *.odex files in your ROM and convert them into classes.dex files, which will then be zipped into their corresponding APK or JAR files. For a technical overview, read this. A short summary of why it is used is in this post.

QUESTION: Can you add an option in the kitchen to odex a de-odexed ROM?

No. I don't know how to do it with a kitchen and probably don't have the time at the moment.

There is a way to do it, but not from your computer. The odex script must be run on your device - within the Android command shell - after the de-odexed ROM has been flashed (I don't have the script, just Google it). (Here's a thread about it but the link to the script is dead.)

QUESTION: Why do some applications in the data/app folder force-close and others don't?

Probably they have native libraries which are not installed after you flash your ROM. Use the Application Verifier in to check such apps, and to make the required update.zip to flash after you have installed the ROM (see the Plugins section in this thread, after the FAQ).

QUESTION: When we build the ROM, why can't we create a new system.img instead of a ZIP file?

Read this post.

QUESTION: What is Apps2SD and what version does the kitchen use?

There are multiple 'types' of Apps2SD -- one is the implementation found in Android 2.2+ that gives you the option of moving your apps to the SD card. Normally however, this does not move all of the app components to the SD card, and not all apps support this feature.

The other Apps2SD is sometimes referred to as "Apps2Ext" and

requires an extra step by the user

beforehand to format a new EXT-based partition on your SD card for the apps (normally an SD card is in FAT32 format). Unlike the 'Froyo Apps2SD', the Apps2Ext feature moves everything to the SD card, even apps that normally do not support the storage card option. The Apps2Ext version is found in the kitchen as DarkTremor's Apps2SD (by XDA user tkirton) and supports older devices that have a very limited amount of internal storage.

QUESTION: I am using Ubuntu Linux on a 64-bit Windows PC, and whenever I run 'zipalign' I get an error about "No such file or directory".

You need to install the Ubuntu package "ia32-libs".

QUESTION: Can you include an option to overwrite the ROM's existing Apps2SD with the one in the kitchen?

Answered here.

QUESTION: Can I copy this FAQ for my own thread?

No, that's plagiarism. You are a lazy bum and I will hate you.

.