New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
Unkn0wnM3m3 opened this issue
Dec 31, 2017
· 21 comments
Comments
I got a Samsung Galaxy Note 4 T-Mobile. I Tried to flash a ROM on my phone and it simply said,
Failed to map file ‘/externel_sd/1-HAX/RaceRom_N7_Port_V13_Aroma_by_LocDog_and_keki7.zip Error installing zip file ‘/externel_sd/1-HAX/RaceRom_N7_Port_V13_Aroma_by_LocDog_and_keki7.zip’
I am new to this stuff, can someone explain to me what I did wrong and how I can solve it?
Unkn0wnM3m3, pgonin, Bee777, and softwarecreations reacted with confused emoji
Also, in updater-script, it does not identify a specific model. So, I don’t think that it has to do with that.
If it helps it’s an aroma Rom
But I can’t flash gapps either
I have a Galaxy S3 (i9305) and I also get this error message when trying to install a ROM
I had the issue with LineageOS and Resurrection Remix OS ROMs
I tried on both external SD and internal stroage (/sdcard/)
I can track the error in the code to minzip/SysUtil.h
Apparently the zip file cannot be mapped into memory
/*
* Map a file into a private, read-only memory segment. If 'fn'
* begins with an '@' character, it is a map of blocks to be mapped,
* otherwise it is treated as an ordinary file.
*
* On success, "pMap" is filled in, and zero is returned.
*/
int sysMapFile(const char* fn, MemMapping* pMap);
and I am actually using twrp-3.2.1-1-i9305
but I don’t think it makes a big difference
I encountered the same problem with LOS and AICP on my gt-i9305.
edit: flashed older version of TWRP — 3.0.2.1 — flashing works. Latest version is broken for S3.
Same for me flashing works with older version of TWRP — 3.0.2.1
@Atexor thanks for sharing !
Same here, twrp 3.0.2.1 works fine, the newer versions give the failed to map error when installing lieageos
I apologize for not seeing the existing feedback sooner. If you haven’t already, please direct your attention to build 3.2.1-2 linked in my thread, and give any feedback. I came across this issue thread here entirely by accident, so please leave feedback on XDA.
@ripee no problem regarding feedback, especially since we had a workaround.
I can give build 3.2.1-2 a shot but sorry for the dumb question, what do you call your ‘thread’ ?
@pgonin, this is my thread: https://forum.xda-developers.com/galaxy-s3/development-i9305/recovery-twrp-3-2-1-0-t3741413
I set out to build an officially supported twrp so that new versions would be built automatically with minimal changes to the source code in the long term. This mapping problem is also plaguing my Galaxy S2 i9100 twrp, I’m mentioning it here because both the i9305 and i9100 use the same kernel.
I suspect this has something to do with either the partition sizes or the way my build handle the external SD card.
For those of you experiencing problems with my builds, are you able to flash anything from internal storage or is it impossible to flash from either internal or your SD card?
I’ve just completed work on the Galaxy S2 GT-I9100, which uses the same kernel as the GT-I9305. I managed to overcome the «Failed to map» error by first extracting the boot.img file from the zip of the rom I intend to flash, flashing it in 3.2.1-1, then flashing the rom zip as usual.
The reason this is necessary is that twrp 3.2.1 is ahead of its time lol. Unless and until Oreo comes to the S3 and I can update my twrp device tree accordingly, this is the best way to migrating to 3.2.1 to ensure Oreo compatibility in the future.
I had a stock Galaxy S2, installed TWRP and boot using
sudo heimdall flash --repartition --pit Part-i9100-sys2gb-apps4gb-data8gb.pit --KERNEL boot.img --RECOVERY twrp-3.2.2-0-i9100.img
and afterwards tried to install LineageOS by first swiping cache, system and data and then installed lineage-14.1-20180329-nightly-i9100-signed.zip from an SD-Card, and I also got the error.
A workaround is to download twrp 3.1.0, to execute
sudo heimdall flash --repartition --pit Part-i9100-sys2gb-apps4gb-data8gb.pit --KERNEL boot.img --RECOVERY twrp-3.1.0-0-i9100.img in download mode and to install everything from there.
It would be realy nice if this would be working with newest twrp again.
Faced the same issue with Galaxy S2 i9100 and twrp-3.2.3-0-i9100.img
Initial attempt was to follow official LineageOs guide, which failed (don’t remember exactly all the reasons already, but one of them — I had hard time replacing ClockworkMod recovery with TWRP)… Then found this detailed explanation on reddit and started experimenting with repartitioning.
Well… After some failed attempts faced with «failed to map» file errors and found this issue.
In the end followed suggestion of @rojanor and went all the way to 3.0.2-1, which did work!
So, here is the winning sequence (in my case):
heimdall flash --repartition --pit I9100_1.5GB-System_6GB-Data_512MB-Preload_by-the.gangster.pit --KERNEL boot.img --RECOVERY twrp-3.0.2-1-i9100.img
followed by
adb sideload lineage-14.1-20180920-nightly-i9100-signed.zip
@ripee: Could you please mention in your [RECOVERY][OFFICIAL] TWRP 3.2.3-0 [I9100] that this specific version not always works? If you need help with testing recovery fixes on i9100 — just ping 😉
Faced the same issue with Galaxy S2 i9100 and twrp-3.2.3-0-i9100.img. Solved by twrp-3.0.2-1-i9100.img. Any fix down the pipe?
My solution for this was to repackage the zip file…..
# downloaded zip file that fails to map $ file firmware_5.1.7_oneplus5t.zip firmware_5.1.7_oneplus5t.zip: Zip archive data, at least v2.0 to extract # extract it $ unzip firmware_5.1.7_oneplus5t.zip $ ls firmware_5.1.7_oneplus5t.zip firmware-update META-INF RADIO # remove old zip $ rm firmware_5.1.7_oneplus5t.zip # repack new zip $ zip -r firmware_5.1.7_oneplus5t_repackaged.zip * [...] $ file firmware_5.1.7_oneplus5t_repackaged.zip firmware_5.1.7_oneplus5t_repackaged.zip: Zip archive data, at least v1.0 to extract
The latter file succeeds to map and install.
The actual problem seemed to be that my adb push somehow didn’t upload the original file:
-rw-rw---- 1 root sdcard_rw 63795954 2018-12-27 19:13 firmware_5.1.7_oneplus5t_repackaged.zip
-rw-rw---- 1 root sdcard_rw 0 2018-12-27 18:32 firmware_5.1.7_oneplus5t.zip
=> make sure the file was properly sent to your device!
Note that the official TWRP 3.2.3-0 [I9100] FAQ addresses the issue of «fails to map file» when trying to flash a ROM on Samsung Galaxy S2 i9100 using TWRP 3.2.3: you need to extract the boot.img file from the ROM’s zip, flash this boot.img first, then flash the ROM.
(Alternatively, as several people above have said, you can also downgrade your twrp by flashing TWRP 3.0.2 or 3.1.0, rebooting into recovery, and then flashing the ROM.)
I have a Samsung Galaxy S2 i9100 with TWRP 3.2.3. I successfully flashed boot.img, but then when I try flashing the LineageOS zip archive it still fails with the «Failed to map file» error.
Closing. Please re-open a new ticket if this targets 3.3.0
Same error in 3.3.x for i9305.
By this 4pda post you need to check your board name (after disassembling a tv box). If your board name look like this — MXQ-RK3328-D4_A, then your img name should be called like that — mxq_rk3328_d4_8.1_8189-6051_20180828_r1.img. If your board name without d4, then you should find img build without d4 postfix name.

Also should be mentioned, when I upgrade by OTA — zip file. I have a recovery.img file with zip one. And you can’t do zip build just by zipping img. They differs and while building Android build by SDK, this files are separate in output directory.
All tools should be run with admin permission.
As ts18056 mentioned, find a button inside the AV port.
- Download and install Android Console Tool.
- Open Android Console Tool -> Upgrade firmware -> Firmware.
- Choose your img build/firmware.
- Activate Fastboot mode by pressing button inside AV port, install USB while pressing this button (E2E USB A cable into the USB port near HDMI port).
- Below should be the message
Found One LOADER Devicesafter that stop pushing the AV port button. - Press UPGRADE.
- Go to the TV and install the TV STB (First turn on will take 3-5 mins).
You can find firmware here and other instructions / upgrade methods.
Maybe you can burn it with like Amlogic board, but I’m not sure with that.
In case of Amlogic boards you need a CP2102 USB UART Board (type A) with E2E USB A cable. After a UART connection to the board, through kermit tool set the board to burn mode. Then you can burn an img build with Amlogic USB Burning Tool or with this bash script.

Hello,
I have a problem with my mobile acer liquid Z330. I would like to update but I have this message
installing update…
E: failed to map file
installation aborted
Could you help to resolve this?
Thank you very much 
0
FAQ & Answers
-
Hi
Thank you for you for your reply, okay I understand but my phone is «bricked» on the first screen, so I have no idea how to make room…
I’m looking for a program to make a system.img file. Converter doesn’t work on my old vista 32, do you know if an other program exists but for a windows 32bit?
Thank you very much for your help

0
-
We are not aware of a program to make the .img file but you might post your question to an Android forum and see if other users can make some suggestions for you on what to use.
https://forums.androidcentral.com/
0
-
It is used to link the CSS source code to less source code in the chrome dev tool. But if include the map file in the page with bootstrap CSS file. you can see the less code which applies to the element style you want to inspect.
In most cases, the cost of the repair will exceed the value of the printer.
Printer Repair helps you to solve your all printer issues quickly and at affordable prices.
0
-
It is used to link the CSS source code to less source code in the chrome dev tool. But if include the map file in the page with bootstrap CSS file. you can see the less code which applies to the element style you want to inspect.
In most cases, the cost of the repair will exceed the value of the printer.
Printer Repair helps you to solve your all printer issues quickly and at affordable prices.
0
Who’s Online912
![]()
123433
Andrew_Sn
aubertin64

brummyfan2
Digasnew
DrMichaelLang
eksjedi
FurkanYılmaz
![]()
HelioH

JackE
Kryptosyte
NitroBoost
NoInterest777
Panca
+898 Guests
Join in, share your experience!
It looks like you’re new here. Sign in or register to get started.
Assistance by Acer
This Month’s Leaders
![]()

Сообщения: 4
Вчера сделал материал воды с отражениями и т.п. Все хорошо прошло, сохранил ошибок тоже не было. Утром зашел и увидел вот такую вот ошибку
Failed to load map!
../../../../../../Users/1/Documents/Unreal Projects/MyProject/Content/StarterContent/Maps/Minimal_Default.umap appears to be an asset file.
проект открывается, но там пусто, устанавливать новую версию и с нее запускать пробоал, перезагружать и прочее очевидные вещи тоже. Кто сталкивался? Подскажите как быть.
![]()

Сообщения: 4068
в папе avtosave ищи, старые версии карты
![]()

Сообщения: 4
Старые версии? что имеете ввиду? Мне выдает что в стартовом контенте проблемы я так понимаю. Загружал контент(вроде версии старее, нежели той на которой сейчас работал), но в ошибке про доп контент нету ни слова. А в стартовом контенте все так же, ничего не загружал. Я так понимаю проблема с файлом (Minimal_Default), а что именно с ним непонятно
![]()

Сообщения: 4068
старые версии файла Minimal_Default автосэйв работает примерно каждые 10-15 минут, вообщем сможешь восстановить свою карту с минимальными потерями.
![]()

Сообщения: 4
Удалил из папки autosave все версии кроме последней и тот же результат.
![]()

Сообщения: 2319
![]()

Сообщения: 4068
blizz_J писал(а):
Удалил из папки autosave все версии кроме последней и тот же результат.
если ты очистил корзину, то ты удалил рабочие варианты, а себе оставил не рабочий. В любом случае проверь последний, возможно он рабочий, удали(измени) в имени файла «_avto», имя файла должно получится идентичным имени файла в твоем случае Minimal_Default, заем ctrl+c — ctrl+v и замени полученный файл на существующий в проекте.
Короче
1 взять файл из автосэйв,
2 изменить его имя
3 вставить в нужное место в проекте, заменить файл — Minimal_Default.
![]()

Сообщения: 4
Попробовал сделать так, тот же эффект. Похоже с этой проблемой ничего не поможет(
А не знаете почему возникает такая проблема?
![]()

Сообщения: 2319
в анриале есть встроенная система контроля версий — раз
уже этого достаточно чтоб перестраховаться от проблем.
два: при любой поломке правило номер 1 — никогда не удаляй бекапы(автосейвы в данном случае), то есть вообще никакие не удалять, ни старые, ни новые. Наоборот можно их даже продублировать пока не восстановлено исходное состояние.
возникнуть в любой момент времени может произвольная проблема, баги есть везде, и пользователь косячит регулярно. Так что причина ошибки не столь важна, важно иметь возможность восстановить данные.
_________________
we need to go deeper
В этой статье я хотел бы рассказать о такой замечательной штуке, как файлы, отображаемые в память(memory-mapped files, далее — MMF).
Иногда их использование может дать довольно таки существенный прирост производительности по сравнению с обычной буферизированной работой с файлами.
Это механизм, который позволяет отображать файлы на участок памяти. Таким образом, при чтении данных из неё, производится считывание соответствующих байт из файла. С записью аналогично.
«Клёво, конечно, но что это даёт?» — спросите вы. Поясню на примере.
Допустим, перед нами стоит задача обработки большого файла(несколько десятков или даже сотен мегабайт). Казалось бы, задача тривиальна — открываем файл, поблочно копируем из него в память, обрабатываем. Что при этом происходит. Каждый блок копируется во временный кэш, затем из него в нашу память. И так с каждым блоком. Налицо неоптимальное расходование памяти под кэш + куча операций копирования. Что же делать?
Тут-то нам на помощь и приходит механизм MMF. Когда мы обращаемся к памяти, в которую отображен файл, данные загружаются с диска в кэш(если их там ещё нет), затем делается отображение кэша в адресное пространство нашей программы. Если эти данные удаляются — отображение отменяется. Таким образом, мы избавляемся от операции копирования из кэша в буфер. Кроме того, нам не нужно париться по поводу оптимизации работы с диском — всю грязную работу берёт на себя ядро ОС.
В своё время я проводил эксперимент. Замерял с помощью quantify скорость работы программы, которая буферизировано копирует большой файл размером 500 мб в другой файл. И скорость работы программы, которая делает то же, но с помощью MMF. Так вот вторая работает быстрее почти на 30% (в Solaris, в других ОС результат может отличаться). Согласитесь, неплохо.
Чтобы воспользоваться этой возможностью, мы должны сообщить ядру о нашем желании отобразить файл в память. Делается это с помощью функции mmap().
#include<sys/mman.h>
void *mmap(void *addr, size_t len, int prot, int flag, int filedes, off_t off);
Она возвращает адрес начала участка отображаемой памяти или MAP_FAILED в случае неудачи.
Первый аргумент — желаемый адрес начала участка отбраженной памяти. Не знаю, когда это может пригодится. Передаём 0 — тогда ядро само выберет этот адрес.
len — количество байт, которое нужно отобразить в память.
prot — число, определяющее степень защищённости отображенного участка памяти(только чтение, только запись, исполнение, область недоступна). Обычные значения — PROT_READ, PROT_WRITE (можно кобминировать через ИЛИ). Не буду на этом останавливаться — подробнее читайте в манах. Отмечу лишь, что защищённость памяти не установится ниже, чем права, с которыми открыт файл.
flag — описывает атрибуты области. Обычное значение — MAP_SHARED. По поводу остальных — курите маны. Но замечу, что использование MAP_FIXED понижает переносимость приложения, т.к. его подержка является необязательной в POSIX-системах.
filedes — как вы уже догались — дескриптор файла, который нужно отобразить.
off — смещение отображенного участка от начала файла.
Важное замечание. Если вы планируете использовать MMF для записи в файл, перед маппингом необходимо установить конечный размер файла не меньше, чем размер отображенной памяти! Иначе нарвётесь на SIGBUS.
Ниже приведён пример(честно стырен из замечательной книжки «Unix. Профессиональное программирование») программы, которая копирует файл с использованием MMF.
#include <fcntl.h>
#include <sys/mman.h>
int main(int argc, char *argv[])
{
int fdin, fdout;
void *src, *dst;
struct stat statbuf;
if (argc != 3)
err_quit("Использование: %s <fromfile> <tofile>", argv[0]);
if ( (fdin = open(argv[1], O_RDONLY)) < 0 )
err_sys("невозможно открыть %s для чтения", argv[1]);
if ( (fdout = open(argv[2], O_RDWR | O_CREAT | O_TRUNC, FILE_MODE)) < 0 )
err_sys("невозможно создать %s для записи", argv[2]);
if ( fstat(fdin, &statbuf) < 0 ) /* определить размер входного файла */
err_sys("fstat error");
/* установить размер выходного файла */
if ( lseek(fdout, statbuf.st_size - 1, SEEK_SET) == -1 )
err_sys("ошибка вызова функции lseek");
if ( write(fdout, "", 1) != 1 )
err_sys("ошибка вызова функции write");
if ( (src = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fdin, 0)) == MAP_FAILED )
err_sys("ошибка вызова функции mmap для входного файла");
if ( (dst = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fdout, 0)) == MAP_FAILED )
err_sys("ошибка вызова функции mmap для выходного файла");
memcpy(dst, src, statbuf.st_size); /* сделать копию файла */
exit(0);
}
* This source code was highlighted with Source Code Highlighter.
Вот вобщем-то и всё. Надеюсь, эта статья была полезной. С удовольствием приму конструктивную критику.