Re: Debian on my tablet?
Paul Wise writes: > http://linux-rockchip.info/mw/index.php?title=Boot_Sequences Too difficult for me, I'm afraid. Rodolfo
Re: Debian on my tablet?
On Sun, Jan 22, 2017 at 9:16 PM, Thadeu Lima de Souza Cascardo wrote: > Then, it seems you have a system that likely boots from FAT, maybe? I am > not familiar with the mediatek family, but that could be possible. FYI, we are talking about a Rockchip SoC, not Mediatek. http://linux-rockchip.info/mw/index.php?title=Boot_Sequences -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Thadeu Lima de Souza Cascardo writes: > First, mtk-msdc.1 is probably a external SD card. > > Then, it seems you have a system that likely boots from FAT, maybe? I am > not familiar with the mediatek family, but that could be possible. > > You should assign that mmcblk0p1 file to a loop device, then create the > partitions of it, mount them, and check it. > > Do it in your own Debian desktop: > > sudo losetup /dev/loop0 mmcblk0p1 > sudo kpartx -a /dev/loop0 > sudo mount /dev/loop0p1 /mnt/ > ls /mnt/ > > [...] > > Do an fdisk on /dev/loop0 too, or even directly on mmcblk0p1. fdisk -l > /dev/loop0 would tell you what partitions are there. But note: loop0 is > assigned the contents of mmcblk0p1 only after you run the losetup > command. I ran fdisk directly on mmcblk0p1: # fdisk -l mmcblk0p1 Disk mmcblk0p1: 1 KiB, 1024 bytes, 2 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x Device Boot StartEndSectors Size Id Type mmcblk0p1p1 16486433105913145728 1.5G 83 Linux mmcblk0p1p2 33105923568639 258048 126M 83 Linux mmcblk0p1p3 3568640 4294967294 42913986552T 83 Linux . What should we suppose from that? Thanks, Rodolfo
Re: Debian on my tablet?
On Sun, Jan 22, 2017 at 12:21:50PM +, Rodolfo Medina wrote: > Paul Wise writes: > > > Do you get anything other than 'data' when running file on them? > > I do with mmcblk0p4; mmcblk0p7 is too big as I said; and > > ~$ file mmcblk0p1 > mmcblk0p1: DOS/MBR boot sector; partition 1 : ID=0x83, start-CHS (0x0,0,0), > end-CHS (0x0,0,0), startsector 164864, 3145728 sectors; partition 2 : > ID=0x83, start-CHS (0x0,0,0), end-CHS (0x0,0,0), startsector 3310592, 258048 > sectors; partition 3 : ID=0x83, start-CHS (0x0,0,0), end-CHS (0x0,0,0), > startsector 3568640, 4291398655 sectors > > $ file mmcblk0p2 > mmcblk0p2: Linux rev 1.0 ext4 filesystem data, > UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (needs journal recovery) (extents) > (large files) > > ~$ file mmcblk0p3 > mmcblk0p3: Linux rev 1.0 ext4 filesystem data, > UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (needs journal recovery) (extents) > (large files) > > $ file mmcblk0p5 > mmcblk0p5: Linux rev 1.0 ext4 filesystem data, > UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files) > > $ file mmcblk0p6 > mmcblk0p6: Linux rev 1.0 ext4 filesystem data, > UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (needs journal recovery) (extents) > (large files) > > > > >> There are no such files. In /dev/block/platform/mtk-msdc.0 there is > >> only: > > > > Woops, that was a typo for /dev/block/platform/mtk-msdc.1 > > mtk-msdc.1 is no more there: > > $ adb ls /dev/block/platform/ > 41ed 003c 588464b9 . > 41ed 01cc 588464c0 .. > 41ed 0104 588464b9 mtk-msdc.0 > > Thanks, > > Rodolfo > First, mtk-msdc.1 is probably a external SD card. Then, it seems you have a system that likely boots from FAT, maybe? I am not familiar with the mediatek family, but that could be possible. You should assign that mmcblk0p1 file to a loop device, then create the partitions of it, mount them, and check it. Do it in your own Debian desktop: sudo losetup /dev/loop0 mmcblk0p1 sudo kpartx -a /dev/loop0 sudo mount /dev/loop0p1 /mnt/ ls /mnt/ But, please, do some of the home work, and if anything fails, look out for the manpages of the commands on what they do, how you should use them, or read the errors. For example, it might be that mount will fail because loop0p1 is not there, so check what kpartx has created for you, maybe list what is in /dev/, what is in /dev/mapper/, do ls /dev/loop0*, etc. Do an fdisk on /dev/loop0 too, or even directly on mmcblk0p1. fdisk -l /dev/loop0 would tell you what partitions are there. But note: loop0 is assigned the contents of mmcblk0p1 only after you run the losetup command. About the very large partitions from your gadget, they may be the system/data/userdata filesystems that Android uses. I usually copy only the small partitions, but it's hard to say what is small and what is not. In order to check the size of a block device before copying it, you may check on /sys/block/$BLOCKDEVPATH/size. Left as an exercise to find what $BLOCKDEVPATH is for each partition. I can't help you more with that. Cascardo.
Re: Debian on my tablet?
Paul Wise writes: > Do you get anything other than 'data' when running file on them? I do with mmcblk0p4; mmcblk0p7 is too big as I said; and ~$ file mmcblk0p1 mmcblk0p1: DOS/MBR boot sector; partition 1 : ID=0x83, start-CHS (0x0,0,0), end-CHS (0x0,0,0), startsector 164864, 3145728 sectors; partition 2 : ID=0x83, start-CHS (0x0,0,0), end-CHS (0x0,0,0), startsector 3310592, 258048 sectors; partition 3 : ID=0x83, start-CHS (0x0,0,0), end-CHS (0x0,0,0), startsector 3568640, 4291398655 sectors $ file mmcblk0p2 mmcblk0p2: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (needs journal recovery) (extents) (large files) ~$ file mmcblk0p3 mmcblk0p3: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (needs journal recovery) (extents) (large files) $ file mmcblk0p5 mmcblk0p5: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files) $ file mmcblk0p6 mmcblk0p6: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (needs journal recovery) (extents) (large files) >> There are no such files. In /dev/block/platform/mtk-msdc.0 there is >> only: > > Woops, that was a typo for /dev/block/platform/mtk-msdc.1 mtk-msdc.1 is no more there: $ adb ls /dev/block/platform/ 41ed 003c 588464b9 . 41ed 01cc 588464c0 .. 41ed 0104 588464b9 mtk-msdc.0 Thanks, Rodolfo
Re: Debian on my tablet?
On Sun, 2017-01-22 at 10:08 +, Rodolfo Medina wrote: > Do you think it is worth working to enlarge my space and try to copy > it anyway? No, that is probably the main partition not the zImage. > The others all turned with: `extract-ikconfig: Cannot find kernel > config.' Do you get anything other than 'data' when running file on them? > There are no such files. In /dev/block/platform/mtk-msdc.0 there is > only: Woops, that was a typo for /dev/block/platform/mtk-msdc.1 -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Re: Debian on my tablet?
Paul Wise writes: > Yes, `adb pull` is approximately equivalent to piping via dd. > >> $ ./extract-ikconfig mmcblk0boot0 >> extract-ikconfig: Cannot find kernel config. > > Try mmcblk0boot1 and also try each of the mmcblk0pX (1-7) partitions I copied each of those with `adb pull'. mmcblk0p7 was too big to be copied, it occupied all the space on my disk. Do you think it is worth working to enlarge my space and try to copy it anyway? The others all turned with: `extract-ikconfig: Cannot find kernel config.' > and also all of the mmcblk1pX and mmcblk1bootX partitions from here: > > /dev/block/platform/mtk-msdc.0 There are no such files. In /dev/block/platform/mtk-msdc.0 there is only: $ adb ls /dev/block/platform/mtk-msdc.0/ 41ed 0104 588464b9 . 41ed 003c 588464b9 .. a1ff 0017 588464b9 mmcblk0boot1 a1ff 0017 588464b9 mmcblk0boot0 a1ff 0014 588464b9 mmcblk0p7 a1ff 0014 588464b9 mmcblk0p6 a1ff 0014 588464b9 mmcblk0p5 a1ff 0014 588464b9 mmcblk0p4 a1ff 0014 588464b9 mmcblk0p3 a1ff 0014 588464b9 mmcblk0p2 a1ff 0014 588464b9 mmcblk0p1 41ed 00b4 588464b9 by-num a1ff 0012 588464b9 mmcblk0 Thanks, Rodolfo
Re: Debian on my tablet?
On Sun, 2017-01-22 at 08:10 +, Rodolfo Medina wrote: > adb dd if=/dev/block/platform/mtk-msdc.0/mmcblk0boot0 | dd of=boot.img > and get the following long output: > Android Debug Bridge version 1.0.32 > ... I think that you need this command instead: adb shell dd if=/dev/block/platform/mtk-msdc.0/mmcblk0boot0 | dd of=boot.img > ...Would it be the same to copy files with `adb pull'? I tried to: > > $ adb pull /dev/block/platform/mtk-msdc.0/mmcblk0boot0 > 3888 KB/s (2097152 bytes in 0.526s) Yes, `adb pull` is approximately equivalent to piping via dd. > $ ./extract-ikconfig mmcblk0boot0 > extract-ikconfig: Cannot find kernel config. Try mmcblk0boot1 and also try each of the mmcblk0pX (1-7) partitions and also all of the mmcblk1pX and mmcblk1bootX partitions from here: /dev/block/platform/mtk-msdc.0 > . Instead, the file mmcblk0 copied with `adb pull' turns to be enormous, > several Gigabytes, so that it occupied all space memory on my disk and I had > to > delete it. Yeah, that will be the entire eMMC storage of the tablet. -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Re: Debian on my tablet?
Paul Wise writes: > On Sat, 2017-01-21 at 20:13 +, Rodolfo Medina wrote: > >> ...Then, however I try to use dd as you suggest, to copy files or >> directories, it seems to produce error and an empty boot.img file is >> created. > > Which command did you run to get the error? Please paste full output. $ adb ls /dev/block/platform/mtk-msdc.0/ 41ed 0104 588464b9 . 41ed 003c 588464b9 .. a1ff 0017 588464b9 mmcblk0boot1 a1ff 0017 588464b9 mmcblk0boot0 a1ff 0014 588464b9 mmcblk0p7 a1ff 0014 588464b9 mmcblk0p6 a1ff 0014 588464b9 mmcblk0p5 a1ff 0014 588464b9 mmcblk0p4 a1ff 0014 588464b9 mmcblk0p3 a1ff 0014 588464b9 mmcblk0p2 a1ff 0014 588464b9 mmcblk0p1 41ed 00b4 588464b9 by-num a1ff 0012 588464b9 mmcblk0 . Now, for example, suppose I want to copy the file /dev/block/platform/mtk-msdc.0/mmcblk0boot0: as suggested by Thadeu, I do: adb dd if=/dev/block/platform/mtk-msdc.0/mmcblk0boot0 | dd of=boot.img and get the following long output: Android Debug Bridge version 1.0.32 -a- directs adb to listen on all interfaces for a connection -d- directs command to the only connected USB device returns an error if more than one USB device is present. -e- directs command to the only running emulator. returns an error if more than one emulator is running. -s - directs command to the device or emulator with the given serial number or qualifier. Overrides ANDROID_SERIAL environment variable. -p - simple product name like 'sooner', or a relative/absolute path to a product out directory like 'out/target/product/sooner'. If -p is not specified, the ANDROID_PRODUCT_OUT environment variable is used, which must be an absolute path. -H- Name of adb server host (default: localhost) -P- Port of adb server (default: 5037) devices [-l] - list all connected devices ('-l' will also list device qualifiers) connect [:] - connect to a device via TCP/IP Port is used by default if no port number is specified. disconnect [[:]] - disconnect from a TCP/IP device. Port is used by default if no port number is specified. Using this command with no additional arguments will disconnect from all connected TCP/IP devices. device commands: adb push [-p] - copy file/dir to device ('-p' to display the transfer progress) adb pull [-p] [-a] [] - copy file/dir from device ('-p' to display the transfer progress) ('-a' means copy timestamp and mode) adb sync [ ] - copy host->device only if changed (-l means list but don't copy) (see 'adb help all') adb shell- run remote shell interactively adb shell - run remote shell command adb emu - run emulator console command adb logcat [ ] - View device log adb forward --list - list all forward socket connections. the format is a list of lines with the following format: " " " " "\n" adb forward - forward socket connections forward specs are one of: tcp: localabstract: localreserved: localfilesystem: dev: jdwp: (remote only) adb forward --no-rebind - same as 'adb forward ' but fails if is already forwarded adb forward --remove - remove a specific forward socket connection adb forward --remove-all - remove all forward socket connections adb reverse --list - list all reverse socket connections from device adb reverse - reverse socket connections reverse specs are one of: tcp: localabstract: localreserved: localfilesystem: adb reverse --norebind -
Re: Debian on my tablet?
On Sat, 2017-01-21 at 20:13 +, Rodolfo Medina wrote: > ...Then, however I try to use dd as you suggest, to copy files or directories, > it seems to produce error and an empty boot.img file is created. Which command did you run to get the error? Please paste full output. -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Re: Debian on my tablet?
Rodolfo Medina writes: > Thadeu Lima de Souza Cascardo writes: > >> On Sat, Jan 21, 2017 at 04:35:22PM +, Rodolfo Medina wrote: >>> From Android root, I did: `ls -R /' and could read all - I think - the >>> Android >>> filesytem. I found busybox within /system/bin, but there doesn't seem to be >>> any zImage. Besides, the only *.img file is: >>> /system/etc/firmware/modem_1_wg_n.img. I ran extract-ikconfig on to it, but >>> the output was: >>> >>> extract-ikconfig: Cannot find kernel config. >>> >>> . To continue going through the tutorial, I still need the following: >>> >>> 1) base system address, i.e. `where the RAM begins'; >>> 2) zImage file; >>> 3) what the author calls my-boot.img. >> >> As I said, try: >> >> adb ls /dev/block/platform/ >> $XXX=directory_you_found_that_likely_ends_at_0 >> adb ls /dev/block/platform/$XXX/ >> adb dd if=/dev/block/platform/$XXX/boot | dd of=boot.img >> file boot.img > > $ adb ls /dev/block/platform/ > 41ed 0050 58830898 . > 41ed 01cc 58838bb7 .. > 41ed 003c 58838bb7 mtk-msdc.1 > 41ed 0104 58830761 mtk-msdc.0 > > $ adb ls /dev/block/platform/mtk-msdc.0 > 41ed 0104 58830761 . > 41ed 0050 58830898 .. > a1ff 0017 58830761 mmcblk0boot1 > a1ff 0017 58830761 mmcblk0boot0 > a1ff 0014 58830761 mmcblk0p7 > a1ff 0014 58830761 mmcblk0p6 > a1ff 0014 58830761 mmcblk0p5 > a1ff 0014 58830761 mmcblk0p4 > a1ff 0014 58830761 mmcblk0p3 > a1ff 0014 58830761 mmcblk0p2 > a1ff 0014 58830761 mmcblk0p1 > 41ed 00b4 58830761 by-num > a1ff 0012 58830761 mmcblk0 ...Then, however I try to use dd as you suggest, to copy files or directories, it seems to produce error and an empty boot.img file is created. Rodolfo
Re: Debian on my tablet?
Thadeu Lima de Souza Cascardo writes: > On Sat, Jan 21, 2017 at 04:35:22PM +, Rodolfo Medina wrote: >> From Android root, I did: `ls -R /' and could read all - I think - the >> Android >> filesytem. I found busybox within /system/bin, but there doesn't seem to be >> any zImage. Besides, the only *.img file is: >> /system/etc/firmware/modem_1_wg_n.img. I ran extract-ikconfig on to it, but >> the output was: >> >> extract-ikconfig: Cannot find kernel config. >> >> . To continue going through the tutorial, I still need the following: >> >> 1) base system address, i.e. `where the RAM begins'; >> 2) zImage file; >> 3) what the author calls my-boot.img. > > As I said, try: > > adb ls /dev/block/platform/ > $XXX=directory_you_found_that_likely_ends_at_0 > adb ls /dev/block/platform/$XXX/ > adb dd if=/dev/block/platform/$XXX/boot | dd of=boot.img > file boot.img $ adb ls /dev/block/platform/ 41ed 0050 58830898 . 41ed 01cc 58838bb7 .. 41ed 003c 58838bb7 mtk-msdc.1 41ed 0104 58830761 mtk-msdc.0 $ adb ls /dev/block/platform/mtk-msdc.0 41ed 0104 58830761 . 41ed 0050 58830898 .. a1ff 0017 58830761 mmcblk0boot1 a1ff 0017 58830761 mmcblk0boot0 a1ff 0014 58830761 mmcblk0p7 a1ff 0014 58830761 mmcblk0p6 a1ff 0014 58830761 mmcblk0p5 a1ff 0014 58830761 mmcblk0p4 a1ff 0014 58830761 mmcblk0p3 a1ff 0014 58830761 mmcblk0p2 a1ff 0014 58830761 mmcblk0p1 41ed 00b4 58830761 by-num a1ff 0012 58830761 mmcblk0 Thanks, Rodolfo
Re: Debian on my tablet?
On Sat, Jan 21, 2017 at 04:35:22PM +, Rodolfo Medina wrote: > From Android root, I did: `ls -R /' and could read all - I think - the Android > filesytem. I found busybox within /system/bin, but there doesn't seem to be > any zImage. Besides, the only *.img file is: > /system/etc/firmware/modem_1_wg_n.img. I ran extract-ikconfig on to it, but > the output was: > > extract-ikconfig: Cannot find kernel config. > > . To continue going through the tutorial, I still need the following: > > 1) base system address, i.e. `where the RAM begins'; > 2) zImage file; > 3) what the author calls my-boot.img. > > Thanks, > > Rodolfo As I said, try: adb ls /dev/block/platform/ $XXX=directory_you_found_that_likely_ends_at_0 adb ls /dev/block/platform/$XXX/ adb dd if=/dev/block/platform/$XXX/boot | dd of=boot.img file boot.img
Re: Debian on my tablet?
>From Android root, I did: `ls -R /' and could read all - I think - the Android filesytem. I found busybox within /system/bin, but there doesn't seem to be any zImage. Besides, the only *.img file is: /system/etc/firmware/modem_1_wg_n.img. I ran extract-ikconfig on to it, but the output was: extract-ikconfig: Cannot find kernel config. . To continue going through the tutorial, I still need the following: 1) base system address, i.e. `where the RAM begins'; 2) zImage file; 3) what the author calls my-boot.img. Thanks, Rodolfo
Re: Debian on my tablet?
On Thu, Jan 19, 2017 at 08:17:08AM +0800, Paul Wise wrote: > On Wed, Jan 18, 2017 at 4:12 PM, Rodolfo Medina wrote: > > > I don't know where it is stored in the tablet. > > It depends on the device, but usually it is one of the flash partitions. > > Is there a /proc/mtd file? > Not all gadgets use an MTD. Some use an eMMC, so better take a peek at /sys/block/. > Is there anything in the subdirs of the /dev/disk/ directory? Android init, which creates the nodes under /dev/, uses /dev/block/. Usually, one can find devices under /dev/block/platform/*/*, where they are named after their partition. On some devices, for example, there is a boot and a recovery partition, which contain an Android image, with a kernel and initramfs embedded. After finding out those devices, I usually try something like: adb dd if=/dev/block/platform/X/recovery | dd of=recovery So, I will be dumping the contents from those partitions to a file on my laptop, which I can look into later. Cascardo.
Re: Debian on my tablet?
On Sat, 2017-01-21 at 09:11 +, Rodolfo Medina wrote: > Then I might try, as you suggested, the value 0x8000. But we still need > the other two parameters: `--kernel zImage' and `my-boot.img'. zImage is available in the storage on the device and in the firmware downloads from the manufacturer, we just need to find it. Once you have the zImage you will also get the right --base (I think). > There's no /bin directory, and under /sbin there's no busybox. Can you list the files/directories on the tablet recursively? Probably the best way to do that would be to download the Debian busybox-static package, place it on the tablet at /sbin/debian-busybox and then run this command: /sbin/debian-busybox find / If that doesn't work then this might: ls -lR -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Re: Debian on my tablet?
Paul Wise writes: >> Then what shall I put in place of `--base 0x0020' and `--kernel zImage', >> and also of `my-boot.img', as shown in the article? > > We don't have that information yet. > > The best guess is the first System RAM value from /proc/iomem on the tablet. > > To be sure we need to find out where the Linux kernel image (zImage) > for the device is stored and then extract the config value for --base. Then I might try, as you suggested, the value 0x8000. But we still need the other two parameters: `--kernel zImage' and `my-boot.img'. >> On the tablet there's no `arm' directory and I can't locate the file busybox >> as >> in Android's root the command `find' is not recognized. > > On the tablet, busybox is likely to be one of these paths: > > /bin/busybox > /sbin/busybox There's no /bin directory, and under /sbin there's no busybox. So I here lack three information: `--kernel zImage', `my-boot.img' and busybox. Without them I can't continue following Mikael Q Kuisma's tutorial, I'm afraid. He himself wouldn't help. Rodolfo
Re: Debian on my tablet?
On Sat, 2017-01-21 at 08:42 +, Rodolfo Medina wrote: > Respectively, `BOOT: data' and `embedded-update.img: data'. Hmm, that isn't useful. You might be able to get something useful using the binwalk tool. > Then what shall I put in place of `--base 0x0020' and `--kernel zImage', > and also of `my-boot.img', as shown in the article? We don't have that information yet. The best guess is the first System RAM value from /proc/iomem on the tablet. To be sure we need to find out where the Linux kernel image (zImage) for the device is stored and then extract the config value for --base. > On the tablet there's no `arm' directory and I can't locate the file busybox > as > in Android's root the command `find' is not recognized. On the tablet, busybox is likely to be one of these paths: /bin/busybox /sbin/busybox -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Re: Debian on my tablet?
Paul Wise writes: > On Sat, Jan 21, 2017 at 3:44 PM, Rodolfo Medina wrote: > >> The following two files were created: BOOT and embedded-update.img, and the >> following output was produced: >> >> rkunpack: info: RKFW signature detected >> rkunpack: info: version: 1.1.0 >> rkunpack: info: date: 2013-04-17 15:57:08 >> rkunpack: info: family: rk30xx >> rkunpack: info: 0066-0002ee73 BOOT (size: 192014) >> rkunpack: info: 0002ee74-1a137e77 embedded-update.img(size: >> 437293060) >> unpacked >> >> . Is embedded-update.img our kernel image? And should we conclude that >> maybe >> 0x0066 is the system RAM base address we are looking for? > > Not sure, what is the output of these commands? > file BOOT > file embedded-update.img Respectively, `BOOT: data' and `embedded-update.img: data'. >> . So I need the two parameters: --base and --kernel. Should I maybe put, in >> place of 0x0020, the above 0x0066 that came out from the output of >> rkunpack? And what should I put in place of zImage? > > No, those are the locations on your tablet's storage device where the > data in those files should be placed. Then what shall I put in place of `--base 0x0020' and `--kernel zImage', and also of `my-boot.img', as shown in the article? > The busybox in your computer only runs on Intel/AMD CPUs. > There might be one on the tablet that runs on the ARM/Rockchip CPUs. > Please use only the ARM busybox otherwise it won't work on the tablet. On the tablet there's no `arm' directory and I can't locate the file busybox as in Android's root the command `find' is not recognized. It seems we are stuck here... Thanks, Rodolfo
Re: Debian on my tablet?
On Sat, Jan 21, 2017 at 3:44 PM, Rodolfo Medina wrote: > The following two files were created: BOOT and embedded-update.img, and the > following output was produced: > > rkunpack: info: RKFW signature detected > rkunpack: info: version: 1.1.0 > rkunpack: info: date: 2013-04-17 15:57:08 > rkunpack: info: family: rk30xx > rkunpack: info: 0066-0002ee73 BOOT (size: 192014) > rkunpack: info: 0002ee74-1a137e77 embedded-update.img(size: 437293060) > unpacked > > . Is embedded-update.img our kernel image? And should we conclude that maybe > 0x0066 is the system RAM base address we are looking for? Not sure, what is the output of these commands? file BOOT file embedded-update.img The 0x0066 is more likely to be a location on the tablet's storage device. > . So I need the two parameters: --base and --kernel. Should I maybe put, in > place of 0x0020, the above 0x0066 that came out from the output of > rkunpack? And what should I put in place of zImage? No, those are the locations on your tablet's storage device where the data in those files should be placed. > the binary busybox was already in my computer The busybox in your computer only runs on Intel/AMD CPUs. There might be one on the tablet that runs on the ARM/Rockchip CPUs. Please use only the ARM busybox otherwise it won't work on the tablet. > `mkbooting' seems to be part of the package android-tools-mkbootimg. Is that > right? Right, but android-tools-mkbootimg will be going away hopefully soon and the binary will be provided by another package. You can use apt-file or this page to look up the new package name once that happens: https://packages.debian.org/search?suite=sid&searchon=contents&keywords=mkbootimg -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Paul Wise writes: > On Fri, Jan 20, 2017 at 5:05 PM, Rodolfo Medina wrote: > >> Yes, there is one. > > Could you paste /proc/mtd into an email? It's an empty file. >> I did as you suggested. I downloaded the firmware, unpacked it with `unar' >> and >> then ran rkunpack over the file update.img. Some other files were created. >> What now? > > What files do you see? > Is there a zImage or vmlinuz? The following two files were created: BOOT and embedded-update.img, and the following output was produced: rkunpack: info: RKFW signature detected rkunpack: info: version: 1.1.0 rkunpack: info: date: 2013-04-17 15:57:08 rkunpack: info: family: rk30xx rkunpack: info: 0066-0002ee73 BOOT (size: 192014) rkunpack: info: 0002ee74-1a137e77 embedded-update.img(size: 437293060) unpacked . Is embedded-update.img our kernel image? And should we conclude that maybe 0x0066 is the system RAM base address we are looking for? >> Thanks indeed for your help... What comes now? > > Continue to go through the article, getting the needed info. Now I'm at: # mkdir my-initramfs # cd my-initramfs # mkdir -p proc sys dev mnt/root sbin # cp /my/arm/busybox sbin/busybox # cp /above/init init # chmod a+x init sbin/busybox # find . | cpio --quiet -H newc -o | gzip > ../initramfs.cpio.gz # cd .. # mkbootimg --base 0x0020 --kernel zImage --ramdisk initramfs.cpio.gz -o my-boot.img . So I need the two parameters: --base and --kernel. Should I maybe put, in place of 0x0020, the above 0x0066 that came out from the output of rkunpack? And what should I put in place of zImage? Besides, the binary busybox was already in my computer and the command `mkbooting' seems to be part of the package android-tools-mkbootimg. Is that right? Thanks, Rodolfo
Re: Debian on my tablet?
On Fri, Jan 20, 2017 at 5:05 PM, Rodolfo Medina wrote: > Yes, there is one. Could you paste /proc/mtd into an email? > It doesn't seem so. You might want to contact them to ask for the open source code for your device. If that fails then you can try to get the Linux developers to ask for the code. There are three organisations working on GPL compliance that I am aware of. https://www.linuxsources.org/ https://sfconservancy.org/linux-compliance/ http://gpl-violations.org/ > Doesn't it rather have a Cortex-A9 CPU? Cortex-A9 is a CPU design from ARM. Rockchip takes that design, modifies it, integrates it with other things and puts the result into one System-on-Chip, which it then manufactures and sells to device makers. ARM itself doesn't manufacture and sell to device makers. > I did as you suggested. I downloaded the firmware, unpacked it with `unar' > and > then ran rkunpack over the file update.img. Some other files were created. > What now? What files do you see? Is there a zImage or vmlinuz? > I'll try to, admitted I have the necessary skills... Great! Any needed skills can be picked up during the process. > Thanks indeed for your help... What comes now? Continue to go through the article, getting the needed info. BTW, you can join the #debian-mentors IRC channel for packaging help and #debian-mobile for mobile-specific things. -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Paul Wise writes: > On Wed, Jan 18, 2017 at 4:12 PM, Rodolfo Medina wrote: > >> I don't know where it is stored in the tablet. > > It depends on the device, but usually it is one of the flash partitions. > > Is there a /proc/mtd file? Yes, there is one. > Is there anything in the subdirs of the /dev/disk/ directory? There is no /disk subdirectory under /dev. >> My tablet is the SmartPad 8.0 S2. > > I can't read Italian but I think you are talking about this? > > http://www.mediacomeurope.it/Prodotti/Scheda.aspx?XRI=2082 Yes, it should be. > Did your device come with any kind of offer of source code or legal > information? This might be in the Android UI itself. I can't find > anything on their website. It doesn't seem so. > I note that the website comes with firmware downloads, the tablet has > a Rockchip ARM CPU Doesn't it rather have a Cortex-A9 CPU? > and that there is a Linux flasher for Rockchip > based devices here: > > https://github.com/linux-rockchip/rkflashtool > > I noticed that this flasher can also unpack Rockchip firmware downloads. > > So I would suggest downloading the firmware, unpacking the archive > with unar (not unrar since that is non-free) and then unpacking the > image with rkflashtool. I did as you suggested. I downloaded the firmware, unpacked it with `unar' and then ran rkunpack over the file update.img. Some other files were created. What now? > It would be really cool if you could also package rkflashtool for > Debian. You can read through this to get an idea of how to do that: > > https://mentors.debian.net/intro-maintainers I'll try to, admitted I have the necessary skills... Thanks indeed for your help... What comes now? Cheers, Rodolfo
Re: Debian on my tablet?
On Thu, Jan 19, 2017 at 8:17 AM, Paul Wise wrote: > I note that the website comes with firmware downloads, the tablet has > a Rockchip ARM CPU and that there is a Linux flasher for Rockchip > based devices here: > > https://github.com/linux-rockchip/rkflashtool I noticed that this flasher can also unpack Rockchip firmware downloads. So I would suggest downloading the firmware, unpacking the archive with unar (not unrar since that is non-free) and then unpacking the image with rkflashtool. It would be really cool if you could also package rkflashtool for Debian. You can read through this to get an idea of how to do that: https://mentors.debian.net/intro-maintainers -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
On Wed, Jan 18, 2017 at 4:12 PM, Rodolfo Medina wrote: > I don't know where it is stored in the tablet. It depends on the device, but usually it is one of the flash partitions. Is there a /proc/mtd file? Is there anything in the subdirs of the /dev/disk/ directory? > My tablet is the SmartPad 8.0 S2. I can't read Italian but I think you are talking about this? http://www.mediacomeurope.it/Prodotti/Scheda.aspx?XRI=2082 Did your device come with any kind of offer of source code or legal information? This might be in the Android UI itself. I can't find anything on their website. I note that the website comes with firmware downloads, the tablet has a Rockchip ARM CPU and that there is a Linux flasher for Rockchip based devices here: https://github.com/linux-rockchip/rkflashtool -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Paul Wise writes: > On Wed, Jan 18, 2017 at 3:55 AM, Rodolfo Medina wrote: > >> The `systems base address, i.e. where the RAM begins', I suppose it's the >> one from the tablet, not the pc. If so, the command >> >> $ extract-ikconfig zImage | grep PHYS_OFFSET >> >> should be given from within the tablet. > > It doesn't matter where you run it, as long as you run it on the > zImage (compressed Linux kernel image) for the device, not the one for > your laptop. You should copy it from where it is stored on your device I don't know where it is stored in the tablet. The command `find' is not recognized within the tablet shell. Also using `grep', as suggested at: http://lyncd.com/2011/03/android-kernel-mkbootimg-base/ , doesn't help. My tablet is the SmartPad 8.0 S2. Thanks, Rodolfo
Re: Debian on my tablet?
On Wed, Jan 18, 2017 at 3:55 AM, Rodolfo Medina wrote: > The `systems base address, i.e. where the RAM begins', I suppose it's the one > from the tablet, not the pc. If so, the command > > $ extract-ikconfig zImage | grep PHYS_OFFSET > > should be given from within the tablet. It doesn't matter where you run it, as long as you run it on the zImage (compressed Linux kernel image) for the device, not the one for your laptop. You should copy it from where it is stored on your device or from LineageOS if it supports your device. > As suggested in the tutorial, I also looked for "System RAM" in > /proc/iomem on the tablet. There are two occurrences: > > 8000-bbff : System RAM > > and > > bd80-becf : System RAM At a guess I would say maybe 0x8000. Which device is it? If it is supported by LineageOS (the new name for CyanogeMod) then you might be able to find the Linux kernel build configuration for it in a git repository and then use that. > Or maybe the system base address is the one of the computer? Definitely not. -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Paul Wise writes: > On Tue, Jan 17, 2017 at 9:19 PM, Rodolfo Medina wrote: > >> in order to know the `systems base address, i.e. where the RAM begins'. The >> tutorial suggests to `check for /proc/config.gz in your running kernel or use >> the extract-ikconfig script on the kernel binary', but in /proc there's no >> config.gz, and I don't know where to fetch that script. > > The script appears to be from the Linux kernel source tree: > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/scripts/extract-ikconfig The `systems base address, i.e. where the RAM begins', I suppose it's the one from the tablet, not the pc. If so, the command $ extract-ikconfig zImage | grep PHYS_OFFSET should be given from within the tablet. Then that script should be copied on the SDcard and be run from there after mounting it. I tried, but it says `not found'. As suggested in the tutorial, I also looked for "System RAM" in /proc/iomem on the tablet. There are two occurrences: 8000-bbff : System RAM and bd80-becf : System RAM . Or maybe the system base address is the one of the computer? Run that script in the PC, it produces: Usage: extract-ikconfig . So I'm stuck now. Please help. Thanks, Rodolfo
Re: Debian on my tablet?
On Tue, Jan 17, 2017 at 9:19 PM, Rodolfo Medina wrote: > in order to know the `systems base address, i.e. where the RAM begins'. The > tutorial suggests to `check for /proc/config.gz in your running kernel or use > the extract-ikconfig script on the kernel binary', but in /proc there's no > config.gz, and I don't know where to fetch that script. The script appears to be from the Linux kernel source tree: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/scripts/extract-ikconfig -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Paul Wise writes: > On Tue, Jan 17, 2017 at 4:52 PM, Rodolfo Medina wrote: > >> Thanks, it's more clear now. But what about busybox, the link in article: >> >> Precompiled busybox from busybox.net >> >> seems to be broken. > > Use the binary from the busybox-static package for the architecture > you are using instead. Thanks. Now the tutorial says $ extract-ikconfig zImage | grep PHYS_OFFSET in order to know the `systems base address, i.e. where the RAM begins'. The tutorial suggests to `check for /proc/config.gz in your running kernel or use the extract-ikconfig script on the kernel binary', but in /proc there's no config.gz, and I don't know where to fetch that script. Thanks, Rodolfo
Re: Debian on my tablet?
On Tue, Jan 17, 2017 at 4:52 PM, Rodolfo Medina wrote: > Thanks, it's more clear now. But what about busybox, the link in article: > > Precompiled busybox from busybox.net > > seems to be broken. Use the binary from the busybox-static package for the architecture you are using instead. -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Paul Wise writes: > On Tue, Jan 17, 2017 at 1:31 AM, Rodolfo Medina wrote: > >> It's not clear to me where to execute that script. Should I copy it in the >> second partition of the SDcard? And name it `busybox'? > > The script is executed from the initramfs during boot, after Linux > loads and before the Debian system loads: > > https://wiki.debian.org/initramfs > > Later in the article it gives you instructions on rebuilding the > initramfs to include the script at /init within the initramfs. Thanks, it's more clear now. But what about busybox, the link in article: Precompiled busybox from busybox.net seems to be broken. Thanks, Rodolfo
Re: Debian on my tablet?
On Tue, Jan 17, 2017 at 1:31 AM, Rodolfo Medina wrote: > It's not clear to me where to execute that script. Should I copy it in the > second partition of the SDcard? And name it `busybox'? The script is executed from the initramfs during boot, after Linux loads and before the Debian system loads: https://wiki.debian.org/initramfs Later in the article it gives you instructions on rebuilding the initramfs to include the script at /init within the initramfs. -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Paul Wise writes: > On Sun, Jan 15, 2017 at 12:24 AM, Rodolfo Medina wrote: > >> Thanks all of you. I'm trying to practise the following how-to: >> >> http://whiteboard.ping.se/Android/Debian > > I don't think the author of that article is on this list. You might > want to invite him here using the name and email address listed at the > bottom of the article. I wrote to him but he says I'm too unexpert for that tutorial. So please help whoever can from this list. I wish to adopt that solution because it seems to me to be the most powerful to get `full control over the Android device using a standard GNU/Linux environment'. >> . Thanks to Cascardo's suggestion, I managed to do: >> >> $ adb shell >> root@SmartPadS2:/ # mount >> >> . Now, I don't understand from that how-to what comes now. I understand how >> to make two partitions on a micro sd card, but then? Please help. > > Looking at the article, the next step is to copy the provided init > script and alter it to use the right block devices. Then rebuild the > initramfs and later write it to your device. It's not clear to me where to execute that script. Should I copy it in the second partition of the SDcard? And name it `busybox'? Thanks for any help, Rodolfo
Re: Debian on my tablet?
On Sun, Jan 15, 2017 at 12:24 AM, Rodolfo Medina wrote: > Thanks all of you. I'm trying to practise the following how-to: > > http://whiteboard.ping.se/Android/Debian I don't think the author of that article is on this list. You might want to invite him here using the name and email address listed at the bottom of the article. > . Thanks to Cascardo's suggestion, I managed to do: > > $ adb shell > root@SmartPadS2:/ # mount > > . Now, I don't understand from that how-to what comes now. I understand how > to make two partitions on a micro sd card, but then? Please help. Looking at the article, the next step is to copy the provided init script and alter it to use the right block devices. Then rebuild the initramfs and later write it to your device. -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Rodolfo Medina writes: > I read it's - maybe - possibile to install Debian on a mobile device such as > tablets, and I'm curious about that and would like to try it with my android > tablet. I installed the Debian package android-tools-adb on my pc, connected > the tablet to the pc via cable and did: > > $ adb shell > > but the device turns to be `not found'. Please help whoever can. Thanks all of you. I'm trying to practise the following how-to: http://whiteboard.ping.se/Android/Debian . Thanks to Cascardo's suggestion, I managed to do: $ adb shell root@SmartPadS2:/ # mount . Now, I don't understand from that how-to what comes now. I understand how to make two partitions on a micro sd card, but then? Please help. Thanks indeed, Rodolfo
Re: Debian on my tablet?
Hmm What about using libhybris (+ possibly MultiROM, if available for your device)? On 13.01.2017 13:45, Rodolfo Medina wrote: > Hi all. > > I read it's - maybe - possibile to install Debian on a mobile device such as > tablets, and I'm curious about that and would like to try it with my android > tablet. I installed the Debian package android-tools-adb on my pc, connected > the tablet to the pc via cable and did: > > $ adb shell > > but the device turns to be `not found'. Please help whoever can. > > Thanks in advance, > > Rodolfo >
Re: Debian on my tablet?
On Sat, Jan 14, 2017 at 6:41 PM, michael k. wrote: > install fdroid (shop) on your device (you must exept "unsecure source" > in android settings before) Why does it say "unsecure source"? -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
Hello Rudolfo Am 13.01.2017 um 13:45 schrieb Rodolfo Medina: > Hi all. install fdroid (shop) on your device (you must exept "unsecure source" in android settings before) and then: https://f-droid.org/repository/browse/?fdfilter=debi&fdid=info.guardianproject.lildebi have fun michael signature.asc Description: OpenPGP digital signature
Re: Debian on my tablet?
On Fri, Jan 13, 2017 at 8:45 PM, Rodolfo Medina wrote: > I read it's - maybe - possibile to install Debian on a mobile device such as > tablets, and I'm curious about that and would like to try it with my android > tablet. It depends on what tablet you have and how much work you are able to put in. For most tablets, the best you can get is a Debian chroot under Android and there are a bunch of apps for that. If your tablet is supported by Replicant or LineageOS, you might be able to go a little further and boot Debian with an Android version of the Linux kernel. To properly install Debian in fully supported way, you would have to put in a bunch of effort on reverse engineering, rewriting drivers and mainlining Linux and bootloader code changes. https://wiki.debian.org/ChrootOnAndroid https://wiki.debian.org/Mobile https://wiki.debian.org/AndroidTools -- bye, pabs https://wiki.debian.org/PaulWise
Re: Debian on my tablet?
On Fri, Jan 13, 2017 at 12:45:56PM +, Rodolfo Medina wrote: > Hi all. > > I read it's - maybe - possibile to install Debian on a mobile device such as > tablets, and I'm curious about that and would like to try it with my android > tablet. I installed the Debian package android-tools-adb on my pc, connected > the tablet to the pc via cable and did: > > $ adb shell > > but the device turns to be `not found'. Please help whoever can. > > Thanks in advance, > > Rodolfo > You probably need to turn the debug option in the settings. You go to Settings, Developer options, then enable USB debugging. In case Developer options is not on, you need to enable it, I recall it was like touching 7 times the Build Number at Settings, About phone. It's a long road after that to get Debian running in your device, but it's a start. Getting root access is a good next step. In some devices, you can run adb as root. You might try it by running adb root before you run adb shell (wait some seconds as adb root will restart the adb daemon process in your device). Cascardo.
Debian on my tablet?
Hi all. I read it's - maybe - possibile to install Debian on a mobile device such as tablets, and I'm curious about that and would like to try it with my android tablet. I installed the Debian package android-tools-adb on my pc, connected the tablet to the pc via cable and did: $ adb shell but the device turns to be `not found'. Please help whoever can. Thanks in advance, Rodolfo