Comments (12)
love this project. this app would be one of my most important, if aapt is
integrated! but good work so far!
Original comment by [email protected]
on 7 Jun 2011 at 10:14
from java-ide-droid.
I have made a first little NDK demo:
(see HelloAndroid_NDK in Downloads)
Now, I'll look into that aapt lib!
Original comment by [email protected]
on 9 Jun 2011 at 9:48
from java-ide-droid.
Hmm... the look at the aapt code confirms that my C/C++ is too limited to
handle this properly :-(
- How do we redirect stdout / stderr to a string? Do we need to replace all
fprintf with sprintf or is there a better way?
- Is there a dynamically growing buffer in C++ like Java's StringBuffer?
If not, we'll need to check for buffer overflows
- aapt depends on external libs like expat and zlib.
Do we need to port them all or are they already available on the Android device?
- Can we return more than 1 value from the JNI method?
I would like to return an errorcode (int), the stderr string and the stdout string
Here's the link to the source code:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=tools/aap
t;h=89c06bbbe971d68486c39fa2ef5000399032f1e9;hb=HEAD
Original comment by [email protected]
on 10 Jun 2011 at 6:01
from java-ide-droid.
it's very much easier, if we write an own aap-part in java, not?
is there a method to create R.java manually?
what are the other things, that aapt has to do?
Original comment by [email protected]
on 10 Jun 2011 at 9:17
from java-ide-droid.
I have also thought about porting aapt to Java, but thought it more complicated
than doing the native lib.
> what are the other things, that aapt has to do?
* appt creates the R.java
this is probably not very difficult
* It compiles resources, mainly (only?) xml files into a binary format.
I have no idea how this is done exactly. We'd have to check the source for this.
* It also does something with the images
it seems it only optimizes them, because the images inside an APK can still be
viewed with an image viewer.
* It creates an APK file with the compiled resources, images and raw
(unchanged)
items (e.g. html files) in it.
This is an easy thing, because an APK file is just a ZIP file.
If we were to port aapt to Java, I would recommend to integrate the apkbuilder
as well, because in JavaIDEdroid the apkbuilder also does not do much else than
adding items to the APK file. It adds the classes.dex and further items like
jar files, native libs, raw resources, etc. On Windows, apkbuilder also signs
the APK, but this does not work in JavaIDEdroid where the signing is done with
the ZipSigner lib.
Tom
Original comment by [email protected]
on 10 Jun 2011 at 10:40
from java-ide-droid.
[deleted comment]
from java-ide-droid.
Tom, i have downloaded aapt source and will try and look at it to night, do you
have some sample arguments that are passed to aapt? I will need them to test it.
I already have zlib ported to android i have not heard of the other, but if its
already in c it should be straight forward.
As for returning more then one variable no u can not. Its like any function
only one variable at a time. Granted u could return a string[] holding your
values. But in this case it would probably be better just to print the values
out to the logcat while in c then pass them back to java.
As for a dynamic array the best for this in c is a Vector of strings.
Original comment by [email protected]
on 10 Jun 2011 at 5:43
from java-ide-droid.
Download the sample app HelloAndroid_1-0.zip from the download area.
There, you'll the aapt.bat which we want to replace with the aapt module and a
aapt.bsh BeanShell script.
>As for returning more then one variable no u can not.
I once made a JNI program for Window Mobile. There, I returned an integer and
wrote the error message from the JNI program directly back into a public String
of the Java program. This is probably not a very clean way, but would it work?
Tom
Original comment by [email protected]
on 10 Jun 2011 at 7:10
from java-ide-droid.
I have added the aapt source files and the source files of the external libs
for aapt to the SVN.
I have created a shared lib for zlib but when I wanted to compile libpng (which
needs zlib) zlib was not found.
Maybe I need to make a static library for zlib (instead of a shared lib) and
then add this static lib to the Android.mk of libpng?
Tom
Original comment by [email protected]
on 20 Jul 2011 at 9:18
from java-ide-droid.
[deleted comment]
from java-ide-droid.
I have built aapt and all its depending libraries as an Android >=2.3 ARM
console application!
The complete aapt package can be downloaded separately from the SVN:
svn/trunk/jni/materials/aapt-port-android_1-0-0.zip
Can someone with a rooted device please test this executable?
My device is not rooted, and it is still 2.2.1, so I cannot test myself.
Thanks
Tom
Original comment by [email protected]
on 16 Aug 2011 at 2:12
from java-ide-droid.
aapt has been integrated in version 1.0.0
Original comment by [email protected]
on 22 Aug 2011 at 7:04
- Changed state: Done
from java-ide-droid.
Related Issues (20)
- [deleted issue]
- Add Intent RUN_SCRIPT HOT 1
- Log output HOT 2
- Option for default directory HOT 2
- Option for android.jar HOT 2
- Option for custom variables HOT 2
- Add support for opening text/x-beanshell files. HOT 3
- Editing .bsh files with TextWarrior makes Beanshell sad HOT 4
- Project support HOT 4
- File manager HOT 3
- Out-of-memory condition when running dx on large projects HOT 6
- New features for javaIDEdroid PRO HOT 3
- Editor HOT 3
- aidl utility could be included HOT 5
- enable "move to SD card" HOT 1
- resizing the main IDE view to optimize the output textview HOT 5
- Aapt does not work on android 1.5 HOT 2
- plz, provide an .apk for those, that do not have google play market HOT 1
- Internal "Eclipse" compilation error since Android 4 HOT 1
- Choosing Install APK option throws There Is A Problem Parsing the Package error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-ide-droid.