yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] CleveRuse:
God I'm lost. Ok, so I've tried a ton of different things. First I tried taking everything out of the "other" folder, then running script, thinking maybe they aren't recognized inside the folder, since the script is outside. Didn't work... So I put them bak.

Next I tried adding the parent folders ('apk_manager' and 'other') to the end of path in .bashrc, by adding the following to the end of my path, so it looked like this:

PATH......bla, bla .../platform-tools/ (and added) :/home/aaron/sdk/platform-tools/apk_manager/other/

It didn't work. I also tried just adding '/apk_manager' (w/out 'other'). And even tried adding the path for all missing files individually. Maybe I'm not adding paths correctly. Should I put a semi-colon ( ; )'in between paths, instead of colon ( : )?

Anyway...

So now I'm throwing "hail-marry's." I tried pulling the unruly files ,7za and optipng (can't find sox), from 'other' folder, n placed inside 'apk_manager' with the 'script.sh' ...and it WORKED! I ran the script and only the elusive 'sox' file was supposedly missing from my path...

But of coarse I didn't exactly know why, so ...I put em bak. Tried some other things; failed; then took them bak out ...but this time it didn't work ...sigh

WTF is going on. The script isn't in my path, but its recognized ...cuz I'm pointing to it in the terminal by: "cd ...apk_manager." It's (script.sh) in the file (apk_manager) just like the others. And all are in my SDK, which IS in my PATH. Why are some things recognized, but not others?

Hope that wasn't too confusing;)

Side note: if I'm able to run 'adb' from any directory, becuz I set '/platform-tools/' as an environment variable, why can't I run the './script.sh' from any directory, once I set 'apk_manager' as a variable (in PATH)?
[G1 Android Development] Brut.all:
On Unix there are two things you may want to do:

Run a file "installed" into your system/PATH. You do this by typing its name, e.g.: "cp", "ls", "adb" (if it's in PATH), etc.

Run any file chosen by you from any directory - to do that you have to pass absolute or relative path to this file, e.g.: "somedir/somefile", "../foo", etc. If you want to run a file from current directory, you can't just type its name, because shell will think you want to run a system/PATH command - you have to write a path to this file, so: "./somefile".

So:

"script.sh" - will run a file from PATH, but won't even look into your current dir

"./script.sh" - will run a file from current dir, but won't look into PATH
[G1 Android Development] CleveRuse:
Wow, ok so ...isn't that why I start with: "cd ...path-to-apk_manager"

then run: "./Script.sh" ? (after chmod of coarse)

That would tell it to look in the current dir. eg: "apk_manager" ...right.

So why does it say files (7za, optipng...) aren't installed or in path? Wouldn't that only matter if I tried "Script.sh"?

Sorry, still confused

But for my last question, I understand. I put "apk_manager" in my path, but still was typing "./Script.sh" I should have done "Script.sh"
[G1 Android Development] CleveRuse:
Oh, if it helps, I'm setting PATH variables in my ".bashrc" file alone. I used a text editor.
[G1 Android Development] Droidzone:
You can verify path with:

echo $PATH
[G1 Android Development] Brut.all:
I didn't follow this topic from the beginning, so I'm not sure what is this all about, but I downloaded apkmanager for linux from first post and it doesn't work on my Ubuntu. If your problem is that you can't run apkmanager, then cd to "other" dir and run: "chmod a+x 7za aapt apktool optipng" - everything should be ok now :-)
[G1 Android Development] dully79:
I posted a long time back how i got sox running on Ubuntu, just do a thread search and you should find it.

Hope this helps. :)
[G1 Android Development] lippol94:
+1! I'd like to know too

Sent from my Blazing fast CM7 powered SGalaxyS
[G1 Android Development] tommytomatoe:
Ditto what Brut said here.
[G1 Android Development] CleveRuse:
*removed post*
[G1 Android Development] CleveRuse:
Yep, that's it ...Thnx brut.all, tommyt, dully. Beautiful

+1 for Linux update ...this is ridiculously tedious. Makes me miss Windows!
[G1 Android Development] CleveRuse:
*removed another redundant post*
[G1 Android Development] CleveRuse:
I know I've been taking this thread hostage but...

I noticed I didn't have to set the "sox" file in PATH (or even put with 'other' apkmanager files) to run script.sh, just install. Is that cuz it installs, by default, to '/usr/bin/ ' , which is already part of my default system PATH?

...Is the 'aapt' file (included with apkmanager) obviated by the 'aapt' file in my 'SDK,' since its in my PATH along with the SDK?

Also, can someone explain why permissions need set to run these files (script.sh, 7za, aapt, etc...) If they aren't root files or commands?

...and why they can't be recognized simply by placing in my PATH?

Note: everything is working well enough, I'd simply like to have a better understanding of things, as I'm still very "green."
[G1 Android Development] tommytomatoe:
They have to have permission set to executable. chmod 755 will do it and so will chmod +x. And btw, aapt is a command. As well as 7za, and you're basically making script.sh a command as well.

As for sox, yes, it installs to your PATH so you don't have to set it :-)
[G1 Android Development] CleveRuse:
Thnx bro, glad to see everyone so willing to help a noob ...ill be sure to pay it forward.
[G1 Android Development] Brut.all:
Yes. When you install something in unix, it usually put its executable files in /bin, /usr/bin or /usr/local/bin or it adds its dir to PATH. So you don't have to do that by yourself.

This depends on how aapt is called in Script.sh. AFAIR Script.sh adds "other" dir to the end of PATH, so aapt installed in system PATH will have higher priority.

I think executable permission was added in unix to not run file by accident. This perm does not prevent you to run a file, it just makes this harder. Many tools, including shell, requires you to set this permission if you want to run a file.

Even if a file is in your PATH, still you have to set its exec permission to run it. Otherwise it's treated as not runnable.
[G1 Android Development] maddoggin:
im having problems decompiling and compiling settings.apk from ee03 gingerbread!

i finally got it to de-compile after switching the apk.tool to 1.4.1 but even if i don't do anything to the apk and just de-compile then try to compile it i get errors like this>>

java version "1.6.0_21"

Java(TM) SE Runtime Environment (build 1.6.0_21-b07)

Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)

I: Checking whether sources has changed...

I: Smaling...

I: Checking whether resources has changed...

I: Building resources...

aapt: warning: string 'network_name' has no default translation in C:\Users\owner\Desktop\lockscreen files\apkmanager for settings\other\..\projects\Settings.apk\res; found: es

aapt: warning: string 'no_wimax_found' has no default translation in C:\Users\owner\Desktop\lockscreen files\apkmanager for settings\other\..\projects\Settings.apk\res; found: es

aapt: warning: string 'sprint_network_summary' has no default translation in C:\Users\owner\Desktop\lockscreen files\apkmanager for settings\other\..\projects\Settings.apk\res; found: es

aapt: warning: string 'unknown_carrier_network_summary' has no default translation in C:\Users\owner\Desktop\lockscreen files\apkmanager for settings\other\..\projects\Settings.apk\res; found: es

aapt: warning: string 'wimax_quick_toggle_title' has no default translation in C:\Users\owner\Desktop\lockscreen files\apkmanager for settings\other\..\projects\Settings.apk\res; found: es

aapt: warning: string 'wimax_status_connecting' has no default translation in C:\Users\owner\Desktop\lockscreen files\apkmanager for settings\other\..\projects\Settings.apk\res; found: es

aapt: warning: string 'wimax_status_failed' has no default translation in C:\Users\owner\Desktop\lockscreen files\apkmanager for settings\other\..\projects\Settings.apk\res; found: es

aapt: warning: string 'wimax_status_no_network' has no default translation in C:\Users\owner\Desktop\lockscreen files\apkmanager for settings\other\..\projects\Settings.apk\res; found: es

can anyone help me please??
[G1 Android Development] CleveRuse:
Brut.all, thnx for all ur thoroughly descriptive responses. That's how I learn. The more detailed the better.

I'm not always knowledgeable enough to grasp things when not explained extensively.
[G1 Android Development] cyber_pete:
Does anyone know why once I get an error compiling, I keep getting it every time I compile even if I use an unmodified apk. The only way I have been able to get around this is to delete the whole Apk Manager folder and download a new copy. Has anyone seen this before?
[G1 Android Development] redsock:
I keep getting this too when i use an unmodified apk T_T. Deleting the whole file doesn't help as well.
[G1 Android Development] Alganon:
Hi,

If got 2 little questions about signing. I know that in this scrip it makes a difference whether I want to optimize an apk for system or regular.

1.) what does batch optimize do? I mean is it for system or user apps?

2) if I want to add a user app (for example GO Contacts) to system BEFORE flashing the rom by editing the update.zip of the rom. do I have to sign GO Contacts as user app or as system app (-> unsigned)

thx in advance
[G1 Android Development] Johnsondr80:
When this happens to me, mostly on a framework Res, I just increase heap size by 24mb and drop compression to 8 and all is good.

Hope it helps you
[G1 Android Development] Johnsondr80:
I Don't know about the no default translation part.

But a little less known fact about working with settings.apk is it don't like compression. Set compression to zero.

Idle if that will help or not just wanted to share that tidbit just in case it matters.

:)
[G1 Android Development] RandomKing:
Why can't I successfully decompile an already themed framework-res? If I do, regardless of whether I make a change or not, the public.xml gives hundreds of errors upon compiling again.
[G1 Android Development] tommytomatoe:
You will need to post what there what the error was.

Which Rom or.phone is this for? Is it sense of aosp? Which version, ie froyo or gb? I can almost guarantee you it is an aapt issue. But please be more specific wig your error.
[G1 Android Development] old.ghost:
great tool, thanks.
[G1 Android Development] RandomKing:
For the Samsung Epic 4G, running Froyo, but more specifically, running Syndicate Frozen Rom 1.1.0. The framework can be found in the zip in this link.

More specifically, all I would like to do is update the strings.xml to reflect something other than "Sprint" in the pull down menu, while retaining all the theming done to this particular framework-res.apk. But after a successful decompile, when compiling I receive errors regarding public.xml and things being already defined or not defined.

Edit: I am fully aware of what I'm editing, and can make it work on the original framework. But as I have stated, I want to edit this tiny change into the SRF themed framework-res.
[G1 Android Development] dreamsforgotten:
My suggestion to you cause I work on the epic too. When you decompile stock sr rom, copy the stock ec05 drawable_hdpi in the project folder to recompile then swap drawables again after a successful compile
[G1 Android Development] tommytomatoe:
Been busy all morning. Sorry I haven't gotten back to you.

Yeah, do what dreams said here. Chances are there were bad .9.png in the modded framework res. When I get to a computer ill be able to tell for sure. Unfortunately I am on EVO sp I cannot test for you but that would.likely be an issue. That and wrong aapt!
[G1 Android Development] Brut.all:
Yeah, I know what signing is. But in cryptographic world there is one rule: you have private key = you could do everything. If some guy wants to allow other to sign things for him, then he could share his private key and that's all. I don't think rom cookers want to protect their systems, so they could publicize their keys and it was always quite logical to me, that these are just testkeys - public keys, that every rom cooker use for his system to allow people to mod it.

Now I'm confused, because seems CM is built using testkeys, but... certificates don't match... I don't understand.
[G1 Android Development] idroid84:
Maybe ask the cookers of CM whats going on? :confused:
[G1 Android Development] Daneshm90:
Wait are you sure ? i thought they signed using platform keys :confused:

Do any of u by chance have eclair source setup on ur machine ? can u upload the testkeys folder ? i wanna play around with em.
[G1 Android Development] Brut.all:
No, I'm not sure, I'm really confused ;-) But as I said above digests were identical when I resigned some file using testsign, so I think original file was signed using same keys.
[G1 Android Development] Daneshm90:
Hmm k. Imma download eclair source n try the testkeys from it. I think its platform keys they use for /system/apps and testkeys for rest. Again im guessin :rolleyes:
[G1 Android Development] idroid84:
Can we test???? ;)
[G1 Android Development] Daneshm90:
Lol once its done downloading the source, remember its like 2.5gb lol. Any way i can just download the build folder ? im REALLY new to this :rolleyes:
[G1 Android Development] idroid84:
I ain't got a clue! :p
[G1 Android Development] Daneshm90:
Read this in the meantime. Good info ;)

That was fast, here r the keys if u wanna play around with em

link
[G1 Android Development] PapaDocta:
damn .. this is really cool yet soo scary... can hack any apk!
[G1 Android Development] okolowicz:
Daneshm90,

Thank you again for such a great tool. I have been having tremendous fun playing with apks :)

I've been having pretty good success tweaking apks to my liking but have another question: If I want to add something to an apk what is the preferred method:

-editing the xml directly and recompiling, or

-using Eclipse to modify the contents and rebuild?

And, if Eclipse is the way to go, do I need everything in the "out" folder or can some of it be deleted?

I have been tweaking some widgets to match the HTC widgets I but, some require additional elements to match the UI. For example, I edited and recompiled one widget and it looks exactly as I want it to but it does not have a background to the text_label. I'd like to add one and would like to know the best way to take the next step.

Thanks in advance!
[G1 Android Development] thatguythatdid:
Okay so I themed a version of fancy widget and I changed the name in strings.xml and the android manifest and it worked except now the clock doesn't work. (God I'm close) So any ideas on what the hell happened? Probably should paste a logcat :) Let me know

By works I mean it installed and I choose smooth (My name for the widget that shows up :) ) So the widget appears on the screen and then it doesn't work though :(
[G1 Android Development] Daneshm90:
Yea log wud be nice. Also try just decompiling and compiling without making changes n see if it even works tht way.
[G1 Android Development] thatguythatdid:
Okay give me about five. speaking of I know that there is a problem with compiling tmo slide mymode themes
[G1 Android Development] Daneshm90:
Heres another thing i found today. If a simple decompile/recompile still causes errors, wht i did was compile my modded apk and transfer only the file i modded into the original apk, sign it n install it.
[G1 Android Development] thatguythatdid:
Here's a copy of my logcat. Also how do you put strings.xml into an apk?

View attachment logcat.txt
[G1 Android Development] Daneshm90:
seems like the name change causes issues. ill get back to u tomoro. gotta sleep.
[G1 Android Development] thatguythatdid:
Thanks appreciate it
[G1 Android Development] Brut.all:
Err... is there classes.dex file in this apk? I think this apk was odexed, so you have installed apk without any code - only resources :-) You have to to pull *.odex file from a device and deodex it.

Theye're packaged in resources.arsc file.
[G1 Android Development] BolecDST:
By doing what? Replacing files in original apk using winrar or such? Sorry for asking but I don't understand what you wrote ;p
[G1 Android Development] Johnsondr80:
Correct me here if I am wrong but it seems to me that it works best if you simply delete the "public.XML" and allow it to rebuild during recompiling.

Works for me everytime. But I am a captivate.
[G1 Android Development] rquiett:
Great work I tried to use apkedit and apktool and neither one would work, but this one works great for me. Thank you for the hard work
[G1 Android Development] dreamsforgotten:
Wtf lmao. Never even thought to try it! I always just replace the drawables back and fourth brilliant
[G1 Android Development] RandomKing:
Sounds good... i wasn't aware you could do that! I'll give it a try haha. :D

-Sent from my custom Epic.
[G1 Android Development] dansta34:
Can anyone please tell me how to compile a rosie from sense 3 after making edits to the value folders to make the app drawer 5 rows and transparent i just cant get the transparent changes to show i have looked every were on xda for info and cant find the answers so i no there are a lot of smart guys on this thread that might be able to give me the right answers or put me onto a thread that will have the right answers I have always been able to work out this stuff on my own and have had success with editing the rosie before but first time trying to make these changes and feel like an idiot for something that shouldnt be that difficult.I will really appreciate any help...!
[G1 Android Development] fernando sor:
You need to go to layout/all apps veiw.XML and mod that. Also layout land/launcher.xml
[G1 Android Development] explodingboy70:
Ok I'm lost.

I'm trying to change the styles.xml in values. From what I've been reading and from the script message I am supposed to delete resources.arsc from the keep folder. When I do that I'm left with no resources.arsc, if I use the resources from the original apk it doesn't change the one thing that I want to and if I use the resources from an apk that has what I want I get errors in addition to losing other mods.

Any help is greatly appreciated.
[G1 Android Development] dreamsforgotten:
You delete the resources in keep, hit enter in script, then it created a new file called unsigned framework res.apk rename that to just framework-res.apk and flash that
[G1 Android Development] explodingboy70:
Thats resulted in bootloop. Does the resources.arsc not contain all of the values files including the one i want to change?

Il try that way again but im not understanding how the values files get carried over.
[G1 Android Development] fernando sor:
Values are resources. Arsc recompiled
[G1 Android Development] explodingboy70:
Right and if i modify xml im supposed to delete resources and if i do that i have no resources. Also if i dont delete resources then my mod doesnt get carried over because it just brings from the original.

Is there something im missing or another way to mod values?
[G1 Android Development] fernando sor:
You can use straight apktool. You just mod and recompile. No deleting
[G1 Android Development] im_iceman:
Hi - I'm trying to mod the framework-res.apk on my Arc (2.3.3) to include the CRT White line animation here but every time I do it I'm getting an APK which is much smaller than the original..

Does anyone know what the correct compression rate should be?

and Do I need to re-sign it before I put it back on the phone?

Thanks. Alan.
[G1 Android Development] dansta34:
Thank you so much i new the guide i had was wrong i will give that a go and see if that works for me!

edit. I just decompiled the rosie and looked in the layout land launcher xml but cant see what changes i would have to make can you tell me please!
[G1 Android Development] dreamsforgotten:
Look inside the apk if there is a meta inf then no. you should never sign a system app. I've noticed the smaller size as well its the compression of the script you can adjust it but normally doesn't cause trouble
[G1 Android Development] fernando sor:
In all apps veiw change android background to

80000000

That is shaded transparency. Change that in launcher aldo
[G1 Android Development] dansta34:
Thanks heaps mate i appreciate it!
[G1 Android Development] fernando sor:
if you want bro i can give you a copy of the xmls for help. let me know. ive modded my rosie so much i forget half the mods ive done
[G1 Android Development] fernando sor:
actually mine is 40000000 which is a little less shade. here this is all apps view xml. the first edit i believe is the app drawer. there are three you make here

<?xml version="1.0" encoding="utf-8"?>

<com.htc.launcher.AllAppsView android:layout_width="fill_parent" android:layout_height="fill_parent" android:inAnimation="@anim/fade_in" android:outAnimation="@anim/fade_out"

xmlns:android="http://schemas.android.com/apk/res/android">

<com.htc.launcher.AllAppsListView android:id="@id/content_list" android:background="#40000000" android:nextFocusLeft="@id/content_list" android:nextFocusRight="@id/content_list" android:nextFocusUp="@id/content_list" android:nextFocusDown="@id/content_list" android:layout_width="fill_parent" android:layout_height="fill_parent" />

<com.htc.launcher.AddWidgetLayout android:id="@id/content_add_to_home" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="fill_parent" />

<com.htc.launcher.AllAppsGridView android:scrollbarStyle="outsideOverlay" android:id="@id/content_grid" android:background="#40000000" android:nextFocusLeft="@id/content_grid" android:nextFocusRight="@id/content_grid" android:nextFocusUp="@id/content_grid" android:nextFocusDown="@id/content_grid" android:layout_width="fill_parent" android:layout_height="fill_parent" android:listSelector="@drawable/grid_selector" android:drawSelectorOnTop="false" android:verticalSpacing="@dimen/launcher_aagv_vertical_spacing" android:numColumns="5" />

</com.htc.launcher.AllAppsView>
[G1 Android Development] dansta34:
Thanks heaps again mate that makes it so much easier! I forgot to hit the thanks button before so i have now mate..!
[G1 Android Development] im_iceman:
Hi - I'm modding the framework-res.apk on my arc to include the CRT animation and I've done it successfully and it works... however it's very unstable, and everytime I try to add my google account back onto the phone the phone crashes and restarts....

I've looked at it and the recompile routine is compressing the resources.arsc file down from c.5.5MB to c.1.4MB DESPITE me setting the compression level to 0... I think that this is causing the problem.

WHY is it compressing it!? HELP!