Beispiel #1
0
def ResizeSystem():
    
    import system

    try:
        syssizeH, syssizeI, syssizeM, syssizeG = getsizes(rominfo.rominfo.system.size)
    ##    sysosetH, sysosetI, sysosetM, sysosetG = getsizes( rominfo.rominfo.system.offset)
        
        size = long(raw_input('Enter new system size bytes ' + str(syssizeI) +  ' :'))

        if size != syssizeI:
            size, newuseroffsethex = sizetoparamsize(size,verbose = 1)        

            pprint('Applying these changes will adjust the parameters and system.img files.')
            apply = raw_input('Apply these changes Y/N:')
            if apply in ('y','Y'):
                Resizemtdblock(hex(size/512)[:-1],'system')    
##                rominfo.rominfo.system.size = hex(size/512)[:-1]
##                rominfo.rominfo.user.offset = newuseroffsethex
##                rominfo.rominfo.applyparameterchanges()
                system.shrinksystem()
        else:
            print 'No Change'              
            dummy = raw_input('press enter to continue')

    except Exception as e:
        logerror('parameter::ResizeSystem ',e,1)
Beispiel #2
0
def ResizeSystem():

    import system

    try:
        syssizeH, syssizeI, syssizeM, syssizeG = getsizes(
            rominfo.rominfo.system.size)
        ##    sysosetH, sysosetI, sysosetM, sysosetG = getsizes( rominfo.rominfo.system.offset)

        size = long(
            raw_input('Enter new system size bytes ' + str(syssizeI) + ' :'))

        if size != syssizeI:
            size, newuseroffsethex = sizetoparamsize(size, verbose=1)

            pprint(
                'Applying these changes will adjust the parameters and system.img files.'
            )
            apply = raw_input('Apply these changes Y/N:')
            if apply in ('y', 'Y'):
                Resizemtdblock(hex(size / 512)[:-1], 'system')
                ##                rominfo.rominfo.system.size = hex(size/512)[:-1]
                ##                rominfo.rominfo.user.offset = newuseroffsethex
                ##                rominfo.rominfo.applyparameterchanges()
                system.shrinksystem()
        else:
            print 'No Change'
            dummy = raw_input('press enter to continue')

    except Exception as e:
        logerror('parameter::ResizeSystem ', e, 1)
Beispiel #3
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)
Beispiel #4
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)