I'm trying to compile AOSP with a custom bootanimation, but with no success. And I just have run out of approaches... To change bootanimation, I've already done:
created a .zip file with the following structure:
bootanimation.zip {
desc.txt
part0 {
000.png, 001.png, ... ..., 010.png
}
part1 {
011.png, 012.png, ... ..., 021.png
}
}
edited permissions on system/core/include/private/android_filesystem_config.h
placed the bootanimation.zip file in /system/media/
However, when Android boots up, it just shows the Google trademark, skipping the boot animation. Can someone point what I'm missing?
PS: I'm successfully compiling AOSP. It boots up with all features ok. My problem is only with bootanimation customization on the compiled project.
Ok. I've solved my problem.
The issue was that besides all the things I've done, the bootanimation.zip file MUST be compressed with store method.
#mthama writes:
Ok. I've solved my problem. The issue was that besides all the things I've done, the bootanimation.zip file MUST be compressed with store method.
The solution is to not use any compression when packing the archive. This can be achieved on Linux with the following command:
zip -0r bootanimation.zip desc.txt part0 part1
The -0 option says to not use any compression and the -r option says to include contents of part0 and part1 recursively.
There are also ways doing this with a graphical interface, e.g. with 7-Zip as shown in this answer: https://superuser.com/a/337087/295453
Related
I have installed QPython in my Android mobile.
I written a statement in the QEdit to read a text file from the below path
/storage/emulated/0/com.hipipal.qpyplus/script3/File1.txt
I used the below statement
fob=open('/storage/emulated/0/com.hipipal.qpyplus/script3/File1.txt','r')
fob.read()
If I run the statement, it is throwing error as:
IOError:[Errno 2] No such file or directory: '/storage/emulated/0/com.hipipal.qpyplus/script3/File1.txt'
1|uo_a116#cancro:/ $
Is the above statement correct?
fob=open('File1.txt','r')
Is not working in version 1.0.4.
fout=open('File2.txt','w')
Was working on version 0.9.6, but is not working in 1.0.4.
The "error" is Read only file system.
It looks like restrictions in the (new 1.0.4) file system library. I post a mail to the editor, but no answer at this time.
For testing, try to write absolute path to your files pointing, for example, to sdcard (/sdcard/out.txt).
I had problems on this versions (>=1.0.4) because launch process of script changes and execution directory is not the same as script directory.
I had to change my scripts to point to absolute paths.
It was tested with qpython developer.
Check this link:
https://github.com/qpython-android/qpython.org/issues/48
You can also try as simple as:
fob=open('File1.txt','r')
fob.read()
Just if the script is in the same folder of the file.
You can change the current working directory to path with script before read file:
import os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
I have small problem with displaying cyrillic app name on PlayBook and BB10 simulator. Looks like it's incorrectly encoded from russian.
Problem appeared after updating bb eclipse plugin from version 1.3 to 1.5, with plugin v.1.3 it worked just ok.
I'll appreciate any help or ideas.
Here is screenshot from bb10 simulator:
I found workaround myself.
When I got problems with encodding with bb eclipse plugin, I decided to do the same thing with comandline tools.
After tools setup (sing keys, debug tokens, etc), I've tried to repackage my apk file with this command (source apk file was in apk/ folder and destination for bar file was bar/ folder)
./apk2bar apk/ -d bbplaybookdebugtoken.bar -t bar/ -a "zasadnyy" -cg
When I've got .bar file, I've installed it with command:
/batchbar-deploy bar/ 192.168.1.35 mysecretpass
Unfortunatelly result was unsuccsessful, app name was incorrectly encoded again. After first fail I've read documentation a bit more and tried to use this approach: http://developer.blackberry.com/android/documentation/creating_a_custom_manifest_file_2016828_11.htm...
When I unzipped bar file and opened MANIFEST.MS - I've found this line:
Application-Name: –ì–µ—Ä–æ–∏
According to documentation solution should be quite strainforward:
1. Rename MANIFEST.MS to <you apk name>.mf
2. Update incorrect properties, in my case I've changed line from above to "Application-Name: Герои"
3. Put edited manifest file in the same folder as <your apk name>.apk and rerun apk2bar tool with **-m** parameter, e.g.:
./apk2bar apk/ -d bbplaybookdebugtoken.bar -t bar/ -a "zasadnyy" -m -cg
Repackage, deploy, run and ..... and again FAIL. Application name was "–ì–µ—Ä–æ–∏".
After second fail, I decided to make dirty hack, I've edited MANIFEST.MF directly in repackaged bar file (Unzip -> edit manifest -> zip -> change file extension to .bar).
Deploy updated .bar file to playbook and .... YEAH, we've got cyrilic app name!
Conclusion and FIX:
Looks like in 1.5 release if apk2bar tool manifest encoding is misconfigured (in ver. 1.3 it worked just ok)
In oder to FIX issue: Unzip unsigned bar file -> edit manifest -> zip -> change file extension back to .bar
I had the same problem I believe, but the symptoms have been different. I was not even able to install the app on my test device and explicitly running blackberry-signer -verify confronted me with the Invalid signature file digest for Manifest. error.
The MANIFEST.MF file seems to be properly encoded in utf-8 by the apk2bar tool, but the following signing process seems to read this using the platform's default encoding. I added the following java parameter to the blackberry-signer.bat as well as the apk2bar.bat batch file scripts of the command line tools to make it work properly:
-Dfile-encoding=utf-8
(This is for version 1.5.2 of the tools)
I'm trying out a sample JNI program but am unable to get the javah
tool to work. I have 1 source file, Nativejni.java in C:\Workspace\VideoRecorder\src\org\ccb\wifo\video\Nativejni.java.
org.ccb.wifo.video is the name of the package.I have compiled and got a class file in the src directory.And for generating header file I have tried like below
C:\Workaspace\VideoRecorder\bin>javah -jni org.ccb.wifo.video.Nativejni
But I got an error like .
**error: cannot access org.ccb.wifo.video.Nativejni
class file for org.ccb.wifo.video.Nativejni not found
javadoc: error - Class org.ccb.wifo.video.Nativejni not found.
Error: No classes were specified on the command line. Try -help.**
I have googled a lot and tried the solutions found there. But no use.
Please help me.
There could be a lot of reasons for it. Mainly to do with -classpath. If you don't want to fiddle around with changing of classpath manually, you can do it while compiling in the console.
javah -d /dir/where/output/generated -classpath ;<absolute path to the /bin/classes> <package name>
1) Remember that ";" is important as it appends the path provided by you to the already existing one.
2) Be careful with slashes (Linux = / and for Windows = ).
3)I suppose you understand what I mean by absolute path.
I wasted like 3 hours on this. It has been due to some sort of java directory issues or what. Anyways this is how i did it.
Open command line. Go to the exact folder where .java class is located. go there and execute command
javac HelloWorld.java
then go back to the folder containing the complete package. There type this statement for generating the header file from the class file. The directory must be like in my case the whole package was in Java directory file so i went back there and typed the following command.
javah -jni com.example.aliabbasjaffri.temporary.HelloWorld
Voila, Header file at your service.
You have to enter classpath, Please try this,
Javah - jni -classpath C:\Workspace\VideoRecorder\src\ org.ccb.wifo.video.Nativejni
Currently I am trying to get tesseract android tools
http://code.google.com/p/tesseract-android-tools/
to work for me on Android. I have been going at this for about a week to no avail.
I am running Win 7 64 bit with cygwin.
I followed the instructions in the readme file and made many changes to the Android.mk files. Basically it was appending a slash to the path, so I had to manually hard code the paths of the individual files, or move to location of the files within the 3 packages to get it to build. However at the end of the build, I did not recieve a "Build Sucessful" notice, but the .so files were generated.
I ported it to eclipse as is and used the following code to get the extracted text.
private static final String TESSBASE_PATH = "/mnt/sdcard/";
Bitmap imageFile = BitmapFactory.decodeFile(image.getAbsolutePath());
TessBaseAPI baseApi = new TessBaseAPI();
if(baseApi.init(TESSBASE_PATH, "eng")){
System.out.println("Tessbase initialized");
baseApi.setDebug(true);
baseApi.setImage(bmp);
String recognizedText = baseApi.getUTF8Text();
System.out.println("---------------------output-------------------");
System.out.println("recognizedText<"+recognizedText+">");
}
else{
System.out.println("Tessbase initialization failure.");
}
At first I was getting an error saying
"Bitmap functions not available; library must be compiled under android-8 NDK"
After taking a look at the tessbaseapi.cpp file I realized that it needed a specific compiler flag to compile the correct function. This flag was -DHAS_JNIGRAPHICS. What I think this means is that the JNI Graphics library must be present.
Yet the program still wouldn't compile because the memcpy() function in the newly compiled method could not be found. I fixed this by changing the actual C++ code to include
Finally the program compiled fully (still wasn't getting a BUILD SUCCESSFUL notice though) and when I ran it, I did not get any output at all. This could be a problem with the eng.traineddata file, or could be a problem in the actual code.
Is there anything I have done wrong? Can someone link me to and eng.traineddata file that they know works and image that works with it?
Thanks in advance!
It's been a few months since you posted this question, however if you're still looking for answers I would seriously recommend that you have a look at the tess-two project on github.
Whilst this won't solve the error that you've posted, its a tactical work around/alternate solution.
It's a fork of tesseract-android-tools and is incredibly easy to use, you'll have it up and running within the hour.
If you're getting poor results, make sure that traineddata file is there, use DDMS file explorer to check its there and not 0 bytes (that happened to me a few times).
Also, make sure you set the whitelist and blacklist characters, this will improve results very well.
Good luck
I want to save a log of method calls.
Traceview supports that function and I can get .trace file format.
but, I need to open .trace file format without DDMS.
If I can't open .trace file without DDMS, How can I get a log of method calls?
(The best is .txt file format.)
thanks.
It is an old thread.
because I found here, so other guys may need this, too.
Try this:
traceview -r yourtrace.trace > 1.txt
and look 1.txt has any useful thing to u.
"traceview" is a command-line utility. You don't need to launch it from DDMS.
If you just want a text file with times and message names, you can use "dmtracedump -o file.trace".
Well for one, you should just use DDMS it's very simple to work with. Even if you don't have eclipse you can use the one that shipped with the SDK. However, if you already have access to the tracefile.trace then you could simply use Traceview from the SDK. Simply open your command prompt and navigate to your android SDK/tools directory as such: cd C:\Program Files\Android\android-sdk\tools. Once there simply type traceview followed by the filename (can omit .trace) as such: traceview C:\Users\Sino\Desktop\Janky_trace_file. This should open your trace file in a GUI representation with functionality to delve into your method calls.
This is simple.
Eclipse: File --> Open file --> open traveview file (xxxx.trace)
If you have a ".trace" file, just use "traceview " from the command line and you should be able to view the content of the file.
You can generate various graphs with the existing .trace file using the command line tool "dmtracedump". http://developer.android.com/tools/help/dmtracedump.html.