How to setup debian on rootfs with libc pre installed?











up vote
-1
down vote

favorite












I'm currently trying to run X server on my rooted Galaxy note 5.
So far, I can chroot into the official Samsung rootfs and run some binaries. The problem is, it doesn't seem to have compiler in it. All I could find was the linker. Can you give me suggestions on how to build a program for the system with only linker?



Update: Here, I'm providing a list of files in /system/bin. Please note that aarch64-linux-gnu-cpp-6 is the binary I manually added, but it fails to run.



aarch64-linux-gnu-cpp-6
acpi
am
androidshmservice
apaservice
apexserver
app_process
app_process32
app_process64
applypatch
appops
appwidget
argosd
at_distributor
atrace
audioserver
auditd
base64
basename
bcc
bcm_sensorhub_a2.patch
bintvoutservice
blkid
blockdev
bmgr
bootanimation
bootchecker
bootstat
bu
bugreport
bugreportz
bzcat
cal
cameraserver
cat
ccm_gen_cert
charon
chcon
chgrp
chmod
chown
chroot
cksum
clatd
clear
cmd
cmp
comm
connfwexe
content
cp
cpio
cpp-6
cut
dalvikvm
dalvikvm32
dalvikvm64
date
dd
ddexe
debuggerd
debuggerd64
dex2oat
dexdump
df
diag_knight
diagexe
dirname
dm_verity_tz_cmd
dmbserver
dmesg
dnsmasq
dos2unix
dpm
drmserver
du
dumpstate
dumpsys
e2fsck
echo
edmaudit
egrep
env
epmlogd
expand
expr
exyrngd
fallocate
false
fgrep
find
fingerprintd
flock
free
fsck.exfat
fsck.f2fs
fsck_msdos
gatekeeperd
getenforce
getevent
getprop
gps.cer
gpsd
grep
groups
gzip
head
hid
hostapd
hostname
hwclock
icd
id
idmap
ifconfig
iftop
ikev2-client
ime
imsd
inotifyd
input
insmod
install-recovery.sh
installd
insthk
ioctl
iod
ionice
iorenice
ip
ip6tables
ip6tables-restore
ip6tables-save
iptables
iptables-restore
iptables-save
jackd
jackservice
keystore
kill
killall
ld
ld.mc
lhd
linker
linker64
lmkd
ln
load_policy
log
logcat
logd
logname
logwrapper
losetup
lpm
ls
ls.txt
lsmod
lsof
lsusb
macloader
make_ext4fs
make_f2fs
mcDriverDaemon
md5sum
mdnsd
media
mediacodec
mediadrmserver
mediaextractor
mediaserver
mfgloader
mkdir
mkfs.exfat
mknod
mkswap
mktemp
modinfo
monkey
more
mount
mountpoint
mtpd
mv
nandread
ndc
netd
netstat
newfs_msdos
nice
nl
nohup
oatdump
od
otp_server
paste
patch
patchoat
pgrep
pidof
ping
ping6
pkill
pm
pmap
pppd
prepare_param.sh
printenv
printf
prlimit
profman
ps
pwd
qemu-props
qemud
racoon
readlink
realpath
reboot
redsocks
renice
requestsync
resetreason
resize2fs
restorecon
rild
rm
rmdir
rmmod
route
run-as
runcon
samsungpowersoundplay
schedtest
screencap
screenrecord
scs
sdcard
sdp_cryptod
secdiscard
secure_storage_daemon
secure_storage_pm
sed
sem_daemon
sendevent
sensorhubservice
sensorservice
seq
service
servicemanager
setenforce
setprop
setsid
settings
sfotahelper
sgdisk
sh
sha1sum
sleep
sm
smdexe
sort
split
ss_conn_daemon
ss_kbservice_daemon
start
stat
stop
strings
surfaceflinger
svc
swapoff
swapon
sync
sysctl
tac
tail
tar
taskset
tc
tee
telecom
tima_dump_log
time
timeout
tlc_server
toolbox
top
touch
toybox
tr
true
truncate
tty
tzdatacheck
uiautomator
ulimit
umount
uname
uncrypt
uniq
unix2dos
uptime
usleep
vdc
vmstat
vold
wc
which
whoami
wlandutservice
wm
wpa_supplicant
wvkprov
xargs
xxd
yes










share|improve this question









New contributor




Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • What binaries do you have in there? Can you run sshd and transfer the compiler?
    – Aulis Ronkainen
    2 days ago










  • I've updated my question. And no, it doesn't have sshd.
    – Kinnefix Kim
    2 days ago










  • Install(copy) Debian in a chroot.
    – Ipor Sircer
    2 days ago










  • Yes, I tried it with precompiled debootstrap binary, but it didn't have userspace driver from Samsung, which I need.
    – Kinnefix Kim
    2 days ago















up vote
-1
down vote

favorite












I'm currently trying to run X server on my rooted Galaxy note 5.
So far, I can chroot into the official Samsung rootfs and run some binaries. The problem is, it doesn't seem to have compiler in it. All I could find was the linker. Can you give me suggestions on how to build a program for the system with only linker?



Update: Here, I'm providing a list of files in /system/bin. Please note that aarch64-linux-gnu-cpp-6 is the binary I manually added, but it fails to run.



aarch64-linux-gnu-cpp-6
acpi
am
androidshmservice
apaservice
apexserver
app_process
app_process32
app_process64
applypatch
appops
appwidget
argosd
at_distributor
atrace
audioserver
auditd
base64
basename
bcc
bcm_sensorhub_a2.patch
bintvoutservice
blkid
blockdev
bmgr
bootanimation
bootchecker
bootstat
bu
bugreport
bugreportz
bzcat
cal
cameraserver
cat
ccm_gen_cert
charon
chcon
chgrp
chmod
chown
chroot
cksum
clatd
clear
cmd
cmp
comm
connfwexe
content
cp
cpio
cpp-6
cut
dalvikvm
dalvikvm32
dalvikvm64
date
dd
ddexe
debuggerd
debuggerd64
dex2oat
dexdump
df
diag_knight
diagexe
dirname
dm_verity_tz_cmd
dmbserver
dmesg
dnsmasq
dos2unix
dpm
drmserver
du
dumpstate
dumpsys
e2fsck
echo
edmaudit
egrep
env
epmlogd
expand
expr
exyrngd
fallocate
false
fgrep
find
fingerprintd
flock
free
fsck.exfat
fsck.f2fs
fsck_msdos
gatekeeperd
getenforce
getevent
getprop
gps.cer
gpsd
grep
groups
gzip
head
hid
hostapd
hostname
hwclock
icd
id
idmap
ifconfig
iftop
ikev2-client
ime
imsd
inotifyd
input
insmod
install-recovery.sh
installd
insthk
ioctl
iod
ionice
iorenice
ip
ip6tables
ip6tables-restore
ip6tables-save
iptables
iptables-restore
iptables-save
jackd
jackservice
keystore
kill
killall
ld
ld.mc
lhd
linker
linker64
lmkd
ln
load_policy
log
logcat
logd
logname
logwrapper
losetup
lpm
ls
ls.txt
lsmod
lsof
lsusb
macloader
make_ext4fs
make_f2fs
mcDriverDaemon
md5sum
mdnsd
media
mediacodec
mediadrmserver
mediaextractor
mediaserver
mfgloader
mkdir
mkfs.exfat
mknod
mkswap
mktemp
modinfo
monkey
more
mount
mountpoint
mtpd
mv
nandread
ndc
netd
netstat
newfs_msdos
nice
nl
nohup
oatdump
od
otp_server
paste
patch
patchoat
pgrep
pidof
ping
ping6
pkill
pm
pmap
pppd
prepare_param.sh
printenv
printf
prlimit
profman
ps
pwd
qemu-props
qemud
racoon
readlink
realpath
reboot
redsocks
renice
requestsync
resetreason
resize2fs
restorecon
rild
rm
rmdir
rmmod
route
run-as
runcon
samsungpowersoundplay
schedtest
screencap
screenrecord
scs
sdcard
sdp_cryptod
secdiscard
secure_storage_daemon
secure_storage_pm
sed
sem_daemon
sendevent
sensorhubservice
sensorservice
seq
service
servicemanager
setenforce
setprop
setsid
settings
sfotahelper
sgdisk
sh
sha1sum
sleep
sm
smdexe
sort
split
ss_conn_daemon
ss_kbservice_daemon
start
stat
stop
strings
surfaceflinger
svc
swapoff
swapon
sync
sysctl
tac
tail
tar
taskset
tc
tee
telecom
tima_dump_log
time
timeout
tlc_server
toolbox
top
touch
toybox
tr
true
truncate
tty
tzdatacheck
uiautomator
ulimit
umount
uname
uncrypt
uniq
unix2dos
uptime
usleep
vdc
vmstat
vold
wc
which
whoami
wlandutservice
wm
wpa_supplicant
wvkprov
xargs
xxd
yes










share|improve this question









New contributor




Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • What binaries do you have in there? Can you run sshd and transfer the compiler?
    – Aulis Ronkainen
    2 days ago










  • I've updated my question. And no, it doesn't have sshd.
    – Kinnefix Kim
    2 days ago










  • Install(copy) Debian in a chroot.
    – Ipor Sircer
    2 days ago










  • Yes, I tried it with precompiled debootstrap binary, but it didn't have userspace driver from Samsung, which I need.
    – Kinnefix Kim
    2 days ago













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I'm currently trying to run X server on my rooted Galaxy note 5.
So far, I can chroot into the official Samsung rootfs and run some binaries. The problem is, it doesn't seem to have compiler in it. All I could find was the linker. Can you give me suggestions on how to build a program for the system with only linker?



Update: Here, I'm providing a list of files in /system/bin. Please note that aarch64-linux-gnu-cpp-6 is the binary I manually added, but it fails to run.



aarch64-linux-gnu-cpp-6
acpi
am
androidshmservice
apaservice
apexserver
app_process
app_process32
app_process64
applypatch
appops
appwidget
argosd
at_distributor
atrace
audioserver
auditd
base64
basename
bcc
bcm_sensorhub_a2.patch
bintvoutservice
blkid
blockdev
bmgr
bootanimation
bootchecker
bootstat
bu
bugreport
bugreportz
bzcat
cal
cameraserver
cat
ccm_gen_cert
charon
chcon
chgrp
chmod
chown
chroot
cksum
clatd
clear
cmd
cmp
comm
connfwexe
content
cp
cpio
cpp-6
cut
dalvikvm
dalvikvm32
dalvikvm64
date
dd
ddexe
debuggerd
debuggerd64
dex2oat
dexdump
df
diag_knight
diagexe
dirname
dm_verity_tz_cmd
dmbserver
dmesg
dnsmasq
dos2unix
dpm
drmserver
du
dumpstate
dumpsys
e2fsck
echo
edmaudit
egrep
env
epmlogd
expand
expr
exyrngd
fallocate
false
fgrep
find
fingerprintd
flock
free
fsck.exfat
fsck.f2fs
fsck_msdos
gatekeeperd
getenforce
getevent
getprop
gps.cer
gpsd
grep
groups
gzip
head
hid
hostapd
hostname
hwclock
icd
id
idmap
ifconfig
iftop
ikev2-client
ime
imsd
inotifyd
input
insmod
install-recovery.sh
installd
insthk
ioctl
iod
ionice
iorenice
ip
ip6tables
ip6tables-restore
ip6tables-save
iptables
iptables-restore
iptables-save
jackd
jackservice
keystore
kill
killall
ld
ld.mc
lhd
linker
linker64
lmkd
ln
load_policy
log
logcat
logd
logname
logwrapper
losetup
lpm
ls
ls.txt
lsmod
lsof
lsusb
macloader
make_ext4fs
make_f2fs
mcDriverDaemon
md5sum
mdnsd
media
mediacodec
mediadrmserver
mediaextractor
mediaserver
mfgloader
mkdir
mkfs.exfat
mknod
mkswap
mktemp
modinfo
monkey
more
mount
mountpoint
mtpd
mv
nandread
ndc
netd
netstat
newfs_msdos
nice
nl
nohup
oatdump
od
otp_server
paste
patch
patchoat
pgrep
pidof
ping
ping6
pkill
pm
pmap
pppd
prepare_param.sh
printenv
printf
prlimit
profman
ps
pwd
qemu-props
qemud
racoon
readlink
realpath
reboot
redsocks
renice
requestsync
resetreason
resize2fs
restorecon
rild
rm
rmdir
rmmod
route
run-as
runcon
samsungpowersoundplay
schedtest
screencap
screenrecord
scs
sdcard
sdp_cryptod
secdiscard
secure_storage_daemon
secure_storage_pm
sed
sem_daemon
sendevent
sensorhubservice
sensorservice
seq
service
servicemanager
setenforce
setprop
setsid
settings
sfotahelper
sgdisk
sh
sha1sum
sleep
sm
smdexe
sort
split
ss_conn_daemon
ss_kbservice_daemon
start
stat
stop
strings
surfaceflinger
svc
swapoff
swapon
sync
sysctl
tac
tail
tar
taskset
tc
tee
telecom
tima_dump_log
time
timeout
tlc_server
toolbox
top
touch
toybox
tr
true
truncate
tty
tzdatacheck
uiautomator
ulimit
umount
uname
uncrypt
uniq
unix2dos
uptime
usleep
vdc
vmstat
vold
wc
which
whoami
wlandutservice
wm
wpa_supplicant
wvkprov
xargs
xxd
yes










share|improve this question









New contributor




Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm currently trying to run X server on my rooted Galaxy note 5.
So far, I can chroot into the official Samsung rootfs and run some binaries. The problem is, it doesn't seem to have compiler in it. All I could find was the linker. Can you give me suggestions on how to build a program for the system with only linker?



Update: Here, I'm providing a list of files in /system/bin. Please note that aarch64-linux-gnu-cpp-6 is the binary I manually added, but it fails to run.



aarch64-linux-gnu-cpp-6
acpi
am
androidshmservice
apaservice
apexserver
app_process
app_process32
app_process64
applypatch
appops
appwidget
argosd
at_distributor
atrace
audioserver
auditd
base64
basename
bcc
bcm_sensorhub_a2.patch
bintvoutservice
blkid
blockdev
bmgr
bootanimation
bootchecker
bootstat
bu
bugreport
bugreportz
bzcat
cal
cameraserver
cat
ccm_gen_cert
charon
chcon
chgrp
chmod
chown
chroot
cksum
clatd
clear
cmd
cmp
comm
connfwexe
content
cp
cpio
cpp-6
cut
dalvikvm
dalvikvm32
dalvikvm64
date
dd
ddexe
debuggerd
debuggerd64
dex2oat
dexdump
df
diag_knight
diagexe
dirname
dm_verity_tz_cmd
dmbserver
dmesg
dnsmasq
dos2unix
dpm
drmserver
du
dumpstate
dumpsys
e2fsck
echo
edmaudit
egrep
env
epmlogd
expand
expr
exyrngd
fallocate
false
fgrep
find
fingerprintd
flock
free
fsck.exfat
fsck.f2fs
fsck_msdos
gatekeeperd
getenforce
getevent
getprop
gps.cer
gpsd
grep
groups
gzip
head
hid
hostapd
hostname
hwclock
icd
id
idmap
ifconfig
iftop
ikev2-client
ime
imsd
inotifyd
input
insmod
install-recovery.sh
installd
insthk
ioctl
iod
ionice
iorenice
ip
ip6tables
ip6tables-restore
ip6tables-save
iptables
iptables-restore
iptables-save
jackd
jackservice
keystore
kill
killall
ld
ld.mc
lhd
linker
linker64
lmkd
ln
load_policy
log
logcat
logd
logname
logwrapper
losetup
lpm
ls
ls.txt
lsmod
lsof
lsusb
macloader
make_ext4fs
make_f2fs
mcDriverDaemon
md5sum
mdnsd
media
mediacodec
mediadrmserver
mediaextractor
mediaserver
mfgloader
mkdir
mkfs.exfat
mknod
mkswap
mktemp
modinfo
monkey
more
mount
mountpoint
mtpd
mv
nandread
ndc
netd
netstat
newfs_msdos
nice
nl
nohup
oatdump
od
otp_server
paste
patch
patchoat
pgrep
pidof
ping
ping6
pkill
pm
pmap
pppd
prepare_param.sh
printenv
printf
prlimit
profman
ps
pwd
qemu-props
qemud
racoon
readlink
realpath
reboot
redsocks
renice
requestsync
resetreason
resize2fs
restorecon
rild
rm
rmdir
rmmod
route
run-as
runcon
samsungpowersoundplay
schedtest
screencap
screenrecord
scs
sdcard
sdp_cryptod
secdiscard
secure_storage_daemon
secure_storage_pm
sed
sem_daemon
sendevent
sensorhubservice
sensorservice
seq
service
servicemanager
setenforce
setprop
setsid
settings
sfotahelper
sgdisk
sh
sha1sum
sleep
sm
smdexe
sort
split
ss_conn_daemon
ss_kbservice_daemon
start
stat
stop
strings
surfaceflinger
svc
swapoff
swapon
sync
sysctl
tac
tail
tar
taskset
tc
tee
telecom
tima_dump_log
time
timeout
tlc_server
toolbox
top
touch
toybox
tr
true
truncate
tty
tzdatacheck
uiautomator
ulimit
umount
uname
uncrypt
uniq
unix2dos
uptime
usleep
vdc
vmstat
vold
wc
which
whoami
wlandutservice
wm
wpa_supplicant
wvkprov
xargs
xxd
yes







chroot






share|improve this question









New contributor




Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago





















New contributor




Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Kinnefix Kim

11




11




New contributor




Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Kinnefix Kim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • What binaries do you have in there? Can you run sshd and transfer the compiler?
    – Aulis Ronkainen
    2 days ago










  • I've updated my question. And no, it doesn't have sshd.
    – Kinnefix Kim
    2 days ago










  • Install(copy) Debian in a chroot.
    – Ipor Sircer
    2 days ago










  • Yes, I tried it with precompiled debootstrap binary, but it didn't have userspace driver from Samsung, which I need.
    – Kinnefix Kim
    2 days ago


















  • What binaries do you have in there? Can you run sshd and transfer the compiler?
    – Aulis Ronkainen
    2 days ago










  • I've updated my question. And no, it doesn't have sshd.
    – Kinnefix Kim
    2 days ago










  • Install(copy) Debian in a chroot.
    – Ipor Sircer
    2 days ago










  • Yes, I tried it with precompiled debootstrap binary, but it didn't have userspace driver from Samsung, which I need.
    – Kinnefix Kim
    2 days ago
















What binaries do you have in there? Can you run sshd and transfer the compiler?
– Aulis Ronkainen
2 days ago




What binaries do you have in there? Can you run sshd and transfer the compiler?
– Aulis Ronkainen
2 days ago












I've updated my question. And no, it doesn't have sshd.
– Kinnefix Kim
2 days ago




I've updated my question. And no, it doesn't have sshd.
– Kinnefix Kim
2 days ago












Install(copy) Debian in a chroot.
– Ipor Sircer
2 days ago




Install(copy) Debian in a chroot.
– Ipor Sircer
2 days ago












Yes, I tried it with precompiled debootstrap binary, but it didn't have userspace driver from Samsung, which I need.
– Kinnefix Kim
2 days ago




Yes, I tried it with precompiled debootstrap binary, but it didn't have userspace driver from Samsung, which I need.
– Kinnefix Kim
2 days ago















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Kinnefix Kim is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376602%2fhow-to-setup-debian-on-rootfs-with-libc-pre-installed%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








Kinnefix Kim is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Kinnefix Kim is a new contributor. Be nice, and check out our Code of Conduct.













Kinnefix Kim is a new contributor. Be nice, and check out our Code of Conduct.












Kinnefix Kim is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376602%2fhow-to-setup-debian-on-rootfs-with-libc-pre-installed%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae

Can an atomic nucleus contain both particles and antiparticles? [duplicate]