[DEV] The project to port Android(froyo) on S8500 (8530)

Status
Not open for further replies.
Search This thread

cadiga

New member
Apr 28, 2011
4
2
if ("Oleg Kalugin, a former KGB general who was a Soviet spy in the United States" == oleg_k)
{
samsung.phone.8530.state = result.success;
}
else
{
samsung.phone.8530.state = result.god_knows;
}

Bye I will not post anymore but will be watching the forum regularly
 
  • Like
Reactions: sabianadmin

srg.mstr

Senior Member
Jan 5, 2010
61
116
Minsk
ADB command line mode

Thanks to (in alphabetical order) Mijoma, Nbates66, Oleg_k, Rebellos, Srg.mstr (last but not least) now we have ADB command line mode (in recovery mode now).
For this we use only standard USB data cable:
0. For experts only who will not ask stupid questions in the future.
1. make kernel ( https://github.com/Oleg-k/initramfs_2.6.32_S8500 https://github.com/Oleg-k/S8500_Kernel_2.6.32 ) with modified initramfs/recovery.rc http://code.google.com/p/badadroid/source/browse/trunk/initramfs/recovery.rc?spec=svn179&r=179
2. create "galaxyboot" folder at internal mmc0 card and put there:
2.1 sbl.bin http://code.google.com/p/badadroid/downloads/detail?name=Sbl2FOTA_mijoma2.zip&can=2&q=#makechanges
2.2 zImage
3. create on external mmc2 primary FAT partitions p1, p2 and p3 ( <=1GB ). put there files from factoryfs.rfs > p1, dbdata.tar > p2, cache.rfs > p3.
4. make and upload to phone FOTA http://code.google.com/p/badadroid/source/browse/trunk/FOTA/kernel_boot_sbl.asm?r=179
5. connect USB to phone and hold POWER and CALL buttons.
6. after ~30sec reconnect USB and try to use $ ./adb shell
 
Last edited:

nbates66

Senior Member
Apr 2, 2011
459
258
Launceston
Thanks to (in alphabetical order) Mijoma, Nbates66, Oleg_k, Rebellos, Srg.mstr (last but not least) now we have ADB command line mode (in recovery mode now).

i'd like to point out that since a "dd" utility is included we *may* be able to create direct file dumps from oneNAND partitions at will, useful to anyone?

EDIT: just managed to mount factoryfs as /system in Samsungs native rfs format.
 
Last edited:

nbates66

Senior Member
Apr 2, 2011
459
258
Launceston

i remembered, we need a warning here, most of the current FOTA code is limited to XXJEE Wave S8500 bootloader and XPKA bootloader on S8530, if you don't have either of these then flashing one of these FOTA files might prevent your wave from booting bada, it will ask for a compatible FOTA file, make sure you have the correct bootloader and don't get yourself into trouble!
 

Rebellos

Senior Recognized Developer
May 13, 2009
1,353
3,428
Gdańsk
it will ask for a compatible FOTA file

Or, rather it just won't start, don't cry then guys and girls, just put off battery, put it back in, start in download mode and flash the original FOTA module.

Or, if you cannot find original FOTA, you can compile our, with changing
in macros_S8530/8500 (according to your model, that is important)
to

or something similiar, the thing is that it would be nice if it had the same length (4 bytes), but eventually removing the whole db 'BPDZ' will do too.

Such modified & compiled FOTA module shouldn't block booting after flashing it.
 
  • Like
Reactions: cinimini

oleg_k

Retired Recognized Developer
Dec 19, 2005
183
620
Moscow
I am sorry for the lack of, a big load on the main work.
But, I'm back))))

latest news about my kernel - keyboard driver full work,
currently working on sensors drivers.

Mijoma, Nbates66, Rebellos, Srg.mstr and other - we are the BEST)))
 
Last edited:

srg.mstr

Senior Member
Jan 5, 2010
61
116
Minsk
busybox works fine

i have installed busybox into /data/busybox and changed system path: export PATH /sbin:/system/sbin:/system/bin:/system/xbin:/data/busybox

My thought is clear?
HOST$ ./adb push /home/user/workspace/s8500_linux/kernel/arch/arm/boot/zImage /mnt_int2/galaxyboot/
4288 KB/s (6704900 bytes in 1.526s)
DEVICE# cd /mnt_int2/galaxyboot
DEVICE# busybox ls
sbl.bin zImage
DEVICE# toolbox reboot

Code:
# busybox uname -a
Linux localhost 2.6.32.9 #8 Wed May 18 00:11:45 EEST 2011 armv7l unknown

# busybox fdisk /dev/block/mmcblk1

The number of cylinders for this disk is set to 486192.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/block/mmcblk1: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

              Device Boot      Start         End      Blocks  Id System

Command (m for help): q

# busybox fdisk /dev/block/mmcblk0

Command (m for help): p

Disk /dev/block/mmcblk0: 2055 MB, 2055208960 bytes
255 heads, 63 sectors/track, 249 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1               1          75      602112   6 FAT16
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(1023, 254, 63) logical=(0, 0, 2)
Partition 1 has different physical/logical endings:
     phys=(1023, 254, 63) logical=(74, 244, 43)
/dev/block/mmcblk0p2              75         125      401408   6 FAT16
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(1023, 254, 63) logical=(74, 244, 44)
Partition 2 has different physical/logical endings:
     phys=(1023, 254, 63) logical=(124, 237, 50)
/dev/block/mmcblk0p3             125         250     1003519+  6 FAT16
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(1023, 254, 63) logical=(124, 237, 51)
Partition 3 has different physical/logical endings:
     phys=(1023, 254, 63) logical=(249, 220, 35)

Command (m for help):

Code:
# busybox ifconfig -a
gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-0E-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:840 (840.0 B)  TX bytes:840 (840.0 B)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tunl0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-10-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr BE:9A:2B:F9:B3:57  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#
 
Last edited:
  • Like
Reactions: Rebellos and cfernr

nbates66

Senior Member
Apr 2, 2011
459
258
Launceston
ok i worked out why the kernel was only starting in recovery: the atag_cmdline setting sbl.bin is using includes "bootmode=2", the reason for this is probably because it can't find "param.lfs", current workaround is either recompile the kernel set to ignore the cmdline atag parameter and set the kernel default cmdline in boot options instead, or rename init.rc to recovery.rc

i've started attempting to boot in normal mode with most partitions mounted(have pretested the mounts in recovery.rc), the result of init.rc execution appears to be a stall however, with no adb service starting, i'm going to upload my current init.rc to googlecode. If possible can someone with a debug cable get a log?

the file: http://code.google.com/p/badadroid/source/detail?r=190
(could my stall be caused by incorrect factoryfs.rfs platform files?)

also, log of my last run of recovery.rc which appears to be successfuly (yields adb control etc), extracted using "adb shell toolbox dmesg"


http://code.google.com/p/badadroid/source/browse/trunk/adb+logs/dmesg2.log?spec=svn188&r=188

EDIT again, for those who want to reconfig the kernel to ignore atag rather than rename init.rc > recovery.rc:
http://h1.pargon.nl/wiki/index.php?title=Bootloader
"Bypass SBL arguments using Linux"
 
Last edited:

Rebellos

Senior Recognized Developer
May 13, 2009
1,353
3,428
Gdańsk
Wonderful, debug messages without UART! :D


Try to use following code in fota_callback, just before LDMFD

LDR R0, [sbl_boot_mode]
MOV R1, 1 ;any value that differs from 4
STR R1, [R0]


useful pointers (you can place it after LDMFD):
sbl_boot_params dw 0x40704AD4
sbl_boot_mode dw 0x40704AE0
 
Last edited:

anghelyi

Senior Member
Apr 25, 2008
347
210
Hi Oleg! Could you update your kernel and initramfs on github, please? I think all the devs would be happy :)
 

nbates66

Senior Member
Apr 2, 2011
459
258
Launceston
i *think* i managed to execute standard boot on init.rc with adb interface, zygote and android services appear to be stuck in a restart loop:
http://code.google.com/p/badadroid/source/detail?r=192

EDIT: would like to note that while "VIBETONZ" is appearing on the log, the phone is not vibrating, nothing is appearing on the display either. If possible i'd like a check on my kernel sources Oleg. EDIT AGAIN: the phone does actually vibrate, my bad

line 3150ish you can see the zygote service and various others getting killed and restarting.

EDIT2: another debug log extracted using "adb bugreport" (very large, will want to download in order to view)
http://code.google.com/p/badadroid/source/detail?r=193
http://badadroid.googlecode.com/svn/trunk/adb logs/bugreportnb190511.log
see if that second link works :/

EDIT3: it's possible that the restart loop is caused by lack of memory, this could be caused by the memory mapping of the current bootloader we're using, will have to ask rebellos and srg about that.

added a log to googlecode for procedure to boot kernel using init.rc with adb interface working ( i'm not exactly sure why this works) i may upload the zImage i'm using for this, but it'll only work if you partition your memory card in the correct layout and format.
http://code.google.com/p/badadroid/source/detail?r=194
http://code.google.com/p/badadroid/downloads/detail?name=initscriptedkernel190511v2&can=2&q=
 
Last edited:

srg.mstr

Senior Member
Jan 5, 2010
61
116
Minsk
nbates66, i look at your partition table and think it's better to use one SD card partition "mmcblk1" and put at it "/android" folder. like this:

mkdir /mnt_ext
mount vfat /dev/block/mmcblk1 /mnt_ext
symlink /mnt_ext/android/system /system
symlink /mnt_ext/android/data /data
symlink /mnt_ext/android/cache /cache

in that way no need to format sd card for many BADA users. I checked it - works fine.
 

anghelyi

Senior Member
Apr 25, 2008
347
210
I use the same (I took the idea from your recovery.rc) and it seems to be working fine. But as vfat doesn't support chown/chmod maybe we should use ext2/3/4...
 

srg.mstr

Senior Member
Jan 5, 2010
61
116
Minsk
I use the same (I took the idea from your recovery.rc) and it seems to be working fine. But as vfat doesn't support chown/chmod maybe we should use ext2/3/4...
as you know in linux chown/chmod apply to all folder with subs (you can't use file from other owner for example). just need to set chmod/chown to top folder "/system" (it's link at root). And for what u need multiuser mode?
 
Last edited:

anghelyi

Senior Member
Apr 25, 2008
347
210
But does chmod/chown works on fat filesystems, too? Because from my previous experiences (on desktop linux) I remember that it isn't. And init.rc and recovery.rc is full of chmods and chowns... I don't need multiuser mode.
 

srg.mstr

Senior Member
Jan 5, 2010
61
116
Minsk
But does chmod/chown works on fat filesystems, too? Because from my previous experiences (on desktop linux) I remember that it isn't. And init.rc and recovery.rc is full of chmods and chowns... I don't need multiuser mode.
chmod/chown applies only for top level folder which is placed on virtual ram fs (not on FAT). it folder is mount point for FAT partition. and all FAT files/folder have access level as parents folder.
 
Last edited:
Status
Not open for further replies.

Top Liked Posts