[Q] How to change Grub Menu Top Title? - Off-topic

I am curious how to change the part that say "GNU Grub Version 1.99-27" at the very top of the boot loader. I have changed my menu entries, the boot order, and the background, and it looks AWESOME! Cannot figure out how to change the top title though. I have searched the web for this issue, and this is the feedback:
Precisely, this is a localized string "GNU GRUB version %s", which resides in /usr/lib/grub/i386-pc/normal.mod.
A few solutions, if you really want to change it:
Build your own packages, with a patch in the source code (see const char *msg in grub-core/normal/main.c) or in the po/ locales;
Modify the appropriate po file with, for example, poedit, then recompile it to an mo file and put it in /boot/grub/locale.
I do not understand what that is telling me to do. Could someone break it into steps for me? Thank you in advance

Related

How to edit .9.pngs

If you have tried to edit .9.pngs in the res/drawable folders, then you know the reason for this thread. If you have not, the idea is that .9.pngs do not have a static boundary. Instead the boundary is given by a continuous mapping
b:[0,1) --> R^2
wherein the mapping is defined by guides which cannot be seen in regular graphical editing programs. This will give the basic idea, along with an example of how this works.
What you will need:
1.) draw9patch (found in /tools of the Android SDK: http://developer.android.com/sdk/index.html)
2.) gimp (or equivalent graphics software)
3.) Java 1.6 (not 1.5)
4.) Eclipse 3.5 with ADT 0.95 (Setup to compile android 1.6. Instructions: http://developer.android.com/guide/developing/eclipse-adt.html) It is assumed you are comfortable with eclipse. There are many threads on setting up eclipse, along with the linked instructions, so try and keep eclipse questions in this thread to a minimum.
Step-By-Step
1.) Find your desired file to edit, which from here on will be referred to graphic.9.png, and rename to graphic.png.
Reason: We will open the file in gimp (or an alternative .png editing app) which will not recognize the .9.png, and will open as .png. This will cause the invisible guides to open as filled in, and thus the guides will need to be redefined before we save. If we open a .9.png extension in draw9patch, it will assume the guides exist, which of course will not if we edit in another application, and thus not be added. By changing the extension to only .png, when opening in draw9patch, the guides will be re-added.
2.) Open graphic.png in gimp and do your desired editing.
3.) In your computer terminal enter draw9patch (assuming you added /tools to your path, otherwise in the terminal navigate to /tools in the AndroidSDK and enter draw9patch). Possible Issue: If draw9patch comes up blank with no menu, you do not have Java 1.6 set as default. Fix this via sudo update-java-alternatives -s java-6-sun in the terminal (or something similar for your system).
4.) Drag and drop graphic.png into the resulting draw9patch window. What you will now see is your image, along with transparent lines which will be where your guides are defined. One should read this http://developer.android.com/guide/developing/tools/draw9patch.html, though it is not that clear. Draw9patch allows you to add/remove black squares which define the actual guides. I will admit that this is one part of the process that I am still not completely comfortable with, and sometimes requires a little trial and error. Here is what I have figured out:
(i) You will want to draw a solid black line along the bottom and right edges of your image. This designates the boundary which results from the region which is stretched.
(ii) You will now add black squares to the top and left sides. These designate the solid part of the region that will be stretched (as opposed to staying transparent).
As I stated before, this part is a little confusing, but with some trial and error, anyone can figure it out. See my following example to witness the guides being used.
5.) After the guides are defined, save the file in draw9patch. This will automatically append .9 to the filename, and give an actual .9.png file that has been edited (now called graphic.9.png). We are not quite done though, because as is, the guides will not be recognized by the android OS. The images need to be compiled in eclipse as part of an apk.
6.) Open Eclipse and create a new project. You can name it anything you like, and you can just uncheck defining an activity. This project will automatically generate a res/drawable (or res/drawable-hdpi) folder, in which you will drag and drop graphic.9.png. From here, right click on your project, choose "Android Tools", and "export unsigned android application".
7.) In step 6 an .apk was created (I choose to save to desktop), extract the files, and open the folder in which graphic.9.png was placed. This is your newly edited, ready to use .9.png. Enjoy and have fun theming.
Example: How to change the outline of the inner squares on the power widget from orange to white.
1.) I take the file appwidget_inner_focus_c.9.png (found in Settings/res/drawable) and rename to appwidget_inner_focus_c.png.
2.) Open in gimp (figure_1) and change color to white (figure_2).
3.) Open draw9patch
4.) Drop appwidget_inner_focus_c.png into draw9patch (figure_3) and define guides (figure_4). In fig.3 the purple color is showing where the patch will be applied (i.e. where the stretching will occur). After I define the guides, (fig.4) note the vertical and horizontal green lines with signify the only color stretching will be along the boundary itself.
5. Save the image as appwidget_inner_focus_c.9.png (anywhere you like).
6. Drag and drop the file into the res/drawable-hdpi folder in your project folder (navigate to through regular computer file browser). Note that it is in the correct folder (fig.5). Right click on the project (in my case Aaron) and choose Android Tools, the export unsigned android application. Aaron.apk now appear on my Desktop (I chose desktop to export to), which I extract my appwidget_inner_focus_c.9.png from.
7. I am now done.
You don't actually need to use the draw9 tool. You can use your favorite photo editing software, whether it be Photoshop, Paint.net or GIMP and you can just add a 1px wide black border where needed and it works just the same.
Of course if you download the source from cyan's github then you can edit them from there, the source code is unprocessed so it still has the 1px black border around it. To me this is the easiest way to do it, then you don't have to worry about where you place the lines, they are already there.
After you edit, then you still need to do the above in eclipse.
jairomeo said:
You don't actually need to use the draw9 tool. You can use your favorite photo editing software, whether it be Photoshop, Paint.net or GIMP and you can just add a 1px wide black border where needed and it works just the same.
Of course if you download the source from cyan's github then you can edit them from there, the source code is unprocessed so it still has the 1px black border around it. To me this is the easiest way to do it, then you don't have to worry about where you place the lines, they are already there.
After you edit, then you still need to do the above in eclipse.
Click to expand...
Click to collapse
Wow, that is much easier, thank you.
Is it necessary to do step 6?
I find out the answer yes
Ok. So, everything was going great, but I ran into a problem. I am able to edit my .9.png's just fine. However, when I "export unsigned android application" in Eclipse I get an error that the package does not exist. Looking closer I see that one file in the package explorer has a little sqaure 'x' by it. If I delete that file it works perfectly, but I want that .9.png to be in there. Any clues on why this would happen? Any help would be greatly appreciated. Thanks for the great tutorial by the way. After you edit so many .9.png's you get a little used to it and it's really easy.
athanos said:
Ok. So, everything was going great, but I ran into a problem. I am able to edit my .9.png's just fine. However, when I "export unsigned android application" in Eclipse I get an error that the package does not exist. Looking closer I see that one file in the package explorer has a little sqaure 'x' by it. If I delete that file it works perfectly, but I want that .9.png to be in there. Any clues on why this would happen? Any help would be greatly appreciated. Thanks for the great tutorial by the way. After you edit so many .9.png's you get a little used to it and it's really easy.
Click to expand...
Click to collapse
Thats usually caused by a bad 9patch. The 1px marquee around the real image can only contain full transparent pixels our full opaque pixels (the patch guides).
Open your png with gimp/photoshop/whatever and look into that area to see if there's something painted.
athanos said:
Ok. So, everything was going great, but I ran into a problem. I am able to edit my .9.png's just fine. However, when I "export unsigned android application" in Eclipse I get an error that the package does not exist. Looking closer I see that one file in the package explorer has a little sqaure 'x' by it. If I delete that file it works perfectly, but I want that .9.png to be in there. Any clues on why this would happen? Any help would be greatly appreciated. Thanks for the great tutorial by the way. After you edit so many .9.png's you get a little used to it and it's really easy.
Click to expand...
Click to collapse
If you look at the errors it will tell you which file is bad and even if it's the top, bottom or sides that have a bad pixel in the border.
if someone want to help me how to do this on msn pleas PM me , im noob on eclipse
Why is the Eclipse part needed? I have no problem compiling my apk without doing that.
This thread is quite old. Apktool (my signature) is able to properly decode 9.png files - it adds borders where they should really be. Don't waste your time on adding them by hand.
can you be more precisly?
how to handle for example with the genie.widget?
there are 3 9.pngs included which i want to edit....
pa.pn2 said:
can you be more precisly?
how to handle for example with the genie.widget?
there are 3 9.pngs included which i want to edit....
Click to expand...
Click to collapse
you would do each 1 as presented earlier.
copy all 3 to main workspace used for eclipse and export unsigned.
then you need to replace the .pngs within the widget.
if its not a system ul most likely have to sign the app aswel.
may have to look around for how to do this
Someone correct me if I am wrong.
But I came upon this piece:
osdir.com/ml/Android-Developers/2011-01/msg00529.html
The format is standard PNG. Build tools add a custom chunk containing patch data.
Click to expand...
Click to collapse
So you still need to patch the .9.png and that is done as one part of the build process. (step 6)
Is there a more direct way of doing it?
dabicho said:
So you still need to patch the .9.png and that is done as one part of the build process. (step 6)
Is there a more direct way of doing it?
Click to expand...
Click to collapse
No, aapt is only one tool, which does borders -> 9patch chunk conversion and it always works on a whole project, not single PNG. But it should be quite easy to create such tool - I've already done 9patch -> borders converter in apktool.
Much easier way to compile 9patch without Eclipse. Post #11.
http://forum.xda-developers.com/showthread.php?t=816412&page=2
cloverdale said:
3.) In your computer terminal enter draw9patch (assuming you added /tools to your path, otherwise in the terminal navigate to /tools in the AndroidSDK and enter draw9patch). Possible Issue: If draw9patch comes up blank with no menu, you do not have Java 1.6 set as default. Fix this via sudo update-java-alternatives -s java-6-sun in the terminal (or something similar for your system).
Click to expand...
Click to collapse
what if it doesnt come up at all?????
I have everything installed the way it should :
Android SDK (updated)
Eclipse
ADT Plugin
Java SDK 1.6
Here is the message that I get on my terminal (using mac)
Code:
imad-zianis-macbook-2:tools Juevani$ ./draw9patch
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesktop/swingworker/SwingWorker
at com.android.draw9patch.Application$1.run(Application.java:48)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
imad-zianis-macbook-2:tools Juevani$
Check this out for swingworker-
www.google.com/m/url?channel=new&cl...8QFjAD&usg=AFQjCNGOD3KbL8SfFArOUOHWRzT0CQZezg
dully79 said:
Check this out for swingworker-
www.google.com/m/url?channel=new&cl...8QFjAD&usg=AFQjCNGOD3KbL8SfFArOUOHWRzT0CQZezg
Click to expand...
Click to collapse
You sir are a life saver thx alot
Ok, I just can't figure this out. I am going insane trying to figure this out. this is what I got so far:
I've installed the Eclipse, SDK, java, ADT etc....
I managed to modd my images with photoshop and put it through Draw9patch and managed to save my images to the folder of the app I was modifying. I opened up Eclipse and did the steps of: File\New\android project\ create project from existing source. and the part where you should use the default path for the directory. I can't seem to get to the end where I can pick "finish" to move on to the editing.
I did something different and managed to get the 9 pngs normal wthout stripes or marks and into a Res folder.
Ok, the part where you have to Export it is the sticky part. Can you please break down that section a bit more detailed. I got it to Unsigned App Package and I put the apk file on my phone all of a sudden my app was gone on the phone....Ok I modded the calculator with my images and can't seem to get installed.
johnny quest said:
Ok, I just can't figure this out. I am going insane trying to figure this out. this is what I got so far:
I've installed the Eclipse, SDK, java, ADT etc....
I managed to modd my images with photoshop and put it through Draw9patch and managed to save my images to the folder of the app I was modifying. I opened up Eclipse and did the steps of: File\New\android project\ create project from existing source. and the part where you should use the default path for the directory. I can't seem to get to the end where I can pick "finish" to move on to the editing.
I did something different and managed to get the 9 pngs normal wthout stripes or marks and into a Res folder.
Ok, the part where you have to Export it is the sticky part. Can you please break down that section a bit more detailed. I got it to Unsigned App Package and I put the apk file on my phone all of a sudden my app was gone on the phone....Ok I modded the calculator with my images and can't seem to get installed.
Click to expand...
Click to collapse
I do it this way:
1) get the .9.png files from the apk
2) redo the patches using draw9patch, save as .9.png
3) "compile" (process) the edited .9.png files with xeudoxus's xUltimate Draw9Patch Compiler. get it from here
4) put the processed .9.png files back in the apk
The compiler removes the 1 pixel border defining the patches that are stretchable and puts that info in the png as metadata (not 100% sure where)

[HOW TO] Make your own bootscreen and create signed zip

Here's a tutorial for those wanting to make their own (animated) bootscreen for the HTC Hero. Decided to write it after I'd seen a couple of posts from people asking about this, and some encouragement from yet another. I've tried to write this in greatest detail possible, so everyone can have a go at doing this.
Tools
It's really quite simple, if you have the proper tools for the job:
SignAPK.jar + testkey.pk8 + testkey.x509.pem
SignAPK.cmd (batch file written by me to facilitate signapk.jar use)
Graphics editor that can work with animated GIF files (Adobe Photoshop or Fireworks recommended)
a plain text editor capable of editing UNIX files (if you're unsure about this, use the free, and open source Notepad++. You can get the Installer.exe here.)
These aren't required, but make things easier:
Android SDK Tools installed (working adb.exe at the very least)
Hero's stock bootscreen to start from)
I have attached two stock Hero bootscreens (one with and one without the HTC startup sound), as well a zip file with the signapk files.
Setting up SignAPK
First, make sure you have Java installed. If not go to www.java.com to install it.
Second, I recommend to unzip the SignAPK_xda.zip file to C:\SignAPK.
Lastly, add the signapk folder to your PATH environment variable:
[*]Go to Control Panel, System
[*]Click on "Advanced" (or "Advanced System Settings")
[*]Click the button "Environment Variables..."
[*]Locate the PATH variable under "User Variables" (or "System variables" if you want to use SignAPK under other user accounts) and double-click it to edit
[*]In the "Variable Value" field, at the end of the line, type a semi-colon and the path to the signapk files ;C:\SignAPK
[*]You could also add the path to your java.exe file here if you have troubles with running signapk.​
A note on signapk.CMD
I wrote this batch file so it's possible to sign a zip file from a command line with the least amount of typing (saves time and less chance of a typo). It will check for java.exe and if it doesn't find it in your %PATH% it will let you know and try anyway. It will also prompt you to overwrite or not, if it finds the signed destination file already exists. Open in notepad to find out more.
Contents of bootscreen_stock.zip
You can delete the following three files, as they are created by the signing process:
META-INF\CERT.RSA
META-INF\CERT.SF
META-INF\MANIFEST.MF
This file contains the command to copy the files to the SYSTEM: volume on your device - you never need to edit this:
META-INF\com\google\android\update-script
This file tells Android how and which files to display - open in Notepad++:
system\media\bootscreen\boot_animation.xml
Then we have the actual bootscreen files:
system\media\bootscreen\boot1.gif - shown first, and plays only once
system\media\bootscreen\boot2.gif - shown after first ends, and loops forever (i.e. until end of boot sequence)
system\media\bootscreen\boot_bg.gif - optional file, this file is used as background during entire boot sequence if the 2 aforementioned files are smaller than Hero's screen
system\media\bootscreen\boot.mp3 - optional sound file, played once during boot
boot_animation.xml file contents
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (C) 2008 HTC Inc.
*
-->
[COLOR="Red"]<!-- For new bootup animation
<BootConfiguration>
<BootAnimation
image="/system/media/bootscreen/boot.gif"
audio="/system/media/bootscreen/boot.mp3"
image2="/system/media/bootscreen/boot2.gif" (optional)
image3="/system/media/bootscreen/boot3.gif" (optional)
screenX="100" (optional)
screenY="130" (optional)
image_bg = "/system/media/bootscreen/boot_bg.gif" (optional)
useAudio="1" // 1: true ; 0:false (optional)
/>
</BootConfiguration>
-->
[/COLOR]
[COLOR="Green"]<!-- For cropped version -->
<BootConfiguration>
<BootAnimation
image="/system/media/bootscreen/boot.gif"
image2="/system/media/bootscreen/boot2.gif"
image3="/system/media/bootscreen/boot2.gif"
loopimage="/system/media/bootscreen/boot2.gif"
image_bg="/system/media/bootscreen/boot_bg.gif"
audio="/system/media/bootscreen/boot.mp3"
screenX="10"
screenY="180"
useAudio="1"
/>
</BootConfiguration>
[/COLOR]
[COLOR="Red"]<!-- For full screen version -->
<!--BootConfiguration>
<BootAnimation
image="/system/media/bootscreen/boot.gif"
audio="/system/media/bootscreen/boot.mp3"
useAudio="1"
/>
</BootConfiguration-->[/COLOR]
This is the file included with the stock bootscreen. This file actually contains 3(!) configurations, however the first and third (red-colored) have been commented out. In short, edit the middle (green-colored) "BootConfiguration" section.
Delete the line that begins with image3= as you won't need it.
If you do not wish to include a startup sound, delete lines starting with:
audio=
useaudio=
Alternatively, simply set useAudio=0
If you boot1.gif and boot2.gif files are both 320x480 pixels, delete lines starting with:
image_bg=
screenX=
screenY=
Alternatively, simply set screenX=0 and screenY=0
If you delete the audio= and image_bg= lines, you can ofcourse delete the files audio.mp3 and image_bg.gif to keep the update.zip as small as possible.
ScreenX and ScreenY are coordinates in pixels, that tell Android where to place the GIF files on the screen. Top-left of the screen would be ScreenX=0 and ScreenY=0; bottom-right would be ScreenX=320 and ScreenY=480. This means that if you make a GIF file that is 200 px wide and 180px high and you wish to center this on the screen, you'd use ScreenX=60 and ScreenY=150 (i.e. ScreenX=320-200=120/2=60 and ScreenY=480-180=300/2=150). If your GIF files are exactly 320x480 pixels, you can set ScreenX and ScreenY both to 0, or leave those two lines out entirely.
Creating a GIF animation from scratch
(boot1.gif and boot2.gif)
Using Adobe Photoshop CS4 (cannot speak for older versions, I think you'd need the now discontinued Adobe ImageReady instead):
Create a layer for each frame of your animation (yes, I didn't say creating an animation from scratch wouldn't be a lot of work)
Click Window -> Animation to show the Animation panel
Click the panel menu (top right icon in panel) and choose "Make Frames from Layers"
If the frames are loaded in reverse from what you intended, choose "Reverse Frames" from the Animation panel menu
From the panel menu, choose "Optimize Animation" and UNtick both "Bounding Box" and "Redundant Pixel Removal"
Finally, go to File -> Save for Web & Devices, UNtick "Transparency" and play with some of the options to reduce file size.
To (re-)open an animated GIF file in Photoshop CS4, go to File -> Import -> Video Frames to Layers and type in the file name box *.gif then hit the Enter key so you can see GIF files, browse to it, select and click Load.
Using Adobe Fireworks CS4:
Make sure the "States" panel is visible, via Window -> States
Create a new "State" for each frame of your animation
To set frame delays, or basically set how long each frame will be shown for, in 100ths of a second, select one or more states and right-click, choose "Properties"
Make sure you do not use transparency (this gave me problems)
To save, go to File -> Save As, set "Save as Type" to "Animated GIF (*.gif)" and "click Options"
Do check "Dither" for better looking gradients and transitions
Play with the options on the first tab to reduce file size
On the "Animation" tab, UNcheck "Crop each state" (don't do this and get some crazy glitchy results in your bootscreen)
Creating a GIF animation by converting a G1 bootscreen animation to Hero format
(boot1.gif and boot2.gif)
You can also import a bunch of PNG files as layers (and subsequently frames) from, for example, a G1 bootscreen.
The fastest way in my experience is simply using Fireworks' File -> Open dialog, make sure all files are in one directory, select them all, do check the "Open as Animation" checkbox and click "Open". This will open each file into its own state in one big file. Then use instructions above to set frame delays and proceed to save as animated GIF.
You can also do it in Photoshop, but this method is very slow, via File -> Scripts -> Load Files into Stack (UNtick "Create Smart Object after loading layers"). Then follow the steps above to create an animated GIF file.
Compiling your bootscreen
If you have the files you want, it's time to zip them and then sign the zip file.
Make a folder "mybootscreen" and unzip the stock bootscreen into that, so it looks like this:
META-INF\CERT.RSA
META-INF\CERT.SF
META-INF\MANIFEST.MF
META-INF\com\google\android\update-script
system\media\bootscreen\boot_animation.xml
system\media\bootscreen\boot1.gif
system\media\bootscreen\boot2.gif
system\media\bootscreen\boot_bg.gif
system\media\bootscreen\boot.mp3
Delete those first 3 files, edit the XML file as needed and replace the GIF files with your own (see my explanations above).
Use for example 7-zip to select the 2 folders META-INF and system and click "Add" (to create new archive)
Make sure you set "Archive Format" to ZIP
Open a Command Prompt window (click Start, Run, type cmd and click OK, or if you have Vista or Windows 7, click Start, type cmd and hit Enter key)
Use this command to go to the directory with your zip file: CD /D C:\path\to\your\file
Type signapk mybootscreen.zip and hit Enter key
Barring any typo's you should now have a file named mybootscreen_signed.zip. You can copy that to the root of your SDCARD and flash it via your recovery image, or use DroidExplorer's flash function.
If this tutorial was of any use to you, or you have ideas to make it better, please reply and let me know. Thanks for reading!
EDIT (2010-04-11): updated SignApk_xda_v20100411.zip. Fixed a couple of forgotten quotes in signapk.cmd that made signing files with spaces in their filenames impossible. New zipfile attached.
wooooo THANKS!
THANKS A LOT! I have made the animated gifs and the sound, but I was insure how to sign and create the signed zip. I'll be trying this ASAP when Ive finished work. Ill keep you posted....
Thanks again m8.
Great guide, I have made my own bootscreen for the Villain rom, but for some reason, when i flash it to my hero, on boot, it plays less than a second of it, ad then messes up completely and displays random static like on an old tv, and then just a black screen for the remainder of the boot time
Help!! my gifs are not that big, i made sure of that (only slightly more than the stock) and i made them in photoshop CS4 with the animations panel, and followed your instructions to the letter.
Gifs are bellow, please help, as i would really like to release these, as i think they are really nice.
Boot1
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Boot2
Hey, very nice work! Try the zip I've attached. I think it came out great.
It boils down to a few small problems. Here are some steps I took to correct them:
Imported your files into PS as I described in the tutorial using "Video frames to Layers"
Edit -> Convert to Profile -> sRGB IEC61966-2.1 (UNcheck "Flatten Image")
For just boot1.gif in Animation Panel, bottom left, set looping to "Once"
For just boot1.gif via Image -> Image Size... -> Width:320px, Height:480px, Resolution:72dpi, Check Resample Image and set to "Bicubic"
File -> Save for Web & Devices, with these settings: Selective, Diffusion, UNcheck transparency, UNcheck interlaced, Colors:64 (as this is a grayscale animation, it looks fine), Dither:100%, Matte:none, Web snap:0%, Lossy:0, Metadata:none.
The end result is bigger files, but they work. The XML was fine.
Great! thanks a lot for your help, and your original guide, I might do a few more boot screens now as it looks really good (in my opinion)
mattyyey said:
THANKS A LOT! I have made the animated gifs and the sound, but I was insure how to sign and create the signed zip. I'll be trying this ASAP when Ive finished work. Ill keep you posted....
Thanks again m8.
Click to expand...
Click to collapse
How'd it come out? Would love to see your results!
Really interessant, this is exactly what I was looking for! Thanks for this How-To!
For the signing process I haven't use your "signapk.cmd" (since I'm a linux user)But I have a question: testkey.x509.pem & testkey.pk8 you provied are only to sign app for the Hero? or is it a standard Android singning process? I mean... where are those key from?
For now i've just "resign" the stockbootscreen for "educational purpose", soon I'll try to create something, I hope
EDIT: Okay I was able to resign the original one correctly since I was able to flash it, BUT my bootscreen is still this nexus one animated. So maybe I don't understand wich bootscreen we actually modifing. I know this is not the really first one (this one is fine: spend one day to find that we need a custom SPL to change my ex horrible T-mobile first bootscreen to a Hero one) So why can't I remove the nexus one coming with aHero ROM?
EDIT2: using
Code:
./adb pull /system/media/bootscreen/boot.gif ./Desktop
I get the right image... that mean the files are correctly flashed on my ROM but nothing change so that mean aHero is using a different path for the 2nd bootscreen ???
Thanks for any hint
carbonyle said:
Really interessant, this is exactly what I was looking for! Thanks for this How-To!
Click to expand...
Click to collapse
You're most welcome!
carbonyle said:
For the signing process I haven't use your "signapk.cmd" (since I'm a linux user)But I have a question: testkey.x509.pem & testkey.pk8 you provied are only to sign app for the Hero? or is it a standard Android singning process? I mean... where are those key from?
Click to expand...
Click to collapse
The signapk files (except signapk.cmd) came from a 5MB file named "AndroidMod.zip" that floats around the internet, so to speak. It also contains 3 img files, part of a tutorial I guess, which are not needed for signing. The testkey certificates were created by whomever made that zipfile. The credentials for those files are quite anonymous ("Android" and "[email protected]", etc), so they should be fine to use. You could use openssl to generate your own key files. I tried, and they generated okay, but zips signed with my own certificate wouldn't flash. Recovery (Amon RA) kept saying the files weren't signed. So if you figure out how to properly generate your own certificates, I'd love to hear it.
carbonyle said:
For now i've just "resign" the stockbootscreen for "educational purpose", soon I'll try to create something, I hope
EDIT: Okay I was able to resign the original one correctly since I was able to flash it, BUT my bootscreen is still this nexus one animated. So maybe I don't understand wich bootscreen we actually modifing. I know this is not the really first one (this one is fine: spend one day to find that we need a custom SPL to change my ex horrible T-mobile first bootscreen to a Hero one) So why can't I remove the nexus one coming with aHero ROM?
EDIT2: using
Code:
./adb pull /system/media/bootscreen/boot.gif ./Desktop
I get the right image... that mean the files are correctly flashed on my ROM but nothing change so that mean aHero is using a different path for the 2nd bootscreen ???
Thanks for any hint
Click to expand...
Click to collapse
I don't know I'll download aHero and have a look.
EDIT: Okay, just had a quick look in "aHero07-signed.zip" and it appears Android 2.1 uses a different bootscreen format. Do this:
adb shell
cd /system/media
ls
Instead of a bootscreen directory you'll see a file "bootanimation.zip". Instead of 2 animated GIFs, it contains 2 directories. Each directory is an animation, with a bunch of PNG files for frames. A text file describes which dir is what animation (order of playback) and the delay between frames. If you want to convert a 1.5/1.6 bootscreen from GIFs to seperate PNGs for use in this new format, just open the GIF file in Photoshop (or GIMP I guess) as described and save each frame as a seperate file (Photoshop has a function or script for that, maybe GIMP does too).
Maybe you'll find more information in this thread. I got the Supernova bootscreen graphics (see my sig) from there, which I converted into a bootscreen for Cupcake.
Well, my experience from running 2.1, you can use the bootanimation.zip, or if you delete it and create the bootscreen folder, it also works.
I have the same problem though, when I load up my gif, using the old method, it looks like hells just got unleashed on the gif. Nothing in place, static, etc... I followed your tutorial, tried a couple things, nothing has been working so far...
EDIT: Nvm, found another program to remove the transparency, works now! Got bored, haven't seen any terminal style logins - this works great for my phone, the timing might be different for others though.
To get it working, just delete your bootanimation.zip and flash the zip as usual.
Boot1
Boot2
http://groups.google.com/group/admin-panel-dev/web/terminal_signed.zip
Great tutorial! And nice work that one is Warhawk
I have a problem. I made one by screen capturing some video. Converted it to .gif fine. I can play it in windows fine, but when flashing to android the image just gives a black screen (its only the gif area of the screen cos the animation is only 300x120.
I have provided the .gif above, if anyone can help.
Thanks
I went ahead and removed the transparency from the gif, it showed up on my Hero just fine when I zip/signed it.
Aaah Thanks so much buddy. I swear i tried that though (maybe i made a mistake)
Cheers so much!
I am getting an error after flashing. My installation aborts.
...
Verifying update package...
Installing update...
E:Can't find update script
Installation aborted.
...
Can you help??
quan_one said:
I am getting an error after flashing. My installation aborts.
...
Verifying update package...
Installing update...
E:Can't find update script
Installation aborted.
...
Can you help??
Click to expand...
Click to collapse
Upload your update.zip. Some-one should be able to help.
Did you include the update-script to: \META-INF\com\google\android
Hey guys I created my own boot screen but I am failing to see why my gif will not display on my hero. I have created it from scratch being careful not to include any transparent images or layers but it still displays as a black screen. I am not sure what would cause my gif not to play on my phone other than a transparency issue.
Any help would be more than welcome.
(I am able to sign my zip and flash it no problem)
(edit: The image was my actual .gif but after upload it turn into a jpeg. I will host the file and upload from there.)
My stuff can be found here at mediafire : http://www.mediafire.com/?sharekey=43b651ad9cd91774e7c82ed4b8f0c380e53d1e35008d24d5d8c7c6998cb4ca21
.psd
signed zip
Thanks again!
rejectedkid said:
Hey guys I created my own boot screen but I am failing to see why my gif will not display on my hero. ...
Click to expand...
Click to collapse
You need to go into mybootanimation_signed.zip\system\media\bootscreen and edit your boot_animation.xml.
phaelox said:
...ScreenX and ScreenY are coordinates in pixels, that tell Android where to place the GIF files on the screen. Top-left of the screen would be ScreenX=0 and ScreenY=0; bottom-right would be ScreenX=320 and ScreenY=480. This means that if you make a GIF file that is 200 px wide and 180px high and you wish to center this on the screen, you'd use ScreenX=60 and ScreenY=150 (i.e. ScreenX=320-200=120/2=60 and ScreenY=480-180=300/2=150). If your GIF files are exactly 320x480 pixels, you can set ScreenX and ScreenY both to 0, or leave those two lines out entirely...
Click to expand...
Click to collapse
The difficult thing is that you have two .gifs that are diff sizes so not too sure what to do.
On the one I made, my .gifs are both the same resolution so the value I set for ScreenX and ScreenY work for both.
Look at some other people's .xml files and hope you find someone elses that also uses two different resolution .gifs.
ah. thanks for your input
Sent from my HERO200 using the XDA mobile application powered by Tapatalk
And just because there are no transparent images that you can see or know you put in, doesn't mean that they aren't in there. For some reason, even if I untick Transparent layers in PS, I still get them. I went and got Animation Shop 3, optimized the gif after making it in PS, then re-wrote the file, and everything works fine.
Hope everything is working
Hi !
I have 2 questions :
First one :
To ddotpatel : Your bootscreen is really nice ! Is it working on any 2.1 rom or do I have to change it ? On which rom did you create it ?
And the second one, that tuto is working on 1.5 and 2.1 roms ? Because I heard that it was different to make an 1.5 bootscreen and an 2.1 one...
Thanks for your answers

[Q] Is it possible to add a *new* xml file to framework-res.apk?

I want to add a new button background to framework-res.apk (not modify an existing one). I need to change the look of the clear notification button without modifying everything else that uses that background.
The clear button uses btn_default_small, so I made a copy of btn_default_small.xml, named it btn_default_small2.xml and in the status bar xml, pointed the clear button to btn_default_small2. (No editing at all. I'll make it look different later.)
This causes a boot loop.
I must be missing something. Any idea what?
I tried adding an entry for my new button to public.xml (do I need to do that?) using the next available ID. It still boot looped.
I get an interesting logcat message
W/ResourceType( 1683): getEntry failing because entryIndex 952 is beyond type entryCount 952
W/ResourceType( 1683): Failure getting entry for 0x010803b8 (t=7 e=952) in package 0: 0x80000001
Click to expand...
Click to collapse
There are 952 drawable entries in Public.xml, my new file is number 953. The next available ID is 0x010803b8. I don't know what package 0: 0x80000001 is. Is any of that even relevant?
I attached the logcat output. Please help.
To answer your question...adding is difficult.
- Baksmali Services.jar
- search there for your "btn_default_small".
- you will be surprised how many times you will see it there..(maybe 7 times ?)
now
- how often do you find "btn_default_small2" in Services.jar ??
If you can handle smali.files, cool!
I believe it´s easier to get the source and do it in Eclipse.
But maybe, anybody with more knowledge can explain this better here.
greets
Shizlak said:
I made a copy of btn_default_small.xml, named it btn_default_small2.xml and in the status bar xml, pointed the clear button to btn_default_small2. (No editing at all. I'll make it look different later.)
Click to expand...
Click to collapse
It does not know the new file btn_default_small2.xml exists (no id), Try recompiling using apktool. (you need to use the resource-only flag for framework-res)
Make sure you deploy the new jar while the OS is not running. (i.e. recovery)
britoso said:
It does not know the new file btn_default_small2.xml exists (no id), Try recompiling using apktool. (you need to use the resource-only flag for framework-res)
Make sure you deploy the new jar while the OS is not running. (i.e. recovery)
Click to expand...
Click to collapse
So you can add without touching services.jar?

[GUIDE + ROM] Rom Translation Tutorial + Minimoto 1.7 & MavROM 4.5 Italian Version

[GUIDE + ROM] Rom Translation Tutorial + Minimoto 1.7 & MavROM 4.5 Italian Version
THIS GUIDE IS FOR PEOPLE THAT KNOW WHAT ARE DOING! DO NOT TELL ME THAT I BRICKED YOUR PHONE OR STUFF LIKE THAT, YOU ARE RESPONSIBLE OF WHAT HAPPENS TO YOUR PHONE, BE CAREFUL!
Here are the Italian versions of Minimoto 1.7 and MavROM 4.5:
Minimoto 1.7
MavROM 4.5
(The MavROM has 2 files to flash: first the D3-MavROM-4.5.zip original file and then the MavROM-AOSPICSTheme.zip that contains the translation plus the ICS theme. If you want to translate another theme, or just the basic rom, you can extract the language files from the theme .zip following the guide!)
Every Droid 3 owner out of the English/Spanish area knows that every D3 ROM comes out with only two languages preloaded in it, right? well...if you know well english (or spanish!) maybe i have something for you!
Ok, i hope this guide could be helpful to everyone like me that wanted to find a non-english, non-spanish Gingerbread ROM for Droid 3.
After some studies, and a lot of searching too, i've found the best (i think) way to translate roms. Oh and this guide is good for every android phone out there! Let's start!
Part 1 - Download all the stuff! (plays Monkey Island music )
Our needs are very few, what you need with this is a lot of patience, and knowing some english could help.
- A rooted Droid 3 (or any other phone)
- The ROM you want to translate
- WinRAR / 7-Zip
- Notepad / Notepad++ (Highly recommended!!!) http://notepad-plus-plus.org/
- Java Development Kit www.java.com
- APK Manager/APK Multi-Tool, since now i will call them APKM and APKMT ( i used APK Manager, but multi-tool should be fine anyway) http://apkmultitool.com/?q=node/5
- Google Translator Toolkit http://translate.google.com/toolkit/
- Safestrap (optional, but very, very recommended)
- MoreLocale2 or another language changing program
Note 1: If APK Manager/Multi-Tool bother you with something about java not found do this: http://wiki.answers.com/Q/How_do_you_stop_the_error_%27java%27_is_not_recognized_as_an_internal_or_external_command_operable_program_or_batch_file
Note 2: In APKMT, the commands are a little different from APKM, e.g. in APKM the "set project" command is listed as 22 and in APKMT is listed as 24....the functions we'll use are the same, just read the description if you're not sure and you'll be fine
Ok, let's take the stuff out of the box!
Part 2 - The extraction point
Open the .zip containing your ROM's files with WinRAR / 7-Zip and extract the folder "system" somewhere (i recommend to create a folder for your translation project) once the process is done, we can basically do two things: Decompile the apps or decompile the frameworks, the process is the same, but you have to go really really REALLY careful with framework apks, or once you flashed the ROM what you've got is a translated BOOTLOOP. So be careful. With apps you can mostly screw a functionality up, like SMS or Phone, but nothing too messy.
Anyway you can solve the problem with a new flash with the corrected ROM, or the original, untranslated ROM.
Ok let's start with the frameworks: we've usually got 3 differents frameworks and those are
framework-res.apk
blur-res.apk
moto-res.apk
Those apks contain mainly everything written all around the phone, like pop-up messages, status bar, app permissions and a lot of other stuff.
We'll use framework-res.apk.
If there isn't, create a folder in the same folder where you have installed APKM/APKMT, called "place-apk-here-for-modding" without quotes, then copy inside it the framework-res.apk.
Now you have to open the Script.bat file, and once you get into the main window, digit 22 (APKM) or 24 (APKMT) and press enter to select the current project, now digit the number corresponding to the desired apk (it should be 1 if you have only framework-res.apk) and press enter. now digit 9 (APKM/APKMT) and enter and you'll decompile the apk. Now you should have a folder, inside the "projects" folder of APKM/APKMT named just as the decompiled apk. Inside it, you'll find a folder called "res" open it and you'll be right into the core of the translation:
Note: if you get an error after decompiling, try with option 10 (APKM/APKMT), and drag and drop the necessary framework over the prompt when APKM/APKMT ask, press a key, and if you get another error try with another framework (D3 has 3 of them) until you get the job done. If nothing works, probably there's a problem with the apk you want to decompile.
Note 2: You could need to have frameworks installed into folder C:\Users\YourPCUSername\apktool\framework. You can do this either with apktool via cmd or manually copying the 3 frameworks into this folder (create it if needed) and renaming them this way:
- framework-res.apk => 1.apk
- moto-res.apk => 2.apk
- blur-res.apk => 3.apk
Then you should be able to decompile 99% of apks with option 9.
You'll find a bunch of folder, but we are interested in the "values" ones, if you have to translate the app, you'll see something like this:
- values
- values-es
- values-es-rUS
the first folder contains the english files, the second contains the spanish files, and the third contains some other files for spanish variants.
Open the "values" folder and inside it there are some .xml files, we will always use only 3 of those at most:
- strings.xml (the file containing mainly all the text strings of the apk, if you find this, then you have to translate it, if not, just pass over this apk, it doesn't contain text)
- arrays.xml (the file that contains some text data for drop lists, you'll not find this often, but if you find it, translate it)
- plurals.xml (the file that contains plural words, this is very rare to find, but if you want to make good translations, then, translate!!)
Now get back to "res" and create a folder called "values-xx" where xx is your language code, for example i made a values-it folder, but you'll write values-fr, values-de, values-idunno etc.
You'll put here, all the XMLs we're gonna translate now!
Part 3 - Bring out the dictionary!
The game is getting harder, now you have to use your better weapon: Google Translation Toolkit. But first, let's look into XML!
Open the "strings.xml" file with Notepad++, and look at the records structure:
<string name="aerr_application">The application %1$s (process %2$s) has stopped unexpectedly. Please try again.</string>
You have to change ONLY and i repeat ONLY the text between "<string name="aerr_application">" and "</string>"!
Now some rules:
- See that "%1$s" weirdness? that is a jolly word that Android replace with a variable data, in other words DO NOT TOUCH IT! just imagine that you'll see there something like "The application *Temple Run* (process XYZ) has stopped etc. etc.
- If you have to put an apostrophe or some other weird character, always put quotes at the beginning and at the end of the string just like in the translated string down there, it's good to always put them, And GTT (Google Translator Toolkit) does that.
- If the string you have to translate looks like code stuff, probably you should leave it untranslated, something like:
<item>@string/resolutionSummaryWideScreenTV</item>
<item>MOTOCAMSETTING_REVIEW_TIME_4_SEC</item>
see? DON'T TOUCH IT! BAD TRANSLATOR! BAD!
This is the resulting, translated string:
<string name="aerr_application">"L'applicazione %1$s (processo %2$s ) si è fermato in modo imprevisto. Si prega di riprovare."</string>
Ok, now we can translate without detonating the phone, but framework-res has something like 1300 rows of text!
WHOA! let's use GTT!! http://translate.google.com/toolkit/
Once you are on the main screen of the tool, click on the red "Upload" button on the upper left, then in the page you found after, click on "Browse..." and select your file inside your PC.
Set all the stuff down there, like the name, the language and everything else, and click "Upload for translation"...here comes the magic...
The XML is translated! sort of...
You now have to look if GTT has done the work well...let's look into this page:
- You can see that now the entries are divided in boxes, you can click onto the left panes' boxes and edit the content.
- Play a little with the interface, you have to get familiar with it if you want to translate a ROM!
- Look to spaces and returns, GTT mess them, and you should correct the format.
- Text is coloured: i'll tell you what those fancy colours ACTUALLY mean
- Orange: this means you've edited the text into the box
- Red: text coloured in red came right out of Google Translate, and 70% of times, it will be gibberish, so look carefully into it, this will be the work where you'll spend more time.
- Blue: this is a sneaky bastard, it says that he found a "100% matching" translation in his database, but it has a 30% chance to be total nonsense, be careful with it.
- Green: this colour is fine, you probably have translated this in past, or someone did it for you, anyway, it will be 99% correct, if the past translation was correct.
- Brown: this happens rarely, usually where it founds a colon (the symbol ":" ok?? :angel: ) and for some reason, it goes random, usually you need a very little effort to correct it.
- Purple: THIS is a funny one. when purple comes out (usually with a wildcard character like "%1$s") the translator often goes TOTALLY random and write some idiocy. rewrite the text from scratch.
Once you've managed to translate everything, and if you're sure to have completed everything, click (if you want) on "Complete" in the upper right corner of the page, and then we need to download our work, to do that, click on "File" (upper left) and then "Download". Save the .xml file in your values-xx folder, and check one last time with Notepad++ the number of lines, the spaces and the format in general, at this point we're ready for the final part!
Part 4 - Repack everything!
Now the situation is this: you have the "project" folder containing all the decompiled apks folders, with the "values-xx" directory in it, we now have to recompile everything and put apks into the ROM. Let's see how:
- Open APKM/APKMT and select the project you want to recompile
- digit 11(APKM/APKMT)
- Look if you got errors, if yes, look into the log 20(APKM) or 23(APKMT) and see what the problem is, if you look carefully you will identify where is your error log, probably it's a messed tag, or something easy to resolve, correct the issue, and go ahead, restarting from digiting 11 (Compile)
- Press Y and enter
- Press Y and enter (yes, 2 times)
- Now wait for APKM/APKMT to stop spitting lines out and it'll tell you something. Read it, but the substance is: go in the APKM/APKMT folder, look for a "keep" directory, delete the "resource.arsc" file, get back on the APKM/APKMT prompt window, and press a key.
- Once everything is completed, you now have a file called unsignedframework-res.apk (or unsigned*nameoftheapkyouhavecompiled*.apk)
- The next, is the point i still didn't get, but it works...maybe XDA guys can explain better this...anyway, we now have to sign apks...i saw that this shouldn't be necessary, but otherwise i've got a lot of errors and force closes and stuff like that...soooo, at least for D3, sign it!
- We have 2 choice for signing...if you have only a few apks to decompile, you can just select the project and digit 12(APKM) or 13(APKMT) and sign it but if you have translated a whole ROM and you want to sign all the apks at once, create, if not exists, a folder called "place-apk-here-for-signing" and put all the unsigned apks there...you now have to digit 16(APKM) or 18(APKMT) and the apks will all be signed automatically.
- Rename the apks removing the "signed" part from the name.
We're now ready to pack the ROM: i usually create a "system" folder somewhere else that i will put directly into the ROM's zip, but you can do it by hand (boring). I'll show you my method for now:
- create a "system" directory
- inside it, create a "framework" and an "app" folder
- put into the framework one, all the frameworks (easy, huh?) and into the app directory, put all the other apks.
- open the ROM zip and drag and drop the system folder into the ROM in order to overwrite the existing one.
Our freshly translated ROM is ready to be flashed and brick or burn your phone! (ok, no, this is not true...maybe...)
Anyway, download the zip on your phone and flash it with the recovery you want.
I RECOMMEND TO DO THE FIRST TEST ON A SAFESTRAP, AND ONLY IF YOU'RE SURE THE ROM IS SAFE, INSTALL IT ONTO YOUR MAIN SLOT! I'VE WARNED YOU!
Part 5 - Polish your creation!
When the ROM is installed, and if it boot correctly, First install MoreLocale2 or other similar apps, and add, your language, with the correct ISO codes and look around to see if something is untranslated...if yes, go back, to APKM/APKMT and find the apk you need to modify, translate, repack, flash the ROM and again until you've got a perfectly translated ROM!
The tutorial is ended, i hope you liked it, and if you want to correct, critic, ask, or anything, just tell me!
Tips: If you want to avoid the MoreLocale stuff, you can edit the build.prop, into the folder "system" of the ROM you'll find this file, open it with Notepad++ and look for these lines:
ro.product.locale.language=xx
ro.product.locale.region=YY
You have to put here your ISO language code, but i noticed that on D3 it doesn't always works...so, try but i don't guarantee success.
If i remember something, i'll integrate the post
Coming Soon:
Screenshots!
Corrections!
Hi, people i saw that the guide hit 1,000 views and it's a lot of clicks! so i'd like to know if there is something that you would see in this guide, or if you need some more guides, maybe more D3 specific (or less specific! ) i spent a lot of time tweaking and tuning this phone and i can share what i've learned from it! If you want a custom translated rom, i could work on it, especially in Italian or French!
tl;dr -> Tell me what improvements you want to see!
Buongiorno FrankieDedo,
I have read your tutorial and try to translate the Framework res.apk from Minimoto 1.7 into German. (I am Greek just translate it for a German friend)
First i translated the three files (arrays.xml, plurals.xml, strings.xml), put the files into framework-res.apk\res\values-de, recompiled and signed everything without errors.
Then i edit the build.prop ro.product.locale.language = de and ro.product.locale.region = DE
Flashed the rom zip without problems.
After the initial setup i downloaded more local 2 and set it up to german, unfortunately the system itself is still in english (most of the apps are in german now)
Also I have decompiled your framework-res.apk but i cant find your italian values folder.
I've attached my decompiled framework-res.apk, maybe you can help me.
Thank you very much !
michalakis said:
Buongiorno FrankieDedo,
I have read your tutorial and try to translate the Framework res.apk from Minimoto 1.7 into German. (I am Greek just translate it for a German friend)
First i translated the three files (arrays.xml, plurals.xml, strings.xml), (...)
Click to expand...
Click to collapse
I'm looking into this, my framework lacks the Italian translation, you're right, i've uploaded a zip without it, i'll update that too soon.
I don't know why your framework shouldn't work, i give a look at it and it looks ok, it just have some text rows more than the english one, it could be the problem, but i don't think so... Anyway, can you tell me if when you factory reset the phone you see some texts in german and then they disappear?
Yes, at the start setup for 1 sec than it turns to English.
But after a factory reset booting without the SIM, the text at the start setup don't turn to German.
So with SIM the phone recognize the im in Germany and turns the text for 1 sec to German.
Must i change something else in the build.prop ?
I Started over again and with mavRom 4.5 now it works
michalakis said:
I Started over again and with mavRom 4.5 now it works
Click to expand...
Click to collapse
i'm glad you've made it, maybe the problem with the other rom was some missing file or something missing in the decompiling/translation/compiling process... and thanks for letting me know that the minimoto zip doesn't have the translated! as soon as i get home, i'll upload a new file!
Fixed the Italian Minimoto, with translated framework.
FrankieDedo said:
Fixed the Italian Minimoto, with translated framework.
Click to expand...
Click to collapse
is this guide valid only for these 2 roms or i can use it to translate any custom rom of any smartphone?? and another question: if in \system\framework there are framework-res.apk, lidroid-res.apk and twframework-res.apk and the other files are .jar, i must modify only these 3 apks?
thanks in advance for the answers!
Blade.94 said:
is this guide valid only for these 2 roms or i can use it to translate any custom rom of any smartphone?? and another question: if in \system\framework there are framework-res.apk, lidroid-res.apk and twframework-res.apk and the other files are .jar, i must modify only these 3 apks?
thanks in advance for the answers!
Click to expand...
Click to collapse
Sorry for my late answer, :angel: anyway:
I wrote this guide after messing around with Droid 3, but it is good more or less for every rom, so you can translate nearly everything with this method (i heard that for HTC phones things are a little more messy, but i might be wrong)
For the apks to translate: if you translate the frameworks alone you should have translated roughly a 75%-80% of the phone system, but another important apk is the "Settings" one... if you are a maniac like me you can decompile every system app and look for missing language folders...
I'm sure at 99% that you'll always have to touch ONLY apks, and not .jar or external .xml or whatever so, yes go along with your apks
Ciao!
FrankieDedo said:
Sorry for my late answer, :angel: anyway:
I wrote this guide after messing around with Droid 3, but it is good more or less for every rom, so you can translate nearly everything with this method (i heard that for HTC phones things are a little more messy, but i might be wrong)
For the apks to translate: if you translate the frameworks alone you should have translated roughly a 75%-80% of the phone system, but another important apk is the "Settings" one... if you are a maniac like me you can decompile every system app and look for missing language folders...
I'm sure at 99% that you'll always have to touch ONLY apks, and not .jar or external .xml or whatever so, yes go along with your apks
Ciao!
Click to expand...
Click to collapse
grazie per la tua risposta! sei stato molto chiaro!

Problem with Java

Hello. I'm new to the forum and to programming aswell. I'm trying to learn how to make an app so I started with a tutorial online, but I'm having a problem. I can't post a link but the tutorial is called "Make Your First Android App: Part 2/3 - Ray Wenderlich". On the section "Accessing Views From Within Java" when I add "android:text= @string/hello_world"" I get an error. On the bottom it says I should be using a @string but when I do the preview window displays the @string/" aswell. What's that about?
Second, I can't rename the string after changing hello_world to something else. Why is the tutorial even saying I should rename it? What will that do?
Lastly, in MainActivity.java above onCreate I have to insert a line of code. The tutorial doesn't explain why I need to do that. Where should the line go, the code is
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
wherever I insert the code and press Alt+Enter I mess up the whole thing...
Sorry that these questions are annoying and basic, I just really want to learn to make apps and I'm trying to figure things out alone.
Thanks.
P.S. one more thing, in "Buttons and Listeners" there is a part saying:
"Then there’s text, for which you need to add a line in strings.xml such as the following:
<string name="button">Update The TextView</string>"
when I do that I get an error in strings.xml
If you are having problems related to Java, the following tips should help you getting things working -
» Download and Install Java
» Use Java
» Test Java
» Remove Old Versions of Java
» Find Java.
basic issues
1) all strings you use needs to be defined in string.xml file, by doing so, you separate messages and names from code and it can be re used in your app from single source, easy to maintain.
2)ALT + ENTER is used to resolve import, when you add code and introduce new class, you need to import it.
3)Oncreate method in activity is used to setup layout for activity and provide content to be displayed on screen for the activity

Categories

Resources