Wednesday, February 5, 2014

After proguard program flash back


            
Apk package generated by proguard file, run the program after installing the flash back, do not know how to debug, apk file is usually installed inside the debug how the same as the eclipse debug it?
Reply:
Local reflex mechanisms do not need to confuse

Some source, are more classic, well I actually come up and share it.


            
Android did nearly a year, and a lot of contact with the source, and he wrote and turn a lot.
Stickers come out and share. All through my hands turn over. There are still a few items from his past, hoping to help the novice everyone.
1 Music fast shear
Can be used for listening to music and some music or ringtones cut, re-cut to save up a good tone.
http://download.csdn.net/detail/peijiangping1989/3583326
2 Snake
You know. .
http://download.csdn.net/detail/peijiangping1989/3568384
3 game performance test
Not described. . Tired.
http://download.csdn.net/detail/peijiangping1989/3583464
4 compass
http://download.csdn.net/detail/peijiangping1989/3583466
5 Weather Forecast
http://download.csdn.net/detail/peijiangping1989/3583473
6 Quick setter
Set point settings and so convenient.
http://download.csdn.net/detail/peijiangping1989/3583476
7 My notes
Is a notebook. .
http://download.csdn.net/detail/peijiangping1989/3583502
8 Password Manager
Password management a horse of God. . .
http://download.csdn.net/detail/peijiangping1989/3583511
9 ringtones expand plug-
A ring setting plugin. Wood has the main interface,
http://download.csdn.net/detail/peijiangping1989/3583516
10. Lianliankan
My onepiece. . . Pictures have changed. . .
http://download.csdn.net/detail/peijiangping1989/3583525
11 Crazy ball
Ball games, gravity sensing God horses. You play the know. .
http://download.csdn.net/detail/peijiangping1989/3583528
12 ultra shortcut
The main function is to set up a shortcut on the desktop. Ma also features some God forgotten. .
http://download.csdn.net/detail/peijiangping1989/3583528
13 Battery Management
Some battery management settings, saving power of God horses. .
http://download.csdn.net/detail/peijiangping1989/3583539
14. Divide and rule
Really fun game
http://download.csdn.net/detail/peijiangping1989/3583542
15 Super books
This application is very boring. .
http://download.csdn.net/detail/peijiangping1989/3583549
16 Super secretary
This is your primary three. .
http://download.csdn.net/detail/peijiangping1989/3583554
17. Translation software
Well that was using the google translation interface, translation pretty sharp. .
http://download.csdn.net/detail/peijiangping1989/3583559
18. Notes
Very practical
http://download.csdn.net/detail/peijiangping1989/3583565
19 Smart Wireless
Some wireless smart set
http://download.csdn.net/detail/peijiangping1989/3583574
20. Tired the next recurrence. . Ready to eat

Hope that we can improve on these applications. There is a relatively large number of source-source projects. Consider again or not made. There is a need to mail me
peijiangping1989@163.com. believe that as long as we work together to share resources, can quickly progress. Oh. Download classmates remember Replies rated horse of God. Thank you, oh.
Reply:
Very good, if not the resources of the better wow, even my whole lower division multiple
Reply:
Besides first collection
Reply:
Good thing I like! ! !
Reply:
Under the two really good, I came home from work the next
Reply:
Good. Thank you
Reply:
Landlord can not sub ah, no points, and can not under
Reply:
Good stuff thank

Reply:
Very good, if not the resources of the better wow, even my whole lower division multiple
Reply:
Good things, good, look down
Reply:
Thank you! Good thing ah

Reply:

Reply:
Leaving in coming.
Reply:
cited a floor yiyaaixuexi reply:
very good, if not to the resources of the better wow, even my whole lower division multiple
< / fieldset>
Reply:
I now do not look, do not give points, ha ha
Reply:
Android did nearly a year, and a lot of contact with the source, and he wrote and turn a lot.
Stickers come out and share. All through my hands turn over. There are still a few items from his past, hoping to help the novice everyone.
A music fast shear
Reply:
Collect them slowly down .. no points ah .. Nana ..
Reply:
Good stuff, nice wanted to learn, the first collection
Reply:
The landlord is a good man
Reply:
If not enough resource points, ah, I'm not much of the resources of their own
Reply:
Under no points ah poor people can not afford to
Reply:
Nima ad blocking the collection can not. .
Reply:
The reply was deleted at 2011-09-08 17:31:56 moderator

Reply:
Considered open it
Reply:
mark
Reply:
Strong posts MARK
Reply:
Well, yes
However, I learned a j2ee

Reply:
Look first ~ ~
Reply:
You also reviewed the chapter you ah. No points no limits, can be registered under one account, it is not my intention, I want to lower off, so the addition of points. You really really wanted to resources can send me mail want.
Reply:
Open source also points? ? ? ? ?
Reply:
kankan xian
Reply:
kankan xian
Reply:
Full under wood there! Division Multiple
Reply:
.....
Reply:
First collection, it is estimated future use of the! ! !
Reply:
Did not toss over this stuff ~ ~ ~ ~
Reply:
Look first ~ ~
Reply:
After the first and then the next collection of useful
Reply:
My first collection, Kazakhstan
Reply:
Good stuff ~ ~ ~
Reply:
SC first collection
Reply:
Thank you, ah collection
Reply:
Top, although I do not learn this. Willing to share it in itself is commendable! ! !
Reply:
Under a
Reply:
I have to go down the years, the first collection
Reply:
kankan
Reply:
reference to the 6th floor maluyuan123 reply:
landlord can not sub ah, no points, and not under


Did not know so many people saying CSDN download to comment, a review can not comment what it a few weeks, bring the stars of resource downloaded immediately comment back, have a lot of one point.
Reply:
Good collection to multi-dotted
Reply:
cited 46 floor qq532805390 reply:
reference to the 6th floor maluyuan123 reply:
Landlord can not sub ah, no points, and not under


Did not know so many people saying CSDN download to comment, a review can not comment what it a few weeks, bring the stars of resource downloaded immediately comment back, have a lot of one point.


Now how to download one hour before you can comment ah ......
Reply:
I also started to learn android, this time just to see the code.
Want by writing a small application to learn.
Reply:
Collection. . .
Reply:
Well I did the first collection of resource
Reply:
I did not afford the first collection points under the bar will have the opportunity to learn
Reply:
Feeling advertise suspects ah, Oh, but the landlord still hard, when needed next.
Reply:
How much wood sub-
Reply:
Landlord good, praise!
Reply:
Amount, not interested. . . . .
Reply:
First look
Reply:
First look
Reply:
Since it is a classic, to support it.
Reply:
MARK look
Reply:
7 My notes
Is a notebook. .
http://download.csdn.net/detail/peijiangping1989/3583502
8 Password Manager
Password management a horse of God. . .
http://download.csdn.net/detail/peijiangping1989/3583511
9 ringtones expand plug-
A ring setting plugin. Wood has the main interface,
http://download.csdn.net/detail/peijiangping1989/3583516
10. Lianliankan
My onepiece. . . Pictures have changed. . .
http://download.csdn.net/detail/peijiangping1989/3583525
11 Crazy ball
Ball games, gravity sensing God horses. You play the know. .
http://download.csdn.net/detail/peijiangping1989/3583528
12 ultra shortcut
The main function is to set up a shortcut on the desktop. Ma also features some God forgotten. .
http://download.csdn.net/detail/peijiangping1989/3583528
13 Battery Management
Some battery management settings, saving power of God horses. .
http://download.csdn.net/detail/peijiangping1989/3583539
14. Divide and rule
Really fun game
http://download.csdn.net/detail/peijiangping1989/3583542
15 Super books
This application is very boring. .
http://download.csdn.net/detail/peijiangping1989/3583549
16 Super secretary
This is your primary three. .
http://download.csdn.net/detail/peijiangping1989/3583554
17. Translation software
Well that was using the google translation interface, translation pretty sharp. .
http://download.csdn.net/detail/peijiangping1989/3583559
18. Notes
Very practical
http://download.csdn.net/detail/peijiangping1989/3583565
19 Smart Wireless
Some wireless smart set
http://download.csdn.net/detail/peijiangping1989/3583574

Reply:
Thank you to share, learn! ! !
Reply:
Take a look ~
Reply:
First collection together! Slowly look
Reply:
First collection together! Slowly look
Reply:
Landlord hard,
Reply:
Thanks for sharing.
Reply:
Thank you, the landlord, the first collection!
Reply:
Which prawn download please pass me a copy of it ~ ~ I do not have scores of farmers
Reply:
Collected. . . . .
Reply:
No points, partakers tap did not reflect, in points, of no more ~ ​​~ ~ ~ ~ ~ ~
Reply:
Oh, very good stuff, all under Kazakhstan,
The landlord, on the big points you say the project source also interested, jib20000@163.com, mail to me
Reply:
The reply was deleted at the moderator 2011-09-09 10:49:50

Reply:
Really good.
Reply:
Andrews saw three things are all directly Pass
Reply:
Good stuff, mark it, next time ~
Reply:
Worth collecting
Reply:
Support Support. . . .
Reply:
Yes, to learn
Reply:
First collection
Reply:
Collection, oh no points, later next!
Reply:
mark, will be used in the future
Reply:
Nice idea. Is to point oh. I hope the landlord to share!
Reply:
Unfortunately, not enough points
Reply:

Reply:
LZ did not take advantage before the return, and quickly collections
Reply:
Leave a name Top
Reply:
Source landlord good ah!
Reply:
Landlord admirable spirit.
Reply:

Reply:
mark, spare
Reply:
Learning access points

Reply:
Good things have to top up ~
Reply:
Storage!
Reply:
Good things
Thank landlord

Reply:
Learn about.
Reply:
Android pricey treatment should do it?
Reply:
mark
Reply:
The next one, read, if it is placed on the product, not the effect you experience some are rough realization did not consider a lot of details, a lot of work is needed to detail
Reply:
First collection again

WIFI connection problems on android


            
AP WifiManager connection with conventional access points, found below the 4.1 version of the system can be connected to get on, such as Samsung i9300, HTC G7, Meizu two systems do not have to upgrade to 4.2 < / span>, and some cottage can also be made, but the same APK, put Samsung GS4, Meizu 4.2 system upgrade to 2, life and death is not connected WIFI,
PS: After seemingly open the drive, the system is connected directly to the default AP to go, do not know if there are wood predecessors encountered such a problem, or give a WIFI connection of Demo Samsung G4 line ah, Guixie it.
Reply:
Nobody, and, knot paste forget,

About Android ffmpeg problem? ? Ask you seniors! ! ! ! ! ! ! ! ! ! !


            
Methods used cygwin + ndk-r9 + xp + ffmpeg0.9.3
Reference http://zzhhui.blog.sohu.com/244819188.html compiled static library methods, I finally compiled a
in XPlibavcodec.a, libavformat.a, libavutil.a, libpostproc.a, libswscale.a and libffmpeg.so

Then referring to
https://github.com/churnlabs/android-ffmpeg-sample method to establish engineering

Works as follows


Android.mk file looks

LOCAL_PATH: = $ (call my-dir)

include $ (CLEAR_VARS)

LOCAL_MODULE: = ffmpeg
LOCAL_SRC_FILES: = native.c

LOCAL_C_INCLUDES: = $ (LOCAL_PATH) / include
LOCAL_LDLIBS: =-L $ (NDK_PLATFORMS_ROOT) / $ (TARGET_PLATFORM) / arch-arm/usr/lib-L $ (LOCAL_PATH)-lavformat-lavcodec-lpostproc-lavutil-lswscale-llog-ljnigraphics-lz-ldl-lgcc

include $ (BUILD_SHARED_LIBRARY)

native.c following documents

void Java_cn_ct_rtmpdemo_MainActivity_openFile (JNIEnv * env, jobject this)
{
int ret;
int err;
int i;
AVCodec * pCodec;
uint8_t * buffer;
int numBytes;

avcodec_init ();
av_register_all ();
avformat_network_init ();
LOGE ("Registered formats");
err = av_open_input_file (& pFormatCtx, "rtmp :/ / 202.64.87.58/e/855crovd1", NULL, 0, NULL);
LOGE ("Called open file");
if (err! = 0) {
LOGE ("Couldn't open file");
return;
}
LOGE ("Opened file");

if (av_find_stream_info (pFormatCtx) <0) {
LOGE ("Unable to get stream info");
return;
}

videoStream = -1;
for (i = 0; i nb_streams; i + +) {/ / AVMEDIA_TYPE_VIDEO
/ / If (pFormatCtx-> streams [i] -> codec-> codec_type == CODEC_TYPE_VIDEO) {
if (pFormatCtx-> streams [i] -> codec-> codec_type == AVMEDIA_TYPE_VIDEO) {
videoStream = i;
break;
}
}
if (videoStream == -1) {
LOGE ("Unable to find video stream"); ​​
return;
}

LOGI ("Video stream is [% d]", videoStream);

pCodecCtx = pFormatCtx-> streams [videoStream] -> codec;

pCodec = avcodec_find_decoder (pCodecCtx-> codec_id);
if (pCodec == NULL) {
LOGE ("Unsupported codec");
return;
}

if (avcodec_open (pCodecCtx, pCodec) <0) {
LOGE ("Unable to open codec");
return;
}

pFrame = avcodec_alloc_frame ();
pFrameRGB = avcodec_alloc_frame ();
LOGI ("Video size is [% d x% d]", pCodecCtx-> width, pCodecCtx-> height);

numBytes = avpicture_get_size (PIX_FMT_RGB24, pCodecCtx-> width, pCodecCtx-> height);
buffer = (uint8_t *) av_malloc (numBytes * sizeof (uint8_t));

avpicture_fill ((AVPicture *) pFrameRGB, buffer, PIX_FMT_RGB24,
pCodecCtx-> width, pCodecCtx-> height);
}

In NDK compile time error
D :/ android-ndk/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6 / .. / .. / .... / / arm-linux-androideabi / bin / ld.exe:. / obj / local / armeabi / objs / ffmpeg / native.o: in function Java_cn_ct_rtmpdemo_MainActivity_openFile: jni / native.c: 119: error: undefined reference to 'avcodec_find_decoder'

Tip avcodec_find_decoder found, but this function in the header file is there, I was not compiled into a static library when a mistake?
Many of the functions FFMPEG prompted to find


Downloaded churnlabs this project can be compiled, read engineering function in my header file is there, can be found ah
Reply:
My configuration is the same path with churnlabs also include the file into your head
Reply:
Why is it I can find but can not find it

Reply:
The strange thing is I put my project JNI delete all folders, then copy churnlabs the JNI folder to the project to modify the look native.c file, NDK compile time or error, the function can not find all the FFMPEG , there is not a project where you want to set, churnlabs can be compiled using the NDK
Reply:
Static files should be the right
Reply:
I was wrong, the churnlabs copied all the JNI directory, refresh the project in compilation is
possibleI may be the problem of static documents it is a step not have any problems compiling
Reply:
Do not know what their predecessors
Reply:
Indeed the problem of static documents, re-edited a bit mk files, compiled static files on it, ndk-build it through,
But av_open_input_file (& pFormatCtx, "rtmp :/ / xxx.xxx.87.58/e/mystream", NULL, 0, NULL);'s return value is always negative, my config.sh file is so

#! / Bin / bash
PREBUILT = $ {NDK_ROOT} / toolchains/arm-linux-androideabi-4.8/prebuilt/windows
PLATFORM = android-18
ARCH = - arch = arm
. / Configure \
$ {ARCH} \
- Target-os = linux - enable-cross-compile - cross-prefix = $ {PREBUILT} / bin/arm-linux-androideabi- \
- Extra-cflags = "-fPIC-DANDROID-std = c99" \
- Enable-version3 \
- Enable-gpl \
- Enable-nonfree \
- Disable-stripping \
- Disable-ffmpeg \
- Disable-ffplay \
- Disable-ffserver \
- Disable-ffprobe \
- Disable-encoders \
- Enable-demuxer = rtsp \
- Disable-devices \
- Enable-protocols \
- Enable-protocol = tcp \
- Enable-avfilter \
- Enable-network \
- Enable-decoder = h264 \
- Disable-avdevice \
- Disable-asm \
- Enable-neon \
- Enable-armv5te \
- Sysinclude = $ {NDK_ROOT} / platforms / $ {PLATFORM} / arch-arm/usr/include \
- Extra-ldflags = "-Wl,-rpath-link = $ {NDK_ROOT} / platforms / $ {PLATFORM} / arch-arm/usr/lib-L $ {NDK_ROOT} / platforms / $ {PLATFORM} / arch- arm / usr / lib-nostdlib $ {NDK_ROOT} / platforms / $ {PLATFORM} / arch-arm/usr/lib/crtbegin_static.o $ {NDK_ROOT} / platforms / $ {PLATFORM} / arch-arm/usr/lib / crtend_android.o-lc-lm-ldl "


I have opened with network protocol ah,. / config.sh when I looked at the prompt
install prefix / usr / local
source path.
C compiler D: \ android-ndk \ android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/bin/arm-linux-androideabi-gcc
ARCH c (generic)
big-endian no
runtime cpu detection no
debug symbols yes
strip symbols no
optimize for size no
optimizations yes
static yes
shared no
postprocessing support yes
new filter support yes
network support no


network support is no not yes
Is there any place to set up, looking ladies to answer, feel CSDN Andrews plate good little man ah
Reply:
The reply was deleted administrator at 2013-09-24 17:01:02

Reply:
av_register_all ();
Tune yet
Reply:
Join in engineering


In addition to directly modify the config.h file with config.mak rtmp protocol network there, all open or set to 1
After compiled into the project
av_open_input_file (& pFormatCtx, "rtmp :/ / xxx.xxx.87.58/e/mystream", NULL, 0, NULL); or wrong, the return value is always -5 but my network video is good, no problems path with other software can see
Reply:
reference to the 9th floor youngc527 reply:
av_register_all ();
Tune yet


av_register_all () ;/ / initialize libavformat and register all the muxers, demuxers and protocols
avformat_network_init ();
LOGE ("Registered formats");
err = avformat_open_input (& pFormatCtx, "rtmp :/ / xxx.xxx.87.58/e/mystream", NULL, NULL);
LOGE ("Called open file");
if (err! = 0) {
LOGE ("Couldn't open file% d", err);
return;
}
LOGE ("Opened file");
Reply:
reference to the 9th floor youngc527 reply:
av_register_all ();
Tune yet

There
callCan open a video file, but can not open the video stream
Reply:
The reply was deleted administrator at 2013-09-25 10:17:04

Reply:
The reply was deleted administrator at 2013-09-26 09:29:48

Reply:
Compile time to join rtmp
Reply:
The reply was deleted administrator at 2013-10-30 08:16:20

Reply:
Problem solved? Recently, I also do this stuff, but I ported the VLC-Android, is now able to play rtmp stream is delayed longer, there are about 5s. We two can exchange. QQ: 56431858

Tuesday, January 28, 2014

Android APK installation will ask for advice to / system / app approach


            
I find a lot of information, with the code to their APK install / system / app project testing needs, so that their service is not
kill off third-party softwareHere is an article http://chongye89.iteye.com/blog/1412488
I tried, but no response do not know what areas need attention
Hope expert guidance or what better way to achieve the effect I want
Thank you
Reply:
Neighborhoods ah have puzzled for a long time
Hope someone pointing pointing thank you
Reply:
Nobody?

Reply:
adb shell ok then.


Direct 1, adb remount
2, adb push XXX.apk (absolute path) / system / app

This can ah.
Reply:
reference to the third floor of the reply:
adb shell ok then.


Direct 1, adb remount
2, adb push XXX.apk (absolute path) / system / app

This can ah.

Do you mean that
1. $ Adb push SecureSetting.apk / sdcard / / / upload files to install, to prepare for the installation.
2. $ Adb shell
3. $ Su / / switch to the root user. If you do not get Root privileges, this step will not be successful.
4. # Mount-o remount, rw-t yaffs2 / dev/block/mtdblock3 / system / / make partition writable.
5. # Cat / sdcard / SecureSetting.apk> / system / app / SecureSetting.apk / / This step can be achieved using cp, but generally not included in the command device. If you are using mv an error: failed on '/ sdcard / NetWork.apk' - Cross-device link.
6. # Mount-o remount, ro-t yaffs2 / dev/block/mtdblock3 / system / / restore partition properties, read-only.
7. # Exit
8. $ Exit
This right is not it?
Reply:
reference to the third floor of the reply:
adb shell ok then.


Direct 1, adb remount
2, adb push XXX.apk (absolute path) / system / app

This can ah.

You mean
1. $ Adb push SecureSetting.apk / sdcard / / / upload files to install, to prepare for the installation.
This wrong?
Reply:
Mainly requires root privileges. . No root does not work
Reply:
references 6th Floor reply:
mainly requires root privileges. . No root does not work

With root privileges phone is that according to the Internet, but I do not know what went wrong it does not respond
Reply:
Well, I posted the code
 
package com.sfer.install;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.OutputStream;

public final class RootCmd {
/ / Execute linux commands and output
protected static String execRootCmd (String paramString) {
String result = "result:";
try {
Process localProcess = Runtime.getRuntime (). Exec ("su") ;/ / Root handled through the android system that is su command
OutputStream localOutputStream = localProcess.getOutputStream ();
DataOutputStream localDataOutputStream = new DataOutputStream (
localOutputStream);
InputStream localInputStream = localProcess.getInputStream ();
DataInputStream localDataInputStream = new DataInputStream (
localInputStream);
String str1 = String.valueOf (paramString);
String str2 = str1 + "\ n";
localDataOutputStream.writeBytes (str2);
localDataOutputStream.flush ();
String str3 = null;
/ / While ((str3 = localDataInputStream.readLine ())! = Null) {
/ / Log.d ("result", str3);
/ /}
localDataOutputStream.writeBytes ("exit \ n");
localDataOutputStream.flush ();
localProcess.waitFor ();
return result;
} Catch (Exception localException) {
localException.printStackTrace ();
return result;
}
}

/ / Run linux command but does not care about the result output
protected static int execRootCmdSilent (String paramString) {
try {
. Process localProcess = Runtime.getRuntime () exec ("su");
Object localObject = localProcess.getOutputStream ();
DataOutputStream localDataOutputStream = new DataOutputStream (
(OutputStream) localObject);
String str = String.valueOf (paramString);
localObject = str + "\ n";
localDataOutputStream.writeBytes ((String) localObject);
localDataOutputStream.flush ();
localDataOutputStream.writeBytes ("exit \ n");
localDataOutputStream.flush ();
localProcess.waitFor ();
int result = localProcess.exitValue ();
return (Integer) result;
} Catch (Exception localException) {
localException.printStackTrace ();
return -1;
}
}

/ / Determine whether the machine Android root, that is, whether to obtain root privileges
protected static boolean haveRoot () {

int i = execRootCmdSilent ("echo test"); / / to detect
by executing the test commandif (i! = -1) {
return true;
}
return false;
}

}

Reply:
 
package com.sfer.install;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;

public class InstallActivity extends Activity {
/ ** Called when the activity is first created. * /
@ Override
public void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.main);
String paramString = "$ adb push MySMS.apk / sdcard /" + "\ n" +
"$ Adb shell" + "\ n" +
"$ Su" + "\ n" +
"# Mount-o remount, rw-t yaffs2 / dev/block/mtdblock3 / system" + "\ n" +
"# Cat / sdcard / MySMS.apk> / system / app / MySMS.apk" + "\ n" +
"# Mount-o remount, ro-t yaffs2 / dev/block/mtdblock3 / system" + "\ n" +
"# Exit" + "\ n" +
"$ Exit";
if (RootCmd.haveRoot ()) {
if (RootCmd.execRootCmdSilent (paramString) == -1) {
Toast.makeText (this, "Installation unsuccessful", Toast.LENGTH_LONG) show ();.
} Else {
Toast.makeText (this, "successful installation", Toast.LENGTH_LONG) show ();.
}
} Else {
. Toast.makeText (this, "without root privileges", Toast.LENGTH_LONG) show ();
}


}
}

Reply:
Your use adb shell line by line execution, which step wrong, Tieshanglai
Reply:
Find a reason in the code execution to be changed so that the string on the line
 
String paramString = "adb push MySMS.apk / system / app" + "\ n" +
"Adb shell" + "\ n" +
"Su" + "\ n" +
"Mount-o remount, rw-t yaffs2 / dev/block/mtdblock3 / system" + "\ n" +
"Cat / sdcard / MySMS.apk> / system / app / MySMS.apk" + "\ n" +
"Mount-o remount, ro-t yaffs2 / dev/block/mtdblock3 / system" + "\ n" +
"Exit" + "\ n" +
"Exit";

Reply:
But now I do not know whether this will succeed, I can only do the test on my phone
Interested parties can get to try to put the code in the code you want to install the APK name to his own need to install the APK into / sdcard what is the root of the problem exchange exchange
Reply:
The reply was deleted at the moderator 2012-08-13 11:30:52

Reply:
The reply was deleted at the moderator 2012-08-13 12:59:14

Reply:
reference to the 12th floor sfer520_1314 reply:
but now I do not know whether this will succeed, I can only do the test on my phone
Interested parties can get to try to put the code in the code you want to install the APK name to his own need to install the APK into / sdcard what is the root of the problem AC AC


My phone was unsuccessful. . You can add my QQ? 231599447
Reply:
LZ I successfully install apk to system / app, but the authority has not changed over the installation by the above code, apk permissions to rw -------
installedIf normal, it should be rw-r - r -, neighborhoods QQ: 263687542
Reply:
Apk successfully installed system / app and change the permissions under, but if the command is wrong, cause Runtime.getRuntime () exec (cmd);. Obstruction, now being addressed
Reply:
Upstairs, is how to solve?
Reply:
Does not have root privileges to push into it
Reply:
cited 19th floor shen332401890 reply:
without root privileges can not be pushed into it

Applications have root privileges, and now is how to copy itself in the past.
Reply:
/ System / bin / sh: cannot create / system / app / fruit.apk: Permission denied
Reply:
This post is good, my experiment has succeeded. Upstairs chmod 777 system

Fail to connect to camera service


            
Solving.
I do automatically take pictures and get recognition.
Turn off then turn on each release has this problem. Has not been resolved. (Closed code execution, or has this problem when opening.)
The camera can not restart the service on or off camera is turned on.
Reply:
First Determine whether you look at your apk are so many loom, such as the Samsung htc try try try to get different models
Exclude individual platform issues


Second, you have release
Determine whether your code logic problem.
Reply:
This model is a special case of the problem in addition to outside, that you did not release a success.
Reply:
AF solve it removed

android play video! Urgent! ! ! !


 package com.cn; 

import android.app.Activity;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;

/ **
* @ Description achieve their players
by SurfaceView / SurfaceHolder* @ Description here about the supplement, we can add OnPreparedListener
by mediaplayer* And OnCompletionListener and other events to play and ready to play after the completion of the operation control.
* When using SurfaceView and SurfaceHolder video playback, the structure is such that:
* 1, first of all, we get a surfaceView
from layout file* 2, to obtain the corresponding surfaceHolder
container think through surfaceView.getHolder () method* 3, srufaceHolder some default settings, such as addCallback () and setType ()
* 4 through mediaPlayer.setDisplay () method to play the video playback and container linked
* /
public class TestInternetActivity extends Activity {

MediaPlayer mediaPlayer; / / player's internal implementation is through MediaPlayer
SurfaceView surfaceView ;/ / video in a container
SurfaceHolder surfaceHolder ;/ / control surfaceView attributes (size, format, etc.) object
boolean isPause; / / if already suspended

@ Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.main);
surfaceView = (SurfaceView) findViewById (R.id.surfaceView1);
/ **
* Get the surefaceHolder
that is associated with the current surfaceView* /
surfaceHolder = surfaceView.getHolder ();
/ **
* Registration When surfaceView create, change, and should be performed when the destruction method
* /
surfaceHolder.addCallback (new SurfaceHolder.Callback () {

@ Override
public void surfaceDestroyed (SurfaceHolder holder) {
Log.i ("notice", "surfaceHolder been destroyed");
if (mediaPlayer! = null)
mediaPlayer.release ();
}

@ Override
public void surfaceCreated (SurfaceHolder holder) {
Log.i ("notice", "surfaceHolder is create a");
}

@ Override
public void surfaceChanged (SurfaceHolder holder, int format,
int width, int height) {
Log.i ("notice", "surfaceHolder was changed");
}
});

/ **
* This must be set to SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS oh, meaning
* Create a push in the 'surface', the main feature is not buffered
* /
surfaceHolder.setType (SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}

/ ***
* @ Param targetButton
* User button is clicked
* /
public void buttonClick (View targetButton) {
int buttonId = targetButton.getId ();
switch (buttonId) {
case R.id.button_play:
play ();
break;
case R.id.button_pause:
pause ();
break;
case R.id.button_reset:
reset ();
break;
case R.id.button_stop:
stop ();
break;
default:
break;
}

}

/ **
* Play
* /
private void play () {

mediaPlayer = new MediaPlayer ();
/ / Set the multimedia stream type
mediaPlayer.setAudioStreamType (AudioManager.STREAM_MUSIC);


Container / / set for the show mediaPlayermediaPlayer.setDisplay (surfaceHolder);
try {
/ / MediaPlayer.setDataSource ("/ sdcard/001.mp4");
mediaPlayer
. SetDataSource ("http://192.168.1.114:8080/webdav/china.3gp");
mediaPlayer.prepareAsync ();
mediaPlayer.start ();
isPause = false;
} Catch (Exception e) {
/ / Log.i ("notice", "An error occurred during playback oh");
e.printStackTrace ();
}
}

/ **
* Pause
* /
private void pause () {
Log.i ("notice", "click on the pause button");
if (isPause == false) {
mediaPlayer.pause ();
isPause = true;
} Else {
mediaPlayer.start ();
isPause = false;
}
}

/ **
* Reset
* /
private void reset () {
Log.i ("notice", "click on the reset button");
/ / Jump to the beginning
videomediaPlayer.seekTo (0);
mediaPlayer.start ();
}

/ **
* Stop
* /
private void stop () {
Log.i ("notice", "click the stop button");
mediaPlayer.stop ();
mediaPlayer.release ();

}
}


Why when playing online video will be reported

05-10 03:14:44.555: ERROR / gralloc (52): [unregister] handle 0x274308 still locked (state = 40000001)
05-10 03:14:47.408: ERROR / MediaPlayer (2060): start called in state 4
05-10 03:14:47.408: ERROR / MediaPlayer (2060): error (-38, 0)
05-10 03:14:47.425: ERROR / MediaPlayer (2060): Error (-38,0)

05-10 03:14:48.095: WARN / MediaPlayer (2060): info / warning (1, 26)
05-10 03:14:48.107: INFO / MediaPlayer (2060): Info (1,26)
05-10 03:14:48.136: ERROR / PlayerDriver (31): Command PLAYER_INIT completed with an error or info PVMFFailure
05-10 03:14:48.136: ERROR / MediaPlayer (2060): error (1, -1)
05-10 03:14:48.146: ERROR / MediaPlayer (2060): Error (1, -1)

05-10 03:14:48.146: WARN / PlayerDriver (31): PVMFInfoErrorHandlingComplete
05-10 03:14:49.336: DEBUG / dalvikvm (225): GC freed 43 objects / 1968 bytes in 90ms
05-10 03:14:54.385: DEBUG / dalvikvm (106): GC freed 2514 objects / 142304 bytes in 132ms




Such nice? However, when playing local video can play normally? Hope to have experts to answer! ! ! !
Reply:
Network video is not http protocol is rtsp
This is a streaming media
You play your local files that are already playing
operationNetwork can not be so engaged
Reply:
Here I want to play online video should be how to get ah?
Tell me achieve program do? Thank you!
Reply:


This is the main thing that you need a server to store the network supports RTSP video resources
Client connections corresponding address on
http://blog.csdn.net/kepoon/article/details/6772060
Reply:
The reply was deleted at the moderator 2012-05-10 16:15:32

Reply:
1. Ensure that you can open http streaming media address on a computer browser
2 There http streaming and rtsp, setDataSource url can be directly transmitted, but time-consuming preparation stage of streaming media, you can not call the start function directly after prepare, need to meidplayer registered OnPreparedListener functions. In onPrepared function to call start function.
You also have the class to write the first comment there, but did not.
Reply:
Too, do not understand this stuff, learning
Reply:
i am studying your document
Reply:
mediaPlayer.setDataSource ("http://192.168.1.114:8080/webdav/china.3gp");

Here the usage right.

Should:

Uri uri = Uri.parse ("http://192.168.1.114:8080/webdav/china.3gp");
mediaPlayer.setDataSource (this, uri);