Related
(I posted this in general, but I think there's too much technical info for any user to be able to assist. I realize this isn't development related, but delete the post if it's too off-topic please.)
Over the past few months since 'Grocery iQ' has been out, I have been trying to install it. Despite trying it on several different ROMs on my old G1 and now several different ROMs on my Slide (including now Froyo) it seems that it doesn't like to install. From my experience it is the biggest direct-download from the Market that I have come across weighing in at 8.01MB - by 'direct-download' I mean that the application itself is downloaded entirely from the Market and the size I reference isn't from 'additional' files downloaded to the SD card after running the program.
Everytime I try to install it the system just says 'Installation Unsuccessful' and one time I got an error code: -18 (on Eugene's Froyo Kanged RC1). Fortunately I'm fluent enough with the device to have my SDK setup and I grabbed a logcat from the adb server. Using what debugging mind-set I've had from coding I was able to find the problem is:
Code:
D/VoldCmdListener( 122): asec list
I/PackageHelper( 1703): Size of container 10 MB 8401843 bytes
D/VoldCmdListener( 122): asec create smdl2tmp1 10 fat {} 10010
E/Vold ( 122): ASEC file '/mnt/secure/asec/smdl2tmp1.asec' currently exists - destroy it first! (No such file or directory)
W/Vold ( 122): Returning OperationFailed - no handler for errno 98
E/PackageHelper( 1703): Failed to create secure container smdl2tmp1
E/DefContainer( 1703): Failed to create container smdl2tmp1
What exactly is happening here? It almost looks like it's trying to create a secure environment for the install or the program uses copy-protection. Can someone please elaborate on this - hopefully a dev?
Thanks!
That's odd, it installed fine for me on SlideM4
How much free space do you have? Are you doing the install over WiFi?
After doing some research I believe that ASEC is part of the copy protection scheme used in a2sd on Froyo.
r0man said:
How much free space do you have? Are you doing the install over WiFi?
Click to expand...
Click to collapse
I have 95.51MB free >.> And I'm not sure why WiFi or 3G would matter, but I've tried both ways (unintentionally).
r0man said:
After doing some research I believe that ASEC is part of the copy protection scheme used in a2sd on Froyo.
Click to expand...
Click to collapse
Interesting. I'm not using A2SD though since my SD card is formatted entirely FAT32 (Froyo didn't like my card being FAT32+EXT3+Swap), but I wonder if Froyo A2SD runs entirely on FAT32? It would be complicated for Google to require people to partition their SD cards now that Froyo has A2SD built-in.
nbetcher said:
I have 95.51MB free >.> And I'm not sure why WiFi or 3G would matter, but I've tried both ways (unintentionally).
Interesting. I'm not using A2SD though since my SD card is formatted entirely FAT32 (Froyo didn't like my card being FAT32+EXT3+Swap), but I wonder if Froyo A2SD runs entirely on FAT32? It would be complicated for Google to require people to partition their SD cards now that Froyo has A2SD built-in.
Click to expand...
Click to collapse
Downloads over networks that aren't stable like 3G can cause bad downloads.
Froyo runs a2sd entirely on the SD card, if the app doesn't have the proper line of code specifying whether to go to SD card or internal memory I think that it won't install properly on Froyo, not sure though.
r0man said:
Froyo runs a2sd entirely on the SD card, if the app doesn't have the proper line of code specifying whether to go to SD card or internal memory I think that it won't install properly on Froyo, not sure though.
Click to expand...
Click to collapse
I'm still not sure whether it tries to use the FAT32 partition for A2SD (which I doubt since it cannot do symlinks among other stuff) or EXT2/3 on the SD card if present.
Anyways, I was fiddling with the settings more on the phone and there's a new option in the "Settings" that is "Cyanogenmod Settings." In there you can tell it whether to install to your SD card or not (it's not like the old checkbox for A2SD). I told it internal storage and the program still failed to install for the same reason.
nbetcher said:
I'm still not sure whether it tries to use the FAT32 partition for A2SD (which I doubt since it cannot do symlinks among other stuff) or EXT2/3 on the SD card if present.
Anyways, I was fiddling with the settings more on the phone and there's a new option in the "Settings" that is "Cyanogenmod Settings." In there you can tell it whether to install to your SD card or not (it's not like the old checkbox for A2SD). I told it internal storage and the program still failed to install for the same reason.
Click to expand...
Click to collapse
That is weird because I was gooing to tell you to go into CM settings and make sure to select internal. Maybe it is just the app???
sultan.of.swing said:
That is weird because I was gooing to tell you to go into CM settings and make sure to select internal. Maybe it is just the app???
Click to expand...
Click to collapse
No - no one on the market has made any comment regarding the problem. In fact everyone is saying how they love the program (minus the occasional moron).
I've had this same problem with my G1 and on a couple other ROMs on the Slide. R0man said it installed for him though on SlideMR4
Installed on my MR1V4-Remix over 3G fine. Did you try an ADB install through the SDK?
I can post for u if u wanna try that.
Sent from my MR1 V4 Remix 3G using Tapatalk
Fordude said:
I can post for u if u wanna try that.
Click to expand...
Click to collapse
Post the APK? That would be great. Thanks!
nbetcher, Froyo doesn't put the full app on SD card, just the majority of the files.
GroceryIQ
Really basic:
1. download
2. copy/move to SDK tools directory
3. From SDK tools directory (where file is downloaded) type this:
adb install com.coupons.GroceryIQ.apk
Hope this helps!
Fordude said:
GroceryIQ
Really basic:
1. download
2. copy/move to SDK tools directory
3. From SDK tools directory (where file is downloaded) type this:
adb install com.coupons.GroceryIQ.apk
Hope this helps!
Click to expand...
Click to collapse
Thanks for the upload. I already have an ADB environment setup, but unfortunately this method did not change the error. ADB returned:
Code:
pkg: /data/local/tmp/com.coupons.GroceryIQ.apk
Failure [INSTALL_FAILED_CONTAINER_ERROR]
ADB's logcat shows the same error as before (when installed using Market).
Slightly off topic, but you do ask about it, and I don't think I've seen it answered here, but in one of Eugene's thread, they do state that Froyo's inherent a2sd is all handled on FAT32 partitions. And I think on Eugene's Froyo release, it specifically runs into issues if you have an EXT partition... Just some anecdotal info.
froyo has apps2sd built in so no partitioning of the card is required. Just straight fat32 which is what it should be by default. This makes sense because the mainstream user isn't going to have a clue on how to partition an SD card and that just wouldn't be very user friendly...
And yes the froyo CM rom will have issues if your card has an ext but Eugene said apps2sd doesn't even work on the rom anyways. It's there but it does nothing.
nbetcher said:
Thanks for the upload. I already have an ADB environment setup, but unfortunately this method did not change the error. ADB returned:
Code:
pkg: /data/local/tmp/com.coupons.GroceryIQ.apk
Failure [INSTALL_FAILED_CONTAINER_ERROR]
ADB's logcat shows the same error as before (when installed using Market).
Click to expand...
Click to collapse
The apk is corrupted, apparently.
r0man said:
The apk is corrupted, apparently.
Click to expand...
Click to collapse
Nope. I used the same APK as Fordude (whom was able to install the program) provided through a reliable channel. If we took MD5Sums of both files I'd bet $10 that they're both the same.
After researching this extensively I'm coming to the conclusion that:
* This is a protected app; and
* Protected apps are broken on CM6/Espresso at the moment; OR
* There is some mis-configuration with Eugene's ROM; OR
* The kernel that is being used doesn't support a new(er) version of the dm_crypt api/module and/or the usage there-in with Froyo.
The last one in that list is the most likely, in my opinion. Many things like the camera are the first things to break in these major system upgrades since the software is using different APIs than the kernel module supports. (Remember that the kernel being used is still from the ORIGINAL shipment of this phone - 2.6.29, which is now over a year old and was specifically compiled for Espresso-stock.)
While I don't expect his ROM to be finished, I don't think this is something that anyone is even specifically aware of yet. It would be nice to know what Eugene thinks of this though.
Thanks for the help guys. Hopefully this will provide the community with some more information to make Froyo come to us quicker.
If we took MD5Sums of both files I'd bet $10 that they're both the same.
Click to expand...
Click to collapse
MD5Sum of the file I provided 38bef197bcd5133a20abf845e241ff18
Problem: Changes to the system partition are lost when Linux flushes the disk cache: http://pastebin.com/cm75Z9UA
These instructions are a workaround to provide temp root like normal plus persistence because /system /data and /cache are partitions on your SD card. This lets you reboot and even factory reset, while being able to easily restore your settings and such by re-rooting and mounting your SD card partitions back over the internal partitions.
Prerequisites:
SD card partitioned with four partitions:
6GB as fat (for your data, can be bigger or small depending on your card size)
400MB ext3 for /system
1.3GB ext3 for /data
200MB ext3 for /cache
On the phone, enable "USB debugging" in Menu -> Settings -> Applications -> Development
On a PC with the Android SDK tools (adb) installed and working:
adb push Superuser.apk /data/local
adb push busybox /data/local
adb push rage /data/local
adb push resume /data/local
adb push root /data/local
adb push rsync /data/local
adb push setup /data/local
adb push su /data/local
adb install Term.apk
adb shell chmod 755 /data/local/busybox /data/local/rage /data/local/setup /data/local/resume /data/local/rsync /data/local/root
On the phone, open "Terminal Emulator" and type:
/data/local/rage
Wait for it to say "[+] Forked NNNN childs." then press the back button.
Open "Terminal Emulator" again and it should force close.
Open it one more time and the prompt should display "#". Then type:
/data/local/root
/data/local/setup
You may need to re-root after it reloads the GUI, but then it will stick. setup is a script that mounts your SD card partitions and copies the existing. It should only be run once unless you want to erase what you have there previously. This step wont work if you SD card is not partitioned properly.
On future power-ons, run this after temp-root instead of setup:
/data/local/resume
and you should get your Android back how it was.
is it suppose to scan through all apps on phone then reboot
Thanks muchly, I'll try this when my G2 arrives.
I have a question about this method. It looks to me that what setup does is copy the entire system, data, and cache to the SD card. Then, when you run resume, it uses rsync to bring the main system (in the onboard flash) up to date from the SDcard version, and then any changes, even if not actually written to the main system partition due to the HTC copy protection, get written to the sdcard copy of the system. Very clever (if I'm reading this write, otherwise, still clever, but me not so clever as I mis-understood).
The question is this: Are there any glitches or instabilities generated by suddenly changing the system files after the OS is already booted? Do I have to make sure to do this before I begin using my phone after boot or risk making changes that I will then loose when I run resume?
Thanks again for the work putting this together!
Sheep
Sheep, you understand almost completely. Setup does copy the existing data from the internal phone memory to the SD card. However, it then (like resume) doesn't copy anything back, it just mounts the system, data, and cache partitions from the SD card on top of the internal ones.
I had issues with the internal memory reverting back after I make changes to it. It seemed to happen over a short time, or was triggered by things like mounting the SD card to a computer.
I've been using this for about 24 hours with no problems. I've done a couple fresh boots and ran resume. But I didn't test the instructions from scratch, so if anyone tests and finds a problem, let me know!
Any performance hit because of running from SD?
I haven't really noticed any.
How does this impact battery life?
Sent from my T-Mobile G2 using XDA App
Can't say, I've had my phone hooked up most of the time through adb looking for root. Just did this for fun and because I was sick of re-rooting all the time.
looks interesting I'll try it out tomorrow
Sent from my T-Mobile G2
so your sd card has to be partitioned pryor to trying this
pre-partitioned card?
thatruth132 said:
so your sd card has to be partitioned pryor to trying this
Click to expand...
Click to collapse
yes it does
texasaggie1 said:
yes it does
Click to expand...
Click to collapse
and how do i do this on a non-rooted device
thatruth132 said:
and how do i do this on a non-rooted device
Click to expand...
Click to collapse
Use your G1 to partition the card.
Brad
You can also connect your phone to a Linux computer (a LiveCD would be fine) and use gparted or fdisk. Don't forget to backup the contents of your card first!
Pretty cool. But I think I'm gonna wait for a more permanent solution....
sheek360 said:
Pretty cool. But I think I'm gonna wait for a more permanent solution....
Click to expand...
Click to collapse
There are no roms available yet any ways, so to a non dev, non cook like me, the Root is pretty much useless
I'd read that the currently available root was good until a reboot, then I saw this thread that made rerooting after a reboot much easier. Since then I've seen some posts that seem to indicate that a root may spontaneously disappear even without rebooting. Is this the case, some permissions may be lost even if you don't reboot?
I was ready to pull the trigger on this permanent-temporary root until I read that. I'd like to be able to import my old wpa_supplicant.conf file and get my corp ipsec vpn working. I'd also like to be able to get wifi-tether working (although I rarely use it), but if root won't stay 100% until a reboot, then I'm not going to bother.
Dalamak said:
There are no roms available yet any ways, so to a non dev, non cook like me, the Root is pretty much useless
Click to expand...
Click to collapse
Not true. I'm not a dev or a cook, but there are things that you can make the phone do with root besides adding a theme or ROM.
wifi tether
ipsec vpn
backups
etc...
smasraum said:
I'd read that the currently available root was good until a reboot, then I saw this thread that made rerooting after a reboot much easier. Since then I've seen some posts that seem to indicate that a root may spontaneously disappear even without rebooting. Is this the case, some permissions may be lost even if you don't reboot?
I was ready to pull the trigger on this permanent-temporary root until I read that. I'd like to be able to import my old wpa_supplicant.conf file and get my corp ipsec vpn working. I'd also like to be able to get wifi-tether working (although I rarely use it), but if root won't stay 100% until a reboot, then I'm not going to bother.
Click to expand...
Click to collapse
With temp root on the internal system partition, writes would revert back after certain things (after mounting the sd card to a computer through the phone and disconnecting it, I'd always loose root). When running /system from an sd card, no writes can be reverted because none are made, so I've never had to re-root.
how to partition an SD card?
thatruth132 said:
and how do i do this on a non-rooted device
Click to expand...
Click to collapse
I used gparted in ubuntu to do mine. Like SAINTH said, the install disk for ubuntu is also a livecd so you dont even have to install ubuntu if u dont want to
Ill try to keep this question as neat and tidy as possible. I am asking because this is just barely out of my scope of knowledge.
In linux OS's you can create hardlinks and softlinks (symlinks) in any directory that point to one specific file without that file actually existing in duplicate and taking up more space.
I was wondering if through a command line android environment (on rooted device of course) is it possible to move files to another location or drive (external SD) and trick the OS into thinking things are in place by using either hard or soft links? And if yes that could work, is this how titanium backup works?
Thanks for the info, just trying to further my knowledge base.
Of course, Android is a Linux OS pretty much like every other, as far as the filesystem goes anyway. It's the same EXT4 that's used on workstations, with the same features and limitations. "ln -s" and "ln" work just the same (depending on whether your busybox is correctly built or not, but that's another issue).
But that's rather how abn app like Link2SD works. Titanium backs up the .apk files plus a .tar file containing the settings of the app (contained in the /data/data directory).
Titanium backup is also used on rooted phones to "move" apps to SD. I'm kinda curious about how it does that. Thanks for that app suggestion, seems like a nice clean way to do some things. And thanks for the input too.
Sent from my MOTWX435KT using Tapatalk
Titanium and Link2SD work in pretty much the same way : they move the .apk of the app from /data/app to the SD, the data from /data/data and make a few symlinks (plus a few other things, like the dalvik cache contents) to make the OS think they're still in the same place, there's not much more to it than this
Awesome input. Exactly what I was looking for. Thanks.
So with a little research I may play with attempting to move some things around if I can learn about the dalvik machine a little more. And my friends used to shake their head at my tinkering with Linux..... lol
Sent from my MOTWX435KT using Tapatalk
yeah, I get the same look from my dumbwit work colleagues..
They don't understand what we all know.. ^^ They even banned me from having my phone on my desk, fanatic fools...
Hey-
I've been playing around with the shell, installed bash 3.2 according to this:
forum.xda-developers.com/showthread.php?t=537827
aaaand I was trying to make a link from /system/bin/sh to /sdcard/bash but it didn't take. The reason I want to do that is because I'm experimenting with bash 4.1 and it hasn't quite worked. But when my shell breaks I have to wait for a restore because I can't get write access to the dang /system folder (I guess you need the shell for that).
I know it's not that huge of a deal to have it all in the /system folder once it's how I want it, but I'm going to be playing with other stuff too (bash_profile, etc) and it's a bit of a pain doing the whole trial/error thing. Well, at least with how long it takes. I'm doing trial/error anyway.
So my question is why wouldn't that link work? I know I'd set the link up correctly, tried it several times in case I had a typo. Maybe I just don't understand symlinks like I think I do. I tested also something where I tried to make a link within only the /sdcard folder (always writeable no matter what, thinking that had something to do with it) and just got "operation not permitted". But on my linux box a link between directories is totally cool. Not sure what the difference is. Any help appreciated.
Something else I'm seeing that I really don't understand is that I can create links just not that have to do with my /sdcard partition. I can't even change permissions in /sdcard. From ADB. I run as root:
chmod 0644 filename
and it's as if it accepts the command, but perms stay the same. I did it not as root but it said operation denied. Why if I've got root can't I do some of these operations in /sdcard?
Scooterx3 said:
Hey-
I've been playing around with the shell, installed bash 3.2 according to this:
forum.xda-developers.com/showthread.php?t=537827
aaaand I was trying to make a link from /system/bin/sh to /sdcard/bash but it didn't take. The reason I want to do that is because I'm experimenting with bash 4.1 and it hasn't quite worked. But when my shell breaks I have to wait for a restore because I can't get write access to the dang /system folder (I guess you need the shell for that).
I know it's not that huge of a deal to have it all in the /system folder once it's how I want it, but I'm going to be playing with other stuff too (bash_profile, etc) and it's a bit of a pain doing the whole trial/error thing. Well, at least with how long it takes. I'm doing trial/error anyway.
So my question is why wouldn't that link work? I know I'd set the link up correctly, tried it several times in case I had a typo. Maybe I just don't understand symlinks like I think I do. I tested also something where I tried to make a link within only the /sdcard folder (always writeable no matter what, thinking that had something to do with it) and just got "operation not permitted". But on my linux box a link between directories is totally cool. Not sure what the difference is. Any help appreciated.
Click to expand...
Click to collapse
it's about a fat32 part? then will not work
You should post a log
Thanks, I was poking around somewhere and saw that other people have had problems if it's using a windows format. However, I'm burning my brains out trying to figure out how to see what format it uses and how to then change the format. It's the Samsung Galaxy S, and it's an internal memory card. I wouldn't think I could format it from my computer, it's not removable. Or else I'd have found out already using gparted or something (in fact I tried, said 'unallocated' is all). I *perhaps* could use gparted to format it as ext4 or whatever though, but I'm not sure the effect that'll have. I'd have to do some research.
In any case, I'd love to post a log but I'm not sure what log that is that you're referring to, would you mind telling me how to get that?
Scooterx3 said:
Thanks, I was poking around somewhere and saw that other people have had problems if it's using a windows format. However, I'm burning my brains out trying to figure out how to see what format it uses and how to then change the format. It's the Samsung Galaxy S, and it's an internal memory card. I wouldn't think I could format it from my computer, it's not removable. Or else I'd have found out already using gparted or something (in fact I tried, said 'unallocated' is all). I *perhaps* could use gparted to format it as ext4 or whatever though, but I'm not sure the effect that'll have. I'd have to do some research.
In any case, I'd love to post a log but I'm not sure what log that is that you're referring to, would you mind telling me how to get that?
Click to expand...
Click to collapse
If you work in adb post console output the same if you made that symlink from phone shell
do not forget to switch to root ("su" command )
by this you get part info
Code:
cat /proc/mtd
or system log here
Code:
adb logcat -d > logcat.txt
- it's saved to adb folder
(do not blame me if you already know these things)
also here is an interesting thread
maybe that part is mounted as read-only ?
make things simple as possible use Root Explorer/ES File Explorer (just tap screen to mount r-w)
Thanks, I liked that article you'd mentioned. Though I also tried the suggestion that was provided when I realized that /sdcard/ is really just /mnt/sdcard/ but still no dice.
I checked those logs, didn't see anything relevant. They're attached so if I just don't know what I'm looking for then someone would see it?
The /sdcard isn't read only, I'm able to write files to it.
I'm thinking really that it's just a windows format, but I still haven't an idea how to actually prove that, nor do I know how to format it for linux. Again- it's not removable. Anyway, if there's something that I need to see in the log, it'd be appreciated if you could point it out to me, thanks.
Scooterx3 said:
I'm thinking really that it's just a windows format, but I still haven't an idea how to actually prove that, nor do I know how to format it for linux. Again- it's not removable. Anyway, if there's something that I need to see in the log, it'd be appreciated if you could point it out to me, thanks.
Click to expand...
Click to collapse
-nothing interesting in log file
(a mount/df output is better here)
-also post this problem in Galaxy S I9000 sub-forum
I think your internal sdcard is vfat-type then try to format as ext4-type
here is a good article on this problem
Let me preface this by saying this is my first ever real post in a forum, so if im doing something wrong, please tell me. I would post this in the linux on android forum, but I am apparently not allowed to do that. Hopefully this helps some people out.
I have been experimenting with the ubuntu.sh script and various linux images. After getting an image to work I attempted to expand the image file by using dd. This would create a 12 gb (or whatever size) image, but on copying the file system from kali.img to the new .img, the new image failed to execute and ended up wiping my kali.img, my modified ubuntu.sh script and my new .img (my fault for rebooting with the images mounted). This and subsequent attempts all failed to create a 12 gb image that would run kali.
Before I go further, I should state that I'm mounting my images to /storage/extSdCard/mnt
So all this got me thinking on other ways to expand the file and I thought why not move ./usr to a folder on extSdCard and use mount to bind it to the kali.img file. That way you'd get about 2gb extra on the image and installed programs could be installed to space on the extSdCard. If this works it could be applied to the entire linux filesystem, and just use a small .img to mount everything to when you wanted to start it.
That being said I'm having difficulty implementing this. Kali will boot and I can execute commands from it after running:
busybox mount -o bind ../kali/usr/usr ./usr
And
busybox mount -o remount,exec ./usr
It would appear that things work, but I can't connect through vnc as vncserver isn't installed and I can't install things because of an error with dpkg: error setting ownership of ... Operation not permitted.
That is where I'm at right now. I figured I would make a post and hopefully get some more input on this, or maybe help someone out with the whole image file size thing.
Sent from my SM-N900V using xda app-developers app
I have made some progress, but this idea as a whole would appear to be impractical at this moment. The permission errors occur because of the exfat file system used on android devices. This implementation does work on ext(4) formatted sdcards, as tested by my linux box running backtrack. However, the android system, at least for the note3 does not easily support ext4 formatted anything, despite /system maybe being ext4. I haven't looked too far into that as it is read only and would also be a hassle to configure. This may become an effective means of running linux on android systems once ext4 is widely supported, but not likely until then.
If I were more skilled I would try to set up a raid system with ext4 image files, since exfat has a 4gb file size limit. Unfortunately though, I do not have the skill to do this at the moment nor the time to take on such a task.
I wish you all the best of luck with your projects.
Sent from my SM-N900V using xda app-developers app