有源码真的是可以为所欲为的!
第三方应用发送的语音消息,传到自己的设备上。但是他们的协议规定要做一个转换!!!
遇到的问题是:播放自己的语音发现有些丢帧的问题,猜测是转换问题。
解决思路:拿到原文件进行对比即可。
问题点:没有跟他们有合作,不方便找他们要资料。
怎么办?
自己动手
第一步,把对方的应用安装到root手机上,脱裤(拖库)。
一般这些发出去的语音,是有记录的。
好家伙!!!
数据库加密了!内容也猜不出个所以然!
我有系统源码,怎么样!
我知道你录音吧,在android里录音两种方式,你录amr的话我猜测你是使用AudioRecorder,我直接修改AudioRecorder里的:

    /**
     * Pass in the file object to be written. Call this after setOutputFormat() but before prepare().
     * File should be seekable. After setting the next output file, application should not use the
     * file until {@link #stop}. Application is responsible for cleaning up unused files after
     * {@link #stop} is called.
     *
     * @param file the file object to be written into.
     */
    public void setOutputFile(File file)
    {
		Log.d(TAG,"file == > " + file.getPath());
        mPath = null;
        mFd = null;
        mFile = file;
    }
还有一个地方:
   /**
     * Sets the path of the output file to be produced. Call this after
     * setOutputFormat() but before prepare().
     *
     * @param path The pathname to use.
     * @throws IllegalStateException if it is called before
     * setOutputFormat() or after prepare()
     */
    public void setOutputFile(String path) throws IllegalStateException
    {
		Log.d(TAG,"path == > " + path);
        mFd = null;
        mFile = null;
        mPath = path;
    }
然后编译,刷机,运行别人的应用,发送语音!
卧槽

然后就可以拖拽出来了
两个文件一对比,发现真的是转换的问题。
这些转换最好还是由C/C++去完成,这是它擅长的东西。
okay,就扯到这里吧。当然,还有一种颁发,反编译,也可以扒拉出它是保存到哪里了。方法不唯一。

































