Esempio n. 1
0
bool CoreRP::addMbtool()
{
    const std::string mbtool("mbtool");
    std::string mbtoolPath(m_impl->pc->dataDirectory());
    mbtoolPath += "/binaries/android/";
    mbtoolPath += m_impl->info->device()->architecture();
    mbtoolPath += "/mbtool";

    if (m_impl->cpio->exists(mbtool)) {
        m_impl->cpio->remove(mbtool);
    }

    if (!m_impl->cpio->addFile(mbtoolPath, mbtool, 0750)) {
        m_impl->error = m_impl->cpio->error();
        return false;
    }

    return true;
}
Esempio n. 2
0
bool CoreRP::addMbtool()
{
    const std::string mbtool("mbtool");
    const std::string sig("mbtool.sig");
    std::string mbtoolPath(m_impl->pc->dataDirectory());
    mbtoolPath += "/binaries/android/";
    mbtoolPath += mb_device_architecture(m_impl->info->device());
    mbtoolPath += "/mbtool";
    std::string sigPath(mbtoolPath);
    sigPath += ".sig";

    m_impl->cpio->remove(mbtool);
    m_impl->cpio->remove(sig);

    if (!m_impl->cpio->addFile(mbtoolPath, mbtool, 0750)
            || !m_impl->cpio->addFile(sigPath, sig, 0640)) {
        m_impl->error = m_impl->cpio->error();
        return false;
    }

    return true;
}