Good tutorial anyone? - Android Q&A, Help & Troubleshooting

So, I've been reading a bit about how to install 2.2 on my g1. My initial impressions as a first time rooter is that it is a bit complicated. I really would like to know what I'm doing in case anything goes wrong. However, I've been a bit frustrated by any of the information I've found on google about it. Most of the tutorials only tell you what to do without explaining why you are doing it. Any explanations about how things works have been pretty brief and not much goes into how each piece of the android system relates to the other.
I'm going to run through my trouble points with learning it and if someone could jump in and explain any one of these things it would help me out a lot and hopefully other people as well.
There are (at least?) 4 main parts you need to be concerned with when installing a custom rom:
-the custom rom itself
I'm not totally sure of everything that goes into this. All the java stuff I'm guessing. Dalvik vm? Maybe the linux kernel? Some c libs too? busybox? Some other stuff?
-the spl.. aka second program loader.. I found the following explanation for this one:
Second Program Loader, in conjunction with the IPL comprise a device's bootloader. Aside from bootstrapping Android, the bootloader also fulfills various diagnostic functions. One of these functions is the manipulation of data in the device's internal flash ram. Depending on the SPL installed, the user can apply a signed NBH file, flash nand images, and more. Note that the SPL is installed and operates independently of the Android build that runs atop it. (Hold down the Camera button while the phone is booting to enter the SPL.)
Click to expand...
Click to collapse
Seems fairly straightforward. How does the IPL factor into this though? Why is the IPL typically not a concern when installing roms? What is a nbh? How does a nbh relate to a .img? Why does this get flashed?
-the radio.. i have no idea what this one is for.. references to it typically seem to be vague and mysteriousi have heard it is quote "the easiest way to brick your phone" which leads me to believe it is important. Appearantly danger SPL will kill you if you dare mess with it. This scares me because I dont really even know what it is so how am i supposed to know if I'm messing with it?
I have heard this description:
"radio.img is a image of partition table + several partitions, which are defined in the header.
You can open the file in hex editor and see it (starting at 0x18 offset):
MAGIC-NOTHING2DO: does nothing
OTA-QCSBL-UPDATE: updates qcsblhd_cfgdata.mbn and qcsblsec.mbn
OTA-OMSBL-UPDATE: updates oemsblhd.mbn and oemsblsec.mbn
OTA-RADIO-UPDATE: updates amsshd.mbn and amsssec.mbn (the actual baseband firmware)
OTA-APSBL-UPDATE: updates appsboothd.mbn and appsbootsec.mbn
OTA-CEFS--UPDATE: updates cefs.mbn (on some radio.img files this is done implicitly)"
Click to expand...
Click to collapse
What is this talking about? How do the partitions relate to what goes on when you are installing a rom? What is it used for? Why are there so many versions of it? Why?!
Finally:
-the recovery.img - this one is also a shroud of mystery to me. I'm not sure how it relates to the spl and it seems like sometimes you use this to install updates and sometimes you use the spl. I'm just not really sure how this factors into things.
This also seems to be involved a lot in things like 'repairing ext file systems' etc. What ext file system is it repairing? The sd card? The internal storage? Why are you supposed to repair it?
I have more questions but I will leave it at this. Thoughts anyone?

Related

Searched and NOTHING!

Hey guys, so I searched and search, using the search function as described in the forum rules, and couldn't come across anything with this nature, so if anyone has an urge to help out a noob I would really appreciate it!
So I downloaded the new Android Desire V4 rom, someone told me there were instructions in the download, which there were...they read as follows...
set mtype 2524
set ramaddr 0x20000000
set ramsize 0x0fc00000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline ""
boot
So my question is, again, um how do I do any of that! LOL Those look like a list of things I am supposed to do as opposed to actual instructions on how to do them LOL
If I run HaRet, it boots, but from my understanding I need to do the above list to make it functioning to it's (current) fullest potential?
Thanks for any assists!
i haven't tried android, not interested in kids play things, but that to me lookslike a list of setup commands, , sure they aren't supposed to go in an initialization file of some kind?
thats the startup txt details, and all you hav to do is copy it all to ur sd root and thats it its honestly not worth it at the min unless u just gonna play about for a bit
hmm
samsamuel said:
i haven't tried android, not interested in kids play things, but that to me lookslike a list of setup commands, , sure they aren't supposed to go in an initialization file of some kind?
Click to expand...
Click to collapse
Probably, but I don't even know what that means! LOL
I am like a super noob..haha.
I guess I am asking specifically what you would do, every step, to do the list of setup commands.
1. How do I change to those values, like which part of the phone I go into.
2. If they need to be installed, how exactly, specifically do I install them.
I am basically looking for full instructions. For example if I were teaching someone to watch a DVD who has never used a DVD/movie playing device before, I wouldn't just say "put it in and watch it." I would say. "This is the power button. Click that to turn the device on. This is the open tray button, click this, and place the DVD shiny/mirror side down flat. Click the open tray button again to close the tray. Once closed it should automatically play, if not click the button with the sideways triangle on it to start the movie."
Like that is how nooby I am with this stuff LOL..but not stupid enough to change something I shouldn't, screw something up. If the instructions are there, I got it.
Demon_man said:
thats the startup txt details, and all you hav to do is copy it all to ur sd root and thats it its honestly not worth it at the min unless u just gonna play about for a bit
Click to expand...
Click to collapse
So I don't have to do anything? I have booted Android Desire V4 rom about 22 times so far, and every single time it is stuck in fast forward mode, does not give me the sim option like in the instructions on the website to download the file, and is generally the exact opposite of what everyone is claiming it is/doing.
So I would assume I am missing some key crucial steps no? Also My radio rom is fine, I reformatted my SD Card, it's fresh and all files are on the root of the card. From the sounds of it, you have to do something with the zImage (from what I have read), and something else... this is why I am confused.
as far as i'm aware there are still a few issues where certain models cant run it properly? and isn't there something about there being a few different digitizers, and it only works on some? (that might not be an issue anymore, i've not been keeping up)
i tried android quite a few times on my previous device (htc kaiser). i believe nearly the same concepts apply to the HD2 at the current stage of android development for the HD2.
facts:
1. you should know that android's files are to be kept on the sd card according to the instructions (more details here: http://forum.xda-developers.com/showthread.php?t=719646)
2. you should know that your windows and any settings made under windows will remain INTACT. this is because android, being in the storage card, is like an independent operating system.
3. point 2 above implies that any settings specific to windows or specifically made in the windows system settings (etc) have NO IMPACT on android. so no need to ask:
1. How do I change to those values, like which part of the phone I go into.
Click to expand...
Click to collapse
4. the only things important to android are the radio ROM version and MAYBE the (Hard)SPL version.
5. android is spun into action using "haret". haret is a little program that is started from windows but it essentially kicks out windows (temporarily) and tricks the phone into booting android from the sd card.
so from all of the above points, we can conclude that any and all configurations for android must be made in some text files. this text file must be placed according to the instructions somewhere along side haret and the rest of the android files on the sd card. this should answer:
2. If they need to be installed, how exactly, specifically do I install them.
Click to expand...
Click to collapse
this text file, as suggested by demon_man in post 3 in this thread is the "startup.txt". another name for startup.txt is "default.txt". these files are the same, except that haret pre-selects "default.txt" as your startup script when you launch haret. this saves you the step of manually selecting a particular startup file (you can have a bunch of startup files with different settings in each to experiment and you can name them ANYTHING). so after experimenting, you should arrive at a startup file containing configurations that work well for you. you can then name this file as "default.txt" and you can also optionally delete all the other startup files you created while you were experimenting.
i hope the above gives you some idea of what to do. if i had tried android on the HD2 for myself and if i had personally done more research of android on the HD2, i would have certainly given you some links of material that i am CERTAIN already exists, if you fancy searching just a little bit. being a noob is no excuse, because "search" is the FIRST forum rule. and just saying that you searched without posting some example keywords of what you searched for sounds "fishy", so not sure you searched well
i have written the above to help you build your concept, but we would all applaud for you (yay!) if you post in the appropriate threads for android and android tutorials from now on. i doubt you will need to post more because what i have tried to detail for you above should be a very solid foundation for you to understand how the wonderful people here at xda have gotten android to work on devices it was never released for.

Introduction to Android FRX07 - SD Card

Very Important Information For Beginners
/Introduction to Android for SD Cards
​
Okay, firstly I made this thread because pretty much every new person to this section of the forums is completely lost and unsure what things are or what to even do. We are also sick and tired of threads saying 'how do I get stared' or 'which is the most stable' etc.
----------------------
Download your files from here:
You will be accessing these websites quite often so it might pay to bookmark them
Kernel downloads, almost always download the top one, they are updated often (needs extracting): http://glemsom.users.anapnea.net/android2/htc-msm-linux/
Rootfs downloads, download the top one, they aren't updated as often as the kernels above but still quite regularly (also needs extracting): http://files.xdandroid.com/rootfs/
Initrd downloads, rarely updated (don't extract, just rename to initrd.gz) http://files.xdandroid.com/initramfs/ People almost never need to download one of these separately.
----------------------------------
Basic need-to-knows:
Kernel: Your modules/zImage. Your zImage always needs be in the root (first folder) of your android folder on your SD and ALWAYS named zImage, your modules should also be in the root of your android folder named modules-LOTSofNUMBERSandLETTERS.tar.gz never rename your modules. It should always be in .tar.gz EG: modules-2.6.27.46-01276-g6a6a1c1-dirty.tar.gz
Rootfs: Must be in the root of your android folder named rootfs.img
Initrd: Needs to be in the root of your android folder named initrd.gz
Data.img: Generated on the first boot of android and placed in root of android folder. Is a virtual memory file that acts as the phones internal memory for android. Holds all your settings etc. May have to be recreated some times (just by deleting it)
Haret.exe: the file executed by your Windows ROM to kick Windows out of memory and boot android.
system.ext2: Main android file, must be in the root of your android folder. Holds all of your build.
startup.txt: File that instructs android how to start up. Needs to be in the root of your SD. (I will cover this further down)
ts-calibration: A file in the android folder that holds calibration information of the touch screen.
Various Folders: You will see/have/need other various folders created in the root of your SD and in the root of the android folder, such as conf, cache, data, media etc. You usually don't want to delete these.
Root: The root folder of any partition is the "highest" folder in the hierarchy. The root folder contains all other folders and can also contain files. For example, the root folder of the main partition on your computer is probably C:\. The root folder of your DVD or CD drive might be D:\.
Also Known As: "the root"
RIL: Radio interface layer: basically controls your radio (GSM/CDMA network)
------------------------------------------------
startup.txt
VERY IMPORTANT, your startup.txt must be customized to your device. (mine is a rhod110). You can find your model number under your battery. This file belongs in the folder with your android.
My startup.txt looks like this
Code:
set ramsize 0x10000000
set ramaddr 0x10000000
set mtype 2292
set KERNEL zImage
set initrd initrd.gz
set cmdline "lcd.density=240 msmvkeyb_toggle=off gsensor_axis=2,1,3 pm.sleep_mode=1 rel_path=FRX07 physkeyboard=rhod100_uk acpuclock.oc_freq_khz=710000"
boot
Now I believe you should be able to copy and use this as yours with a few slight modifications. Change rel_path= to wherever your android is stored on your sd, for example when I go to my sd inside the folder frx07 (the root of my android folder) all my android files are there. If your folder was called andboot it would be rel_path=andboot. (without that full stop) Now change your physkeyboard= to your model of your phone, mine is rhod110 but the rhod100_uk keymap is EXACTLY THE SAME AS THE RHOD110 so that's why I use rhod100_uk instead of rhod110 (rhod110 isn't recognised by frx07), this is important to make sure your keys are assigned properly.
------------------------------------------------
Models of rhod:
From what I know that exists. If you find one not listed, make sure you tell me so I can update the list
rhod110 uses rhod100_uk and it works as it should
These can be used for physkeyboard= in startup.txt (needs updating, some may no longet be supported because F22 hasn't commited old changes)
rhod100_de
rhod100_es
rhod100_fr
rhod100_it
rhod100_nl
rhod100_nordic
rhod100_uk
rhod210
rhod300 (tilt2)
rhod400
rhod500
Getting set up:
Go to http://forum.xda-developers.com/showthread.php?t=1171052 and download the FULL BUNDLE
Other builds exist such as gingerbread but this guide only covers froyo frx07.
Replace/add the Kernel from the downloaded build with the latest one (remember this is the zImage and modules-NUMBERS.tar.gz). Updating is as simple as this, do it often - there is no data loss. See links mentioned above for links. Making sure that the (if there were) old kernel files are all deleted and the new ones are called zImage and modules-NEWdifferentNUMBERS.tar.gz
Replace/add the rootfs.img with the latest one from the link above it should be named rootfs.img.
Remember that the rootfs and kernel are updated quite often and that you should check and update every few days.
Make sure your startup.txt is correct and make sure everything is where it should be in a folder on your computer, then copy the folder to the root of your sd card.
Navigate to this folder using the file explorer in your Windows ROM (YOUR PHONE) and run the Haret.exe
It will then have some writing running down a black screen before booting android (it's just preparation to booting) read it if you want
Android will start and you should leave it about 2-5 minutes before touching anything, it has things running in the background and it will be slow, still setting itself up. Navigate to settings and set up your phone. If anything goes too badly wrong you can always delete data.img and start again! Data.img is the internal memory of the phone, remember? Well, until we get android working on the real internal memory...
---------------------------
Structure:
My SD card. (with android on it)
I'm running:
kernel: 20110819_183957 http://glemsom.users.anapnea.net/android2/htc-msm-linux/
build: Froyo FRX07http://forum.xda-developers.com/showthread.php?t=1171052
rootfs: rootfs-20110816-7e04198.zip from http://files.xdandroid.com/rootfs/
Code:
EncFiltLog.menc
kbd_info
Android
cache
download
tmp
Private
Games
Installs
DCIM
Others
Videos
Images
Sounds
media
frx07
rhodimg.nbh
My android is in frx07
inside my frx07:
Code:
data.img
ts-calibration
startup.txt
modules-2.6.27.46-01348-g9de837f.tar.gz
zImage
haret.exe
initrd.gz
system.ext2
AndroidApps
conf
media
rootfs.img
-----------------------------------------
Backup/Restore
when you have the need to backup and restore data, look for an app called Titanium Backup. I have never used it but heard it works brilliantly, even backing up your apps! There is a 'donation' version and a free version with not many differences. I suggest you go check it out!
-----------------------------
USB CONNECTIVITY
When your phone is in Android you can not use it like a USB, HTC's drivers will not work and you have to use certain programs until this is implemented.
Windows: Install DroidExplorer this lets you open a terminal (like command prompt) on the phone, lets you browse device adding/deleting files, among other features that are very useful. If that DroidExplorer doesn't pick up your phone (when picked up it will be called 0000000000) install PDAnet on your phone and pc. PDAnet provides the drivers needed to connect the phone. It also lets you use your phone as a modem and you can send SMSs using your computer. Do NOT run PDANET at the same time as DroidExplorer. When PDANET is connected it WILL use your phone for data connections - this is the only warning. The phone is not used for any networking when DroidExplorer is connected.
Mac: Unknown to me (can someone post?)
Linux: Never tried, it is easier than windows (can someone post a method?)
---------------------
Overclocking
Do NOT overclock WINMO.
If you want to overclock your device do so at your own risk.
it is as simple as adding "acpuclock.oc_freq_khz=710000" without quotes to your startup.txt cmdline. 710000 (approx 710 mhz) can be swapped for any number but this is practically the highest stable speed achievable. I use 710000, works fine for me.
-------------------------
Known problems across ALL BUILDS:
Media Player Some tracks might have playing issues. FIX: HERE
Bluetooth is experiemental
Speakerphone static : seemingly random issue
USB plugging the device into a computer, it will be recognised, but not by HTC drivers. FIX: You must use something like DroidExplorer and PDAnet to browse the device and ADB (android debug bridge). See above ^^ (USB tethering is being fixed/has been fixed)
FN LED On keyboard the caps LED works but the FN LED currently does not. FN still works fine
No deep sleep: FIX: disable GPS (or kill the running app causing phone to not sleep)
Failure booting Android: Phone fails to enter android after running haret.exe FIX: Make sure your winmo is NOT overclocked before booting android.
Booting or SD Card related problems: Make sure your card is formatted as FAT32 (reformat as Full Format if it is not working)
More information is available on the wiki, there is also information there if you want to get into development. There is a pretty good FAQ on that wiki too
Remember XDAndroid is not just for this device.
If any of this is wrong or you think something should be updated/changed, please tell me ​
The CDMA startup should have "board-htcrhodium.is_cdma=1" instead of "...is_gsm=0"
otherwise, looks good!
AkumaX said:
The CDMA startup should have "board-htcrhodium.is_cdma=1" instead of "...is_gsm=0"
otherwise, looks good!
Click to expand...
Click to collapse
Indeed, there is no "is_gsm" command .
arrrghhh said:
Indeed, there is no "is_gsm" command .
Click to expand...
Click to collapse
Thanks to both of you, not bad considering I don't even have a cdma phone eh?
anything I need to add? I will tidy it all up soon
Something that might catch out a beginner is if they have an older SD card and it isn't detected by more recent kernels.
Need to include this in the cmdline:
msmsdcc_1bit msmsdcc_fmax=14000000
the.decoy said:
Something that might catch out a beginner is if they have an older SD card and it isn't detected by more recent kernels.
Need to include this in the cmdline:
msmsdcc_1bit msmsdcc_fmax=14000000
Click to expand...
Click to collapse
I thought this was squashed in recent kernels?
arrrghh said:
saneksem said:
add that to startup,helped me on 2 gb card
msmsdcc_1bit msmsdcc_fmax=14000000 msmsdcc_nopwrsave
Click to expand...
Click to collapse
You don't need this if you're on a newer kernel!!!!
Just update your kernel folks, no need for this in the startup!
Click to expand...
Click to collapse
Oh, ok. I must have missed that. I only needed it on my older SD which I haven't tried using for a month or so.
I guess the only thing I would suggest (all minor things) would be maybe to bold/underline keywords, like "kernel", "rootfs", etc.. to differentiate things that may change over time; ex: I'm running FRX05 system.ext2, 3/1/11 rootfs from F22, 3/1/11 zImage/modules (kernel) from arrgghh, etc... And, I guess you "could" be nice and show people what they could edit in the startup.txt, depending on their phone; ex: I'm Sprint, so I would do kb=rhod400, cdma=1, etc..., but for each phone.
I would probably have to do all the different startup.txt's in a different thread, unless I just provide a quick table... I will think about it however I do like the idea about bolding key words.
Most new people don't realize if they have their call/end/windows/back buttons on in winmo, they will stay on while on android and never go off. Might want to put that in your first post before telling them to run haret...
at the end where you say you can just delete the data.img and startover its probably a better idea to say to be patient and reboot the phone once or twice before ditching your data.img ! and creating it is the bulk of the first boot, the linux black screen with the scrolling words section.
you can talk about saving your data.img just incase something goes wrong.
titanium backup is a must
having an app that can save sms when you switch builds (not a big deal for everyone but important to some.)
also let new users know android isn't perfect, things randomly completely mess themselves all the time, don't get discouraged just start fresh with a format and new files when deleting the data.img doesn't work and you'll be just fine.
All I want to know now is if I have helped anyone yet and if they had any problems with any part of it or want me to clarify anything I will be quite happy with such replies ^-^
Is anyone able to provide me with some ETAs of fixes on the problems across all builds listed in the OP? Also are there any more I am not aware of? Oh and if anyone is working on them?
Much Appreciated
ryannathans said:
Is anyone able to provide me with some ETAs of fixes on the problems across all builds listed in the OP? Also are there any more I am not aware of? Oh and if anyone is working on them?
Much Appreciated
Click to expand...
Click to collapse
There's never an ETA for anything getting fixed - BT seems close, but who knows the exact date it will be done? As CyanogenMod says, the only rule is don't ask for release dates / ETA. It'll be ready when it's ready.
Some problems are being looked into more than others, but I wouldn't say one in particular has been left out to rot. jb is fixing up BT, entropy is working on GPS fixes, wistilt2 on the RIL of late... Basically devs pickup things that are of an interest to them to fix. There's a lot still to fix/cleanup, so taking it all on alone is a little daunting. Gotta break it down into smaller pieces so it's at least somewhat manageable.
Thanks and a question...
First, thanks for the awesome post - quite helpful...
Second: I haven't mussed with my phone for about a year, for various reasons, the main one being that I was happy with my previous phone and the ROM I finally settled on, the secondary one being that phone died, and I now have a (blech) Sprint TouchPro2 (RHOD400), and am on my sixth (yes, sixth!) brand new TP2 - they keep giving me a new one because of problems (things, like... oh... say, not being able to answer calls... kind of a basic function in a mobile phone, nah?!) And, I've had no interest in futzing with what is already a frustrating and non-functional phone. I was hoping I could upgrade instead of getting another TP2 the last time I brought it in for probs, but they would only downgrade me to worse phones. So... here I am, wanting to put Android on my phone and see if there is any improvement. Or, at the least, be able to utilize some of the decent progz/gamez for Android. I mean, if I can't answer calls, at least I can use it as a handheld gaming system, right?!
Long story short: when I was flashing ROMs to other phones, the instructions explicitly said that you needed to unlock, etc., first. I can't find any data re: if there are steps you must take on your phone to 'prep' it, *before* following the steps in this thread. I've browsed the DB and no luck.
My apologies for being an annoying n00b!
PS: one of my friends said "Tell 'em you're a hawt babe - then they'll help for sure!" (ROFL)
And, thanks, again!
Tynkrrbell said:
Long story short: when I was flashing ROMs to other phones, the instructions explicitly said that you needed to unlock, etc., first. I can't find any data re: if there are steps you must take on your phone to 'prep' it, *before* following the steps in this thread. I've browsed the DB and no luck.
My apologies for being an annoying n00b!
And, thanks, again!
Click to expand...
Click to collapse
Well the reason you can't find any info on it, is that it's not required .
These builds run entirely off of the SD (currently - I wouldn't try NAND yet, it's in its infancy) so there's no need to do any HardSPL or anything really to prep - just drop the bundle on your SD card - if it's at the root, run haret.exe and gogogo!
Oi. I get the stupidcard of the day!
That is awesome! Same friend that suggested I mention I am a 'hawt babe' said I should "give boobpr0n" to whomever helped me. You probably wouldn't want to see that, though!
You are heartily appreciated! I'm off to be an Androidite!!!!!!
Tynkrrbell said:
That is awesome! Same friend that suggested I mention I am a 'hawt babe' said I should "give boobpr0n" to whomever helped me. You probably wouldn't want to see that, though!
You are heartily appreciated! I'm off to be an Androidite!!!!!!
Click to expand...
Click to collapse
My gf suffices for that .
Hope you enjoy Android!
Tynkrrbell said:
That is awesome! Same friend that suggested I mention I am a 'hawt babe' said I should "give boobpr0n" to whomever helped me. You probably wouldn't want to see that, though!
You are heartily appreciated! I'm off to be an Androidite!!!!!!
Click to expand...
Click to collapse
Not to burst any bubbles here, but if you are saying you are a "hawt babe" and give boobpr0n mumbo jumba, you are prolly not one and won't give it anyways.. so nobody will most likely believe you here..
Good luck though~

[Q] Sharp 003SH 005 SH root success - SIM unlock help

I live in Japan and after more than 6 months I have successfully and permanently rooted both my Sharp 003 SH Galapagos and the 005SH Galapagos (Softbank not Docomo). My next concern is how to SIM unlock. I have been reading the posts about hacking the nv_bin file. I have searched through all of the the files (Root FTP thank you!) but there was no such file. I am happy to send along any screenshots or data files if that helps.
Thanks in advance.
Search Sharp 003SH Root Success and Sharp 005SH Root success on Youtube for more info
Can't really help you. Don't know anything about it. But I would like to know how you ended up rooting this phone of ours.
Its not a file on the filesystem. The sim locking in these phones is in the radio image; which can be accessed when you use the custom build kernel thats in the latest rootkit (I assume thats what you are using).
See the 2ch root/ROM thread for more details, but basically it is done through ADB, manually backing up the "_modem" partition; stripping the spare/ECC bytes and then extracting the radio OS using QualcommDumpAnalyser
I have managed to extract this image, but no idea where to go from there. None of the other device info seems to apply to this (HTC, Samsung, LG, any other Android that has had its sim-lock discovered in the radio)
Advice i got from the guys on 2ch: "Qualcomm's NAND code is neither difficult, nor unique, so if you know what you are looking for its not hard"
003SH 005SH Sim unlock
Thanks very much for giving me a new direction. I'll get started on it right away and let you know how it progresses.
It just sucks that the guys who know how to unlock it are staying quiet, saying its "taboo"
FYI, stripping the Spare/ECC bytes can be done manually (i wrote a C program to do it), but there is an option in the RevSkills app to do it all for you - i recommend doing that.
Of course we face another issue once we find the actual unlock - recalculating the ECC bytes after making the change; the only way to access the radio is with raw data access.
P.S. hope you have warranty on your phones - this is very likely to brick at least one phone until we get it right
---------- Post added at 12:30 PM ---------- Previous post was at 12:24 PM ----------
In the spirit of open cooperation, here are the instructions i was given, translated and simplified
In ADB Shell, type su to get the # prompt, then:
cat /proc/mtd <Enter>
Confirm that you have the "_modem" partition available. If not, you need to reflash with the custom build kernel
Dump the image to file with the following command:
dump_image -r -D -F _modem /sdcard/backupimages/modem.img
Access this with anything as "raw dump" and all blocks will get read as ECC error, so definitely dont do this
ECC positioning is different to Linux, so take care
The following maps out how 512bytes of data and 10 bytes of ECC info are stored in a 528 byte block:
0000 - 01CF (0-463): Data
01D0 - 01D1 (464-465): Unused (0xff)
01D2 - 0201 (466-513): Data
0202 - 020B (514-523): ECC
020C - 020F (524-527): Unused (0xff)
Use RevSkills application to extract the data portions:
Menu⇒Calculators/Generators⇒Android MTD Nand remove Spare and ECC
Extract all of the Data only portions out of the raw dump, and then use QualcommDumpAnalyser to read it and split up the various parts. I did notice that i wasnt able to get the AMSS block out with QualcommDumpAnalyser - i copied that out manually by calculating the byte positions shown in QDA.
003SH bootloader key sequence?
Eternalardor,
I'd be happy to swap information. Perhaps you could shed some light on the question of the bootloader for the Sharp 003SH and 005SH? There seems to be no discernible key sequence (Power+home+Volume up etc.) to access the bootloader. I feel like I've tried them all. Can you tell me this critical piece of information?
Is a form of the USB Jig necessary to access it?
Looking forward to your response.
003SH SIM unlock
Dominik,
Here are the results of the original /proc/mtd (before rooting)
boot
cache
misc
recovery
ipl
system
persist
log
battlog
calllog
ldb
userdata
I don't see the _modem partition. Should I?
I have also included a screenshot of the results showing size. I have most of them backed up as .img files too.
FYI: .img backed up sizes. Perhaps this will help you to ponder where the _modem partition may have gone. Maybe it's been renamed?
boot 11,264KB
cache 3,072KB
misc 1,024KB
recovery 11,264KB
ipl 15,360KB
system 419,840KB
persist 30,720KB
ldb 45,056KB
userdata 405,120KB
There is no bootloader menu AFAIK. If you install the custom kernel, you will have the option of a quasi-recovery mode, by pressing the home button between 7-12 seconds after the Galapagos logo is seen (or was that the Softbank logo)
Anyway, looking at the screenshots, it seems you do not have the custom kernel.
How did you achieve root on your phone?
To do this, you need to use the "003sh_005sh_dm009sh-rootkit" from at least 5/27 (recommend _0614); which is available on the 2ch forums. This includes 2 possible ways of achieving root:
1. A modified standard kernel (boot image), which, when flashed gives you regular root access
2. A custom compiled kernel, which has full root, a bunch of power profiles, and heaps more features (inc that quasi recovery), as well as access to the "_modem" image.
Judging from your youtube videos, you speak some Japanese, so the Japanese menus in the rootkit shouldnt be much trouble.
http://www1.axfc.net/uploader/Si/so/142435
This is what i used.
Go here for help/instructions http://anago.2ch.net/test/read.cgi/android/1337845757/
And dont even think about typing in English on there, or you will be ignored and/or told to go away
This all looks familiar. I have been using the root kit (5/27) to get where I am now - step by blessed step. It was pretty straight forward BUT I have never seen the option to write to the system partition. It is in all the instructions but the only option I have with respect to the system partition is to back it up. I'm confused as to why it doesn't seem to show up for me. I am using a Japanese machine so all the characters are displayed and I can read the instructions but I can't find help anywhere as to why I don't have that particular (and critical) option. I can see a lot of new and cool options in the 6/14 release. I'm excited and would like to get it installed.
I'll let you know how it goes. Thanks for your help .... keep it coming!
And another thing
Could you explain a little more about "having" the custom kernel? Using the root kit, I wrote to the Recovery partition then the Boot partition then rebooted from the Recovery partition and all seemed well. As I said above, I have never been able to write to the System partition despite it appearing in all the instructions. I suspect that is what is holding me back from the latest and greatest custom kernel. Still, I am enjoying all the same functionality that everyone else seems to be enjoying in root. What am I missing?
Eep, you wrote to the boot partition before trying the recovery? Brave!
The steps should be:
Write image to recovery partition;
Then reboot to recovery partition (from the menu) and confirm it all works without errors.
Then write image to boot partition
And then turn off the phone, and reboot (the last part is only my instructions - you could just select "reboot to boot partition" from the menu)
You are doing this on your 005SH right? It should be the same for the 003SH, but i only have the 005SH. In the rootkit there is 2 options when you say "burn custom image":
1 カスタムビルドrootedカーネル(リカバリーキット機能付き)
2 S4080 標準rootedカーネル(簡易リカバリー機能付き)
Q 中止してメインメニューへ戻る
You must do the first one, the CUSTOM rooted kernel, to get any of the really cool features. The second option is only if you just want root access for a particular app or something. AFAIK the second option doesnt even disable MIYABI LSM, which prevents you from mounting the system dir as R/W
But either way, writing to the System dir is not important for what we are doing. You need the Custom kernel, which gives you access to the "_modem"
Edit, i just noticed in your screenshots above, you didnt even get root in ADB shell?
Type
ADB Shell<Enter>
Then type
su<enter>
The cursor should change to a #, this means root. You may get a prompt on the phone from Superuser asking you to give root access to "shell". Once you have this try the cat /proc/mtd again
jcroot003sh,
can you tell me how to root 003sh?
Use the link i provided in my previous post
http://forum.xda-developers.com/showpost.php?p=27989085&postcount=8
You can use a translator if you dont understand Japanese, but the general instructions are in the post above yours
I translated it for a friend, but that is at work, so wont be able to put it up until monday.
DominikB said:
Use the link i provided in my previous post
http://forum.xda-developers.com/showpost.php?p=27989085&postcount=8
You can use a translator if you dont understand Japanese, but the general instructions are in the post above yours
I translated it for a friend, but that is at work, so wont be able to put it up until monday.
Click to expand...
Click to collapse
Thank you for your replying. I will wait for your translated version. You are really a good person.
Progress
I have successfully found and dumped the "_modem" image. Exactly as you stated - forgot the "su" command in ADB. Thanks. The next problem is editing out the code. I am way above my head here so I will do some research before bugging you for a step-by-step for that.
Also, the bootloader worked. I didn't realize how to do it until I read the notes in the 6/14 release. I successfully put a previously dead phone back on it's feet EXACTLY to the point of my current phone simply by backing up and then restoring partitions through the bootloader. Very slick and easy.
Will get to work. I'll be in contact soon with my progress on the SIM unlock.
I have spent a bit of time looking at it, it certainly isnt easy (Certainly isnt a "lock=yes" section). I assume the actual locking portion is encrypted/compressed/or just compiled, because it would be too easy otherwise (be happy to be proven wrong). For starters, i cannot even find my IMEI number in the dump file... I think that this dump only includes the radio code, not the NV RAM which contains the IMEI and SIM Lock status. If that is the case then the solution should be to change the portion of the radio code that queries the NV RAM, so that it doesnt care if the SIM lock is supposed to be applied.
Extracting the spare/ECC bits out should be done with the RevSkills app; extracting the relevant portions, that is a bit of a cludge; QualcommDumpAnalyser can show the start/end positions, but doesnt extract the AMSS part (AFAIK thats where the code will be). You need to use a hex editor to cut that part out manually... And i am still not 100% sure what the block size is on this NAND.
Good luck!
And if there *are* any experienced hackers out there willing to help out, i can offer some monetary help (as will a few of my fellow Japanese smartphone owning friends) as this will be valuable for not just these 2 phones (there is an army of 007SH owners waiting on this unlock)
Shall we give the 007/009 a shot?
I can see mountains of the 007SH on the auction (mostly pink). Perhaps I should pick one up and take it for a spin. I am happy to try to do something to help out for all the help I am receiving.
Or perhaps the 009SH?
How hard would it be to crack the 007? The 009SH looks like it is supported in the latest release kit.
Thoughts?
Currently, the 003/005SH are going to be the easiest, because they have the custom kernel which allows access to the "_modem" image. To do it on the 007SH we need to build a custom kernel (compiled from the sources available on the ktai-dev site), and add the modem access code (this is in the src directory of the rootkit). Not impossible, but i dont have a Linux machine to compile the sources.
However i think that the code will be fairly universal. Once we find it on the 005SH we will know what we are looking for on the 007SH as well. That will make many people happy
Anyway, my 005SH is under warranty/anshin plan so i dont mind if it gets bricked (especially now that we can take nand backups).
First things first though - examining the 005SH modem image. Does anyone know whether the NAND is a 16kb or 128kb block size? Or is it something completely different?
P.S. The DM009SH is just the Disney Mobile version of the 003SH
Linux machine no problem
I have a Linux server running 24/7 so compiling the kernel is easy. Don't let that be the holdup. I'll keep working on the 003SH _modem image.
DominikB,
I can't open this site [anago.2ch.net/test/read.cgi/smartphone/1319287551/] on channel2 for free. This site had been moved to the past-log storehouse. So.... I even can't look at Japanese version for rooting 003sh. It is very helpful if you can show me the steps for rooting 003sh.

[Q] Development for Tizzbird N1 ?

Hi! So I'm wondering if anyone know if there is\have been any development for
the Tizzbird Stick N1 (M\G) ?
We have this Android-stick in stock at my store, but I'm not sure if I'm going to get it or not yet. Depends the development, as I'd really like to see the capabilities for it. I believe it's a lowbrand tho. so I might be out of luck.
Anyone know anything?
I searched the forums, and did a google search. Didnt find much.
regards,
Dag M.
Hi there!
I own one of those, and there are a handful of (german-speaking) people activly posting in this forum http://forum.tizzbird-tv.de/ about the Tizzbird N1. - The problem with that forum is that they heavily censor it - as soon as anyone posts info on how to "get in", or if someone asks uncomfortable questions - those posts gets deleted.
They sell it really cheap for 30€ (not all the time, but twice for one day @ redcoon) and although the Wifi-Chip (or the drivers for it) are really crappy, the media player part is really nice.
update: I've did a little research, and here is a little list of relevant links about the tizzbird n1:
==== Marketing Product Pages ====
http://valueplus.co.kr/english/product/product_player_n1.html
http://www.tizzbird.com/eng/index.php?mm_code=719&sm_code=755
http://tizzbird-tv.de/tizzbird/tizzbird-n1.html
==== Official Firmware ====
http://www.tizzbird.com/eng/index.php?mm_code=726&sm_code=727&board_search_head_word=stick+n1
http://download.tizzbird-tv.de/TizzBird_N1G_update_GMS_V3_20_13072719.tzbird
==== German Support Forum (posting info about root-access prohibited) ====
http://forum.tizzbird-tv.de/viewforum.php?f=11
==== GPL-Code for Tizzbird N10, N20 & N30 - but not for N1? ====
http://www.tizzbird.com/eng/index.php?mm_code=752&sm_code=754
==== Kernel Sources ? ====
http://www.cnx-software.com/2012/03...k-n1-android-ics-hdmiusb-dongle-media-player/
http://www.cnx-software.com/2012/07...hips-tcc8925-mini-pcs-cx-01-z900-tizzbird-n1/
https://github.com/cnxsoft/telechips-linux
Yeah, the pretend to be "community friendly and supportive" but once you actually start digging in, they get quite agressive and boot you out.
Anyways, I got a N1 a couple of days myself now (snagged it for 30 bucks at another RedCoon sale ) and I am surprised.
Got it pretty much only to tinker around with it and this thing suits more perfectly for that than I imagined.
Esp. that fact they used a simple SD card as "internal flash storage" - my guess is because a simple SD is cheaper than an actual eMMC flash chip, but it's so cool on so many levels for us.
I already found out how to replace the 4GB SD with a bigger one (have a 16GB in mine ATM).
I'll post some more details about it here later, got a few things I want to test and/or prepare first (thinking of some "easy to use cloning script"), but long story short:
You need to copy the bootloader to the very end (last few blocks) of the SD you want to use.
Once the BL is at the proper place it already boots from the new SD again, to be sure everything is as it's supposed to be one should apply an update via USB (I'm not 100% sure about a possible pointer to the BL that needs to be corrected, which the update does).
After that the partition information has to be edited to make the userdata partition larger and you're done.
thanks for the info HellcatDroid!
It would be great if you could elaborate on how to put the bootloader at the end of the sd-card.
Also I would love to get info how to get root into the stock firmware, that crippled down root-firmware that they allow to exist in the official tizzbird forum doesn't really satisfy my needs
I did it via a hex editor, but it should be doable with a few "dd" commands as well - that's one of the things I still want to try, find the propper dd params to copy the BL over.
If you dumped the original SD into a file using dd, at the very end of the image file you will find the bootloader and the very last block of the SD is a "header" telling the bootrom of the N1 a few things about it, so it can properly locate and load it.
So what you got to do is to copy those last ~230k from the image to the end of the new SD card.
As said, I'll try to write a small shell script that does it.
The rooting is even more easy (Stonecold would kill me if he'd read this, lol):
For when running on Linux (no can do on Windows, as Windows doesn't know the ext4 FS):
Since you got the SD in your PC anyways already, just mount partition 2 (e.g. if the SD is sdc on your PC, mount /dev/sdc2).
That is the partition where the Android system is sitting on.
Then just copy over the files needed for root to where they need to go, chown/chmod them properly, unmount and done
I used the "update-supersu.zip" I had for my Nexus7 to grab the required files.
But I'm planning to make a simple rooting script as well.
So if all goes as planned it'll come down to
- insert original SD
- run script 1
- insert new SD
- run script 2
- to root run script 3
brilliant! I would love to see those scripts
way easier than start tinkering with that stuff myself
One thing I wonder about - over at the official forum you said that a simple dd copy didn't work - is that if the target sd-card is bigger or also for an sd-card of equals size? because with equal size simple dd copy of the sd-card should still work, even if some things need so be exactly at the end.
Yup, just a dd didn't work because the new SD card was larger and the bootloader ended up being somewhere in the middle of the card instead of at the end.
While your thought of "dd to equal size cards" is totally correct, it might still fail due to the fact every card is not 100% exact same size counting down to last byte.
There ususally is a tiny size difference (a few bytes to kbytes) between cards, even if they are supposed to be same, so the bootloader might end up truncated or not exactely at the end.
If, however, the size of the cards is 100% the same, down to the last byte, then yes, a simple dd clone would work.
HellcatDroid said:
... There ususally is a tiny size difference (a few bytes to kbytes) between cards, even if they are supposed to be same, so the bootloader might end up truncated or not exactely at the end. ...
Click to expand...
Click to collapse
Oh! Didn't know that. I thought same marketing size means not the same size they write on the box, but at least the same size between those that are marketed with the same GB numbers on their stickers.
OK, here we go, I slapped together a few scripts for prepping a new (and larger) SD card to work in the N1 and while having the SD in the PC to aplly some root.
* hints at attachment of this post
The scripts might still have problems and not work on any Linux out there, but it's a start.
If there's more people interested and joining in on this I might continue but for now I got what I wanted - more storage and root.
Hi
I think I destroyed my MiniSC cand! The N1 is dead. I tried to insert the card in a linux and gparted did not see anything. What can I do?
thank you for your help
somade said:
Hi
I think I destroyed my MiniSC cand! The N1 is dead. I tried to insert the card in a linux and gparted did not see anything. What can I do?
thank you for your help
Click to expand...
Click to collapse
Could you post how you got there? what did you do to the sd-card that destroyed it?
Hi.
If you got a dump from a working state of the SD you can just dd it back onto the card.
If you don't, it can still be recovered but might need bit more work.
Two options:
find someone who gives you a dump of their card and use the write-card script from my above post to write it to your SD.
Problem with this: a working dump contains copyrighted code, like the bootloader, it technically it's "not OK" to share it
we come up with another script that only contains an "empty" image (i.e. only partitioning information) and that takes the bootloader and recovery from the official update and gets the card into a state that it boots into recovery and lets you install a working system using the official update from USB (option in the recovery menu)
Option 2 would be nicer, IMO.
I'll try to make up said script
Thank you for your immediate answer!.
Actually I dont know what has happened, maybe the sharp instrument I used to remove the plastic cover scratch it...But now when I put it in a card reader the led of the reader switch off and the card is heated!!!. And also when I put it in the N1 the blue led turns off!.
So I bought a new empty micro Sd .
Waiting for your script to partition the new card and then boot in recovery mode and install a firmware....
Because I am not expert to linux please give me a lot of details how to do this.
Thanks again!
HellcatDroid said:
we come up with another script that only contains an "empty" image (i.e. only partitioning information) and that takes the bootloader and recovery from the official update and gets the card into a state that it boots into recovery and lets you install a working system using the official update from USB (option in the recovery menu
Click to expand...
Click to collapse
Do you think the bootloader is even part of the offical updates? wouldn't it be "best practice" to leave the bootloader partition alone as long as possible (and normally firmware updates don't need to change the bootloader)
update: something else I've just found, those might be kernel sources for our Tizzbird N1:
http://www.cnx-software.com/2012/07...hips-tcc8925-mini-pcs-cx-01-z900-tizzbird-n1/
-->
https://github.com/cnxsoft/telechips-linux
Yep, the bootloader is in the update - at least in the 3.20 one.
And yes, usually the bootloader shouldn't be touched because that's usually the one thing that can "perma-brick" Android devices.
However, sometimes the manufacturer updates it (fixing bugs, adding functionality) - on my Nexus7 they updated the bootloader on pretty much every update and also Samsung updates their bootloaders every now and then (and every single update flashes the current one).
Last, not least, on the N1 the bootloader isn't on a partition but at unpartitioned space at the very last blocks of the SD (=> reason for a simple dd to a larger card not booting).
Ohyay at the possible kernel sources!
It'd be so cool if that's really sources able to build a kernel for the N1 with - I think we might be able to even get custom recovery (CWM and the likes) on the N1 if those sources work
OK, while trying to recreate a working SD card w/o using a dump of a working one I found out a few more things - some of them still need figuring out if we wanna do it properly.
There seem to be TWO bootloaders!
A stage1 bootloader of ~1kB size located at the third and second last block of the SD. If it's missing the N1 can't boot and it looks like ARM code (haven't tried to disassamble it yet), I assume the bootrom loads and executes that piece of code which in turn parses the header (see below) and load/starts the stage2 bootloader (the one also found in the FW update).
The very last block of the SD is a "header block" with some information beeing parsed either by the bootrom or (more likely) the stage1 bootloader.
The headerblock contains (among numerous other unkown data) the size of the ("stage2") bootloader (the one that then actually loads and boots the Linux kernel of the Android OS, this is also the one contained in the FW update) and the usable size of the SD card! (everything works fine though if the SD size is wrong and a proper FW update updates the header during writing of the bootloader and also sets the correct size).
Also, the headerblock has a checksum of which I have no clue on how it is generated.
All that is just educated guesses and might be totally off, but for now it looks like it's not too far off.
So, for now we can assume the following boot sequence:
Boot-ROM
-> loads stage1 bootloader from fixed position "SDsize - 3 blocks" (1 block = 512bytes)
stage1 bootloader at fixed position on SD
-> checks checksum of headerblock (?), gets size of stage2 bootloader from headerblock, locates stage2 bootloader based on it's size and loads/executes it
stage2 bootloader on variable position on SD
-> base initialisation of hardware
-> checks for recovery trigger (the red button on the remote control) and boots kernel from partition 6 if trigger present
-> boots kernel from partition 1 if recovery was not triggered
-> enters fastboot mode when booting the kernel fails
Kernel
-> loads base drivers and boots up the system
you're brilliant Hellcat!
And did you also find both bootloader stages inside the firmware updates?
Another question that came to my mind while reading your post (fastboot..)
Is there a way to use the Tizzbird as USB-slave? So to make use of adb and fastboot and such stuff? Okey adb could also be used via network I guess..
somade said:
Hi
I think I destroyed my MiniSC cand! The N1 is dead. I tried to insert the card in a linux and gparted did not see anything. What can I do?
thank you for your help
Click to expand...
Click to collapse
Somade, do you have a linux running on your pc? If no, download and get a knoppix running. and then contact me via pm. I have the original n1 image so no problem to recover the n1.
sebastian.heyn said:
Somade, do you have a linux running on your pc? If no, download and get a knoppix running. and then contact me via pm. I have the original n1 image so no problem to recover the n1.
Click to expand...
Click to collapse
Welcome to our rouge and non-censored Tizzbird N1 forum Sebastian!
I wonder if you found us here, if the German Tizzbird support also already knows about us
update: I just remembered, I've sent you the link as PM over in the official forums, thats how you landed here.
Sharing your sd-card image might be a copyright violation, and if you're profile name is strongly linked to you're real identity you should definitly be cautious with such things on public forums...
kaefert said:
And did you also find both bootloader stages inside the firmware updates?
Click to expand...
Click to collapse
Nope, unfortunately the stage1 bootloader is not in the update :-/
kaefert said:
Is there a way to use the Tizzbird as USB-slave? So to make use of adb and fastboot and such stuff? Okey adb could also be used via network I guess..
Click to expand...
Click to collapse
Yeah, it works, even officially XD
Go to the TizzBird settings -> "System Settings" -> "Advanced Settings"
It has an option "OTG Mode" there, set it to "Debug".
If you have your N1 connected to your PC via the micro-USB port (and hence your PC powering the N1!) you can use ADB and fastboot just as usual
I have not yet tried if that option is persistant, i.e. it survives a power loss.
When booting the kernel fails it should fall back to fastboot mode, so flashing a new kernel w/o pulling the SD should be possible - need to test this a bit more, though.
What works is, if you're rooted and and you fire the command "reboot bootloader" from a root shell, that gets you into fastboot mode no matter what (given you applied above mentioned setting first).
But needing a running system to get into fastboot mode kinda defeats the purpose of it - this aint Ouya which is a total fail when it comes to fastboot XD
---------- Post added at 09:26 AM ---------- Previous post was at 09:05 AM ----------
kaefert said:
I wonder if you found us here, if the German Tizzbird support also already knows about us
Click to expand...
Click to collapse
Eventually they will, I'd say.
And I'd love to see their faces when they do XD

[Q] Cooking ROMs... I still don't get it

Hello,
I'm willing to try and build a custom rom, but I've been diving through the site for a few days and I still don't get it. I believe I do have the required background to do this: programming, linux, etc. and I have wide experience as a phone user, etc. It's just that either I'm not reading what I need or the way I want it. The problem, I believe, is that all I find are guides telling me to install this and those tools and then open this and that and voila! you got your rom. But they're not explaining WHAT exactly goes into those roms, or what is expected to go there, what's the purpose of those contents, etc., and I can't really catch with that. I feel at a loss and hate wasting my time turning around for nothing.
1. I don't understand the difference between a flashable rom and one that is meant to be installed through recovery, although I can see they're different. Do they both models contain the same kind of data? Is there any restriction to what one model can contain over the other one? If so, how would I convert from one to the other? But please, don't tell me to use this or that tool. I just need the theory behind it. Something of sorts like: "You need to extract this or that from this tarball, then mount this image, then the directory tree there goes in that directory over the other model of rom"
2. update-binary: Okay I guess this is run when installing from recovery, and this takes care of installing the rom, right?wrong?. Is this a per-rom thing, per-device thing? generic? If it's per-rom, how to generate it? do I need to compile something? Is there any generic source code that can be used as a start?
3. Although I have a basic understanding of how the Linux directory tree works, I know Android works on top of a heavily modified Linux. So can you explain briefly how the directory tree works? For instance, I believe /data/data is where Android apps install to, in /system/bin or xbin I can find busybox binaries/symlinks if present. /dev and /proc look the same as in Linux. I don't know about /sys. Also how are both rom models deployed to this tree? What is basically being copied?
4. If I were to compile a kernel, where do I find the Android kernel sources? or is it just a generic Linux kernel? where can i get a basic config for the device? Last time I checked my device hadn't /proc/config.gz but maybe I could get it from another rom with it enabled or something. What toolchain and where to get it? Oh and if you know of a native arm version of gcc or whatsnot, I'd prefer that. Setting up IDEs or toolchains is a nightmare. I don't like crosscompiling. But crosscompiling or not, a directory with all needed binaries without needing to set up system variables nor other stuff, would be amazing.
I surely have a lot more questions that I can't get from the back of my mind now, and I'll have yet more as you explain. But the point of my questions was mainly trying to explain the degree of the loss I'm at, so you can assist me better.
If it looks like a foolish petition, well, that's because I'm quite stubborn and can't catch things that don't go my way. I really need to understand the basics before I can move into actually doing something. I want to build a rom for the right reasons(to me). It's not just about packing a set of apps or themes with it, but about learning and doing other stuff like trying to fix things that are not supposed to work for the device in that Android version, etc.
If you can't help, congrats for reading through here anyways But any help is greatly appreciated :good:
oxiroxt said:
Hello,
I'm willing to try and build a custom rom, but I've been diving through the site for a few days and I still don't get it. I believe I do have the required background to do this: programming, linux, etc. and I have wide experience as a phone user, etc. It's just that either I'm not reading what I need or the way I want it. The problem, I believe, is that all I find are guides telling me to install this and those tools and then open this and that and voila! you got your rom. But they're not explaining WHAT exactly goes into those roms, or what is expected to go there, what's the purpose of those contents, etc., and I can't really catch with that. I feel at a loss and hate wasting my time turning around for nothing.
1. I don't understand the difference between a flashable rom and one that is meant to be installed through recovery, although I can see they're different. Do they both models contain the same kind of data? Is there any restriction to what one model can contain over the other one? If so, how would I convert from one to the other? But please, don't tell me to use this or that tool. I just need the theory behind it. Something of sorts like: "You need to extract this or that from this tarball, then mount this image, then the directory tree there goes in that directory over the other model of rom"
2. update-binary: Okay I guess this is run when installing from recovery, and this takes care of installing the rom, right?wrong?. Is this a per-rom thing, per-device thing? generic? If it's per-rom, how to generate it? do I need to compile something? Is there any generic source code that can be used as a start?
3. Although I have a basic understanding of how the Linux directory tree works, I know Android works on top of a heavily modified Linux. So can you explain briefly how the directory tree works? For instance, I believe /data/data is where Android apps install to, in /system/bin or xbin I can find busybox binaries/symlinks if present. /dev and /proc look the same as in Linux. I don't know about /sys. Also how are both rom models deployed to this tree? What is basically being copied?
4. If I were to compile a kernel, where do I find the Android kernel sources? or is it just a generic Linux kernel? where can i get a basic config for the device? Last time I checked my device hadn't /proc/config.gz but maybe I could get it from another rom with it enabled or something. What toolchain and where to get it? Oh and if you know of a native arm version of gcc or whatsnot, I'd prefer that. Setting up IDEs or toolchains is a nightmare. I don't like crosscompiling. But crosscompiling or not, a directory with all needed binaries without needing to set up system variables nor other stuff, would be amazing.
I surely have a lot more questions that I can't get from the back of my mind now, and I'll have yet more as you explain. But the point of my questions was mainly trying to explain the degree of the loss I'm at, so you can assist me better.
If it looks like a foolish petition, well, that's because I'm quite stubborn and can't catch things that don't go my way. I really need to understand the basics before I can move into actually doing something. I want to build a rom for the right reasons(to me). It's not just about packing a set of apps or themes with it, but about learning and doing other stuff like trying to fix things that are not supposed to work for the device in that Android version, etc.
If you can't help, congrats for reading through here anyways But any help is greatly appreciated :good:
Click to expand...
Click to collapse
I am not terribly knowledgeable about all of this, but I will take a crack at it. Others can feel free to correct me.
1. "Flashing" is usually done through the recovery from a zip with an update script inside. That script is in a language called "edify". Read more about Edify Here and Here.
The only other common way that I know of installing a ROM is through fastboot in the bootloader, but that is normally only used with official factory images. Also, I think Samsung ROMs are often flashed with a proprietary program called Odin.
2. I think that the update-binary is standard across all recent devices. I think it is just an interpreter for the Edify scripting language. Old versions of android used a somewhat different scripting language and required a different file. You can probably pull the binary out of another recent zip and use that. The main thing you have to worry about is the update script (instructions for what the zip does) and the folder structure of the zip.
3. I am not confident to explain much here, but the apps and their data are stored in different places. User apps are stored in /data/app with app data stored in /data/data, I think. System apps are installed in /system/app. There is more files stored on the "sdcard" partition which can be internal or external, depending on the device.
4. Kernel sources are usually provided in the source code from whatever repo you are using. Different ROMs use different bases. Here is some info about grabbing the AOSP kernel sources with git: http://source.android.com/source/building-kernels.html
Many of the more popular ROMS have specific build instructions on their individual github pages (Cyanogen, Paranoid Android, etc), so you might what to look at those, too. Also, depending on the individual devices, there might be proprietary binaries sourced from the device or hardware manufacturers for things like camera drivers, graphics chips, etc.
If you want a walk through of the basic build process google has a tutorial. The last time I checked there seemed to be some outdated info, but it might give you a general idea of the build process. http://source.android.com/source/initializing.html
Hopefully someone more knowledgeable can give you more info, but that is all I got
synesthete said:
I am not terribly knowledgeable about all of this, but I will take a crack at it. Others can feel free to correct me.
1. "Flashing" is usually done through the recovery from a zip with an update script inside. That script is in a language called "edify". Read more about Edify Here and Here.
The only other common way that I know of installing a ROM is through fastboot in the bootloader, but that is normally only used with official factory images. Also, I think Samsung ROMs are often flashed with a proprietary program called Odin.
2. I think that the update-binary is standard across all recent devices. I think it is just an interpreter for the Edify scripting language. Old versions of android used a somewhat different scripting language and required a different file. You can probably pull the binary out of another recent zip and use that. The main thing you have to worry about is the update script (instructions for what the zip does) and the folder structure of the zip.
3. I am not confident to explain much here, but the apps and their data are stored in different places. User apps are stored in /data/app with app data stored in /data/data, I think. System apps are installed in /system/app. There is more files stored on the "sdcard" partition which can be internal or external, depending on the device.
4. Kernel sources are usually provided in the source code from whatever repo you are using. Different ROMs use different bases. Here is some info about grabbing the AOSP kernel sources with git: http://source.android.com/source/building-kernels.html
Many of the more popular ROMS have specific build instructions on their individual github pages (Cyanogen, Paranoid Android, etc), so you might what to look at those, too. Also, depending on the individual devices, there might be proprietary binaries sourced from the device or hardware manufacturers for things like camera drivers, graphics chips, etc.
If you want a walk through of the basic build process google has a tutorial. The last time I checked there seemed to be some outdated info, but it might give you a general idea of the build process. http://source.android.com/source/initializing.html
Hopefully someone more knowledgeable can give you more info, but that is all I got
Click to expand...
Click to collapse
OMG Finally some light! THANK YOU, THANK YOU, THANK YOU for all the info. I didn't get much right now, I'll need to read through your post a few times before I get it all, haha. I'll be sure to check the links too. Thank you!

Categories

Resources