Пример #1
0
def from_mod(self):
    if os.path.exists('%s/framework-res.apk' % (EdsWorking)) == True:
        try:
            shutil.rmtree('%s/apktool' % (Home))
            os.chdir(Apktool)
            output = os.popen(Framework).read()
            print output
            EdsNotify().run("'Framework Install Complete", "\nYou can now  modify an apk file")
            if os.path.exists('%s/com.htc.resources.apk' % (EdsWorking)) == True:
                os.chdir(Apktool)
                output2 = os.popen(Resources).read()
                print output2
            else:
                print 'com.htc.resources.apk Not Found: Skipping....'
         
        except:
            print 'apktool dir not found: Moving on....'
            os.chdir(Apktool)
            output = os.popen(Framework).read()
            print output
            EdsNotify().run("'Framework Install Complete", "\nYou can now work with modify an apk file")
            if os.path.exists('%s/com.htc.resources.apk' % (EdsWorking)) == True:
                os.chdir(Apktool)
                output2 = os.popen(Resources).read()
                print output2
            else:
                print 'com.htc.resources.apk Not Found: Skipping....'
        print 'hello'
    else:
        EdsNotify().run("'framework-res.apk' NOT FOUND", "'\nframework-res.apk'\nNeeds To Be In:\n" + '%s/' % (EdsWorking))          
Пример #2
0
def rec_apk(self):
    if os.path.exists('%s/out/apktool.yml' % (Mod_File)) == True:
            os.chdir(Apktool)
            output = os.popen(RecApk).read()
            print output
            EdsNotify().run('Recompile Complete', "\nYour Apk Recompiled Successfully")
    else:
        EdsNotify().run("Error: Recompile Failed", "\nbrut.directory.PathNotExitst: apktool.yml")        
Пример #3
0
def sign_misc(self):
    if os.listdir(Sign_Apk):
        os.chdir(Signapk)
        output = os.popen(Sign_Other)
        print output
        EdsNotify().run("Apk Has Been Signed", "Your File is in:\n" + '%s/' % (Sign_Apk))
    else:
            EdsNotify().run("File Error", "A File Could Not Be Found In:\n" + '%s/\n' % (Sign_Apk))
Пример #4
0
def sign(self):
    if os.path.exists('%s/repackaged-unsigned.apk' % (Mod_File)) == True:
        os.chdir(Signapk)
        output = os.popen(Sign).read()
        print output
        os.remove('%s/repackaged-unsigned.apk' % (Mod_File))
        EdsNotify().run("Apk Has Been Signed", "Your File is in:\n" + '%s/' % (Mod_File))   
    else:
        EdsNotify().run("File Not Found", "An 'repackaged-unsigned.apk' Needs To Be In:\n" + '%s/' % (Mod_File))
Пример #5
0
def rec_dex(self):
    if os.path.exists('%s/out' % (Mod_File)) == True:
        os.chdir(Baksmali)
        output = os.popen(RecDex).read()
        print output
        if os.path.exists('%s/new_classes.dex' % (Mod_File)) == True:
            EdsNotify().run('Recompile Complete', "Your Dex File Recompiled Successfully")
        else:
            EdsNotify().run('Recompile Error', "Check Integrity of Dex File")
    else:
        EdsNotify().run("No 'out' Directory Found", '\nYou Must Decompile a Dex file first')
Пример #6
0
def dec_apk(self):
        if os.listdir(Mod_File):
            os.chdir(Apktool)
            output = os.popen(DecApk).read()
            print output
            if os.path.exists('%s/out/apktool.yml' % (Mod_File)):
                EdsNotify().run('Decompile Complete', "\nYour Apk Decompiled Successfully")
            else:
                EdsNotify().run('Decompile Failed', "\nCheck Your Framework Files")                
        else:
            EdsNotify().run('No Apk Found', "\nAn APk Needs To Be In:\n" + '%s/' % (Mod_File))           
Пример #7
0
def initd(self):
    Box = BoxLayout(orientation="vertical", spacing=10)
    msg = GridLayout(cols=2, padding=15, spacing=10, size_hint_y=None)
    btn_layout = GridLayout(cols=1)
    done = Button(text="Done")
    btn_layout.add_widget(done)
    msg.bind(minimum_height=msg.setter('height'))
    try:
        file_listing = os.listdir(Rom_Initd)
        file_listing.sort()
        for item in file_listing:
            btnname = (CustomButton(text='%s' % item,
                                    font_size=10,
                                    size_hint_y=None,
                                    height=40))
            msg.add_widget(btnname)
            btnname.bind(on_release=do_button)
        root = ScrollView(size_hint=(None, None),
                          size=(375, 290),
                          do_scroll_x=False)
        root.add_widget(msg)
        Box.add_widget(root)
        Box.add_widget(btn_layout)

        popup = Popup(background='atlas://images/eds/pop',
                      title='Init.d Scripts',
                      content=Box,
                      auto_dismiss=True,
                      size_hint=(None, None),
                      size=(400, 400))
        done.bind(on_release=popup.dismiss)
        popup.open()
    except:
        EdsNotify().run("'Init.d Directory Not Found",
                        'Cant Find:\n' + Rom_Initd)
Пример #8
0
def do_button(self):
    filepath = "%s/%s" % (SystemApp, self.text)
    if os.path.exists(Mod_File) == True:
        shutil.rmtree(Mod_File)
        os.mkdir(Mod_File)
        shutil.copy(filepath , Mod_File)
        dec_apk(self)
    else:
        EdsNotify().run("'Mod_A_File Directory Not Found", 'Cant Find:\n' + Mod_File)
Пример #9
0
def dec_dex(self):
        if os.listdir(Mod_File):
            try:
                os.rmdir('%s/out' % (Mod_File))
                os.chdir(Baksmali)
                output = os.popen(DecDex).read()
                print output
                
            except:
                print 'No out directory detected: Skipping... '
                os.chdir(Baksmali)
                output = os.popen(DecDex).read()
                print output
                if os.path.exists('%s/out' % (Mod_File)) == True:
                    EdsNotify().run('Decompile Complete', "Your Dex File Decompiled Successfully")
                else:
                    EdsNotify().run('Decompile Error', "Check Integrity of Dex File")
        else:
            EdsNotify().run('No Dex Found', "A Dex Needs To Be In:\n" + '%s/' % (Mod_File))     
Пример #10
0
def clean_working(self):
    if os.path.exists(Mod_File) == True:
        shutil.rmtree(Mod_File)
        shutil.rmtree(Sign_Apk)
        os.mkdir(Mod_File)
        os.mkdir(Sign_Apk)
        EdsNotify().run("Working Directory Cleaned", "\nFiles From:\n'Mod_A_File'\n'Sign_A_File'\nHave Been Cleaned Out")
    else: 
        print 'Cant Find %s' % (Mod_File)
        os.mkdir(Mod_File)
Пример #11
0
def buildprop(self):
    try:
        filepath = "%s/" % (BuildProp)
        if sys.platform.startswith('darwin'):
            subprocess.call(('open', filepath))
        elif os.name == 'nt':
            os.startfile(filepath)
        elif os.name == 'posix':
            subprocess.call(('xdg-open', filepath))
    except:
        EdsNotify().run("'build.prop Not Found", 'Cant Find:\n' + BuildProp)
Пример #12
0
def source(self):
    if os.listdir(Mod_File):
        os.chdir(Dex2jar)
        output = os.popen(Dex2j).read()
        print output
        os.chdir(Jdgui)
        output = os.popen(Jd).read()
        print output
        for filename in glob.glob('%s/*_dex2jar.jar' % (Mod_File)) :
            os.remove(filename) 
        #os.remove('%s/dex2jar.jar' % (Mod_File))
    else:
        EdsNotify().run("File Error", "A File Could Not Be Found In:\n" + '%s/\n' % (Mod_File) + 'Or Could Not View Source For That File')
Пример #13
0
    def device_select(self):
        Box = BoxLayout(orientation="vertical", spacing=10)
        msg = GridLayout(cols=2, padding=15, spacing=10, size_hint_y=None)
        btn_layout = GridLayout(cols=1)
        done = Button(text="Cancel")
        btn_layout.add_widget(done)
        msg.bind(minimum_height=msg.setter('height'))
        popup = Popup(background='atlas://images/eds/pop',
                      title='Device Select',
                      content=Box,
                      auto_dismiss=True,
                      size_hint=(None, None),
                      size=(700, 500))
        try:
            for name in devices:
                if name in devices:
                    btnname = (CustomButton(text='%s' % name,
                                            font_size=10,
                                            size_hint_y=None,
                                            height=40))
                    msg.add_widget(btnname)
                    btnname.bind(on_release=set_device)
                    btnname.bind(on_release=popup.dismiss)

            root = ScrollView(size_hint=(None, None),
                              size=(675, 390),
                              do_scroll_x=False)
            root.add_widget(msg)
            Box.add_widget(root)
            Box.add_widget(btn_layout)
            done.bind(on_release=popup.dismiss)
            popup.open()

        except:
            EdsNotify().run("'system/app Directory Not Found",
                            'Cant Find:\n' + SystemApp)
Пример #14
0
def apk_run(self):
    comm = self.text_input.text
    output = os.popen(comm).read()
    print output
    self.text_input.text = ''
    EdsNotify().run("Shell Command Output", output)
Пример #15
0
def uscript(self):
    try:
        webbrowser.open(UScript)
    except:
        EdsNotify()().run("'updater-script Not Found",
                          'Cant Find:\n' + UScript)
Пример #16
0
def rom_terms(self):
    try:
        webbrowser.open(Terms)
    except:
        EdsNotify().run("'terms.txt Not Found", 'Cant Find:\n' + Terms)
Пример #17
0
def changes(self):
    try:
        webbrowser.open(Changelog)
    except:
        EdsNotify().run("'change.txt Not Found", 'Cant Find:\n' + Changelog)
Пример #18
0
def aroma_config(self):
    try:
        webbrowser.open(Aroma)
    except:
        EdsNotify().run("'aroma-confg Not Found", 'Cant Find:\n' + Aroma)