Android Enthusiasts
Q&A for enthusiasts and power users of the Android operating system
Latest Questions
17
votes
3
answers
64670
views
How to unpack and edit boot.img for ROM porting?
I recently downloaded [this ROM](http://forum.xda-developers.com/showthread.php?t=2480246) for my Allview P5 (Allview P5 is the equivalent of Gionee GN700W/FLY IQ441/QMobile Noir A8). It`s called Primonex ROM and is made for the Gionee version of the phone. - Firstly, I tried to install it as it is...
I recently downloaded [this ROM](http://forum.xda-developers.com/showthread.php?t=2480246) for my Allview P5 (Allview P5 is the equivalent of Gionee GN700W/FLY IQ441/QMobile Noir A8). It`s called Primonex ROM and is made for the Gionee version of the phone.
- Firstly, I tried to install it as it is but it got stuck at the boot screen.
- After some research I found out that it could be a problem with the
boot.img
file and I don't know how to extract or edit it...
Can someone tell me how to do it?
user3448167
(171 rep)
May 25, 2014, 12:08 PM
• Last activity: Aug 1, 2025, 08:21 PM
1
votes
0
answers
223
views
Redmi 8 bootloop
My Redmi 8 phone is in bootloop. It got stuck with its Remi logo and does not start. I am trying to unlock the bootloader but I didn't find a way other than mi unlock which I don't know how to use it without knowing my mi account credentials.
My Redmi 8 phone is in bootloop. It got stuck with its Remi logo and does not start.
I am trying to unlock the bootloader but I didn't find a way other than mi unlock which I don't know how to use it without knowing my mi account credentials.
Hritik Kumar
(11 rep)
May 31, 2021, 04:32 AM
• Last activity: Jul 19, 2025, 12:18 PM
1
votes
1
answers
6519
views
How to revert to stock ROM on HTC One M7
My HTC One M7 phone is S-OFF, has the latest firmware 7.19.401.2, and has nicely installed "ViperOne+9.0.0-fix", the recovery is TWRP 2.8.6.0. Everything works very well, except that the proximity sensor seems erratic, and when I have a call the ear seems to press different programs on the touchscre...
My HTC One M7 phone is S-OFF, has the latest firmware 7.19.401.2, and has nicely installed "ViperOne+9.0.0-fix", the recovery is TWRP 2.8.6.0. Everything works very well, except that the proximity sensor seems erratic, and when I have a call the ear seems to press different programs on the touchscreen. I would like to return to complete HTC stock ROM so that I assure myself the proximity sensor works well enough (or does not).
Do I have to downgrade the firmware to be able to install the stock ROM?
I have downloaded the stock ROM
PN07IMG_M7_UL_L50_SENSE60_MR_HTC_Europe_7.19.401.2_Radio_4T.35.3218.16_10.33Q.1718.01L_release_421790_signed.zip
but seem to be unable to install from TWRP.
Or maybe the only way is via fastboot? With the commands:
1) htc_fastboot oem rebootRUU
2) htc_fastboot flash zip RUU.zip
3) htc_fastboot reboot-bootloader
Can someone more experienced give some advice, please?
Victor Ivanov
(21 rep)
Sep 19, 2015, 10:10 PM
• Last activity: May 12, 2025, 03:09 AM
2
votes
0
answers
188
views
How to revert an automatic system update from Android 12 back to Android 11
Despite having disallowed every possible automatic update option available, today my phone updated automatically from Android 11 to Android 12 after a short WiFi connection. **How can I get Android 11 back?** I don't care about loosing any data on the phone?
Despite having disallowed every possible automatic update option available, today my phone updated automatically from Android 11 to Android 12 after a short WiFi connection.
**How can I get Android 11 back?**
I don't care about loosing any data on the phone?
jjk
(121 rep)
Dec 30, 2024, 11:22 AM
• Last activity: Mar 4, 2025, 04:45 PM
1
votes
1
answers
3468
views
Mediatek flash tool device in device manager disconnects
I am trying to flash a rom via mediatek flash tool, my problem is that when I connect the tablet to my PC it connects the mediatek preloader but after 2 seconds it disconnects. What can I do with this ?
I am trying to flash a rom via mediatek flash tool, my problem is that when I connect the tablet to my PC it connects the mediatek preloader but after 2 seconds it disconnects. What can I do with this ?
Bear Black
(11 rep)
Mar 17, 2017, 04:18 PM
• Last activity: Jan 25, 2025, 04:09 AM
0
votes
0
answers
14
views
How would I find a ROM for this Chinese tablet?
I have a generic Chinese tablet (Model: Gener8 7", 2GB RAM, 16GB storage, running Android 10?). I want to install a lightweight custom ROM to improve its performance, but I can't find any ROMs for this specific device. I've searched XDA-Developers and other forums but haven't found anything for this...
I have a generic Chinese tablet (Model: Gener8 7", 2GB RAM, 16GB storage, running Android 10?). I want to install a lightweight custom ROM to improve its performance, but I can't find any ROMs for this specific device.
I've searched XDA-Developers and other forums but haven't found anything for this tablet. Does anyone have any idea of some compatible custom ROMs?
Here is the link for the tablet.
Sir Savage
(1 rep)
Dec 19, 2024, 01:08 AM
• Last activity: Dec 19, 2024, 01:10 AM
155
votes
1
answers
268247
views
Where can I find stock or custom ROMs for my Android device?
There are several reasons to be looking for a ROM: - Upgrading or downgrading your stock ROM - Looking for firmware from a different region/language - Flashing a custom ROM for different features, removing bloat, etc. But where can one find ROMs in the first place? What sites are likely to have the...
There are several reasons to be looking for a ROM:
- Upgrading or downgrading your stock ROM
- Looking for firmware from a different region/language
- Flashing a custom ROM for different features, removing bloat, etc.
But where can one find ROMs in the first place? What sites are likely to have the ROM I need?
*[This question is intended to be canonical](https://android.meta.stackexchange.com/questions/782/where-can-i-find-x-rom-questions-should-be-treated-like-shopping-questions) ; please add to the wiki answer instead of posting separate answers.*
See also: https://android.stackexchange.com/q/13510/1465
Matthew Read
(50797 rep)
Dec 19, 2011, 04:11 PM
• Last activity: Dec 7, 2024, 08:49 AM
0
votes
1
answers
307
views
Force usage of software keystore
The android platform nowadays has a secure [keystore](https://developer.android.com/privacy-and-security/keystore), that is locked to the TEE (trusted execution environment) on phones where it is available. Notably, the TEE part is only used if the hardware supports it. This implies the existence of...
The android platform nowadays has a secure [keystore](https://developer.android.com/privacy-and-security/keystore) , that is locked to the TEE (trusted execution environment) on phones where it is available. Notably, the TEE part is only used if the hardware supports it. This implies the existence of a software-backed keystore, that doesn't use a TEE. I've been able to confirm the validity of this notion, as on WayDroid on linux, /data/misc/keystore holds an actual keystore.
I'm an avid tinkerer, so I always have a bootloader unlocked/rooted phone, and I've hit a few situations where backing up apps and restoring them on a different phone, or even the same phone after wiping all the other data, has caused them to stop functioning, due to them being unable to decrypt the keys. This is an absolute deal breaker to me, as I strongly believe that my ability to own my data superseeds any means of security.
This is why, as there seemingly is no way to extract keys from a TEE, I'm looking for a way to *force* android to use a software keystore, such that /data/misc/keystore can be moved around to different phones and used to decrypt any apps. I want to do this through any means necessary, which includes the possibility of developing a magisk module or patching the ROM directly, in order to get this functionality. I just need to know where to look.
In the event where it matters, the ROM I'm currently using is crDroid, which integrates KernelSU as its root solution, rather than Magisk.
mid_kid
(101 rep)
Oct 23, 2024, 07:22 PM
• Last activity: Nov 30, 2024, 05:14 PM
2
votes
1
answers
3379
views
Canot enter TWRP recovery because of "fastboot erase userdata"
I want to flash a new ROM for my Android phone. I clean data by `fastboot erase userdata` but after that, I can not enter TWRP recovery because can not mount /data I tried `fastboot format userdata` then below errors occured: Couldn't parse erase-block-size '0x'. Couldn't parse logical-block-size '0...
I want to flash a new ROM for my Android phone.
I clean data by
fastboot erase userdata
but after that, I can not enter TWRP recovery because can not mount /data
I tried fastboot format userdata
then below errors occured:
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
So how to make the TWRP work again?
Or how to rebuild the data
partition by fastboot
?
BaiJiFeiLong
(121 rep)
Jan 17, 2018, 11:59 AM
• Last activity: Aug 29, 2024, 01:04 PM
1
votes
1
answers
795
views
TWRP stuck on splash screen, odin not recognizing phone
I have a Galaxy S5 (T-Mobile). I recently booted into TWRP (flashed with odin,) and attempted to flash Resurrection Remix with NikGapps using an SD card. Upon reboot RR was stuck on the loading screen, and on reboot it tried to boot to TWRP but that got stuck on the splash screen too. I tried to ref...
I have a Galaxy S5 (T-Mobile).
I recently booted into TWRP (flashed with odin,) and attempted to flash Resurrection Remix with NikGapps using an SD card. Upon reboot RR was stuck on the loading screen, and on reboot it tried to boot to TWRP but that got stuck on the splash screen too.
I tried to reflash with odin, but even in Download Mode the phone is not recognized by odin.
I've tried:
1. Countless reboots
2. Unplugging and replugging, trying different cables
3. Trying to get Fastboot to work (Unsuccessful)
4. Letting TWRP load for an hour (Unsuccessful)
Extra info: Every reboot redirects to the broken TWRP install, and Download Mode is still accessible from the phone.
If someone could help me, that would be nice because I'm scared this phone might be bricked.
IconicIdiot3829
(11 rep)
Nov 23, 2022, 05:03 AM
• Last activity: Aug 17, 2024, 04:00 PM
-1
votes
1
answers
56
views
What is this bootloader warning?
In my **HTC One A9**, when I boot in download mode, at the bottom there is the warning: **If you flash a ROM that is not from HTC it could lead to....** (security issues) Does it mean it has a custom ROM?. At the upper side it says ** **locked** ** Also is there a way to know if bootloader has been...
In my **HTC One A9**, when I boot in download mode, at the bottom there is the warning:
**If you flash a ROM that is not from HTC it could lead to....** (security issues)
Does it mean it has a custom ROM?. At the upper side it says ** **locked** **
Also is there a way to know if bootloader has been **re-locked**?
DaleunSeun
(1 rep)
Jul 11, 2024, 01:44 PM
• Last activity: Jul 11, 2024, 07:29 PM
0
votes
0
answers
89
views
Does installing a custom ROM solve spyware problems on a Xiaomi?
I have done extensive research into the world of ROMs, but could not find the answer to the question: whether a device contains spyware on the firmware level. I want to know whether unlocking the bootloader, and installing a custom de-googled ROM solves the problem of spyware on a Xiaomi phone. I'd...
I have done extensive research into the world of ROMs, but could not find the answer to the question: whether a device contains spyware on the firmware level.
I want to know whether unlocking the bootloader, and installing a custom de-googled ROM solves the problem of spyware on a Xiaomi phone.
I'd like to point the question towards Xiaomi, but in general, it would be nice to hear something on the overarching issue of: does installing a custom ROM on a mobile device solve spyware problems?
Kamil
(39 rep)
Jul 7, 2024, 03:59 PM
2
votes
0
answers
245
views
Need Help with CSC for Galaxy A15 4G
I'm currently using a **Galaxy A15 4G** and I've run into a bit of a snag trying to figure out the correct **CSC (Country Specific Code)**. When I navigate to the `Software Information` section under `Service provider software version`, I see the following details: ```plaintext Service provider soft...
I'm currently using a **Galaxy A15 4G** and I've run into a bit of a snag trying to figure out the correct **CSC (Country Specific Code)**.
When I navigate to the
Software Information
section under Service provider software version
, I see the following details:
Service provider software version
SAOMC_SM-A155F_OJM_MID_14_0004
MID/MID,MID/XSG
However, when I check for OTA updates, the URL displayed is: https://doc.samsungmobile.com/SM-A155F/MID/doc.html
.
To add to the confusion, when I used samfw.com
to check the CSC, it indicated that the CSC was TUR
instead of MID
.
I'm a bit lost here. Could anyone please clarify which one is the correct CSC? Any help would be greatly appreciated.
Thank you in advance!
poqdavid
(1433 rep)
May 22, 2024, 11:36 PM
0
votes
0
answers
1133
views
cant delete or create any logical partitions. HELP
I tried `fastboot delete-logical-partition product_a` (remote: 'Failed to write partition table') and thats because i don't have a product_a partition. ``` Fastboot erase product_a Erasing 'product_a' FAILED (remote: 'Partition doesn't exist') ``` but then if i try creating a logical partition ``` f...
I tried
fastboot delete-logical-partition product_a
(remote: 'Failed to write partition table')
and thats because i don't have a product_a partition.
Fastboot erase product_a
Erasing 'product_a'
FAILED (remote: 'Partition doesn't exist')
but then if i try creating a logical partition
fastboot create-logical-partition product_a 1
Creating 'product_a'
FAILED (remote: 'Partition already exists')
like i said its the same on all other partitions = system,odm,...
what am i doing wrong?
The phone i am trying to repair:
**OnePlus Nord CE 3 Lite 5G CPH2467**
(i got the system and all other images from the oxygen updater app)
Tonas Jones
(1 rep)
May 15, 2024, 07:55 AM
• Last activity: May 15, 2024, 01:53 PM
0
votes
1
answers
377
views
How can I unpack/view contents of modem.img
I have a `modem.img` file of type - `DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "MSDOS5.0", Bytes/sector 4096, sectors/cluster 4, root entries 512, Media descriptor 0xf8, sectors/FAT 3, sectors/track 63, heads 255, sectors 20480 (volumes > 32 MB), serial number 0xbc614e, unlabeled, FAT (16 bit)...
I have a
modem.img
file of type - DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "MSDOS5.0", Bytes/sector 4096, sectors/cluster 4, root entries 512, Media descriptor 0xf8, sectors/FAT 3, sectors/track 63, heads 255, sectors 20480 (volumes > 32 MB), serial number 0xbc614e, unlabeled, FAT (16 bit)
.
How can I unpack/view the contents of this image file?
Vamsi Shankar
(11 rep)
May 2, 2024, 01:27 AM
• Last activity: May 2, 2024, 02:29 PM
1
votes
0
answers
69
views
Unlocked boot loader ADB issue
I am trying to downgrade my Nexus 6P from Oreo 8.1 to 7.xx. I’ve unlocked the boot loader and can communicate with the device through Google’s `adb` fast boot command line which works fine (up to a point). I get this far, and it fails every time. Here are the files I am trying to flash. Is there som...
I am trying to downgrade my Nexus 6P from Oreo 8.1 to 7.xx. I’ve unlocked the boot loader and can communicate with the device through Google’s
adb
fast boot command line which works fine (up to a point).
I get this far, and it fails every time. Here are the files I am trying to flash. Is there something I am missing? I’ve installed the Google USB drivers too, as I thought that was the issue.

Zach89
(11 rep)
Feb 27, 2020, 06:16 PM
• Last activity: Apr 27, 2024, 12:07 PM
4
votes
0
answers
524
views
Unpack/Repack ROM for SM-G930S (Samsung Galaxy S7)
I want to unpack/repack the Samsung Galaxy S7 (SM-G930S) ROM. I downloaded the ROM from [this link][1]. I use [simg2img][2] to unpack/repack on Ubuntu. I execute these commands: ``` lz4 system.img.lz4 system.img pc@pc-virtual-machine:~$ ./android-simg2img/simg2img system.img system.raw.img pc@pc-vir...
I want to unpack/repack the Samsung Galaxy S7 (SM-G930S) ROM. I downloaded the ROM from this link . I use simg2img to unpack/repack on Ubuntu. I execute these commands:
lz4 system.img.lz4 system.img
pc@pc-virtual-machine:~$ ./android-simg2img/simg2img system.img system.raw.img
pc@pc-virtual-machine:~$ ./android-simg2img/img2simg system.raw.img system.new.img
Result: the file system.img
loaded successfully, but the file system.new.img
received a FAIL result when using Odin.
I noticed something unusual when comparing 2 files:
1. Check file info:
pc@pc-virtual-machine:~$ file system*
system.img: Android sparse image, version: 1.0, Total of 1075200 4096-byte output blocks in 5625 input chunks.
system.new.img: Android sparse image, version: 1.0, Total of 1075200 4096-byte output blocks in 3469 input chunks.
system.raw.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4- 655f-bf67-946fc0f9f25b (extents)
2. Check simg_dump.py:
pc@pc-virtual-machine:~$ ./android-simg2img/simg_dump.py system.img
simg_dump.py: system.img: The file header size was expected to be 28, but is 32.
pc@pc-virtual-machine:~$ ./android-simg2img/simg_dump.py system.new.img
system.new.img: Total of 1075200 4096-byte output blocks in 3469 input chunks.
3. Open with 7z:
- File system.img
> 
- File system.new.img

I used many tools: ext2simg, make_ext4fs to repack, but it didn't work.
How to unpack/repack the ROM?
Quang Nguyen
(41 rep)
Jan 18, 2023, 03:38 AM
• Last activity: Mar 31, 2024, 09:03 AM
0
votes
0
answers
65
views
How to prevent apps for second user showing in list of apps for first user?
How can I make sure that the apps in my secondary space don't appear in the list of apps in my primary profile? I would like it to appear only the installed apps according to active space, I looked for commits or instructions to edit this behavior in the settings APK but I can't find it, this behavi...
How can I make sure that the apps in my secondary space don't appear in the list of apps in my primary profile? I would like it to appear only the installed apps according to active space, I looked for commits or instructions to edit this behavior in the settings APK but I can't find it, this behavior is very common in ROMs on Android 11, in others most are fixed.


zinn
(1 rep)
Mar 24, 2024, 11:45 PM
• Last activity: Mar 25, 2024, 08:13 AM
1
votes
2
answers
31439
views
Sahara fail while trying to flash a rom into my phone
I tried to flash a custom rom into my phone but it was an unsuccessful try and I decided to update the TWRP recovery in order to increase my chances to flash a rom. But istead of updating TWRP I bricked my phone somehow I even don't understand. The phone is **Lenovo ZUK Z2**. I tried to flash a stoc...
I tried to flash a custom rom into my phone but it was an unsuccessful try and I decided to update the TWRP recovery in order to increase my chances to flash a rom. But istead of updating TWRP I bricked my phone somehow I even don't understand. The phone is **Lenovo ZUK Z2**. I tried to flash a stock rom via QFIL previously installing all drivers needed.
But when I actually press the download button it says:
Validating Application Configuration
Load APP Configuration
COM:20
SAHARA:True
SAHARA:C:\ZUI\prog_emmc_firehose_8996_ddr.elf
SEARCHPATH:C:\ZUI
RAWPROGRAM:
rawprogram0.xml
PATCH:
patch0.xml
ACKRAWDATAEVERYNUMPACKETS:False
ACKRAWDATAEVERYNUMPACKETS:100
MAXPAYLOADSIZETOTARGETINBYTES:False
MAXPAYLOADSIZETOTARGETINBYTES:49152
DEVICETYPE:eMMC
PLATFORM:8x26
VALIDATIONMODE:0
RESETAFTERDOWNLOAD:False
MAXDIGESTTABLESIZE:8192
SWITCHTOFIREHOSETIMEOUT:30
RESETTIMEOUT:200
RESETDELAYTIME:2
FLATBUILDPATH:C:\
FLATBUILDFORCEOVERRIDE:True
QCNPATH:C:\Temp\00000000.qcn
QCNAUTOBACKUPRESTORE:False
SPCCODE:000000
ENABLEMULTISIM:False
Load ARG Configuration
Validating Download Configuration
Image Search Path: C:\ZUI
RAWPROGRAM file path: C:\ZUI\rawprogram0.xml
PATCH file path:C:\ZUI\patch0.xml
Programmer Path:C:\ZUI\prog_emmc_firehose_8996_ddr.elf
Process Index:0
Start Download
Program Path:C:\ZUI\prog_emmc_firehose_8996_ddr.elf
Binary build date: May 13 2015 @ 14:41:37
QSAHARASERVER CALLED LIKE THIS: 'C:\Program Files (x86)\Qualcomm\QPST\bin\QSaharaServer.exe -p \\.\COM20 -s 13:C:\ZUI\prog_emmc_firehose_8996_ddr.elf 'Current working dir: C:\Users\vladi\AppData\Roaming\Qualcomm\QFIL
Sahara mappings:
2: amss.mbn
6: apps.mbn
8: dsp1.mbn
10: dbl.mbn
11: osbl.mbn
12: dsp2.mbn
16: efs1.mbn
17: efs2.mbn
20: efs3.mbn
21: sbl1.mbn
22: sbl2.mbn
23: rpm.mbn
25: tz.mbn
28: dsp3.mbn
29: acdb.mbn
30: wdt.mbn
31: mba.mbn
13: C:\ZUI\prog_emmc_firehose_8996_ddr.elf
17:01:24: ERROR: function: sahara_rx_data:194 Unable to read packet header. Only read 0 bytes.
17:01:24: ERROR: function: sahara_main:854 Sahara protocol error
17:01:24: ERROR: function: main:265 Uploading Image using Sahara protocol failed
Download Fail:Sahara Fail:QSaharaServer Fail:Process fail
Finish Download
The phone is in fastboot mode all the time. I tried to follow a dozen of howtos but no of them helped. I also used MiFlash, here are the error and the phone state:



Vlad Tkach
(11 rep)
Dec 28, 2019, 04:09 PM
• Last activity: Mar 13, 2024, 09:39 AM
0
votes
0
answers
329
views
Set up remote camera monitoring on Android OS without user input
Bringing [my question][1] over from stack exchange as it was suggested I ask here instead. I'm developing a personal project app (NOT for Play Store) to run on an old pixel phone I have. Here are my requirements 1. On boot, I want to automatically launch my app 2. The app should open a live camera f...
Bringing my question over from stack exchange as it was suggested I ask here instead.
I'm developing a personal project app (NOT for Play Store) to run on an old pixel phone I have. Here are my requirements
1. On boot, I want to automatically launch my app
2. The app should open a live camera feed and collect images at some interval
3. The app should stay alive indefinitely until a user explicitly kills it
4. All this needs to happen with NO user input
Nice to haves, but NOT required
5. The app should be able to function without the screen on
Now, I've successfully rooted my device to remove as many hurdles as I can. I got my app to launch on BOOT_COMPLETED, etc. But I'm hitting walls with the camera. I know the camera is not allowed to run in a background service. I was considering trying to force my app to be a system app, but I'm not sure if that let's me use the camera in this way either. The other option is to run the app in the foreground, but that requires a user to explicitly allow it to run continuously or else the OS kills it. But this will potentially trigger and run when I'm away, so I won't be there to hit play.
This is all like "spying app 101" stuff so that's probably why Android has put up so many roadblocks. But this isn't for other people. I have complete control of my device and will use it on my own property. I can do whatever custom ROMs people suggest, but I've not worked on any Android OS system code before so I'm hoping not to do that. However, if that's the only way, please let me know if you have any suggestions on where to start.
What is best way to achieve my high level goals here? Literally any architecture or strategy to do this is fine so long as it meets my requirements above.
CJN
(101 rep)
Feb 28, 2024, 10:23 PM
• Last activity: Feb 29, 2024, 02:27 AM
Showing page 1 of 20 total questions