Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 2 1 2 >
Topic Options
#364285 - 27/06/2015 01:07 Android infotainment system storage question
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
So, I installed a Tontek TA8084 (Chinese) "custom fit" infotainment head unit in my Mazda CX-5.

http://tontek.en.alibaba.com/product/601...r_warranty.html

It's really cool because it replicates fully all my car configuration menus. Being Android, it is also a lot of fun (and some headaches).


I have an Android related question.

The head unit comes with an internal 8GB storage, 5 GB of which are available to the user.
I installed a 32GB sdcard in it's external slot. Then, I used an advanced configuration menu item to "swap" the two, so that - in theory - Apps are installed in the 32GB sdcard by default instead of the 5GB storage. This without having to use any link2sd or similar apps.

But I just realized there's another 1GB (!!) storage in the unit, somewhere, and THERE many apps are installed by default. When that small 1GB fills up, I can't install more Apps.

Interestingly some Apps do install in the 32GB memory! I'd love if that 1GB storage were simply ignored. I am sure it can be done, but I don't know how. Can it?



Edited by Taym (27/06/2015 01:08)
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364292 - 27/06/2015 12:24 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
OK, I used "Storage Partition" app to discover the real partition structure of my device, and all seems clearer now.

Internal Storage 7.10GB
mmcblK0
- mmcblk0p1 - 512 KB - P1|xx|Not Mounted
- mmcblk0p2 - 6.0 MB - p2|xx|Not Mounted
- mmcblk0p3 - 10 MB - p3|xx|Not Mounted
- mmcblk0p4 - 8.0 MB - p4|xx|Not Mounted
- mmcblk0p5 - 201 MB/2106MB - p5|ext4| /system
- mmcblk0p6 - 647 MB/831 MB - p6|ext4| /data *****************
- mmcblk0p7 - 174 MB/300 MB - p7|vfat| /cache
- mmcblk0p8 - 8.0 MB - p8 |xx| Not Mounted
- mmcblk0p9 - 1.24 GB/5.74 GB - p9 |vfat| /mnt/storage/extsd1
- mmcblk0boot1 - 4.0MB - xx|xx|Not Mounted
- mmcblk0boot0 - 4.0MB - xx|xx|Not Mounted

External Storage 0 - 29.71GB
mmcblk1
- mmcblk1p1 - 1.71 GB / 29.71 GB - p1|vfat| /mnt/sdcard



So, there's is in fact a 1GB storage space which is being used for apps. Apps end up there, and not in my external storage.

What should I do to expand/extend mmcblk0p6? Is the only way partitioning my 32GB storage and creating an ext4 partition in it, and use link2SD?

I also noticed that it is not actually true that some apps used the external sd card. What happened, as far as I understood, is that TomTom and Sygic installed in the 1GB mmcblk0p6, but their maps ended up in the 32GB mmcblk1p1. Is this behaviour built into the nav apps, under the assumption that a navigation unit will come with a larger storage area for maps?


Thank you!
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364301 - 27/06/2015 19:51 Re: Android infotainment system storage question [Re: Taym]
tanstaafl.
carpal tunnel

Registered: 08/07/1999
Posts: 5549
Loc: Ajijic, Mexico
Originally Posted By: Taym
When that small 1GB fills up,
I had to chuckle at that. I come from an era when a whole gigabyte, even in a hard drive, was an unfulfillable dream. And a gigabyte of RAM? You gotta be kidding me. There probably wasn't that much RAM in all the computers in the world. Combined. smile

tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"

Top
#364303 - 27/06/2015 22:36 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
I may be younger than you, but when i managed to buy my first 1.2 GB for My BBS i remember i kept typing DIR and Enter just to enjoy all those digits.
So I hear you. smile
Still... I need more storage space. smile


Edited by Taym (27/06/2015 22:36)
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364305 - 28/06/2015 01:01 Re: Android infotainment system storage question [Re: Taym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
1GB was a special number for me, too. The first widely available and affordable IDE drive of that capacity was the Quanum Fireball 1GB, which also happened to implement the IDE DMA command set. I immediately grabbed one, and hacked Linux to support IDE DMA. Life took a large fork from that point forward. smile

Top
#364308 - 28/06/2015 05:55 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Guys, is there a particular reason why there's only 1GB storage for Apps there? Can't I just tell Android to put them elsewhere, in general?
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364309 - 28/06/2015 05:56 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Quantum Fireball was it! It was 1.2GB, wasn't it?
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364310 - 28/06/2015 09:30 Re: Android infotainment system storage question [Re: Taym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
A later rev, I think. smile

Top
#364320 - 29/06/2015 13:48 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Ok, as I learn on how Android works in this respect, I think I understand the following:

- My Android device - I would guess like every other Android device - stores all new Apps in /data, which is Partition 6 above, limited to 1GB.

- To address the storage space limit, I have now created a ext4, 15GB partition in my 32GB microSD card, so that by using software such as Link2SD, I can move my stuff currently on /data in the newly created 15GB ext4 partition, AND create symblic links into /data so that the OS finds it as expected.

This is what everyone seems to be indicating as the way to go.

This is clear and known.

My question: why can't I simply place /data onto the 15GB ext4 partition and avoid the symbolic link? What is making it impossible, practically?
I would imagine some scripted process to go like this: mount the 15GB partition as /datatemp, make a 1:1 copy of /data to /data temp, unmount both, mount what formerly was /datatemp as /data. No? Why not?


Thank you in advance!
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364328 - 30/06/2015 09:35 Re: Android infotainment system storage question [Re: Taym]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
disclaimer: I don't use android smile

Having said that I hack on android init systems a bit.

What you say will (should) work just fine.
I assume you mean mount /datatemp as /data on reboot - otherwise you'll find you can't unmount it if it's in use.
If you don't mean on reboot then you may be able to mount the sd card on top of /data and 'hide' the 1Gb partition


For the reboot approach: Android is (partially) linux, linux uses fstab files to map devices to mountpoints. Android has fstab files - you'd think...

However some vendors will hardcode mounts into the init.* scripts in root and you'll need to find how this is done on your device and change it. Basically "grep mmc /*" in the / dir (Android isn't known for being tidy with config files either)

Make sure you have a reliable way to get back into the device before hacking on any of this as it's possible to break booting.
_________________________
LittleBlueThing Running twin 30's

Top
#364329 - 30/06/2015 12:59 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
This is really helpful, thank you!

How would you mount the SD card on top of /data? What would happen exactly?

Thank you!
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364330 - 01/07/2015 02:22 Re: Android infotainment system storage question [Re: Taym]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
How?
Assuming mmcblk1p2 is the ext4 (I don't see you mention this) then:

mount /dev/mmcblk1p2 /data

What?

Imagine device A has a filesystem with a dir (/data) and a file (/data/hello)

Essentially when you mount device B on a directory (/data) in device/filesystem A the OS looks into the filesystem on B for files instead of into the filesystem on A. So /data/hello can no longer be accessed at that path - it's hidden. Instead you'd see /data/file-hello-on-B

if you now mount device C onto the same directory it will look into the filesystem on C - now you'd see /data/file-hello-on-C

Usually this is a dumb thing to do since you may as well not bother mounting B.
_________________________
LittleBlueThing Running twin 30's

Top
#364331 - 01/07/2015 10:22 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
So, the reason why this is not being done is that by simply doing that I'd have no more access to the original /data.

1. If I copied all content to mmcblk1p2 (you're correct, that's it) and THEN mounted it on /data, in theory the system should keep working seamlessly. What if there are files in use when I copy/mount? No problem, right?

2. Will this be retained at reboot?

Thank you so much!
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364344 - 02/07/2015 14:38 Re: Android infotainment system storage question [Re: Taym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Originally Posted By: Taym
What if there are files in use when I copy/mount? No problem, right?

Right.

Originally Posted By: Taym
2. Will this be retained at reboot?

No.

To happen automatically at each restart, the change would have to go into a system script somewhere. David probably has a better idea than I as to where exactly it needs to go.

Normally it would just go in /etc/fstab, but this is Android we're talking about. smile



Edited by mlord (02/07/2015 14:39)

Top
#364351 - 02/07/2015 23:00 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Thank you!

So, i found an App (Mount2SD) which, at boot, tells me there's no boot script, and asks me if I want to create it. If I say yes, some too fast on-screen messages prevent me to fully understand what happens, but one thing I see is that it puts the script in /system/etc/init.something . As I get there, init.something turns up to be an empty directory.

Also, the same App shows me the mmcblk1p2 ext3 partition, and it says it is unmounted. No option to mount it. Only to "move apps to SD", which I don't want to do just yet.

The system already has an option (an App, actually, APK Install) that lets me choose where the Apps should go. If only I could point it to mmcblk1p2 (once mounted)...
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364360 - 05/07/2015 10:50 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
After finding some time to devote to this, I managed somehow to have Mount2SD successfully mount the mmcblk1p2 ext3 partition.

Mount2SD created a boot script. Based on your input here, that is I underastand what mounts the partition upon boot.

Now, how do I tell Android to install Apps there? I don't want to move the ones already installed, nor to create symbolic links, but simply that, since now on, new apps are installed in mmcblk1p2 .

Is this possible at all?
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364363 - 05/07/2015 11:57 Re: Android infotainment system storage question [Re: Taym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
If it's now mounted over top of /data on every boot, then you shouldn't need to to anything else. New apps just go to whatever is mounted at /data.

Top
#364365 - 05/07/2015 13:53 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
No, it's mounted as /mnt/storage/extsd1-2 . I was hoping there is a way to tell Android to start installing new apps there?
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364366 - 05/07/2015 14:35 Re: Android infotainment system storage question [Re: mlord]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
Can you get at the script file it created? To edit/modify where the partition gets mounted?
_________________________
/Michael

Top
#364367 - 05/07/2015 15:31 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
I think so.

Mount2sd placed in /etc/init.d the script 10mounts2sd-runner.
I am attaching a screenshot of what it does. In int, I saw a reference to a mount2sd.sh located in /system/etc , which I also guess was created by the app. I am attaching that too.


Attachments
screenshot.jpg (134 downloads)
mounts2sd.sh (181 downloads)

_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364369 - 06/07/2015 01:38 Re: Android infotainment system storage question [Re: Taym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Gag. What the heck is that script doing in 1575 lines of code???
This is really a two liner:

Code:
#!/system/bin/sh
mount /dev/mmcblk1p2 /data


Maybe save the original script and replace it with the above two lines?

EDIT: Wait: not sure about the exact path.
The script uses _mount for everything, whereas the standard (Linux) command is mount (no underscore). Get it wrong, and your phone might not boot.

Researching..



Top
#364370 - 06/07/2015 01:48 Re: Android infotainment system storage question [Re: Taym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
On my Android (Lollipop) handset, the exact command is "/system/xbin/mount".

Dunno if that's universal or not. Does your phone have that file at that exact location? If so, then you can edit the script and replace the 1575 lines of bloat with these two lines:
Code:
#!/system/bin/sh
/system/xbin/mount /dev/mmcblk1p2 /data


Top
#364371 - 06/07/2015 09:07 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Thank you Mark!

In this way, though, I will be "replacing" the original /data with the new one, rendering the old one inaccessible, am I correct?

If so, shouldn't I copy current Apps over to the new partition before this mount command?

Thank you!


Edited by Taym (06/07/2015 09:09)
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364372 - 06/07/2015 09:08 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
... and yes, that script is awful. I have no clue as to why it is so long.
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364373 - 06/07/2015 10:55 Re: Android infotainment system storage question [Re: Taym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Originally Posted By: Taym
Thank you Mark!

In this way, though, I will be "replacing" the original /data with the new one, rendering the old one inaccessible, am I correct?

If so, shouldn't I copy current Apps over to the new partition before this mount command?

Yes, I think you suggested that earlier, too. smile
Mount the new partition elsewhere (not on /data), so you can copy the contents of /data to it, ONCE.

Then umount it, and try the suggested script command above from the "adb shell" command line, just to make sure it actually works before bricking your handset!

Not sure how familiar you are with the "adb" thing, but I find it pretty useful to get a shell (command line window) into the phone. I generally just do "adb shell" from my PC to connect to the phone over USB, and then I use "su" to become the superuser within that shell. Then do whatever.

The first time you try "adb shell" from a given PC, the phone itself will pop-up a security prompt, which has to be responded to on the touchscreen before it will allow the PC to connect.

Cheers


Edited by mlord (06/07/2015 11:00)

Top
#364374 - 06/07/2015 14:23 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Great, thank you! smile

No, I am not at all familiar with adb. I assume that requires Linux on a desktop, correct?
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364376 - 06/07/2015 15:29 Re: Android infotainment system storage question [Re: Taym]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
Looks to be available for Windows, http://adbshell.com/downloads
_________________________
/Michael

Top
#364381 - 06/07/2015 22:15 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Thank you guys. I'll keep you posted on how it goes. Not much time to play with this these days, but I hope to give it a try by EOW.
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#364382 - 06/07/2015 23:46 Re: Android infotainment system storage question [Re: Taym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
The Android tools (adb, fastboot) are easiest from a Linux box, because they don't require any special drivers to be installed. More troublesome from Windows, and dunno about Mac.

Cheers

Top
#364383 - 07/07/2015 19:25 Re: Android infotainment system storage question [Re: Taym]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
One more question, guys.

Let's suppose I start the unit with a different microSD, not containing the ext3 partition (mmcblk1p2) referred to in the boot script.
This is the case when I have to plug the microSD in containing just the firmware upgrade. In fact that's just how the unit works: start the system upgrade process and it will look for the firmware img files in that microSD slot.

Now, what happens? The boot script is run and... ? Mount will fail and I am back to the original /data? Or, will the system hang?
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
Page 1 of 2 1 2 >