Hello
I've recently buy a Toq Qualcomm SamrtWatch and, because the sdk does not permit a lot of things, I've started a little hacking
In this thread I would like to explain how i've beenableto create a custom watch face. This is a first try, I'll hope I will come later to explain more things.
And sorry for my english, I'm french. Ok let's start :
- First get the Toq Manager Android application because it contain some watch, if you own a Toq you must have install it via google play store. :
you can follow the tuto here http://forum.xda-developers.com/showthread.php?t=1755436 but it must be :
Code:
adb pull /data/app/com.qualcomm.toq-1.apk
- 2 extract the apk to find where the watch face are :
for this I will android-apktools, https://code.google.com/p/android-apktool.
SO basically in my folder I have :
Code:
apktool
apktool.jar
com.qualcomm.toq-1.apk
I extract the apk in a new directory, named "toq" with:
Code:
./apktool d com.qualcomm.toq-1.apk toq
- 3 find the watch face :
in the toq/Assets directory there is a file named "allclocks.json" wich contains the watch faces definitions :
Code:
{
"Clocks": [
[...]
{
"bundle": "degreesclock.zip",
"type": "dynamic"
},
{
"displayName": "Agenda",
"icon": "clock_agenda",
"type": "builtin"
}
]
}
so you can add a custom watch face by modifying this json and adding this lines for example
Code:
{
"bundle": "myclock.zip",
"type": "dynamic"
},
you can see that a "dynamic" watch face is defined by a zip file, wich is the assets folder too. you must add this zip file to create the watch
4: Create the watch face :
There is two zip file to create to add a custom watch face. the first will describe the watch face. It will be named xxxxx_app.zip, xxx is your watch face name, mycolock for example.
This zip file will contains two lua file :
- manifest.lua will describe the watch :
Code:
clock {
name = "MyClock",
entrypoints = "ClockEntries"
}
the second will be executed by the Toq to draw the watch face and will be named init.lua.
We can add image file that will be used by the init.lua script.
I started a project on github to convert png to qualcomm img format : https://github.com/marciallus/toq_imgTools
I attach the myclock_app.zip in this thread.
The second zip file will be name xxxxx.zip, myclock.zip for example. and will contain 3 files:
- The zip files create before will be add to in this zip, I dont see why.
- clock.json will describe the watch too
Code:
{
"Clock": [
{
"displayName": "My Clock",
"packageName": "com.qualcomm.qce.myclock",
"asset": "myclock_app.zip",
"icon": "my_clock.png",
"jsonName":"com.qualcomm.qce.myclock/MyClock"
}
]
}
- my_clock.png will be displayed in the Taq Manager Android Application to choose the custom watch
I've attached the myclock.zip in this thread too
5 : Repackaging
Now we have created the two needed files in assets folder we will recreate the apk to resintall this modified version on the phone :
-first use apktool to repackaging in com.qualcom.toq-modified.apk
Code:
./apktool b toq com.qualcom.toq-modified.apk
-we need to sign the apk :
Code:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore [your keystore] com.qualcom.toq-modified.apk [your key]
you can see how to create a keystore here : http://developer.android.com/tools/publishing/app-signing.html
- we can zip align the file, it's better :
Code:
zipalign -fv 4 com.qualcom.toq-modified.apk com.qualcom.toq-modified-aligned.apk
6 : Installing
We just have now to reinstall the modified apk :
Code:
adb install -r com.qualcom.toq-modified-aligned.apk
And if you go on your phone on Toq Manager -> Preferences -> Clock Style !! TADA !! your clock is here, you can select it to push it to your watch !!
that's all
feel free to comment, it's my first thread creation so I'm open for remarks
--
MarCo
I recently bought an Toq on eBay, I will try it as soon as it arrives. Do you know a way to transform from IMG to PNG?
Thanks for the hack!
alaintxu said:
I recently bought an Toq on eBay, I will try it as soon as it arrives. Do you know a way to transform from IMG to PNG?
Thanks for the hack!
Click to expand...
Click to collapse
The github i've started here : https://github.com/marciallus/toq_imgTools doas png to IMG but I will add the options to make inverse
--
MarCo
marciallus said:
The github i've started here : https://github.com/marciallus/toq_imgTools doas png to IMG but I will add the options to make inverse
--
MarCo
Click to expand...
Click to collapse
Thanks! No love here so far, but I've been looking for this for some time. Been waiting to get a new PC (old one died) before I explored this. Might still be a little while before I make an attempt though.
Flipclock
I've found that there is a clock that is not enabled called "flipclock".
Just editing allclocks.json and adding:
{
"bundle": "flipclock.zip",
"type": "dynamic"
},
You have a new clock! Now I'm trying to add 24h formats to some existing clocks (bold and facets). Do you have any clues to do that?
P.S.: Did you enable the possibility tor transform from img to png yet? I didn't see any changes in your github project.
24 Hours digital watchface
I created a simple watchface, showing 24h digital clock and the date, something like:
Jan, 07
13:00
Wednesday
Great
I've deposed one here two
https://github.com/marciallus/mytoqmanager/blob/master/toq/Data/assets/newclock_app.zip
alaintxu said:
I created a simple watchface, showing 24h digital clock and the date, something like:
Jan, 07
13:00
Wednesday
Click to expand...
Click to collapse
marciallus said:
Great
I've deposed one here two
Click to expand...
Click to collapse
I checked your code and i think you can much more easily get 24-hour clock by just changing timestyring format:
Code:
timeModel:getTimeString("%I")
change to:
Code:
timeModel:getTimeString("%H")
Since it's all lua script they should be using lua time format strings.
Pyblo said:
I checked your code and i think you can much more easily get 24-hour clock by just changing timestyring format:
Code:
timeModel:getTimeString("%I")
change to:
Code:
timeModel:getTimeString("%H")
Since it's all lua script they should be using lua time format strings.
Click to expand...
Click to collapse
Ah Yes thx a lot
I just discovered lua
I Will try that
bye
--
MarCo
About your image conversion...
I'm wondering how did you figured out how to open or modify those .img files? Honestly I have no idea what was going on or what was your reasoning in order to create your little program. Did you found something provided by Qualcomm or Mirasol?
marciallus said:
I started a project on github to convert png to qualcomm img format: github.com/marciallus/toq_imgTools
Click to expand...
Click to collapse
I have found a java class to convert .img to .png files:
gist.github.com/moneytoo/8446716
I would like rewrite your code to run it in java. I hope you can help me to understand how it works.
By the way, It is possible to create a watchface with a custom image background, like this example:
github.com/KhaosT/ToqImageGenerator
Thank you!
Related
With this tool you can lookup CodeSnippets on the Go! Just add them to the Access Database, convert it with the included tool "Code Snippet Creator" and copy it to your Device and start "Code Snippet Viewer"
The Viewer is Tested on my Stock HTC Kaiser - But it should run on any Touchscreen powered WM Device with netcfv2
Code:
Code Snippet Viewer v0.5.1
---
1. Copy the "Release" dir on your Windows Mobile Device with .NETcf2
2. Run "CodeSnippetViewer.exe" on Device
- Version 0.5.1
.Fix
- Version 0.5.0
.Release
Code:
Code Snippet Creator v0.5.0
---
1. Run "csviewer.exe" on Desktop PC
2. Press "Create Database" Button to create "CodeSnippets.txt"
3. Copy "CodeSnippets.txt" to your Device, where "CodeSnippetViewer.exe" is located
The Snippets are read out of the "CodeSnippets.mdb", feel free to add your Snippets there, and Post it on XDA-Developers
- Version 0.5.0
.Release
Download
http://www.scilor.com/codesnippets.html
If you have suggestions to improve this, just post it here!
Space Holder for additional things later on
WOW.. very interessting and helpfull Prog thank you
No Problem, if you have suggestions post it here
what is it for?
sorry for this question im just a newbie,
when i see it right r u german, so pm me pls in german if u can THX!
Ok I don't know exactly what this is for? I wish I did because it looks intriguing.
so what is it for now? can anybody describe it please?
You can create an Access Database for Code Snippets or other things you need to access on the go
then you can convert it and upload it to you phone
Website Added:
http://scilor.sc.funpic.de/codesnippets.html
i have tested your app. but it doesnt work. when i use your sample files, it works, but when i generate a new txt from my mdb, there is an error starting the app. ArgumentOutOfRangeException
here is my exported *.txt. I love this program. great work. i try to sync the mdb with a mysql db in the the net. so i can add new snippets online and sync them back to the device.... i have a cms on my website, where i have some modules which i can use for this. it works also with syntax highligtning (on the net) for some of the programming languages.
Thank you for your feedback, but I have the problem, that it doesnt works in the emulator anymore, I do not know why, it worked before xD
I'll If I can find teh problem.
NEW VERSION
Problem should be fixed!
many thx. i will try this @home, because i am now @work i will try to make an exporter with PHP for my online version to, when i have it done, i can mail them to you. this exporter should be easy to code. i can also make an importer, so that you can import a textfile.
the next idea could it be, that you mobile can add a new recordset with a new snippet, so the sync ist complete... but this only an idea by me...
Here you have the needed code for exporting from SQL to textfile (Routine from the Creator):
I have stripped it down just to show the important things
Code:
oRS.Open "SELECT * FROM CodeSnippets ORDER BY ProgrammingLanguage ASC, Category ASC, UnderCategory ASC", oConn, adOpenKeyset
oRS.MoveFirst
txtData = oRS.RecordCount & vbNewLine
For I = 1 To oRS.RecordCount
TempData = oRS.Fields("ID").Value & ">{.+.}<" & _
oRS.Fields("ProgrammingLanguage").Value & ">{.+.}<" & _
oRS.Fields("Category").Value & ">{.+.}<" & _
oRS.Fields("UnderCategory").Value & ">{.+.}<" & _
oRS.Fields("Snippet").Value
txtData = txtData & Replace(TempData, vbNewLine, ".>-NewLine-<.") & vbNewLine
'This Replaces all linebreaks in the Tempdata and attaches it to txtData and also adds a line break afterwards
oRS.MoveNext
DoEvents
Next
oRS.Close
oConn.Close
Call frmViewer.txt_WriteAll(PathTo & "CodeSnippets.txt", txtData)
Here Is a php I wrote from sketch without testing:
Code:
'Connect to the DB first
$newLine = '
';
'Sry that is a new line I do know if "\n" works instead
$SQLString = "SELECT * FROM CodeSnippets ORDER BY ProgrammingLanguage ASC, Category ASC, UnderCategory ASC";
if ($SQLAnswer = mysql_query($SQLString))
{
$txtData = mysql_num_rows($SQLAnswer).$newLine;
while($row = mysql_fetch_object($SQLAnswer))
{
$TempData = $row->ID.'>{.+.}<';
$TempData .= $row->ProgrammingLanguage.'>{.+.}<';
$TempData .= $row->Category.'>{.+.}<';
$TempData .= $row->UnderCategory.'>{.+.}<';
$TempData .= $row->Snippet;
$txtData .= $newLine.str_replace('.>-NewLine-<.', $newLine, $TempData).$newLine;
}
}
'Write $txtData to a File!
yes this should do the job. i will try it at the weekend. many thx
the rapidshare link show the old version. Can you please update the file or the link?
i have done the online version. there is a *.sql file included, this generates the needed MySQL tables. Also there is a slightly modified *.mdb. i have only modified the Formular.
next there are the needed php an html files for the webserver. the html file is a template, so anyone can modify it.
Update:
i have done some Additions. Included is now EditArea a OpenSource Syntax Highlightning Script. Also i have added a new version of the SQL table, since there is a new field "highlight", this is only for the JavaScript, this field will not be exported in any way.
Now you can manualy add a ProgrammingLanguage or Category by the textfield OR you can choose one from existing Selectbox.
The last time i have forgotten to say, that you must configure the MySQL connection in the common.php. have a look at the following block and put in the right values:
Code:
define("DATABASE_NAME","");
define("DATABASE_USER","");
define("DATABASE_PASSWORD","");
define("DATABASE_HOST","");
Sorry, made a mistake on my website, now it points to the new version
there is no new *.exe file in the zip :-( the directory contains only some txt files :-( please reupload the file.
Sry, here it is again.
Had a problem with my packer
[UTILITY] Lua 5.1 tools: compiler, decompiler, snippets & extendable lua.dll with SDK
Hi!
This package contains lots of useful tools for Manila3D Lua5.1 editing. You can find here a compiler a decompiler, a small script repository at post #3 and ExtLua, which provides developers the possibility to extend M3D's functionality.
Also check m9editor which is a really great application to edit mode9 files by 6Fg8!
And check Manila kitchen project which hosts the decompiled scripts with a LUA IDE and everything ready to go.
You might want to try out mode9 converter too.
ChangeLog
LuaDec 2.0
Finds out where locals are
Read more here
LuaDec 1.9
Some changes regarding LDS(2) strings and for loops (it's still a bit unstable)
LuaDec has a new option to disassemble instead of decompile
The provided lua package (lua, luac and luadec) is now unicode compilant, it will read and write the unicode variants of the scripts instead of the ascii variants.
Read more here
LuaDec 1.0
Added LDS2 support to both luadec and luac
Fixed OP_TFORLOOP handling
Read more here
LuaDec Beta6
Improved luadecguesser with fast mode
Fixed a crashing when encountering boolean values
Increases happy face rate in XDA-developers forum
Read more here
LuaDec Beta5
Improved luadecguesser
Read more here
luaDec Beta4
Upvalue handling
Added a brute-force local variable searcher application
Read more here
luaDec Beta3
Generic for loop handling
Improved local variable handling
Read more here
ExtLua 0.1
Initial release
Read more here
luaDec Beta2
Less crashing
More decompiling
Read more here
LuaDec Beta1
Decompiling simpler scripts and recompiling them will result in a semantically identical compiled lua script!
Numeric for loops are fixed, they should work fine
Complex boolean expressions and conditional statements will make luadec crash
Only works with ascii files. Don't forget to convert the lua files to ascii then back to unicode
Good to know
Luadec will output a "-- Lua5.1" or "-- Warning" comment to lines, where you should check the output.
If luadec crashes try running it with the "-d" parameter to acquire as much information as you can.
Compile your lua files with the "-s" parameter set.
It was compiled with Visual C++ 2008, so you might need the MSVC++ 2008 redistributables too.
Valid Numbers are in range from -32768.0 to 32767.0. Numbers not in this range will be cropped by the compiler.
There is a decompilation tutorial starting here
DL link: http://winmo.sztupy.hu/luadec.html
I start a repository at post #3 for them, but you can just look at the decompiled rhodium2 scripts too.
Does not work for me.
Useful snippets of code
Succesfully decompiled scripts
All rhodium and rhodium2 scripts:
http://winmo.sztupy.hu/manilakitchen.html
Run an application:
Code:
Shell_NavigateTo(command,parameters)
Add an eventhandler to an event: (thx D-MAN666)
Code:
object.EventName:connect(functionRef, scopeRef);
object.EventName:disconnect(functionRef, scopeRef);
Where events can be: onPress, onRelease, onReleaseOutside
Example (from 4aefb03d_manila):
Code:
require("hitfeedback")
OnPhotoTouchPress = function(loc_0)
gnPhotoTouchPressY = loc_0._ymouse
Camera3DHitFeedback:Press()
end
PhotoHitTarget.onPress:connect(OnPhotoTouchPress)
sztupy said:
More detail please... no output? crash ? missing dlls?
Click to expand...
Click to collapse
It simply return "cannot execute this file", tested on XP and Win7 beta
do you have to do something first at manila files?
for me say bad headers!
@udk : i'm running on win 7 beta too and it's working in CMD...
utopykzebulon said:
@udk : i'm running on win 7 beta too and it's working in CMD...
Click to expand...
Click to collapse
That's strange, maybe I miss some files.
udK said:
It simply return "cannot execute this file", tested on XP and Win7 beta
Click to expand...
Click to collapse
Do you have the MS Visual C++ 2008 redistributables? (MSVCR9 and MSVCP9)
utopykzebulon said:
do you have to do something first at manila files?
for me say bad headers!
@udk : i'm running on win 7 beta too and it's working in CMD...
Click to expand...
Click to collapse
did you unicode2ansi them?
sztupy said:
did you unicode2ansi them?
Click to expand...
Click to collapse
yes it's work onw thx man
For "ERROR_nil" you have to decompile lua files with chunkspy and correct it manually
utopykzebulon said:
yes it's work onw thx man
For "ERROR_nil" you have to decompile lua files with chunkspy and correct it manually
Click to expand...
Click to collapse
I' now comparing the VM docs of 5.0 and 5.1 and I'm comparing the changes. I already corrected a lot of bugs, so in the next version you might not even need chunkspy
sztupy said:
I' now comparing the VM docs of 5.0 and 5.1 and I'm comparing the changes. I already corrected a lot of bugs, so in the next version you might not even need chunkspy
Click to expand...
Click to collapse
you're great man
waiting for your relase!
Alpha 2:
Less chatty (no more "arg" values)
Fixed constant loading errors
fixed function variables
Added handlers to the new opcodes
Some changes to OP_TEST
Check first post for links.
I also started a repository for useful snippets of code at post #3
Wow, that looks promising!
Hi!
beta1 is released. I also added a compiler (and an interpreter just in case), that was changed to use TF3D's Q16.16 numeric encoding format. (Thanks to D-MAN for deciphering the encoding)
Currently luadec is able do decompile a lot of scripts, except:
Scripts with too much local variables
Scripts with complex boolean expressions and conditional statements
Scripts where luadec crashes while decompiling
This means however that recompiling small scripts WORK, and will result in a semantically identical files (semantically means it will do the same as the original. Usually the only thing that is changed is the line number of the function declarations (yes, lua stores this information in the compiled files) )
Tutorial
For example, to change 4aefb03d_manila do the following:
1. Convert it to ascii
Code:
luaconv 4aefb03d_manila x uni2asc
2. Decompile
Code:
luadec x > m.lua
3. Edit m.lua
4. Recompile using luac from my package
Code:
luac -s m.lua
5. Convert output back to unicode
Code:
luaconv luac.out 4aefb03d_manila.new asc2uni
Here is an example: this will run footprints instead of HTCAlbum
Code:
require("hitfeedback")
gnPhotoTouchPressY = -1
Camera3DHitFeedback = HitFeedback(Camera3D)
OnPhotoTouchPress = function(loc_0)
gnPhotoTouchPressY = loc_0._ymouse
Camera3DHitFeedback:Press()
end
OnPhotoTouchRelease = function(loc_0)
Camera3DHitFeedback:Release()
if gnPhotoTouchPressY ~= -1 and loc_0._xmouse < CameraSprit.Position.x and noImage2DCamera._visible == false then
Shell_NavigateTo("\\Windows\\HTCFootprint.exe", "")
end
gnPhotoTouchPressY = -1
end
OnPhotoTouchReleaseOutside = function()
Camera3DHitFeedback:Release()
end
PhotoHitTarget.onPress:connect(OnPhotoTouchPress)
PhotoHitTarget.onRelease:connect(OnPhotoTouchRelease)
PhotoHitTarget.onReleaseOutside:connect(OnPhotoTouchReleaseOutside)
You're the best
Now we can create a lots of manila mods
i try it now
thanks a lot for this tool
one of the best with mode9editor
edit after use:
really a giant leap in manila research....
fantastic work, sztupy. Already working on integration with m9editor. You're going to break the final frontier
6Fg8 said:
fantastic work, sztupy. Already working on integration with m9editor. You're going to break the final frontier
Click to expand...
Click to collapse
it will be fantastic....
WOW! manila's inside out
great work
i'm using windows 7 beta and i'm getting this error:
the application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
how to correct this?
pcarvalho said:
WOW! manila's inside out
great work
i'm using windows 7 beta and i'm getting this error:
the application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
how to correct this?
Click to expand...
Click to collapse
Did you install the MSVC++ 2008 redistributables?
sztupy said:
Did you install the MSVC++ 2008 redistributables?
Click to expand...
Click to collapse
yes, all that you say in first post is installed...
in the log i have:
Activation context generation failed for "C:\Users\XXXXXXXXX\Desktop\lua\luadec.exe". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
and found this...
http://www.gamedev.net/community/forums/topic.asp?topic_id=493103
Please delete this thread.
Nice info! Thank you
About other builds:
You need file: /system/media/bootscreen/boot_animation.xml
Inside this xml you will find next directives:
audio="/system/media/bootscreen/boot.mp3"
useAudio="0" // 1: true ; 0:false
So you can put your audio anywhere.... and modify xml.
kirchevsky said:
About other builds:
You need file: /system/media/bootscreen/boot_animation.xml
Inside this xml you will find next directives:
audio="/system/media/bootscreen/boot.mp3"
useAudio="0" // 1: true ; 0:false
So you can put your audio anywhere.... and modify xml.
Click to expand...
Click to collapse
If this is true and works. I will fly to Odessa and buy you a beer.
I've already done this, and also have changed the boot animation as well (adding bootanimation.zip to the same location), but the problem I have come across is, between the two running it doesnt run the full length. Meaning by this, the mp3 is 25 seconds long, the boot animation is 30 seconds long. but when it starts to run, it runs only for 10 seconds and goes to the lock screen. Anyone got an idea how to make both run the full length sound and gfx?
Also just as an FYI, you can also use the location system\media if the customize location is not available in "non-sense" builds.
kirchevsky said:
About other builds:
You need file: /system/media/bootscreen/boot_animation.xml
Inside this xml you will find next directives:
audio="/system/media/bootscreen/boot.mp3"
useAudio="0" // 1: true ; 0:false
So you can put your audio anywhere.... and modify xml.
Click to expand...
Click to collapse
I wish this were true. However it all depends on the rom and where in that specific rom the xml file is. Ex: on sense roms I believe the location is system/customize/resource/cid/default.xml when you edit the xml file do a search for bootanimation and you'll see the string that specifies the location of the audio file to play during boot.
Currently I've been trying to figure it out for both my HD2 and Aria. I don't know of an easy way of searching for the xml file. I'm open to any suggestions.
Sense builds dont need the xml file, Non Sense do, the file your looking for isI believe default.xml, there is no boot_animation.xml
AngelDeath said:
Sense builds dont need the xml file, Non Sense do, the file your looking for isI believe default.xml, there is no boot_animation.xml
Click to expand...
Click to collapse
Correct however it isn't easy to locate.
This is the string I'm referring to
Code:
"<BootAnimation animation="/system/customize/resource/bootanimation.zip" audio="/system/customize/resource/android_audio.mp3" />"
You'll find that in a sense rom.
- What is baksmali/smali?
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
The names "smali" and "baksmali" are equivalents of "assembler" and "disassembler" respectively.
- Author of the tool
JesusFreke
- Why we need it?
Android apk and jar files will include java classes to execute certain functionality. With baksmali, you will be able to disassemble the java classes into editable form (smalis) so you can do your editing and modding involving java script. Once you done changing, you need to assemble all classes to a readable form for android, i.e, classes.dex and here comes the role of assembler (Smali).
Since we have apk manager, do we still need this tool?
Yes and No!!! Because some apk managers even if they do support jar files but once they decompile smalis, they will remove some lines (.line, .parameter, ...etc) which are in my opinion are useful to locate some codes. So the choice is yours.
- What does this tool do?
Simply it baksmali classes.dex of android apk and jar files into editable form (smalis) to do your changes; then assemble it back (smali).
- Will it affect apk and jar original signature?
No, it will preserve original signature.
- Got problem?
During assembling (smali), you may got error message. You can check log file to locate what is wrong that make the manager stop assembling the file or post the log file for developers to look into it.
- What are the steps to work with this tool?
Run Baksmali_tool.bat file, this will create all needed folders in the first run.
1. Put android apk or jar file in "put-file-here" folder. If Current-file status is set to None, then either you need to set a file in option #3 or you forget putting valid file in "put-file-here" folder.
2. When Current-file status is set to your file, you can disassemble its classes.dex by option #1.
3. Classout folder with name of file project will be created in "project" folder; make your changes there.
4. If finished your changes, assemble classout folder by option #2.
5. If everything is OK, a new file will be created in "finish" folder with tag (Modded_) in its name, push it to your device by option #3 if it was system apk or jar; and if it was non system apk file, install it by option #4.
- Latest stable version
Latest stable baksmali/smali version: 2.2.2 (30.10.2017)
baksmali v. 2.2.2 - Download (bitbucket.org)
smali v. 2.2.2 - Download (bitbucket.org)
baksmali/smaly previous versions - Download (bitbucket.org)
- Latest beta version
Latest beta baksmali/smali version:
- Changelog
baksmali/smali wiki and changelog (github)
- Where can I download latest source code?
You can visit
baksmali/smali source page (github)
and you can download the latest smali and baksmali code versions.
- Special Thanks to XDA Portal Team
Special thanks to XDA Portal Team for featuring this utility
XDA Portal Team
..
hi m8,
thanks for this nice tool
will try it next time I make a new theme
sent from my G-Note
great work majd keep it up
no credit to the author of smali/baksmali? :/
iBotPeaches said:
no credit to the author of smali/baksmali? :/
Click to expand...
Click to collapse
I think the authers are these guys ([email protected], [email protected], JesusFr.. @gmail.com) from project page.. aren't they??? if so I will update OP
majdinj said:
I think the authers are these guys ([email protected], [email protected], JesusFr.. @gmail.com) from project page.. aren't they??? if so I will update OP
Click to expand...
Click to collapse
Yes, thats the same person. I'd just put JesusFreke, as thats his username.
Version 1.1 is online
version 1.2 is online
some bugs fixed
Grate dev, Great tool...tnx majdini:fingers-crossed:
What a great idea to simplify life ^^.
Thanks majdinj.
majdinj said:
Backsmali / Smali Manager
What is Backsmali / Smali?
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
The names "smali" and "baksmali" are equivalents of "assembler" and "disassembler" respectively.
Why we need it?
Android apk and jar files will include java classes to execute certain functionality. With backsmali, you will be able to disassemble the java classes into editable form (smalis) so you can do your editing and modding involving java script. Once you done changing, you need to assemble all classes to a readable form for android, i.e, classes.dex and here comes the role of assembler (Smali).
Since we have apk manager, do we still need this tool?
Yes and No!!! Because some apk managers even if they do support jar files but once they decompile smalis, they will remove some lines (.line, .parameter, ...etc) which are in my opinion are useful to locate some codes. So the choice is yours.
What does this tool do?
Simply it backsmali classes.dex of android apk and jar files into editable form (smalis) to do your changes; then assemble it back (smali).
Will it affect apk and jar original signature?
No, it will preserve original signature.
Got problem?
During assembling (smali), you may got error message. You can check log file to locate what is wrong that make the manager stop assembling the file or post the log file for developers to look into it.
What are the steps to work with this manager?
Run Backsmali_tool.bat file, this will create all needed folders in the first run..
1. Put android apk or jar file in "put-file-here" folder. If Current-file status is set to None, then either you need to set a file in option #3 or you forget putting valid file in "put-file-here" folder.
2. When Current-file status is set to your file, you can disassemble its classes.dex by option #1.
3. Classout folder with name of file project will be created in "project" folder; make your changes there.
4. If finished your changes, assemble classout folder by option #2.
5. If everything is OK, a new file will be created in "finish" folder with tag (Modded_) in its name, just rename it to its original name and push it to your device; don't forget to fix permissions as well.
If backsmali and smali code are outdated, what to do?
Just visit codes owner page, and download the latest smali and backsmali code versions and put them in "tools" folder (make sure to rename them to baksmali and smali without version number)
Future development?
Feel free to report any bugs or suggestion to improve upcoming releases :good:
Download
- Backsmali-Manager_v1.2 @ 11/June/2013 (The most recent one)
- Backsmali-Manager_v1.1 @ 7/June/2013 (old)
- Backsmali-Manager_v1 @ 6/June/2013 (old)
Change-log:
@ 11/June/2013 (v1.2):
- Fixed bug of file path in Read Log option.
- Fixed number 10 file that was not shown in Set Current-file option.
@ 7/June/2013 (v1.1):
- Deleting the folder and file in project and finish folder of same project name before backsmali or smali (no more overlapping :fingers-crossed.
- Added Read log file functionality in the main menu.
- Ability to open classout folder after backsmali.
- Ability to open finish folder after smali.
- Ability to renamed finished modded file to its original name.
- Neat smali and compression processing (i.e, hidden processing ).
- Fixed set Current-file option to visualize only apk and jar files.
@ 6/June/2013 (v1.0):
- First release of Backsmali / smali manager
Click to expand...
Click to collapse
i don't know how to start editing this smali file
badagila said:
i don't know how to start editing this smali file
Click to expand...
Click to collapse
Editing smali means to modify your jar or apk file to do certain new function, check the second thread in my signature in OP... you will find a lot editing tutorials of smalis of some android apps :laugh:
majdinj said:
Editing smali means to modify your jar or apk file to do certain new function, check the second thread in my signature in OP... you will find a lot editing tutorials of smalis of some android apps :laugh:
Click to expand...
Click to collapse
ok dude thanks
Hi, your work is featured here: http://ajqi.com/baksmali-smali-manager-windows-tool/
Keep it up!
VERY NICE!
Good Work..
I dont know much about smali backsmali.. but one confusion..
Is this tool also applicable if the files (apks or jars) we want to modify are odexed?
OJ said:
Good Work..
I dont know much about smali backsmali.. but one confusion..
Is this tool also applicable if the files (apks or jars) we want to modify are odexed?
Click to expand...
Click to collapse
No, actually classes.dex are made from the odex files.
If files are odexed, then there will be no classes.dex in apks or jar files. That's why it won't be applicable then
Version 1.3 is online
Change log:
- Added adb push finished file to device system partition (for system files).
- Ability to choose whether to reboot device after pushing files to device.
- Added adb install finished apk (for non-system files).
- Adjustable Java heap memory size.
- Adjustable finished file compression level.
- Updated Smali and Backsmali codes (date 15/6/2013).
@ 23/June/2013 (v1.4):
- Added Pull apk or jar From Android Device to the main menu.
- Added zipaligning process during Smali (better RAM management).
- Fixed apk installing process (added signing process step for installing apk process).
- Added direct link to this xda page in update option.
- More script polishing...
@ 29/June/2013 (v1.5-FINAL):
- Fixed adb remount bug for some ROMs in push option.
- Baksmali argument is updated; now you can choose whether to baksmali with x argument (retain .line, .parameter, .prologue, and .local) or b argument (remove .line, .parameter, .prologue, and .local).
Hi,
i've XP&Backsmali / Smali Manager v1.5 and i want baksmali framework.jar but i got error message(attachment)
I think wrong is slash (should be a backslash)
the same error is after i select 1(baksmali*)and then x and Y or
--------------------------------------------------------------and then b and Y
*baksmali or backsmali?
I was looking for an easy way of having the "Note" and "Meeting" templates with white background, so it would print decently. So far it seems there's no easy way to create own templates apart from messing with the .apk file. The alternative of manually setting the background each time I create a note or add a page does not look appealing as well.
Until somebody comes with a better solution, here's what I managed to get:
Simple description:
Modify original '"Note" template
Download the "Wine" template form 'new snote' dialog window
Replace the "Wine.snb" with modified "Note.snb"
Detailed description
* Intro:
Templates are stored in *.snb files, which are plain zip files (just like .apk's), easy to open/change with e.g. 7-Zip.
We want to customize the Note template ('note.snb' file).
Root is necessary.
* How to modify note.snb backgrounds:
Copy the file '\system\app\Snote_wxga.apk' to your PC
On PC:
Open the 'Snote_wxga.apk' file and
Goto to '\assets\templates' folder
Open the 'Note.snb' file
Go to folder 'snote\media\':
- the two .png files located there are note backgrounds (for title page and normal ones) - edit or replace the files with your own
- the two .jpg files are thumbnails - edit or create your own, by e.g. resizing and converting the .png files from previous step
* How to get the modified template to the device:
Download new template from the web (in new note window dialog) - let's say it's "Wine"
Go to folder '/data/data/com.sec.android.app.snotebook/download/template', it should contain following files:
/T_001/template/thumb_l.png
/T_001/template/thumb_p.png
/T_001/template/wine.snb
/T_001/widget/widget_thumb.png
/template.list
Replace the file '/T_001/template/wine.snb' with your modified copy of 'note.snb' (remember to change the name from 'note.snb' to 'wine.snb')
All other .png files are thumbnails - edit, make your own or leave as it is
* How to change name of the new template from 'Wine' to something else:
Copy the 'template.list' file to PC
Open it with a decent text editor (e.g. Notepad++)
Find the string {"value":"Wine","lang":"en"} for your language, and change the 'Wine' label to one of your choosing
Copy the file 'template.list' back to folder '/data/data/com.sec.android.app.snotebook/download/template' on your device
The following procedure can be repeated - so far there are 3 downloadable templates provided by Samsung, each of those can be replaced the same way.
PS1. It works.
PS2. At least on my device.
Thanks for trying that out. I haven't got round to it yet, but I was planning to try something similar myself.
The other solution I had considered was a rather more radical hack of the snote apk, but a more flexible solution: If it was possible to hack the apk so that the downloaded templates are stored in the default external storage in /sdcard/Android/data/com.sec.android.app.snotebook/ rather than the internal storage you could get to that without root, and just edit the templates any time you wanted.
It would be easy enough to do with access to the java code, and while I'm sure it might be possible to do by hacking the smali files, it's more work than I can find the time for at the moment.
rmein said:
Thanks for trying that out. I haven't got round to it yet, but I was planning to try something similar myself.
The other solution I had considered was a rather more radical hack of the snote apk, but a more flexible solution: If it was possible to hack the apk so that the downloaded templates are stored in the default external storage in /sdcard/Android/data/com.sec.android.app.snotebook/ rather than the internal storage you could get to that without root, and just edit the templates any time you wanted.
It would be easy enough to do with access to the java code, and while I'm sure it might be possible to do by hacking the smali files, it's more work than I can find the time for at the moment.
Click to expand...
Click to collapse
Hopefully Samsung will discover the idea of custom templates some day. Also, judging from the structure of snb files, they must have some template editor (i don't believe they would edit all the xml's manually). Would be great if the editor was made public as well.
As for the solution - editing java lives far above my abilities, so I hope you'll find the time. I chose the described method, because the other solution, i.e. replacing the snb files directly inside the snote apk, would not survive the flashing, unless the new apk was installed to data, which I had no time to check if would work at all. Besides, having the ready-made template folder, I was able to repeat the process on my wife's Note within a minute.
One final remark - I did not bother with creating new backgrounds, any decent graphic editor enables to edit images palette colours, I used GIMP, to simply change background of 'Note' and 'Meeting' to white.
Sent from my GT-N5100 using xda premium
Thank you for finding and sharing this. I am still struggling with finding the Wine template. On the dialog "new note" in my Galaxy note 10.1 it just shows me the 10 templates available to choose. No template to download. Or do you mean another dialog? I don't understand that part really well.
Another question (I suppose I will know that when I can do it). Can I put templates (background images) of higher resolution? . That is the whole reason why I want to change the templates. I think the finest pen stroke looks pretty thick.
Thanks!!
Cristian
duguet said:
Thank you for finding and sharing this. I am still struggling with finding the Wine template. On the dialog "new note" in my Galaxy note 10.1 it just shows me the 10 templates available to choose. No template to download. Or do you mean another dialog? I don't understand that part really well.
Click to expand...
Click to collapse
Don't know how it works with Note 10, on the 8 the pressin the "+" for new note shows window as in attached screenshot - the 'download button' is marked
duguet said:
Another question (I suppose I will know that when I can do it). Can I put templates (background images) of higher resolution? . That is the whole reason why I want to change the templates. I think the finest pen stroke looks pretty thick.
Click to expand...
Click to collapse
I guess you could try, but it could require additional editing of one of xml files - I think template dimensions are stored there
Many thanks!!!
So now I know I don't have the same S-note version. I don't see that download option. Could somebody send me the Wine template file? thanks!
I'll let you know if I made it increasing the resolution.
BR,
Cristian
duguet said:
Many thanks!!!
So now I know I don't have the same S-note version. I don't see that download option. Could somebody send me the Wine template file? thanks!
I'll let you know if I made it increasing the resolution.
BR,
Cristian
Click to expand...
Click to collapse
I'm afraid this might not work for you - the whole template/background swapping works because additional templates are installed by SNote app itself. I doubt your version will be able to recognize template files if you just copy them.
anyway, I'll attach the templates after the weekend, so you can try for yourself
duguet said:
Could somebody send me the Wine template file? thanks!
Click to expand...
Click to collapse
As promised - modified templates with white background (names in template.list unchanged):
1. Note (replacement of Wine template)
2. Meeting (replacement of Movie template)
3. Memo (replacement of Weaning Food template)
p107r0 said:
I was looking for an easy way of having the "Note" and "Meeting" templates with white background, so it would print decently. So far it seems there's no easy way to create own templates apart from messing with the .apk file. The alternative of manually setting the background each time I create a note or add a page does not look appealing as well.
Until somebody comes with a better solution, here's what I managed to get:
Simple description:
Modify original '"Note" template
Download the "Wine" template form 'new snote' dialog window
Replace the "Wine.snb" with modified "Note.snb"
Detailed description
* Intro:
Templates are stored in *.snb files, which are plain zip files (just like .apk's), easy to open/change with e.g. 7-Zip.
We want to customize the Note template ('note.snb' file).
Root is necessary.
* How to modify note.snb backgrounds:
Copy the file '\system\app\Snote_wxga.apk' to your PC
On PC:
Open the 'Snote_wxga.apk' file and
Goto to '\assets\templates' folder
Open the 'Note.snb' file
Go to folder 'snote\media\':
- the two .png files located there are note backgrounds (for title page and normal ones) - edit or replace the files with your own
- the two .jpg files are thumbnails - edit or create your own, by e.g. resizing and converting the .png files from previous step
* How to get the modified template to the device:
Download new template from the web (in new note window dialog) - let's say it's "Wine"
Go to folder '/data/data/com.sec.android.app.snotebook/download/template', it should contain following files:
/T_001/template/thumb_l.png
/T_001/template/thumb_p.png
/T_001/template/wine.snb
/T_001/widget/widget_thumb.png
/template.list
Replace the file '/T_001/template/wine.snb' with your modified copy of 'note.snb' (remember to change the name from 'note.snb' to 'wine.snb')
All other .png files are thumbnails - edit, make your own or leave as it is
* How to change name of the new template from 'Wine' to something else:
Copy the 'template.list' file to PC
Open it with a decent text editor (e.g. Notepad++)
Find the string {"value":"Wine","lang":"en"} for your language, and change the 'Wine' label to one of your choosing
Copy the file 'template.list' back to folder '/data/data/com.sec.android.app.snotebook/download/template' on your device
The following procedure can be repeated - so far there are 3 downloadable templates provided by Samsung, each of those can be replaced the same way.
PS1. It works.
PS2. At least on my device.
Click to expand...
Click to collapse
Thanks!
S Note of Galaxy Note 3
Does anyone know how we can get large (A4) size templates for S Note? The default pages are like small (size) notes.
Can someone give me the S Note apk files for Galaxy Note 3? I want to install this on my Asus tablet as well so I can synchronize my work done on either of the two.
I have been using Asus Supernote earlier on my Asus Tablet and Galaxy S3 mobile, but the Supernote does not work on my new Galaxy Note 3.
Unless I missed it - is it possible to change the default save file name? I used the memo template to create my new one - copied over wine. When I hit save it defaults to Memo_date_time. If I can find where to change the Memo portion of the filename. Would make for a sweet setup then