Android Beginners: NDK Setup Step by Step « Mind The Robot:
This Blog is first of all memos for me!! From time to time I get exposed to new and cool stuff for developers and architects ,most of the time its a solution for a problem or tips or tricks, so, I would like to track my memos and share it with you, it can save your time and nervous, I hope you will enjoy it - by Yaniv Tzanany.
Search This Blog
Wednesday, February 26, 2014
MakeFile - Dependencies
you can find here some info about writing correct MakeFiles
http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_4.html
the option i was looking for is how to create depndency between files that exist in other projects.
the solution is to use VPATH in the makefile.
http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_4.html
the option i was looking for is how to create depndency between files that exist in other projects.
the solution is to use VPATH in the makefile.
VPATH
: Search Path for All Dependencies
enjoy
Yaniv Tzanany
Monday, February 24, 2014
CCache - speed C++ compiler output
ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Supported languages are C, C++, Objective-C and Objective-C++.
to make it work on aix with xlC_r compiler , i used the next steps:
i download the sources and compile them on aix via g++ compiler
i copied the output ccache program into my build machine.
i set the next environment to make support xlC_r compiler:
export CCACHE_EXTENSION=i (this tell the compiler to generate preprocessor file with i extension)
helper settings FYI:
export CCACHE_DISABLE=1 (to avoid using ccache)
export CCACHE_LOGFILE=/yaniv/ccachelog.log (to see ccache log)
enjoy
Yaniv Tzanany
to make it work on aix with xlC_r compiler , i used the next steps:
i download the sources and compile them on aix via g++ compiler
i copied the output ccache program into my build machine.
i set the next environment to make support xlC_r compiler:
export CCACHE_EXTENSION=i (this tell the compiler to generate preprocessor file with i extension)
helper settings FYI:
export CCACHE_DISABLE=1 (to avoid using ccache)
export CCACHE_LOGFILE=/yaniv/ccachelog.log (to see ccache log)
enjoy
Yaniv Tzanany
Know your BUGS for Android
ACRA - Know your BUGS.:
easy and simple - android-remote-stacktrace
Android-Error-Reporter
bugsense - https://www.bugsense.com/
easy and simple - android-remote-stacktrace
Android-Error-Reporter
bugsense - https://www.bugsense.com/
Sunday, February 16, 2014
android links stuff
"ToneGenerator " - code that can help how to generate tones
GrepCode: com.android.phone.EmergencyDialer (.java) - Class - Source Code View:
GrepCode: com.android.phone.EmergencyDialer (.java) - Class - Source Code View:
android long press timeout
The default time out is defined by ViewConfiguration.getLongPressTimeout().
You can implement your own long press:
boolean mHasPerformedLongPress;
Runnable mPendingCheckForLongPress;
@Override
public boolean onTouch(final View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_UP:
if (!mHasPerformedLongPress) {
// This is a tap, so remove the longpress check
if (mPendingCheckForLongPress != null) {
v.removeCallbacks(mPendingCheckForLongPress);
}
// v.performClick();
}
break;
case MotionEvent.ACTION_DOWN:
if( mPendingCheckForLongPress == null) {
mPendingCheckForLongPress = new Runnable() {
public void run() {
//do your job
}
};
}
mHasPerformedLongPress = false;
v.postDelayed(mPendingCheckForLongPress, ViewConfiguration.getLongPressTimeout());
break;
case MotionEvent.ACTION_MOVE:
final int x = (int) event.getX();
final int y = (int) event.getY();
// Be lenient about moving outside of buttons
int slop = ViewConfiguration.get(v.getContext()).getScaledTouchSlop();
if ((x < 0 - slop) || (x >= v.getWidth() + slop) ||
(y < 0 - slop) || (y >= v.getHeight() + slop)) {
if (mPendingCheckForLongPress != null) {
v. removeCallbacks(mPendingCheckForLongPress);
}
}
break;
default:
return false;
}
return false;
}
You can implement your own long press:
boolean mHasPerformedLongPress;
Runnable mPendingCheckForLongPress;
@Override
public boolean onTouch(final View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_UP:
if (!mHasPerformedLongPress) {
// This is a tap, so remove the longpress check
if (mPendingCheckForLongPress != null) {
v.removeCallbacks(mPendingCheckForLongPress);
}
// v.performClick();
}
break;
case MotionEvent.ACTION_DOWN:
if( mPendingCheckForLongPress == null) {
mPendingCheckForLongPress = new Runnable() {
public void run() {
//do your job
}
};
}
mHasPerformedLongPress = false;
v.postDelayed(mPendingCheckForLongPress, ViewConfiguration.getLongPressTimeout());
break;
case MotionEvent.ACTION_MOVE:
final int x = (int) event.getX();
final int y = (int) event.getY();
// Be lenient about moving outside of buttons
int slop = ViewConfiguration.get(v.getContext()).getScaledTouchSlop();
if ((x < 0 - slop) || (x >= v.getWidth() + slop) ||
(y < 0 - slop) || (y >= v.getHeight() + slop)) {
if (mPendingCheckForLongPress != null) {
v. removeCallbacks(mPendingCheckForLongPress);
}
}
break;
default:
return false;
}
return false;
}
Search for Patent
here are some links to search for Patent
http://patentscope.wipo.int/search/en/search.jsf
http://www.new-tone.co.il/
http://www.google.com/patents
http://worldwide.espacenet.com/advancedSearch?locale=en_EP
http://patft.uspto.gov/
http://patentscope.wipo.int/search/en/search.jsf
http://www.new-tone.co.il/
http://www.google.com/patents
http://worldwide.espacenet.com/advancedSearch?locale=en_EP
http://patft.uspto.gov/
good luck
yaniv tzanany
Saturday, February 15, 2014
View source from odex file
copy the framework directory from the android you get the odex file.
open cmd - and run the next commnads
cd D:\MyStuff\Android\odex_deodex
java -jar baksmali-2.0.2.jar -d D:\MyStuff\Android\odex_deodex\l5-framework -x d:\temp\YouTube.odex
the generated file go-to out folder by default.
now lets convert the out folder to dex file :
java -jar smali-2.0.2.jar -o classes.dex out
use dex2jar file to create jar file
d2j-dex2jar.bat D:\MyStuff\Android\odex_deodex\classes.dex
this will generate classes-dex2jar.jar
open the jar file via jd-gui program
jd-gui.exe and choose the jar file classes-dex2jar.jar
and you can see the code !!!
helpful links
http://madteam.co/forum/tutorials/how-to-deodex-an-odex-file/
http://javakorea.blogspot.co.il/2013/09/odex-decompilation.html
http://forum.xda-developers.com/showthread.php?t=2345435
- /system/framweork copy to D:\MyStuff\Android\odex_deodex\l5-framework
open cmd - and run the next commnads
cd D:\MyStuff\Android\odex_deodex
java -jar baksmali-2.0.2.jar -d D:\MyStuff\Android\odex_deodex\l5-framework -x d:\temp\YouTube.odex
the generated file go-to out folder by default.
now lets convert the out folder to dex file :
java -jar smali-2.0.2.jar -o classes.dex out
use dex2jar file to create jar file
d2j-dex2jar.bat D:\MyStuff\Android\odex_deodex\classes.dex
this will generate classes-dex2jar.jar
open the jar file via jd-gui program
jd-gui.exe and choose the jar file classes-dex2jar.jar
and you can see the code !!!
helpful links
http://madteam.co/forum/tutorials/how-to-deodex-an-odex-file/
http://javakorea.blogspot.co.il/2013/09/odex-decompilation.html
http://forum.xda-developers.com/showthread.php?t=2345435
decompile & disassemble APKs - ROM changes
[TOOL] APK_OneClick - decompile & disassemble APKs - xda-developers: "A tool package to decompile & disassemble APKs (android packages)."
some info how to make ROM changes (e.g CHANGING HARD KEY FUNCTION (REMAPPING BUTTON)
http://forum.xda-developers.com/showthread.php?t=1801690 - in the bottom.
http://forum.xda-developers.com/showthread.php?t=1908063
deodexing system/framework folder
understanding-the-dalvik-bytecode-with-the-dedexer-tool
hacking-for-fun-and-profit
Tutorial: Reverse Engineering Android Apps
give basics to manually deodex and odexing back framework and apk files
another good one :
BEGINNER'S GUIDE TO SMALI CODING OF SYSTEMUI
some info how to make ROM changes (e.g CHANGING HARD KEY FUNCTION (REMAPPING BUTTON)
http://forum.xda-developers.com/showthread.php?t=1801690 - in the bottom.
Basic and Intermediate Development Guides (For Interested Devs) COLLECTION
http://forum.xda-developers.com/showthread.php?t=1908063
deodexing system/framework folder
understanding-the-dalvik-bytecode-with-the-dedexer-tool
hacking-for-fun-and-profit
Tutorial: Reverse Engineering Android Apps
give basics to manually deodex and odexing back framework and apk files
another good one :
BEGINNER'S GUIDE TO SMALI CODING OF SYSTEMUI
Monday, February 10, 2014
Multi-touch in Android 2
very good tutorial for image - How to use Multi-touch in Android 2 | ZDNet:
here is a sample how to detect clicks
http://stackoverflow.com/questions/11374444/clicklistener-and-longclicklistener-on-the-same-button
nice thread - Multi-touch with multiple buttons is supported at Android 3.0 (google allow multitouch to go the multiple views) .
SDK :
Handling Multi-Touch Gestures
another good tutorial Handling single and multi touch on Android- Tutorial
sample - Touch handling in Android
enjoy
Yaniv Tzanany
here is a sample how to detect clicks
http://stackoverflow.com/questions/11374444/clicklistener-and-longclicklistener-on-the-same-button
nice thread - Multi-touch with multiple buttons is supported at Android 3.0 (google allow multitouch to go the multiple views) .
SDK :
Handling Multi-Touch Gestures
another good tutorial Handling single and multi touch on Android- Tutorial
sample - Touch handling in Android
enjoy
Yaniv Tzanany
Subscribe to:
Posts (Atom)