├── EasyPoweRefresh.png ├── EasyPoweRefreshII.png ├── EasyPoweRefreshIII.png ├── EasyPowerRefresh ├── eboot.bin ├── git │ ├── shared.lua │ ├── thread_net.lua │ ├── updater.lua │ └── updater │ │ ├── param.sfo │ │ └── script.lua ├── resources │ ├── HDD.png │ ├── back.png │ ├── bat.png │ ├── down.png │ └── selector.png ├── sce_sys │ ├── changeinfo │ │ └── changeinfo.xml │ ├── icon0.png │ ├── livearea │ │ └── contents │ │ │ ├── bg0.png │ │ │ ├── startup.png │ │ │ └── template.xml │ ├── param.sfo │ └── pic0.png ├── script.lua └── system │ ├── commons.lua │ ├── lang │ ├── english_us.txt │ ├── french.txt │ ├── italian.txt │ └── spanish.txt │ ├── menu.lua │ └── scan.lua ├── README.md └── version /EasyPoweRefresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPoweRefresh.png -------------------------------------------------------------------------------- /EasyPoweRefreshII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPoweRefreshII.png -------------------------------------------------------------------------------- /EasyPoweRefreshIII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPoweRefreshIII.png -------------------------------------------------------------------------------- /EasyPowerRefresh/eboot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/eboot.bin -------------------------------------------------------------------------------- /EasyPowerRefresh/git/shared.lua: -------------------------------------------------------------------------------- 1 | -- Constants 2 | 3 | APP_REPO = "ONElua" 4 | APP_PROJECT = "Easy-Power-Refresh" 5 | 6 | APP_VERSION_MAJOR = 0x02 -- major.minor 7 | APP_VERSION_MINOR = 0x01 8 | 9 | APP_VERSION = ((APP_VERSION_MAJOR << 0x18) | (APP_VERSION_MINOR << 0x10)) -- Union Binary 10 | -------------------------------------------------------------------------------- /EasyPowerRefresh/git/thread_net.lua: -------------------------------------------------------------------------------- 1 | dofile("git/shared.lua") 2 | 3 | UPDATE_PORT = channel.new("UPDATE_PORT") 4 | 5 | local version = http.get(string.format("https://raw.githubusercontent.com/%s/%s/master/version", APP_REPO, APP_PROJECT)) 6 | if version and tonumber(version) then 7 | version = tonumber(version) 8 | local major = (version >> 0x18) & 0xFF; 9 | local minor = (version >> 0x10) & 0xFF; 10 | if version > APP_VERSION then 11 | UPDATE_PORT:push(version) 12 | end 13 | end -------------------------------------------------------------------------------- /EasyPowerRefresh/git/updater.lua: -------------------------------------------------------------------------------- 1 | dofile("git/shared.lua") 2 | 3 | if files.exists("ux0:/app/ONEUPDATE") then 4 | game.delete("ONEUPDATE") -- Exists delete update app 5 | end 6 | 7 | UPDATE_PORT = channel.new("UPDATE_PORT") 8 | 9 | local scr_flip = screen.flip 10 | function screen.flip() 11 | scr_flip() 12 | if UPDATE_PORT:available() > 0 then 13 | local version = UPDATE_PORT:pop() 14 | local major = (version >> 0x18) & 0xFF; 15 | local minor = (version >> 0x10) & 0xFF; 16 | if os.message(string.format("%s%s", APP_PROJECT, string.format("%X.%02X",major, minor).." is now available.\n".."Do you want to update the application?"), 1) == 1 then 17 | buttons.homepopup(0) 18 | 19 | local url = string.format("https://github.com/%s/%s/releases/download/%s/%s", APP_REPO, APP_PROJECT, string.format("%X.%02X",major, minor), APP_PROJECT..".vpk") 20 | local path = "ux0:data/"..APP_PROJECT..".vpk" 21 | local onAppInstallOld = onAppInstall 22 | function onAppInstall(step, size_argv, written, file, totalsize, totalwritten) 23 | return 10 -- Ok code 24 | end 25 | local onNetGetFileOld = onNetGetFile 26 | function onNetGetFile(size,written,speed) 27 | if back then back:blit(0,0) end 28 | screen.print(10,10,"Downloading Update...") 29 | screen.print(10,30,"Size: "..tostring(size).." Written: "..tostring(written).." Speed: "..tostring(speed).."Kb/s") 30 | screen.print(10,50,"Porcent: "..math.floor((written*100)/size).."%") 31 | draw.fillrect(0,520,((written*960)/size),24,color.new(0,255,0)) 32 | screen.flip() 33 | buttons.read() 34 | if buttons.circle then return 0 end --Cancel or Abort 35 | return 1; 36 | end 37 | local res = http.getfile(url, path) 38 | if res then -- Success! 39 | files.mkdir("ux0:/data/1luapkg") 40 | files.copy("eboot.bin","ux0:/data/1luapkg") 41 | files.copy("git/updater/script.lua","ux0:/data/1luapkg/") 42 | files.copy("git/updater/param.sfo","ux0:/data/1luapkg/sce_sys/") 43 | game.installdir("ux0:/data/1luapkg") 44 | files.delete("ux0:/data/1luapkg") 45 | game.launch(string.format("ONEUPDATE&%s&%s",os.titleid(),path)) -- Goto installer extern! 46 | end 47 | onAppInstall = onAppInstallOld 48 | onNetGetFile = onNetGetFileOld 49 | buttons.homepopup(1) 50 | end 51 | end 52 | end 53 | 54 | THID = thread.new("git/thread_net.lua") 55 | -------------------------------------------------------------------------------- /EasyPowerRefresh/git/updater/param.sfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/git/updater/param.sfo -------------------------------------------------------------------------------- /EasyPowerRefresh/git/updater/script.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Updater Of App. 3 | Designed by DevDavisNunez to ONElua projects.. :D 4 | TODO: 5 | Maybe, extract in APP, and only installdir in this.. 6 | ]] 7 | 8 | buttons.homepopup(0) 9 | 10 | color.loadpalette() 11 | 12 | args = os.arg() 13 | if args:len() == 0 then 14 | os.message("Error args lost!") 15 | os.exit() 16 | end 17 | 18 | args /= "&" 19 | if #args != 3 then 20 | os.message("Error args lost!") 21 | os.exit() 22 | end 23 | 24 | function onAppInstall(step, size_argv, written, file, totalsize, totalwritten) 25 | 26 | if step == 1 then -- Only msg of state 27 | draw.fillrect(0,0,960,30, color.green:a(100)) 28 | screen.print(10,10,"Search in vpk, Unsafe or Dangerous files!") 29 | screen.flip() 30 | elseif step == 2 then -- Warning Vpk confirmation! 31 | return 10 -- Ok 32 | elseif step == 3 then -- Unpack 33 | draw.fillrect(0,0,960,30, color.green:a(100)) 34 | screen.print(10,10,"Unpack vpk...") 35 | screen.print(925,10,"Percent Total: "..math.floor((totalwritten*100)/totalsize).." %",1.0,color.white, color.black, __ARIGHT) 36 | screen.print(10,35,"File: "..tostring(file)) 37 | screen.print(10,55,"Percent: "..math.floor((written*100)/size_argv).." %") 38 | draw.fillrect(0,544-30,(totalwritten*960)/totalsize,30, color.new(0,255,0)) 39 | screen.flip() 40 | elseif step == 4 then -- Promote or install 41 | draw.fillrect(0,0,960,30, color.green:a(100)) 42 | screen.print(10,10,"Installing...") 43 | screen.flip() 44 | end 45 | end 46 | 47 | game.install(args[3]) 48 | files.delete(args[3]) 49 | 50 | buttons.homepopup(1) 51 | 52 | game.launch(args[2]) -------------------------------------------------------------------------------- /EasyPowerRefresh/resources/HDD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/resources/HDD.png -------------------------------------------------------------------------------- /EasyPowerRefresh/resources/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/resources/back.png -------------------------------------------------------------------------------- /EasyPowerRefresh/resources/bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/resources/bat.png -------------------------------------------------------------------------------- /EasyPowerRefresh/resources/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/resources/down.png -------------------------------------------------------------------------------- /EasyPowerRefresh/resources/selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/resources/selector.png -------------------------------------------------------------------------------- /EasyPowerRefresh/sce_sys/changeinfo/changeinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | - Add an batterie indicator.
7 | - New PIC0 and backgroung.
8 | - New ressources thanks to Chronoss.
9 | ]]> 10 |
11 | 12 | 14 | - Add Conexion USB.
15 | - New resources thanks to Chronoss.
16 | ]]> 17 |
18 | 19 | 21 | ]]> 22 | 23 |
24 | -------------------------------------------------------------------------------- /EasyPowerRefresh/sce_sys/icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/sce_sys/icon0.png -------------------------------------------------------------------------------- /EasyPowerRefresh/sce_sys/livearea/contents/bg0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/sce_sys/livearea/contents/bg0.png -------------------------------------------------------------------------------- /EasyPowerRefresh/sce_sys/livearea/contents/startup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/sce_sys/livearea/contents/startup.png -------------------------------------------------------------------------------- /EasyPowerRefresh/sce_sys/livearea/contents/template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bg0.png 6 | 7 | 8 |   startup.png 9 | 10 | 11 | 12 | 13 | Easy Power Refresh 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Version 2.01 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | ®2017 Team ONElua - ONElua.x10.mx 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /EasyPowerRefresh/sce_sys/param.sfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/sce_sys/param.sfo -------------------------------------------------------------------------------- /EasyPowerRefresh/sce_sys/pic0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/Easy-Power-Refresh/854e9c20b7c8231fa1492d2c757f7f7e1af0b360/EasyPowerRefresh/sce_sys/pic0.png -------------------------------------------------------------------------------- /EasyPowerRefresh/script.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Easy Power Refresh 3 | 4 | Licensed by Creative Commons Attribution-ShareAlike 4.0 5 | http://creativecommons.org/licenses/by-sa/4.0/ 6 | 7 | Designed By Onelua Team. 8 | Collaborators: Chronoss & Wzjk. 9 | ]] 10 | 11 | if not usb then os.requireusb() end--requiere for module USB 12 | 13 | game.close() 14 | color.loadpalette() 15 | 16 | back = image.load("resources/back.png") 17 | HDDpic = image.load("resources/HDD.png") 18 | Bat = image.load("resources/bat.png") 19 | down = image.load("resources/down.png") 20 | Selector = image.load("resources/selector.png") 21 | 22 | if os.access() == 0 then 23 | if back then back:blit(0,0) end 24 | screen.flip() 25 | os.message("UNSAFE MODE is required for this Homebrew !!!",0) 26 | os.exit() 27 | end 28 | 29 | --Auto-Update 30 | dofile("git/updater.lua") 31 | 32 | ------------------------------------------Main-------------------------------------------------------------- 33 | __LANG = os.language() 34 | if files.exists("system/lang/"..__LANG..".txt") then dofile("system/lang/"..__LANG..".txt") 35 | else dofile("system/lang/english_us.txt") end 36 | 37 | dofile("system/menu.lua") 38 | dofile("system/commons.lua") 39 | dofile("system/scan.lua") 40 | 41 | --Search Nonpdrm games 42 | scan.app() 43 | 44 | --Load Options Menu 45 | menuadv.wakefunct() 46 | local scroll = newScroll(menuadv.options, #menuadv.options) 47 | 48 | --Info (Devices) 49 | infodevices() 50 | 51 | buttons.interval(10,12) 52 | while true do 53 | buttons.read() 54 | 55 | if back then back:blit(0,0) end 56 | 57 | screen.print(910,30,"Easy Power Refresh v2.0",0.9,color.white,color.blue,__ARIGHT) 58 | 59 | if down then 60 | down:blit(680,43) 61 | down:blit(880,43) 62 | end 63 | screen.print(888,62,"All useful trick in one",0.9,color.white,color.blue,__ARIGHT) 64 | 65 | if Bat then Bat:blit(900,500) end ------ Icon bat 66 | screen.print(880,519,batt.lifepercent().."%",2,color.white,color.blue,__ARIGHT) 67 | 68 | if gamesd > 0 then 69 | screen.print(10,435,strings.gamefind..gamesd,1,color.white,color.blue,__ALEFT) 70 | end 71 | 72 | local y = 30 73 | for i=scroll.ini,scroll.lim do 74 | if i == scroll.sel then 75 | if Selector then Selector:blit(40,y-5) 76 | else 77 | draw.fillrect(42,y-2,331,21, color.red:a(150)) 78 | draw.rect(42,y-2,331,21, color.blue:a(125)) 79 | end 80 | end 81 | screen.print(80,y, menuadv.options[i].text,1.0,color.white,color.gray,__ALEFT) 82 | y+=25 83 | end 84 | 85 | if HDDpic then HDDpic:blit(870,428) end 86 | 87 | screen.print(860,435,"ux0: "..infoux0.maxf.."/"..infoux0.freef,1,color.green,color.blue,__ARIGHT) 88 | screen.print(860,455,"ur0: "..infour0.maxf.."/"..infour0.freef,1,color.yellow,color.blue,__ARIGHT) 89 | if infouma0 then 90 | screen.print(860,475,"uma0: "..infouma0.maxf.."/"..infouma0.freef,1,color.red,color.blue,__ARIGHT) 91 | end 92 | 93 | screen.flip() 94 | 95 | --Controls 96 | if buttons.circle then os.exit() end 97 | 98 | if buttons.up or buttons.analogly < -60 then scroll:up() end 99 | if buttons.down or buttons.analogly > 60 then scroll:down() end 100 | 101 | if buttons.cross then 102 | menuadv.options[scroll.sel].funct() 103 | end 104 | 105 | end 106 | -------------------------------------------------------------------------------- /EasyPowerRefresh/system/commons.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Easy Power Refresh 3 | 4 | Licensed by Creative Commons Attribution-ShareAlike 4.0 5 | http://creativecommons.org/licenses/by-sa/4.0/ 6 | 7 | Designed By Onelua Team. 8 | Collaborators: Chronoss & Wzjk. 9 | ]] 10 | 11 | 12 | SYMBOL_CROSS = string.char(0xe2)..string.char(0x95)..string.char(0xb3) 13 | SYMBOL_SQUARE = string.char(0xe2)..string.char(0x96)..string.char(0xa1) 14 | SYMBOL_TRIANGLE = string.char(0xe2)..string.char(0x96)..string.char(0xb3) 15 | SYMBOL_CIRCLE = string.char(0xe2)..string.char(0x97)..string.char(0x8b) 16 | 17 | function onAppInstall(step, size_argv, written, file, totalsize, totalwritten) 18 | 19 | if back then back:blit(0,0) end 20 | 21 | if step == 2 then --Confirmation 22 | os.delay(10) 23 | return 10 -- Ok 24 | elseif step == 4 then -- Installing 25 | screen.print(910,30,"Easy Power Refresh v2.0",0.9,color.white,color.blue,__ARIGHT) 26 | 27 | if down then 28 | down:blit(680,43) 29 | down:blit(880,43) 30 | end 31 | screen.print(888,62,"All useful trick in one",0.9,color.white,color.blue,__ARIGHT) 32 | 33 | if Bat then Bat:blit(900,500) end ------ Icon bat 34 | screen.print(880,519,batt.lifepercent().."%",2,color.white,color.blue,__ARIGHT) 35 | 36 | if HDDpic then HDDpic:blit(870,428) end 37 | 38 | screen.print(860,435,"ux0: "..infoux0.maxf.."/"..infoux0.freef,1,color.green,color.blue,__ARIGHT) 39 | screen.print(860,455,"ur0: "..infour0.maxf.."/"..infour0.freef,1,color.yellow,color.blue,__ARIGHT) 40 | if infouma0 then 41 | screen.print(860,475,"uma0: "..infouma0.maxf.."/"..infouma0.freef,1,color.red,color.blue,__ARIGHT) 42 | end 43 | 44 | screen.print(70,50,strings.install,1,color.white,color.blue) 45 | screen.print(10,435,title, 0.9, color.white, color.green, __ALEFT) 46 | screen.print(10,470,version, 0.9, color.white, color.green, __ALEFT) 47 | 48 | screen.flip() 49 | end 50 | 51 | end 52 | 53 | function usbMassStorage() 54 | 55 | local bufftmp = screen.buffertoimage() 56 | while usb.actived() != 1 do 57 | buttons.read() 58 | power.tick(1) 59 | 60 | if bufftmp then bufftmp:blit(0,0) elseif back then back:blit(0,0) end 61 | 62 | local titlew = string.format(strings.connectusb) 63 | local w,h = screen.textwidth(titlew,1) + 30,70 64 | local x,y = 480 - (w/2), 272 - (h/2) 65 | 66 | draw.fillrect(x, y, w, h, color.new(0x2f,0x2f,0x2f,0xff)) 67 | draw.rect(x, y, w, h,color.white) 68 | screen.print(480,y+13, strings.connectusb,1,color.white,color.black,__ACENTER) 69 | screen.print(480,y+40, SYMBOL_CIRCLE.." "..strings.cancelusb,1,color.white,color.black,__ACENTER) 70 | screen.flip() 71 | 72 | if buttons.circle then return false end 73 | end 74 | 75 | buttons.read()--fflush 76 | 77 | --[[ 78 | // 0: USBDEVICE_MODE_MEMORY_CARD 79 | // 1: USBDEVICE_MODE_GAME_CARD 80 | // 2: USBDEVICE_MODE_SD2VITA 81 | // 3: USBDEVICE_MODE_PSVSD 82 | "ux0:","ur0:","uma0:","gro0:","grw0:" 83 | ]] 84 | local mode_usb = -1 85 | local title = string.format(strings.usbmode) 86 | local w,h = screen.textwidth(title,1) + 120,145 87 | local x,y = 480 - (w/2), 272 - (h/2) 88 | while true do 89 | buttons.read() 90 | power.tick(1) 91 | if bufftmp then bufftmp:blit(0,0) elseif back then back:blit(0,0) end 92 | 93 | draw.fillrect(x, y, w, h, color.new(0x2f,0x2f,0x2f,0xff)) 94 | screen.print(480, y+5, title,1,color.white,color.black, __ACENTER) 95 | screen.print(480,y+35,SYMBOL_CROSS.." "..strings.sd2vita, 1,color.white,color.black, __ACENTER) 96 | screen.print(480,y+55,SYMBOL_SQUARE.." "..strings.memcard, 1,color.white,color.black, __ACENTER) 97 | screen.print(480,y+75,SYMBOL_TRIANGLE.." "..strings.gamecard, 1,color.white,color.black, __ACENTER) 98 | screen.print(480,y+100,SYMBOL_CIRCLE.." "..strings.cancel, 1,color.white,color.black, __ACENTER) 99 | screen.flip() 100 | 101 | if buttons.released.cross or buttons.released.square or 102 | buttons.released.triangle or buttons.released.circle then break end 103 | end--while 104 | 105 | if buttons.released.cross then -- Press X 106 | mode_usb = 2 107 | elseif buttons.released.square then -- Press [] 108 | mode_usb = 0 109 | elseif buttons.released.triangle then -- Press Triangle 110 | mode_usb = 1 111 | else 112 | return 113 | end 114 | 115 | local conexion = usb.start(mode_usb) 116 | if conexion == -1 then os.message(strings.usbfail,0) return end 117 | 118 | local titlew = string.format(strings.usbconnection) 119 | local w,h = screen.textwidth(titlew,1) + 30,70 120 | local x,y = 480 - (w/2), 272 - (h/2) 121 | while not buttons.circle do 122 | buttons.read() 123 | power.tick(1) 124 | 125 | if bufftmp then bufftmp:blit(0,0) elseif back then back:blit(0,0) end 126 | 127 | draw.fillrect(x,y,w,h,color.new(0x2f,0x2f,0x2f,0xff)) 128 | draw.rect(x,y,w,h,color.white) 129 | screen.print(480,y+13, strings.usbconnection,1,color.white,color.black,__ACENTER) 130 | screen.print(480,y+40, SYMBOL_CIRCLE.." "..strings.cancelusb,1,color.white,color.black,__ACENTER) 131 | screen.flip() 132 | end 133 | 134 | usb.stop() 135 | 136 | --Update Search Nonpdrm games 137 | scan.app() 138 | infodevices() 139 | buttons.read()--fflush 140 | 141 | end 142 | 143 | --[[ 144 | ## Library Scroll ## 145 | Designed By DevDavis (Davis Nuñez) 2011 - 2016. 146 | Based on library of Robert Galarga. 147 | Create a obj scroll, this is very usefull for list show 148 | ]] 149 | function newScroll(a,b,c) 150 | local obj = {ini=1,sel=1,lim=1,maxim=1,minim = 1} 151 | 152 | function obj:set(tab,mxn,modemintomin) -- Set a obj scroll 153 | obj.ini,obj.sel,obj.lim,obj.maxim,obj.minim = 1,1,1,1,1 154 | --os.message(tostring(type(tab))) 155 | if(type(tab)=="number")then 156 | if tab > mxn then obj.lim=mxn else obj.lim=tab end 157 | obj.maxim = tab 158 | else 159 | if #tab > mxn then obj.lim=mxn else obj.lim=#tab end 160 | obj.maxim = #tab 161 | end 162 | if modemintomin then obj.minim = obj.lim end 163 | end 164 | 165 | function obj:max(mx) 166 | obj.maxim = #mx 167 | end 168 | 169 | function obj:up() 170 | if obj.sel>obj.ini then obj.sel=obj.sel-1 171 | elseif obj.ini-1>=obj.minim then 172 | obj.ini,obj.sel,obj.lim=obj.ini-1,obj.sel-1,obj.lim-1 173 | end 174 | end 175 | 176 | function obj:down() 177 | if obj.sel 0 then 64 | os.message(strings.mp3s..cont_mp3.."\n"..strings.mp4s..cont_mp4.."\n"..strings.imgs..cont_img.."\n"..strings.export) 65 | else 66 | os.message(strings.nofile) 67 | end 68 | end 69 | cont_multimedia,cont_mp3,cont_img,cont_mp4 = 0,0,0,0 70 | end 71 | 72 | local exit_callback = function () 73 | os.exit() 74 | buttons.homepopup(1) 75 | end 76 | 77 | function menuadv.wakefunct() 78 | menuadv.options = { 79 | { text = strings.restart, funct = restart_callback }, 80 | { text = strings.shutdown, funct = shutdown_callback }, 81 | { text = strings.refreshdb, funct = updatedb_callback }, 82 | { text = strings.reloadconfig, funct = reloadconfig_callback }, 83 | { text = strings.usb, funct = usb_callback }, 84 | { text = strings.nonmpdrm, funct = nonpdrm_callback }, 85 | { text = strings.filesexport, funct = filesexport_callback}, 86 | { text = strings.exit, funct = exit_callback}, 87 | } 88 | end 89 | -------------------------------------------------------------------------------- /EasyPowerRefresh/system/scan.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Easy Power Refresh 3 | 4 | Licensed by Creative Commons Attribution-ShareAlike 4.0 5 | http://creativecommons.org/licenses/by-sa/4.0/ 6 | 7 | Designed By Onelua Team. 8 | Collaborators: Chrono & Wzjk. 9 | ]] 10 | 11 | 12 | scan, gamesd = {},0 13 | 14 | function scan.multimedia(path) 15 | 16 | local tmp = files.listfiles(path) 17 | if tmp and #tmp > 0 then 18 | 19 | if back then back:blit(0,0) end 20 | 21 | for i=1, #tmp do 22 | 23 | if back then back:blit(0,0) end 24 | 25 | screen.print(910,30,"Easy Power Refresh v2.0",0.9,color.white,color.blue,__ARIGHT) 26 | 27 | if down then 28 | down:blit(680,43) 29 | down:blit(880,43) 30 | end 31 | screen.print(888,62,"All useful trick in one",0.9,color.white,color.blue,__ARIGHT) 32 | 33 | if Bat then Bat:blit(900,500) end ------ Icon bat 34 | screen.print(880,519,batt.lifepercent().."%",2,color.white,color.blue,__ARIGHT) 35 | 36 | if HDDpic then HDDpic:blit(870,428) end 37 | 38 | screen.print(860,435,"ux0: "..infoux0.maxf.."/"..infoux0.freef,1,color.green,color.blue,__ARIGHT) 39 | screen.print(860,455,"ur0: "..infour0.maxf.."/"..infour0.freef,1,color.yellow,color.blue,__ARIGHT) 40 | if infouma0 then 41 | screen.print(860,475,"uma0: "..infouma0.maxf.."/"..infouma0.freef,1,color.red,color.blue,__ARIGHT) 42 | end 43 | 44 | local ext = tmp[i].ext 45 | if ext:lower() == "png" or ext:lower() == "jpg" or ext:lower() == "bmp" or ext:lower() == "gif" or ext:lower() == "mp3" or ext:lower() == "mp4" then 46 | 47 | buttons.homepopup(0) 48 | screen.print(80,40, strings.wait,1.0,color.green,color.gray,__ALEFT) 49 | screen.print(10,435, strings.fileexport..tmp[i].name,1,color.white,color.black,__ALEFT) 50 | screen.flip() 51 | local result = files.export(tmp[i].path) 52 | buttons.homepopup(1) 53 | 54 | if result == 1 then 55 | cont_multimedia+=1 56 | if ext:lower() == "png" or ext:lower() == "jpg" or ext:lower() == "bmp" or ext:lower() == "gif" then 57 | cont_img+=1 58 | elseif ext:lower() == "mp3" then 59 | cont_mp3+=1 60 | else 61 | cont_mp4+=1 62 | end 63 | files.delete(tmp[i].path) 64 | else 65 | os.message(strings.fail.."\n\n"..tmp[i].name,0) 66 | end 67 | 68 | end 69 | end--for 70 | end 71 | 72 | infodevices() 73 | 74 | end 75 | 76 | function scan.dirapp(path) 77 | local tmp = files.listdirs(path) 78 | if tmp and #tmp > 0 then 79 | for i=1, #tmp do 80 | local info = game.info(tmp[i].path.."/sce_sys/param.sfo") 81 | if info then 82 | if info.TITLE_ID then 83 | if info.TITLE then info.TITLE = info.TITLE:gsub("\n"," ") else info.TITLE = "UNK" end 84 | table.insert(scan.list, { title=info.TITLE, path=tmp[i].path, id=info.TITLE_ID, version=info.VERSION }) 85 | end 86 | end 87 | end--for 88 | end 89 | end 90 | 91 | function scan.app() 92 | os.cpu(444) 93 | scan.list, scan.apps = {},{} 94 | debug_print = {} 95 | scan.dirapp("ux0:app") 96 | 97 | scan.len = #scan.list 98 | if scan.len > 0 then 99 | table.sort(scan.list ,function (a,b) return string.lower(a.id) 0 then 118 | local count = 0 119 | os.cpu(444) 120 | for i=1, #scan.apps do 121 | 122 | title,version = scan.apps[i].title,scan.apps[i].version 123 | buttons.homepopup(0) 124 | result = game.refresh(scan.apps[i].path) 125 | buttons.homepopup(1) 126 | if result == 1 then 127 | count+=1 128 | gamesd-=1 129 | else 130 | os.message(strings.notinstalled..scan.apps[i].id) 131 | end 132 | icon = nil 133 | end 134 | os.cpu(333) 135 | os.message(strings.gamesinst..count) 136 | --clean 137 | scan.list, scan.apps = {},{} 138 | else 139 | os.message(strings.nogames) 140 | end 141 | infodevices() 142 | end 143 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Easy Power Refresh 2 | **Power Options + NoNpDrm Games Installer all together in one app!.** 3 | 4 | ![header](EasyPoweRefreshIII.png) 5 | 6 | ### Description ### 7 | This simple app was made for the users who wanted to have all the options mentioned above in the same vpk. 8 | 9 | ### Changelog 2.01 ### 10 | - Add Export Multimedia file : mp3, mp4, jpg, png (file must be in "ux0:Multimedia").
11 | - Add an batterie indicator.
12 | - New PIC0 and backgroung.
13 | - New ressources thanks to Chronoss.
14 | 15 | ![header](EasyPoweRefreshIII.png) 16 | 17 | ### Changelog 2.00 ### 18 | **Changes thanks to Chronoss:** 19 | - Add Reload Config.txt.
20 | - Add Conexion USB.
21 | - New resources.
22 | 23 | With Easy Power Refresh you'll get the next options in an easy to use menu: 24 | 25 | 1. **Restart PSVita** -> This option will restart the console. 26 | 2. **Shutdown PSVita** -> This option will turn off the console. 27 | 3. **Update DB** -> This option will update your games DB (you will not lose the bubbles layout in the livearea). 28 | 4. **Reload Config.txt** -> This option will reload the config.txt file in "ux0:tai" folder. 29 | 5. **USB** -> This option let you connect your PSVita on PC in USB mode like VitaShell. 30 | 6. **Export Multimedia Files** -> This option will export multimedia from "ux0:Multimedia" folder to Music/Picture or Video app 31 | 7. **NoNpDrm Games** -> This option will search for non installed games in NoNpDrm format 32 | and install them (based on vitashell's Livearea Refresh). 33 | 8. **Exit** -> To exit the application 34 | 35 | ![header](EasyPoweRefreshII.png) 36 | 37 | ## NOTE: ## 38 | **To be able to use option "NoNpDrm Games" you must have correctly installed the ([NoNpDrm](https://github.com/TheOfficialFloW/NoNpDrm/releases/tag/v1.1)) by TheFloW!** 39 | 40 | Please feel free to report any issue or bugs. 41 | 42 | ## Credits: ## 43 | **TheFloW** for the **NoNpDrm plugin** and the Vitashell **Livearea Refresh option**. 44 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 33619968 --------------------------------------------------------------------------------