Manually install APKs which resist rooted devices? - Android Software/Hacking General [Developers Only]

Squareup.com's app will not show-up in the market on some androids which are rooted.
I acquired the APK, but the installer ends with "Application not installed"
This is really sad. Windows and many other OSes have insecure features and may be used as a POS system.. BUT A ROOTED ANDROID PHONE CANNOT BE A POS??
Is there a way to manually extract the files within the APK, and do a manual install?
Link to Squareup APK: http://db.tt/TlcrKji

Tried pushing it to /data/app or /system/app with terminal emulator?

minus30 said:
Tried pushing it to /data/app or /system/app with terminal emulator?
Click to expand...
Click to collapse
Thanks for the response.
Can you clarify these steps?
Are you suggesting that I extract all the contents and place all of them into one or both of the folders you listed?
I'm savvy with term emulator, but would root explorer do the same?
Again, thanks.

Related

[Q] apk question

Is the apk file essentially the same as a .deb file or .rpm file in that once it's installed it can be removed from the phone? Or is the .apk required for the application to run?
Thanks.
Basically, what you said. It can be removed once installed.
Thank you.
ktmdms said:
Is the apk file essentially the same as a .deb file or .rpm file in that once it's installed it can be removed from the phone? Or is the .apk required for the application to run?
Thanks.
Click to expand...
Click to collapse
Depends what you mean. If you mean the apk on the device itself (/data/app or /system/app), then don't touch it, as Android runs from the apk.
If you mean the sd card, then sure, delete it
Ah, nuts! /data/app has 4 apk files in it. /system/app has 75. What I was hoping to do was clear out the .apk's in /system/app (or move them to the sdcard and maybe link /system/app to a directory on the sdcard) to make room in the phone. Not safe to do that, huh?
Thanks.
I wouldn't think so. I'd leave them just incase.

[Q] installing busybox - pushing files to droid

Hello,
I started experimenting with my Android yesterday when I found out about metamorph which requires rooted phone and busybox..
I managed to root the phone but couldnt install the busybox with the application from the market - it says that busybox was not found..
Then I installed the SDK platform, and wanted to do it with adb
I downloaded busybox ... tar.bz2 file and unrared it into SDK/tools and tried pushing it to my android to /system/local by doing:
adb push /Users/../android/platform-tools/busybox /data/local
but adb pushed the subfolders (children) to the /data/local folder instead of the folder with childen folders itself.
Now I wonder:
1. how to remove all those junk files?
2. am I doing the right thing? should I copy the tar.bz2 without unraring it? what is the right procedure?
is there any easier way to accomplish this?
Thanks for help
One way to get busybox is with titanium backup. Install the app open then menu*problems*Yes, do it.
jerrycycle said:
One way to get busybox is with titanium backup. Install the app open then menu*problems*Yes, do it.
Click to expand...
Click to collapse
This wont work with my telephone - HTC Desire

[Q] Installing System Apps

Hi! I searched the forums, but didn't see any answers regarding to this.
I'm trying to install the moded versions of SMS and Phone/Contact apps found in Cyanogenmod ROM over stock 2.3.4.
What I did was to extract Contacts.apk, Mms.apk, and Phone.apk from one of CM releases and copied the APK files to /System/Apps/ via Root Explorer (set it from R/W to R/O) and rebooted the phone, but there was no change.
I then tried to install them (from the same /System/Apps/ location) through Root Explorer, but it doesn't let.
Any help would be much appreciated.
If you are trying this you need to check/change permission on each app...the phone.apk will not work though I've tried and got force closes. The dialer and mms apks will work though. The best way to do this is to push via adb. If you don't have sdk and knowledge of the basic adb and shell commands I would highly reccomend becoming familiar with them.
Sent from my Nexus S 4G using Tapatalk
I have sdk and worked with adb before to root my phone. I'll do some research on how to install apps via adb.
Thank you.
umbrae said:
I have sdk and worked with adb before to root my phone. I'll do some research on how to install apps via adb.
Thank you.
Click to expand...
Click to collapse
Just put the apps on your tool folder and enter the following commands....
adb push "your.apk" system/app
Sent from my Nexus S 4G using Tapatalk
Thanks again. I did that and got confirmation that the files were copied, but the new Mms, for example, wasn't installed.
I tried using "install" command after, but it wouldn't let me. I got a message saying that the file already exists.
I changed the permission and everything, too.
Any ideas?
umbrae said:
Thanks again. I did that and got confirmation that the files were copied, but the new Mms, for example, wasn't installed.
I tried using "install" command after, but it wouldn't let me. I got a message saying that the file already exists.
I changed the permission and everything, too.
Any ideas?
Click to expand...
Click to collapse
That's odd...I usually don't have to change permissions when I push an app. What version of the cm7 mms apk are you using? I used it from the stable 7
Sent from my Nexus S 4G using Tapatalk
sunder74 said:
That's odd...I usually don't have to change permissions when I push an app. What version of the cm7 mms apk are you using? I used it from the stable 7
Click to expand...
Click to collapse
I was using Nighties, but I'll try the latest stable 7. Downloading now.
Just to clarify what I did:
First, used the "adb push" method you suggested and the apk files were copied to system/app. I rebooted, but nothing had changed. I then tried to install the copied files via Root Explorer, but it wouldn't let me. I changed R/O and then Permissions, but still couldn't install.
Then I tried "adb install", but it said file already exists. I changed R/O then Permissions, but still couldn't.
After that, I deleted Mms.apk and Contacts.apk and tried all the methods described above again, but still nothing. The apps weren't installed and I kept getting FC.
Lastly, I manually copied the files again via Root Explorer (changed R/O then changed Permission), but still no change and couldn't install.
Hopefully CM 7 packages I'm downloading would work.

How do i add apk to custom rom?

Hi,
I have a few apps and would like to add into custom rom. I read and google but no help.
Using winrar and open custom rom, i create a folder /data/app and place all apk in "app" folder. non of the apps in that folder installed. Do i need to do more then just add the apk?
I read here http://forum.xda-developers.com/showthread.php?t=1198035 and no use. maybe OP not don't with the guide yet.
thx
cat2115 said:
Hi,
I have a few apps and would like to add into custom rom. I read and google but no help.
Using winrar and open custom rom, i create a folder /data/app and place all apk in "app" folder. non of the apps in that folder installed. Do i need to do more then just add the apk?
I read here http://forum.xda-developers.com/showthread.php?t=1198035 and no use. maybe OP not don't with the guide yet.
thx
Click to expand...
Click to collapse
Reread that thread. The answer is in there.
Hint: ROM flash packages never put anything in /data
you can preinstall apps to /data/app but it takes update script modding. if you havent figured it out it is a lot easier to add them as system apps in /system/app
@Dani897: I try adding apk to /system/app or /data/app but none are working. When I add apk to /system/app; after the rom flashed and reboot, Samsung kept on flashing forever.
cat2115 said:
@Dani897: I try adding apk to /system/app or /data/app but none are working. When I add apk to /system/app; after the rom flashed and reboot, Samsung kept on flashing forever.
Click to expand...
Click to collapse
check your permissions!
the data/app way need adition work in the update script. im not gonna get into that.
Dani897 said:
check your permissions!
the data/app way need adition work in the update script. im not gonna get into that.
Click to expand...
Click to collapse
Thanks. How do i check permission? in CWM? In cwm (red) v2.5.1.3 -->Install zip from sdcard --> toggle signature verification-->disable'
In advance, all i see is fix permissions.
cat2115 said:
Thanks. How do i check permission? in CWM? In cwm (red) v2.5.1.3 -->Install zip from sdcard --> toggle signature verification-->disable'
In advance, all i see is fix permissions.
Click to expand...
Click to collapse
no in a terminal emulator or in linux. they get screwy sometimes if you do editing in windows. i cant even seem to get ownership of one of my flash drives on my linux machine after i formatted it with windows.
if you are on a mac you can do it by clicking and choosing "get info" from the context menu apparently but i dont own a mac so i dont know.
i never used it but check out cygwin and do some googling on permissions in terminal/console. it might be best if you are not ready to install a new os. but you can also install ubuntu with the wubi installer inside windows of use a vm with osx or the linux distro of your choice pretty easily. please dont ask for support questions on doing those things.
you can find permissions of files in a directory with ls -l
you can change them with chmod an ususally one of the numbers below but there are others, google is your friend
666 is rw-rw-rw
644 is rw-r--r-
777 is rwxrwxrwx
755 is rwxr-xr-x
644 or 755 are the most likely that they should be.

[Q] Is copying an .apk into /{system, data}/app sufficient to install an Android app?

If not, what else is done under the covers?
Also, what are the differences when installing applications
•From the android market
•sideloaded from web download
•sideloaded using adb install
•sideloaded using adb push
I copied this question from another place (I cannot put link here because I am new here) because I also have the same question and want to know more about this.
oldyoungguy said:
If not, what else is done under the covers?
Also, what are the differences when installing applications
•From the android market
•sideloaded from web download
•sideloaded using adb install
•sideloaded using adb push
I copied this question from another place (I cannot put link here because I am new here) because I also have the same question and want to know more about this.
Click to expand...
Click to collapse
Some .Apk's can be placed in system/data/app while others can't , make sure the .apk you're trying to place in system/data/app is supported or you may end up restoring your device. if the apk can run from the system /data/app then yes with the right permissions ...
Apk's from the market will give you detailed info from the apk like permission needed , supported devices ect, even the developers contact info ( in other word they are approved by Google.
while "sideloaded" apk or web apk (not coming from Google) are pirates apk,modified apk ect. who knows what permissions it needs or what info you are sharing with whoever modified the apk...
So be careful what you get into your device and where is placed on your device
Sent from my SPH-M930BST using Tapatalk 2
oldyoungguy said:
If not, what else is done under the covers?
Also, what are the differences when installing applications
•From the android market
•sideloaded from web download
•sideloaded using adb install
•sideloaded using adb push
I copied this question from another place (I cannot put link here because I am new here) because I also have the same question and want to know more about this.
Click to expand...
Click to collapse
Simply placing the apk into the correct folder is not enough. You will also need to set the permissions to the same as the other apps in that folder (I can't remember the permissions off the top of my head). This can easily be done using Root explorer, or using an adb shell and the chmod command.
Play Store installs and sideloaded installs achieve the same result, however you will want to be careful where you download apk files from. Apps from the Play Store are less likely to be malicious in nature, and , of course, you should never be pirating paid apps.
Adb push would not be enough as you would still need to set permissions. Unless you are installing a system app, it is better just to use adb install.
rootedVette said:
Adb push would not be enough as you would still need to set permissions. Unless you are installing a system app, it is better just to use adb install.
Click to expand...
Click to collapse
Are you saying the "adb push" will only copy file into the target location but "adb install" will copy the file into the target location AND also set the proper permission for you?
With all of the usual warnings about the source/safety of "side-loaded" apps aside. . .
I simply put the .apk file onto the SD card (anywhere), and then use a file manager like Astro to "open" it (root access not required). You will be prompted to see if you really wanted to install the app. Then let Android do its thing. The app will be installed where it belongs, with all the permissions it needs.
For this to work, you must first tell the device to allow installation of apps from unknown sources. Go to Settings | Security, and check Unknown Sources.

Categories

Resources