Esempio n. 1
0
def editparameter_menu():
    header(checkvalid = True)
    printparameter()       
    
    pprint('=') 
    pprint ('1 Resize system')
    #pprint ('2 Apply change')
    pprint ('m parameter menu')
    pprint ('=')
    choice = raw_input('Enter selection :')    
    if choice in ('1'):
        ResizeSystem()
##    elif choice in ('2'):
##        applychanges()
        
    if choice not in ('m','M'): 
        editparameter_menu()
Esempio n. 2
0
def editparameter_menu():
    header(checkvalid=True)
    printparameter()

    pprint('=')
    pprint('1 Resize system')
    #pprint ('2 Apply change')
    pprint('m parameter menu')
    pprint('=')
    choice = raw_input('Enter selection :')
    if choice in ('1'):
        ResizeSystem()
##    elif choice in ('2'):
##        applychanges()

    if choice not in ('m', 'M'):
        editparameter_menu()
Esempio n. 3
0
def getROMFile(): 
    '''prompt for a rom image and move it into the sources folder
    '''
    
    header();
    filepath = raw_input('Please enter file name:');
    pprint(' ')
    pprint('=')

    #remove any trailing whitespace or single quotes
    filepath = filepath.rstrip()
    filepath = filepath.strip("'")
  
    rominfo.rominfo.setROMimgFilename(os.path.basename(filepath))
    
    CheckMakeFolders([KitchenConfig.KitchenConfig.SourceROMUnpackedLoc()]); 
    
    try:
        shutil.move(filepath, KitchenConfig.KitchenConfig.SourceROMLoc() + '/')
    except IOError as e:
        logerror('rkmainmenu::getROMFile IOError',e,1)
    except NameError as e:
        logerror('rkmainmenu::getROMFile NameError',e,1)
Esempio n. 4
0
def getROMFile():
    '''prompt for a rom image and move it into the sources folder
    '''

    header()
    filepath = raw_input('Please enter file name:')
    pprint(' ')
    pprint('=')

    #remove any trailing whitespace or single quotes
    filepath = filepath.rstrip()
    filepath = filepath.strip("'")

    rominfo.rominfo.setROMimgFilename(os.path.basename(filepath))

    CheckMakeFolders([KitchenConfig.KitchenConfig.SourceROMUnpackedLoc()])

    try:
        shutil.move(filepath, KitchenConfig.KitchenConfig.SourceROMLoc() + '/')
    except IOError as e:
        logerror('rkmainmenu::getROMFile IOError', e, 1)
    except NameError as e:
        logerror('rkmainmenu::getROMFile NameError', e, 1)
Esempio n. 5
0
def cleanroot():
    '''clean and root system.img
    
    900supersport 1.1
    *   debloat
    *   root, xml permissions market fix and busybox by deploy files (global)
    *   branding by deploy files (Local)
    *   addition of busybox synbolic links
    *   build.prop update for language and region
    '''
    kc = KitchenConfig.KitchenConfig
    try:

        header(); 
        pprint('=')
        pprint('system.img')
        pprint('=')
        pprint('De-bloat')
        pprint('=')

        mountsystem()
        removefiles(os.path.join(kc.KitchenPath, 'processcontrol/debloat'),'working/mntsystem/') 

        growsystem()
        mountsystem()

        pprint('=')
        pprint('= rooting the Cube now')
        pprint('=')
        pprint('= add Busybox for init.d')
        pprint('=')

        movefiles(os.path.join(kc.KitchenPath, 'processcontrol/movepreinstall'))
        deployfiles(os.path.join(kc.KitchenPath, 'processcontrol/deploy'),'working/mntsystem',0)
        
        makebusyboxlinks(os.path.join(kc.KitchenPath, 'processcontrol/makelinks'))
        CheckMakeFoldersRoot(['working/mntsystem/etc/init.d'])

        pprint('=')
        pprint('make english')
        pprint('=')

        os.system('sudo cp working/mntsystem/build.prop working/removed')       

        apply_sed(os.path.join(kc.KitchenPath, 'processcontrol/buildprop_makeenglish')
            ,'working/mntsystem/build.prop'
            ,0)
        
        extendBuildprop(0)

        if resizerequired == -1:
            shrinksystem()
            mountsystem()
            
        #open nautilus for review
        os.system('sudo ' + kc.browser + ' working/mntsystem/')   
        finalisesystem()
        checkfsimage('working/system.img')
        
        #boot stuff
        unpackboot() 
        initrc_mount_system_rw(0)
        addinitd_support(0)
        addpreinstall(1)
        brand_boot(1)
        finalise_boot()       
            
    except Exception as e:
        logerror('rkmainmenu::cleanroot ' ,e,1)
Esempio n. 6
0
def cleanroot():
    '''clean and root system.img
    
    900supersport 1.1
    *   debloat
    *   root, xml permissions market fix and busybox by deploy files (global)
    *   branding by deploy files (Local)
    *   addition of busybox synbolic links
    *   build.prop update for language and region
    '''
    kc = KitchenConfig.KitchenConfig
    try:

        header()
        pprint('=')
        pprint('system.img')
        pprint('=')
        pprint('De-bloat')
        pprint('=')

        mountsystem()
        removefiles(os.path.join(kc.KitchenPath, 'processcontrol/debloat'),
                    'working/mntsystem/')

        growsystem()
        mountsystem()

        pprint('=')
        pprint('= rooting the Cube now')
        pprint('=')
        pprint('= add Busybox for init.d')
        pprint('=')

        movefiles(os.path.join(kc.KitchenPath,
                               'processcontrol/movepreinstall'))
        deployfiles(os.path.join(kc.KitchenPath, 'processcontrol/deploy'),
                    'working/mntsystem', 0)

        makebusyboxlinks(
            os.path.join(kc.KitchenPath, 'processcontrol/makelinks'))
        CheckMakeFoldersRoot(['working/mntsystem/etc/init.d'])

        pprint('=')
        pprint('make english')
        pprint('=')

        os.system('sudo cp working/mntsystem/build.prop working/removed')

        apply_sed(
            os.path.join(kc.KitchenPath,
                         'processcontrol/buildprop_makeenglish'),
            'working/mntsystem/build.prop', 0)

        extendBuildprop(0)

        if resizerequired == -1:
            shrinksystem()
            mountsystem()

        #open nautilus for review
        os.system('sudo ' + kc.browser + ' working/mntsystem/')
        finalisesystem()
        checkfsimage('working/system.img')

        #boot stuff
        unpackboot()
        initrc_mount_system_rw(0)
        addinitd_support(0)
        addpreinstall(1)
        brand_boot(1)
        finalise_boot()

    except Exception as e:
        logerror('rkmainmenu::cleanroot ', e, 1)