This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
libGPS for TinkerBoard Android
#71
(02-07-2019, 06:52 PM)lobo Wrote: Hello fited, something wrong with your boot.img, it is not the boot.img of the TB. Pls. see the screenshot of Bless Hex Editor:

your boot.img


TB boot.img


Seems that your rkflashtool doesn't read the right data. Do you have a TB S? From where do you have downloaded rkflashtool? The original version is here:

Hmm, i use the same link for rkflashtool.

I build rkflashtool for linux and windows, same results.

I use "Asus Tinker Board (with 32GB microSD card)" not "Asus Tinker Board S" i.e. TB without integrated 16gb flash memory.

My terminal output from rkflashtool:
Code:
rkflashtool r boot >boot.img
rkflashtool: info: rkflashtool v5.2
rkflashtool: info: Detected RK3288...
rkflashtool: info: interface claimed
rkflashtool: info: working with partition: boot
rkflashtool: info: found offset: 0x00016000
rkflashtool: info: found size: 0x00010000
rkflashtool: info: reading flash memory at offset 0x00025fe0... Done!

Do you think this issue with my TB or bad-builded rkflashtool?
Also, right "TB boot.img" from your post - it's from TinkerOS_Android V13.14.0.95 or other img?
Your device TinkerBoard S?

Note:
Today i try unpack attached boot.img with unpackbootimg from here http s://github.com/osm0sis/mkbootimg
and looks like it's unpacked successfully i.e. i can add line at ueventd.rk30board.rc and edit other *.rc files.
But when i start pack this files back with mkbootimg util to boot.img i see kernel error.
Reply
#72
Hi All, i have problem with the rkflashtool on my TB S too. It cannot find boot partition. So I used another method how to change permissions of ttyACM0. I described it in my previous post.
Reply
#73
(02-06-2019, 10:45 AM)maartinus Wrote: So I added 'chmod 0666 /dev/ttyACM0' to the file /system/etc/init/atrace.rc on the end of chown/chmod list. I know, this method is not very nice, but it works at least on my TB 'S'.

I can't find "init" folder in "/system/etc/" in android 6. Should i create init folder?
Reply
#74
(02-07-2019, 07:02 PM)fited Wrote: Note:
Today i try unpack attached boot.img with unpackbootimg from here http s://github.com/osm0sis/mkbootimg
and looks like it's unpacked successfully i.e. i can add line at ueventd.rk30board.rc and edit other *.rc files.
But when i start pack this files back with mkbootimg util to boot.img i see kernel error.

Hello fited, you need to pack the boot.img this way as I wrote in the first post:
Code:
cd unpacked
find . | xargs -I file touch -d "1970-01-01 01:00" file
find . | cpio -o -H newc | gzip -n >../newboot.img.gz
cd ..
path/to/rkcrc -k newboot.img.gz newboot.img

Background: The TB boot.img doesn't contain the kernel, only ramdisk. Therefore mkbootimg can't be used. Finally the boot.img must be signed with rkcrc.


[EDIT]
You can read and write the boot.img also with dd directly from and to the sdcard. Note that this is for Android M sdcard, not N.
To read:
Code:
sudo dd if=/dev/sdx of=boot.img bs=512 skip=98304 count=65536
To write:
Code:
sudo dd of=/dev/sdx if=newboot.img bs=512 seek=98304



Also you can easily check after read the boot.img if the first 4 bytes are 'KRNL'. Then you have a valid image.
[-] The following 1 user Likes lobo's post:
  • fited
Reply
#75
(02-10-2019, 07:16 AM)lobo Wrote: [EDIT]
You can read and write the boot.img also with dd directly from and to the sdcard. Note that this is for Android M sdcard, not N.
To read:
Code:
sudo dd if=/dev/sdx of=boot.img bs=512 skip=98304 count=65536
To write:
Code:
sudo dd of=/dev/sdx if=newboot.img bs=512 seek=98304



Also you can easily check after read the boot.img if the first 4 bytes are 'KRNL'. Then you have a valid image.

Awesome! Thank you very much for explanation and solution. I will try and answer about the results!!!
Reply
#76
(02-10-2019, 06:40 AM)fited Wrote:
(02-06-2019, 10:45 AM)maartinus Wrote: So I added 'chmod 0666 /dev/ttyACM0' to the file /system/etc/init/atrace.rc on the end of chown/chmod list. I know, this method is not very nice, but it works at least on my TB 'S'.

I can't find "init" folder in "/system/etc/" in android 6. Should i create init folder?

Oh, so it looks like this solution is only for android 7
Reply
#77
Yes, I can find this folder only on Android N. But thank you, I wasn't aware of this...
Reply
#78
(02-10-2019, 10:08 AM)maartinus Wrote: Oh, so it looks like this solution is only for android 7

Ahh, sad that doesn't work in Android M.

(02-10-2019, 07:16 AM)lobo Wrote: Also you can easily check after read the boot.img if the first 4 bytes are 'KRNL'. Then you have a valid image.

Sorry for late answer, i fought with the my Card Reader device.

Android M, TinkerOS_Android V13.14.0.95,
boot.img generated from next command directly from SD card (tested on different SD Cards: Samsung, SanDisk):
Code:
sudo dd if=/dev/sdb of=boot.img bs=512 skip=98304 count=65536
65536+0 records in
65536+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 5,35369 s, 6,3 MB/s

Very strange, but after that i open boot.img in bless hex editor and see 'ANDROID!' again, not 'KRNL'.
   
boot.img attached http s://drive.google.com/open?id=1H87H9yxjhFsmIMW6Sdr40FrXbRgR7wPZ

Issue in skip offset?

Update:
I make boot.img for test purposes with 0 skip offset.
Code:
sudo dd if=/dev/sdb of=boot.img bs=512 skip=0 count=10000000
After that i open bless hex editor and search 'KRNL' word, first hit in 70556 byte.
   
gunzip not worked.

Update 2:
Another 'KRNL' with offset 33554432 byte.
Code:
sudo dd if=/dev/sdb of=boot.img bs=512 skip=65536 count=65536
sudo dd if=boot.img of=boot.img.gz skip=8 bs=1 count=100000000000
gunzip boot.img.gz

gzip: boot.img.gz: not in gzip format
   
But, no luck, gunzip still not work for boot.img.gz.
boot.img attached http s://drive.google.com/open?id=1oFmrk50xEbtjxYt6D7DsdRikFOlpd0Fh
boot.img.gz attached too http s://drive.google.com/open?id=1MeeapabvEBLLv39fhYqUhsOryAB0C25P

Steel don't understand how to fetch right data.
Reply
#79
Hello fited,
I downloaded now the V13.14.0.95 and searched with Bless but no success! Where in V13.12.0.43 at position 300000h is the boot partition with 'KRNL' beginning, in V13.14.0.95 is 'ANDROID!'. It seems that this image is somehow malformed.
The partition table of the Rockchip devices is written in the parameters.txt and this you can find at position 0 + offset (2000h * 200h). And there the rkflashtool is also looking for the partition information. The boot partition as in parameters.txt is at 16000h, calculated as this: (16000h + 2000h) * 200h = 3000000h.
For the dd tool as with bs=512 the seek and skip values are 16000h + 2000h = 18000h = 98304d.
Maybe one of the TB developer can explain this, if the format of the boot partition has changed?
Meanwhile I would recommend you to use an older Version as V13.12.0.43. I don't know about the 13.13.0.74.
[-] The following 1 user Likes lobo's post:
  • fited
Reply
#80
(02-11-2019, 12:23 PM)lobo Wrote: Maybe one of the TB developer can explain this, if the format of the boot partition has changed?
Meanwhile I would recommend you to use an older Version as V13.12.0.43.

Hi Lobo,

OK, I'll try to use the older version and i will make email to Asus TB support team about issue in V13.14.0.95.
Can i mention TB developers inside this topic, i.e. they read TB forum?

Also i will check V13.13.0.74, and post results.

Thank you very much for the help and the time spent on the issue, it meant a lot to me and other developers!

In my case it would be ideal to use Android N image, but i use Raspberry Pi 7 inches official display, and in Android N touches not works.
In Android M touch screen works correctly, because of it i should use Android M builds.
I search this issue, looks like currently not solved. Related topic: http s://tinkerboarding.co.uk/forum/archive/index.php/thread-348.html
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)