Need help unpackimg boot img - Ouya Q&A, Help & Troubleshooting

I checked around and I found some stuff for GS3 but nothing for ouya. I'm looking into checking out the boot image to make changes so my usb drive shows up as an sdcard. I've made some changes to init and vold files, but on reboot, the init gets replaced. I want to look at the boot image to see what I can change to enable something like this. Older version of the ouya firmware were having issues with usb drives not being mounted and the solution was to change the vold file to mount usbdrive in mnt/sdcard; which is what I want. Ouya devs heard our cries so secondary_storage in the other init file is listed for the mmc now and it labels usbdrive as external_Storage , to be mounted to mnt/usbdrive. I've got some games that don't save files to an external usbdrive and keeps looking for external storage that is NOT a usb drive; ie sdcard.
Namely the app I want is worms armageddon. I'm tired of using my fat thumbs to rope around. I want to try it out with the joystick.

Related

[Solved][Q] Recovering dead/dying SD card, fixing A2SD permissions

Hi,
I was organising my computer today (ironically in preparation for a backup) and plugged in my phone to copy files and it wouldn't mount or ask for the type of connection. I went to unmount it in Android and it said the size was '00'. I put the card in a card reader and did a check and it seems a few sectors have gone bad (which implies the reserve pool has filled too). That would explain the way it has been pausing for long periods of time when copying files (haven't done that in a month or so).
I've managed to copy all but one of the .apk files in /sd-ext/app and /sd-ext/app-data. If I put these (plus an empty dalvik-cache) on a new partition on a new card will A2SD+ be happy (apart from the one broken app of course)? Does each .apk have special permissions per app or anything? I should probably do a full wipe but I'm trying to hold out for official gingerbread. I tried to do a nandroid backup but clockworkmod says 'cannot stat /sdcard'
I haven't managed to get much of the FAT32 partition as it keeps dying after a few I/O errors and requires me to re-plug it (every sector comes up with I/O errors even when they are fine). I managed to get some files that I have nowhere else using ddrescue on individual files (a full image doesn't work because of the endless errors after a while). I think I may have made things worse as I stupidly didn't mount the drive in read-only mode. Now android mounts the SD card in read-only mode too, where it wasn't doing that earlier today. I did notice a few I/O errors in the android system log when I was trying to figure out the problem.
I'm misisng some (fairly unimportant) photos because the DCIM/100MEDIA folder seems to have lost it's directory listing. Does anyone have any suggestions for tools to recover these? I tried photorec but it only seems to find the thumbnails. I can't get the partition to mount on Windows but it more or less works on linux. According to HD Tune disk scan (chkdsk just freezes), the number of bad blocks is actually fairly small.
I did a whole pile of app updates yesterday which must have pushed it over the edge (many of which failed due to 'insufficient space' on the A2SD partition). The phone still mostly works (since most apk files are readable and the settings are stored on the phone).
Does dalvik-cache get updated much? I'm worried it might hugely shorten the life of a new card.
Thanks
Running Leedroid 2.4 A2SD+
Ok, I've got a new 16GB MicroSD card.
I can't get Android to recognize the apps in the A2SD partition, it regenerates the dalvik cache though. I've tried setting the .apk files to be globally readable and writeable.
Any ideas?
Yay, got it working
It turns out you need to run fix_permissions.sh, as Android does care about apk files and data files having the same permissions. fix_permissions did some strange changes to data permissions but it all seems to work bar needing to re-add most of my widgets to GoLauncher. Leedroid doesn't include fix_permissions but after much hunting (most links I found were broken), I managed to find it on cyanogenmod github.
https://github.com/CyanogenMod/android_vendor_cyanogen/raw/gingerbread/prebuilt/common/bin/fix_permissions
Just copy it to the SD card and run from ADB shell (or a terminal):
Code:
su
chmod +x /mnt/sdcard/fix_permissions
sh /mnt/sdcard/fix_permissions
Note that you must use sh, just ./fix_permissions gives permission denied for some reason.
Edit: seems it didn't correctly fix apps in app-private (of which I only had 2). I just reinstalled them (probably possible to fix them manually by looking at the owner in /data/data and chown the apk).

[Q] Path Substitution Not Working

I picked up a USB flash drive to use for my Kodi thumbnails so I wouldn't keep running out of space on my Fire TV. I mounted the drive using stick mount, then added the code below to my advancedsettings.xml file, but I don't believe it's working. I'm assuming that when I pop the flash drive into my computer, I'd be able to see a bunch of thumbnail files on there, wouldn't I? But my thumb drive is blank. Below is the code I'm using. Am I missing something? Is my path in the TO line not specific enough? (I created an "xbmcthumbnails" folder on my flash drive.)
<pathsubstitution>
<substitute>
<from>/storage/emulated/0/Android/data/org.xbmc.kodi/files/.xbmc/userdata/Thumbnails/</from>
<to>/storage/usb/drive1/xbmcthumbnails/</to>
</substitute>
</pathsubstitution>
I don't think StickMount mounts USB drives as "drive1". It should be mounted at "sda" or "sdb"... You can use the "mount" command to see how your USB is mounted. Nothing to do with your issue, but StickMount worked correctly for me initially, but it never unmounted drives and wrongly showed mounted USBs when no USB was hooked to FTV. Plus, I could never mount USBs using volume names (instead of sda..) with StickMount. There is another app that worked very good for me, USB OTG Helper. Last I checked a while back, USB OTG app didn't do that either.
On a related note, the "from" tag can use Kodi special paths to identify locations within its install. You can modify your "from" tag to
<from>special://masterprofile/Thumbnails/</from>
This holds if you have not created any profiles in Kodi. If you have, check "special://profile". For reference, see http://kodi.wiki/view/Special_protocol
dbdoshi said:
I don't think StickMount mounts USB drives as "drive1". It should be mounted at "sda" or "sdb"... You can use the "mount" command to see how your USB is mounted. Nothing to do with your issue, but StickMount worked correctly for me initially, but it never unmounted drives and wrongly showed mounted USBs when no USB was hooked to FTV. Plus, I could never mount USBs using volume names (instead of sda..) with StickMount. There is another app that worked very good for me, USB OTG Helper. Last I checked a while back, USB OTG app didn't do that either.
On a related note, the "from" tag can use Kodi special paths to identify locations within its install. You can modify your "from" tag to
<from>special://masterprofile/Thumbnails/</from>
This holds if you have not created any profiles in Kodi. If you have, check "special://profile". For reference, see http://kodi.wiki/view/Special_protocol
Click to expand...
Click to collapse
This will also work:
<advancedsettings>
<pathsubstitution>
<substitute>
<from>/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/Thumbnails/</from>
<to>/storage/emulated/0/usbstorage/sda1/kodithumbnails/</to>
</substitute>
</pathsubstitution>
</advancedsettings>
dbdoshi said:
I don't think StickMount mounts USB drives as "drive1". It should be mounted at "sda" or "sdb"... You can use the "mount" command to see how your USB is mounted.
Click to expand...
Click to collapse
he is likely using Busymount
which does mount as drive 1, again nothing to do with his issue though
jmerrilljr2 said:
This will also work:
<advancedsettings>
<pathsubstitution>
<substitute>
<from>/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/Thumbnails/</from>
<to>/storage/emulated/0/usbstorage/sda1/kodithumbnails/</to>
</substitute>
</pathsubstitution>
</advancedsettings>
Click to expand...
Click to collapse
This appears to have done the trick, thankyouverymuch! I've got a new folder on my thumb drive called kodithumbnails, which contains folders for every letter of the alphabet. So it looks like it's working.
The only snag is now movie cover art doesn't appear, just the text name and a blank space above it. Another gentleman on this forum told me that this was expected behavior, and that I'd need to go in and delete a file from my Fire TV in order to bring the movie covers back, but I was not successful in finding the file (using ES File Explorer) anywhere on my Fire TV. I was looking for a file called "textures13db." Might that have changed with the update to Kodi? Or how else might I go about bringing back the cover art?
From within kodi itself
Raymondo17 said:
This appears to have done the trick, thankyouverymuch! I've got a new folder on my thumb drive called kodithumbnails, which contains folders for every letter of the alphabet. So it looks like it's working.
The only snag is now movie cover art doesn't appear, just the text name and a blank space above it. Another gentleman on this forum told me that this was expected behavior, and that I'd need to go in and delete a file from my Fire TV in order to bring the movie covers back, but I was not successful in finding the file (using ES File Explorer) anywhere on my Fire TV. I was looking for a file called "textures13db." Might that have changed with the update to Kodi? Or how else might I go about bringing back the cover art?
Click to expand...
Click to collapse
You need to go to in Lodi itself settings/file manager/database/ highlight textures13.db and press c if using a keyboard or long press on your remote to bring up the context menu then press delete

[APP][4.1+][ROOT] VirtualFAT - FAT emulation app

Hi all,
I have been really annoyed that the newer Android versions don't ship with mass storage function any more (and my pc doesn't play nice with mtp). So I made an app.
What it does:
You can pick (almost) any file/folder on your phone using the app and create multiple virtual drives. The picked items will then be used to create a FAT16/FAT32 formatted image without using any disk space. After that it will be handed to the USB driver which makes it visible on your PC, ...
For now it is READ-ONLY
Other things:
I plan to opensource (BSD licence probably) the entire thing and keep it without ads. Before I do that however I want to put it on the play store (to avoid someone stealing my work and selling it). Your opinion decides if I consider getting a dev licence from google or if the project ends up dead somewhere on my server.
So far I have tested the app on 2 phones (Nexus 5 running CM12 and a Galaxy S3 running slimkat stable 9)
Now I'm looking for feedback and testers.
Hi,
i tested today your app. The idea for the app is really cool, when its faster then mtp.
I tried it on my LG G2 D802 LP 5.0.2 (Stock Based Cloudy 3.3 and Dorimanx Kernel)
I got it working one time and it showed me a 1,99mb drive on my pc.
Now i get the error
Code:
stderr:directory is not empty[E]failed to create disk image
unable to mount disk
The log debug files are nearly empty:
xml
Code:
<?xml version="1.0" encoding="UTF-8"?><fs>
<directory name="fat"/>
</fs>
xmld
Code:
<?xml version="1.0" encoding="utf-8"?><fs><directory name="SMQ" /></fs>
Thanks for testing it.
The xml-log files are only useful if the drive is recognized but appears corrupt
The error you posted tells me that the temporary folder for the mount point is not an empty directory (admittedly, the error message could use work).
Make sure that /data/data/com.wimm.be.virtualfat/cache/fuse does not contain any files.
If it contains two files 'vfat' and 'config' then a reboot should fix it. Let me know if that solves it or if the same problem keeps popping up.
A reboot fixed the problem
But how can i dismount a image or restore the normal mtp mode?
Because when i mount an image and look at the bottum i can read "no image mounted" but it is mounted and works fine on the pc.
Now it would be cool to unmount, edit settings and remount again.
After a reboot its getting mounted automatically
Normally the big button should turn green (like in the first screenshot of the first post) and pressing it again restores the previous USB settings (MTP, tethering, etc...).
When you press the button are there any messages other than "successfully mounted disk"?
Can you mount an image and check if the file "/data/data/com.wimm.be.virtualfat/cache/fuse/config" exists and what the contents are if it does?
When i press the mount button i get the message PopUp "successfully mounted" and its working.
When i open now the app its telling me still "no image mounted" and its still grey because of that i think i cant unmount it.
After mounting the fuse folder is still empty but in the cache folder i have com.android.opengl.shaders_cache and last_usb_config.txt
Hmm
It shouldn't work if those files don't exist.
Can you check what the content of the file "/sys/class/android_usb/android0/f_mass_storage/lun/file" (or lun0 if the other one doesn't exist) is after mounting?
Hi
The app after mounting
The lun folder
Sent from my LG-D802 using Tapatalk
Open the file called 'file' from your second screenshot with a text editor and post it here please.
It should say "/data/data/com.wimm.be.virtualfat/cache/fuse/vfat".
Lastly can you check if a programm called "libvirtual_fat.so" is running after mounting?
you can use a terminal emulator and type
Code:
ps | grep "libvirtual_fat"
or your favourite task manager (you might need to tell it to show root processes).
Hi,
everything is as u said
/data/data/com.wimm.be.virtualfat/cache/fuse/vfat
0:00 /data/data/com.wimm.be.virtualfat/lib/libvirtual_fat.so /mnt/shell/emulated/0/VirtualFAT/dcim.xml /data/data/com.wimm.be.virtualfat/cache/fuse
Mmmh
Sent from my LG-D802 using Tapatalk
I don't know why the button is not working for you then.
The part responsible for creating (and removing) those files is running, you can see it working on the PC but the app can't see the files....
On all the phones I could test it on the button was highlighted and the name of the config was shown below it even after killing the app and restarting it.

Directory Bind and AFTV2

I'm trying to bind the "Android" folder on my Fire TV 2 to the "Android" folder on my HDD but it doesn't seem to work using the all "directory Bind". Has anyone been able to bind directories on the 4K Fire TV after acheiving Root access?
Edit: OK, I'm stuck. I tried Directory Bind with absolutely no luck. Then I tried Folder Mount but that required a bind of every individual folder. That's just not happening! Lastly I tried Link2SD but this app will not pickup on my USB drive. this really sucks. What's the point of having a 1tb hard drive and root access if I can't bind the damn drive. Hell, even the OUYA doesn't have these issues. WTF Amazon?!
Updated Findings for "Directory Binding"
I guess nobody around here gives a damn that the storage on the Fire TV 2 is seriously gimped. With that said, here are my findings.
NOTE: THIS IS ALL ABOUT THE AFTV2
Directory Bind
https://play.google.com/store/apps/details?id=com.vanpit.android.directorybind
DOES NOT WORK
Folder Mount
https://play.google.com/store/apps/details?id=com.devasque.fmount
Works with some MAJOR limitations on the Fire TV side of the fence.
* First off, Folder Mount has a issue where you can't add your license for the full version onto your Fire TV. This is due to there being no proper Google Play solution. I've already sent an email to the developer so hopefully that person can help me around the issue.
* Secondly, with the free version of Folder Mount you can bind up to three games. Sadly you cant do the whole "Android" folder as well as "data" and "obb"
* You can however, bind a game's individual folder WITHIN "data" or "obb". The catch is, you need to have a "stub" (to use a term from the Wii hacking scene) folder in the original location.
For example​
Let's use Asphalt 8. The meat of this game (BEFORE binding) is within this location: storage/emulated/0/Android/data/com/gameloft.android.AMAZ.GloftA8AS
the folder is 1.56 GB
- before binding, copy/paste this folder onto your desired location within your external USB hard drive.
- Go back to the original folder and erase everything out of it. By doing this, you are creating the "stub" that the Fire TV needs so it can believe that the files are still in the proper location
- head back to Folder Mount and create a binding, giving proper folder locations and...
- Start game and play.
If you check your internal storage within the Fire TV settings, you can clearly see that the space the game used to occupy has now been freed. This alone would be a perfect solution if it wasn't for one thing. We need a place to stick the original APK files. I tried mapping the ASEC folder. - needless to say, it was a f***ing mess! From what I can see, the ASEC folder is used primarily for apps that have been pushed to the SD card. The moment I tried binding that folder, most the apps pushed to SD was in a "not found" state for Fire OS. If someone could figure out where apps are "installed" to, on the Fire TV 2, I would be willing to test a bind.
Speaking of the SD cards Fire OS does this hocus pocus bulls**t with them. Bind the ASEC folder and you might get 2 or three SD removed apps to show but all others will be "not found". Try binding the entire SD card to a folder of your choice and Fire TV will get VERY "sometimey" with you. Sometimes you might have a card at the capacity of whatever card you have (in my case 4GB for testing). Sometimes it will show that you have a card inserted with NO space available. See what I mean? utter bull****! It's as if the Fire TV reads the physical capacity and locks things there.
One more note. The freggin Fire TV 2 is obsessed with stub folders. It makes things a pain in the ass when you're trying to figure out which folder is the "real" one. At one point I had stubs in three locations. Talk about an annoying patchwork system for file management. Ugh!
I'm done for now. Hopefully this will give someone a starting point for helping this community fix the biggest problem with this Android device. Seriously, the team behind the 4K Fire TV should be kicked in the rear end for this screw up! I get wanting to lock things to some degree but at least let me install as many games from YOUR store that I want and not limit me to 5 really good ones at a time.
Have you tried using ln from an adb shell? Was able to get this working for a single file earlier today with this method, not sure how well it works for directories.
thepacketslinger said:
Have you tried using ln from an adb shell? Was able to get this working for a single file earlier today with this method, not sure how well it works for directories.
Click to expand...
Click to collapse
Haven't tried ADB shell yet. I'd like to see what others can come up with at this point. I'm also waiting for a response from the dev of Folder Mount. Hopefully I'll get a response within a few hours. Otherwise I'll be waiting for someone to bring property Google Play support so that I can use my Folder Mount license.
@lightykd thanks for sharing your findings. The tiny storage of the Amazon FireTV has always been an annoyance. It became a hindrance once I started using an app that downloads media files. FolderMount seems to work for my purposes. It has allowed me to pair the local media folder ("source" in FolderMount terminology) with a matching folder on my SD card ("destination") so that files written to and read from the source are transparently redirected to the destination.

Fire Stick 4K Non-Rooted with USB OTG and mounting

Hello, I have a FTV 4K Stick non-rooted with an 8 GB USB stick connected to it via OTG cable and wanting to move few apps and some app files (without moving the app itself) to it. It seems there are couple of ways to do it, but neither approach "seems" to give me the entirety of what I would like to do. In both cases, I start out with the USB formatted as FAT32 using Rufus.
Approach 1:
I insert the USB. Next, I run " sm list-disks" which correctly shows my USB. Next, I run " sm partition disk:8,0 private". I reboot FTV and when I run "df -h" or "cat /proc/self/mountinfo" or "cat /proc/self/mounts", I see this USB change its format to Ext4 and the mount point is at "/mnt/expand/GUID". With this I can move apps with "pm move-package PACKAGE GUID" to the USB and all is good. The problem is, I cannot drill into this mount point to see what is inside. I am assuming it has similar structure like the internal storage (like /Android/Data...) As I cannot see what's inside, I don't know where I can put app files (but not the whole app itself). Is there any way to drill into this and see what files reside in it for the apps that I moved using the pm command?
Approach 2:
I insert the USB. I don't run any sm commands. When I run the "df" or the "cat" commands, I see the USB mounted at "/storage/UUID" instead of being mounted at "/mnt/expand" and the format of the USB stays as VFAT. In this case, the UUID is 8 characters long instead of a GUID that I get in the previous approach. I can now drill into this mount point and see the structure and move app files to it. The problem is, the "pm move-package PACKAGE GUID" command fails with error of "-6". In the command, the GUID is the 8 character long string that I get at "/storage/UUID".
So, to summarize, with Approach 1, I can move apps but not app files. With Approach 2, I can move app files, but not the apps themselves. I am missing something and there must be a way to combine the approaches. Any help is appreciated.
Expand Internal Storage On 4K Firestick with a USB Drive | TechDoctorUK
www.techdoctoruk.com
You can move apps using the instructions.
Got it, I had to learn about portable and adopted storage. All good!

Categories

Resources