yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Themes and Apps] floyd0815:
apktool install and mod fw-UA script for Ubuntu(Linux)

Hi everyone!

Since there seem to be some problems with creating the FWs I decided to make a little script that installs apktool in Ubuntu (also for LiveCD) - because

I'm lovin' it!

(Ubuntu) -> Download Ubuntu

It also adds two scripts to change the framework UA-string by double-clicking them.

Have a look: (installation + first modded FW in 3:35min)

Youtube video

Instructions:

Open up a terminal and type:

wget http://dl.dropbox.com/u/13058041/installAPKtool.sh
sudo sh installAPKtool.sh

After the installation you can put a fw-res.apk into your home-dir, double-click "fw-desktop" or "fw-mobil" (choose execute in Terminal, so you can see...) and you get a flashable zip! :)

...cause a fish feeds a person a day, teaching him to fish will feed him for his life!

;)

The scripts are also attached. (with many comments - easily understandable for linux newbies)

EDIT:

Updated my faulty scripts.
[Galaxy S II Themes and Apps] sianzb0i:
how come u guys have no problem booting up or have no problems with ur facebook app?

i am quite sure my method is no different from any of the mentioned. Unless is my Rom or kernel, which are KF1
[Galaxy S II Themes and Apps] floyd0815:
Post your fw and I'll mod it - so you see or not see...
[Galaxy S II Themes and Apps] sar3vok:
i have follow the procedure but nothing changes.

Any help?
[Galaxy S II Themes and Apps] floyd0815:
What hasn't changed?

-> The UA? Maybe wrong script?

-> No links in home? Open the install script in gedit and try it line-per-line! (with a "sudo su" before)

And post your terminal output please!
[Galaxy S II Themes and Apps] sar3vok:
everything seems ok to me but nothing has changed.

the original framework.apk that i need to patch can be found in system/framework right?
[Galaxy S II Themes and Apps] floyd0815:
No framework-res***.zip appeared in home? (flashable zip)

An internet connection is required!

The ori is in /apktool/APKs-ori, the one in the zip (/system/framework) should be the modded one.

Maybe take a look at the video.
[Galaxy S II Themes and Apps] sar3vok:
so... i launch the fw-desktop with the original apk in the same dir (home dir) and that is the output:

I: Loading resource table...

I: Loaded.

I: Decoding file-resources...

I: Decoding values*/* XMLs...

I: Done.

I: Copying assets and libs...

W: Could not find sources

I: Building resources...

aapt: warning: string 'device_encryption' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'device_encryption_desc' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'global_action_data_mode_off_status' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'global_action_data_mode_on_status' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'global_action_toggle_data_mode' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'lockscreen_decrypting_sd_card' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'lockscreen_decrypting_usb_storage' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'lockscreen_encrypting_sd_card' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'lockscreen_encrypting_usb_storage' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'lockscreen_missed_call_count' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'lockscreen_missed_msg_count' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'password_recovery' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

aapt: warning: string 'password_recovery_desc' has no default translation in /home/daniele/apktool/APKs-decompiled/framework-res-cognition/res; found: is_IS no_NO

I: Building apk file...

sorry i'm ubuntu linux newbie.
[Galaxy S II Themes and Apps] sar3vok:
the pc is online.

the /system/framework/framework-res.apk is in the phone, i copy that file in the home dir on the pc.

The script transform the apk in a zip that i flash with cwm.

Don't know why but can't see the video.
[Galaxy S II Themes and Apps] floyd0815:
Seems normal, no .zip appeared?

Do you see some windows popping up like in the video?

If not, maybe you have to install:

sudo apt-get install unzip zenity sed file-roller wget

Or you entered the wrong username at the installation? (the name you read in terminel before the @)

If the system has installed some packages or you entered the wrong username, you can install it again - no problem.
[Galaxy S II Themes and Apps] floyd0815:
And you surely double-click "fw-desktop" for desktop UA?

Maybe you have bookmarked the mobil version of a website?

Try engagdet.com or google.com

Also upload your zip so I can see if it has worked.

THX
[Galaxy S II Themes and Apps] sar3vok:
the zip appear and i install it with the cwm.

But when i reboot the phone, the browser is the same as before, and if i change the useragent, when i kill the browser and open it again, everything is the same as always.

there is a windows that popup and ask for the name of the rom (cognition 1.15)

and the name asked during the first run of the program is correct.
[Galaxy S II Themes and Apps] floyd0815:
PLZ upload the zip. You don#t have to change the UA in browser:

Just flash it, boot, open the browser and go to engagdet.com or google.com to try.

VIDEO
[Galaxy S II Themes and Apps] floyd0815:
Have looked into the zip - has worked -> browser should be on desktop UA. (also looked in values-it for Italian)

Go to engagdet.com - if it works you should see a regular website and you have bookmarked the mobil ones. (you have to edit/delete them)
[Galaxy S II Themes and Apps] sar3vok:
it work now!!!

don't know why, i retried the same process without changing anything and now it work!

Strange machines...

Thanks for your support!:)

Need to say: The almost perfect terminal is now perfect thank to you!
[Galaxy S II Themes and Apps] floyd0815:
No problem - I'm glad to hear that it also works for other people. :)
[Galaxy S II Themes and Apps] K_Hismoom:
Thank you very much for the scripts.

Two things to note:

- You need to have the android platform tools from the SDK installed for the script to work.

- On 64bit machines you need package ia32-libs, otherwise aapt from the SDK cannot run, because it's a 32 bit application.
[Galaxy S II Themes and Apps] floyd0815:
THX!

But I haven't installed the SDK on my HP-TX2 (small but fast SSD) and it's working. Only unzip, zenity, sed, file-roller and the apktool should be needed (in 32bit) and I've updated the install-script to make sure they are installed.

If you're usind TouchWiz-launcher and since you have installed the SDK you are maybe interested in the attached script for TouchWiz 4.5 from Fr4gg0r

It edits the in the homescreen shown "Anwendungen" into whatever you want!

(Apps, Menu,... in every language you specify - only one at a time)

I've just modified a few paths in it so look at the terminal output for errors...
[Galaxy S II Themes and Apps] NoOneCanHelpMe:
this is the full output:

C:\..\Desktop>apktool b framework-res

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

aapt: warning: string 'device_encryption' has no default translation in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'device_encryption_desc' has no default translation in C:\

Users\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'global_action_data_mode_off_status' has no default transl

ation in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'global_action_data_mode_on_status' has no default transla

tion in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'global_action_toggle_data_mode' has no default translatio

n in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'lockscreen_decrypting_sd_card' has no default translation

in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'lockscreen_decrypting_usb_storage' has no default transla

tion in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'lockscreen_encrypting_sd_card' has no default translation

in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'lockscreen_encrypting_usb_storage' has no default transla

tion in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'lockscreen_missed_call_count' has no default translation

in C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'lockscreen_missed_msg_count' has no default translation i

n C:\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'password_recovery' has no default translation in C:\\..\Desktop\framework-res\res; found: is_IS no_NO

aapt: warning: string 'password_recovery_desc' has no default translation in C:\

Users\Administrator\Desktop\framework-res\res; found: is_IS no_NO

I: Building apk file...

C:\Users\Administrator\Desktop>

I get an apk, but is like about 100KB less that the working one. When it is compiled, do I have to put resourses.arsc from the original framework-res.apk to the new modded apk?

PS: I have a modded framework-res.apk for CRT effect, transparent status bar etc. its size is 5.32 MB and it works just fine with copying over the original one with Root Explorer

Thanks
[Galaxy S II Themes and Apps] K_Hismoom:
apktool calls aapt to compile resources, at least on my 64bit machine, and that tool is included in the SDK.

Maybe you somehow have aapt somewhere on your box?

One thing I should mention: I had difficulties with the created zip file, the framework-res.apk inside it was corrupt. I had to manually zip the files for it to work. File Roller is version 2.30.1.1, zenity 2.30.0, unzip 6.00, apktool 1.4.1, sed 4.2.1

Thanks for the link, I didn't know of that version, gonna try it out.
[Galaxy S II Themes and Apps] floyd0815:
No, from the new one into the original and then use this modded ori.

Also someone made an app for windows - did you try this? (first post)
[Galaxy S II Themes and Apps] floyd0815:
aapt is part of the linux-package of apktool and this should have been installed by my install script. -> it's in apktool-install-linux-r04-brut1.tar.bz2

In the sample zip is already a framework-res.apk so maybe this one wasn't overwritten -> if the md5sum-window shows you "d1e00376e14480aabfd9ae39779b53ea" that was the case.

packages: file-roller 2.32.0, unzip 6.0-4, zip 3.0-3 (Ubuntu 10.10)

Maybe file-roller is using p7zip-full (9.04~dfsg.1-1) on my machine instead of zip/unzip.

Would be nice if you can install it and try again!

THX
[Galaxy S II Themes and Apps] K_Hismoom:
After removing everything, including the SDK and reinstalling apktool, it works as expected, without the need to install the SDK.

Maybe something during the initial installation also needed the 32bit compatibility libs, which I had not installed at that time.

Strange thing though, each time I run the script on a clean apktools-folder and the exact same framework file, a different md5 hash is calculated, almost as if apktool's outcome was non-deterministic...

This is on Ubuntu 10.04.3 LTS x86_64.
[Galaxy S II Themes and Apps] NoOneCanHelpMe:
i'm so stupid, I hadnt read well the first post :X i think it works now :) thanks

The browser craches every min :X nvm i think i will stick to dolphin :) Samsung should include option to change it in 2.3.4 :)
[Galaxy S II Themes and Apps] floyd0815:
@sianzb0i

Facebook problem:

I just made a fw for LeoMar75 Revolution 2.2 were I've left the strings.xml in the "values" folder as it is and only changed the "values-de, values-en,..." and it seems to work!

PS:

I'm not on FB but I've tried it with the account of my

67-year old mother

:D:D:D so I haven't tested all areas/options of it.

EDIT:

Not all languages supported! (bad script - my fault) If you want a working one contact me or use the software from the 1st post.
[Galaxy S II Themes and Apps] sianzb0i:
Hi all, i need someone to help me with my apk. I am going all crazy. (although i am on dolphin browser alrdy)

Can someone pls help me to edit and tell me where went wrong?
[Galaxy S II Themes and Apps] floyd0815:
Was this an already a modded fw? (seemed not to be)

A flashable zip is attached with UA desktop, but the FB-app is still not correctly working with it. (it's working except the "news")

Make a copy of that zip, rename it and put yout ori fw into it (/system/framework/), in case something goes wrong.

Recovery

wipe chache partition (isn't really needed, but since you had problems...)

install zip

choose zip

select zip

reboot
[Galaxy S II Themes and Apps] floyd0815:
Found a better string!

I've found a better string for the UA:

With this one some sites like gizmodo or lifehacker, which aren't usable in desktop-mode, are still in the mobile-version, others like engadget, google or amazon are still in desktop view and e.g. the FaceBook app is correctly working with it.

Mozilla/5.0 (Linux; U; Android %1$s) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1

Sadly youtube is mobile but has bigger previews (see screenshot) which are a little offset when you click them (too big - you can scroll left/right) - no problems playing them.

One other (IMO good) thing is, that if you search in the browser or from the homescreen you get the results in mobile-version but if you search from the google website you get the full desktop view.

I've linked flashable FWs for Revolution 2.2 and one for the "nearly going crazy" sianzb0i.;)

-> Revolution 2.2 new Desktop

-> Framework for sianzb0i
[Galaxy S II Themes and Apps] sianzb0i:
Hi bro, thanks alot for ur effort. I give u a "thanks" first for ur effort u put in.

I will flash it soon. So i go to cwm recovery and install from zip?

btw how to make this .zip file? or is just normal zipping?
[Galaxy S II Themes and Apps] floyd0815:
Yes, just flash it in recovery.

I haven't made the zip myself, I've only put the framework into the right place in it and so can you.
[Galaxy S II Themes and Apps] floyd0815:
The META-INF folder (and all in it) is needed and the file /META-INF/com/google/android/updater-script tells the sys what to do.

ui_print("Framework mod");
ui_print("");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
unmount("/system");
ui_print("Update ready... have fun");

So with this zip you can flash every framework file and you can even make e.g. an "app" folder in /system/ and place a system-app into it which will be also flashed. (look at the script -> everything in /system will be flashed)

EDIT:

Is the FW working fine for you?

Side note: I like to help, but plz search for this kind of questions before you post and ask in the right thread. THX
[Galaxy S II Themes and Apps] sianzb0i:
FB app is ok but browser still in mobile (with ur new string).

i think i found a new method to upload the apk, im gonna try now :)
[Galaxy S II Themes and Apps] floyd0815:
With this string not all pages are in desktop view (like FB and gizmodo) but some are (like amazon and wiki) so i think it's a good balance.

Also because sites like lifehacker were unusable in desktop mode.

Read more.

(and maybe you have bookmarked mobil sites...)
[Galaxy S II Themes and Apps] sianzb0i:
tried my own apk again. finally its loading but facebook app having same issue -.-

EDIT: i changed all the languages except the default "values" folder this time. still failed
[Galaxy S II Themes and Apps] sianzb0i:
google was also in mobile so...yeah
[Galaxy S II Themes and Apps] floyd0815:
If you typed in google.com you got to the mobile view - with the fw for you I've posted? I don't think so.
[Galaxy S II Themes and Apps] sianzb0i:
well, thats what i got. i am trying to reflash ur zip now
[Galaxy S II Themes and Apps] sianzb0i:
done, still failed.

I suggest u help me make a new zip wif the original UA string; the one in OP :)

cos that was working but destroyed FB
[Galaxy S II Themes and Apps] floyd0815:
U are on windows? Take the software from the first post, mod your fw with it and put the modded fw into one of my flashable zips - Done!
[Galaxy S II Themes and Apps] sianzb0i:
i just decompiled ur apk and realised all the UA were untouched, that explains why nth was changed

EDIT: and btw what software were u talking abt in the first page?
[Galaxy S II Themes and Apps] floyd0815:
The new string is only different to the original by one word -> the "mobil" is deleted. (and I've left the string in values as it is since every language has his own folder)

I've just checked it again.
[Galaxy S II Themes and Apps] sianzb0i:
i decompiled ur code and the "mobile" is still infront of the safari at the last few character. I checked 2 of the xmls and they are there, as if there were untouched
[Galaxy S II Themes and Apps] floyd0815:
PLZ be more specific! I also decompiled it again and there was no "mobile" in values-bg and values-de. Where did you find it?
[Galaxy S II Themes and Apps] floyd0815:
@Sianzb0i

Here is a last FW for you. In this version also the string in values is set and the FB app should work (worked for me) but not all sites are in desktop view. If this doesn't do it, I cann't help you. Sry

EDIT:

Updated! :)
[Galaxy S II Themes and Apps] DocRambone:
Here is a version for STOCK XXKG3 roms. (with fixed UA)
[Galaxy S II Themes and Apps] sianzb0i:
i checked the "values" and the "values-en-GB" folders and both did contain the "mobile" in the UA

alright i will try again tonight :)

i also kinda gave up alrdy. I think i will use just dolphin instead, unless android 2.3.4 wif the new firmware solves it.

BTW why can i multi quote, only one post will be quoted -.-

have a nice day, bro
[Galaxy S II Themes and Apps] Yanardag:
Hi floyd,

can you change this fw to a real german desktop ua please (facebook, engadget)

Thx

link to fwres http://xdaforums.com/showpost.php?p=15647061&postcount=109
[Galaxy S II Themes and Apps] floyd0815:
I've noticed yesterday, that my script isn't changing all strings.xml.

I haven't found a file in e.g. values-de-rAT so I thought they are only in values-de, values-el,... my fault!

Will update my post later and give you a really working FW.
[Captivate Android Development] existz:
Since some of you have bad luck with OC kernels, I decided to build a non-OC kernel but still with a few features..such as UV support (no OC), Voodoo Lagfix and Sound..etc..

Think of this kernel as SP-Voodoo for 2.3.4

This Kernel is an i9000 sourced 2.3.4 kernel for I9000 Gingerbread JVP

This kernel is built off of Xcals Reorient v2.0 and is only tested on JVP!

As always, flash at your own risk, im not responsible for any damages!

Get support at #suckerpunch

Latest sources can be found on Github

Remember, I cant fix stupid or lazy. Please read the whole OP and the first and last 5 pages of this thead!

Custom Boot Animations

The bootanimation.zip needs to be /system/media/sanim.zip <- notice the name change

To install:

Flash .tar with Odin/Heimdall

If using Odin place tar in PDA slot

Enable/Disable Voodoo Lagfix in CWM->Voodoo

Delete Voltage Control settings in CWM->Advanced

Kernel Features

Voodoo Lagfix

Voodoo Sound v9

339MB RAM

BLN support

Uses Gamma 2.2

Speedmod Color Fix

Ondemand Governor

Smartass/Interactive Governor

Custom CWM3 (from Talon)

Wired Headset Support

Audio Dock Support

Battery Polling set to 60s

Set Light Sensor Polling to 1s

Security Fixes from FuguMod Kernel

Updated to latest Samsung source

Fixed KTLO with new Samsung source

UV support up to 1ghz (no OC)

Full list of changes found HERE

JVP-Voodoo-1.0.0.tar MD5: d7d9b4b025cc25a096fe41956fa0e000

JVP-Voodoo-2.0.0.tar MD5: 7b72d5f84cfeeb43d0411057f4f2c136

2.0.0

-add smartass governor

-add interactive governor

1.0.0

-initial release

NOTE

This kernel will remain closer to Samsung source and not as extreme as Talon.. This is for those of you who want a semi-modded stock kernel.

To check frequency time used, use Storm717's app HERE

Thanks to Hardcore, Ytt3r, Xcal, Supercurio, Chainfire, Raspdeep, sztupy, DG, Laststufo, Kodos96, zacharias.maladroit, Kang and Morfic (if I forgot you, let me know and ill add you)
[Captivate Android Development] existz:
reserved

10char
[Captivate Android Development] Vivified:
first

10 char!
[Captivate Android Development] watsa:
second :D 10 char
[Captivate Android Development] Uncle Irish:
Nice!

Apexifying now
[Captivate Android Development] watsa:
'slacker' was a cool name for it :D
[Captivate Android Development] existz:
Lol..yea i might stick with that name..not sure yet. I didnt want it to come off the wrong way, it was not directed towards anyone but me.. I simply cherry-picked things from what we had already done with Talon, but i might end up using it.. Vivified is working on a boot image, just wanted to get it released, will brand it in the next version :P
[Captivate Android Development] Barbarian:
Interesting :D
[Captivate Android Development] sstarre:
Presently running it on Continuum 5.6 for those who might be interested..

Use ODIN - no reboot - clear dalvik,etc to avoid issues

seems to work great.. no BT problems or wifi issues as yet with 5.6 :D
[Captivate Android Development] Vivified:
Yes, this will not have BT issues, and bootanimation works again!
[Captivate Android Development] Uncle Irish:
This!

Black is a scarey thing sometimes...
[Captivate Android Development] sstarre:
hmmmm ... interesting sig :)
[Captivate Android Development] existz:
Yea it might be black on first boot...Xcal has an explanation on his thread about it, but after first boot bootanimation will work

Also, yea there will be no BT issue with this one, the problem was from Chainfires initramfs...we have also updated Talon to use Voodoo lagfix/initramfs..will be in next version of Talon
[Captivate Android Development] Vivified:
oh that old thing.. ;)
[Captivate Android Development] sstarre:
existz..does that mean we should not use chainfire's CWM manger? It seemed a little wonky when I tried to use it to start a CWM backup...
[Captivate Android Development] Uncle Irish:
Looking forward to the next Talon.. soon I hope :)
[Captivate Android Development] existz:
Ah thats up to you...i usually just do a backup from inside CWM manually..but thats just me
[Captivate Android Development] sstarre:
Yeah, that's what I did...

BTW - XDA PM'd you last night...

Thanks again for this...
[Captivate Android Development] watsa:
Talon will rock next apex update then. cant wait to get talon back
[Captivate Android Development] Vivified:
JVP-Voodoo 1.0.0 is SUPER STABLE AND SMOOTH!