[Q] XML Question - Droid Incredible Q&A, Help & Troubleshooting

Can anyone tell me what XML and what line in the XML I can find were the default color is located for these two screen shots? Currently it is white and I want to change it to blue. Also I seem to be having an issue recompiling my framework-res and rosie.apk I keep getting Bootloops. It might be because I used the command apktool d Rosie.apk ./out to decompile it. It decompiled it fine but it created the drawable as drawable-hdpi-v4 and it should be drawable-hdpi how do I get it to decompile it with the correct name?

had this issue when i edited framework-res.apk, permissions got all screwed up by apktool...fix was
adb shell
chmod 644 system/framework/framework-res.apk
OR
chmod 644 system/app/*
--Thats for bootloops, i havnt seen your issue regarding the wacky folder names so not sure how to help..sorry,

Related

[Q] Deleting default wallpaper in CM

I have UltimateDroid 2.5 on DInc and I wanted to get rid of the default wallpaper, the android figure with the eyepatch. I know it is in framework.apk/drawable. I wanted to know how to delete the wallpaper from framework and put it back into the system folder. Thanks.
I'll help you with this. I'm assuming you know how to run the adb terminal and have 7zip installed.
first off always nandroid.
After you load cmd, change the directory to your adb, do this.
Make sure your device pops up after typing "adb devices"--no hyphens, if you already knew that my bad.
type:
adb remount
adb pull /system/framework/framework-res.apk
it will show up in your sdk folder in the tools directory. Right click the framework-res.apk. Find 7z and select open archive. Find the res folder, double click. Then find the drawable folder. The default wallpaper is located there. Slide whatever image you want into it after renaming it to default_wallpaper.jpg. After your done editing, close it out . in cmd type:
adb push framework-res.apk /system/framework
adb reboot
It's changed.

framkework

Hey guys, I wanted to modify the framework in cyanogenmod 7. What I did was se this command in terminal:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
rm /system/app/SystemUI.apk
so as you can see, i deleted the framework and after that i couldnt do anything in terminal. I turn off the phone and then i usb mounted the phone to adb push the moddified systemui.apk, i was able to push the apk, but when i restarted the phone, there was no framework.. any ideas as to why that is.. maybe the apk file is corrupted?
Its named signedsystemui.apk! Did you push it with the right name?
Sent from my......ummm...let me get back at'chya!
I don't usually delete things before pushing new file and I don't normally recommend signing system/apps.
This is what I would do. Keep in mind, your mod (whatever you may have done with it) could simply be a little goofed up.
Code:
adb remount
adb shell
stop
cp system/app/SystemUI.apk /system/app/SystemUI.bak
adb push <path to>/signedSystemUI.apk /system/app/SystemUi.apk
start
exit
In the above, <path to> refers to the location of your modified aoj. For me, it would normally be "Users/tommytomatoe/Mod/app.apk". What I do is drag and drop the apk into the terminal after typing "adb push".
If it boots up after issuing adb shell start, then you're golden! If not, then do this. Keep in mind, if you're in splash screen you will want to reboot into recovery first and mount system using the options in the menu. If you're in boot loop with bootanimation, go ahead and issue these commands:
Code:
adb remount
adb shell
stop
mv system/app/SystemUI.bak /system/app/SystemUI.apk
start
exit
Now, you will have original apk and it should boot up. Go back to ground zero and remodify your apk and make sure you've taken correct steps.
All i did was change some pngs. I did sign the apk... maybe thats why it didnt work..When changing pngs to the systemui.apk, do i also have to modify the framework-res.apk?
~CR7~ said:
All i did was change some pngs. I did sign the apk... maybe thats why it didnt work..When changing pngs to the systemui.apk, do i also have to modify the framework-res.apk?
Click to expand...
Click to collapse
It appears the newer gb stuff has elements in framework res as well as system ui. It wont hurt to change both if same files exist in both. Tjats what I think.
And also, don't sign system apk. All the system apk prefer to have same signature. Signing one would result in having to sign all in most cases...
Sent from my PC36100 using XDA Premium App

[Q] Removing the gprsone icon from NilsP 2.1/3.0 BusSense

I've tried my hardest on my own, but I cannot seem to decompile and compile the systemui.apk properly without throwing brut errors. I've used APK manager and apktool, and both give me errors about the dependencies I'm trying to use. For reference, I'm using NilsP's last release of 2.1/3.0 business sense.
What am I trying to do?: remove the gprsone icon from the statusbar. I know the .png is transparent, but still takes space up on the bar.
Reference thread: http://forum.xda-developers.com/showthread.php?t=1231831
Any pointers? I've attached the framework-res and systemui in case somebody needs it to help.
Sure I can help. With apktook, you need to register your resources which are framework-res.apk and com.htc.resources.apk. Once you've registered those, then decompile the SystemUI.apk with apktool.
EDIT: Here's a quick little "How To" I use for apktool.
Put com.htc.resources/framework-res.apk's into the C:\Users\<username>\apktool folder (or where ever you keep your apktool)
Go to that directory in a CMD window, and type in:
apktool if framework-res.apk
Hit Enter
apktool if com.htc.resources.apk
Hit Enter
Decompile run: apktool d <apk name>.apk
Compile run: apktool b <apk folder name only>​
After you compile it, the apk will be in the dist folder. So for SystemUI.apk, the folder is named SystemUI. Open SystemUI/dist, and move the SystemUI.apk folder to your desktop. Use 7zip to open the original SystemUI.apk, extract the META-INF folder and Android Manifest. Open the new SystemUI.apk and put the META-INF and Android Manifest files into this new apk. You should be good to go then.
If you get really stuck, let me know and upload your com.htc.resources.apk, and I can help you out.
Attached are successful screenshots of registering your resources and decompiling successsfully, then recompiling successfully for reference as to what you should see. I used a Rosie.apk, but it'd be the same with SystemUI.apk.
Thank you for taking the time out to help!
Sorry but I followed your instructions to a T, but my phone won't get past the HBOOT (i think that's the correct term)
This time, I didn't get compile errors with apktool, but I'm not sure I did everything correctly.
I've attached my com.htc.resources.apk
http://www.mediafire.com/?2yoijsmr954md1g
Okay, I downloaded your SystemUI.apk file, and removed the classes.dex file using 7zip and decompiled that using a Java command and baksmali. I made the edits, recompiled the new classes.dex file using a Java command and smali.
It's a different way of doing things, and how I first learned to hide the location icon, and status bar clock so I feel most comfortable with doing it that way.
Attached is the updated SystemUI.apk you provided, with *hopefully* a hidden location icon from the status bar.
The easiest way to do this:
Hook phone up to computer via USB, reboot into Recovey.
Mount /system.
Open command prompt, CD to your SDK/platform-tools directory.
Type in: adb shell
Type in: cd /system/app
Type in: cp SystemUI.apk SystemUI.bak
NOTE: This makes a copy of SystemUI.apk named SystemUI.bak.
Type in: rm SystemUI.apk
NOTE: This removes SystemUI.apk, we can always to the opposite of the cp command from above to get the original back.
Type in: exit
Now make sure your modded SystemUI.apk is in your SDK/platform-tools folder, then type: adb push SystemUI.apk /system/app/
Now let's make sure that the permissions will be correct, so adb shell back into your phone, and then type cd /system/app.
Lastly, type: chmod 0644 SystemUI.apk
Hit Enter.
Type in: exit
We're done, reboot your phone.
I want to say thanks for helping me out today.
I learned some things and got the location icon removed from the statusbar.
This sounds like a win!
kschwarz88 said:
I want to say thanks for helping me out today.
I learned some things and got the location icon removed from the statusbar.
This sounds like a win!
Click to expand...
Click to collapse
Dude, that's great to hear! I love sharing what I've learned, and am glad you took the time and learned something! This stuff is fun, so continue learning!
It's a total win! If you wanna know the Java commands to decompile classes.dex, let me know, and I can pass that knowledge on!
Sent from my ADR6300 using xda premium

[Q] Rebuilding SystemUI.apk

Hello, I'm trying to customize a rom and I'm running into some issues rebuilding SystemUI.apk.
I'm not sure if it matters, but for reference I'm using MoDaCo Custom ROM.
Here is my process:
Installed apktool 1.4.3 along with aapt from the ICS android SDK platform-tools
Extracted the SystemUI.apk file from the rom zip
Used apktool to extract SystemUI.apk
Made my change (edited navigation_bar.xml to put the buttons in the order I wanted)
Rebuilt SystemUI.apk with apktool. No errors.
Put the SystemUI.apk file back into the rom zip
Flashed the rom with CWR
However, once I get into android, there is no notification bar and no navigation bar. The launcher is just expanded to take up the whole screen. I believe apktool isn't rebuilding SystemUI.apk tool correctly, but I'm not really sure where to go from here. Is there some framework I'm missing for apktool that I need to add?
Any insight is appreciated. Thanks.
I'd start by just working with SystemUI.apk, not the entire rom zip.
Install the rom, confirm it's working.
Pull SystemUI.apk from the rom.
Decode it, make NO changes, re-endcode it then:
Code:
adb remount
adb shell stop
adb shell cp /system/app/SystemUI.apk /system/app/SystemUI.bak
adb push SystemUI.apk /system/app/
adb shell start
That will confirm your apktool and aapt and framework are working.
Also this way you can test each edit much more quickly.
Assuming this works then do the above procedure with your edited XML - you need to re-endcode then take the xml from one apk to the other.
If that does NOT work then you know there's a problem with your XML.

Questions about pushing framework

I'm far from a novice when it comes to this stuff, but for some reason I still can't seem to push any modded framework back to my phone. Maybe some of the talented themers that mod multiple frameworks for different ROMS can help.
My method thus far:
Decompile framework with apktool 1.4.2 (1.4.3 gives errors in public.xml and after researching is supposedly a bug in the apktool version)
-Copy projects folder and framework-res.apk to apkmultitool
-recompile with changes using apktool 1.4.3 in ApkMultiTool
-no errors so far in either decompile or compile.
-rename unsigned framework to framework-res.apk
-adb push ./"framework-res.apk" /system/framework
-changes are visible in framework, shortly before apps start force closing like mad.
Questions:
-Do i need to push framework over adb from CWM with /system mounted, or can i do it from within a booted OS?
-I only have one framework installed to C:/, but it's for a slightly older build (AOKP b23) - could that be the culprit?
-How would i go about overwriting an installed framework for when i update builds, so it's always using the current framework?
Thanks guys.
This sounds bad but did you actually install the framework you were modifying? I had the same issues with framework editing with ICS. My lockscreen would go all over the place.
Put the framework-res into the "Place-here-for-modifying" folder and type this command in CMD
java -jar other/apktool.jar if place-apk-here-for-modding/framework-res.apk
Click to expand...
Click to collapse
I have a batchfile that does it for me automatically. Try that. If you've installed the framework already then I'm baffled by this.
EDIT: Saw the whole post and it seems the current installed framework WILL be the culprit. Any older version of a framework (especially AOKP) will screw up. You just need to use the batch file I'm using to keep on top of it. I install the framework everytime I edit a framework. I'm a little OCD like that.
If you need the batch file, PM me.
artvandelay440 said:
I'm far from a novice when it comes to this stuff, but for some reason I still can't seem to push any modded framework back to my phone. Maybe some of the talented themers that mod multiple frameworks for different ROMS can help.
My method thus far:
Decompile framework with apktool 1.4.2 (1.4.3 gives errors in public.xml and after researching is supposedly a bug in the apktool version)
-Copy projects folder and framework-res.apk to apkmultitool
-recompile with changes using apktool 1.4.3 in ApkMultiTool
-no errors so far in either decompile or compile.
-rename unsigned framework to framework-res.apk
-adb push ./"framework-res.apk" /system/framework
-changes are visible in framework, shortly before apps start force closing like mad.
Questions:
-Do i need to push framework over adb from CWM with /system mounted, or can i do it from within a booted OS?
-I only have one framework installed to C:/, but it's for a slightly older build (AOKP b23) - could that be the culprit?
-How would i go about overwriting an installed framework for when i update builds, so it's always using the current framework?
Thanks guys.
Click to expand...
Click to collapse
I don't think it's good to push framework while the phone is in use. I always push system stuff while in recovery. That way the 'android' portion of the phone isn't running and you can replace what you need to.
I haven't tried replacing the framework for Galaxy Nexus but for the SGS2, I usually do a sync and reboot immediately after pushing the file:
Code:
$ adb push framework-res.apk /sdcard/framework-res.apk
$ adb shell
# mount -o remount,rw /system
# sync
# cat /sdcard/framework-res.apk > /system/framework/framework-res.apk
# sync
# reboot
It hasn't failed once for me.
I've managed to get ApkMultiTool updated to decompile and compile without any errors now, eliminating the need to use a different program. However, now when i push modded framework to the phone, it simply hangs at the animation on boot. I made sure i only had b25 framework installed this time (thanks Nitroz) but the darn thing still won't boot. grrrrr.
-Decompile/Compile with Apk multitool using apktool 1.4.3 and only edit 2 .png images.
-rename unsignedframework-res.apk to framework-res.apk
-adb reboot recovery
-mount /system
-adb push ./"framework-res.apk" /system/framework
-hangs up at boot animation.
-FML
I even tried not using apkmultitool at all and just using console commands with apktool itself and still got the exact same result.
Really appreciate the help so far, and if everyone is out of ideas, that's ok.

Categories

Resources