webOS Nation Forums >  webOS Discussion >  webOS Tips, Info & Resources > [How To] Retain App IPKs from App Catalog
[How To] Retain App IPKs from App Catalog
  Reply
Like Tree23Likes

 
Thread Tools Display Modes
Old 02/15/2013, 11:14 AM   #1 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
I haven't thought of a clever intro for this, so I'll go straight to the point. When you download an app off of App Catalog, it downloads a package file, and installs from that. However, even if you look hard, you won't find the file anywhere. You might have caught a glimpse of it during downloading or install, but it disappears as soon as the install is done. There is an easy way of disabling this behaviour.

Here's the app installation workflow:
1. User requests app download from App Catalog frontend.
2. App Catalog rounds up the necessary info, and sends it to LunaDownloadMgr
3. LunaDownloadMgr processes the data, and does some preparation work. It downloads the app icon, and tells App Catalog and LunaSysMgr about it.
4. It then downloads the app IPK.
5. When done, it calls the App Installer service (in LunaSysMgr) and tells it to install the app.
6. LunaSysMgr calls ApplicationInstallerUtility to install the app.
7. ApplicationInstallerUtility does stuff, eventually calling ipkg.
8. When done, App Installer does some cleanup, including removal of the source IPK.
9. Everything is informed that the app is installed.

As you can see, the App Installer service removes the source IPK, and that's why you can't find it. A couple of things to note:
1. IPKs are downloaded to /media/internal/downloads, just like anything else you download on webOS
2. The source IPK removal happens regardless if you install from App Catalog or not. As long as you use the App Installer service to install apps, the IPK will get removed.
(So that's insurance for myself that I'm not defeating some security measure in App Catalog, because the behaviour is completely independent of App Catalog, even though its intentions might be specifically for App Catalog.)

OK, enough technical details. How do we disable this behaviour? Simply, add an entry into the Luna settings file.

Procedure
1. You need to have shell access to your device, either on the device itself or via a computer. I'm not going to list the details of how to get shell access, since I've probably written about it in some of my other tutorials in my resource list. Check there first.
2. Once you open a shell, type these commands:
Code:
rootfs_open
cd /etc/palm
cp luna.conf luna.conf.bak
vi luna.conf
The above remounts your rootfs as R/W, backs up your luna.conf file, then opens it up in vi (a text editor).
3. Enter:
Code:
/debug
This will search for the text "debug" and jump there. At the bottom of the screen you can see what you're typing.
4. Hit "I" on your keyboard, then use the arrow keys to navigate to the end of the Debug list, so your cursor is right below "DumpLauncherAtlas=false".
5.Type the following, and inserting a newline at the end, for formatting:
Code:
AppInstallerCleaner=0
6. Press Escape, then Shift-ZZ. This saves the file.
7. Type:
Code:
rootfs_open -r
This will reboot your device.

After that, pick any app to test, then when the app's done installing go to /media/internal/downloads (or go into USB Drive mode and find the downloads folder), and you should see an IPK file with the app's name in it.

Too much to follow? Apply the attached patch.
Attached Files
File Type: patch nodeleteipk.patch (509 Bytes, 549 views) Email Attachment
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor

Last edited by GMMan; 02/15/2013 at 11:43 AM.
GMMan is offline   Reply With Quote
Liked by Rnp, ananimus, HelloNNNewman and 10 others like this.
Old 02/15/2013, 11:47 AM   #2 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,686
legend, sounds good ill give this a try, i can destroy my large manual backup of the app folders, having the ipk's will tidy things up a bit and let me archive my personal apps much easier locally and in cloud.

btw can the editing stage simply just be done with internalZ in master mode?
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 02/15/2013, 11:52 AM   #3 (permalink)
Member
 
MudShark22's Avatar
 
Posts: 916
Great if the app is available still, unfortunately not all installed apps still reside in the catalog
MudShark22 is offline   Reply With Quote
Old 02/15/2013, 12:29 PM   #4 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by geekpeter View Post
btw can the editing stage simply just be done with internalZ in master mode?
You can try, but I don't recommend it Internalz seems to mess the file up a bit, so it won't patch properly if you're installing other patches that changes the same file.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 02/15/2013, 01:00 PM   #5 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,686
Quote:
Originally Posted by GMMan View Post
You can try, but I don't recommend it Internalz seems to mess the file up a bit, so it won't patch properly if you're installing other patches that changes the same file.
ive had this happen only if new line formatting in internalZ was set to windows, setting to linux and all was well, its how i fixed up 1 of garrets old patches, i resaved it with linux formatting it the patch worked after that.

could be that, might not be, windows format is the internalZ default tho.
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 02/15/2013, 01:05 PM   #6 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,686
Quote:
Originally Posted by MudShark22 View Post
Great if the app is available still, unfortunately not all installed apps still reside in the catalog
wonder if i can use the ipk package/creation jar to just repackage some of my apps i have that are no longer available, worth a shot.

thinking more about it its a shame preware cant add a feed of say an ftp source which passes a username and/or password to allow us to add our own feed for our personal ipk backups, i know we can already but i think thats only for feeds freely available and open to all?
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 02/15/2013, 01:41 PM   #7 (permalink)
Member
 
MudShark22's Avatar
 
Posts: 916
I believe one could use Jaycanuck's ipk packager to repack but I am not sure which files or folders to select or exactly how to use the tool.
MudShark22 is offline   Reply With Quote
Old 02/15/2013, 01:51 PM   #8 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,686
Quote:
Originally Posted by MudShark22 View Post
I believe one could use Jaycanuck's ipk packager to repack but I am not sure which files or folders to select or exactly how to use the tool.
ill try shortly, i did use it a few times and fail hard, but did successfully package the machinarium ipk modified slightly to repackage a few other swf based games i liked such as castle wars 2 and it worked fine for those, altho the amount of files it dealt with was minor, not sure how different it is for some of the apps that have a huge qty of files in various places.
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 02/15/2013, 02:01 PM   #9 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
I would say use the webOS SDK to package it up. You'll have to look for the packages folder as well as they may have slightly different configurations for names, icons, locales, etc. You'll also need to bundle any services if they're present.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 02/15/2013, 02:05 PM   #10 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,686
Quote:
Originally Posted by GMMan View Post
I would say use the webOS SDK to package it up. You'll have to look for the packages folder as well as they may have slightly different configurations for names, icons, locales, etc. You'll also need to bundle any services if they're present.
aye might not be as easy as we hope.
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 02/15/2013, 02:13 PM   #11 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,686
Quote:
Originally Posted by geekpeter View Post
wonder if i can use the ipk package/creation jar to just repackage some of my apps i have that are no longer available, worth a shot.

thinking more about it its a shame preware cant add a feed of say an ftp source which passes a username and/or password to allow us to add our own feed for our personal ipk backups, i know we can already but i think thats only for feeds freely available and open to all?
first time ive quoted myself here but wth.

thinking about this more, now i think more about it, cant i just house my ipk backups on 1 of my NAS drives and add the IP/folder name of the NAS in my local network as a feed on preware? im just a little unsure if this would work at all due to name/package clashes (might be ok turning off apptucker and the palm feeds?)

or is this over simplifying things.
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 02/15/2013, 02:17 PM   #12 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Have a look at this: https://developer.palm.com/content/a...d-service.html

If you pull out the app folders from the applications, packages, and services folders, then assemble it as described, you should get more or less the original IPK, sans app signing.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Liked by geekpeter likes this.
Thanked by geekpeter, Rnp
Old 02/15/2013, 04:32 PM   #13 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,686
works fine btw, i just edited the config with internalZ with linux formatting, added the line you said too and it works perfectly.

now off to anhialate app apps that are still in the catalogue that i own and redownload them so i can keep my ipk's

cheers.
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 02/15/2013, 04:41 PM   #14 (permalink)
Member
 
ArigatoMrTalboto's Avatar
 
Posts: 17
There IS a way to do this, at least on a phone (don't have a Touchpad so no idea if the paths are identical):

Obtain Jason's IPKPackager utility from ipk-packager - Cross-Platform webOS Ipk Packager - Google Project Hosting

Use Internalz Pro to browse to:

/media/cryptofs/apps/usr/palm/applications

You'll see folders for each of the applications that you currently have installed on your device.

Tap-and-Hold on the desired folder, and COPY it to:

/media/internal

Afterward, connect the phone in USB mode and copy that folder to your PC's desktop.
Jason's IPKpackager can then be used to point to the copied folder and create an IPK from it, which should install from WOSQI *most* of the time.

I recently got a Pre 3 and wanted to have both it and my Pre 2 functional without the Pre 2 having it's Palm Profile wiped, so I created a new profile for the Pre 3 and was able to move applications from the 2 to the 3 in this manner.

I did encounter at least a couple of occasions where an IPK wouldn't install via WOSQI, but I then lucked out by copying the IPK to the usb partition on the phone and using Preware to install successfully.

Hope this helps...
ArigatoMrTalboto is offline   Reply With Quote
Thanked by CptOx, toto-w
Old 02/15/2013, 04:42 PM   #15 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
In case you don't want to uninstall and reinstall all your apps to download the IPKs, you can add a couple of headers and download them through your desktop browser. Use Preware to find the app ID (or browse through your applications folder), and use Impostah to find the IPK URL. Find an extension for your browser that allows you to add HTTP headers, and insert the following headers:
Code:
Auth-Token: <your auth token here>
Device-Id: <your nduid/imei here>
Get those two pieces of info the same way as I described in the country changer app. (Maybe it'll work for apps App Tuckerbox can't get on phones.)
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Thanked By: mrgconflict
Old 02/15/2013, 04:46 PM   #16 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by JayDeeTee View Post
There IS a way to do this, at least on a phone (don't have a Touchpad so no idea if the paths are identical):

Obtain Jason's IPKPackager utility from ipk-packager - Cross-Platform webOS Ipk Packager - Google Project Hosting

Use Internalz Pro to browse to:

/media/cryptofs/apps/usr/palm/applications

You'll see folders for each of the applications that you currently have installed on your device.

Tap-and-Hold on the desired folder, and COPY it to:

/media/internal

Afterward, connect the phone in USB mode and copy that folder to your PC's desktop.
Jason's IPKpackager can then be used to point to the copied folder and create an IPK from it, which should install from WOSQI *most* of the time.

I recently got a Pre 3 and wanted to have both it and my Pre 2 functional without the Pre 2 having it's Palm Profile wiped, so I created a new profile for the Pre 3 and was able to move applications from the 2 to the 3 in this manner.

I did encounter at least a couple of occasions where an IPK wouldn't install via WOSQI, but I then lucked out by copying the IPK to the usb partition on the phone and using Preware to install successfully.

Hope this helps...
The problem with that is you're not getting the original files, and you may miss things like services and alternate package data. The IPK Packager limits you to only producing an app package, not a full app/service/package info IPK (because it only allows you to select one folder).
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Liked by geekpeter likes this.
Thanked by geekpeter, JayDeeTee, Rnp
Old 02/15/2013, 04:47 PM   #17 (permalink)
Member
 
MudShark22's Avatar
 
Posts: 916
Awesome stuff peeps!
MudShark22 is offline   Reply With Quote
Old 02/15/2013, 05:03 PM   #18 (permalink)
Member
 
WknThDg's Avatar
 
Posts: 131
Disabling the removal of the source IPK by the App Installer service will also pertain to App Catalog Software Manager app updates and Preware app IPK installs/updates.

Although with Preware, the IPK file is instead saved/retained in the /media/internal/.developer/ folder.

Perhaps this thread title should be changed to "[How To] Retain App IPKs from App Catalog and Preware".

BTW, nice work GMMan!
__________________
HP Touchpad 32GB
WknThDg is offline   Reply With Quote
Thanked By: krotech
Old 02/15/2013, 05:06 PM   #19 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,686
Quote:
Originally Posted by WknThDg View Post
BTW, nice work GMMan!
this is what i still like about this minority community and its remaining devs tbh, a potentially difficult but useful request arose, no1 was really sure, some wild theorys come about and BAM an amazingly simple solution comes to fruition in no time at all.
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 02/15/2013, 05:08 PM   #20 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by WknThDg View Post
Disabling the removal of the source IPK by the App Installer service will also pertain to App Catalog Software Manager app updates and Preware app IPK installs/updates.

Although with Preware, the IPK file is instead saved/retained in the /media/internal/.developer/ folder.

Perhaps this thread title should be changed to "[How To] Retain App IPKs from App Catalog and Preware".

BTW, nice work GMMan!
If you're talking about the regular Preware feeds (rather than App Tuckerbox), the IPKs are trivial to obtain. Just go to ipkg.preware.org and browse for the file you want. As for Tuckerbox, I haven't looked closely at how it works, so this may or may not be very beneficial.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0