You don't need to write an app, there is already one designed to do this, as I've directed you to.
Yes, it shows a .nds on the cart, but this is a very small "rom" that just steals the header from a legitimate game, with some code to load the kernel from SD card. There isn't enough space to write full games on there.
Let's say there was enough space, bootleg carts like this don't really work on 3ds anyway (although it's possible that custom firmware might be able to lift all the checks and allow it to run.) Flashcarts work by exploiting a vulnerability that bypasses the antipiracy check, a part of this exploit involves using a legitimate game to spoof itself as. There are only a limited number of games that this exploit could work on though. This is why the AK2i never got updated to work on 1.4.5 firmware (an over-simplified explanation, but you get the idea.)
Download play should work just fine via nds-bootstrap nowadays, and if you want individual games showing up in activity log, might I suggest using forwarders?
yes, I know how it work, I already have Luma3DS so all carts are whitelisted, (including homebrew and fake TitleIDs) I was using Luma every since SoundHax on 9.2
I know Download Play works from cart-to-console, but it doesn't work from cart-to-cart (for example HGSS to BW transfer or B2W2 and DR bonus content), and yeah, I could use forwarders, but they would use nds-bootstrap, which doesn't work too well last time I've checked (long ago)
and you said there was already an app to flash the carts? the link you showed me was for the inner SD card, if I were to flash the rom as a firmware, that would permanently become a game cart for that ROM, correct? I want to make an app that I can push a ROM from my console into the flashcart instead of flashing the cart
in regard to space, yeah, I know it can be an issue, these flashcarts were never meant to be used this way, so the makers had had no need to make anything special about them, but, I believe, as some form of anti-piracy, the ROM inside an official game cart needs to be 127MB, 256MB or 512MB, so it's maybe probably possible with some luck that the flashcarts have enough for a simpler game
either way, thank you for informing me, I'll dig deeper when I can