yashsingh1/xdaforums huggingface dataset:
[Android Themes] Raymond Ebertt:
I added the additional folder structure in the priv-app with no success (vrtheme\system\priv-app\Velvet\Velvet.apk\(res and resouces)

Even with VTS (Virtous Ten Studio) and CMD commands following (adb push Velvet.apk /system/priv-app/Velvet/ ) nothing happens. Its as though there is a wall blocking any push.

I think you're correct on the installtheme.sh. But I still don't know why traditional pushing isn't working. I'm on the GPE Lollipop for the HTC M8. Frustrating.
[Android Themes] Spannaa:
The 'vrtheme' part of the zip definitely won't work until installtheme.sh has been updated to cope with the new folder structure but the 'full' apk part should still work if apks are dropped into the 'new' folder using the correct path (e.g. (new\system\priv-app\Velvet\Velvet.apk).
[Android Themes] 2WildFirE:
same here no adb push or with VTS is working, permission denied.
[Android Themes] Spannaa:
This may be because VTS hasn't been updated to work with Lollipop roms yet and adb has been updated since the last release.
[Android Themes] Raymond Ebertt:
I'm finally successfully pushing with VTS. I tried the GoogleContacts, made all white colors in color.xml red. From that, I did the following. I opened the binary folder, shift right click and copy as path. From there, I went to CMD and used

adb remount

adb shell stop

adb push "C:\Users\Raymond\Documents\Virtuous Ten Studio\Projects\Lollipop Theme\GoogleContacts\Binary\GoogleContacts.apk" /system/priv-app/GoogleContacts

adb reboot

My edits came out. However, after doing the same thing with the Velvet.apk, I got nothing.
[Android Themes] aureljared:
I'm going to type up a fix for installtheme.sh in a little while (gonna figure out how to check android version in recovery). I'll post it here as a beta so you can test it.

As for Velvet.apk, have you confirmed that the app hasn't been updated yet? Your edits to the system app won't appear because the app in /data overrides it.
[Android Themes] Raymond Ebertt:
Yes, I've discovered that there are two Velvet apks on the ROM, one called

data/app/com.google.android.googlequicksearchbox-1/base.apk

and in

system/priv-app/Velvet/Velvet.apk

Though both have different apk names, they have the same package name in the Android manifest.

If I attempt to push or replace the data/app, I get a Google Search force close. The only way so far I managed to get it working was by placing the ROM in a shell stop and using adb push cammand, but even that only worked sometimes.
[Android Themes] Raymond Ebertt:
Any updates on the vrtheme zip? I've tested other folders like the framework-res.apk that doesn't have a subfolder and I can't get anything themed. It seems that lollipop may need an entirely new vrtheme script.
[Android Themes] Spannaa:
I've PM'd you with a test build of a lollipop vrtheme template that works for me on stock Android 5/Nexus 7
[Android Themes] Raymond Ebertt:
After testing, I can confirm it's working for GPE Android 5.0. Good job mate. :good:
[Android Themes] Raymond Ebertt:
Good job [MENTION=2948558]Spannaa[/MENTION] on the final touches of the vrtheme. Works very well. Thanks for all your work.

Here's my first theming with the lollipop vrtheme. On to another project.

​
[Android Themes] aureljared:
UPDATE!

v1.5.1 beta (link)

What's new?

- UNTESTED: Integrated Lollipop ROM detection support using getprop

I can't test this as I currently have no working device.
[Android Themes] Spannaa:
Nice one - I've just done the same and posted here!

I'll grab yours and take a look ;)

Sent by bacon...
[Android Themes] aureljared:
Wow, thanks! I saw your work a few days back and it seems that your code is cleaner...

Oh well, guess I'll have to try to figure out how to slim my own code down in the coming weeks.

EDIT: It seems like you accomplished this by looking at build.prop instead of getprop. You also integrated a flashable restore method instead of a command-line method. Mind if I borrow these ideas, [MENTION=2948558]Spannaa[/MENTION]? Credits will be there, of course. :D
[Android Themes] Spannaa:
No problem mate - XDA is for sharing after all ;)
[Android Themes] 2WildFirE:
Great, I will try your update in the next days. Thanks for your work.
[Android Themes] cerj:
Both you guys are very nice for sharing. . Thank you. . Happy Holiday's..
[Android Themes] asdfasdfvful:
This looks great! Is anyone willing to post an example of this theme with actual contents of say the framework themed? I'm still not exactly too sure how it works. Or any other guide would be welcomed
[Android Themes] Spannaa:
It's pretty straightforward:

All themed files go into folders inside the vrtheme folder in the zip.

The folder names must be exactly the same as they are on the rom you're making the theme for so, for example, if you want to change a png inside the \res\drawable-xxhdpi folder in \system\priv-app\SystemUI.apk\SystemUI.apk on CM11, the edited png would go inside the \vrtheme\system\priv-app\SystemUI.apk\res\drawable-xxhdpi folder in the zip

Any edited xml files or .9.pngs you add to the zip must be compiled first.

If you edit any xmls in the \res\values folder you need to recompile the apk and add it's resources.arsc to the zip.

If you edit any smali, you need to recompile the apk and add it's classes.dex to the zip.

When you flash the zip, the original apks are copied, opened, injected with the theme files, zipaligned, copied back to their original location and their permissions are set. The original apks are also backed up.
[Android Themes] asdfasdfvful:
So after compiling system apps, do I just pen it with 7zip and then take out the contents? (say resource arsc) thanks so much. I'll give it a try
[Android Themes] Spannaa:
Yep, that's about it ;)

Sent by bacon...
[Android Themes] asdfasdfvful:
Tried it but it didn't work. Idk what happened but my system ui just didn't load :/
[Android Themes] Spannaa:
Is there anything in your recovery log?

Sent by bacon...
[Android Themes] asdfasdfvful:
I didn't save it. Well I've had lots of issues with zips, be it vrtheme or not. I'll try again next time and save the log. It flashed fine though. Maybe my resources were bad
[Android Themes] Spannaa:
Possibly.

Always save your recovery log when you're developing stuff ;)

Sent by bacon...
[Android Themes] asdfasdfvful:
Do you know the benefits of doing this though? I can see that it saves space, but would it also support more roms? From what I understand, roms often get messed up because of the strings, so if that isn't changed, wouldn't vrthemes still only be compatible with its original rom?
[Android Themes] Raymond Ebertt:
No, vrtheme is an injector. Basically, if you can theme the system apks and avoid XML or smali edits, in most cases, the theme will be fine. The great thing about vrtheme is that you only replace what you worked on. I've been using vrtheme for a long time and for sense and GPE ROMs, its the greatest way to go.
[Android Themes] asdfasdfvful:
Concept is great, but unfortunately, I make dark themes for lollipop. It contains almost purely XML changes. So I'm guessing there won't really be a benefit with vrtheme then? It would still be awesome if I could put only the changed content somehow, as it would not be Rom dependent
[Android Themes] Raymond Ebertt:
One good thing about the vrtheme is that you only need the xml's that you edit (as well as the resources.arcs). In saying that, let's say you are theming a Google calendar apk. You would include the xml's that you edited along with any other edits, colors, png's, or drawables in your vrtheme. Because the calendar apk is usually not a modded apk, it should be able to work on various ROM's (let's say GPE)

If I am doing a theme that I want compatible with other ROM's, it's just a matter of making a specific vrtheme with that ROM's unique framework. In most cases, your standard apks should work across other devices. So, in short, most apks will be compatible though framework and some of the popular modded apks (keyboard, launcher, phone, contacts) may need to be taken from a specific ROM.
[Android Themes] asdfasdfvful:
Ah you include XML as well. There was my issue in making the zip. Okay, third party apps work, and the system apps are fine, but can you confirm that I can modify a framework or system ui and still have it compatible with other roms or future update?
[Android Themes] Spannaa:
That can't be guaranteed - it depends on what you modify.

Sent by bacon...
[Android Themes] Raymond Ebertt:
As [MENTION=2948558]Spannaa[/MENTION] mentioned, it would depend on the edit that you made in framework or other major apks. For example, if you changed the backgound_holo_light.xml and background_holo_dark.xml, you would add only those in the vrtheme/system/framework/res/drawable folder. This would apply to anyone that uses this theme.

More specific edits, like a smali, would mean that you would need to include the entire classes.dex in your theme and that would definitely cause issues across different devices. This is why we try to find another ways to get around smali edits like custom styles and so on.
[Android Themes] asdfasdfvful:
Thank you and spannaaa very much. Final question before I stop cluttering the thread,

I know that I create folders for a given app in the new folder, but so I also need to make the layouts or drawable folders for the XML files? Or can I just post them under say a framework-res folder. Same goes with images I presume
[Android Themes] Raymond Ebertt:
Here's a flow chart on the folder bases that you need. You will need to make a folder for each box that you see. As well, the bottom flow chart explains what is needed in each folder. Hope this helps and Merry Christmas.
[Android Themes] Spannaa:
And be aware that everything is case-sensitive and all paths & folder names must be named EXACTLY as they are in your rom.
[Android Themes] asdfasdfvful:
Well, tried it again and it didn't work. Same result as before (systemui was basically gone). Had to clean flash the rom again to get it working. I decompiled all the apps again and basically copied the different files through winmerge, so I'm sure I'm not missing anything.

Here was my test zip and here is my recovery log.

Unfortunately, I seem to get errors with the regular zips sometimes as well, so I'm not completely sure what the issue it. I build and sign the apps with a debug key, and don't sign the zip afterwards, as I believe it is not necessary.

P.S. This is built for Terminus. If anyone can get this working on their phone, I'd love to get some feedback on how to fix it.
[Android Themes] Raymond Ebertt:
Send me your theme zip by PM, please.

---------- Post added at 02:08 AM ---------- Previous post was at 01:23 AM ----------

Ok, I see your issue.

First of all, you packed your theme in the new folder of the vrtheme. All of your theme needs to go into the correspondent folders inside the vrtheme folder. As well, I noticed some 9.png that still have patches. You'll need to patch those before making your theme. I'll send you a sample of your theme by zip in a few minutes. You can have a look at it and complete it accordingly.
[Android Themes] asdfasdfvful:
Thanks to all who have helped me! This is what I've learned in case other beginners need it

On top of creating individual folders for each app (ie SystemUI under priv-app), you also need to create a folder for the apk itself (SystemUI.apk) before adding your files

Only add changed files, and add the compiled ones (so build the apk, then unzip, then copy over)

The values folder is not needed as it is already in resources.arsc

If you modified smali, copy over the classes.dex as well

[MENTION=2948558]Spannaa[/MENTION], if possible, could you give more details on how the backup zip works? Thanks!
[Android Themes] Spannaa:
As part of the script, the original apks are copied into a flashable zip file before being injected with the theme files.

This zip file will restore your files to their pre-themed versions if you flash it.

Sent by bacon...
[Android Themes] asdfasdfvful:
Is anyone seeing an issue with png s being copied over? They don't seem to be modified
[Android Themes] Spannaa:
If the recovery log doesn't show any errors then are you sure you're modifying pngs in the correct folder or apk?

Check by pulling the themed apk from your device and looking inside.

Sent by bacon...
[Android Themes] Toni Suwanto:
Please help, what wrong with my theme, here the log https://db.tt/ql0rtGxp and the zip ->> https://db.tt/K3JfLxlQ it did nothing, I'm going to change the icons
[Android Themes] asdfasdfvful:
You made the same mistake as me (something spannaa just answered too haha).

Make sure you are taking the images from the compiled app, and look at the folder names. Apart from "drawables", the other drawable folders tend to have a "-v4" after it. Just make sure you add that.
[Android Themes] Raymond Ebertt:
I'll make a video over the next day or two on how to pack a vrtheme and all the business that goes along with it.
[Android Themes] asdfasdfvful:
As if now, it seems like you cannot modify the android manifest in system apps. Changing it in system ui caused it not to load. Has anyone else experienced this?
[Android Themes] Spannaa:
It's always been like this.

If you edit manifest, you need to re-sign the apk and then disable signature checking in services.jar

Sent by bacon...
[Android Themes] gagitrix:
any tutorial on how to work this thing ?
[Android Themes] Spannaa:
Try reading the first post and the last few pages!

Sent by bacon...
[Android Themes] cerj:
Make sure the your folders and sub folders of the app/apps you want to theme are in the correct partition. ie, system/app or priv-app, and framework.. Dissect the ROM you are using down to the images, and set up the vrt using the ROM as a template... Images go in sub folders, those sub folders go in the specific app folder, and that all reside in the VRT folder...
[Android Themes] asdfasdfvful:
In my signature, I have a link to a theme I made for lollipop. You can look at the latest zips as they are based off of this as a reference. I also made a list on points I learned a page or two back
[Android Themes] :
check your update-binary dude
[Android Themes] asdfasdfvful:
Haha that was half a month ago. Everything is working now :good:
[Android Themes] aureljared:
I'll try making an upstream syntax fix in a while. The lint checker I've tried gave me a few errors. :D
[Android Themes] knski:
[MENTION=5246389]aureljared[/MENTION]

I am ready to help as tester
[Android Themes] aureljared:
Yes, I will post the test ZIP in a while.

Sorry everyone for being inactive, I haven't had much time for development as much as I used to. But the code for EVilTheme is at GitHub if you want to help out. :D
[Android Themes] aureljared:
[MENTION=5835736]knski[/MENTION] here's v1.5.1b2: Link

Commits since v1.5.1b: Part 1 Part 2
[Android Themes] aureljared:
I think I know where I actually messed up :D

about to run program [/tmp/installtheme.sh] with 1 args
sh: : unknown operand
/tmp/installtheme.sh: line 80: syntax error: unexpected "("
run_program: child exited with status 2
about to run program [/tmp/cleanup.sh] with 1 args
- Cleaning up
sh: : unknown operand
ls: /sdcard/vrtheme/flags/*.apk: No such file or directory
mv: can't rename '/sdcard/vrtheme/backup': No such file or directory

I forgot that arrays are not supported in POSIX sh, sorry :(

Try this last ZIP: Link

Please remember to remove all placeholder files in the ZIP before flashing.
[Android Themes] knski:
[MENTION=5246389]aureljared[/MENTION]

I am sorry that I could not immediately answer...

This last build work, but kill my rom - impossible boot rom

While I can not understand why...

Do not worry, I still can recover, but I need to simulate again this error
[Android Themes] aureljared:
2.0

Added version 2.0! :victory:

• v2.0: Link

Documentation and tutorial have been updated too.
[Android Themes] aceqott:
Thank you very much.

But when flashing me the following error message:

Installing update ...

Using legacy property enviroment for update-binary ...

Please upgrade to latest binary ...

E: Error in XXX.zip (Status 6)

E: Installation aborted
[Android Themes] aureljared:
EDIT: Fixed here. I can't find any good sources for a new update-binary, though the warning shouldn't bother you much. :D

My scripts must have been wrong or something. My bad, fix coming in a while. :D

It seems like the updater binary I'm using is outdated, too. I'll see what I can do about that.

What recovery are you using, by the way?
[Android Themes] anandisrocking007:
Hi [MENTION=5246389]aureljared[/MENTION] i like what you have done with the modification of vr-theme but i am having a problem it seems that this zip package is not working with my device I have a lenovo A3500 which has a quadcore ARM Cortex-A7 Processor and i am using TWRP Recovery and android version 4.4.2 that is kitkat. It seems that it is showing that the flashing was sucessfull but it was not.

-I tried to flash transition animation xml files to system/framework/framework-res.apk/res/anim/

-I have also tried to flash this but replacing your update-binary with my update-binary which i have got from ota update (Still does not work)

-Flashing with the original vrtheme work but it does not work with evil theme

I have posted my recovery.log , Update-binary and my evil theme that i was going to flash below.

PLEASE HELP I LIKE YOUR PROJECT :fingers-crossed:
[Android Themes] aureljared:
Thanks for attaching the log and zip!

Try this version: v2.0.2

I feel like slapping myself, I keep overlooking a few bugs. :silly:
[Android Themes] anandisrocking007:
Sorry it took me so long to test and reply i had my university exams going on i am sorry to say but it seems like it is still not working i have checked the error is from line no 376 to 386 it seems that for some reason it can not edit the data/tmp location (I have already rooted my phone) if you need any files in my device including the recovery.img please ask i really want to get to the bottom of this problem......lol i am attaching the recovery.log file and the evil theme file which i tried to flash below

by the way there were empty files named placeholder i deleted them before zipping my device is that ok

I have also copied the error from 376 to 386 below

- Themeing apps
cp: can't create '/data/tmp/evt-backup/system/framework/': No such file or directory
cp: can't create '/data/tmp/eviltheme/apply/system/framework/': No such file or directory
* framework-res.apk
mv: can't rename '/data/tmp/eviltheme/apply/system/framework/framework-res.apk': No such file or directory
zip I/O error: No such file or directory
zip error: Could not create output file (/data/tmp/eviltheme/apply/system/framework/framework-res.apk.zip)
mv: can't rename '/data/tmp/eviltheme/apply/system/framework/framework-res.apk.zip': No such file or directory
sh: bad number
Unable to open 'framework-res.apk' as zip archive
cp: can't stat 'aligned/framework-res.apk': No such file or directory
- Creating restore zip in /data/eviltheme-backup

zip error: Nothing to do! (/data/tmp/eviltheme/restore-052515-055525.zip)
- Cleaning up
[Android Themes] aureljared:
I think I found what's wrong.

I modified your zip with the fixed script and attached it below.

(I hope everything is all right now.)
[Android Themes] anandisrocking007:
Hi there i am sorry to say that this modification is also not working as far as I can see from the recovery.log file the tmp creation error has been resolved but it seem that there is a problem in the zipping of the framework-res.apk. My best guess is that you have to use the static zip binary for the twrp recovery that's why in the official vrtheme thread there are two vrtheme flashable zips one for twrp and the other for cmw but as far as I can tell the twrp zip can be used for the cwm also.

I will be attaching the vrtheme for twrp along with the recovery.log below (I think all is the same below except the zip binary)

I believe the error starts from line 378 to line 384

zip error: Nothing to do! (/data/tmp/eviltheme/apply/system/framework/framework-res.apk.zip)
sh: bad number
Unable to open 'framework-res.apk' as zip archive
cp: can't stat 'aligned/framework-res.apk': No such file or directory
- Creating restore zip in /data/eviltheme-backup

zip error: Nothing to do! (/data/tmp/eviltheme/restore-052915-002028.zip)

I am not sure but I think there is also a mounting error or so for /data and /cache partition from line 285 to line 288

- Mounting filesystems
about to run program [/sbin/busybox] with 3 args
about to run program [/sbin/busybox] with 3 args
mount: mounting /dev/block/mmcblk0p7 on /data failed: Device or resource busy
run_program: child exited with status 255
about to run program [/sbin/busybox] with 3 args
mount: mounting /dev/block/mmcblk0p6 on /cache failed: Device or resource busy

:confused:
[Android Themes] Spannaa:
[MENTION=5155371]anandisrocking007[/MENTION] - try the updated vrtheme template from here.

Sent via Bacon...
[Android Themes] anandisrocking007:
I am mainly using vrtheme from that forum for a year or i saw your project and was interested in it thats why i was trying to help you to remove the errors i will check that message extension now thanks

---------- Post added at 02:36 PM ---------- Previous post was at 02:08 PM ----------

I am sorry it still does not work but still thanks for trying
[Android Themes] Spannaa:
You mean my version doesn't work either?

What device and rom did you try it on?

Pm me the zip you flashed & your recovery log and I'll take a look.

Sent via Bacon...
[Android Themes] aureljared:
[VRTHEME][TEMPLATE] EVilTheme

Hey [MENTION=2948558]Spannaa[/MENTION], can you help me test my versions? I'm having trouble sorting things out cause I don't have any device to test with. If you don't mind then I'll try to PM you my latest zip tomorrow.

Thank you so much in advance!
[Android Themes] Spannaa:
I'll give it a go but I can only test it on an S2 with Android 4.1.2 since I'm running CM12.1 with the theme engine on my OPO and my Nexus 7 is now being used by my Son.

Is there any point though since yours and mine both do pretty much the same thing?
[Android Themes] aureljared:
I don't think so. :angel: I saw this line in your script:

dc_file=/data/dalvik-cache/system@app@$f@classes.dex

Correct me if I'm wrong, but I'm guessing you're checking only the existence of the already optimized dexfile, not the existence of a new dexfile in the theme.

Like what I did with mine:

checkdex() {
if [ -e ./classes.dex ]; then
if [ -e "/data/dalvik-cache/system@$1@$2@classes.dex" ]; then
rm -f "/data/dalvik-cache/system@$1@$2@classes.dex"
else
rm -f "/cache/dalvik-cache/system@$1@$2@classes.dex"
fi
fi
}
# Refresh bytecode if necessary
cd /data/tmp/vrtheme/system/app/$f
checkdex "app" "$f"
cd ../

But it's okay if you don't want to test. :)
[Android Themes] Spannaa:
That's because I forgot to wrap the dalvik classes.dex file check inside an if included classes.dex check :o

if [ -f classes.dex ]; then

fi

I've tested eviltheme-2.0.4.zip with a theme for my S2 on 4.1.2 and it fails on the preload partition theming. There's also no backup for the themed preload apks.

I've attached the recovery log.
[Android Themes] anandisrocking007:
Sorry i got confused between the you and the eviltheme maker and posed to you the vrtheme works super don't worry about that
[Android Themes] aureljared:
I fixed preload now, turns out I haven't even mounted the preload partition before theming. :silly:

Hope that fixes things now. Updated the 2.0.4 release.

Haha, no worries mate :cowboy:
[Android Themes] domicq:
Hi, is there any chance to delete some files from instead of just replacing them? Thanks for answer

Gesendet von meinem D6603 mit Tapatalk
[Android Themes] aureljared:
You mean delete files inside an APK? It's possible, but you'd have to know the exact path of the file's you're going to delete. Anyway, I can probably implement this in the coming weeks - I have my exams coming next week and I can't work on this right away.

Thanks for the suggestion, though. Will keep this in mind.