Exemplo n.º 1
0
def initrc_mount_system_rw(openforreview):    
    '''update init.rc to mount system rw'''
    
    try:
        sedpath = os.path.join(KitchenConfig.KitchenConfig.KitchenPath, 'processcontrol/init.rc_systemrw')
        apply_sed(sedpath
            ,'working/boot/init.rc'
            ,openforreview)
    except Exception as e:
        logerror('boot::initrc_mount_system_rw ' ,e,1)
Exemplo n.º 2
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)
Exemplo n.º 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)