yashsingh1/xdaforums huggingface dataset:
[Virtuous Ten Studio] cybhunter:
First off serious props to you Diamondback for creating a swiss army knife program. Kemonine noted it to me in regards as a possible means for reverse engineering apks and related

I am running into a small problem of how to proceed. I am trying to add some class/smali files from Cyanogen Roms framework into the framework of Samsungs stock rom (rugby pro). The class/ smali files being those concerning 'nfc.tech' (wanting to add the class def for IsoPcdA, IsoPcdB and related) in an attempt to be able to run on a stock rom an app requiring that class def.

I adb pulled the framework and twframework from the stock rom as well as the framework from the cyanogen rom, using the option to generate java code (as an apk project).

The problem I'm running into: I want to modify the apk, the class/smali files are deoxed in the jar files, and their lacks the class/smali files in the pulled apks. Looking on the official website it only generally covers about file types.

I am new to android dev, so bear in mind if I am confusing concepts.

Thanks

Joe
[Virtuous Ten Studio] arunsai123:
HTC jpeg

recompiled jpeg images of sense roms has low quality and looks pixelated .

decoded pngs have no problems but recompiled jpeg images looks noisy. please increase jpeg image quality of recompiled images of sense roms.
[Virtuous Ten Studio] Diamondback:
Can you provide an example? Before/after? What apk? What device? What base rom?
[Virtuous Ten Studio] GEKTHEBOSS:
Can this tool modify boot.img with elf header?(latest time ive tried not work) thanks!
[Virtuous Ten Studio] arunsai123:
the apk is HTCLockscreen.apk of sense 4 Rom.

the compiled images have reduced file sizes as well as image quality and looks ugly in phone...

example:

http://db.tt/nzVbuYYc
[Virtuous Ten Studio] Diamondback:
If it didn't work last time it probably won't work either now ;) Maybe you can provide me such an img?

Thanks, I'll have a look. Can you please also upload the original and edited apk?
[Virtuous Ten Studio] iBotPeaches:
See bolded line. You messed up one of your "changes".
[Virtuous Ten Studio] LSS4181:
I once posted about an unusual problem with the updater that's causing the VTS to crash on Windows 8... It seems the VTS version has not been updated since and I can reproduce that same problem on another Windows 8 computer of mine...

I figured out the problem was with .NET's date/era conversion function when I checked the Windows Event Viewer.

Right now, all recent VTS versions show release date as 1/1/0001. You should add a proper release date for all VTS versions in the updater as the release date seems to be written in a date type value that the system will attempt to convert it and show it in the format determined by the user's regional settings.

It will not cause any problem with computers using normal, Gregorian calendar, but if the user happens to use a different calendar that has era, such as the Japanese calendar, the function to determine the era will encounter an out-of-range error that will cause VTS to crash entirely when it tries to convert the release date while showing the updater... as the date/era conversion function is not aware of the year 0001.

I hope it will be fixed in the future... Right now, the only way to resolve it is to temporarily set the system calendar format to the default one whenever there is an update, and then change it back to the way it was after the update...
[Virtuous Ten Studio] Diamondback:
Unfortunately the updater part is a 3rd party library, so I can't fix anything there. I can add an option to turn off the automatic searching for updates though, so it doesn't crash for you.

On a different note: What exactly crashes? VTS shows the initial "I have an update"-window and then crashes? Or does the actual "applying update" thing crash?
[Virtuous Ten Studio] LSS4181:
It is that, the moment the log shows "Found update: version ...", VTS crashes. It happens before the "I have an update" window actually shows up (because it encountered an out-of-range error when processing the release date, which happens before actually showing the windows).

Because .NET's Japanese date/era conversion function is not aware of the year 0001 (this is by design according to official .NET documentation), as the release date part shows 1/1/0001, when the system tries to convert that date (the function covers only the date starting from 09/08/1868, while 1/1/0001 is outside its valid range), the function will generate an ArgumentOutOfRangeException critical enough to make the system crash VTS in order to prevent further problems.

From .NET's JapaneseCalendar.cs code (found here). This GetEra function is the cause of the crash.

/*=================================GetEra==========================
**Action: Get the era value of the specified time.
**Returns: The era value for the specified time.
**Arguments:
** time the specified date time.
**Exceptions: ArgumentOutOfRangeException if time is out of the valid era ranges.
============================================================================*/

It's not actually the problem of the updater, it's the release date. If the versions have a proper release date, or set the default date at a later year such as 2001 (which the date/era conversion function is aware of), it will not have any problem. This is for the Japanese calendar, but it might not be the only calendar where year 1 is not valid to it... so it might be unsafe to use such a year as a default value...

It's okay to add the option to disable automatic search for updates, but right now, the only way is to temporarily go to the Regional and Language option and set your system calendar to the default, Gregorian calendar to perform the update and then change it back after the update.

EDIT: Added some references.
[Virtuous Ten Studio] Dean1650:
SystemUI.apk problem.......

I have made changes to TW sysui. It compiles without errors. I keep the existing signatures. I move it to my Galaxy S4 (major hint) set perms and reboot. No status bar, no fc (its not running) pull down works. If I cause or receive any notification, the status bar appears with all my mods showing and will work until I reboot. Repeat notification and sb reappears. I've exhausted my research. I'm not familiar with how it gets launched on bootup. If I just decompile/compile with no changes it still has this problem. Any ideas?

sent from my SGH-i317
[Virtuous Ten Studio] Diamondback:
Please look at point 2) of the last entry here:

http://xdaforums.com/showpost.php?p=37980886&postcount=3
[Virtuous Ten Studio] Dean1650:
I was hoping someone might have had a similar issue and could save me some time. I'm finding the latest Samsung/ATT firmware is full of quirks.

Thanks

sent from my SGH-i317
[Virtuous Ten Studio] Merche300:
idlesceen productivity

How could I do a new idlesceen productivity for making changes and always keep the original, I mean adding another lock to my HOS
[Virtuous Ten Studio] Diamondback:
HTC has tutorials on how to do this in their dev section ;)
[Virtuous Ten Studio] Merche300:
Where, could you put a link? have not found you, thank you
[Virtuous Ten Studio] Buleste:
I have a problem decompiling any Huawei apks with all decompilers but VTS gives the least amount but still the apks are not decompiling properly so when recompiled they do not work properly even with no changes made. Here is a typical error log.

09:54:39.800: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Loading resource table...'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Config flags size > 36. Exceeding bytes: 0xFA000000.'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Invalid config flags detected. Dropping resources: array-w101dp-ERR0'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Config flags size > 36. Exceeding bytes: 0x38000000.'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Invalid config flags detected. Dropping resources: array-w224dp-ERR1'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Config flags size > 36. Exceeding bytes: 0x6C020000.'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Invalid config flags detected. Dropping resources: array-w224dp-ERR2'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Config flags size > 36. Exceeding bytes: 0x3A030000.'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Invalid config flags detected. Dropping resources: array-w224dp-ERR3'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Loaded.'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Decoding AndroidManifest.xml with resources...'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Loading resource table from file: C:\Users\Duncan\apktool\framework\1.apk'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Loaded.'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Regular manifest package...'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Decoding file-resources...'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: W: Cant find 9patch chunk in file: "drawable/candidate_hl_bg2.9.PNG". Renaming it to *.png.'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Decoding values */* XMLs...'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Done.'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'ApkTool: I: Copying assets and libs...'
09:54:39.801: [Debug] - ApkTool.DecompileApk: 'Apk decompiled!'

Is there any way of fixing this with settings etc. ?
[Virtuous Ten Studio] Diamondback:
http://www.htcdev.com/devcenter/opensense-sdk/lock-screen/lock-sample-code/

The log doesn't look all that special, what are the symptoms of "not working properly"? What about a logcat?
[Virtuous Ten Studio] Buleste:
For a start the original apk is a Froyo keyboard apk and all I am trying to do at the moment is get to work on Gingerbread but the keyboards symbol and smiley keypresses do not work as they should i.e. they do not bring up the popup so that you can add the appropriate symbol or smiley. That issue crops up in both Froyo and Gingerbread without any changes other than decompiling and recompiling the apk.
[Virtuous Ten Studio] Dean1650:
Now that my eyes are permanently crossed from looking at logs, I found my problem. It was MY problem, nothing to do with VTS. Once again, nice environment, great tools included.

sent from my SGH-i317
[Virtuous Ten Studio] .c0dy:
Hey [MENTION=2295247]Diamondback[/MENTION],

I were the one, that had problems with the license :silly:

I've reistalled my Windows 8 and I had to install VTS instantly.

I've tried another new installation, but havn't installed VTS instantly. Just after a few Windows Updates, Steam-install i wanted to install VTS and i couldnt register my license afterwards. I do not know the issue. But when I reinstall my Windows I always instantly install VTS and register it :D

That's the way how it works without any problems.

But I've got another question :)

Havn't found any info about this yet.

When I'm generating the Java-Source, and i've made changes in the ".class"-file, is it possible to get this ".class"-file back to a ".smali"-file?

I've read, that it is possible with the "dx" from the SDK(i guess). But is it possible directly in VTS?

Thanks in advance :)

Otherwise VTS is still worth paying for it :) Great tool, that helps me a lot!:good::laugh:
[Virtuous Ten Studio] Diamondback:
Well, the generated java source is usually far from being "complete" or "compilable". So no, there is no easy way to accomplish this.

You can certainly take parts of the generated java, put them in an android project, build it, decompile it again and grab the smali, but that's not exactly what you were asking for. ;)

I don't think there is any tool that can directly go from a single .java file to a .smali file.
[Virtuous Ten Studio] .c0dy:
Well basicly i just want to insert a simple if-statement. Then i'll try the way over eclipse :) Thank you
[Virtuous Ten Studio] Jayrod76:
Having a few issues with compiling SystemUI on the Samsung GalaxyS4.

Without any changes to the apk

,this is what I get on compiling.

I'm running VTS 2.4.20.9530.... apktool_1.5.2, aapt.exe dated ‎February ‎16, ‎2013, on a Win7 OS
[Virtuous Ten Studio] yani2000:
Wow! Great IDE!

I've been using Ubuntu with command line apk/smali tools and now on Window 8 I discovered VTS and it's great to work with apk/smali files.

It has become super easy!

But this product still has quite a lot of bugs in them:

- When closing "Find & replace" dialog whole VTS goes into background (I have to alt-tab to get it back):

This issue doesn't occur very often, but when it does it's persistent and only restarting VTS solves it.

- Multiple issues with Java Source files:

When opening VTS I get errors "TenProjectViewModel.LoadOpenDocuments" could not find some .class files, but the files are there! And it reopens .smali files just find, only .class files are affected.

Why are files named .class, aren't they supposed to be .java?

When I have checked "Generate Java source" in my project properties it sometimes doesn't build java sources and I have to do it manually.

It would be cool to also have fields and methods listed for java sources.

- Issues with "pust to device":

On my first project it also checked if there was a change and it build my project before pushing it to my phone, but now it doesn't do that anymore. I have to build and then push.

But all of these issues are minor and don't affect normal work too much.

It also seems all of these problems occur after I have VTS opened for more than 12 hours. :)

Again... great work! :good: :victory:
[Virtuous Ten Studio] Diamondback:
Comments in blue: :)
[Virtuous Ten Studio] deyaaa:
the best tool

Thank you for great Tool '

best tool
[Virtuous Ten Studio] Diamondback:
Well I guess apktool needs an update then. Did you try the "--keep-broken-res" option for apktool when DEcompiling?
[Virtuous Ten Studio] varun.chitre15:
Did you install the framework?
[Virtuous Ten Studio] Jayrod76:
Never seen that command..I suck at editing via just apktool..which is why I use VTS religiously :)

I have both TW framework as well as framework installed and tagged.

Never had any issues with using VTS for prior projects except the occasional apktool issues..and I mainly was editing Moto stuff and AOKP.

After speaking with a few others, it seems that it is a 4.2.2 issue with at least Samsung system ui..so it might not be limited to VTS but more likely a apktool issue.
[Virtuous Ten Studio] yani2000:
Hi!

Thanks for the reply!

I forgot what was I doing at that time, I just know I had VTS opened for quite some time (more than 12h) and when I pressed "Build all" it would only build .smali files and it wouldn't generate Java files.

Sorry, I couldn't be more helpful.

Sorry, I wasn't clear enough.

When I change some .smali files the "Push all" stops building smali and then push those changes to device, it only pushes the previous apk file, it doesn't build and then push.

Again this only occured once and after I had VTS opened for quite some time.
[Virtuous Ten Studio] DSA:
Hi DB

Awesome program, love it

Was wondering if it was possible to add a small modification in:

When looking at search results (On a 'Find in file' basis) could you add the ability to right click the result and go-to/directly open that file?

Cheers
[Virtuous Ten Studio] Dunc001:
Double click on the entry in search results and it does just that :cool:
[Virtuous Ten Studio] DSA:
I think that was a bit of a noob moment from myself...!

Cheers fella
[Virtuous Ten Studio] TeHashX:
License

Hi, on how many pc's may I use a single license? because I use VTS at my home pc, my laptop and my work pc sometime.

Thanks
[Virtuous Ten Studio] Diamondback:
I don't really care. ;) Use it where ever you like. :good: (obvioulsy you are not allowed to share it with anyone else though)
[Virtuous Ten Studio] Raymond Ebertt:
New Theme

Hey mate. Thought I would pop in and let you know that I developed a theme thread for the HOX+ and would like you to stop by and have a look. Afterall, if it weren't for your amazing program, I wouldn't be posting this OT right now. LOL. Sorry about that, but like to give back when I can. ;)
[Virtuous Ten Studio] Diamondback:
Hello everyone,

I am going to release a new version soon, but this time I am going to flag it as a beta. Reason for this: I changed lots and lots of code under the hood (way more than the changelog actually indicates) to clean up and update some very old and very outdated core parts of VTS.

While everything seems to work, I can't be entirely sure that I didn't break anything along the way.

Just a little heads-up for you guys :)
[Virtuous Ten Studio] Diamondback:
Thanks to fisha21 I can present you a little preview of what's coming up later today:

What's new in 2.6.12

Enjoy :)
[Virtuous Ten Studio] singh_dd93:
I am trying to edit home apk of xperia mini rom.

Even if I decompile and compile again the apk don't work
[Virtuous Ten Studio] Diamondback:
Well "Don't work" doesn't really help me, what exactly is happening?

Did you sign the apk?

Did you zipalign the apk?

What does your logcat say?
[Virtuous Ten Studio] Dunc001:
Been using VTS this morning on two new projects - both done and finished in no time! It is such a breeze to use, jumping between files/projects, ADB pull/push, logging - love it! Still need help with my java issue at home though, tried you on IRC many times but no-one was there :( Are you around later tonight (9pm UK)?
[Virtuous Ten Studio] Diamondback:
I am here NOW :P

9pm UK? dunno, could be :P depends on how long the last university thing lasts...
[Virtuous Ten Studio] Dunc001:
Yeah, but I'm at work, not at home where the problem is ;) I'll try you later and see if you are around.
[Virtuous Ten Studio] Sebianoti:
I edited my old app and for some reason i get this

how do i fix that?
[Virtuous Ten Studio] Diamondback:
If you want to distribute such an apk via the Play store you need to sign it properly. (Even if I have no idea why you would want to do that...)
[Virtuous Ten Studio] Sebianoti:
It's my own app, i used feed.nu to create the original but i haven't been able to update it on their own service, so i just replaced the png files with new ones, i'm no developer and i don't know how to sign it.
[Virtuous Ten Studio] Diamondback:
Well I don't know that service, but I fear you won't be able to do that.

You need the private key which was used by that site to sign the original apk.
[Virtuous Ten Studio] Sebianoti:
Oh, i was afraid of that. Thanks anyway for your help.
[Virtuous Ten Studio] Dunc001:
c/p from IRC as no-one around:

So as I said last night I now have both x64 and now x86 versions of JRE and JDK installed, registry is all correct, where java shows all three locations with the x86 one being listed first (followed by x64 and system32) and yet still VTS is not finding Java! What would be the chances of adding a field in settings for users to define the path to java.exe manually. If nothing entered in the field then the current reg search method is used, however if field is populated then VTS uses that path and doesn't bother with the reg search? Kind of a fallback for anyone in my situation...
[Virtuous Ten Studio] Kameo:
@Diamond:

Really great tool, but sometimes i have some gfx glitches on the top icons (could be that i'm low on ram, only 1.5G).

Otherwise, if i can make a few suggestions to be even more user friendly:

- Ability to make a default path for our projects (by default, it's user's docs...).

- Enable/Disable Java decoding from the settings.
[Virtuous Ten Studio] Diamondback:
I guess I have to do that, yea...

I have never seen any graphical glitches :confused:

Don't think this has something to do with your RAM ;)

Maybe a buggy graphics card driver or so.

However, your suggestions:

Yea, I can do that, together with the java path, however that will take a bit to implement since it was not at all planned for this.

not sure what you are talking here about, you can enable/disable java generation for each project in its settings :confused:

Oh btw, I started doing the m10 work on my own now, so at least the actual decompile/recompile will be included hopefully soon, however still no news on the images... :(
[Virtuous Ten Studio] coldflid:
Wow thanks for this, really useufl :)
[Virtuous Ten Studio] movelbit:
hi. Doing my first tests.

I create the project and i get this file decompiling original file:

ApkTool failed, ExitCode: 1
Decompiling apk failed!

Why does this happen?
[Virtuous Ten Studio] Diamondback:
There are a few possible reasons, but without the complete log file I can't tell you.

Please give me (post it on pastebin) the complete log file you get via "Extras->Log Viewer -> Save"

Reasons this error might happen:

Wrong ApkTool binary: Each apk needs its own ApkTool version, there is no ApkTool which can handle EVERY apk... :(

Wrong/none at all ApkTool framework files installed

None/wrong ApkTool framework tag selected for the project

Wrong appt.exe binary

some more
[Virtuous Ten Studio] movelbit:
thank you for the quick reply. I have cleared the apktool frameworks and it worked. seems i played with it before :D

thanks ;)
[Virtuous Ten Studio] Pneuma1985:
Diamondback ? I was wondering if the new V10Studio can decompile/compile the m14 container?
[Virtuous Ten Studio] Diamondback:
m10 support will come very soon (maybe two weeks or so, no ambigous waiting anymore, it's basically done, just needs testing and stuff), also another OTA coming later today or tomorrow with some new things. :)
[Virtuous Ten Studio] Pneuma1985:
Awesome man love your work the new studio looks amazing btw...
[Virtuous Ten Studio] Diamondback:
Okay, the new version is online since a few hours. You can either download it via the setup.exe method or via OTA. However, since it's a beta you'd need to enable the beta search in the settings first to receive it. :)

Here's the full changelog:

VTS 2.6.12.10000

And here's the full download:

http://www.virtuous-ten-studio.com/index.php/downloads
[Virtuous Ten Studio] Dean1650:
Sounds outstanding. Too bad it's not Friday, can't wait

sent from my SGH-i317
[Virtuous Ten Studio] Diamondback:
What do you think guys?

This is a "Multi-Purpose-Bar" which we be in most documents. It will contain other stuff as well (for example these hard coded colors in smali)

Can you think of other useful cases?

:)
[Virtuous Ten Studio] Raymond Ebertt:
Now that looks like a very useful colour map. I can see that coming in handy. Good work mate.
[Virtuous Ten Studio] Diamondback:
Would anyone be interested in custom syntax highlighting? (for smali, xml, java etc)

This is currently already possible for smali (but very hidden :p), but I could make it more official if you guys want to customize that stuff.