Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,122 Members 40,923 Now Online
XDA Developers Android and Mobile Development Forum

[App] CM App Installer - Installed as system apps! - v3.1.4

Tip us?
 
TheMentalGoose
Old
(Last edited by TheMentalGoose; 24th May 2014 at 02:01 PM.) Reason: Links
#1  
Junior Member - OP
Thanks Meter 16
Posts: 26
Join Date: Jun 2012
Default [App] CM App Installer - Installed as system apps! - v3.1.4

Install DSP Manager, CM Messaging and others on all 4.2.x, 4.3 and 4.4.x ROM's !!

It's now on the play store! Check it out here

For all those that want Cyanogenmod apps on any AOSP-based 4.1 or above ROM, I have made this quick app "CM App Installer"
All apps here are pulled from a CM10.1 zip and tested and should be working on all 4.2.x and 4.3 AOSP roms.

I also tried it on my rooted HTC Desire Z I have lying around running 4.1, so it should work on there as well. Only released for the Nexus 4 because that's all it's really been tested on; if you want to test it out on other ROM's and Devices, please feel free, but again, I do not take responsibility if it goes wrong



This application is designed to add more automation to the process of replacing / installing cyanogenmod apps as system applications, or the regular way, however it is slightly less likely to succeed.

This app installs like any other app.
In addition, it has root permissions to install if you're rooted, so you should be granted SU when you first boot, and it does write to system partition - Read the Code section if you're worried about exactly what gets executed. Installing the regular way will obviously not require this, but sometimes as these are pulled straight from the System partition, they require to be installed as a system app.





The process is pretty simple, hit the app, hit install, and then reboot your device.
You can go into more than 1 app at a time and hit install, the restart will refresh your system apps list no matter how many you've added.

At the moment, the following apps are supported
- CM File Manager
- CM Messaging
- CM Torch
- CM DSP Manager
- CM Apollo
- CM Calculator
- Voice +
- CM Focal


Code

 

This information is also available from within the application.

There are a number of commands that this application uses, it executes certain processes through the code to copy apps to the system directory.
These commands are ran as if they were ran inside the terminal emulator, and always consist of

process, remount to read-write, transfer/copy/rename, remount to read-only, close. (In this order).

I use a Process to get a SU Runtime instance
Code:
Process p = Runtime.getRuntime().exec("su");
And then I use a PrintStream to issue the commands listed below to it.

Remount the system partition as read-write
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Rename an app (use move command to move with a different extension
Code:
mv /system/app/AppOfChoice.apk /system/app/AppOfChoice.bak
Copy an app from SD card to System directory
Code:
cat /sdcard/CMApps/AppOfChoice.apk > /system/app/AppOfChoice.apk
Remove an app from system partition
Code:
rm -r /system/app/AppOfChoice.apk
For permissions, I use chmod
Code:
chmod 644 /system/app/AppOfChoice.apk
Remount the system partition as read-only
Code:
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system



Changelog

 

Version 1.0.0
- Application built and released
- CMFileManager included in app
- CM Messenger
- CM Torch
- CM DSP Manager
- Added settings menu
- Added changelog
- Upgraded icon
- Improved Root access algorithm
- Moved methods to UI Threads (increase speed)
- Confirmed working on Nexus 4 on any AOSP-based 4.2.x or 4.3 ROM

Version 1.0.1
- Optimised replace code for extension
- Added Apollo apk functionality

Version 1.0.2
- Added scrolling support for settings dialogs
- Tweaked app layout in order to support smaller devices

Version 1.0.4
- Added "Clear SD" option to delete buffer files used in transfer
- General bug fixes
- Fixed issue with CM Messaging crashing when pressed
- Fixed issue with crashing if root access isn't granted.
- Fixed issue with app not detecting installed if original exists (now pushed two version, one backup, one original)
- Added CM Calculator apk functionality (replaces old calculator)
- Testing the application
- > DSPManager confirmed working, enable in Settings > Sound after install and reboot.
- > CMFileManager confirmed working
- > CM Messaging confirmed working
- > CM Torch confirmed working
- > CM Apollo music player confirmed working
- > CM Calculator confirmed working

Version 2.0.1
- Recoded entire app (Behind the scenes stuff)
- Improved logic behind if app is installed
- Added multiple installer feature in settings (not working currently)
- Added ability to delete just backups
- Added ability to restore original backup if app isnt installed
- Added Focal app support!
- Improved logo
- Fixed issue with updating on list
- Improved expandability logic
- Speed enhancements


Version 3.0.1
- Introduced networking!
- > App will now download apk from server space, then push to system
- > Dynamically updatable, no need for client-app update if cyanogenmod app is updated
- Error with streaming images available to the app - bug is reported and being looked into.
- Removed Focal support (error with server-side apk upload)
- Speed enchancements
- Redesigned UI (trying to keep up with Android UI Guidelines)

Version 3.0.2
- Removed Image View
- Increased title size
- Removed the multi-select option from the menu
- Cleaned up toast notifiers for the individual processes

Version 3.0.3
- Cleaned up and commented code
- Modified Greeting text
- Modified the project setup, cleaned up strings file for possible language translations
- Added version code in "about" selection
- Changed handler code for root access - Will restrict options entirely if root isn't granted (or crash device)

Version 3.0.4
- Fixed issue with crashing if root access isn't granted
- Removed refresh button when root access isn't granted
- Optimised startup code

Version 3.0.5\n
- Added installation progress bar\n
- Synced download messages\n
- Added more useful error messages\n

Version 3.0.6\n
- Fixed issue with Server (shouldn't happen again)
- Removed GenieWidget (News and Weather Widget) due to some incompatability
- Migrated to new server (plus backup installed) to avoid issues experiences

Version 3.1.0\n
- Migrated server to dropbox (and using their downloading system)
- Downloads take a little longer to start, but should be FAR more reliable!
- Added GenieWidget back in (open for suggestions again, due to dropbox file limit being increased)
- Not compatible with ART!

Version 3.1.1
- Bug fix (I overlooked! Sorry!)

Version 3.1.4
- Bug fixes (With the execution of installing)
- DSP Manager Modification!
> Now there's an option, DSP Manager Libs. This will install the lib to make DSP manager work!

Version 3.5.1
- Major UI over-haul (including some custom theming and finally image support!)
- More intelligent installation process
- Non-root support!
- Miscellaneous info

Version 3.5.3\n
- Minor bug fixes + greater device compatibility
- Some graphical glitches solved




Obviously I don't take any credit for the applications, they were pulled from the CM flashable zip. All credit for the apps goes to the CyanogenMod Team

Credit also goes to the Reddit member /u/wchill, his code helped with the system code (shown in the Code section above)

Similarly, I do not take any responsibility if this app causes your phone to be bricked, corrupted, broken, or to encounter an unfortunate case of spontaneous combustion. Use at your own risk.

In the mean time, enjoy!

Donate if you like : here


It's now on the play store! Check it out here
Attached Files
File Type: apk CM App Installer.apk - [Click for QR Code] (1.42 MB, 203 views)
The Following 9 Users Say Thank You to TheMentalGoose For This Useful Post: [ Click to Expand ]
 
CoolApps
Old
#2  
CoolApps's Avatar
Senior Member
Thanks Meter 600
Posts: 3,304
Join Date: May 2011

 
DONATE TO ME
Nice!, I really like the CM File Manager and now I have a chance to get it.
EDIT: Wait, it looks like that out will be a system app then, any chance of it being a user app?

Sent from my Nexus 4 using Tapatalk 4
 
TheMentalGoose
Old
#3  
Junior Member - OP
Thanks Meter 16
Posts: 26
Join Date: Jun 2012
It is, its supposed to install the apps as system apps instead of regular apps, its the only way to get the messaging or DSP manager working

Sent from my Nexus 4 using Tapatalk 4
 
wchill
Old
#4  
Senior Member
Thanks Meter 190
Posts: 136
Join Date: Dec 2010
Location: Los Angeles, CA
Can confirm install was successful on a Note II running a TouchWiz ROM on 4.1.2
Devices
  • Verizon Galaxy S4 SCH-I545
  • International Samsung Galaxy Note II GT-N7100
  • Verizon HTC Thunderbolt
  • Verizon iPhone 4 32GB
  • Kindle Fire 1st gen
  • Samsung Galaxy Note 10.1 GT-N8013
 
TheMentalGoose
Old
#5  
Junior Member - OP
Thanks Meter 16
Posts: 26
Join Date: Jun 2012
Quote:
Originally Posted by wchill View Post
Can confirm install was successful on a Note II running a TouchWiz ROM on 4.1.2
Nice. Thanks for this, I'll add it to supported devices section when I get round to making one. I really need some free time to update this properly

Sent via. Nexus 4
 
nonameduck
Old
#6  
Member
Thanks Meter 7
Posts: 85
Join Date: Jul 2009
This installed the File Manager on my HTC One perfectly! Thanks!
The Following User Says Thank You to nonameduck For This Useful Post: [ Click to Expand ]
 
jcnbama
Old
#7  
jcnbama's Avatar
Senior Member
Thanks Meter 153
Posts: 848
Join Date: Jun 2012
Location: Huntsville
I have a quick question about this. It seems like such an awesome app. Will this keep apps updated as changes are made? Particularly with the Focal app. I really want to keep up with this as it progresses and develops over time and I am not really sure how to do it except pull it out of a CM nightly ever so often as they update it. Will this app keep the apps I'm downloading updated over time or is it a one time DL that's kinda the version you get deal? Thanks again!

Sent from my Nexus 7 using xda app-developers app
If I share something helpful with you along the way, then hit the THANKS button. I am not a developer so that's all I got.

For I can do everything through Christ, who gives me strength. Philippians 4:13
 
jawz101
Old
#8  
jawz101's Avatar
Senior Member
Thanks Meter 291
Posts: 696
Join Date: Jun 2009
Can you get cLock widget and notification power widgets?
 
TheMentalGoose
Old
#9  
Junior Member - OP
Thanks Meter 16
Posts: 26
Join Date: Jun 2012
Quote:
Originally Posted by jawz101 View Post
Can you get cLock widget and notification power widgets?
Yes, cLock will be in 2.0.2, and notification power widgets, ehh i'm not sure at the moment, I did try it before but was getting problems with it.. I'll look into it again for you though

Quote:
Originally Posted by jcnbama View Post
I have a quick question about this. It seems like such an awesome app. Will this keep apps updated as changes are made? Particularly with the Focal app. I really want to keep up with this as it progresses and develops over time and I am not really sure how to do it except pull it out of a CM nightly ever so often as they update it. Will this app keep the apps I'm downloading updated over time or is it a one time DL that's kinda the version you get deal? Thanks again!

Sent from my Nexus 7 using xda app-developers app
Hi, yeah in it's current state, the apk's are stored within the app itself, and they just get copied and pushed around from there, completely offline. I do intent too when I find a service or a server, or a perminant location where the latest are pushed as the apks, then i'll introduce some server side integration into it, and it will download the latest version.. This is planned in the future

But to answer your original question, no, version 2.0.1 has only a certain version of the apk in it, and that's all it will have

Will look into server streaming and stuff soon though, thanks for commenting
The Following User Says Thank You to TheMentalGoose For This Useful Post: [ Click to Expand ]
 
mulbyungjahri
Old
#10  
mulbyungjahri's Avatar
Member
Thanks Meter 93
Posts: 48
Join Date: Jul 2013
Some CM apps require more files, afaik

eg.

DSPManager needs /system/lib/soundfx/libcyanogen-dsp.so and /system/vendor/etc/audio_effects.conf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes