* nanddump: fix bug when changing basepath

* NUSdownloader: dont always include IOS35, since the class is used for other things besides just sneek now
This commit is contained in:
giantpune@gmail.com 2011-01-17 16:24:12 +00:00
parent 070e78bef5
commit b901dfe453
4 changed files with 20 additions and 8 deletions

View File

@ -26,6 +26,8 @@ bool NandDump::Flush()
bool NandDump::SetPath( const QString &path )
{
qDebug() << "NandDump::SetPath(" << path << ")";
uidDirty = true;
cmDirty = true;
//check what is already in this path and create stuff that is missing
QFileInfo fi( path );
basePath = fi.absoluteFilePath();

View File

@ -599,7 +599,6 @@ QMap< quint64, quint16 > NusDownloader::List20j()
titles.insert( 0x10000000dull, 10 );//13v10
titles.insert( 0x10000000full, 257 );//15v257
titles.insert( 0x100000011ull, 512 );//17v512
titles.insert( 0x100000023ull, 0xc10 ); // IOS35 - not really part of this update, but needed for sneek
titles.insert( 0x100000100ull, 0x2 );//bcv2
titles.insert( 0x100000101ull, 0x4 );//miosv4
titles.insert( 0x1000848414B4aull, 0 );//EULA - HAKJ
@ -614,7 +613,6 @@ QMap< quint64, quint16 > NusDownloader::List30j()
{
QMap< quint64, quint16 > titles = List20j();
titles.insert( 0x100000002ull, 128 ); //sys menu
titles.insert( 0x100000023ull, 0xc10 ); // IOS35 - not really part of this update, but needed for sneek
titles.insert( 0x100000101ull, 5 ); //miosv5
titles.insert( 0x1000848414B4aull, 2 ); //EULA v2- HAKJ
titles.insert( 0x1000848414C4aull, 0x2 ); //regsel
@ -853,8 +851,7 @@ QMap< quint64, quint16 > NusDownloader::List21e()
titles.insert( 0x100000014ull, 12 );//20v12
titles.insert( 0x100000015ull, 514 );//21v514
titles.insert( 0x100000016ull, 777 );//22v772 //should be getting v772 but it isnt available on NUS, get 777 instead
titles.insert( 0x10000001cull, 1292 );//28v1228 //should be getting v1288 but it isnt on NUS
titles.insert( 0x100000023ull, 0xc10 ); // IOS35 - not really part of this update, but needed for sneek
titles.insert( 0x10000001cull, 1292 );//28v1228 //should be getting v1288 but it isnt on NUS
titles.insert( 0x100000100ull, 0x2 );//bcv2
titles.insert( 0x100000101ull, 0x4 );//miosv4
titles.insert( 0x1000848414B50ull, 0 );//EULA - HAKP
@ -1105,8 +1102,7 @@ QMap< quint64, quint16 > NusDownloader::List20u()
titles.insert( 0x10000000cull, 6 );//12v6
titles.insert( 0x10000000dull, 10 );//13v10
titles.insert( 0x10000000full, 257 );//15v257
titles.insert( 0x100000011ull, 512 );//17v512
titles.insert( 0x100000023ull, 0xc10 ); // IOS35 - not really part of this update, but needed for sneek
titles.insert( 0x100000011ull, 512 );//17v512
titles.insert( 0x100000100ull, 0x2 );//bcv2
titles.insert( 0x100000101ull, 0x4 );//miosv4
titles.insert( 0x1000848414B45ull, 0 );//EULA - HAKE

View File

@ -55,7 +55,7 @@ public:
//get a list of titles for a given update
//if a title is not available on NUS, a substitute is given instead ( a later version of the same title )
//to keep people from bulk DLing and installing and messing something up, any boot2 update will NOT be included
//in the list, ask for it specifically. IOS35 is added in all updates for use in sneek
//in the list, ask for it specifically.
//lists are created from wiimpersonator logs when available. otherwise they come from examining game update partitions
static QMap< quint64, quint16 > List20u();

View File

@ -73,6 +73,7 @@ void MainWindow::SaveSettings()
//paths
s.beginGroup( "paths" );
s.setValue( "nusCache", ui->lineEdit_cachePath->text() );
s.setValue( "sneek", ui->lineEdit_nandPath->text() );
s.endGroup();
}
@ -154,6 +155,14 @@ void MainWindow::NusIsDone()
}
else if( ui->radioButton_nand->isChecked() )
{
//check if IOS35 is present in nand dump - needed for sneek
QByteArray tmdBA = nand.GetFile( "/title/00000001/00000023/content/title.tmd" );
if( tmdBA.isEmpty() )
{
ui->plainTextEdit_log->appendHtml( tr( "IOS35 not found on nand. Getting it now...") );
nus.Get( 0x100000023ull, true );
return;
}
ui->lineEdit_nandPath->setEnabled( true );
ui->pushButton_nandPath->setEnabled( true );
@ -480,9 +489,14 @@ void MainWindow::SaveJobToFolder( NusJob job )
for( quint16 i = 0; i < cnt; i++ )//write all the contents in the new folder. if the job is decrypted, append ".app" to the end of their names
{
QString appName = t.Cid( i );
QByteArray stuff = job.data.takeFirst();
if( job.decrypt )
{
appName += ".app";
if( !WriteFile( d.absoluteFilePath( appName ), job.data.takeFirst() ) )
//qDebug() << "resizing from" << hex << stuff.size() << "to" << (quint32)t.Size( i );
//stuff.resize( t.Size( i ) );
}
if( !WriteFile( d.absoluteFilePath( appName ), stuff ) )
{
ShowMessage( "<b>Error writing " + d.absoluteFilePath( appName ) + "!<\b>" );
return;