yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy J5 Guides, News, & Discussion] AndroidTutorials:
I did it "rw-r-r" I'll update thread thanks for the advice does the device still boot?
[Samsung Galaxy J5 Guides, News, & Discussion] KingRaheel:
Ofcourse. I have done that in all my roms :)

Edit:

I would suggest that u change the thread title to

[GUIDE][ROOT]HOW TO MAKE A ROM USING A PHONE

if you need some help with the other stuffs for this thread then either PM me or text me on fb :svetius:
[Samsung Galaxy J5 Guides, News, & Discussion] AndroidTutorials:
Thank you :) :) it works fine
[Samsung Galaxy J5 Guides, News, & Discussion] AndroidTutorials:
Ok but this Rom I'm showing how to is mine the Rom I'm Soon developing :) and I need build.prop tweaks some more :)
[Samsung Galaxy J5 Guides, News, & Discussion] KingRaheel:
Good to hear that from you. I like previews! We are looking forward to your rom :highfive: . Good luck
[Samsung Galaxy J5 Guides, News, & Discussion] AndroidTutorials:
Thank you my friend I'm going to pm you :)
[Galaxy A3, A5, A7, A8, A9 Q&A, Help & Troubleshoot] alexsheff:
So ive been trying to root for a while and nothing seem to work its a snapdraggon CPU when i use cf-auto root i brick my phone when i try to root via TWRP nothing happens when i try to flash an official samsung firmware it fails at CM.BIN im on 6.0.1 and anything i do either bricks it or nothing happens an i stay unrooted with original firmware.

<ID:0/005> Added!!

<OSM> Enter CS for MD5..

<OSM> Check MD5.. Do not unplug the cable..

<OSM> Please wait..

<OSM> A510FXXU2APD5_A510FEVR2APD4_A510FXXU2APD4_HOME.tar.md5 is valid.

<OSM> Checking MD5 finished Sucessfully..

<OSM> Leave CS..

<ID:0/005> Odin engine v(ID:3.1005)..

<ID:0/005> File analysis..

<ID:0/005> SetupConnection..

<ID:0/005> Initialzation..

<ID:0/005> Get PIT for mapping..

<ID:0/005> Firmware update start..

<ID:0/005> SingleDownload.

<ID:0/005> sboot.bin

<ID:0/005> NAND Write Start!!

<ID:0/005> cm.bin

<ID:0/005> FAIL!

<ID:0/005>

<ID:0/005> Complete(Write) operation failed.

<OSM> All threads completed. (succeed 0 / failed 1)
[Galaxy A3, A5, A7, A8, A9 Q&A, Help & Troubleshoot] ashyx:
Simple - wrong firmware for your device.

Twrp, nothing happens? - you need to give details.
[Galaxy A3, A5, A7, A8, A9 Q&A, Help & Troubleshoot] alexsheff:
it is 100% the correct firmware i downloaded it on samstock for EE (EVR) stock 6.0.1 and 5.1.1 both wont install via odin and samsung tools pro. ive flashed twrp following your guide and that worked but installing super su just gave me the app and no binary files were installed, cf auto root just boot loops me the only tike im able to install any firmware is through emergency recovery on smart switch
[Galaxy A3, A5, A7, A8, A9 Q&A, Help & Troubleshoot] ashyx:
If part of the firmware doesn't install then it is not the correct firmware for your particular device, simple.

The bootloader does a sanity check via Odin on any firmware attempted to be installed.

If it doesn't meet the requirements it fails to install.

It's pointless arguing the case because it's a fact and I've been down this road with others who have eventually got the correct firmware of which you've almost proved my point by stating that downloading through Smartswitch installs the correct firmware.

Several factors come into play, model, carrier, region and revision.

Any of these mismatch and installation could potentially fail. Simply being the right model no. isn't enough.

You could probably help yourself if you post more details:

Exact firmware your device is currently running, the firmware you are attempting to install and screenshots or post a log of the output from odin and the info provided on the device display itself after failure.
[Galaxy A3, A5, A7, A8, A9 Q&A, Help & Troubleshoot] alexsheff:
I got the device on contract with EE so i thought it was locked to EE, my partner bought me a S7 (flat) on vodafone so i put the voda sim into my A510F n it seems to be unlocked to voda not quite sure why i always thought they was locked to the network if it was a contract device, could it possibly be a vodafone stock rom or any other network.
[Galaxy A3, A5, A7, A8, A9 Q&A, Help & Troubleshoot] ashyx:
Post the details as requested above and we'll get it sorted.
[Huawei Watch] trent-77:
There is not faces in app market in iphone, how is solition for android faces to iphone??

Tapatalk kullanarak iPhone aracılığıyla gönderildi
[Huawei Watch] m.the.king:
you can install from play store in wear 2 or install face by adb
[Samsung Galaxy S7 Questions and Answers] wolkowicz:
Hi.

I have a problem. My s7 reboots itself. Sometimes it works for a day, but sometimes it reboots after 5 min of using.

When it's started phone was rooted and was flashed custom rom. It works on this rom for 2-3 weeks with no problem, but after I charged ones it starts to restarted by itself. I menage to flash original firmware 6.0.1. but the problem still exist.

Does it mean motherboard is broken?
[Samsung Galaxy S7 Questions and Answers] daede86:
i have the same problem.. any solution? i'm afraid my phone won't be under warranty because i broke the back glass and triggered the knox counter :(
[Samsung Galaxy S7 Questions and Answers] wolkowicz:
No solution here.
[Samsung Galaxy S7 Questions and Answers] TasEsmuEs:
This is corrupt motherboard. Had the same issue and got it replaced. Also got these weird artefacts on the screen.
[Samsung Galaxy S7 Questions and Answers] 1989dsr:
Are you using xposed?I've had similar issues!
[Samsung Galaxy S7 Questions and Answers] daede86:
It's happening both with stock with exposed or nougat Beta without xposed :(

Do you know how long does it takes to get the motherboard replaced? Thanks
[Samsung Galaxy S7 Questions and Answers] rascal0pl:
I had 3 reboots since Friday. I'm on noughat beta (3), so I'm not sure if it is problem with the rom, or something else. Mine just reboots, without heating and freezing or any artifacts on the screen. I didn't do anything heavy, like gaming or something. 1st reboot occurred after phone call end, second after unlock, 3rd on home screen. I don't have xposed, but I'm using high speed sd card and I have a rooted device. I uninstalled greenify and turned off auto updates. When I return home after work, I will try to update the rom. Nothing happens when I'm playing games, doing benchmarks or other heavy tasks.
[Samsung Galaxy S7 Questions and Answers] Leeum:
I had this same problem. Mine froze and restarted itself and sometimes even factory reset itself. Sent into the service center and cost me $359 as the phone PCB (motherboard) needed to be replaced
[Samsung Galaxy S7 Questions and Answers] Igaku:
Why did you have to pay $359 when the phone hasn't even been out for a year? Weren't you under warranty?
[Samsung Galaxy S7 Questions and Answers] *Detection*:
Probably tripped KNOX
[Samsung Galaxy S7 Questions and Answers] Leeum:
I had ended up tripping Knox. But once they replaced the PCB it restored my warranty
[Android Q&A, Help & Troubleshooting] KGMARSCH:
I am attempting to apply a new system.img file to an Android tablet and it always results in a soft brick/bootloop.

The tablet being used is a TerraPad 1004, running android 5.1.1 (MTK8735). I have been given special access to the image files by the manufacturer, who have provided everything I need to update the tablet using SP Flash Tool (5.164 on Windows 10). If I flash the files as they were provided it all works fine and the tablet boots up perfectly. If I unpack/mount/repack the system.img and then try flashing it I get stuck either on the boot screen or get the dead android image (only get this I make the system.img file too big when repacking it). Please note, despite unpacking/mounting/repacking I made no changes to the system image, so in theory it should be the same as the originally provided system.img file.

I am doing the unpack/mount/repack on Ubuntu 16.04 (64 bit - have tried 32 bit and 12.04) VM (using Virtual Box).

The commands I am using are:

Unpack: simg2img system.img system.raw

Mount: sudo mount -t ext4 -o loop system.raw system/

Repack: make_ext4fs -s -l 1617722231 -S file_contexts -a system newsystem.img /home/ubuntu/mhh/Terra1004/system

The file size specified for make_ext4fs has been arrived at via trial and error as all the means I have seen of calculating (e.g blocks x block size) result in a file that is significantly bigger then the original system.img file (resulting in dead android when flashed to tablet). The current size specified results in an image file that has the same number of blocks as the original file but is 24 bytes bigger than the original (this img results in getting stuck on the very first boot splash screen).

I have tried flashing the image via fastboot (fastboot flash system system.img) and get "FAILED (remote: failed to get download permission for partition 'system')".

I am working with the manufacturer to resolve this issue but I am getting very little back from them.

I am getting quite desperate to resolve this as my business relies on my ability to amend the system.img (and other files) to bespoke the tablet to my own product.

I am really at the limit of my understanding on what I am talking about when it comes to modding tablets - I do it as a necessity rather than a hobby, so please excuse any incorrectly used terminology.

All help/suggestions welcome. Please let me know if you need any further information.

Thanks in advance.
[Android Q&A, Help & Troubleshooting] DodoGTA:
Try flashing system.img without modifying it
[Android Q&A, Help & Troubleshooting] KGMARSCH:
I've done that. The system.img file as provided by the manufacturer works fine. It fails as soon as I unpack/repack it, even without making any modifications to it.
[Android Q&A, Help & Troubleshooting] DodoGTA:
What's the size of unmodified system.img (in bytes)?
[Android Q&A, Help & Troubleshooting] KGMARSCH:
Using Ubuntu stat command on system.img (the original untouched image), it reports:

Size: 929,933,912

Blocks: 1,816,288

IO Block: 4,096

Inode: 1,863,406

Doing the same on the repacked newsystem.img I get:

Size: 929,933,936

Blocks: 1,816,288

IO Block: 4,096

Inode: 1,983,804

This is the closest I can get the size of newsystem.img to be to system.img (24 bytes difference).

The permissions on both are the same (0770).
[Android Q&A, Help & Troubleshooting] KGMARSCH:
Just realised that I may have misunderstood your comment. I have previously tried flashing the original system.img using the SP Flash Tool and that works fine. However, in case you meant flashing it via fastboot, I have just tried this and I get the same "failed to get download permission for partition 'system'" error, even with the original system.img.
[Android Q&A, Help & Troubleshooting] DodoGTA:
Can you run this command on a tablet you talked about in this thread (with a terminal emulator app):

and post the output of it?
[Android Q&A, Help & Troubleshooting] KGMARSCH:
Here is the output from cat partitions, cat partinfo and cat emmc:

shell@TERRA_PAD_1004:/proc $ cat partitions

cat partitions

major minor #blocks name

254 0 483328 zram0

7 0 1254 loop0

179 0 15267840 mmcblk0

179 1 3072 mmcblk0p1

179 2 5120 mmcblk0p2

179 3 10240 mmcblk0p3

179 4 10240 mmcblk0p4

179 5 512 mmcblk0p5

179 6 512 mmcblk0p6

179 7 16384 mmcblk0p7

179 8 16384 mmcblk0p8

179 9 8192 mmcblk0p9

179 10 10240 mmcblk0p10

179 11 512 mmcblk0p11

179 12 2048 mmcblk0p12

179 13 6144 mmcblk0p13

179 14 8192 mmcblk0p14

179 15 5120 mmcblk0p15

179 16 5120 mmcblk0p16

179 17 1024 mmcblk0p17

179 18 32768 mmcblk0p18

179 19 37888 mmcblk0p19

179 20 1572864 mmcblk0p20

179 21 409600 mmcblk0p21

179 22 13088256 mmcblk0p22

179 23 16384 mmcblk0p23

179 96 4096 mmcblk0rpmb

179 64 4096 mmcblk0boot1

179 32 4096 mmcblk0boot0

shell@TERRA_PAD_1004:/proc $ cat partinfo

cat partinfo

Name Start Size

pgpt 0x0000000000000000 0x0000000000080000

proinfo 0x0000000000080000 0x0000000000300000

nvram 0x0000000000380000 0x0000000000500000

protect1 0x0000000000880000 0x0000000000a00000

protect2 0x0000000001280000 0x0000000000a00000

lk 0x0000000001c80000 0x0000000000080000

para 0x0000000001d00000 0x0000000000080000

boot 0x0000000001d80000 0x0000000001000000

recovery 0x0000000002d80000 0x0000000001000000

logo 0x0000000003d80000 0x0000000000800000

expdb 0x0000000004580000 0x0000000000a00000

seccfg 0x0000000004f80000 0x0000000000080000

oemkeystore 0x0000000005000000 0x0000000000200000

secro 0x0000000005200000 0x0000000000600000

keystore 0x0000000005800000 0x0000000000800000

tee1 0x0000000006000000 0x0000000000500000

tee2 0x0000000006500000 0x0000000000500000

frp 0x0000000006a00000 0x0000000000100000

nvdata 0x0000000006b00000 0x0000000002000000

metadata 0x0000000008b00000 0x0000000002500000

system 0x000000000b000000 0x0000000060000000

cache 0x000000006b000000 0x0000000019000000

userdata 0x0000000084000000 0x000000031ed80000

flashinfo 0x00000003a2d80000 0x0000000001000000

sgpt 0x00000003a3d80000 0x0000000000080000

shell@TERRA_PAD_1004:/proc $ cat emmc

cat emmc

partno: start_sect nr_sects partition_name

emmc_p1: 00000400 00001800 "proinfo"

emmc_p2: 00001c00 00002800 "nvram"

emmc_p3: 00004400 00005000 "protect1"

emmc_p4: 00009400 00005000 "protect2"

emmc_p5: 0000e400 00000400 "lk"

emmc_p6: 0000e800 00000400 "para"

emmc_p7: 0000ec00 00008000 "boot"

emmc_p8: 00016c00 00008000 "recovery"

emmc_p9: 0001ec00 00004000 "logo"

emmc_p10: 00022c00 00005000 "expdb"

emmc_p11: 00027c00 00000400 "seccfg"

emmc_p12: 00028000 00001000 "oemkeystore"

emmc_p13: 00029000 00003000 "secro"

emmc_p14: 0002c000 00004000 "keystore"

emmc_p15: 00030000 00002800 "tee1"

emmc_p16: 00032800 00002800 "tee2"

emmc_p17: 00035000 00000800 "frp"

emmc_p18: 00035800 00010000 "nvdata"

emmc_p19: 00045800 00012800 "metadata"

emmc_p20: 00058000 00300000 "system"

emmc_p21: 00358000 000c8000 "cache"

emmc_p22: 00420000 018f6c00 "userdata"

emmc_p23: 01d16c00 00008000 "flashinfo"

shell@TERRA_PAD_1004:/proc $
[Android Q&A, Help & Troubleshooting] KGMARSCH:
I've got ahead of you I think. I have amended the file size in the make_ext4fs command to make it the same as the partition (1572864 x 1024 = 1610612736). I have flashed the resultant image and it now boots up.

I would swear that I tried this, but then again I have tried so many things over the last couple of weeks

You are my hero and have saved me sooooooo much stress - I honestly thought I'd have to shut down business until this was resolved.
[Android Q&A, Help & Troubleshooting] DodoGTA:
I meant to say this solution
[Android Q&A, Help & Troubleshooting] KGMARSCH:
I don't really know what the forum etiquette is but thanks very much for your help. I was rapidly running out of stock of the previous tablet model from the manufacturer and was starting to worry that I wouldn't have a replacement ready in time - now I can get on with making the required amends.

Sometimes you just need someone from the outside to have a look!

Many thanks, Kevin
[Android Q&A, Help & Troubleshooting] rick.wardenburg:
Why not try it like this

This is how I do it

use simg2img

simg2img system.img system_mod.img

mount it

mount -t ext4 -o loop system_mod.img /data/mountpoint

Make your modifications and unmount it

use img2simg

img2simg system_mod.img system.img

I don't think you can mount an img for what your trying to do you can use dd though its like flashing it

dd if=/system.img of=/mountpoint
[Android Q&A, Help & Troubleshooting] KGMARSCH:
Thanks for replying. I've now solved this (with help from DodoGTA). Turns out I had to be very specific (to the byte) with the file size in the make_ext4fs command. Previous tablets I've updated weren't as stringent with the files size (I think they were always defaulted to 500M) but this one is. I took the file size from the system partition size on the tablet (x 1024 to get it into bytes) and it worked (although I could have sworn I'd already tried this). I've now made amends to the system.img and they are taking affect. Thanks anyway.
[Android Q&A, Help & Troubleshooting] scott.fallick:
Same issue as OP

Hey guys I could really use some help. I have MTK device with manufacturer permission to modify firmware. I unpack and repack system.img with no changes, and phone stuck on boot. I can cat partitions, but not partinfo or emmc. Any suggestions would be great as I'm super frustrated and running out of ideas.
[Android Q&A, Help & Troubleshooting] KGMARSCH:
Hi Scott,

If your problem is the same as the one I had then it will be to do with the size you are specifying when repacking the system image.

I was able to work out the size that I required from "cat partitions" (take the size shown for the system partition and multiply it by 1024 to get the value you should use).

The problem you may have is being able to identify which is the system partition. Without being able to see either the partinfo or emmc you may not be able to do this easily, in which case I would recommend a process of elimination. Start with the largest number shown on in the "cat partitions" list and work your why down until you get a value that works. Not the quickest way to do it but the best I can offer you. If you can post the output from "cat partitions" I may be able to make an educated guess which is the system.

Sorry I can't be of more help.
[Android Q&A, Help & Troubleshooting] scott.fallick:
So I believe I'm using the correct size, I was able to determine the name for system using an apk. However, this may sound weird, but it seems my system.img is on a ZRAM partition.
[Android Q&A, Help & Troubleshooting] KGMARSCH:
I think I am at the limit of my knowledge here. I know enough to be able to make changes to one specific model of tablet. Anything outside of the process that I use for modifying that tablet and I'm not much help I'm afraid. Sorry.

I hope someone else is able to help you.

Kevin
[Android Q&A, Help & Troubleshooting] davek17:
I have the same issue. Seem to have to almost hit super lucky with my make_ext4fs command on nougat based system.img files, where I seem to have gotten one mbuild working but then nothing!. I am in bootloop hell!! However your solution seems like the answer for me. Forgive me for being a little slow on the uptake here, can you explain how you CAT on the device to get the partition sizes and can you take us through the method a little more step by step? I just lost you on that small point.

Just the bit about getting the partition size you then multiply by 1024 to get the final value you use in the make_ext4fs command?

Cheers
[Android Q&A, Help & Troubleshooting] davek17:
OK, so I answered my own question here: https://xdaforums.com/showthread.php?t=2450045

I'm a Windows dude so LINUX commands are not my forte!!
[Android Q&A, Help & Troubleshooting] davek17:
Well still not resolved actually. For some reason make_ext4fs is now building 44.9MB system.img files that are empty when upacked. Maybe my LINUX VM has gotten corrupted.

Also I think this could be to do with dm-verity too. Despite not seeing any errors when I build the system.img again it boots, runs normally but anything to do with Google apps fail. E.G. Google play stops running, chrome just doesn't want to load. Rest of device seems to work OK though!! Anyone shed any light on that:confused:
[Android Q&A, Help & Troubleshooting] rick.wardenburg:
Brief description of what your trying to do and whasts wrong and what you've already done catch me up to speed I haven't read thread
[Android Q&A, Help & Troubleshooting] davek17:
I am using Ubuntu 16.4 on a virtual machine on W10. I can unpack a system.img I have got out of a stock ROM. I have also converted the file_contexts.bin to a file and when I re-pack it is making an empty file. It was working fine on a different system.img (other than the sizing issue) but now thats the same. makeext4fs seems to be building an empty file.
[Android Q&A, Help & Troubleshooting] rick.wardenburg:
Why do you need to repack it? After I used simg2img on the system.img file I mounted it as an iso and made my modifications an then converted it back with simg2simg

---------- Post added at 04:39 PM ---------- Previous post was at 04:36 PM ----------

mkdir ~/systemimg

sudo mount -t ext4 -o loop ~/path2img.img ~/systemimg
[XDA Assist] vinny666777:
I have a Lenovo a7000 with TWRP installed and stock rom. I already formatted my SanDisk 32GB sd card as internal and was working fine. Recently i formated my device through TWRP - Wipe data option. I checked all the options except system rom. After format my memory card is not working it shows damaged sd card found. It is not detecting on windows explorer but i can see it in chkdsk option. Please put forward your ideas about recovering my sd card but i dont need datas i just want it is formatted. Thanks
[XDA Assist] Razvan:
Hi there and welcome to assist,

It is possible for a SD card to just die unexpectedly, it's happened to me. Have you tried your card in a pc or different device?

There are several data recovery programs which may recover your photos, docs and so on.

Good Luck
[XDA Assist] vinny666777:
It is not detecting on pc and i dont need the data on my sd card i just need it back as formatted
[XDA Assist] Razvan:
Hi again,

So it seems that your card has died. Try other SD card and see if it's worth buying another new card.

Good luck
[OnePlus 2 Q&A, Help & Troubleshooting] rubol:
My op2 is running Oxygen Os v.3.0 [A2003]. The problem i'm having is my device doesn't have recovery. I tried to flash recovery but couldn't unlock oem. fastboot oem unlock gives the below message:

But when I run fastboot device-info it gives the below message:

And thus unable to flash recovery.

I searched in internet and found few solutions but it was for A2001 OP2 device and there was no qualacomm drivers for A2003.

Whenever my OP2 shutdowns and i restart it is stuck on oneplus logo and i need to plug it into my pc and use fastboot continue command to run it smoothly.
[OnePlus 2 Q&A, Help & Troubleshooting] demongokul:
The model number doesn't matter, it only shows where the phone was intended to sell. You can try any tutorial that is for Oneplus2.
[Google Cardboard] lagloose:
As most of you have probably noticed, you cann now play Half Life on Cardboard via Xash3d VR (https://play.google.com/store/apps/details?id=in.celest.xash3dVR.hl&hl=de) Although it's said, that it has gamepad support, i couldn't manage to map keys for jumping, crouching, weapon change and so on. Movement with left stick works but no keys. I have a 'terios t3' gamepad connected via bluetooth.

Anyone with an idea ?
[Android Head-Units] Blaze Falconburger:
I managed to find an E46 SoFIA chip, 2GB RAM, 32GB Flash by Joying, JY-BL121N2 $309

It looks like they are using the old fascia as it has a DVD slot and states the buttons don't work.

Does anybody know which MTC this will be (I have asked but no reply)?
[Android Head-Units] CadillacMike:
if it is like the 8 inch universal I have, it will not be MTC at all, it will have a super long MCU name, but no mention of MTC, and ends in "Newlap"
[Android Head-Units] doitright:
Joying units are NOT MTC.

The Joying unit will have an FYT5009 SoM.
[Android Head-Units] Blaze Falconburger:
Thanks for the help all, ordered will give feedback when I've set it up. Ive done over a month of no music now so almost anything is welcome. Luckily ive been on the train a lot so haven't had to endure the sweet diesel clatter for too long each day!
[Android Head-Units] Saiyajin:
Any Feedback on this unit? Interested to buy one of these for my E53 X5